@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap');

:root {
    /* Aurevia brand: navy for actions and text, gold (from the logo) for accents */
    --navy:           #1d3557;
    --navy-dark:      #15283f;
    --gold:           #c8a64e;
    --gold-dark:      #8a6d24;   /* gold dark enough for text on white */
    --gold-light:     #f7f1e1;

    --primary:        var(--navy);
    --primary-light:  #e9eef5;
    --success:        #3aaf85;
    --success-light:  #d4f5ea;
    --warning:        #f5a623;
    --warning-light:  #fff3dc;
    --danger:         #dc3545;
    --danger-light:   #fde8ea;
    --info:           #17a2b8;
    --info-light:     #d1ecf1;
    --muted:          #6c757d;
    --sidebar-width:  260px;
    --topbar-height:  64px;
    --body-bg:        #f6f5f1;
    --card-shadow:    0 2px 18px rgba(0, 0, 0, 0.07);
    --card-radius:    12px;

    --brand-accent:   var(--gold);   /* band across the top of the sidebar and topbar */

    /* Chart colors (profit / loss), checked for colour-blind safety */
    --viz-profit:     #2a78d6;
    --viz-loss:       #e34948;
    --brand-name:     var(--navy);   /* name next to the logo in the sidebar */
    --brand-tint:     var(--gold-light);
    --brand-band:     4px;
}

/* -----------------------------------------------
   BASE
----------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Nunito', sans-serif;
    background: var(--body-bg);
    margin: 0;
    padding: 0;
    color: #2d3748;
}

/* -----------------------------------------------
   SIDEBAR
----------------------------------------------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: #fff;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.28s ease;
    overflow: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--brand-band) 1.25rem 0;
    height: var(--topbar-height);
    border-bottom: 1px solid #f0f2f5;
    flex-shrink: 0;
    background: var(--brand-tint);
    box-shadow: inset 0 var(--brand-band) 0 var(--brand-accent);
}

.sidebar-brand a {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brand-name);
    text-decoration: none;
    letter-spacing: -0.3px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.brand-logo {
    height: 34px;
    width: auto;
    flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { letter-spacing: 0.18em; }
.brand-sub {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-dark);
}

.sidebar-close-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
}

.sidebar-nav {
    list-style: none;
    padding: 0.75rem 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-heading {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #adb5bd;
    padding: 0.6rem 1.5rem 0.2rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    margin: 2px 0.75rem;
    border-radius: 8px;
    color: #4a5568;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.sidebar-nav .nav-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-nav .nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.icon-blue    { background: #e9eef5; color: #1d3557; }
.icon-gold    { background: #f7f1e1; color: #8a6d24; }
.icon-green   { background: #d4f5ea; color: #3aaf85; }
.icon-orange  { background: #fff3dc; color: #f5a623; }
.icon-red     { background: #fde8ea; color: #dc3545; }
.icon-teal    { background: #d1ecf1; color: #17a2b8; }
.icon-gray    { background: #f0f1f3; color: #6c757d; }

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #f0f2f5;
    flex-shrink: 0;
}

.btn-logout {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.55rem 1rem;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-family: 'Nunito', sans-serif;
}

.btn-logout:hover {
    background: var(--danger-light);
    color: var(--danger);
    border-color: var(--danger-light);
}

/* -----------------------------------------------
   SIDEBAR OVERLAY (mobile backdrop)
----------------------------------------------- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 999;
}

.sidebar-overlay.show { display: block; }

/* -----------------------------------------------
   MAIN CONTENT AREA
----------------------------------------------- */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* -----------------------------------------------
   TOPBAR
----------------------------------------------- */
.topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    height: var(--topbar-height);
    padding: var(--brand-band) 1.5rem 0;
    /* Company colour band across the top of every page */
    box-shadow: inset 0 var(--brand-band) 0 var(--brand-accent), 0 1px 6px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.topbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #4a5568;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.topbar-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a202c;
    flex: 1;
}

.topbar-user {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
}

