/* ═══════════════════════════════════════════════════════════════
   Athena — custom.css
   Loaded after Bootstrap 4 to extend and override the framework.
   Sections:
     1.  Modal backdrop
     2.  AI Button
     3.  jQuery UI Datepicker
     4.  Athena theme classes (ath-*)
     5.  Base element overrides
     6.  Breadcrumb bar
     7.  Utility classes
     8.  Bootstrap component overrides (border-radius, misc)
     9.  Table headers (ath-thead)
    10.  Navbar overrides
    11.  Card components
    12.  DataTables
    13.  Button colours
    14.  Footer (ath-footer)
    15.  Diary navigation
    16.  Page-specific components
        16a. BOM page
        16b. Cash-flow chart
        16c. Client PO (live-save + file drop zone)
        16d. Contractor matrix (sticky thead)
        16e. DRA form
        16f. DRA locations map
        16g. EOD icon picker
        16h. Error page (404)
        16i. Login / access-denied page
        16j. Delete confirm modal
        16k. Popover (green override)
        16l. Datepicker popup (edit-member)
        16m. PDF wrap
        16n. Flash animations
═══════════════════════════════════════════════════════════════ */


/* ── 1. Modal backdrop ───────────────────────────────────────── */
.modal-backdrop.show {
    opacity: 0.8;
}


