/* wt-custom.css
   Loaded via <link> in both layouts so the InlineCss middleware never
   processes these rules.  Keep ALL page-specific CSS here rather than
   in <style> blocks or injectCSS() so the rendered HTML stays clean.
*/

/* ── CSS variables for nohead-layout pages ─────────────────── */
:root {
    --wt-red:            #da332a;
    --wt-red-dark:       #b8281f;
    --wt-charcoal:       #322e2b;
    --wt-card-bg:        #ffffff;
    --wt-text-primary:   #1c1c1e;
    --wt-text-secondary: #50596b;
    --wt-text-muted:     #8f96a3;
    --wt-border:         #e4e7ec;
    --wt-dropdown-bg:    #ffffff;
    --wt-dropdown-border:#e8e8e8;
    --wt-dropdown-hover: #f5f6f8;
    --wt-table-hd-bg:    #322e2b;
    --wt-table-hd-text:  #fff;
    --wt-table-stripe:   #f7f8fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
}

/* ════════════════════════════════════════════════════════════════
   EDIT-SITE — status + layout chrome
   (was @section('template_fastload_css') in edit-site.blade.php)
   ════════════════════════════════════════════════════════════════ */
.card-header {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 2px solid var(--wt-red) !important;
    padding: 8px 16px !important;
    background: #fff !important;
    font-weight: 600;
    min-height: 44px;
}
.btn-secondary {
    background-color: var(--wt-charcoal) !important;
    border-color: var(--wt-charcoal) !important;
    color: #fff !important;
}
.btn-secondary:hover { background-color: #4a4542 !important; border-color: #4a4542 !important; }
.btn-group-xs > .btn { padding: 5px 11px !important; font-size: .875rem !important; border-radius: 6px !important; }
/* ── 3-dot page dropdowns (NOT the navbar user menu) ── */
.btn-group .dropdown-menu,
.btn-group-xs .dropdown-menu {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.13) !important;
    border-radius: 8px !important;
    padding: 4px 0 !important;
    min-width: 200px !important;
    z-index: 1060;
}
.btn-group .dropdown-item,
.btn-group-xs .dropdown-item {
    font-size: .8125rem !important;
    color: #374151 !important;
    padding: 8px 16px !important;
    white-space: nowrap !important;
    background: transparent !important;
    border: none !important;
    text-align: left !important;
    cursor: pointer !important;
    line-height: 1.5 !important;
    border-radius: 0 !important;
    margin: 0 !important;
}
.btn-group .dropdown-item:hover,
.btn-group .dropdown-item:focus,
.btn-group-xs .dropdown-item:hover,
.btn-group-xs .dropdown-item:focus {
    background: #f3f4f6 !important;
    color: #111827 !important;
}
.btn-group .dropdown-divider,
.btn-group-xs .dropdown-divider {
    margin: 4px 0 !important;
    border-color: #e5e7eb !important;
}
.wt-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 5px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .3px;
}
.wt-status-test    { background: rgba(245,158,11,.15); color: #92400e; border: 1px solid rgba(245,158,11,.5); }
.wt-status-monitor { background: rgba(2,132,199,.12);  color: #0369a1; border: 1px solid rgba(2,132,199,.35); }
.wt-status-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ════════════════════════════════════════════════════════════════
   EDIT-SITE — tabbed sections + form elements
   (was injectCSS() in edit-site.blade.php)
   ════════════════════════════════════════════════════════════════ */
.tabx {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 4px 6px;
    background: #322e2b;
    border-radius: 4px 4px 0 0;
    margin-top: 10px;
}
.tabx a {
    display: inline-block;
    padding: 5px 11px;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    cursor: pointer;
    border-radius: 3px;
    color: rgba(255,255,255,.7);
    text-decoration: none;
    transition: background .15s, color .15s;
    border: none;
    outline: none;
}
.tabx a:hover  { background: rgba(255,255,255,.12); color: #fff; }
.tabx a.active { background: #da332a; color: #fff; }

.tabcontent {
    display: none;
    padding: 8px 10px;
    border: 1px solid #e4e7ec;
    border-top: none;
    font-size: 13px;
    /* Several pages put a many-column <table> straight inside here with no
       responsive wrapper - on a narrow screen it was wider than the popup
       and had no way to reach the clipped columns. */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Edit-site table styles — scoped to .wt-edit-wrapper so they don't bleed to alarm page */
#wrapper.wt-edit-wrapper table { font-size: 13px; border-collapse: collapse; width: 100%; }
#wrapper.wt-edit-wrapper th {
    background: #322e2b;
    color: #fff;
    font-weight: 600;
    text-align: left;
    padding: 6px 8px;
    border: 1px solid #4a4542;
}
#wrapper.wt-edit-wrapper td { border: 1px solid #e4e7ec; text-align: left; padding: 5px 8px; vertical-align: top; }
#wrapper.wt-edit-wrapper tr:nth-child(even) > td { background: #f8f9fa; }


#emails th:nth-child(1), #emails td:nth-child(1) { width: 148px; white-space: nowrap; }
#emails th:nth-child(3), #emails td:nth-child(3) { width: 130px; }
#emails th:nth-child(4), #emails td:nth-child(4) { width: 190px; word-break: break-all; }

textarea.big { font-size: 13px; }
input.big    { font-size: 13px; }
div.hidden   { display: none; }
.disabledDiv { display: none; }
.enabledDiv  { display: block; }
/* The Holds "confirm update" popup's All-Codes checkbox row and warning
   row both toggle these same classes across its confirm/re-confirm steps,
   but removing either from flow (display:none) shrinks the popup and
   shifts the Confirm button up/down - keep both rows' height reserved and
   just hide their content instead, so the popup never resizes. */
#warnAllCodes.disabledDiv { display: block; visibility: hidden; }
#warnAllCodes.enabledDiv  { visibility: visible; }
#divAllCodes.disabledDiv { visibility: hidden; }
#divAllCodes.enabledDiv  { visibility: visible; }
.centred     { text-align: center; }
hr.divider   { border-top: 1px solid #da332a; margin: 0; }

.checkbox { display: inline-flex; cursor: pointer; position: relative; }
.checkbox > input {
    height: 22px; width: 22px;
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    border: 2px solid #ccc; border-radius: 3px;
    outline: none; background: #fff; cursor: pointer;
}
.checkbox > input:checked { border-color: #da332a; background: #da332a; }
.checkbox > input:checked + span::before {
    content: '\2714'; font-size: 13px;
    display: block; text-align: center; color: #fff;
    position: absolute; left: 3px; top: 1px;
}

/* A widely copy-pasted modal template across the app puts the close button
   BEFORE the title in the DOM (title wrapped in its own centered div after
   it), so on any page missing extra positioning CSS the X ends up on the
   left instead of the right. Rather than reorder markup across dozens of
   files, force the correct visual order here: title/content first (left),
   close button always last (right) — regardless of source DOM order. */
.modal-header { justify-content: space-between; }
.modal-header .btn-close { order: 2; margin-left: auto; }
.modal-header > *:not(.btn-close) { order: 1; }

#wrapper strong { color: #da332a; }
/* label.control-label (not just .control-label) so this reliably out-specifies
   the Paper Dashboard theme's ".card label { font-size: 0.8571em }" rule
   (paper-dashboard/_cards.scss), which otherwise shrinks every form label
   inside a .card - including these site edit-tab forms - to ~11px. */
label.control-label { font-weight: 600; font-size: 13px; color: #50596b; }
/* Same ".card label" shrink also hits non-.control-label labels (e.g. the
   plain "checkbox" labels on the Schedule tab's month grid) - reset every
   label back to the theme size within these site-details-modal tab pages,
   ID-scoped so it reliably beats ".card label" regardless of source order. */
#wrapper.wt-edit-wrapper label,
#servicenotes-wrap label { font-size: 13px; }
.form-control, .form-select { font-size: 13px !important; padding: 4px 8px !important; }
.input-group > .form-control,
.input-group > .form-select,
.input-group > .form-floating { width: 1%; min-width: 0; }

/* Inline inset label — sits inside the top-left of the field instead of on its own row */
.wt-inset-label { position: relative; }
.wt-inset-label > label {
    position: absolute;
    top: 3px;
    left: 9px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: #8f96a3;
    line-height: 1;
    pointer-events: none;
    z-index: 2;
}
.wt-inset-label > .form-control,
.wt-inset-label > .form-select {
    padding-top: 17px !important;
    padding-bottom: 3px !important;
    height: auto !important;
}

/* Note/callout temp-contact table column widths */
.col-note     { width: 50%; }
.col-calllist { width: 45%; }
.col-action   { width: 5%; text-align: right; }

/* Rotalog history column widths */
.col-date      { width: 12%; }
.col-comment   { width: 28%; }
.col-changed-by { width: 30%; }
.col-rota-btn  { width: 10px; }

/* Borderless table helpers (rotalog inner tables + API modal) */
.table-borderless-collapse { border-collapse: collapse; border: none; }
.border-none      { border: none !important; }
.td-borderless    { border: none !important; }
.td-borderless-top { border: none !important; vertical-align: top; }

/* Changelog colour classes (edit-site rotalog + rotamanagement) */
.change-deleted  { color: red; }
.change-added    { color: blue; }
.change-neutral  { color: black; }

/* ════════════════════════════════════════════════════════════════
   SITETABS MODAL  (scripts/sitetabs.blade.php)
   ════════════════════════════════════════════════════════════════ */
.tab {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 6px 8px;
    background: var(--wt-card-bg, #fff);
    border-bottom: 1px solid var(--wt-border, #e4e7ec);
}
.tablinks {
    display: inline-block;
    padding: 5px 14px;
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    cursor: pointer;
    border-radius: 4px;
    color: var(--wt-text-muted, #6c757d);
    text-decoration: none;
    transition: background .15s, color .15s;
    border: 1px solid transparent;
}
.tablinks:hover  { background: rgba(0,0,0,.06); color: var(--wt-text-primary, #1c1c1e); }
.tablinks.active { background: var(--wt-red, #da332a); color: #fff; border-color: var(--wt-red, #da332a); }

.showdiv  { display: block; height: 100%; }
.hidediv  { display: none; }
.showframe { width: 100%; height: 100%; border: none; display: block; }

/* Sitetabs modal sizing and layout */
.wt-site-dialog {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    /* Was 88vw/88vh - per feedback this popup (site Alarms/Fault/Install/
       Service/etc tabs) wasn't large enough to show its full tables
       without scrolling. Near-fullscreen gives those tabs the most room
       while keeping a small margin around the modal. */
    width: 99vw !important;
    max-width: 99vw !important;
    height: 98vh !important;
}
#sitetabs .modal-content { height: 100%; display: flex; flex-direction: column; }
#sitetabs .modal-body    { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
/* Tighten this modal's own header/tab-bar chrome (scoped to #sitetabs
   only, not the shared .modal-header/.tablinks used elsewhere) to give
   tabs like Alarms a little more of the popup's height to work with. */
#sitetabs .modal-header { padding: 6px 12px; }
#sitetabs #tablist       { padding: 4px 8px; }
#sitetabs .tablinks      { padding: 3px 12px; }
#tabframes               { flex: 1; min-height: 0; overflow: hidden; }

/* ════════════════════════════════════════════════════════════════
   SHOW-SITES  (sitemanagement/show-sites.blade.php)
   ════════════════════════════════════════════════════════════════ */
.wt-sites-header {
    background: var(--wt-table-hd-bg, #322e2b) !important;
    color: var(--wt-table-hd-text, #fff) !important;
    padding: 10px 0;
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.site-block {
    border-bottom: 1px solid var(--wt-border, #e4e7ec);
    padding: 6px 0;
    min-height: 50px;
    background: var(--wt-card-bg, #fff);
    transition: background .12s;
}
.site-block:nth-child(even) { background: var(--wt-table-stripe, #f7f8fa); }
.site-block:hover { background: var(--wt-dropdown-hover, #f0f2f5) !important; }

.wt-level-row {
    border-bottom: 1px solid var(--wt-border, #e4e7ec);
    padding: 6px 0;
    background: var(--wt-card-bg, #fff);
}

.indent-0 { padding-left: 0;     padding-bottom: 2px; }
.indent-1 { padding-left: 50px;  padding-bottom: 2px; }
.indent-2 { padding-left: 90px; }
.indent-3 { padding-left: 90px; }
.indent-4 { padding-left: 150px; }

.ontop { z-index: 9999 !important; }

/* Org-level dropdown menu */
.wt-org-menu-wrap { position: relative; display: inline-block; }
.wt-org-menu      { display: none; position: absolute; top: 100%; left: 0; z-index: 9999; margin-top: 2px; }
.icon-caret       { font-size: .65em; }

/* Traffic lights */
.traffic-light {
    height: 18px; width: 18px; padding: 4px; text-align: center; border-radius: 50%;
    display: inline-block; color: #fff; font-size: 1.1em; font-weight: 600;
    border: 2px solid black; vertical-align: middle;
}
.traffic-light.red   { background: linear-gradient(45deg, rgba(0,0,0,1) 0%, rgba(253,29,29,1) 50%, rgba(255,255,255,1) 100%); }
.traffic-light.green { background: linear-gradient(45deg, rgba(0,0,0,1) 0%, rgba(29,253,85,1) 50%, rgba(255,255,255,1) 100%); }
.traffic-light.amber { background: linear-gradient(45deg, rgba(0,0,0,1) 0%, rgba(253,224,29,1) 50%, rgba(255,255,255,1) 100%); }

.modal-dialog.modal-wide { max-width: 95%; }
.debug   { outline: 10px solid red !important; }
.topics tr { height: 1px; }
.align-right { display: flex; justify-content: flex-end; }
.row.table-light { will-change: transform; transform: translateZ(0); }

/* ════════════════════════════════════════════════════════════════
   DASHBOARD  (sitemanagement/dashboard.blade.php)
   ════════════════════════════════════════════════════════════════ */

/* Table border resets — scoped to dashboard wrapper to avoid global bleed */
#dashboard-wrap tr { border: none !important; }
#dashboard-wrap .table th, #dashboard-wrap .table td { border-top: none !important; }

/* Nav buttons above charts */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0;
}
.nav-button {
    padding: 0.6em 1.2em;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    background-color: #0078D4;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.nav-button:hover    { background-color: #005A9E; }
.nav-button:disabled { background-color: #ccc; cursor: not-allowed; }
.nav-button.back::before    { content: "\2190"; }
.nav-button.forward::after  { content: "\2192"; }

.red-border { border: 1px solid red; }

.download {
    background: lightgrey;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.download:hover { background: grey; }

#vega-chart-wrapper { width: 100%; height: 100%; position: relative; }
.vega-chart         { width: 100%; height: 300px; }
.vega-chart-wrapper { width: 100%; }

.dashboard-active { background-color: yellow; }

.rotate {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    text-align: center;
    font-size: 20px;
    font-weight: bold;
}

.custom-checkbox { position: relative; display: inline-block; cursor: pointer; }
.custom-checkbox input[type="checkbox"] { opacity: 0; width: 0; height: 0; }
.checkmark {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #007bff;
    background-color: transparent;
    transition: background-color 0.2s ease;
}
.custom-checkbox input:checked + .checkmark { background-color: #007bff; }

/* Dashboard grid / shed tiles */
.centered-container { display: flex; justify-content: center; }
.my-small-table { font-size: 12px; }
.my-tiny-table  { font-size: 8px; padding: 0; }
.form-control-xs { height: 22px; padding: 0; font-size: 10px; line-height: 1.5; border-radius: 3px; }
.clickable-table tbody tr:hover { cursor: pointer; background-color: #f0f0f0; }

#dashboard-wrap .grid-container {
    display: grid !important;
    grid-template-columns: repeat(10, 1.2fr) !important;
    gap: 15px;
    margin: auto;
}
.grid-item {
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
}
.shed-title { font-weight: bold; margin-bottom: 8px; }
.data-line  { margin: 0; }
.unit       { font-size: 12px; }
.section    { margin-top: 8px; }
.hidden-row { display: none !important; }
.visible-row { visibility: visible; }

/* Inline-style replacements (dashboard + shared) */
.icon-droplet { width: 18px; height: auto; vertical-align: middle; margin-left: 4px; }
.icon-lg      { width: 28px; height: auto; vertical-align: middle; margin-right: 8px; }
.icon-alarm   { color: #da332a; font-size: 20px; }
.icon-action  { width: 20px; height: 20px; vertical-align: middle; }

/* Chart control layout */
.chart-row      { height: 300px; }
.chart-col-label { width: 3%; }
.chart-col       { width: 25%; }
.chart-ctrl-cell { text-align: left; padding: 8px; }
.chart-ctrl-bar  { display: flex; justify-content: space-between; align-items: center; }
.nav-btn-group   { display: flex; gap: 0.5rem; }

/* ════════════════════════════════════════════════════════════════
   ROTA MANAGEMENT  (rotamanagement/index.blade.php)
   ════════════════════════════════════════════════════════════════ */
.table-header {
    border-bottom: 2px solid var(--wt-border, #e4e7ec);
    padding: .5rem .75rem;
    font-weight: 700;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: var(--wt-charcoal, #322e2b);
    color: #fff;
}
.table-row { padding: .5rem .75rem; border-top: 1px solid var(--wt-border, #e4e7ec); }

#rota-wrap table.table thead th {
    background: var(--wt-charcoal, #322e2b) !important;
    color: #fff !important;
    /* Was .75rem/8px 12px, same "everything so small" feedback as the
       table body and buttons below. */
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 10px 14px;
    border: none;
}
/* Was 13px/7px 12px - per feedback this whole page (rota list, reached
   from a site's Rota tab) read as too small to comfortably use. */
#rota-wrap table.table tbody td  { font-size: 15px; padding: 10px 14px; vertical-align: middle; }
#rota-wrap table.table tbody tr:hover { background: #f5f6f8; }

/* Codes + Delete in the Action column - Delete used float:end, which
   wrapped it awkwardly onto its own line (indented, disconnected from
   Codes) once the buttons' full-size desktop padding didn't fit beside
   each other in this narrow column. A flex row with a small gap wraps
   cleanly as a pair instead. */
#rota-wrap .wt-rota-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Narrow screens - the three-dot menu used to float beside the table
   (fixed separately, see index.blade.php), squeezing it so badly that
   "Call out lists for codes" wrapped across 5 lines. With the menu now
   on its own row above, shrink the table a bit further here too so it
   comfortably fits a phone-width popup. */
@media (max-width: 575.98px) {
    #rota-wrap table.table thead th { font-size: .74rem; padding: 7px 8px; }
    #rota-wrap table.table tbody td { font-size: 13px; padding: 7px 8px; }
    #rota-wrap .btn { font-size: .82rem !important; padding: 6px 12px !important; }

    /* Shrinking fonts alone still didn't fit: the Codes column's button
       can hold a single long comma list (e.g. "0,1,2,3,4,5,6,7,8,9,10,
       11,12,17,18") that doesn't wrap, forcing the whole row wider than
       the screen regardless of font-size, with the Action column's
       Delete button clipped off the edge. Reflow the table from a wide
       row into a stacked block per rota (table/tbody/tr keep their
       display so JS's table.rows/row.cells indexing used by addRow()/
       saveChanges() still works - only the visual layout changes), and
       let the long codes button wrap across lines instead of forcing
       width. */
    #rota-wrap table.table thead { display: none; }
    #rota-wrap table.table,
    #rota-wrap table.table tbody,
    #rota-wrap table.table tr {
        display: block;
        width: 100%;
    }
    #rota-wrap table.table tr {
        padding: 10px 0;
        border-bottom: 1px solid var(--wt-border, #e4e7ec);
    }
    #rota-wrap table.table td {
        display: block;
        padding: 3px 0 !important;
        border: none !important;
    }
    #rota-wrap table.table td:nth-child(2) {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    #rota-wrap table.table td:nth-child(2) .btn {
        white-space: normal;
        word-break: break-word;
        text-align: left;
        max-width: 100%;
        font-size: .72rem !important;
        padding: 4px 8px !important;
    }
}

/* The Action column's Codes/Delete buttons only ever hold one short
   word each - shrink them a bit more than the table's general .btn
   sizing above so a narrow Action column doesn't force them onto
   separate lines as often. */
#rota-wrap .wt-rota-actions .btn {
    font-size: .8rem !important;
    padding: 6px 12px !important;
}

#rota-wrap .btn-primary { background: var(--wt-charcoal, #322e2b) !important; border-color: var(--wt-charcoal, #322e2b) !important; }
#rota-wrap .btn-warning { background: #f59e0b !important; border-color: #f59e0b !important; color: #fff !important; }
/* Delete/Save colour is handled by the GLOBAL .btn-danger/.btn-success
   rules further down this file, so every page stays consistent without a
   one-off override here - see the "Global button colours" block. */
/* Was .78rem/4px 10px - too small alongside the table-size feedback above. */
#rota-wrap .btn         { font-size: 1rem !important; padding: 8px 16px !important; border-radius: 4px !important; }

#rota-wrap .card      { border: none; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
#rota-wrap .card-body { padding: 12px 16px !important; }

/* Call-out list for a rota's codes (rotamanagement/show-people.blade.php,
   reached via the Rota tab's "Codes" button) - had no brand-colour scope
   or sizing rules at all, so it fell back to plain Bootstrap defaults:
   a slightly different red for Delete than the rest of the site's
   .btn-danger, a default-small table, and default-small buttons. Matched
   to the same sizing/colour treatment as #rota-wrap above for
   consistency, per feedback that both this and the rota list page were
   too small and that Delete should be the same red everywhere. */
#people-wrap table.table thead th {
    background: var(--wt-charcoal, #322e2b) !important;
    color: #fff !important;
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 10px 14px;
    border: none;
}
#people-wrap table.table tbody td  { font-size: 15px; padding: 10px 14px; vertical-align: middle; }
#people-wrap table.table tbody tr:hover { background: #f5f6f8; }
#people-wrap .btn         { font-size: 1rem !important; padding: 8px 16px !important; border-radius: 4px !important; }
#people-wrap .card      { border: none; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
#people-wrap .card-body { padding: 12px 16px !important; }

/* Site edit popup (sitemanagement/edit-site.blade.php) - unlike rota-wrap,
   this page never had a brand-color scope at all, so its Add/+ buttons
   rendered in vanilla Bootstrap blue instead of the charcoal used
   everywhere else in the app. Delete/Save colour is handled by the
   GLOBAL .btn-danger/.btn-success rules below. */
#wrapper.wt-edit-wrapper .btn-primary { background: var(--wt-charcoal, #322e2b) !important; border-color: var(--wt-charcoal, #322e2b) !important; }

/* ===== Global button colours =====
   Every Delete button (.btn-danger) and every Save/Confirm button
   (.btn-success) across the whole app, regardless of page/layout
   (app.blade.php or nohead.blade.php) or which popup/modal it's in.
   Added once here instead of per-page overrides, per feedback that
   Delete should be the same red everywhere and this shouldn't need
   repeating for every new page. */
.btn-danger  { background: var(--wt-red, #da332a) !important; border-color: var(--wt-red, #da332a) !important; color: #fff !important; }
.btn-success { background-color: #28a745 !important; border-color: #28a745 !important; color: #fff !important; }

/* Kept in step with the global rule above. */
.bootstrap-select select:valid+.dropdown-toggle { border-color: #28a745 !important; }

.block {
    display: block;
    width: 100%;
    border: none;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
}
.float-child { float: left; padding: 20px; }

/* Rota change row markers */
.row-separator { border-bottom: 1px solid black; }

/* Message area */
.message-area { display: block; text-align: center; }

@media screen {
    #printSection { display: none; }
}
@media print {
    body * { visibility: hidden; }
    #printSection, #printSection * { visibility: visible; }
    #printSection { position: absolute; left: 0; top: 0; }
    #rota td.orange { color: #ff9933; }
    #rota td.blue   { color: #00F; }
    #rota td.red    { color: red; }
}

/* ════════════════════════════════════════════════════════════════
   CONTACT MANAGEMENT  (contactmanagement/index.blade.php)
   ════════════════════════════════════════════════════════════════ */
.contact-sites-cell { min-width: 160px; }
.contact-sites-cell .form-control,
.contact-sites-cell select.form-control { min-width: 150px; }
.contact-action-cell { white-space: nowrap; }

/* ════════════════════════════════════════════════════════════════
   COVER GRID  (sitemanagement/cover-grid.blade.php)
   ════════════════════════════════════════════════════════════════ */
#cover-grid-wrap .cover-grid-table {
    font-size: 14px;
    border-collapse: collapse;
    width: 100%;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    overflow: hidden;
}
#cover-grid-wrap .cover-grid-table thead tr {
    background: var(--wt-charcoal, #322e2b);
    color: #fff;
}
#cover-grid-wrap .cover-grid-table thead th {
    padding: 10px 8px;
    border: 1px solid #4a4440;
    vertical-align: middle;
}
#cover-grid-wrap .cover-grid-table thead th .form-select {
    background-color: #4a4440;
    color: #fff;
    border-color: #6b6360;
    font-weight: 600;
    font-size: 13px;
}
#cover-grid-wrap .cover-grid-table thead th .form-select option {
    background-color: #322e2b;
    color: #fff;
}
#cover-grid-wrap .cover-grid-table tbody tr:nth-child(odd)  { background: #f9f9f9; }
#cover-grid-wrap .cover-grid-table tbody tr:nth-child(even) { background: #ffffff; }
#cover-grid-wrap .cover-grid-table tbody tr:hover { background: #f0efee; }
#cover-grid-wrap .cover-grid-table td {
    border: 1px solid #e0e0e0;
    padding: 8px;
    vertical-align: top;
}
/* Day label column */
.cover-day-cell {
    width: 90px;
    min-width: 80px;
    vertical-align: middle !important;
    text-align: center;
}
.cover-day-badge {
    display: inline-block;
    background: var(--wt-charcoal, #322e2b);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-radius: 4px;
    padding: 6px 10px;
    min-width: 64px;
}
/* Column header width */
.cover-col-head { width: 160px; min-width: 140px; }
/* Compact selects inside grid cells */
#cover-grid-wrap .cover-grid-table tbody .form-select {
    font-size: 13px;
    padding: 4px 28px 4px 8px;
    margin-bottom: 4px;
    border-radius: 4px;
}
#cover-grid-wrap .cover-grid-table tbody .form-control {
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 4px;
}
/* Cover-type color selects */
.cover-type-select { font-weight: 600; }
/* Modal form labels & selects */
.cover-modal-form .form-label { font-weight: 500; margin-bottom: .3rem; }
.cover-modal-form select.form-select,
.cover-modal-form input.form-control { font-size: 14px; }
/* Save button row */
.cover-save-row { padding: 12px 0 4px; }

/* ════════════════════════════════════════════════════════════════
   DIALERS  (sitemanagement/dialers.blade.php)
   ════════════════════════════════════════════════════════════════ */
/* Table header */
#dialer-wrap .dialer-table thead tr {
    background: var(--wt-charcoal, #322e2b);
    color: #fff;
}
#dialer-wrap .dialer-table thead th {
    padding: 10px 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .03em;
    border-bottom: 2px solid #4a4440;
    white-space: nowrap;
}
/* Alternating rows */
#dialer-wrap .dialer-table tbody tr:nth-child(odd)  { background: #f9f9f9; }
#dialer-wrap .dialer-table tbody tr:nth-child(even) { background: #ffffff; }
#dialer-wrap .dialer-table tbody tr:hover           { background: #f0efee; }
#dialer-wrap .dialer-table td {
    padding: 8px 10px;
    font-size: 13px;
    vertical-align: middle;
    border-top: 1px solid #ebebeb;
}
/* Heartbeat icon */
.dialer-heart { color: var(--wt-red, #da332a); font-size: 14px; margin-left: 4px; }
/* Heartbeat timestamp text */
.dialer-hb-time { font-size: 12px; color: #555; }
/* Status info cell colours set by JS. layouts/app.blade.php's own
   "#.table tbody td { color: var(--wt-text-primary) !important }" rule is
   ALSO !important, so plain !important here just ties and loses on
   specificity (that rule has two element selectors, this had none) -
   out-specify it with the same #id + .class + element shape used by the
   other dialer-table rule just above. */
#dialer-wrap .dialer-table td.dialer-info-waiting  { color: var(--wt-red, #da332a) !important; font-weight: 600; }
#dialer-wrap .dialer-table td.dialer-info-started  { color: #1a56db !important; font-weight: 600; }
#dialer-wrap .dialer-table td.dialer-info-complete { color: #1a56db !important; font-weight: 600; }
/* Card-header controls */
.dialer-header-left  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dialer-header-right { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.dialer-header-label { font-size: 13px; font-weight: 500; color: #555; }
/* Custom checkbox */
.dialer-chk { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.dialer-chk > input[type="checkbox"] {
    height: 18px;
    width: 18px;
    -webkit-appearance: none;
    appearance: none;
    border: 2px solid #6b7280;
    border-radius: 4px;
    outline: none;
    background-color: #fff;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    flex-shrink: 0;
}
.dialer-chk > input[type="checkbox"]:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}
.dialer-chk > input[type="checkbox"]:checked::after {
    content: '\2714';
    display: block;
    color: #fff;
    font-size: 12px;
    text-align: center;
    line-height: 15px;
}
.dialer-chk > input[type="checkbox"]:active { border-color: #322e2b; }

/* ════════════════════════════════════════════════════════════════
   PARTS LIST  (partmanagement/index.blade.php)
   ════════════════════════════════════════════════════════════════ */
/* Product sub-group tab bar */
#parts-wrap .tab {
    overflow: hidden;
    background: #f8f8f8;
    border-bottom: 2px solid var(--wt-red, #da332a);
    border-radius: 4px 4px 0 0;
}
#parts-wrap .tab a {
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 8px 14px;
    font-size: 13px;
    text-decoration: none;
    color: #555;
    transition: background .15s;
}
#parts-wrap .tab a:hover  { background: #e8e8e8; color: #222; }
#parts-wrap .tab a.active {
    background: var(--wt-charcoal, #322e2b);
    color: #fff;
    border-radius: 3px 3px 0 0;
}
#parts-wrap .tab a.inactive { background: transparent; color: #555; }
/* Group tab content panels */
.grouptabcontent { display: none; padding: 0; border: 1px solid #e0e0e0; border-top: none; }
/* Inner part-editor tab bar (inside newPart modal) */
.parts-modal-body .inner-tab {
    overflow: hidden;
    border-bottom: 1px solid #dee2e6;
    background: #fff;
    margin-top: 10px;
}
.parts-modal-body .inner-tab a {
    float: left;
    border: 1px solid transparent;
    outline: none;
    cursor: pointer;
    padding: 6px 14px;
    font-size: 13px;
    text-decoration: none;
    color: #555;
    border-radius: 4px 4px 0 0;
    transition: background .15s;
}
.parts-modal-body .inner-tab a:hover  { background: #f0f0f0; }
.parts-modal-body .inner-tab a.active {
    background: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    color: var(--wt-charcoal, #322e2b);
    font-weight: 600;
}
.parts-modal-body .inner-tab a.inactive { color: #aaa; }
/* Inner tab content */
.tabcontent { display: none; padding: 10px 2px; border: 1px solid #dee2e6; border-top: none; }
/* Parts grid table */
#parts-wrap .parts-grid thead tr {
    background: var(--wt-charcoal, #322e2b);
    color: #fff;
}
#parts-wrap .parts-grid thead th {
    padding: 9px 8px;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 2px solid #4a4440;
}
#parts-wrap .parts-grid tbody tr:nth-child(odd)  { background: #f9f9f9; }
#parts-wrap .parts-grid tbody tr:nth-child(even) { background: #fff; }
#parts-wrap .parts-grid tbody tr:hover { background: #f0efee; }
/* Modal info tables (used-by, explosion, supplier) */
.parts-modal-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.parts-modal-table th { background: var(--wt-charcoal, #322e2b); color: #fff; padding: 7px 8px; text-align: left; }
.parts-modal-table td { padding: 6px 8px; border-bottom: 1px solid #e0e0e0; }
/* Checkboxes scoped to parts page */
#parts-wrap input[type='checkbox'] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 4px;
    border: 2px solid #6b7280;
    outline: none;
    cursor: pointer;
    vertical-align: middle;
    transition: background .15s, border-color .15s;
}
#parts-wrap input[type='checkbox']:checked {
    background: #0d6efd;
    border-color: #0d6efd;
}
/* Thumbnail image */
.parts-thumb { max-width: 40px; max-height: 40px; object-fit: contain; }
/* Part editor form */
.parts-form-label { font-size: 13px; font-weight: 500; padding: 8px 6px; white-space: nowrap; }
/* Product selector */
.parts-product-select { min-width: 200px; max-width: 340px; }

/* ════════════════════════════════════════════════════════════════
   SUPPLIER LIST  (partmanagement/supplier-list.blade.php)
   ════════════════════════════════════════════════════════════════ */
#supplier-wrap .supplier-table thead tr {
    background: var(--wt-charcoal, #322e2b);
    color: #fff;
}
#supplier-wrap .supplier-table thead th {
    padding: 9px 10px;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 2px solid #4a4440;
}
#supplier-wrap .supplier-table tbody tr:nth-child(odd)  { background: #f9f9f9; }
#supplier-wrap .supplier-table tbody tr:nth-child(even) { background: #fff; }
#supplier-wrap .supplier-table tbody tr:hover { background: #f0efee; }
#supplier-wrap .supplier-table tbody td { padding: 8px 10px; font-size: 13px; vertical-align: middle; }
.supplier-search { max-width: 320px; }
.supplier-pricelist thead tr { background: var(--wt-charcoal, #322e2b); color: #fff; }
.supplier-pricelist thead th { padding: 8px 8px; font-size: 13px; font-weight: 600; }
.supplier-pricelist tbody tr:nth-child(odd)  { background: #f9f9f9; }
.supplier-pricelist tbody tr:nth-child(even) { background: #fff; }
.supplier-pricelist tbody td { padding: 5px 6px; vertical-align: middle; }

/* ════════════════════════════════════════════════════════════════
   CONTACT LIST  (contactmanagement/list-contacts.blade.php)
   ════════════════════════════════════════════════════════════════ */
#contact-list-wrap .contact-list-table thead tr {
    background: var(--wt-charcoal, #322e2b);
    color: #fff;
}
#contact-list-wrap .contact-list-table thead th {
    padding: 9px 10px;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 2px solid #4a4440;
}
#contact-list-wrap .contact-list-table tbody tr:nth-child(odd)  { background: #f9f9f9; }
#contact-list-wrap .contact-list-table tbody tr:nth-child(even) { background: #fff; }
#contact-list-wrap .contact-list-table tbody tr:hover { background: #f0efee; }
#contact-list-wrap .contact-list-table tbody td {
    padding: 7px 10px;
    font-size: 13px;
    vertical-align: middle;
}
.cl-search-input { width: 130px; }

/* ════════════════════════════════════════════════════════════════
   REPORTS  (reports/show-reports.blade.php)
   ════════════════════════════════════════════════════════════════ */
#reports-wrap .card-header { display: block !important; }
#reports-wrap .card,
#reports-wrap .card-body   { overflow: visible !important; }
#reports-wrap .rpt-select  { min-width: 200px; }
#reports-wrap .rpt-info    { display: none; font-size: 12px; color: #6c757d; padding: 4px 16px 12px; text-align: center; }
#reports-wrap #vis         { display: block; }

/* ════════════════════════════════════════════════════════════════
   NOTIFICATIONS  (contactmanagement/show-notifications.blade.php)
   ════════════════════════════════════════════════════════════════ */
#notifications-wrap .card-header { display: block !important; }

/* ════════════════════════════════════════════════════════════════
   GLOBAL 3-DOT MENU  (shared across all pages)
   ════════════════════════════════════════════════════════════════ */
/* Allow dropdown to escape card bounds */
.card         { overflow: visible !important; }
.card-header  { overflow: visible !important; }

/* bootstrap-select's SCSS ships an unscoped ".dropdown-menu{opacity:0;
   visibility:hidden}" base rule intended only for its own picker, but with
   no real Bootstrap 5 dropdown.scss compiled in to supply the opposing
   ".dropdown-menu.show{opacity:1;visibility:visible}" override, it silently
   keeps every plain Bootstrap dropdown menu on the site invisible even once
   it's open. Restore the real Bootstrap 5 open-state behaviour here. */
.dropdown-menu.show {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ── Button — both custom (wt-dot-btn) and Bootstrap (dropdown-toggle) ── */
.wt-dot-btn,
.btn-group-xs .dropdown-toggle,
.card-header .btn-group .dropdown-toggle {
    background: transparent !important;
    border: 1px solid #ccc !important;
    color: #1c1c1e !important;
    padding: 3px 8px !important;
    border-radius: 5px !important;
    line-height: 1.4 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    box-shadow: none !important;
}
.wt-dot-btn:hover,
.wt-dot-btn:focus,
.btn-group-xs .dropdown-toggle:hover,
.btn-group-xs .dropdown-toggle:focus,
.card-header .btn-group .dropdown-toggle:hover,
.card-header .btn-group .dropdown-toggle:focus {
    background: #f3f4f6 !important;
    border-color: #9ca3af !important;
    color: #1c1c1e !important;
    box-shadow: none !important;
}
/* Hide Bootstrap caret arrow on 3-dot dropdowns only */
.btn-group-xs .dropdown-toggle::after,
.card-header .btn-group .dropdown-toggle::after {
    display: none !important;
}

/* ── Restore navbar user menu — untouched by 3-dot styles ── */
.main-panel .navbar .btn-group .dropdown-toggle,
.main-panel .navbar .btn-group .dropdown-toggle:hover,
.main-panel .navbar .btn-group .dropdown-toggle:focus {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: inherit !important;
    padding: revert !important;
}
.main-panel .navbar .btn-group .dropdown-toggle::after {
    display: revert !important;
}

/* ── Navbar user dropdown panel ──────────────────────────────── */
.main-panel .navbar .btn-group .dropdown-menu {
    background: #ffffff !important;
    border: 1px solid #dde1e7 !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 32px rgba(0,0,0,.18) !important;
    padding: 6px 0 !important;
    min-width: 210px !important;
    z-index: 9999 !important;
    margin-top: 6px !important;
    opacity: 1 !important;
    visibility: visible !important;
}
.main-panel .navbar .btn-group .dropdown-item {
    font-size: .875rem !important;
    padding: 10px 18px !important;
    color: #374151 !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    white-space: nowrap !important;
}
.main-panel .navbar .btn-group .dropdown-item:hover,
.main-panel .navbar .btn-group .dropdown-item:focus {
    background: #f5f6f8 !important;
    color: #1c1c1e !important;
}
.main-panel .navbar .btn-group .dropdown-divider {
    margin: 4px 10px !important;
    border-color: #edf0f4 !important;
}

/* Dropdown panel */
.wt-dot-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 99999;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.13);
    padding: 4px 0;
    min-width: 200px;
    list-style: none;
    margin: 0;
}
.wt-dot-menu.wt-open { display: block !important; }
.wt-dot-menu li      { list-style: none; margin: 0; padding: 0; }
.wt-dot-menu form    { margin: 0; padding: 0; display: block; }

/* Items */
.wt-dot-item {
    display: block;
    width: 100%;
    padding: 8px 16px;
    font-size: .8125rem;
    color: #374151;
    text-decoration: none;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.5;
}
.wt-dot-item:hover,
.wt-dot-item:focus {
    background: #f3f4f6;
    color: #111827;
    text-decoration: none;
}

/* Divider */
.wt-dot-divider { height: 1px; background: #e5e7eb; margin: 4px 0; }

/* ════════════════════════════════════════════════════════════════
   VISITOR REPORT ALL  (visitor/report_all.blade.php)
   ════════════════════════════════════════════════════════════════ */
#visitor-report-wrap .card-header { display: block !important; }
#visitor-report-wrap .visitor-report-table thead tr {
    background: var(--wt-charcoal, #322e2b);
    color: #fff;
}
#visitor-report-wrap .visitor-report-table thead th {
    padding: 8px 8px;
    font-size: 12px;
    font-weight: 600;
    border-color: #4a4440;
}
#visitor-report-wrap .visitor-report-table tbody td {
    font-size: 12px;
    padding: 4px 6px;
    vertical-align: middle;
}
#visitor-report-wrap .visitor-report-table tbody tr:nth-child(odd)  { background: #f9f9f9; }
#visitor-report-wrap .visitor-report-table tbody tr:nth-child(even) { background: #fff; }
#visitor-report-wrap .visitor-report-table tbody tr:hover { background: #f0efee; }
#visitor-report-wrap .visitor-report-table tbody tr.fw-bold,
#visitor-report-wrap .visitor-report-table tbody tr.fw-bold td { color: #0d6efd !important; }
.vr-img   { height: 100px; width: 200px; object-fit: contain; }
.vr-input { width: 110px; }
.vr-date  { width: 140px; }
@media print {
    body * { visibility: hidden; }
    #print_area, #print_area * { visibility: visible; }
    #print_area {
        position: absolute;
        top: 0; left: 0;
        width: 100%;
    }
    #print_area .table-responsive { overflow: visible !important; }
    #print_area canvas { display: block; }
    #print_area .visitor-report-table { width: 100%; border-collapse: collapse; }
    #print_area .visitor-report-table th,
    #print_area .visitor-report-table td { border: 1px solid #ccc; padding: 4px 6px; font-size: 11px; }
    #print_area .visitor-report-table thead th { background: #322e2b !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ════════════════════════════════════════════════════════════════
   FILTER SITES  (sitemanagement/filter-sites.blade.php)
   ════════════════════════════════════════════════════════════════ */
#sites {
    border-collapse: collapse !important;
    font-size: 13px;
}
#sites > * > tr > th,
#sites > * > tr > td {
    border-top: none !important;
    border-bottom: 1px solid #e4e7ec !important;
    padding: 7px 10px !important;
    vertical-align: middle !important;
}
#sites > thead > tr > th {
    background: var(--wt-charcoal, #322e2b) !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-bottom: 2px solid #4a4542 !important;
}
#sites > tbody > tr:hover > td { background: #f5f6f8 !important; }
#sites > :not(:first-child) { border-top: none !important; }

/* ── Confirm modal (#confirmForm) ────────────────────────────── */
#confirmForm .modal-dialog {
    max-width: 400px;
    margin: auto;
}
#confirmForm .modal-content {
    border: none;
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0,0,0,.22);
    overflow: hidden;
}
#confirmForm .modal-header {
    background: #fff;
    padding: 14px 20px 10px;
    border-bottom: 1px solid #f0f1f3;
    align-items: center;
}
#confirmForm .modal-header .modal-title {
    font-size: .78rem;
    font-weight: 700;
    color: #374151;
    letter-spacing: .3px;
    text-transform: uppercase;
    line-height: 1;
}
#confirmForm .modal-header.text-white .modal-title {
    color: #fff;
}
#confirmForm .modal-header .btn-close {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    filter: none !important;
    opacity: .45;
    width: 20px;
    height: 20px;
    padding: 0;
}
#confirmForm .modal-header .btn-close:hover,
#confirmForm .modal-header .btn-close:focus {
    opacity: .8;
    box-shadow: none !important;
    outline: none !important;
}
#confirmForm .modal-body {
    padding: 20px 22px 16px;
    font-size: .85rem;
    color: #4b5563;
    line-height: 1.5;
}
#confirmForm .modal-body p {
    margin-bottom: 0;
}
#confirmForm .modal-footer {
    padding: 10px 22px 18px;
    border-top: 1px solid #f0f1f3;
    gap: 8px;
    justify-content: flex-end;
}
#confirmForm .modal-footer .btn {
    font-size: .8rem !important;
    font-weight: 600 !important;
    padding: 7px 22px !important;
    border-radius: 7px !important;
    min-width: 110px;
    letter-spacing: .2px;
}
#confirmForm .modal-footer .btn-secondary {
    background: #f0f1f3 !important;
    border-color: #f0f1f3 !important;
    color: #374151 !important;
}
#confirmForm .modal-footer .btn-secondary:hover {
    background: #e2e4e8 !important;
    border-color: #e2e4e8 !important;
}
#confirmForm .modal-footer .btn-primary {
    background: #da332a !important;
    border-color: #da332a !important;
    color: #fff !important;
}
#confirmForm .modal-footer .btn-primary:hover {
    background: #b8291f !important;
    border-color: #b8291f !important;
}

/* ── Pagination — prevent page-link rows overflowing the card on narrow
     screens (Bootstrap's native paginator and DataTables' bootstrap
     integration both render a flex/inline row of links that doesn't
     wrap by default) ── */
.pagination,
.dataTables_wrapper .dataTables_paginate ul.pagination {
    flex-wrap: wrap;
    row-gap: 6px;
    max-width: 100%;
}
.dataTables_wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    max-width: 100%;
    white-space: normal;
}
@media (max-width: 480px) {
    .pagination .page-link,
    .dataTables_wrapper .dataTables_paginate .paginate_button,
    .dataTables_wrapper .dataTables_paginate a {
        padding: 4px 9px !important;
        font-size: .8rem !important;
    }
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info {
        float: none !important;
        width: 100%;
        text-align: left !important;
    }
}