/* -----------------------------------------------
   PAGE CONTENT
----------------------------------------------- */
.page-content {
    padding: 1.75rem;
    flex: 1;
}

/* -----------------------------------------------
   STAT CARDS
----------------------------------------------- */
.stat-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    height: 100%;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1;
}

/* -----------------------------------------------
   VOLT CARDS (general use)
----------------------------------------------- */
.volt-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: none;
}

.volt-card .card-header {
    background: transparent;
    border-bottom: 1px solid #f0f2f5;
    padding: 1rem 1.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #1a202c;
    border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
    display: flex;
    align-items: center;
}

.volt-card .card-body {
    padding: 1.5rem;
}

/* -----------------------------------------------
   FORMS
----------------------------------------------- */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
    padding: 0.55rem 0.875rem;
    font-family: 'Nunito', sans-serif;
    transition: border-color 0.15s, box-shadow 0.15s;
    color: #2d3748;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 53, 87, 0.15);
    outline: none;
}

.form-control::placeholder { color: #b0bec5; }

.form-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 0.3rem;
}

.form-control-sm, .form-select-sm {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
    border-radius: 7px;
}

/* -----------------------------------------------
   BUTTONS
----------------------------------------------- */
.btn {
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875rem;
    font-family: 'Nunito', sans-serif;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--navy-dark);
    border-color: var(--navy-dark);
}

.btn-outline-primary { border-color: var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; border-radius: 6px; }

/* -----------------------------------------------
   TABLES
----------------------------------------------- */
.volt-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.volt-table thead th.sortable {
    cursor: pointer;
    user-select: none;
}
.volt-table thead th.sortable:hover { color: var(--primary); }

.volt-table thead th {
    background: #f8fafc;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #9ca3af;
    border: none;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.volt-table tbody tr {
    border-bottom: 1px solid #f0f4f8;
    transition: background 0.1s;
}

.volt-table tbody tr:last-child { border-bottom: none; }

.volt-table tbody tr:hover { background: #f8fafc; }

.volt-table tbody td {
    padding: 0.8rem 1rem;
    font-size: 0.88rem;
    color: #4a5568;
    vertical-align: middle;
    border: none;
}

/* -----------------------------------------------
   BADGES
----------------------------------------------- */
.badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.35em 0.65em;
    border-radius: 6px;
    font-family: 'Nunito', sans-serif;
}

/* -----------------------------------------------
   SECTION DIVIDERS
----------------------------------------------- */
.section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    margin-bottom: 1rem;
}

/* -----------------------------------------------
   TOPBAR BREADCRUMB (job detail page)
----------------------------------------------- */
.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
}
.topbar-breadcrumb a {
    font-size: 0.88rem;
    font-weight: 600;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.15s;
}
.topbar-breadcrumb a:hover { color: var(--primary); }
.topbar-breadcrumb .crumb-sep   { color: #d1d5db; font-size: 0.88rem; }
.topbar-breadcrumb .crumb-current {
    font-size: 1rem;
    font-weight: 700;
    color: #1a202c;
}

/* -----------------------------------------------
   JOB DETAIL — overview key/value rows
----------------------------------------------- */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f4f8;
    font-size: 0.875rem;
}
.info-row:last-child { border-bottom: none; }

.info-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    min-width: 100px;
}

.info-value {
    font-weight: 600;
    color: #2d3748;
    text-align: right;
    word-break: break-word;
}

/* -----------------------------------------------
   JOB DETAIL — list items (notes, services, docs, eta)
----------------------------------------------- */
.note-item,
.service-item,
.doc-item,
.eta-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.5rem;
}
.note-item:last-child,
.service-item:last-child,
.doc-item:last-child,
.eta-item:last-child { margin-bottom: 0; }