/* ── 2. AI Button ────────────────────────────────────────────── */
.btn-ai {
    background: linear-gradient(135deg, #6f42c1 0%, #8e5cf5 100%);
    border-color: #6f42c1;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.btn-ai:hover,
.btn-ai:focus {
    background: linear-gradient(135deg, #5a32a3 0%, #7a4ae0 100%);
    border-color: #5a32a3;
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.35);
}
.btn-ai:active {
    background: #5a32a3;
    border-color: #4e2d8f;
    color: #fff;
}
.btn-ai.btn-warning {
    background: linear-gradient(135deg, #b07e10 0%, #d4a017 100%) !important;
    border-color: #b07e10 !important;
}
.btn-ai.btn-success {
    background: linear-gradient(135deg, #1a7a3c 0%, #28a745 100%) !important;
    border-color: #1a7a3c !important;
}
.btn-ai.btn-danger {
    background: linear-gradient(135deg, #a71d2a 0%, #dc3545 100%) !important;
    border-color: #a71d2a !important;
}


/* ── 3. jQuery UI Datepicker ─────────────────────────────────── */
.ui-datepicker {
    background-color: #fff;
    border: 1px solid #66afe9;
    border-radius: 0;
    box-shadow: 0 0 8px rgba(102, 175, 233, 0.6);
    display: none;
    margin-top: 4px;
    padding: 10px;
    width: 280px;
    z-index: 99999999;
}
.ui-datepicker a,
.ui-datepicker a:hover {
    text-decoration: none;
}
.ui-datepicker a:hover,
.ui-datepicker td:hover a {
    color: #2a6496;
    transition: color 0.1s ease-in-out;
}
.ui-datepicker .ui-datepicker-header {
    margin-bottom: 4px;
    text-align: center;
}
.ui-datepicker .ui-datepicker-title {
    font-weight: 700;
}
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    cursor: default;
    font-style: normal;
    font-weight: normal;
    height: 20px;
    line-height: 1;
    margin-top: 2px;
    width: 30px;
}
.ui-datepicker .ui-datepicker-prev {
    float: left;
    text-align: left;
}
.ui-datepicker .ui-datepicker-next {
    float: right;
    text-align: right;
}
.ui-datepicker .ui-datepicker-prev:before {
    content: "‹‹";
}
.ui-datepicker .ui-datepicker-next:before {
    content: "››";
}
.ui-datepicker .ui-icon {
    display: none;
}
.ui-datepicker .ui-datepicker-calendar {
    table-layout: fixed;
    width: 100%;
}
.ui-datepicker .ui-datepicker-calendar th,
.ui-datepicker .ui-datepicker-calendar td {
    text-align: center;
    padding: 4px 0;
}
.ui-datepicker .ui-datepicker-calendar td {
    border-radius: 4px;
    transition: background-color 0.1s ease-in-out, color 0.1s ease-in-out;
}
.ui-datepicker .ui-datepicker-calendar td:hover {
    background-color: #eee;
    cursor: pointer;
}
.ui-datepicker .ui-datepicker-calendar td a {
    text-decoration: none;
}
.ui-datepicker .ui-datepicker-current-day {
    background-color: #4289cc;
}
.ui-datepicker .ui-datepicker-current-day a {
    color: #fff;
}
.ui-datepicker .ui-datepicker-calendar .ui-datepicker-unselectable:hover {
    background-color: #fff;
    cursor: default;
}


/* ── 4. Athena theme classes (ath-*) ─────────────────────────── */
.ath-card-primary {
    background-color: #0069d9;
    color: #fff;
    font-weight: bold;
}

.ath-table-header {
    background-color: #222;
    color: #fff;
    font-weight: bold;
}

.ath-header-primary {
    color: #fff;
    font-weight: bold;
    background-color: #007bff;
    border-radius: 0;
}


/* ── 5. Base element overrides ───────────────────────────────── */
h1 {
    color: #006dd9;
    font-size: 24px;
    font-weight: bold;
    padding-bottom: 6px;
    margin-top: 0;
    margin-bottom: 12px;
    border-bottom: 2px dotted #006dd9;
    text-shadow: 1px 1px 0 #f2f2f2;
}

h2 {
    color: #006dd9;
    font-size: 18px;
    font-weight: bold;
    padding-bottom: 4px;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 2px dotted #006dd9;
    text-shadow: 1px 1px 0 #f2f2f2;
}
h2 small {
    font-size: 0.65em;
    font-weight: normal;
    text-shadow: none;
}

a {
    font-weight: bold;
}

.alert {
    border-radius: 0;
    padding: 14px;
}

.table {
    margin-bottom: 0;
}

.input-group {
    margin-bottom: 12px;
}

.btn-group {
    margin-bottom: 12px;
}


/* ── 6. Breadcrumb bar ───────────────────────────────────────── */
/* Spacing between breadcrumb bar and page content */
.breadcrumb-bar + .container-fluid {
    padding-top: 0;
}

.breadcrumb-bar {
    font-weight: bold;
    background-color: #333;
    margin-bottom: 20px;
    padding-bottom: 0;
}

.breadcrumb {
    margin-bottom: 0;
    padding-top: 8px;
    padding-bottom: 8px;
    padding-left: 0;
    background-color: transparent;
}

.breadcrumb-item a {
    color: #82b1ff;
}
.breadcrumb-item a:hover {
    color: #fff;
}
.breadcrumb-item.active {
    color: #ccc;
}
.breadcrumb-item + .breadcrumb-item::before {
    color: #888;
}


/* ── 7. Utility classes ──────────────────────────────────────── */
/* Spacing */
.mb-10          { margin-bottom: 10px !important; }
.mt-10          { margin-top: 10px !important; }
.ml-10          { margin-left: 10px !important; }
.pb-10          { padding-bottom: 10px !important; }
.p-10           { padding: 10px !important; }
.spacer-sm      { height: 10px; }
.spacer-lg      { height: 20px; }

/* Sizing */
.h-30           { height: 30px !important; }
.w-60           { width: 60px !important; }
.max-w-110      { max-width: 110px !important; }
.max-w-140      { max-width: 140px !important; }
.max-w-200      { max-width: 200px !important; }
.max-w-210      { max-width: 210px !important; }

/* Typography */
.fs-hero        { font-size: 50px !important; }
.fs-status-icon { font-size: 34px; }

/* Layout */
.td-shrink          { width: 1px; white-space: nowrap; }
.cursor-pointer     { cursor: pointer !important; }
.align-self-center  { align-self: center !important; }
.flex-fill-min      { flex: 1; min-width: 0; }

/* Borders */
.border-bottom-0    { border-bottom: 0 !important; }
.divider-brand      { height: 2px; background-color: #006dd9; }

/* Colours */
.bg-dark-header { background-color: #222; color: #fff; font-weight: bold; }
.prepend        { font-weight: bold; }

.positive {
    background-color: #d4edda;
    color: #155724;
}

.negative {
    background-color: #f8d7da;
    color: #721c24;
}

.reverse-success {
    color: #d4edda;
    background-color: #155724;
}

.reverse-warning {
    color: #fff3cd;
    background-color: #856404;
}

.reverse-danger {
    color: #f8d7da;
    background-color: #721c24;
}

.bg-success-light {
    background-color: #7bdf92 !important;
}
.bg-success-light:hover,
a.bg-success-light:focus,
a.bg-success-light:hover,
button.bg-success:focus,
button.bg-success:hover {
    background-color: #57d774 !important;
}


/* ── 8. Bootstrap component overrides ───────────────────────── */
.btn {
    font-weight: bold;
    margin-right: 1px;
    border-radius: 0;
}

.badge {
    border-radius: 0;
}

.modal-title {
    font-size: 22px;
    font-weight: bold;
}

.modal-content,
.modal-footer,
.modal-header {
    border-radius: 0;
}

.card {
    margin-bottom: 10px;
    border-radius: 0;
    padding-bottom: 0;
}

.form-control {
    border-radius: 0;
}

.border-primary {
    border-radius: 0;
}

.card-header {
    border-radius: 0;
}

.input-group-text {
    border-radius: 0;
}

.nav-tabs {
    border-radius: 0;
}

.nav-item {
    border-radius: 0;
}

.nav-link {
    border-radius: 0;
}

.text-dark {
    color: #000;
}


/* ── 9. Table headers (ath-thead) ────────────────────────────── */
/* Dark table header — Bootstrap 4 native class + Athena alias */
.ath-thead,
thead.thead-dark,
thead.thead-dark > tr > th,
thead.thead-dark > tr > td {
    background-color: #222 !important;
    color: #fff !important;
    font-weight: bold;
    border-bottom: 0;
    border-color: #444 !important;
}


/* ── 10. Navbar overrides ────────────────────────────────────── */
.navbar {
    background-color: #1a1d20 !important;
    border-bottom: 2px solid #006dd9;
}
@media (min-width: 992px) {
    .navbar {
        border-top: 2px solid #006dd9;
    }
}
.navbar .nav-link {
    font-weight: bold;
    font-size: 13px;
    padding: 0.5rem 0.65rem;
    border-radius: 0;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #fff;
    background-color: #006dd9;
}
.navbar .nav-item.show > .nav-link {
    background-color: #006dd9;
    color: #fff;
}
.navbar .dropdown-menu {
    background-color: #1a1d20;
    border: 1px solid #333;
    border-radius: 0;
    padding: 0;
    margin-top: 0;
}
.navbar .dropdown-item {
    color: #e0e0e0;
    font-size: 14px;
    padding: 9px 16px;
    font-weight: normal;
}
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background-color: #006dd9;
    color: #fff;
}
.navbar .dropdown-item.active,
.navbar .dropdown-item:active {
    background-color: #006dd9;
    color: #fff;
}
.navbar .dropdown-divider {
    border-top-color: #333;
    margin: 4px 0;
}
.navbar .dropdown-header {
    color: #006dd9;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 8px 16px 4px;
    margin: 0;
}
/* No top-padding on the first header in each menu */
.navbar .dropdown-menu > .dropdown-header:first-child {
    padding-top: 10px;
}
.navbar .nav-item .badge-danger {
    font-size: 10px;
    vertical-align: top;
    margin-left: 2px;
}
/* Right-side icon links: icons-only on desktop */
@media (min-width: 992px) {
    .navbar .navbar-nav .nav-link[title] {
        padding: 0.5rem 0.45rem;
    }
}
/* Navbar toggler (mobile hamburger) */
.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 10px;
}
.navbar-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 109, 217, 0.4);
}
.navbar-toggler .toggler-icon {
    color: #fff;
    font-size: 20px;
    transition: transform 0.3s ease;
}
.navbar-toggler[aria-expanded="true"] .toggler-icon {
    transform: rotate(90deg);
    color: #006dd9;
}


/* ── 11. Card components ─────────────────────────────────────── */
.card-body-icon {
    position: absolute;
    z-index: 0;
    top: -1.25rem;
    right: -1rem;
    opacity: 0.4;
    font-size: 9rem;
    transform: rotate(15deg);
}


/* ── 12. DataTables ──────────────────────────────────────────── */
/* The wrapper injects a container-fluid with 15px gutters — zero them so the
   table aligns with the rest of the page content inside the outer container-fluid */
.dataTables_wrapper {
    padding-left: 0;
    padding-right: 0;
}
/* DataTables injects an inner container-fluid on the controls rows */
.dataTables_wrapper > .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}
/* Zero all margins and padding on every row and col inside the wrapper */
.dataTables_wrapper .row {
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    margin-bottom: 0;
}
.dataTables_wrapper .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
    padding-bottom: 0;
}
/* Table itself — no extra margin */
table.dataTable {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    width: 100% !important;
}
/* Exactly 10px between the controls row and the table row */
.dataTables_wrapper .row + .row {
    margin-top: 10px !important;
}
/* table-responsive wrapper — gets container-fluid gutters by default so that
   tables not wrapped in a container still align with the rest of the page.
   When already inside a container/container-fluid, the padding is zeroed out. */
