        :root {
            --navy: #04070F;
            --navy2: #080E1C;
            --navy3: #0C1428;
            --card: #0F1B30;
            --card2: #131F38;
            --steel: #1A2D52;
            --ice: #2DAAFF;
            --ice2: rgba(45, 170, 255, .12);
            --gold: #FAC634;
            --gold2: rgba(250, 198, 52, .12);
            --green: #22C880;
            --green2: rgba(34, 200, 128, .12);
            --red: #FF4C6A;
            --red2: rgba(255, 76, 106, .12);
            --amber: #F5A623;
            --purple: #9B6DFF;
            --g1: #4A6080;
            --g2: #7A96B8;
            --g3: #A8BCCE;
            --white: #FFFFFF;
            --div: rgba(255, 255, 255, .06);
            --sidebar: 220px;
            --r: 8px;
            --r-lg: 14px;
        }

        *,
        *::before,
        *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0
        }

        html,
        body {
            height: 100%;
            overflow: hidden
        }

        body {
            font-family: 'IBM Plex Sans', sans-serif;
            background: var(--navy);
            color: var(--white);
            display: flex;
            font-size: 13px
        }

        /* ── SCROLLBAR ── */
        ::-webkit-scrollbar {
            width: 3px;
            height: 3px
        }

        ::-webkit-scrollbar-track {
            background: transparent
        }

        ::-webkit-scrollbar-thumb {
            background: var(--steel);
            border-radius: 2px
        }

        a {
            text-decoration: none;
        }

        div#appContent {
            width: 100% !important;
        }

        /* ── SIDEBAR ── */
        .sidebar {
            width: var(--sidebar);
            min-height: 100vh;
            background: var(--navy2);
            border-right: 1px solid var(--div);
            display: flex;
            flex-direction: column;
            position: fixed;
            left: 0;
            top: 0;
            bottom: 0;
            z-index: 100;
            flex-shrink: 0;
        }

        .sb-logo {
            padding: 18px 16px 14px;
            border-bottom: 1px solid var(--div)
        }

        .logo-word {
            font-family: 'Barlow Condensed', sans-serif;
            font-size: 24px;
            font-weight: 900;
            letter-spacing: -.5px;
            line-height: 1
        }

        .logo-word em {
            color: var(--ice);
            font-style: normal
        }

        .ops-tag {
            display: inline-block;
            background: var(--gold2);
            border: 1px solid rgba(250, 198, 52, .3);
            border-radius: 4px;
            padding: 2px 7px;
            font-family: 'IBM Plex Mono', monospace;
            font-size: 9px;
            color: var(--gold);
            letter-spacing: 1.2px;
            margin-top: 5px;
            text-transform: uppercase
        }

        .sb-nav {
            flex: 1;
            padding: 10px 8px;
            overflow-y: auto
        }

        .nav-grp-label {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 9px;
            color: var(--g1);
            letter-spacing: 1.5px;
            text-transform: uppercase;
            padding: 10px 8px 5px
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 9px;
            padding: 8px 10px;
            border-radius: 6px;
            cursor: pointer;
            transition: all .15s;
            color: var(--g2);
            margin-bottom: 1px;
            font-size: 12px;
            font-weight: 400;
            text-decoration: none;
        }

        .nav-item:hover {
            background: rgba(255, 255, 255, .04);
            color: var(--white)
        }

        .nav-item.active {
            background: var(--ice2);
            color: var(--ice);
            font-weight: 500
        }

        .nav-ico {
            font-size: 14px;
            width: 16px;
            text-align: center;
            flex-shrink: 0
        }

        .nav-badge {
            margin-left: auto;
            background: var(--red);
            color: #fff;
            font-size: 9px;
            padding: 1px 5px;
            border-radius: 10px;
            font-family: 'IBM Plex Mono', monospace;
            font-weight: 500
        }

        .nav-badge.grn {
            background: var(--green);
            color: var(--navy)
        }

        .nav-badge.gld {
            background: var(--gold);
            color: var(--navy)
        }

        .sb-bottom {
            padding: 12px 16px;
            border-top: 1px solid var(--div)
        }

        .live-row {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 4px
        }

        .live-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--green);
            animation: pulse 1.8s infinite
        }

        @keyframes pulse {

            0%,
            100% {
                opacity: 1
            }

            50% {
                opacity: .25
            }
        }

        .live-txt {
            font-size: 11px;
            color: var(--green);
            font-family: 'IBM Plex Mono', monospace
        }

        .sb-time {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 9px;
            color: var(--g1)
        }

        /* ── MAIN ── */
        .main {
            margin-left: var(--sidebar);
            flex: 1;
            display: flex;
            flex-direction: column;
            height: 100vh;
            overflow: hidden
        }

        .topbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 24px;
            height: 52px;
            border-bottom: 1px solid var(--div);
            background: var(--navy2);
            flex-shrink: 0;
            position: sticky;
            top: 0;
            z-index: 50;
        }

        .topbar-title {
            font-family: 'Barlow Condensed', sans-serif;
            font-size: 18px;
            font-weight: 700;
            letter-spacing: .3px;
            color: var(--white)
        }

        .topbar-right {
            display: flex;
            align-items: center;
            gap: 12px
        }

        .refresh-btn {
            background: var(--card);
            border: 1px solid var(--steel);
            border-radius: 6px;
            padding: 5px 12px;
            color: var(--g2);
            font-size: 11px;
            cursor: pointer;
            transition: all .15s;
            font-family: 'IBM Plex Mono', monospace;
            display: flex;
            align-items: center;
            gap: 5px
        }

        .refresh-btn:hover {
            border-color: var(--ice);
            color: var(--ice)
        }

        .status-chip {
            display: flex;
            align-items: center;
            gap: 5px;
            background: var(--green2);
            border: 1px solid rgba(34, 200, 128, .25);
            border-radius: 20px;
            padding: 4px 10px;
            font-size: 10px;
            color: var(--green);
            font-family: 'IBM Plex Mono', monospace
        }

        .content {
            flex: 1;
            overflow-y: auto;
            padding: 20px 24px
        }

        /* ── SCREEN SECTIONS ── */
        .screen {
            display: none
        }

        .screen.active {
            display: block
        }

        /* ── METRIC CARDS ── */
        .metric-row {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
            margin-bottom: 20px
        }

        .metric-row.five {
            grid-template-columns: repeat(5, 1fr)
        }

        .metric-card {
            background: var(--card);
            border: 1px solid var(--steel);
            border-radius: var(--r-lg);
            padding: 16px 18px;
            position: relative;
            overflow: hidden
        }

        .metric-card::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            opacity: .06;
            transform: translate(20px, -20px)
        }

        .metric-card.blue::before {
            background: var(--ice)
        }

        .metric-card.gold::before {
            background: var(--gold)
        }

        .metric-card.green::before {
            background: var(--green)
        }

        .metric-card.red::before {
            background: var(--red)
        }

        .metric-card.purple::before {
            background: var(--purple)
        }

        .m-label {
            font-size: 10px;
            color: var(--g2);
            text-transform: uppercase;
            letter-spacing: .8px;
            font-family: 'IBM Plex Mono', monospace;
            margin-bottom: 6px
        }

        .m-value {
            font-family: 'Barlow Condensed', sans-serif;
            font-size: 32px;
            font-weight: 700;
            line-height: 1;
            color: var(--white)
        }

        .m-value.blue {
            color: var(--ice)
        }

        .m-value.gold {
            color: var(--gold)
        }

        .m-value.green {
            color: var(--green)
        }

        .m-value.red {
            color: var(--red)
        }

        .m-sub {
            font-size: 10px;
            color: var(--g1);
            margin-top: 4px;
            font-family: 'IBM Plex Mono', monospace
        }

        /* ── TABLES ── */
        .table-card {
            background: var(--card);
            border: 1px solid var(--steel);
            border-radius: var(--r-lg);
            overflow: hidden;
            margin-bottom: 16px
        }

        .table-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 18px;
            border-bottom: 1px solid var(--div)
        }

        .table-title {
            font-family: 'Barlow Condensed', sans-serif;
            font-size: 15px;
            font-weight: 700;
            letter-spacing: .3px
        }

        .table-actions {
            display: flex;
            gap: 8px;
            align-items: center
        }

        table {
            width: 100%;
            border-collapse: collapse
        }

        thead th {
            padding: 8px 14px;
            text-align: left;
            font-size: 10px;
            color: var(--g1);
            font-family: 'IBM Plex Mono', monospace;
            letter-spacing: .8px;
            text-transform: uppercase;
            border-bottom: 1px solid var(--div);
            background: var(--navy3)
        }

        tbody tr {
            border-bottom: 1px solid rgba(255, 255, 255, .03);
            transition: background .12s;
            cursor: pointer
        }

        tbody tr:last-child {
            border: none
        }

        tbody tr:hover {
            background: rgba(255, 255, 255, .03)
        }

        td {
            padding: 10px 14px;
            font-size: 12px;
            color: var(--g3);
            vertical-align: middle
        }

        td.white {
            color: var(--white)
        }

        td.bold {
            color: var(--white);
            font-weight: 500
        }

        td.mono {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 11px
        }

        /* ── BADGES ── */
        .badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: 500;
            font-family: 'IBM Plex Mono', monospace;
            white-space: nowrap
        }

        .badge.online {
            background: var(--green2);
            color: var(--green);
            border: 1px solid rgba(34, 200, 128, .2)
        }

        .badge.offline {
            background: rgba(74, 96, 128, .15);
            color: var(--g2);
            border: 1px solid rgba(74, 96, 128, .2)
        }

        .badge.on-job {
            background: var(--ice2);
            color: var(--ice);
            border: 1px solid rgba(45, 170, 255, .2)
        }

        .badge.inactive {
            background: var(--red2);
            color: var(--red);
            border: 1px solid rgba(255, 76, 106, .2)
        }

        .badge.pending {
            background: var(--gold2);
            color: var(--gold);
            border: 1px solid rgba(250, 198, 52, .2)
        }

        .badge.complete {
            background: var(--green2);
            color: var(--green);
            border: 1px solid rgba(34, 200, 128, .2)
        }

        .badge.dispatching {
            background: var(--ice2);
            color: var(--ice);
            border: 1px solid rgba(45, 170, 255, .2)
        }

        .badge.high {
            background: var(--red2);
            color: var(--red);
            border: 1px solid rgba(255, 76, 106, .2)
        }

        .badge.medium {
            background: var(--gold2);
            color: var(--gold);
            border: 1px solid rgba(250, 198, 52, .2)
        }

        .badge.low {
            background: var(--green2);
            color: var(--green);
            border: 1px solid rgba(34, 200, 128, .2)
        }

        .badge.fad {
            background: var(--ice2);
            color: var(--ice);
            border: 1px solid rgba(45, 170, 255, .2)
        }

        .badge.tcs {
            background: var(--green2);
            color: var(--green);
            border: 1px solid rgba(34, 200, 128, .2)
        }

        .badge.nate {
            background: var(--gold2);
            color: var(--gold);
            border: 1px solid rgba(250, 198, 52, .2)
        }

        .dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            flex-shrink: 0
        }

        .dot.green {
            background: var(--green)
        }

        .dot.ice {
            background: var(--ice)
        }

        .dot.gold {
            background: var(--gold)
        }

        .dot.red {
            background: var(--red)
        }

        .dot.grey {
            background: var(--g1)
        }

        /* ── SEARCH / FILTER BAR ── */
        .filter-bar {
            display: flex;
            gap: 10px;
            align-items: center;
            margin-bottom: 16px;
            flex-wrap: wrap
        }

        .search-box {
            display: flex;
            align-items: center;
            gap: 8px;
            background: var(--card);
            border: 1px solid var(--steel);
            border-radius: 6px;
            padding: 6px 12px;
            flex: 1;
            min-width: 200px
        }

        .search-box input {
            background: transparent;
            border: none;
            outline: none;
            color: var(--white);
            font-size: 12px;
            width: 100%;
            font-family: 'IBM Plex Sans', sans-serif
        }

        .search-box input::placeholder {
            color: var(--g1)
        }

        .filter-select {
            background: var(--card);
            border: 1px solid var(--steel);
            border-radius: 6px;
            padding: 6px 10px;
            color: var(--g2);
            font-size: 11px;
            cursor: pointer;
            outline: none;
            font-family: 'IBM Plex Mono', monospace
        }

        .filter-select:hover,
        .filter-select:focus {
            border-color: var(--ice)
        }

        .btn {
            background: var(--card2);
            border: 1px solid var(--steel);
            border-radius: 6px;
            padding: 6px 14px;
            color: var(--g2);
            font-size: 11px;
            cursor: pointer;
            transition: all .15s;
            font-family: 'IBM Plex Mono', monospace;
            display: inline-flex;
            align-items: center;
            gap: 5px
        }

        .btn:hover {
            border-color: var(--ice);
            color: var(--ice)
        }

        .btn.primary {
            background: var(--ice2);
            border-color: rgba(45, 170, 255, .3);
            color: var(--ice)
        }

        .btn.primary:hover {
            background: rgba(45, 170, 255, .2)
        }

        .btn.danger {
            background: var(--red2);
            border-color: rgba(255, 76, 106, .3);
            color: var(--red)
        }

        .btn.success {
            background: var(--green2);
            border-color: rgba(34, 200, 128, .3);
            color: var(--green)
        }

        /* ── GRID LAYOUTS ── */
        .grid-2 {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
            margin-bottom: 16px
        }

        .grid-3 {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 16px;
            margin-bottom: 16px
        }

        /* ── CHART CARD ── */
        .chart-card {
            background: var(--card);
            border: 1px solid var(--steel);
            border-radius: var(--r-lg);
            padding: 18px;
            margin-bottom: 16px
        }

        .chart-title {
            font-family: 'Barlow Condensed', sans-serif;
            font-size: 14px;
            font-weight: 700;
            letter-spacing: .3px;
            margin-bottom: 14px;
            color: var(--white)
        }

        .chart-wrap {
            position: relative;
            height: 200px
        }

        /* ── CSS SCORE BAR ── */
        .css-bar-wrap {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 4px
        }

        .css-bar-track {
            flex: 1;
            height: 4px;
            background: var(--steel);
            border-radius: 2px;
            overflow: hidden
        }

        .css-bar-fill {
            height: 100%;
            border-radius: 2px;
            transition: width .4s
        }

        .css-val {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 10px;
            color: var(--g2);
            width: 30px;
            text-align: right
        }

        /* ── JOB DETAIL DRAWER ── */
        .drawer-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, .6);
            z-index: 200;
            backdrop-filter: blur(2px)
        }

        .drawer-overlay.open {
            display: block
        }

        .drawer {
            position: fixed;
            right: 0;
            top: 0;
            bottom: 0;
            width: 480px;
            background: var(--navy2);
            border-left: 1px solid var(--steel);
            z-index: 201;
            overflow-y: auto;
            transform: translateX(100%);
            transition: transform .25s cubic-bezier(.4, 0, .2, 1)
        }

        .drawer.open {
            transform: translateX(0)
        }

        .drawer-header {
            padding: 16px 20px;
            border-bottom: 1px solid var(--div);
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: sticky;
            top: 0;
            background: var(--navy2);
            z-index: 1
        }

        .drawer-title {
            font-family: 'Barlow Condensed', sans-serif;
            font-size: 18px;
            font-weight: 700
        }

        .drawer-close {
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            border: 1px solid var(--steel);
            cursor: pointer;
            color: var(--g2);
            font-size: 14px;
            transition: all .15s
        }

        .drawer-close:hover {
            border-color: var(--red);
            color: var(--red)
        }

        .drawer-body {
            padding: 16px 20px
        }

        .drow {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            padding: 8px 0;
            border-bottom: 1px solid var(--div);
            font-size: 12px
        }

        .drow:last-child {
            border: none
        }

        .dkey {
            color: var(--g1);
            min-width: 120px;
            flex-shrink: 0
        }

        .dval {
            color: var(--white);
            text-align: right;
            font-weight: 500
        }

        .drawer-section {
            margin-bottom: 14px
        }

        .drawer-section-title {
            font-size: 10px;
            color: var(--g1);
            font-family: 'IBM Plex Mono', monospace;
            letter-spacing: 1px;
            text-transform: uppercase;
            margin-bottom: 8px;
            padding-top: 4px
        }

        .log-entry {
            display: flex;
            gap: 10px;
            padding: 6px 0;
            border-bottom: 1px solid rgba(255, 255, 255, .03)
        }

        .log-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--ice);
            flex-shrink: 0;
            margin-top: 4px
        }

        .log-txt {
            font-size: 11px;
            color: var(--g2);
            line-height: 1.5
        }

        .log-time {
            font-size: 10px;
            color: var(--g1);
            font-family: 'IBM Plex Mono', monospace;
            margin-top: 2px
        }

        .drawer-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            padding: 14px 20px;
            border-top: 1px solid var(--div);
            position: sticky;
            bottom: 0;
            background: var(--navy2)
        }

        /* ── MODAL ── */
        .modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, .7);
            z-index: 300;
            display: none;
            align-items: center;
            justify-content: center
        }

        .modal-overlay.open {
            display: flex
        }

        .modal {
            background: var(--navy2);
            border: 1px solid var(--steel);
            border-radius: var(--r-lg);
            padding: 24px;
            width: 460px;
            max-width: 90vw
        }

        .modal-title {
            font-family: 'Barlow Condensed', sans-serif;
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 16px
        }

        .form-field {
            margin-bottom: 14px
        }

        .form-label {
            font-size: 10px;
            color: var(--g2);
            font-family: 'IBM Plex Mono', monospace;
            letter-spacing: .8px;
            text-transform: uppercase;
            margin-bottom: 5px;
            display: block
        }

        .form-input {
            width: 100%;
            background: var(--card);
            border: 1px solid var(--steel);
            border-radius: 6px;
            padding: 8px 12px;
            color: var(--white);
            font-size: 12px;
            font-family: 'IBM Plex Sans', sans-serif;
            outline: none
        }

        .form-input:focus {
            border-color: var(--ice)
        }

        .form-select {
            width: 100%;
            background: var(--card);
            border: 1px solid var(--steel);
            border-radius: 6px;
            padding: 8px 12px;
            color: var(--white);
            font-size: 12px;
            font-family: 'IBM Plex Mono', monospace;
            outline: none
        }

        .form-textarea {
            width: 100%;
            background: var(--card);
            border: 1px solid var(--steel);
            border-radius: 6px;
            padding: 8px 12px;
            color: var(--white);
            font-size: 12px;
            resize: vertical;
            min-height: 80px;
            font-family: 'IBM Plex Sans', sans-serif;
            outline: none
        }

        .form-textarea:focus,
        .form-select:focus {
            border-color: var(--ice)
        }

        .modal-actions {
            display: flex;
            gap: 8px;
            justify-content: flex-end;
            margin-top: 18px
        }

        /* ── LOADING / EMPTY ── */
        .loading-row td {
            text-align: center;
            padding: 40px;
            color: var(--g1);
            font-family: 'IBM Plex Mono', monospace;
            font-size: 12px
        }

        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: var(--g1)
        }

        .empty-state .ei {
            font-size: 40px;
            margin-bottom: 12px;
            opacity: .4
        }

        .empty-state p {
            font-size: 12px
        }

        /* ── TOAST ── */
        .toast-container {
            position: fixed;
            bottom: 24px;
            right: 24px;
            z-index: 999;
            display: flex;
            flex-direction: column;
            gap: 8px
        }

        .toast {
            background: var(--card2);
            border: 1px solid var(--steel);
            border-radius: 8px;
            padding: 12px 16px;
            font-size: 12px;
            color: var(--white);
            display: flex;
            align-items: center;
            gap: 8px;
            animation: slideIn .2s ease;
            max-width: 320px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, .4)
        }

        .toast.success {
            border-color: rgba(34, 200, 128, .3);
            background: rgba(34, 200, 128, .08)
        }

        .toast.error {
            border-color: rgba(255, 76, 106, .3);
            background: rgba(255, 76, 106, .08)
        }

        @keyframes slideIn {
            from {
                transform: translateY(20px);
                opacity: 0
            }

            to {
                transform: translateY(0);
                opacity: 1
            }
        }

        /* ── RESPONSIVE HELPERS ── */
        .d-none {
            display: none
        }