.note-text { font-size: 0.875rem; color: #2d3748; margin-bottom: 0.2rem; }
.note-time { font-size: 0.75rem; color: #9ca3af; }
.upload-meta { font-size: 0.75rem; color: #9ca3af; font-weight: normal; margin-top: 0.1rem; }

.service-item { display: flex; align-items: flex-start; gap: 0.75rem; }

.doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.eta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    flex-wrap: wrap;
}
.eta-item .eta-changed {
    font-size: 0.75rem;
    font-weight: 400;
    color: #9ca3af;
    margin-left: auto;
}

/* -----------------------------------------------
   JOB DETAIL — locked action display rows
----------------------------------------------- */
.action-locked-row {
    background: #f0fdf4;
    border: 1px solid #d1fae5;
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.action-locked-row .btn-link {
    color: #9ca3af;
    line-height: 1;
}

.action-locked-row .btn-link:hover {
    color: var(--primary);
}

/* -----------------------------------------------
   JOB DETAIL — action section headings
----------------------------------------------- */
.action-section-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4a5568;
    margin-bottom: 0.65rem;
}

/* -----------------------------------------------
   TOAST NOTIFICATIONS
----------------------------------------------- */
#toastContainer {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 320px;
    pointer-events: none;
}

.volt-toast {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.8rem 1rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.13);
    font-size: 0.875rem;
    font-weight: 600;
    color: #2d3748;
    border-left: 4px solid #e2e8f0;
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: auto;
}