.table-responsive {
    padding-left: 15px;
    padding-right: 15px;
    margin: 0;
}
.container .table-responsive,
.container-fluid .table-responsive {
    padding-left: 0;
    padding-right: 0;
}
/* Controls row — length + filter sit side-by-side on the left */
.dataTables_wrapper > .row:first-child {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.dataTables_wrapper > .row:first-child > .col-sm-12,
.dataTables_wrapper > .row:first-child > [class*="col-"] {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
}
/* Length + filter — no extra spacing */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin: 0;
    padding: 0;
}
.dataTables_wrapper .dataTables_length {
    margin-right: 8px;
}
.dataTables_wrapper .dataTables_filter {
    float: none !important;
    text-align: left !important;
}
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: block;
    margin: 0;
    padding: 0;
    line-height: 1;
}
.dataTables_wrapper .input-group {
    border-radius: 0;
}
.dataTables_wrapper .input-group-text {
    border-radius: 0;
    font-weight: 600;
    font-size: 13px;
}
.dataTables_wrapper .custom-select,
.dataTables_wrapper .form-control {
    border-radius: 0;
    font-size: 13px;
}
.dataTables_wrapper .custom-select:focus,
.dataTables_wrapper .form-control:focus {
    border-color: #006dd9;
    box-shadow: 0 0 0 0.15rem rgba(0, 109, 217, 0.25);
}
.dataTables_wrapper .dataTables_length .input-group {
    max-width: 180px;
}
.dataTables_wrapper .dataTables_filter .input-group {
    max-width: 300px;
    float: none;
}
/* Pagination — brand blue active, sharp corners */
.dataTables_wrapper .dataTables_paginate {
    margin-top: 10px;
    margin-bottom: 10px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 0 !important;
    font-size: 13px;
    padding: 4px 10px !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    background: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f0f0f0 !important;
    border-color: #ccc !important;
    color: #006dd9 !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #006dd9 !important;
    border-color: #005fbd !important;
    color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    color: #aaa !important;
    background: #f8f8f8 !important;
    border-color: #eee !important;
    cursor: default;
}
/* Sorting arrows — brand blue on light header, white on dark header */
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    color: #006dd9;
}
table.dataTable thead.ath-thead .sorting,
table.dataTable thead.ath-thead .sorting_asc,
table.dataTable thead.ath-thead .sorting_desc,
table.dataTable thead.ath-thead .sorting_asc_disabled,
table.dataTable thead.ath-thead .sorting_desc_disabled,
table.dataTable thead.thead-dark .sorting,
table.dataTable thead.thead-dark .sorting_asc,
table.dataTable thead.thead-dark .sorting_desc,
table.dataTable thead.thead-dark .sorting_asc_disabled,
table.dataTable thead.thead-dark .sorting_desc_disabled {
    color: #fff;
}


/* ── 13. Button colours ──────────────────────────────────────── */
/* btn-primary: Links / navigation (View, Open, Go to) — brand blue */
.btn-primary {
    background-color: #006dd9;
    border-color: #005fbd;
    color: #fff;
}
.btn-primary:hover {
    background-color: #005fbd;
    border-color: #0054a8;
    color: #fff;
}
.btn-primary:focus,
.btn-primary.focus {
    background-color: #005fbd;
    border-color: #0054a8;
    box-shadow: 0 0 0 0.2rem rgba(0, 109, 217, 0.4);
    color: #fff;
}
.btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active {
    background-color: #0054a8;
    border-color: #004a94;
    color: #fff;
}

/* btn-success: Create / action (Add, Save, Submit, Approve) — green */
.btn-success {
    background-color: #28a745;
    border-color: #24963e;
    color: #fff;
}
.btn-success:hover {
    background-color: #24963e;
    border-color: #208637;
    color: #fff;
}
.btn-success:focus,
.btn-success.focus {
    background-color: #24963e;
    border-color: #208637;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.4);
    color: #fff;
}
.btn-success:active,
.btn-success:not(:disabled):not(.disabled):active {
    background-color: #208637;
    border-color: #1c7630;
    color: #fff;
}

/* Outline variants */
.btn-outline-primary {
    color: #006dd9;
    border-color: #006dd9;
}
.btn-outline-primary:hover {
    background-color: #006dd9;
    border-color: #006dd9;
    color: #fff;
}
.btn-outline-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 109, 217, 0.4);
}
.btn-outline-success {
    color: #28a745;
    border-color: #28a745;
}
.btn-outline-success:hover {
    background-color: #28a745;
    border-color: #28a745;
    color: #fff;
}
.btn-outline-success:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.4);
}

/* btn-secondary: Cancel / utility — grey */
.btn-secondary {
    background-color: #5a6268;
    border-color: #545b62;
    color: #fff;
}
.btn-secondary:hover {
    background-color: #4e555b;
    border-color: #484e53;
    color: #fff;
}


/* ── 14. Footer (ath-footer) ─────────────────────────────────── */
.ath-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 15px 0;
    margin-top: 0;
    font-size: 13px;
    color: #666;
}
.ath-footer a {
    color: #006dd9;
    font-weight: normal;
}
.ath-footer a:hover {
    color: #0054a8;
    text-decoration: none;
}
.ath-footer-sep {
    color: #ccc;
    margin: 0 8px;
}


/* ── 15. Diary navigation ────────────────────────────────────── */
.diary-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.diary-pills {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
    padding: 4px 0;
}
.diary-pills::-webkit-scrollbar {
    display: none;
}

.diary-pill {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: 0;
    border: 1px solid #006dd9;
    background: #fff;
    color: #006dd9;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.diary-pill:hover {
    background: #e8f0fe;
}
.diary-pill.active {
    background: #006dd9;
    color: #fff;
}
.diary-pill.today:not(.active) {
    border-color: #28a745;
    color: #28a745;
}
.diary-pill.today.active {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}
.diary-pill.weekend {
    border-color: #6c757d;
    color: #6c757d;
}
.diary-pill.weekend.active {
    background: #343a40;
    border-color: #343a40;
    color: #fff;
}

.diary-nav-arrow {
    flex: 0 0 auto;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
}

@media (max-width: 576px) {
    .diary-pill {
        padding: 8px 14px;
        font-size: 14px;
    }
    .diary-nav-arrow {
        min-width: 44px;
        min-height: 44px;
    }
}


/* ── 16. Page-specific components ────────────────────────────── */

/* ── 16a. BOM page ── */
.bom-tabs {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 6px;
}
.bom-tabs .nav-link {
    font-weight: 600;
    font-size: 0.85rem;
    color: #495057;
    border: 1px solid transparent;
    margin: 2px;
    padding: 6px 12px;
    transition: all 0.15s;
}
.bom-tabs .nav-link:hover {
    background: #e9ecef;
    color: #222;
}
.bom-tabs .nav-link.has-items {
    color: #006dd9;
    border-color: #b8daff;
    background: #eaf3ff;
}
.bom-tabs .nav-link.active {
    background: #006dd9;
    color: #fff;
    border-color: #006dd9;
}
.bom-tabs .nav-link .badge {
    font-size: 0.7em;
    vertical-align: middle;
    margin-left: 3px;
}
.bom-tabs .nav-link.active .badge {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}
/* BOM card container */
.bom-card {
    border: 1px solid #dee2e6;
    overflow: hidden;
    margin-bottom: 1rem;
}
/* BOM order scroll area */
.bom-order-scroll {
    max-height: 340px;
    overflow-y: auto;
}
/* BOM items table */
.bom-items-table thead th {
    background: #222;
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 8px 10px;
    border: none;
    position: sticky;
    top: 0;
    z-index: 1;
}
.bom-items-table tbody tr:nth-of-type(odd) {
    background-color: #f5f5f0;
}
.bom-items-table td {
    vertical-align: middle;
    font-size: 0.85rem;
    padding: 6px 10px;
}
.bom-items-table .bom-cat-row {
    background: #ffc107 !important;
    border-top: 2px solid #333;
    font-weight: 600;
}
.bom-items-table .bom-cat-row td {
    padding: 8px 10px;
    color: #222;
}
.bom-items-table .bom-spacer-row td {
    background: #ccc;
    padding: 2px;
    border: none;
}
/* Fixed bottom submit bar */
.bom-submit-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: #fff;
    border-top: 2px solid #006dd9;
    padding: 8px 15px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}


/* ── 16b. Cash-flow chart ── */
.custom-tooltip {
    padding: 10px;
    width: 400px;
    max-width: 400px;
    font-family: inherit;
    font-size: 14px;
    background: rgba(0, 0, 0, 1);
    color: #fff;
    border: 1px solid #fff;
    border-radius: 0;
}
.ai-updated {
    background-color: #d4edda !important;
    border-color: #28a745 !important;
    color: #155724 !important;
    font-weight: bold;
}


/* ── 16c. Client PO — live-save + file drop zone ── */
.det-saving {
    opacity: 0.6;
    pointer-events: none;
}
.li-tick-wrap {
    position: relative;
    display: block;
}
.li-saved {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.15rem rgba(40, 167, 69, 0.25) !important;
    padding-right: 1.8rem !important;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.li-tick {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #28a745;
    font-size: 0.8rem;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.6s ease;
    z-index: 5;
}
.li-tick.fade-out {
    opacity: 0;
}
#details-card {
    transition: background-color 0.4s ease;
}
#details-card.card-success {
    background-color: #28a745 !important;
}
.bootstrap-select > .btn.li-saved {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.15rem rgba(40, 167, 69, 0.25) !important;
}

/* Selectpicker buttons styled to match input-group form-controls */
.input-group .bootstrap-select > .btn,
.li-tick-wrap .bootstrap-select > .btn {
    border-radius: 0;
    border-color: #ced4da;
    background-color: #fff;
    color: #495057;
    font-size: 1rem;
    font-weight: 400;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 1.75rem 0.375rem 0.75rem;
    box-shadow: none;
}
.input-group .bootstrap-select > .btn:focus,
.li-tick-wrap .bootstrap-select > .btn:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.15rem rgba(0, 123, 255, 0.25);
    outline: 0;
}
.li-tick-wrap .bootstrap-select {
    max-width: 100%;
}
.li-tick-wrap .bootstrap-select > .btn {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#drop-zone {
    border: 2px dashed #adb5bd;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
    background: #f8f9fa;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
#drop-zone.drag-over {
    border-color: #007bff;
    background: #e8f0fe;
    color: #007bff;
}
#drop-zone.uploading {
    border-color: #ffc107;
    background: #fff8e1;
    color: #856404;
}
#drop-zone.upload-done {
    border-color: #28a745;
    background: #d4edda;
    color: #155724;
}


/* ── 16d. Contractor matrix — sticky thead ── */
.sticky-thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid #dee2e6 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


/* ── 16e. DRA form ── */
.dra-form {
    display: none;
}
.dra-form.active {
    display: block;
}