.volt-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.volt-toast-success { border-left-color: #3aaf85; }
.volt-toast-error   { border-left-color: #dc3545; }
.volt-toast-info    { border-left-color: var(--navy); }

.volt-toast-success .volt-toast-icon { color: #3aaf85; }
.volt-toast-error   .volt-toast-icon { color: #dc3545; }
.volt-toast-info    .volt-toast-icon { color: var(--navy); }

.volt-toast-icon { font-size: 1.05rem; flex-shrink: 0; }
.volt-toast-msg  { flex: 1; line-height: 1.4; }

.volt-toast-close {
    background: none;
    border: none;
    font-size: 0.8rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}
.volt-toast-close:hover { color: #4a5568; }

/* -----------------------------------------------
   CONFIRM MODAL
----------------------------------------------- */
#confirmModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

#confirmModal.show { display: flex; }

.confirm-box {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.16);
}

.confirm-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* -----------------------------------------------
   RESPONSIVE — mobile sidebar
----------------------------------------------- */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .sidebar-close-btn { display: block; }

    .main-content { margin-left: 0; }

    .topbar-toggle { display: block; }

    .page-content { padding: 1rem; }
}

@media (max-width: 480px) {
        .topbar { padding: var(--brand-band) 1rem 0; gap: 0.6rem; }
    .topbar-user { display: none; }
}

/* -----------------------------------------------
   AUREVIA EXTRAS
----------------------------------------------- */
.text-gold { color: var(--gold-dark) !important; }

.role-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: var(--gold-light);
    color: var(--gold-dark);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(180deg, var(--gold) 0, var(--gold) 4px, transparent 4px),
        var(--body-bg);
}
.login-wrap  { width: 100%; max-width: 420px; padding: 1.5rem 16px; }
.login-logo  { width: 220px; max-width: 70%; height: auto; }
.login-sub {
    margin-top: 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}
.login-card .card-body { padding: 2rem; }
.login-title { font-weight: 700; color: #1a202c; margin-bottom: 1.5rem; }

.font-mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.02em; }
.bg-gold   { background: var(--gold) !important; color: #1a202c !important; }

.volt-table tbody tr.row-link { cursor: pointer; }

/* Container fleet: count per status, click to filter */
.status-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}
.status-tile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 2px solid transparent;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s;
}
.status-tile:hover  { border-color: var(--gold-light); }
.status-tile.active { border-color: var(--gold); }
.status-tile-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--gold-light);
    color: var(--gold-dark);
    flex-shrink: 0;
}
.status-tile-n     { display: block; font-size: 1.4rem; font-weight: 700; color: #1a202c; line-height: 1; }
.status-tile-label { display: block; font-size: 0.75rem; font-weight: 700; color: var(--muted); margin-top: 0.2rem; }

/* Container movement history */
.move-item {
    padding: 0.7rem 0.9rem;
    border-left: 3px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    margin-bottom: 0.5rem;
}
.move-item:last-child { margin-bottom: 0; }
.move-current { border-left-color: var(--gold); background: var(--gold-light); }

@media (max-width: 480px) {
    .status-tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1200px) {
    .status-tile  { padding: 0.75rem 0.8rem; gap: 0.6rem; }
}

/* Job list tabs */
.view-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.view-tab {
    border: none;
    background: transparent;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
}
.view-tab:hover  { background: var(--primary-light); color: var(--navy); }
.view-tab.active { background: var(--navy); color: #fff; }

/* New job: type cards */
.type-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 0.75rem;
}
.type-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 2px solid transparent;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s;
}
.type-card:hover  { border-color: var(--gold-light); }
.type-card.active { border-color: var(--gold); background: #fffdf7; }
.type-card-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--gold-light); color: var(--gold-dark); font-size: 1.1rem;
}
.type-card-title { font-weight: 700; color: #1a202c; }
.type-card-dir   { display: block; font-size: 0.72rem; font-weight: 700; color: var(--gold-dark); letter-spacing: 0.04em; }
.type-card-help  { font-size: 0.82rem; color: var(--muted); line-height: 1.35; }

/* Job progress */
.stepper { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.25rem; }
.step {
    flex: 1;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}
.step + .step::before {
    content: "";
    position: absolute;
    top: 14px;
    right: calc(50% + 18px);
    width: calc(100% - 28px);
    height: 2px;
    background: #e2e8f0;
}
.step.done + .step.done::before { background: var(--gold); }
.step-dot {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}
.step.done .step-dot    { background: var(--gold); border-color: var(--gold); }
.step.current .step-dot { box-shadow: 0 0 0 4px var(--gold-light); }
.step.muted { opacity: 0.45; }
.step-label { margin-top: 0.4rem; font-size: 0.8rem; font-weight: 700; color: #1a202c; }
.step-time  { font-size: 0.72rem; color: var(--muted); min-height: 1rem; }

.seal-input { min-width: 110px; max-width: 140px; }

/* MMSW search results */
.mmsw-calls { max-height: 320px; overflow-y: auto; border: 1px solid #edf0f4; border-radius: 8px; }
.mmsw-call {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #edf0f4;
}
.mmsw-call:last-child { border-bottom: none; }

/* Bill of lading page */
.bl-number { font-size: 1.5rem; font-weight: 700; color: #1a202c; letter-spacing: 0.03em; }

/* Costs and invoice (job page) and finance pages */
.money-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.money-tile  { background: #f8f9fb; border: 1px solid #edf0f4; border-radius: 10px; padding: 0.7rem 0.85rem; min-width: 0; }
.money-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #9ca3af; }
.money-value { font-size: 1.15rem; font-weight: 700; color: #1a202c; margin-top: 0.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.money-sub   { font-size: 0.75rem; color: var(--muted); margin-top: 0.1rem; overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
    .money-tiles { grid-template-columns: 1fr; }
}
.volt-table .total-row td { font-weight: 700; background: #f8f9fb; }
.finance-summary { font-size: 0.85rem; color: var(--muted); }
.finance-summary strong { color: #1a202c; }
.overdue-row td { background: rgba(220, 53, 69, 0.05); }
.close-inputs { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; min-width: 260px; }
.close-inputs input[type=text], .close-inputs input[type=number] { width: 120px; }
.close-inputs input[type=file] { width: 210px; }

/* Dashboard */
.dash-heading    { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.6rem; }
.dash-subheading { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #9ca3af; margin-bottom: 0.35rem; }
.attention-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.75rem; }
.attention-tile {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 0.9rem 1rem; background: #fff; border-radius: var(--card-radius); box-shadow: var(--card-shadow);
    border-left: 4px solid #e2e8f0; color: inherit; text-decoration: none; transition: transform 0.1s;
}
a.attention-tile:hover { transform: translateY(-1px); color: inherit; }
.attention-icon {
    width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; background: #f1f3f6; color: var(--muted);
}
.attention-text  { display: flex; flex-direction: column; min-width: 0; }
.attention-n     { font-size: 1.5rem; font-weight: 700; color: #1a202c; line-height: 1; }
.attention-label { font-size: 0.78rem; font-weight: 700; color: #4a5568; margin-top: 0.25rem; }
.attention-sub   { font-size: 0.75rem; color: var(--muted); margin-top: 0.1rem; }
.attention-tile.is-zero .attention-n { color: #a0aec0; }
.attention-tile.tone-info   { border-left-color: var(--navy); }
.attention-tile.tone-info .attention-icon   { background: var(--primary-light); color: var(--navy); }
.attention-tile.tone-warn   { border-left-color: var(--gold); }
.attention-tile.tone-warn .attention-icon   { background: var(--gold-light); color: var(--gold-dark); }
.attention-tile.tone-danger { border-left-color: var(--danger); }
.attention-tile.tone-danger .attention-icon { background: var(--danger-light); color: var(--danger); }

.year-figures { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 0.75rem; }
.year-figure  { background: #f8f9fb; border: 1px solid #edf0f4; border-radius: 10px; padding: 0.7rem 0.85rem; min-width: 0; }
.year-value   { font-size: 1.1rem; font-weight: 700; color: #1a202c; margin-top: 0.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.year-figure.hero .year-value { font-size: 1.45rem; }
@media (max-width: 767.98px) {
    .year-figures { grid-template-columns: 1fr 1fr; }
    .year-figure.hero { grid-column: 1 / -1; }
}

.chart-key   { display: inline-flex; align-items: center; gap: 0.35rem; margin-left: 0.75rem; }
.chart-key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
#gpChart        { position: relative; width: 100%; }
#gpChart svg    { display: block; width: 100%; overflow: visible; }
#gpChart text   { font-size: 11px; fill: #6c757d; font-variant-numeric: tabular-nums; }
#gpChart .bar   { transition: opacity 0.1s; pointer-events: none; }
#gpChart .hit   { fill: transparent; outline: none; }
#gpChart .hit:hover + .bar, #gpChart .hit:focus + .bar { opacity: 0.75; }
#gpChart .hit:focus-visible { stroke: var(--primary); stroke-width: 1; }
.gp-empty {
    position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
    font-size: 0.85rem; color: var(--muted); background: #fff; padding: 0.2rem 0.6rem; border-radius: 6px;
}
.gp-tooltip {
    position: absolute; pointer-events: none; display: none;
    background: #fff; border: 1px solid #e3e6ea; border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1); padding: 0.45rem 0.65rem;
    font-size: 0.8rem; white-space: nowrap; z-index: 5;
}
.gp-tooltip .v { font-weight: 700; color: #2d3748; font-size: 0.9rem; }
.gp-tooltip .l { color: #6c757d; }
.gp-tooltip .k { display: inline-block; width: 12px; height: 2px; vertical-align: middle; margin-right: 0.35rem; }

.fleet-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0; border-bottom: 1px solid #f1f3f6; }
.fleet-row > span:first-child { min-width: 150px; }
.fleet-row.total { font-weight: 700; border-bottom: none; }
.fleet-bar { flex: 1; height: 6px; background: #f1f3f6; border-radius: 3px; overflow: hidden; }
.fleet-bar > span { display: block; height: 100%; background: var(--gold); border-radius: 3px; }
.fleet-n   { font-weight: 700; min-width: 1.5rem; text-align: right; }
.fleet-out {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.5rem; margin: 0 -0.5rem;
    border-radius: 6px; color: inherit; text-decoration: none; min-width: 0;
}
.fleet-out:hover { background: #f8f9fb; color: inherit; }

/* Test-round notice across the top (APP_BANNER in the server's .env) */
.app-banner {
    background: #b45309;
    color: #fff;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.35rem 1rem;
}
.app-banner-fixed { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; }