/* ── 16f. DRA locations map ── */
#map {
    height: 600px;
    width: 100%;
    margin-bottom: 20px;
}
.custom-label {
    position: absolute;
    background: white;
    border: 2px solid black;
    padding: 4px 8px;
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
    transform: translateX(-50%);
    z-index: 100;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}


/* ── 16g. EOD icon picker ── */
.icon-picker {
    display: flex;
    gap: 10px;
    padding: 10px 0;
}
.icon-picker .icon-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
    min-width: 100px;
    border-radius: 0;
    font-weight: 500;
    transition: all 0.15s ease;
    border-width: 2px;
}
.icon-picker .icon-option i {
    font-size: 2.5rem;
    line-height: 1;
}
.icon-picker .icon-option small {
    font-size: 0.75rem;
}
.icon-picker .icon-option:focus {
    box-shadow: none;
}


/* ── 16h. Error page (404) ── */
.error-page {
    min-height: 100vh;
    background: #1a1d20;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 89px 15px 40px;
    overflow-y: auto;
}
.error-card {
    width: 100%;
    max-width: 480px;
}
.error-logo {
    text-align: center;
    margin-bottom: 35px;
}
.error-logo img {
    max-height: 70px;
}
.error-page .card {
    background-color: #333;
    border: 1px solid #444;
    border-top: 3px solid #ffc107;
    border-bottom: 3px solid #ffc107;
    border-radius: 0;
    box-shadow: 0 0 30px rgba(255, 193, 7, 0.15), 0 4px 20px rgba(0, 0, 0, 0.3);
}
.error-page .btn {
    border-radius: 0;
}
.error-icon {
    font-size: 4rem;
    color: #ffc107;
    margin-bottom: 15px;
}
.error-code {
    font-size: 5rem;
    font-weight: 700;
    color: #ffc107;
    line-height: 1;
    margin-bottom: 10px;
}
.error-title {
    color: #e0e0e0;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
}
.error-message {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 25px;
}
.error-support {
    text-align: center;
    margin-top: 20px;
    color: #999;
    font-size: 0.8rem;
}
.error-support a {
    color: #aaa;
}
.error-support a:hover {
    color: #ffc107;
}


/* ── 16i. Login / access-denied page ── */
/* Hide the navbar, loader, and dev banner on the login overlay */
.login-page ~ .navbar,
.login-page ~ .loader {
    display: none !important;
}

.login-page {
    min-height: 100vh;
    background: #1a1d20;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 89px 15px 40px;
    position: fixed;
    inset: 0;
    z-index: 9998;
    overflow-y: auto;
}
.login-card {
    width: 100%;
    max-width: 480px;
}
.login-logo {
    text-align: center;
    margin-bottom: 35px;
}
.login-logo img {
    max-height: 70px;
}
.login-support {
    text-align: center;
    margin-top: 20px;
    color: #999;
    font-size: 0.8rem;
}
.login-support a {
    color: #aaa;
}
.login-support a:hover {
    color: #006dd9;
}
.login-page .form-control.is-invalid {
    background-image: none;
    padding-right: 0.75rem;
}
/* Dark-themed inputs */
.login-page .form-control {
    background-color: #2a2d30;
    border-color: #444;
    color: #e0e0e0;
}
.login-page .form-control::placeholder {
    color: #888;
}
.login-page .form-control:focus {
    background-color: #2a2d30;
    border-color: #006dd9;
    color: #e0e0e0;
    box-shadow: 0 0 0 0.2rem rgba(0, 109, 217, 0.25);
}
.login-page .input-group-text {
    background-color: #006dd9;
    border-color: #006dd9;
    color: #fff;
}
/* Blue glow on card */
.login-page .card {
    border-radius: 0;
    box-shadow: 0 0 30px rgba(0, 109, 217, 0.15), 0 4px 20px rgba(0, 0, 0, 0.3);
}
.login-page .btn,
.login-page .form-control,
.login-page .input-group-text,
.login-page .input-group > .form-control,
.login-page .input-group > .input-group-prepend > .input-group-text,
.login-page .input-group > .input-group-append > .input-group-text {
    border-radius: 0 !important;
}


/* ── 16j. Delete confirm modal ── */
.delete-confirm-content {
    border: none;
    border-top: 3px solid #dc3545;
    border-bottom: 3px solid #dc3545;
    box-shadow: 0 0 30px rgba(220, 53, 69, 0.15), 0 4px 20px rgba(0, 0, 0, 0.1);
}


/* ── 16k. Popover (green override) ── */
.popover {
    border: 2px solid #218838;
}
.popover-header {
    font-weight: bold;
    background-color: #218838;
    color: #fff;
}


/* ── 16l. Datepicker popup (edit-member) ── */
.datepicker-dropdown {
    padding: 10px !important;
    border-radius: 0 !important;
    border: 1px solid #007bff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    background-color: #fff !important;
}
.datepicker table tr td.day:hover {
    background: #007bff !important;
    color: #fff !important;
}
.datepicker table tr td.active {
    background-color: #28a745 !important;
    color: #fff !important;
    border-radius: 0 !important;
}
.datepicker table tr td.today {
    background: #ffe8a1 !important;
}


/* ── 16m. PDF wrap ── */
.pdf-wrap object {
    border: 1px solid #ccc;
    border-radius: 4px;
}


/* ── 16n. Flash animations ── */
.flash-success {
    animation: flashGreen 2s ease-in-out;
}
@keyframes flashGreen {
    0%   { background-color: #d4edda; }
    100% { background-color: transparent; }
}

.small-label {
    font-size: 0.85rem;
    color: #888;
}

.ai-box textarea,
.ai-box input {
    font-size: 0.85rem;
}


/* ── 16o. Outgoing / PO / Supplier PO — duplicate live-save + drop zone ── */
/* These classes are also defined in 16c for client-po.php.
   The rules below cover any page that also uses #drop-zone-quote. */
#drop-zone-quote {
    border: 2px dashed #adb5bd;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
#drop-zone-quote.drag-over {
    border-color: #007bff;
    background: #e8f0fe;
    color: #007bff;
}
#drop-zone-quote.uploading {
    border-color: #ffc107;
    background: #fff8e1;
    color: #856404;
}
.details-saving {
    opacity: 0.6;
    pointer-events: none;
}
/* Hide number input spinners */
.li-qty::-webkit-outer-spin-button,
.li-qty::-webkit-inner-spin-button,
.li-cost::-webkit-outer-spin-button,
.li-cost::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.li-qty,
.li-cost {
    -moz-appearance: textfield;
}
/* Outgoing embed holder */
.sp-embed-holder {
    min-height: 40px;
}


/* ── 16p. Handling unit — dark-red button ── */
.btn-darkred {
    background-color: #800000 !important;
    color: #fff !important;
    border: 1px solid #660000;
    cursor: not-allowed;
}
.btn-danger[disabled],
.btn-darkred[disabled] {
    cursor: not-allowed !important;
    opacity: 0.85;
}


/* ── 16q. Page loader overlay (header.php) ── */
.loader {
    position: fixed;
    inset: 0;
    background: #111;
    z-index: 9999;
    opacity: 0.94;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loader-spinner {
    width: 160px;
    height: 160px;
    border: 12px solid rgba(0, 109, 217, 0.2);
    border-top: 12px solid #006dd9;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* ── 16r. Log / check-in kiosk ── */
.buzz-main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.panel {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
}
.panel-out {
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
}
.panel-in {
    background: #0c1222;
}
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.panel-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.panel-out .panel-title { color: #94a3b8; }
.panel-in .panel-title  { color: #22c55e; }
.panel-count {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 20px;
    padding: 2px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
}
.panel-in .panel-count {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.3);
    color: #22c55e;
}
.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}
.user-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 16px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.user-card:hover {
    background: #334155;
    border-color: #475569;
    transform: translateY(-2px);
}
.user-card:active {
    transform: translateY(0);
}
.panel-in .user-card {
    background: rgba(74, 222, 128, 0.05);
    border-color: rgba(74, 222, 128, 0.15);
}
.panel-in .user-card:hover {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.3);
}
.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}
.panel-out .avatar { background: #475569; }
.panel-in .avatar  { background: #16a34a; }
.avatar-guest { background: #7c3aed !important; }
.user-card .name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.2;
}
.user-card .surname {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}
.guest-card {
    border-style: dashed;
    border-color: #475569;
    background: transparent;
}
.guest-card:hover {
    border-color: #7c3aed;
    background: rgba(124, 58, 237, 0.05);
}
.guest-card .avatar {
    background: transparent;
    border: 2px dashed #64748b;
    color: #64748b;
}
.guest-card:hover .avatar {
    border-color: #7c3aed;
    color: #7c3aed;
}
.guest-card .name { color: #94a3b8; }
.fire-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 20px;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: #f87171;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.fire-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}
#statusOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
#statusOverlay.show {
    opacity: 1;
    pointer-events: all;
}
.overlay-checkin  { background: rgba(5, 46, 22, 0.95); }
.overlay-checkout { background: rgba(69, 10, 10, 0.95); }
#statusOverlay .overlay-icon { font-size: 5rem; margin-bottom: 20px; }
.overlay-checkin .overlay-icon  { color: #22c55e; }
.overlay-checkout .overlay-icon { color: #f87171; }
#statusOverlay .overlay-msg {
    font-size: 2.5rem;
    font-weight: 700;
    color: #f8fafc;
}
#statusOverlay .overlay-sub {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-top: 8px;
}
/* log.php overrides Bootstrap modals with a dark theme */
.log-page .modal-content {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    color: #e2e8f0;
}
.log-page .modal-header {
    border-bottom: 1px solid #334155;
    padding: 16px 20px;
}
.log-page .modal-header .close { color: #94a3b8; text-shadow: none; opacity: 0.8; }
.log-page .modal-body   { padding: 24px 20px; }
.log-page .modal-footer { border-top: 1px solid #334155; padding: 16px 20px; }
.log-page .modal-header.hdr-primary { background: #1e40af; }
.log-page .modal-header.hdr-danger  { background: #991b1b; }
.log-page .modal .form-control {
    background: #0f172a;
    border: 1px solid #475569;
    border-radius: 8px;
    color: #e2e8f0;
    padding: 10px 14px;
}
.log-page .modal .form-control:focus {
    background: #0f172a;
    border-color: #3b82f6;
    color: #e2e8f0;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.log-page .modal label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 6px;
}
.btn-checkin {
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-checkin:hover { background: #15803d; color: #fff; }
.btn-checkout {
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-checkout:hover { background: #b91c1c; color: #fff; }
.btn-modal-secondary {
    background: #334155;
    color: #cbd5e1;
    border: 1px solid #475569;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
}
.btn-modal-secondary:hover { background: #475569; color: #f1f5f9; }
.btn-modal-success {
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
}
.btn-modal-success:hover { background: #15803d; color: #fff; }
.user-modal-icon { margin-bottom: 12px; }
.user-modal-icon i { font-size: 4rem; }
.user-modal-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
}
.user-modal-company {
    color: #64748b;
    font-size: 0.9rem;
}
.last-out-tips {
    text-align: left;
    margin-top: 20px;
    background: rgba(251, 191, 36, 0.05);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 10px;
    padding: 16px;
}
.last-out-tips h5 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 10px;
}
.last-out-tips ul { padding-left: 20px; margin: 0; }
.last-out-tips li {
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-bottom: 4px;
}
.fire-table { width: 100%; border-collapse: collapse; }
.fire-table th {
    background: #334155;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 14px;
    text-align: left;
}
.fire-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #334155;
    font-size: 0.9rem;
}
.fire-table .btn-present {
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}
.fire-table .btn-present:disabled {
    background: #334155;
    color: #64748b;
    cursor: default;
}


/* ── 16s. Meeting / Actions — attendee rows ── */
.attendee-row {
    padding: 6px;
    margin-top: 2px;
    margin-bottom: 2px;
}
.attendee-row:hover {
    background-color: #ccc;
    color: black;
}


/* ── 16t. Org chart ── */
.org-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0 20px 0;
}
.org-lr {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 10px 10px 20px 10px;
    min-width: 1200px;
}
.org-col {
    flex: 0 0 320px;
    position: relative;
}
.org-col:after {
    content: "";
    position: absolute;
    top: 0;
    right: -12px;
    width: 1px;
    height: 100%;
    background: #eee;
}
.org-col:last-child:after { display: none; }
.org-col-title {
    font-weight: 700;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 10px 0;
    text-align: center;
}
.org-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.org-node {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.org-person {
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.2;
}
.org-role {
    font-size: 12px;
    color: #666;
    line-height: 1.2;
}
.org-meta {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}
@media (max-width: 768px) {
    .org-lr { gap: 16px; min-width: 900px; }
    .org-col { flex: 0 0 280px; }
}


/* ── 16u. Actions part — job action states ── */
.job-action-highlight {
    background-color: #fff3cd !important;
    border-left: 4px solid #ffc107;
}
.job-action-updated {
    animation: updatedFade 2.5s ease-out;
}
@keyframes updatedFade {
    0%   { background-color: #d4edda; }
    100% { background-color: transparent; }
}
.badge-updated {
    animation: badgePulse 2.5s ease-out forwards;
}
@keyframes badgePulse {
    0%   { opacity: 1; }
    80%  { opacity: 1; }
    100% { opacity: 0; }
}
.job-action-saving > td {
    position: relative;
    pointer-events: none;
}
.job-action-saving > td::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
}
.job-action-saving > td:first-child::after {
    content: '\f110';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free';
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #495057;
    animation: fa-spin 1s linear infinite;
}
.po-button.active {
    font-weight: bold;
    text-decoration: underline;
}
.job-action-row .btn {
    white-space: nowrap;
}


/* ── 16v. Map (parts/map.php) ── */
/* #map already defined in 16f (DRA locations). parts/map.php uses height:450px instead.
   Override with a modifier class rather than redefining #map. */
.map-sm { height: 450px; }


/* ── 16w. Payroll ── */
.payroll-title small { font-size: 60%; opacity: 0.85; }
.payroll-card .card-header { padding: 0.6rem 0.85rem; }
.payroll-card .card-body   { padding: 0.85rem; }
.payroll-meta p { margin-bottom: 0.35rem; }
.payroll-table td,
.payroll-table th    { vertical-align: middle; }
.payroll-table td    { padding: 0.4rem 0.5rem; }
.payroll-table th    { padding: 0.45rem 0.5rem; }
.payroll-summary td  { padding: 0.45rem 0.55rem; }
.payroll-deductions  { font-size: 0.95rem; }
.pill {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
}
.oncall-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.oncall-line:last-child { border-bottom: 0; }
.oncall-sub { color: #666; font-size: 0.95rem; }
.weekend-row td { font-weight: 700; }
.weekend-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 8px;
    vertical-align: middle;
}
.badge-sat,
.badge-sun { background: rgba(13, 110, 253, 0.12); color: #0d6efd; }


/* ── 16x. Project — fullscreen modal ── */
.modal-fullscreen {
    width: 100vw;
    max-width: none;
    height: 100%;
    margin: 0;
}
.modal-fullscreen .modal-content {
    height: 100%;
    border: 0;
    border-radius: 0;
}
.modal-fullscreen .modal-header,
.modal-fullscreen .modal-footer {
    border-radius: 0;
}
.modal-fullscreen .modal-body {
    overflow-y: auto;
}


/* ── 16y. Project management ── */
.pm-section-header {
    margin: 0;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #c9d5e3;
}
.pm-table {
    margin: 0;
    border-top: 0;
}


/* ── 16z. Sales chart ── */
#chart-wrapper {
    overflow-x: auto;
    width: 100%;
    padding-bottom: 20px;
}
#salesChart {
    width: calc(150px * 14);
    max-width: none;
    height: 500px;
}


/* ── 16aa. Schedule planning — drag & drop ── */
.draggable-job {
    cursor: move;
    margin-bottom: 4px;
}
.droppable-day {
    min-height: 90px;
    padding: 4px;
    border: 1px dashed #ccc;
    background-color: #fafafa;
}
/* job-action-highlight already defined in 16u */


/* ── 16ab. Sites — toolbar layout ── */
#example_wrapper .dataTables_length,
#example_wrapper .dataTables_filter,
#sites-toolbar-btns {
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 0.5rem;
}
#sites-toolbar-btns { margin-right: 1rem; }
#sites-toolbar-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}


/* ── 16ac. Teams — drag-over card ── */
.card-body.drag-over {
    background-color: #e8f4fd !important;
    border: 2px dashed #006dd9;
}


/* ── 16ad. Toolbox talks ── */
.tt-title {
    display: inline-block;
    margin-left: 6px;
}
.tt-unread { font-weight: 700; }
.tt-meta { margin-top: 2px; opacity: 0.85; }
.modal-dialog.modal-xl {
    width: 98%;
    max-width: 1400px;
    margin: 0.75rem auto;
}
@media (max-width: 576px) {
    .modal-dialog.modal-xl {
        width: 98%;
        max-width: 98%;
        margin: 0.5rem auto;
    }
    .modal-dialog.modal-xl .modal-body {
        height: 78vh !important;
        padding: 0.5rem;
    }
}


/* ── 16ae. Training — sticky thead (same as 16d, scoped here for safety) ── */
/* Uses .sticky-thead class defined in 16d */


/* ── 16af. Outgoings — table footer bold ── */
.table tfoot th,
.table tfoot td {
    font-weight: bold;
}


/* ── 16ag. Overview — inline calendar ── */
#overview-calendar.ui-datepicker {
    display: block !important;
    width: 320px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    padding: 12px;
    position: relative;
    margin: 0;
    z-index: 1;
}
#overview-calendar .ui-datepicker-header {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
#overview-calendar .ui-datepicker-title { font-size: 16px; }
#overview-calendar .ui-datepicker-prev,
#overview-calendar .ui-datepicker-next {
    background-color: #0069d9;
    color: #fff;
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s;
}
#overview-calendar .ui-datepicker-prev:hover,
#overview-calendar .ui-datepicker-next:hover { background-color: #0053af; }
#overview-calendar .ui-datepicker-calendar th {
    font-size: 12px;
    color: #666;
    padding: 6px 0;
}
#overview-calendar .ui-datepicker-calendar td {
    border-radius: 4px;
    padding: 0;
}
#overview-calendar .ui-datepicker-calendar td a,
#overview-calendar .ui-datepicker-calendar td span {
    display: block;
    padding: 6px 0;
    border-radius: 4px;
    text-align: center;
}
#overview-calendar .ui-datepicker-calendar td:hover { background-color: transparent; }
#overview-calendar .ui-datepicker-calendar td a:hover {
    background-color: #e2ecf7;
    color: #0053af;
}
#overview-calendar .ui-datepicker-current-day { background-color: transparent; }
#overview-calendar .ui-datepicker-current-day a {
    background-color: #0069d9;
    color: #fff;
    font-weight: 700;
}
#overview-calendar td.ui-datepicker-today a { border: 2px solid #0069d9; }
#overview-calendar td.ui-datepicker-today.ui-datepicker-current-day a { border: none; }
#overview-calendar .ui-datepicker-other-month a { color: #bbb; }


/* ── 16ah. Outgoings / Invoices — inline datepicker filter ── */
#filter-from-cal.ui-datepicker,
#filter-to-cal.ui-datepicker {
    display: block !important;
    width: 280px;
    font-size: 13px;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 10px;
}
#filter-from-cal .ui-datepicker-header,
#filter-to-cal .ui-datepicker-header {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
#filter-from-cal .ui-datepicker-title,
#filter-to-cal .ui-datepicker-title {
    font-size: 14px;
    font-weight: 600;
}
#filter-from-cal .ui-datepicker-prev, #filter-from-cal .ui-datepicker-next,
#filter-to-cal .ui-datepicker-prev,   #filter-to-cal .ui-datepicker-next {
    background-color: #0069d9;
    color: #fff;
    border-radius: 3px;
    cursor: pointer;
    padding: 2px 6px;
    transition: background-color 0.15s;
}
#filter-from-cal .ui-datepicker-prev:hover, #filter-from-cal .ui-datepicker-next:hover,
#filter-to-cal .ui-datepicker-prev:hover,   #filter-to-cal .ui-datepicker-next:hover {
    background-color: #0053af;
}
#filter-from-cal .ui-datepicker-calendar th,
#filter-to-cal .ui-datepicker-calendar th {
    font-size: 11px;
    color: #666;
    padding: 5px 0;
}
#filter-from-cal .ui-datepicker-calendar td,
#filter-to-cal .ui-datepicker-calendar td {
    border-radius: 4px;
    padding: 0;
}
#filter-from-cal .ui-datepicker-calendar td a,
#filter-from-cal .ui-datepicker-calendar td span,
#filter-to-cal .ui-datepicker-calendar td a,
#filter-to-cal .ui-datepicker-calendar td span {
    display: block;
    padding: 5px 0;
    text-align: center;
    border-radius: 3px;
}
#filter-from-cal .ui-datepicker-calendar td a:hover,
#filter-to-cal .ui-datepicker-calendar td a:hover {
    background-color: #e2ecf7;
    color: #0053af;
}
#filter-from-cal .ui-datepicker-current-day a,
#filter-to-cal .ui-datepicker-current-day a {
    background-color: #0069d9;
    color: #fff;
}
#filter-from-cal td.ui-datepicker-today a,
#filter-to-cal td.ui-datepicker-today a { border: 2px solid #0069d9; }
#filter-from-cal td.ui-datepicker-today.ui-datepicker-current-day a,
#filter-to-cal td.ui-datepicker-today.ui-datepicker-current-day a { border: none; }
#filter-from-cal .ui-datepicker-other-month a,
#filter-to-cal .ui-datepicker-other-month a { color: #bbb; }


/* ── 16ai. Invoices ── */
#ui-datepicker-div { z-index: 10000 !important; }
#xeroModal .modal-dialog {
    width: 90% !important;
    max-width: 90% !important;
}


/* ── 16aj. Inspections — horizontal scroll with fixed column ── */
#scroller {
    width: 100%;
    overflow-x: scroll;
}
#scroller .table.fixedCol {
    width: auto;
    position: absolute;
}
.table.fixedCol th,
.table.fixedCol td {
    background: white;
}


/* ── 16ak. Permission denied page ── */
.denied-page {
    min-height: 100vh;
    background: #1a1d20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 15px;
    position: fixed;
    inset: 0;
    z-index: 9998;
}
.denied-card {
    width: 100%;
    max-width: 480px;
}
.denied-logo {
    text-align: center;
    margin-bottom: 35px;
}
.denied-logo img { max-height: 70px; }
.denied-support {
    text-align: center;
    margin-top: 20px;
    color: #999;
    font-size: 0.8rem;
}
.denied-support a { color: #aaa; }
.denied-support a:hover { color: #dc3545; }
.denied-page .card {
    box-shadow: 0 0 30px rgba(220, 53, 69, 0.15), 0 4px 20px rgba(0, 0, 0, 0.3);
}


/* ── 16al. HR events — icon picker hover ── */
.icon-picker:hover { color: #007bff !important; }


/* ── 16am. Waste transfer note ── */
#api-client-result {
    width: 92px;
    height: 38px;
    border: 1px solid lightgray;
    font-size: 11px;
}


/* ── 16an. Storage summary — card spacing override ── */
/* .card already has margin-bottom:10px in section 8. */
/* storage-summary.php used 20px — keep as utility class instead */


/* ── 16ao. Quote / outgoings — datepicker z-index ── */
/* #ui-datepicker-div already defined in 16ai */


/* ── 16ap. Copyable elements ── */
.copyable { cursor: pointer; }


/* ── 16aq. Scope / notes card hover ── */
#notes .card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease-in-out;
}
#notes .card-header small {
    font-size: 12px;
    opacity: 0.9;
}


/* ── 16ar. Site map (400px height variant) ── */
/* #map default height is 600px (DRA locations, section 16f).
   Override with .map-xs for 400px site maps, .map-sm for 450px. */
.map-xs { height: 400px; }


/* ── 16as. File upload (transactions) ── */
.fileUpload {
    position: relative;
    overflow: hidden;
    margin: 0;
}
.fileUpload input.upload {
    cursor: pointer;
}
