﻿:root {
      --bg: #eef2f7;
      --ink: #172033;
      --muted: #667085;
      --line: #d8deea;
      --card: #fff;
      --primary: #4f46e5;
      --primary-dark: #312e81;
      --good: #059669;
      --danger: #dc2626;
      --warning: #f59e0b;
      --shadow: 0 18px 45px rgba(16,24,40,.12), 0 2px 0 rgba(255,255,255,.85) inset;
      --radius: 14px;
    }
    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      color: var(--ink);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
      overflow-x: hidden;
      background:
        radial-gradient(circle at top left, rgba(79,70,229,.10), transparent 32rem),
        linear-gradient(145deg, #f8fafc 0%, #edf2f8 42%, #e7edf6 100%);
    }
    a { color: inherit; text-decoration: none; }
    h1, h2, h3, p { margin-top: 0; }
    p { line-height: 1.5; }
    input, select, textarea, button { font: inherit; }
    input, select, textarea {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 11px;
      padding: 11px 13px;
      color: var(--ink);
      background: linear-gradient(#fff, #f9fbff);
      outline: none;
    }
    input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79,70,229,.12); }
    textarea { min-height: 92px; resize: vertical; }
    label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 800; color: #566176; }
    label, input, select, textarea, .panel, .main { min-width: 0; }
    code { overflow-wrap: anywhere; }
    .login-shell {
      min-height: 100vh;
      min-height: 100dvh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background: radial-gradient(circle at 20% 15%, rgba(99,102,241,.34), transparent 24rem), linear-gradient(145deg, #1e1b4b, #0f172a);
    }
    .login-card {
      width: min(420px, 100%);
      display: flex;
      flex-direction: column;
      gap: 18px;
      padding: 36px;
      border: 1px solid rgba(255,255,255,.82);
      border-radius: 18px;
      background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
      box-shadow: 0 34px 90px rgba(0,0,0,.32), 0 2px 0 rgba(255,255,255,.8) inset;
    }
    .login-card h1, .login-card p { text-align: center; }
    .login-icon {
      width: 66px;
      height: 66px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      margin: 0 auto;
      color: var(--primary);
      font-weight: 900;
      background: linear-gradient(145deg, #eef2ff, #c7d2fe);
    }
    .sidebar {
      position: fixed;
      inset: 0 auto 0 0;
      width: 268px;
      color: #cbd5e1;
      display: flex;
      flex-direction: column;
      background: linear-gradient(155deg, rgba(30,41,59,.88), rgba(2,6,23,.98)), #07111f;
      box-shadow: 18px 0 40px rgba(15,23,42,.20);
      z-index: 10;
    }
    .brand { padding: 26px 24px; border-bottom: 1px solid rgba(255,255,255,.08); }
    .brand strong { display: block; color: #fff; font-size: 22px; }
    .brand span { display: block; margin-top: 6px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #94a3b8; }
    .sidebar nav { padding: 20px 12px; display: flex; flex-direction: column; gap: 7px; overflow: auto; }
    .sidebar a { border-radius: 12px; padding: 12px 14px; color: #cbd5e1; }
    .sidebar a:hover { background: rgba(255,255,255,.08); color: #fff; }
    .sidebar a.active { color: #fff; background: linear-gradient(145deg, rgba(79,70,229,.95), rgba(49,46,129,.94)); box-shadow: 0 14px 28px rgba(49,46,129,.35); }
    .sidebar-footer { margin-top: auto; padding: 15px; border-top: 1px solid rgba(255,255,255,.08); }
    .profile { display: block; margin-bottom: 10px; }
    .profile b, .profile span { display: block; }
    .profile span { text-transform: capitalize; color: #94a3b8; font-size: 12px; }
    .mobile-topbar, .sidebar-overlay { display: none; }
    .main { margin-left: 268px; padding: clamp(22px, 3vw, 42px); min-height: 100vh; }
    .page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
    .page-head h1 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 7px; }
    .page-head p, .section-head p { color: var(--muted); margin-bottom: 0; }
    .panel, .stat {
      background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
      border: 1px solid rgba(203,213,225,.82);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
    }
    .panel { padding: clamp(18px, 2.2vw, 26px); margin-bottom: 24px; }
    .grid-2, .grid-3, .grid-4, .grid-5 { display: grid; gap: 20px; }
    .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .span-2 { grid-column: span 2; }
    .stats { margin-bottom: 24px; }
    .stat { padding: 22px; }
    .stat span { display: block; color: var(--muted); font-size: 13px; font-weight: 800; margin-bottom: 10px; }
    .stat small { display: block; color: #64748b; font-size: 12px; font-weight: 900; margin: -4px 0 10px; overflow-wrap: anywhere; }
    .stat b { font-size: clamp(22px, 2vw, 28px); }
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      border: 0;
      border-radius: 11px;
      padding: 11px 16px;
      font-weight: 900;
      cursor: pointer;
      color: #273143;
      background: linear-gradient(180deg, #f8fafc, #e5eaf2);
      box-shadow: 0 4px 0 #cbd5e1, 0 12px 22px rgba(15,23,42,.10);
    }
    .btn:hover { filter: brightness(1.03); transform: translateY(-1px); }
    .btn.primary { background: linear-gradient(180deg, #6366f1, #4338ca); color: #fff; box-shadow: 0 4px 0 #312e81, 0 14px 24px rgba(79,70,229,.24); }
    .btn.danger { background: linear-gradient(180deg, #ef4444, #b91c1c); color: #fff; box-shadow: 0 4px 0 #7f1d1d, 0 14px 24px rgba(220,38,38,.20); }
    .btn.good-bg { background: linear-gradient(180deg, #10b981, #047857); color: #fff; box-shadow: 0 4px 0 #065f46, 0 14px 24px rgba(5,150,105,.20); }
    .btn.subtle { background: linear-gradient(180deg, #fff, #edf2f8); color: #334155; }
    .btn.small { font-size: 12px; padding: 8px 11px; border-radius: 9px; }
    .btn.full { width: 100%; }
    .button-row, .actions, .bulk-actions, .inline-form { display: flex; gap: 11px; align-items: center; flex-wrap: wrap; }
    .form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px; }
    .form-grid h2 { grid-column: 1 / -1; margin: 12px 0 0; }
    .form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 11px; }
    .filters { display: grid; grid-template-columns: repeat(5, minmax(145px, 1fr)); gap: 13px; align-items: end; overflow: visible; }
    .table-wrap { overflow: auto; border-radius: var(--radius); }
    table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
    th { background: linear-gradient(180deg, #f8fafc, #eef2f7); color: var(--muted); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
    th, td { padding: 14px 15px; border-bottom: 1px solid #e8edf5; vertical-align: top; }
    tbody tr:hover { background: #f8fbff; }
    td small { display: block; color: var(--muted); margin-top: 5px; }
    .empty { text-align: center; color: #98a2b3; padding: 30px; }
    .pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 16px 0 0; flex-wrap: wrap; }
    .pagination-summary { margin-right: auto; color: var(--muted); font-size: 12px; font-weight: 800; }
    .pill { display: inline-block; border-radius: 999px; background: linear-gradient(180deg, #eef2ff, #dfe6ff); color: #3730a3; padding: 5px 10px; font-size: 12px; font-weight: 900; }
    .pill.sold { background: linear-gradient(180deg, #f1f5f9, #e2e8f0); color: #475569; }
    .pill.transit { background: linear-gradient(180deg, #fff7ed, #fed7aa); color: #9a3412; }
    .good { color: var(--good); }
    .bad { color: var(--danger); }
    .muted { color: #98a2b3; }
    .flash { margin: 0 0 18px; padding: 14px 16px; border-radius: 12px; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; box-shadow: 0 8px 18px rgba(16,24,40,.08); }
    .flash.error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
    .flash.success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
    .bar-row { display: grid; grid-template-columns: 120px 1fr 36px; gap: 10px; align-items: center; margin: 11px 0; }
    .bar-row i { display: block; height: 10px; background: linear-gradient(90deg, #4f46e5, #0ea5e9); border-radius: 999px; min-width: 3px; }
    .chart { width: 100%; height: 320px; border-radius: 16px; padding: 10px; background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(248,250,252,.72)); }
    .modal { position: fixed; inset: 0; background: rgba(2,6,23,.66); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 50; backdrop-filter: blur(4px); }
    .modal.open { display: flex; }
    .modal-card { background: linear-gradient(180deg, #fff, #f8fafc); border-radius: 18px; width: min(760px, 100%); max-height: 90vh; overflow: auto; padding: 26px; position: relative; box-shadow: 0 34px 90px rgba(0,0,0,.30); }
    .modal-close { position: absolute; top: 14px; right: 14px; border: 0; background: #eef2f7; border-radius: 50%; width: 34px; height: 34px; cursor: pointer; box-shadow: 0 3px 0 #cbd5e1; }
    .breakdown { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
    .breakdown dt { color: var(--muted); }
    .breakdown dd { margin: 0; font-weight: 900; }
    .list { list-style: none; margin: 16px 0 0; padding: 0; max-height: 440px; overflow: auto; }
    .list.tall { max-height: 560px; }
    .list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #edf0f5; }
    .icon, .link { border: 0; background: transparent; color: var(--primary); font-weight: 900; cursor: pointer; padding: 0; }
    .icon.danger { color: var(--danger); }
    .calc-total { padding: 14px; border-radius: 12px; background: linear-gradient(180deg, #f8fafc, #eef2f7); border: 1px solid #dbe3ef; }
    .calc-total span { display: block; color: var(--muted); font-size: 12px; }
    .calc-total b { font-size: 23px; }
    .section-head { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
    .split-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid #edf0f5; padding-top: 16px; margin-top: 16px; }
    .split-actions:first-of-type { border-top: 0; padding-top: 0; }
    .danger-zone { border-color: #fecaca; background: linear-gradient(180deg, #fff, #fff7f7); }
    .payment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
    .payment-card { border: 1px solid rgba(203,213,225,.88); border-radius: 16px; padding: 18px; background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.95)); box-shadow: 0 16px 34px rgba(16,24,40,.10); }
    .payment-progress { height: 12px; margin: 16px 0; border-radius: 999px; background: #e5eaf2; overflow: hidden; }
    .payment-progress div { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #10b981, #4f46e5); }
    .payment-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .payment-amounts div { padding: 12px; border: 1px solid #e5eaf2; border-radius: 12px; background: linear-gradient(180deg, #fff, #f8fafc); }
    .payment-amounts span { display: block; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px; }
    .audit-detail { width: 100%; max-width: 420px; white-space: pre-wrap; word-break: break-word; margin: 0; padding: 10px; border-radius: 10px; background: #f7f9fc; border: 1px solid #e5eaf2; color: #334155; font: 12px/1.45 Consolas, "Courier New", monospace; }
    .loading { padding: 40px; color: var(--muted); font-weight: 900; }
    #app.route-loading .app-toolbar::after {
      content: '';
      position: absolute;
      left: 0;
      bottom: -1px;
      width: 34%;
      height: 2px;
      background: #159947;
      box-shadow: 0 0 10px rgba(21,153,71,.35);
      animation: routeProgress 1s ease-in-out infinite;
    }
    @keyframes routeProgress {
      0% { transform: translateX(-110%); }
      100% { transform: translateX(395%); }
    }
    .hidden { display: none !important; }
    @media (max-width: 1100px) {
      .grid-5, .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .filters, .form-grid, .payment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 860px) {
      body.sidebar-open { overflow: hidden; }
      .mobile-topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; color: #fff; background: linear-gradient(155deg, rgba(30,41,59,.96), rgba(2,6,23,.98)), #07111f; }
      .mobile-menu-btn { min-height: 42px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 10px 13px; color: #fff; background: rgba(255,255,255,.08); font-weight: 900; cursor: pointer; }
      .sidebar { width: min(86vw, 312px); transform: translateX(-105%); transition: transform .24s ease; z-index: 60; }
      .sidebar-open .sidebar { transform: translateX(0); }
      .sidebar-overlay { position: fixed; inset: 0; z-index: 55; background: rgba(2,6,23,.54); backdrop-filter: blur(2px); }
      .sidebar-open .sidebar-overlay { display: block; }
      .main { margin-left: 0; padding: 18px 14px 28px; }
      .grid-2, .grid-3, .grid-4, .grid-5, .filters, .form-grid, .payment-grid, .payment-amounts { grid-template-columns: 1fr; }
      .span-2 { grid-column: auto; }
      .page-head, .section-head { flex-direction: column; }
      .table-wrap { margin-left: -14px; margin-right: -14px; border-radius: 0; overflow-x: auto; }
      table { min-width: 760px; }
      .modal { padding: 12px; align-items: flex-start; overflow-y: auto; }
      .modal-card { width: 100%; max-height: none; margin: 18px 0; }
    }

    /* Hanjra Cars IMS 2026 interface refresh */
    :root {
      --bg: #05090d;
      --ink: #eef6ff;
      --muted: #93a4b8;
      --line: rgba(148, 163, 184, .18);
      --card: rgba(10, 19, 27, .78);
      --primary: #18d85f;
      --primary-dark: #078a3b;
      --good: #21d46b;
      --danger: #ff4d5b;
      --warning: #f6b31a;
      --blue: #3478ff;
      --shadow: 0 24px 70px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .06);
      --radius: 8px;
      color-scheme: dark;
    }
    body {
      color: var(--ink);
      background:
        linear-gradient(115deg, rgba(24, 216, 95, .10), transparent 32rem),
        radial-gradient(circle at 78% 4%, rgba(52, 120, 255, .14), transparent 28rem),
        linear-gradient(180deg, #061018 0%, #05090d 56%, #030609 100%);
    }
    body::before {
      content: "";
      position: fixed;
      inset: 0;
      pointer-events: none;
      background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
      background-size: 54px 54px;
      mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 72%);
    }
    input, select, textarea {
      color: #eaf2fb;
      border-color: rgba(148, 163, 184, .20);
      background: linear-gradient(180deg, rgba(17, 29, 39, .96), rgba(8, 17, 24, .96));
      box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
    }
    input::placeholder, textarea::placeholder { color: #627286; }
    input:focus, select:focus, textarea:focus {
      border-color: rgba(24, 216, 95, .70);
      box-shadow: 0 0 0 4px rgba(24, 216, 95, .12), 0 14px 30px rgba(0,0,0,.22);
    }
    label { color: #aab9c9; letter-spacing: 0; }
    .login-shell {
      background:
        linear-gradient(130deg, rgba(24,216,95,.12), transparent 32rem),
        radial-gradient(circle at 82% 12%, rgba(52,120,255,.22), transparent 30rem),
        linear-gradient(145deg, #061018, #020407);
    }
    .login-card {
      color: #eaf2fb;
      border-color: rgba(148,163,184,.18);
      border-radius: 12px;
      background: linear-gradient(180deg, rgba(12,23,32,.92), rgba(5,11,16,.92));
      box-shadow: 0 38px 100px rgba(0,0,0,.46), inset 0 1px 0 rgba(255,255,255,.06);
      backdrop-filter: blur(18px);
    }
    .login-icon {
      color: #041109;
      border-radius: 14px;
      background: linear-gradient(135deg, #28f272, #0fb84e);
      box-shadow: 0 16px 38px rgba(24,216,95,.25);
    }
    .sidebar {
      width: 244px;
      background: linear-gradient(180deg, rgba(5,11,16,.96), rgba(3,8,12,.98));
      border-right: 1px solid rgba(148,163,184,.16);
      box-shadow: 18px 0 50px rgba(0,0,0,.34);
    }
    .brand {
      padding: 25px 22px;
      display: grid;
      grid-template-columns: 34px 1fr;
      column-gap: 13px;
      align-items: center;
    }
    .brand::before {
      content: "CC";
      display: grid;
      place-items: center;
      width: 34px;
      height: 34px;
      border-radius: 8px;
      color: #031008;
      font-weight: 1000;
      background: linear-gradient(135deg, #2ff578, #0fb14e);
      box-shadow: 0 12px 28px rgba(24,216,95,.28);
    }
    .brand strong { font-size: 19px; letter-spacing: 0; }
    .brand span { grid-column: 2; letter-spacing: .11em; }
    .sidebar nav { padding: 18px 10px; gap: 6px; }
    .sidebar a {
      position: relative;
      padding: 13px 14px 13px 46px;
      border-radius: 7px;
      color: #aeb9c6;
      font-size: 14px;
    }
    .sidebar a::before {
      content: "";
      position: absolute;
      left: 17px;
      top: 50%;
      width: 13px;
      height: 13px;
      transform: translateY(-50%);
      border: 1px solid currentColor;
      border-radius: 4px;
      opacity: .85;
    }
    .sidebar a.active {
      color: #2ff578;
      background: linear-gradient(90deg, rgba(24,216,95,.22), rgba(24,216,95,.055));
      box-shadow: inset 3px 0 0 #18d85f, inset 0 1px 0 rgba(255,255,255,.04);
    }
    .sidebar a.active::before { background: currentColor; box-shadow: 0 0 18px rgba(24,216,95,.5); }
    .sidebar-footer { border-color: rgba(148,163,184,.14); }
    .profile b { color: #fff; }
    .main { margin-left: 244px; padding: 20px 28px 38px; }
    .app-toolbar {
      position: sticky;
      top: 0;
      z-index: 8;
      display: grid;
      grid-template-columns: minmax(240px, 520px) 1fr auto;
      gap: 14px;
      align-items: center;
      margin: -20px -28px 24px;
      padding: 16px 28px;
      border-bottom: 1px solid rgba(148,163,184,.14);
      background: rgba(5, 10, 15, .76);
      backdrop-filter: blur(18px);
    }
    .command-search {
      display: grid;
      grid-template-columns: 18px 1fr auto;
      align-items: center;
      gap: 10px;
      min-height: 44px;
      padding: 0 12px;
      border: 1px solid rgba(148,163,184,.18);
      border-radius: 8px;
      background: linear-gradient(180deg, rgba(18,30,40,.88), rgba(9,17,24,.88));
      color: #708195;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
    }
    .command-search input {
      min-height: 0;
      padding: 0;
      border: 0;
      background: transparent;
      box-shadow: none;
    }
    .command-search > span[aria-hidden="true"] {
      width: 14px;
      height: 14px;
      border: 2px solid #708195;
      border-radius: 50%;
      position: relative;
    }
    .command-search > span[aria-hidden="true"]::after {
      content: "";
      position: absolute;
      width: 7px;
      height: 2px;
      right: -6px;
      bottom: -4px;
      border-radius: 999px;
      background: #708195;
      transform: rotate(45deg);
    }
    .keycap {
      padding: 4px 7px;
      border: 1px solid rgba(148,163,184,.20);
      border-radius: 5px;
      color: #8da0b4;
      font-size: 11px;
      background: rgba(255,255,255,.035);
    }
    .toolbar-spacer { min-width: 1px; }
    .toolbar-profile {
      display: flex;
      align-items: center;
      gap: 12px;
      color: #dbe7f2;
      font-size: 13px;
      text-align: right;
    }
    .toolbar-profile strong, .toolbar-profile small { display: block; }
    .toolbar-profile small { color: #7f91a5; text-transform: capitalize; margin-top: 3px; }
    .avatar {
      display: grid;
      place-items: center;
      width: 42px;
      height: 42px;
      border: 1px solid rgba(148,163,184,.20);
      border-radius: 50%;
      color: #fff;
      background: linear-gradient(180deg, #182736, #0a121a);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
    }
    .page-head { margin-bottom: 18px; }
    .page-head h1 { font-size: clamp(28px, 3vw, 38px); letter-spacing: 0; }
    .page-head p { color: #9aabbd; }
    .panel, .stat {
      border-color: rgba(148,163,184,.18);
      border-radius: 8px;
      background:
        linear-gradient(180deg, rgba(16,29,39,.82), rgba(7,15,22,.82));
      box-shadow: var(--shadow);
      backdrop-filter: blur(18px);
    }
    .panel { padding: 18px; margin-bottom: 16px; }
    .stat {
      position: relative;
      min-height: 118px;
      padding: 20px;
      overflow: hidden;
    }
    .stat::after {
      content: "";
      position: absolute;
      inset: auto 16px 14px 16px;
      height: 1px;
      background: linear-gradient(90deg, rgba(24,216,95,.55), transparent);
      opacity: .55;
    }
    .stat:nth-child(2n)::after { background: linear-gradient(90deg, rgba(52,120,255,.55), transparent); }
    .stat:nth-child(3n)::after { background: linear-gradient(90deg, rgba(246,179,26,.55), transparent); }
    .stat span {
      color: #91a4b8;
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: .04em;
    }
    .stat b { color: #f4f9ff; font-size: clamp(25px, 2.2vw, 34px); letter-spacing: 0; }
    .btn {
      min-height: 38px;
      border: 1px solid rgba(148,163,184,.16);
      border-radius: 7px;
      color: #e8f2fb;
      background: linear-gradient(180deg, rgba(26,39,52,.96), rgba(12,21,30,.96));
      box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 12px 24px rgba(0,0,0,.20);
    }
    .btn.primary, .btn.good-bg {
      color: #021007;
      border-color: rgba(47,245,120,.72);
      background: linear-gradient(180deg, #31f47b, #0db84e);
      box-shadow: 0 0 0 1px rgba(24,216,95,.18), 0 18px 30px rgba(24,216,95,.20);
    }
    .btn.danger {
      color: #fff;
      border-color: rgba(255,77,91,.45);
      background: linear-gradient(180deg, #ff6673, #c92535);
      box-shadow: 0 18px 30px rgba(255,77,91,.16);
    }
    .btn.subtle {
      color: #d7e4ef;
      background: linear-gradient(180deg, rgba(22,34,45,.96), rgba(9,18,26,.96));
    }
    .filters {
      grid-template-columns: repeat(5, minmax(145px, 1fr));
      border-color: rgba(148,163,184,.16);
    }
    .filters > * { min-width: 0; }
    table {
      color: #dce8f2;
      border-collapse: collapse;
      font-size: 13px;
    }
    th {
      color: #8ea2b7;
      background: rgba(255,255,255,.035);
      border-bottom: 1px solid rgba(148,163,184,.16);
      letter-spacing: .04em;
    }
    th, td { padding: 13px 12px; border-bottom: 1px solid rgba(148,163,184,.12); }
    tbody tr:hover {
      background: rgba(24,216,95,.055);
      box-shadow: none;
    }
    td small { color: #7f91a5; }
    .pill {
      border: 1px solid rgba(24,216,95,.22);
      border-radius: 5px;
      color: #2ff578;
      background: rgba(24,216,95,.12);
      box-shadow: none;
    }
    .pill.sold {
      border-color: rgba(148,163,184,.20);
      color: #aab8c8;
      background: rgba(148,163,184,.12);
    }
    .pill.transit {
      border-color: rgba(52,120,255,.34);
      color: #72a2ff;
      background: rgba(52,120,255,.13);
    }
    .flash {
      color: #b9d8ff;
      border-color: rgba(52,120,255,.25);
      background: rgba(52,120,255,.10);
    }
    .flash.success {
      color: #b8ffd3;
      border-color: rgba(24,216,95,.28);
      background: rgba(24,216,95,.10);
    }
    .flash.error {
      color: #ffd1d6;
      border-color: rgba(255,77,91,.30);
      background: rgba(255,77,91,.10);
    }
    .chart {
      border: 1px solid rgba(148,163,184,.10);
      border-radius: 8px;
      background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
    }
    .bar-row {
      grid-template-columns: minmax(92px, 132px) 1fr 44px;
      color: #dce8f2;
      font-size: 13px;
    }
    .bar-row i { background: linear-gradient(90deg, #21d46b, #3478ff); box-shadow: 0 0 18px rgba(24,216,95,.18); }
    .modal { background: rgba(0,0,0,.72); }
    .modal-card {
      color: #eaf2fb;
      border: 1px solid rgba(148,163,184,.18);
      border-radius: 10px;
      background: linear-gradient(180deg, rgba(15,27,38,.98), rgba(6,13,20,.98));
    }
    .modal-close {
      color: #dce8f2;
      background: rgba(255,255,255,.06);
      box-shadow: none;
    }
    .calc-total, .payment-amounts div {
      border-color: rgba(148,163,184,.16);
      background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
    }
    .payment-card {
      border-color: rgba(148,163,184,.16);
      border-radius: 8px;
      background: linear-gradient(180deg, rgba(14,26,36,.86), rgba(7,15,22,.86));
      box-shadow: var(--shadow);
    }
    .payment-progress { background: rgba(148,163,184,.14); }
    .payment-progress div { background: linear-gradient(90deg, #21d46b, #3478ff); }
    .audit-detail {
      color: #c9d7e4;
      border-color: rgba(148,163,184,.14);
      background: rgba(0,0,0,.18);
    }
    .list li { border-color: rgba(148,163,184,.12); }
    .link { color: #39e97a; }
    .danger-zone {
      border-color: rgba(255,77,91,.30);
      background: linear-gradient(180deg, rgba(48,18,24,.82), rgba(18,8,12,.82));
    }
    @media (max-width: 1100px) {
      .app-toolbar { grid-template-columns: 1fr auto; }
      .toolbar-spacer { display: none; }
    }
    @media (max-width: 860px) {
      .mobile-topbar { background: rgba(5,10,15,.92); backdrop-filter: blur(18px); }
      .main { margin-left: 0; padding: 16px 12px 28px; overflow-x: hidden; }
      .app-toolbar { margin: -16px -12px 18px; padding: 12px; grid-template-columns: 1fr; }
      .toolbar-profile { justify-content: space-between; text-align: left; }
      .sidebar { width: min(86vw, 312px); }
      .split-actions { align-items: stretch; flex-direction: column; }
      .filters {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        gap: 11px;
        overflow: hidden;
      }
      .filters .btn,
      .filters button,
      .filters a {
        width: 100%;
      }
      input,
      select,
      textarea {
        font-size: 16px;
      }
      .table-wrap {
        width: calc(100% + 24px);
        max-width: calc(100% + 24px);
        margin-left: -12px;
        margin-right: -12px;
      }
    }

    /* Professional analytics refresh: light, calm, operational */
    :root {
      --bg: #eef4f8;
      --ink: #172033;
      --muted: #667085;
      --line: #d8e0ea;
      --card: #ffffff;
      --primary: #176b87;
      --primary-dark: #0f4c64;
      --good: #0f9f6e;
      --danger: #d64550;
      --warning: #d99010;
      --blue: #315fc9;
      --shadow: 0 18px 40px rgba(26, 40, 58, .10);
      color-scheme: light;
    }
    body {
      color: var(--ink);
      background:
        linear-gradient(120deg, rgba(23,107,135,.12), transparent 28rem),
        radial-gradient(circle at 88% 2%, rgba(49,95,201,.10), transparent 26rem),
        linear-gradient(180deg, #f7fbfd 0%, #edf4f8 45%, #e8f0f6 100%);
    }
    body::before { opacity: .25; background-image: linear-gradient(rgba(23,32,51,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(23,32,51,.04) 1px, transparent 1px); }
    input, select, textarea {
      color: #172033;
      border-color: #d8e0ea;
      background: linear-gradient(180deg, #fff, #f8fbfd);
      box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 1px 2px rgba(26,40,58,.04);
    }
    input::placeholder, textarea::placeholder { color: #8a98a8; }
    input:focus, select:focus, textarea:focus {
      border-color: #176b87;
      box-shadow: 0 0 0 4px rgba(23,107,135,.12), 0 10px 24px rgba(26,40,58,.08);
    }
    label { color: #506175; }
    .login-shell {
      background:
        radial-gradient(circle at 18% 15%, rgba(23,107,135,.20), transparent 26rem),
        linear-gradient(145deg, #e9f2f6, #f9fbfd);
    }
    .login-card {
      color: #172033;
      border-color: rgba(216,224,234,.9);
      background: rgba(255,255,255,.94);
      box-shadow: 0 28px 70px rgba(26,40,58,.18);
    }
    .login-icon {
      color: #fff;
      background: linear-gradient(135deg, #176b87, #0f9f6e);
      box-shadow: 0 14px 30px rgba(23,107,135,.20);
    }
    .sidebar {
      background: linear-gradient(180deg, #102a43, #0b1e31);
      border-right-color: rgba(255,255,255,.10);
      box-shadow: 16px 0 38px rgba(16,42,67,.18);
    }
    .brand::before {
      color: #fff;
      background: linear-gradient(135deg, #34b3a0, #176b87);
      box-shadow: 0 10px 22px rgba(52,179,160,.20);
    }
    .sidebar a { color: #c8d4df; }
    .sidebar a.active {
      color: #fff;
      background: linear-gradient(90deg, rgba(52,179,160,.28), rgba(255,255,255,.06));
      box-shadow: inset 3px 0 0 #34b3a0;
    }
    .sidebar a.active::before { background: #34b3a0; box-shadow: none; }
    .profile b { color: #fff; }
    .app-toolbar {
      border-bottom-color: rgba(216,224,234,.90);
      background: rgba(247,251,253,.82);
      box-shadow: 0 12px 26px rgba(26,40,58,.06);
    }
    .command-search {
      border-color: #d8e0ea;
      background: rgba(255,255,255,.88);
      color: #8392a4;
      box-shadow: 0 8px 24px rgba(26,40,58,.06);
    }
    .keycap { color: #738196; border-color: #d8e0ea; background: #f4f8fb; }
    .toolbar-profile { color: #172033; }
    .toolbar-profile small { color: #667085; }
    .avatar {
      color: #fff;
      border-color: #d8e0ea;
      background: linear-gradient(135deg, #176b87, #315fc9);
    }
    .page-head h1 { color: #172033; }
    .page-head p { color: #667085; }
    .panel, .stat {
      border-color: rgba(216,224,234,.88);
      background: rgba(255,255,255,.92);
      box-shadow: var(--shadow);
      backdrop-filter: blur(14px);
    }
    .stat::after { background: linear-gradient(90deg, rgba(23,107,135,.55), transparent); }
    .stat:nth-child(2n)::after { background: linear-gradient(90deg, rgba(49,95,201,.55), transparent); }
    .stat:nth-child(3n)::after { background: linear-gradient(90deg, rgba(15,159,110,.55), transparent); }
    .stat span { color: #667085; }
    .stat b { color: #172033; }
    .btn {
      color: #172033;
      border-color: #d8e0ea;
      background: linear-gradient(180deg, #fff, #edf3f7);
      box-shadow: 0 4px 0 #cbd7e2, 0 12px 22px rgba(26,40,58,.08);
    }
    .btn.primary, .btn.good-bg {
      color: #fff;
      border-color: #176b87;
      background: linear-gradient(180deg, #1f7f9d, #176b87);
      box-shadow: 0 4px 0 #0f4c64, 0 14px 24px rgba(23,107,135,.18);
    }
    .btn.danger { border-color: #d64550; background: linear-gradient(180deg, #ef6470, #d64550); }
    .btn.subtle { color: #344054; background: linear-gradient(180deg, #fff, #f1f6f9); }
    table { color: #243247; background: #fff; }
    th { color: #667085; background: #f5f8fb; border-bottom-color: #dfe7ef; }
    th, td { border-bottom-color: #e7edf3; }
    tbody tr:hover { background: #f7fbfd; }
    td small { color: #667085; }
    .pill {
      color: #0b7552;
      border-color: rgba(15,159,110,.22);
      background: rgba(15,159,110,.10);
    }
    .pill.sold { color: #667085; border-color: #d8e0ea; background: #eef3f7; }
    .pill.transit { color: #315fc9; border-color: rgba(49,95,201,.25); background: rgba(49,95,201,.09); }
    .flash { color: #176b87; border-color: rgba(23,107,135,.22); background: rgba(23,107,135,.08); }
    .flash.success { color: #0b7552; border-color: rgba(15,159,110,.22); background: rgba(15,159,110,.08); }
    .flash.error { color: #b4232e; border-color: rgba(214,69,80,.22); background: rgba(214,69,80,.08); }
    .chart { border-color: #e2e9f0; background: #fff; }
    .chart-panel,
    .company-row,
    .panel.table-wrap {
      animation: panelIn .46s cubic-bezier(.2, .9, .2, 1) both;
    }
    .chart-panel:nth-child(2) { animation-delay: .06s; }
    .chart-panel:nth-child(3) { animation-delay: .12s; }
    .chart {
      opacity: 0;
      animation: chartIn .58s ease .12s forwards;
    }
    .bar-row { color: #344054; }
    .bar-row i { background: linear-gradient(90deg, #176b87, #34b3a0); box-shadow: none; }
    .modal-card {
      color: #172033;
      border-color: #d8e0ea;
      background: #fff;
      box-shadow: 0 34px 90px rgba(26,40,58,.22);
    }
    .modal-close { color: #344054; background: #eef3f7; }
    .calc-total, .payment-amounts div {
      border-color: #e2e9f0;
      background: #f7fbfd;
    }
    .payment-card {
      border-color: #e2e9f0;
      background: #fff;
      box-shadow: 0 14px 32px rgba(26,40,58,.08);
    }
    .payment-progress { background: #e7edf3; }
    .payment-progress div { background: linear-gradient(90deg, #176b87, #34b3a0); }
    .audit-detail { color: #344054; border-color: #e2e9f0; background: #f7fbfd; }
    .list li { border-color: #e7edf3; }
    .link { color: #176b87; }
    .danger-zone { border-color: rgba(214,69,80,.24); background: #fff8f8; }
    .analytics-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
      gap: 16px;
      margin-bottom: 18px;
    }
    .kpi-card {
      position: relative;
      min-height: 156px;
      padding: 18px;
      overflow: hidden;
      border: 1px solid rgba(216,224,234,.90);
      border-radius: 10px;
      background: linear-gradient(180deg, #fff, #f8fbfd);
      box-shadow: 0 14px 34px rgba(26,40,58,.08);
      opacity: 0;
      transform: translateY(12px) scale(.985);
      animation: cardIn .48s cubic-bezier(.2, .9, .2, 1) forwards;
      transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    }
    .kpi-card:nth-child(2) { animation-delay: .04s; }
    .kpi-card:nth-child(3) { animation-delay: .08s; }
    .kpi-card:nth-child(4) { animation-delay: .12s; }
    .kpi-card:nth-child(5) { animation-delay: .16s; }
    .kpi-card:hover {
      transform: translateY(-4px);
      border-color: var(--accent, #176b87);
      box-shadow: 0 22px 46px rgba(26,40,58,.14);
    }
    .kpi-card::before {
      content: "";
      position: absolute;
      inset: 0 0 auto;
      height: 4px;
      background: var(--accent, #176b87);
      transform-origin: left;
      animation: scaleIn .62s cubic-bezier(.2, .9, .2, 1) forwards;
    }
    .kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
    .kpi-label { color: #667085; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
    .kpi-icon {
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      border-radius: 8px;
      color: var(--accent, #176b87);
      background: #edf7f8;
      font-weight: 1000;
    }
    .kpi-value { font-size: clamp(22px, 1.75vw, 28px); font-weight: 1000; color: #172033; letter-spacing: 0; line-height: 1.08; white-space: nowrap; }
    .kpi-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 5px; color: #667085; font-size: 12px; font-weight: 800; }
    .sparkline { display: flex; align-items: end; gap: 4px; height: 34px; margin-top: 18px; }
    .sparkline i {
      flex: 1;
      min-width: 4px;
      border-radius: 4px 4px 0 0;
      background: linear-gradient(180deg, var(--accent, #176b87), #cfe5ea);
      opacity: .85;
      transform-origin: bottom;
      animation: barGrow .72s cubic-bezier(.2, .9, .2, 1) forwards;
      transform: scaleY(.18);
    }
    .sparkline i:nth-child(2) { animation-delay: .04s; }
    .sparkline i:nth-child(3) { animation-delay: .08s; }
    .sparkline i:nth-child(4) { animation-delay: .12s; }
    .sparkline i:nth-child(5) { animation-delay: .16s; }
    .sparkline i:nth-child(6) { animation-delay: .20s; }
    .sparkline i:nth-child(7) { animation-delay: .24s; }
    .chart-grid {
      display: grid;
      grid-template-columns: 1.2fr .8fr .9fr;
      gap: 16px;
      margin-bottom: 18px;
    }
    .chart-panel { min-height: 360px; }
    .chart-panel .chart { height: 270px; }
    .panel-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
    .panel-title h2 { margin-bottom: 4px; }
    .panel-title p { color: #667085; margin-bottom: 0; font-size: 13px; }
    .metric-list { display: grid; gap: 12px; margin-top: 12px; }
    .horizontal-metric {
      display: grid;
      grid-template-columns: minmax(96px, 1fr) 2fr auto;
      gap: 10px;
      align-items: center;
      color: #344054;
      font-size: 13px;
      font-weight: 800;
    }
    .metric-track {
      height: 10px;
      overflow: hidden;
      border-radius: 999px;
      background: #e7edf3;
    }
    .metric-track i {
      display: block;
      height: 100%;
      width: var(--w, 0%);
      border-radius: inherit;
      background: var(--accent, #176b87);
      transform-origin: left;
      animation: scaleIn .72s cubic-bezier(.2, .9, .2, 1) forwards;
    }
    .company-analytics {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
      margin-bottom: 18px;
    }
    .company-row {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 12px;
      padding: 14px;
      border: 1px solid #e2e9f0;
      border-radius: 9px;
      background: #fff;
    }
    .company-row h3 { margin-bottom: 4px; }
    .company-row p { margin-bottom: 0; color: #667085; font-size: 13px; }
    .company-row strong { color: #172033; font-size: 20px; }
    @media (max-width: 1180px) {
      .analytics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .chart-grid { grid-template-columns: 1fr; }
    }
    @media (max-width: 860px) {
      .analytics-grid, .company-analytics { grid-template-columns: 1fr; }
      .kpi-card { min-height: 132px; }
      .chart-panel .chart { height: 230px; }
      .horizontal-metric { grid-template-columns: 1fr; }
    }
    @keyframes cardIn {
      to { opacity: 1; transform: translateY(0) scale(1); }
    }
    @keyframes barGrow {
      to { transform: scaleY(1); }
    }
    @keyframes scaleIn {
      from { transform: scaleX(0); }
      to { transform: scaleX(1); }
    }
    @keyframes panelIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes chartIn {
      to { opacity: 1; }
    }
    @media (prefers-reduced-motion: reduce) {
      .kpi-card,
      .kpi-card::before,
      .sparkline i,
      .metric-track i,
      .chart-panel,
      .company-row,
      .panel.table-wrap,
      .chart {
        animation: none;
        opacity: 1;
        transform: none;
      }
    }

    /* Supplied screenshot fidelity layer */
    :root {
      --bg: #050b10;
      --ink: #f2f7fb;
      --muted: #8b9aaa;
      --line: rgba(130, 153, 171, .20);
      --card: #0c171f;
      --primary: #19c85a;
      --primary-dark: #0a8d3a;
      --good: #19c85a;
      --danger: #ef4444;
      --warning: #f5b31a;
      --blue: #2e63ff;
      --shadow: 0 18px 42px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.035);
      color-scheme: dark;
    }
    body {
      color: var(--ink);
      background:
        radial-gradient(circle at 72% -10%, rgba(20, 58, 86, .20), transparent 34rem),
        linear-gradient(180deg, #050b10 0%, #071017 45%, #050a0f 100%);
    }
    body::before {
      opacity: .45;
      background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
      background-size: 44px 44px;
    }
    .sidebar {
      width: 220px;
      background: linear-gradient(180deg, #08131b, #050b10);
      border-right: 1px solid rgba(139,154,170,.22);
      box-shadow: none;
    }
    .brand {
      min-height: 76px;
      padding: 18px 20px;
      border-bottom: 1px solid rgba(139,154,170,.18);
    }
    .brand::before {
      content: "CC";
      width: 38px;
      height: 38px;
      border-radius: 9px;
      color: #eafff0;
      background: linear-gradient(135deg, #25e263, #087b35);
      box-shadow: 0 0 24px rgba(25,200,90,.24);
    }
    .brand strong { font-size: 20px; }
    .brand span { color: #8898a8; letter-spacing: .13em; }
    .sidebar nav { padding: 14px 4px 20px; gap: 8px; }
    .sidebar a {
      height: 46px;
      margin: 0 4px;
      padding: 0 18px 0 56px;
      display: flex;
      align-items: center;
      border-radius: 6px;
      color: #b9c3cf;
      font-size: 14px;
      font-weight: 800;
      transition: background .18s ease, color .18s ease, transform .18s ease;
    }
    .sidebar a::before {
      left: 23px;
      width: 15px;
      height: 15px;
      border-radius: 4px;
      color: #9babba;
      opacity: 1;
    }
    .sidebar a:hover { color: #fff; background: rgba(255,255,255,.045); }
    .sidebar a.active {
      color: #19f06b;
      background: linear-gradient(90deg, rgba(25,200,90,.34), rgba(25,200,90,.11));
      box-shadow: inset 4px 0 0 #19c85a;
    }
    .sidebar a.active::before { background: transparent; border-color: #19f06b; box-shadow: none; }
    .sidebar-footer {
      padding: 14px;
      border-top: 1px solid rgba(139,154,170,.16);
    }
    .sidebar-footer .btn {
      color: #071017;
      background: #f6f8fb;
      border-color: transparent;
      box-shadow: 0 3px 0 rgba(139,154,170,.50);
    }
    .main {
      margin-left: 220px;
      padding: 18px 28px 26px;
      background: transparent;
    }
    .app-toolbar {
      height: 58px;
      margin: -18px -28px 18px;
      padding: 0 28px;
      display: grid;
      grid-template-columns: 36px minmax(280px, 400px) 1fr auto auto auto;
      gap: 14px;
      align-items: center;
      background: rgba(5, 11, 16, .78);
      border-bottom: 1px solid rgba(139,154,170,.18);
      box-shadow: none;
      backdrop-filter: blur(14px);
    }
    .toolbar-menu {
      width: 36px;
      height: 36px;
      display: grid;
      place-content: center;
      gap: 4px;
      border: 0;
      background: transparent;
      color: #d7e1eb;
      cursor: pointer;
    }
    .toolbar-menu span {
      width: 18px;
      height: 2px;
      border-radius: 999px;
      background: currentColor;
    }
    .command-search {
      height: 38px;
      min-height: 38px;
      border: 1px solid rgba(139,154,170,.25);
      border-radius: 6px;
      background: linear-gradient(180deg, rgba(18,30,40,.86), rgba(10,18,25,.86));
      color: #81909f;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    }
    .command-search input { color: #d9e3ec; font-size: 13px; }
    .command-search > span[aria-hidden="true"] { border-color: #81909f; }
    .command-search > span[aria-hidden="true"]::after { background: #81909f; }
    .keycap {
      padding: 3px 7px;
      color: #99a7b5;
      border-color: rgba(139,154,170,.24);
      background: rgba(0,0,0,.20);
    }
    .toolbar-actions { display: flex; gap: 12px; align-items: center; }
    .top-action {
      height: 38px;
      padding: 0 17px;
      border: 1px solid rgba(139,154,170,.28);
      border-radius: 6px;
      color: #eaf1f7;
      background: linear-gradient(180deg, rgba(13,22,30,.95), rgba(7,13,19,.95));
      font-weight: 900;
      cursor: pointer;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    }
    .top-action.primary {
      color: #18f369;
      border-color: #0fb84b;
      background: rgba(6,34,19,.50);
    }
    .toolbar-mini { position: relative; display: flex; align-items: center; gap: 10px; }
    .round-action {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      border: 1px solid rgba(139,154,170,.28);
      color: #dce5ee;
      background: transparent;
      font-weight: 900;
    }
    .notify-dot {
      position: absolute;
      top: -5px;
      left: 23px;
      z-index: 1;
      display: grid;
      place-items: center;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      color: #fff;
      background: #ef233c;
      font-size: 10px;
      font-weight: 900;
    }
    .toolbar-profile { color: #f4f8fb; }
    .toolbar-profile small { color: #9aa8b6; text-transform: none; }
    .avatar {
      color: #dce8f2;
      background: #101d29;
      border-color: rgba(139,154,170,.34);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    }
    .page-head {
      margin: 8px 0 18px;
      display: grid;
      grid-template-columns: 1fr auto;
      align-items: end;
    }
    .page-head h1 {
      color: #f6f9fc;
      font-size: 24px;
      line-height: 1.1;
      margin-bottom: 6px;
    }
    .page-head p { color: #9eacba; font-size: 14px; }
    .dashboard-date {
      display: flex;
      align-items: center;
      gap: 16px;
      color: #9eacba;
      font-size: 12px;
      font-weight: 800;
    }
    .date-range {
      min-width: 198px;
      height: 42px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      padding: 0 14px;
      border: 1px solid rgba(139,154,170,.30);
      border-radius: 7px;
      color: #eaf1f7;
      background: rgba(10,18,25,.78);
    }
    .date-range span {
      color: #8a98a8;
      font-size: 11px;
      font-weight: 900;
    }
    .date-range input {
      min-width: 128px;
      padding: 0;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      box-shadow: none;
    }
    .date-range input:focus {
      outline: 0;
    }
    .dashboard-date .table-tool {
      height: 42px;
    }
    .analytics-grid.reference-kpis {
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap: 14px;
      margin-bottom: 16px;
    }
    .kpi-card {
      min-height: 118px;
      padding: 16px;
      border-color: rgba(139,154,170,.20);
      border-radius: 7px;
      background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent, #19c85a) 24%, transparent), transparent 58%),
        linear-gradient(180deg, rgba(17,30,40,.84), rgba(8,16,23,.84));
      box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
    }
    .kpi-card::before { display: none; }
    .kpi-card:hover { border-color: var(--accent, #19c85a); box-shadow: 0 12px 34px rgba(0,0,0,.22); }
    .kpi-top { margin-bottom: 14px; }
    .kpi-label {
      color: var(--accent, #19c85a);
      font-size: 13px;
      text-transform: none;
      letter-spacing: 0;
    }
    .kpi-value {
      color: #f6f9fc;
      font-size: clamp(24px, 2vw, 30px);
    }
    .kpi-meta {
      margin-top: 7px;
      color: #a7b4c1;
      font-size: 13px;
      font-weight: 500;
    }
    .kpi-meta span:last-child { color: #19e765; font-weight: 900; }
    .sparkline { display: none; }
    .reference-charts {
      display: grid;
      grid-template-columns: .95fr 1.1fr 1.15fr;
      gap: 14px;
      margin-bottom: 14px;
    }
    .panel,
    .chart-panel,
    .payment-card {
      color: #dce5ee;
      border-color: rgba(139,154,170,.20);
      border-radius: 7px;
      background: linear-gradient(180deg, rgba(16,29,38,.84), rgba(8,16,23,.86));
      box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
    }
    .chart-panel { min-height: 226px; padding: 16px; }
    .chart-panel .chart { height: 166px; }
    .panel-title h2, .panel h2 { color: #f2f7fb; font-size: 16px; }
    .panel-title p { color: #95a4b2; }
    .chart {
      border-color: transparent;
      background: transparent;
      border-radius: 6px;
    }
    .metric-list { gap: 17px; margin-top: 26px; }
    .horizontal-metric {
      grid-template-columns: 78px 1fr 104px;
      color: #d9e4ed;
      font-weight: 700;
    }
    .metric-track { height: 16px; border-radius: 0; background: rgba(139,154,170,.14); }
    .metric-track i { border-radius: 0; }
    .dashboard-lower {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 254px;
      gap: 14px;
    }
    .latest-table-panel { min-height: 430px; }
    .latest-table-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 10px;
    }
    .latest-table-actions { display: flex; gap: 10px; align-items: center; }
    .latest-table-actions .btn { height: 34px; padding: 0 12px; font-size: 12px; box-shadow: none; }
    .latest-table-actions .btn.primary { background: linear-gradient(180deg, #1bd663, #0eb04b); color: #eafff0; }
    .dashboard-table {
      min-width: 980px;
      background: transparent;
      color: #cbd8e4;
      font-size: 12px;
    }
    .dashboard-table th {
      color: #a8b5c2;
      background: rgba(255,255,255,.035);
      border: 1px solid rgba(139,154,170,.14);
      padding: 10px;
    }
    .dashboard-table td {
      border: 1px solid rgba(139,154,170,.12);
      padding: 9px 10px;
    }
    .dashboard-table tbody tr:hover { background: rgba(25,200,90,.055); }
    .mobile-inventory-list {
      display: none;
    }
    .mobile-inventory-card {
      padding: 14px;
      border: 1px solid rgba(139,154,170,.18);
      border-radius: 7px;
      background: rgba(9,18,25,.72);
    }
    .mobile-inventory-card + .mobile-inventory-card {
      margin-top: 10px;
    }
    .mobile-inventory-card-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      color: #a7b4c1;
      font-size: 11px;
      font-weight: 900;
    }
    .mobile-inventory-card h3 {
      margin: 10px 0 12px;
      color: #f2f7fb;
      font-size: 15px;
      line-height: 1.25;
    }
    .mobile-inventory-card dl {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin: 0;
    }
    .mobile-inventory-card dt {
      color: #7f90a1;
      font-size: 10px;
      font-weight: 900;
      letter-spacing: .05em;
      text-transform: uppercase;
    }
    .mobile-inventory-card dd {
      margin: 4px 0 0;
      color: #dce5ee;
      font-size: 12px;
      overflow-wrap: anywhere;
    }
    .status-badge,
    .condition-badge {
      display: inline-flex;
      align-items: center;
      min-height: 22px;
      padding: 0 8px;
      border-radius: 4px;
      font-size: 11px;
      font-weight: 900;
    }
    .status-badge.available,
    .condition-badge.excellent { color: #19f06b; background: rgba(25,200,90,.16); }
    .status-badge.transit,
    .condition-badge.good { color: #7ca8ff; background: rgba(46,99,255,.18); }
    .status-badge.sold { color: #c3ced8; background: rgba(139,154,170,.16); }
    .dashboard-pagination {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      margin-top: 12px;
      color: #9eacba;
      font-size: 12px;
    }
    .page-pills { display: flex; gap: 8px; align-items: center; }
    .page-pills span,
    .page-pills button {
      display: grid;
      place-items: center;
      min-width: 32px;
      height: 32px;
      border: 1px solid rgba(139,154,170,.18);
      border-radius: 6px;
      color: #b8c5d2;
      background: rgba(255,255,255,.04);
      font: inherit;
      cursor: pointer;
    }
    .page-pills button:disabled { opacity: .45; cursor: not-allowed; }
    .page-pills .active { color: #19f06b; border-color: #19c85a; }
    .activity-panel { padding: 16px; }
    .activity-list {
      display: grid;
      gap: 18px;
      margin-top: 18px;
    }
    .activity-item {
      display: grid;
      grid-template-columns: 34px 1fr;
      gap: 12px;
      align-items: start;
    }
    .activity-icon {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      display: grid;
      place-items: center;
      color: #fff;
      background: #0f6c34;
      font-size: 13px;
      font-weight: 1000;
    }
    .activity-item:nth-child(2) .activity-icon { background: #1f54b8; }
    .activity-item:nth-child(3) .activity-icon { background: #0f6c34; }
    .activity-item:nth-child(4) .activity-icon { background: #8d292f; }
    .activity-item:nth-child(5) .activity-icon { background: #223144; }
    .activity-item b { display: block; color: #f2f7fb; font-size: 13px; }
    .activity-item span { color: #9eacba; font-size: 12px; }
    table { color: #cbd8e4; background: transparent; }
    th { color: #a8b5c2; background: rgba(255,255,255,.035); border-bottom-color: rgba(139,154,170,.14); }
    th, td { border-bottom-color: rgba(139,154,170,.12); }
    tbody tr:hover { background: rgba(25,200,90,.055); }
    td small { color: #8e9eae; }
    .pill { color: #19f06b; border-color: rgba(25,200,90,.24); background: rgba(25,200,90,.12); }
    .pill.sold { color: #c3ced8; border-color: rgba(139,154,170,.24); background: rgba(139,154,170,.13); }
    .pill.transit { color: #7ca8ff; border-color: rgba(46,99,255,.30); background: rgba(46,99,255,.16); }
    .btn {
      color: #eaf1f7;
      border-color: rgba(139,154,170,.26);
      background: rgba(13,22,30,.78);
      box-shadow: none;
    }
    .btn.primary,
    .btn.good-bg { color: #eafff0; border-color: #0fb84b; background: linear-gradient(180deg, #1bd663, #0eb04b); box-shadow: none; }
    input, select, textarea {
      color: #e6eef6;
      border-color: rgba(139,154,170,.26);
      background: rgba(8,16,23,.88);
    }
    .modal-card { color: #e6eef6; background: #0c171f; border-color: rgba(139,154,170,.24); }
    @media (max-width: 1180px) {
      .analytics-grid.reference-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .reference-charts,
      .dashboard-lower { grid-template-columns: 1fr; }
      .activity-panel { min-height: auto; }
    }
    @media (max-width: 860px) {
      .main { margin-left: 0; padding: 14px 12px 24px; }
      .app-toolbar {
        height: auto;
        margin: -14px -12px 16px;
        padding: 12px;
        grid-template-columns: 38px 1fr;
      }
      .toolbar-actions,
      .toolbar-mini,
      .toolbar-profile { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
      .analytics-grid.reference-kpis { grid-template-columns: 1fr; }
      .page-head { grid-template-columns: 1fr; }
      .dashboard-date { flex-direction: column; align-items: flex-start; }
    }

    /* Final reference match: compact premium IMS dashboard */
    .dashboard-ref {
      max-width: 1540px;
      margin: 0 auto;
    }
    .dashboard-ref .page-head {
      margin: 8px 0 18px;
    }
    .reference-kpis .kpi-card {
      position: relative;
      overflow: hidden;
      min-height: 116px;
      padding: 16px;
      border-radius: 6px;
      transform-origin: 50% 100%;
      animation: refCardIn .52s cubic-bezier(.2,.8,.2,1) both;
    }
    .reference-kpis .kpi-card:nth-child(2) { animation-delay: .04s; }
    .reference-kpis .kpi-card:nth-child(3) { animation-delay: .08s; }
    .reference-kpis .kpi-card:nth-child(4) { animation-delay: .12s; }
    .reference-kpis .kpi-card:nth-child(5) { animation-delay: .16s; }
    .reference-kpis .kpi-card:nth-child(6) { animation-delay: .20s; }
    .reference-kpis .kpi-card::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background: radial-gradient(circle at 86% 4%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 34%);
      opacity: .85;
    }
    .reference-kpis .kpi-top,
    .reference-kpis .kpi-value,
    .reference-kpis .kpi-meta { position: relative; z-index: 1; }
    .reference-kpis .kpi-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }
    .reference-kpis .kpi-icon {
      width: 20px;
      height: 20px;
      display: grid;
      place-items: center;
      color: #9cabb9;
      border: 1px solid rgba(156,171,185,.24);
      border-radius: 5px;
      font-size: 11px;
      font-weight: 1000;
      opacity: .9;
    }
    .reference-kpis .kpi-value {
      letter-spacing: 0;
      line-height: 1.1;
    }
    .reference-kpis .kpi-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .trend {
      white-space: nowrap;
      color: var(--accent, #19c85a);
      font-weight: 1000;
      font-size: 12px;
    }
    .trend.warn { color: #ff9f1c; }
    .reference-charts .chart-panel {
      min-height: 226px;
    }
    .chart-legend {
      display: flex;
      justify-content: flex-end;
      gap: 24px;
      margin: -2px 2px 2px;
      color: #9eacba;
      font-size: 12px;
      font-weight: 800;
    }
    .legend-dot {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }
    .legend-dot::before {
      content: "";
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--dot, #19c85a);
    }
    .legend-line::before {
      width: 16px;
      height: 2px;
      border-radius: 999px;
      background: var(--dot, #315cff);
    }
    .latest-table-panel {
      padding: 0;
      overflow: hidden;
    }
    .latest-table-head {
      padding: 14px 14px 10px;
      border-bottom: 1px solid rgba(139,154,170,.14);
    }
    .latest-table-head h2 {
      margin: 0;
      color: #f2f7fb;
      font-size: 15px;
    }
    .table-tool {
      height: 30px;
      padding: 0 10px;
      border: 1px solid rgba(139,154,170,.24);
      border-radius: 5px;
      color: #dce5ee;
      background: rgba(9,17,24,.76);
      font-size: 12px;
      font-weight: 900;
      cursor: pointer;
    }
    .latest-table-actions .table-tool.primary {
      min-width: 112px;
      color: #eafff0;
      border-color: #0fb84b;
      background: linear-gradient(180deg, #1bd663, #0eb04b);
    }
    .dashboard-table-scroller {
      width: 100%;
      overflow-x: auto;
    }
    .dashboard-table {
      width: 100%;
      border-collapse: collapse;
    }
    .dashboard-table .check-cell {
      width: 38px;
      text-align: center;
    }
    .dashboard-table input[type="checkbox"] {
      width: 16px;
      height: 16px;
      accent-color: #19c85a;
    }
    .dashboard-table td:nth-child(2),
    .dashboard-table td:nth-child(3),
    .dashboard-table td:nth-child(8) {
      white-space: nowrap;
    }
    .row-action {
      width: 24px;
      height: 24px;
      display: inline-grid;
      place-items: center;
      vertical-align: middle;
      padding: 0;
      border: 0;
      border-radius: 4px;
      color: #a9b7c5;
      background: transparent;
      cursor: pointer;
      font-size: 12px;
      line-height: 1;
    }
    .row-action:hover {
      color: #19f06b;
      background: rgba(25,200,90,.12);
    }
    .dashboard-pagination {
      padding: 10px 12px 12px;
      border-top: 1px solid rgba(139,154,170,.12);
    }
    .activity-panel {
      min-height: 100%;
    }
    .activity-item b {
      font-weight: 800;
      line-height: 1.25;
    }
    .activity-view {
      width: 112px;
      height: 34px;
      margin: 22px auto 0;
      display: grid;
      place-items: center;
      border: 1px solid rgba(25,200,90,.45);
      border-radius: 5px;
      color: #19f06b;
      background: rgba(25,200,90,.06);
      font-size: 13px;
      font-weight: 1000;
      cursor: pointer;
    }
    .filters {
      max-width: 100%;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    .filters > label,
    .filters input,
    .filters select,
    .filters button {
      min-width: 0;
    }
    .filters .auto-filter-note {
      align-self: end;
    }
    @keyframes refCardIn {
      from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(5px); }
      to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
    }
    @media (min-width: 1500px) {
      .app-toolbar { grid-template-columns: 36px minmax(360px, 520px) 1fr auto auto auto; }
      .reference-charts { grid-template-columns: .96fr 1.13fr 1.17fr; }
      .dashboard-lower { grid-template-columns: minmax(0, 1fr) 254px; }
    }
    @media (max-width: 1320px) {
      .analytics-grid.reference-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .reference-charts { grid-template-columns: 1fr 1fr; }
      .reference-charts .chart-panel:last-child { grid-column: 1 / -1; }
    }
    @media (max-width: 1020px) {
      .reference-charts,
      .dashboard-lower { grid-template-columns: 1fr; }
      .toolbar-actions { grid-column: 1 / -1; }
      .app-toolbar { height: auto; padding-top: 10px; padding-bottom: 10px; }
    }
    @media (max-width: 860px) {
      .dashboard-ref { max-width: 100%; }
      .mobile-topbar { display: none; }
      .sidebar-overlay { display: none; }
      .sidebar-open .sidebar-overlay { display: block; }
      .app-toolbar {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 10px;
      }
      .command-search { min-width: 0; }
      .keycap { display: none; }
      .toolbar-actions,
      .toolbar-mini,
      .toolbar-profile {
        display: none;
      }
      .analytics-grid.reference-kpis { grid-template-columns: 1fr; }
      .latest-table-head {
        align-items: flex-start;
        flex-direction: column;
      }
      .latest-table-actions {
        width: 100%;
        flex-wrap: wrap;
      }
      .latest-table-actions .table-tool.primary { flex: 1 1 130px; }
      .dashboard-table-scroller { display: none; }
      .mobile-inventory-list { display: block; }
      .horizontal-metric {
        grid-template-columns: 86px minmax(120px, 1fr) 96px;
      }
      .main { overflow-x: hidden; }
      .table-wrap { max-width: 100%; }
    }

    /* Light theme override: same dashboard, brighter executive UI */
    :root {
      --bg: #f4f7fb;
      --ink: #111827;
      --muted: #667085;
      --line: rgba(31, 41, 55, .12);
      --card: #ffffff;
      --primary: #16b957;
      --primary-dark: #0c8f3f;
      --good: #12b76a;
      --danger: #e5484d;
      --warning: #f59e0b;
      --blue: #275efe;
      --shadow: 0 14px 34px rgba(15, 23, 42, .08), inset 0 1px 0 rgba(255,255,255,.92);
      --chart-grid: rgba(15, 23, 42, .10);
      --chart-text: #667085;
      --chart-strong: #111827;
      --chart-bar-end: rgba(22,185,87,.20);
      color-scheme: light;
    }
    body {
      color: var(--ink);
      background:
        radial-gradient(circle at 70% -12%, rgba(22, 185, 87, .12), transparent 34rem),
        linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
    }
    body::before {
      opacity: .56;
      background-image:
        linear-gradient(rgba(15,23,42,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15,23,42,.028) 1px, transparent 1px);
    }
    .sidebar {
      background: linear-gradient(180deg, #ffffff, #f4f7fb);
      border-right-color: rgba(15,23,42,.12);
      box-shadow: 8px 0 28px rgba(15,23,42,.05);
    }
    .brand {
      border-bottom-color: rgba(15,23,42,.10);
    }
    .brand strong { color: #111827; }
    .brand span { color: #667085; }
    .brand::before {
      color: #ffffff;
      background: linear-gradient(135deg, #23d267, #0a9340);
      box-shadow: 0 12px 22px rgba(18,183,106,.20);
    }
    .sidebar a {
      color: #4b5563;
      text-shadow: none;
    }
    .sidebar a::before {
      display: none;
      content: none;
    }
    .sidebar .nav-icon {
      position: absolute;
      top: 50%;
      left: 18px;
      width: 24px;
      height: 24px;
      transform: translateY(-50%);
      display: grid;
      place-items: center;
      color: #475467;
      border: 1px solid rgba(15,23,42,.16);
      border-radius: 6px;
      background: #ffffff;
      box-shadow: 0 4px 10px rgba(15,23,42,.06);
    }
    .sidebar .nav-icon svg { width: 15px; height: 15px; stroke-width: 2; }
    .sidebar a:hover {
      color: #111827;
      background: rgba(15,23,42,.045);
    }
    .sidebar a.active {
      color: #0c8f3f;
      background: linear-gradient(90deg, rgba(18,185,87,.18), rgba(18,185,87,.06));
      box-shadow: inset 4px 0 0 #12b76a;
    }
    .sidebar a.active .nav-icon {
      border-color: #12b76a;
      color: #087f3d;
      background: #effdf5;
      box-shadow: inset 0 0 0 1px rgba(18,183,106,.16), 0 6px 14px rgba(18,183,106,.14);
    }
    .sidebar-footer {
      border-top-color: rgba(15,23,42,.10);
      color: #111827;
    }
    .sidebar-footer .profile b,
    .sidebar-footer .profile span { color: #111827; }
    .sidebar-footer .profile span { color: #667085; }
    .sidebar-footer .btn {
      color: #111827;
      background: #ffffff;
      border-color: rgba(15,23,42,.14);
      box-shadow: 0 8px 18px rgba(15,23,42,.08);
    }
    .main {
      background: transparent;
    }
    .app-toolbar {
      background: rgba(255,255,255,.82);
      border-bottom-color: rgba(15,23,42,.10);
      box-shadow: 0 12px 28px rgba(15,23,42,.055);
    }
    .toolbar-menu { color: #344054; }
    .command-search {
      color: #667085;
      border-color: rgba(15,23,42,.13);
      background: linear-gradient(180deg, #ffffff, #f7f9fc);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.96), 0 6px 16px rgba(15,23,42,.045);
    }
    .command-search input {
      color: #111827;
      background: transparent;
    }
    .command-search > span[aria-hidden="true"] { border-color: #667085; }
    .command-search > span[aria-hidden="true"]::after { background: #667085; }
    .keycap {
      color: #475467;
      border-color: rgba(15,23,42,.13);
      background: #eef2f7;
    }
    .top-action {
      color: #111827;
      border-color: rgba(15,23,42,.14);
      background: linear-gradient(180deg, #ffffff, #f4f7fb);
      box-shadow: 0 8px 18px rgba(15,23,42,.065), inset 0 1px 0 rgba(255,255,255,.95);
    }
    .top-action.primary {
      color: #079041;
      border-color: rgba(18,183,106,.45);
      background: #eefdf4;
    }
    .round-action {
      color: #344054;
      border-color: rgba(15,23,42,.13);
      background: #ffffff;
      box-shadow: 0 6px 16px rgba(15,23,42,.06);
    }
    .toolbar-profile { color: #111827; }
    .toolbar-profile small { color: #667085; }
    .avatar {
      color: #111827;
      background: #f8fafc;
      border-color: rgba(15,23,42,.14);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.95);
    }
    .page-head h1,
    .panel-title h2,
    .panel h2,
    .latest-table-head h2,
    .activity-item b {
      color: #111827;
    }
    .page-head p,
    .dashboard-date,
    .panel-title p,
    .chart-legend,
    .activity-item span,
    .dashboard-pagination,
    td small {
      color: #667085;
    }
    .date-range {
      color: #111827;
      border-color: rgba(15,23,42,.14);
      background: #ffffff;
      box-shadow: 0 8px 18px rgba(15,23,42,.06);
    }
    .date-range span {
      color: #667085;
    }
    .panel,
    .chart-panel,
    .payment-card,
    .latest-table-panel,
    .activity-panel {
      color: #344054;
      border-color: rgba(15,23,42,.12);
      background: linear-gradient(180deg, #ffffff, #fbfdff);
      box-shadow: 0 14px 34px rgba(15,23,42,.075), inset 0 1px 0 rgba(255,255,255,.96);
    }
    .reference-kpis .kpi-card {
      border-color: color-mix(in srgb, var(--accent) 24%, rgba(15,23,42,.11));
      background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, transparent), transparent 58%),
        linear-gradient(180deg, #ffffff, #f9fbff);
      box-shadow: 0 14px 30px rgba(15,23,42,.075), inset 0 1px 0 rgba(255,255,255,.96);
    }
    .reference-kpis .kpi-card:hover {
      box-shadow: 0 18px 40px rgba(15,23,42,.10);
    }
    .kpi-value {
      color: #111827;
      text-shadow: none;
    }
    .kpi-meta,
    .reference-kpis .kpi-meta span:first-child {
      color: #667085;
    }
    .reference-kpis .kpi-icon {
      color: #475467;
      border-color: rgba(15,23,42,.13);
      background: rgba(255,255,255,.74);
    }
    .chart {
      background: transparent;
    }
    .metric-track {
      background: #e8edf3;
    }
    .horizontal-metric {
      color: #344054;
    }
    .horizontal-metric strong {
      color: #111827;
    }
    .latest-table-head {
      border-bottom-color: rgba(15,23,42,.10);
      background: rgba(248,250,252,.72);
    }
    .table-tool {
      color: #344054;
      border-color: rgba(15,23,42,.13);
      background: #ffffff;
      box-shadow: 0 6px 14px rgba(15,23,42,.055);
    }
    .latest-table-actions .table-tool.primary,
    .btn.primary,
    .btn.good-bg {
      color: #ffffff;
      border-color: #0fac4a;
      background: linear-gradient(180deg, #22c55e, #11a84a);
      box-shadow: 0 10px 20px rgba(18,183,106,.20);
    }
    table,
    .dashboard-table {
      color: #344054;
      background: transparent;
    }
    th,
    .dashboard-table th {
      color: #667085;
      background: #f4f7fb;
      border-color: rgba(15,23,42,.10);
    }
    td,
    .dashboard-table td {
      border-color: rgba(15,23,42,.09);
    }
    tbody tr:hover,
    .dashboard-table tbody tr:hover {
      background: rgba(18,183,106,.055);
    }
    .dashboard-pagination {
      border-top-color: rgba(15,23,42,.09);
      background: #fbfdff;
    }
    .page-pills span,
    .page-pills button {
      color: #475467;
      border-color: rgba(15,23,42,.12);
      background: #ffffff;
    }
    .page-pills .active {
      color: #0c8f3f;
      border-color: #12b76a;
      background: #effdf5;
    }
    .row-action {
      color: #667085;
    }
    .row-action:hover {
      color: #0c8f3f;
      background: rgba(18,183,106,.10);
    }
    .status-badge.available,
    .condition-badge.excellent {
      color: #087f3d;
      background: rgba(18,183,106,.13);
    }
    .status-badge.transit,
    .condition-badge.good {
      color: #1d4ed8;
      background: rgba(39,94,254,.11);
    }
    .status-badge.sold {
      color: #475467;
      background: rgba(100,116,139,.14);
    }
    .activity-icon {
      box-shadow: 0 8px 16px rgba(15,23,42,.12);
    }
    .activity-view {
      color: #0c8f3f;
      border-color: rgba(18,183,106,.42);
      background: #effdf5;
    }
    .pill {
      color: #087f3d;
      border-color: rgba(18,183,106,.24);
      background: rgba(18,183,106,.10);
    }
    .pill.sold {
      color: #475467;
      border-color: rgba(100,116,139,.20);
      background: rgba(100,116,139,.10);
    }
    .pill.transit {
      color: #1d4ed8;
      border-color: rgba(39,94,254,.22);
      background: rgba(39,94,254,.10);
    }
    .btn {
      color: #111827;
      border-color: rgba(15,23,42,.14);
      background: #ffffff;
      box-shadow: 0 8px 18px rgba(15,23,42,.06);
    }
    input,
    select,
    textarea {
      color: #111827;
      border-color: rgba(15,23,42,.14);
      background: #ffffff;
    }
    .modal-card {
      color: #111827;
      background: #ffffff;
      border-color: rgba(15,23,42,.12);
    }
    .audit-detail {
      color: #344054;
      border-color: rgba(15,23,42,.10);
      background: #f8fafc;
    }
    .flash.success {
      color: #067647;
      background: #ecfdf3;
      border-color: #abefc6;
    }
    .flash.error {
      color: #b42318;
      background: #fef3f2;
      border-color: #fecdca;
    }
    .arrears-list {
      display: grid;
      gap: 10px;
    }
    .arrears-row {
      display: grid;
      grid-template-columns: minmax(180px, 1.4fr) minmax(110px, .72fr) minmax(110px, .72fr) minmax(110px, .72fr) minmax(120px, .9fr) auto;
      gap: 12px;
      align-items: center;
      padding: 14px;
      border: 1px solid rgba(15,23,42,.10);
      border-radius: 8px;
      background: linear-gradient(180deg, #ffffff, #fbfdff);
      box-shadow: 0 8px 18px rgba(15,23,42,.045);
    }
    .arrears-row:hover {
      border-color: rgba(21,153,71,.22);
      background: #ffffff;
    }
    .arrears-row h3 {
      margin: 0 0 3px;
      color: #111827;
      font-size: 14px;
      line-height: 1.2;
    }
    .arrears-row small,
    .arrears-metric span {
      display: block;
      color: #667085;
      font-size: 11px;
      font-weight: 800;
    }
    .arrears-metric b {
      display: block;
      margin-top: 3px;
      color: #111827;
      font-size: 14px;
    }
    .arrears-meter {
      height: 8px;
      margin-top: 8px;
      border-radius: 999px;
      overflow: hidden;
      background: #e8edf3;
    }
    .arrears-meter i {
      display: block;
      height: 100%;
      width: var(--progress);
      border-radius: inherit;
      background: linear-gradient(90deg, #159947, #2563eb);
    }
    .auto-filter-note {
      display: inline-flex;
      align-items: center;
      min-height: 34px;
      color: #667085;
      font-size: 12px;
      font-weight: 800;
    }
    .inventory-pie-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
      margin-bottom: 16px;
    }
    .inventory-pie-panel {
      min-height: 178px;
      padding: 16px;
    }
    .inventory-pie-panel h2 {
      margin-bottom: 12px;
      font-size: 15px;
    }
    .inventory-pie-body {
      display: grid;
      grid-template-columns: 132px minmax(0, 1fr);
      gap: 18px;
      align-items: center;
    }
    .inventory-pie {
      width: 112px;
      aspect-ratio: 1;
      display: grid;
      place-items: center;
      border-radius: 50%;
      background: var(--pie);
      box-shadow: 0 14px 28px rgba(15,23,42,.10);
      position: relative;
    }
    .inventory-pie::after {
      content: "";
      position: absolute;
      inset: 28px;
      border-radius: 50%;
      background: #ffffff;
      box-shadow: inset 0 0 0 1px rgba(15,23,42,.08);
    }
    .inventory-pie span {
      position: relative;
      z-index: 1;
      display: grid;
      place-items: center;
      color: #111827;
      font-weight: 1000;
      line-height: 1.05;
      text-align: center;
    }
    .inventory-pie b {
      font-size: 22px;
    }
    .inventory-pie small {
      color: #667085;
      font-size: 10px;
      font-weight: 800;
    }
    .inventory-pie-legend {
      display: grid;
      gap: 8px;
      min-width: 0;
    }
    .inventory-pie-legend div {
      display: grid;
      grid-template-columns: 10px minmax(0, 1fr) auto;
      gap: 8px;
      align-items: center;
      color: #344054;
      font-size: 12px;
      font-weight: 800;
    }
    .inventory-pie-legend i {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--dot);
    }
    .inventory-pie-legend span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .inventory-pie-legend strong {
      color: #111827;
      font-size: 12px;
    }
    @media (max-width: 860px) {
      .sidebar-overlay {
        background: rgba(15,23,42,.26);
      }
      .arrears-row {
        grid-template-columns: 1fr;
        align-items: stretch;
      }
      .inventory-pie-grid {
        grid-template-columns: 1fr;
      }
      .inventory-pie-body {
        grid-template-columns: 112px minmax(0, 1fr);
      }
    }

    /* Dashboard overview: reference information architecture in the existing IMS system. */
    .dashboard-overview {
      max-width: 1540px;
      margin: 0 auto;
    }
    .dashboard-overview-head {
      align-items: flex-end;
      margin-bottom: 18px;
    }
    .dashboard-overview-head h1 {
      font-size: 30px;
      line-height: 1.12;
    }
    .dashboard-updated {
      color: #667085;
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }
    .overview-value-grid,
    .company-value-grid,
    .payments-value-grid {
      display: grid;
      gap: 14px;
    }
    .overview-value-grid {
      grid-template-columns: repeat(5, minmax(0, 1fr));
      margin-bottom: 24px;
    }
    .company-value-grid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .payments-value-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .overview-value {
      min-height: 108px;
      padding: 17px 18px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 16px;
      border: 1px solid rgba(15,23,42,.12);
      border-radius: 7px;
      background: linear-gradient(180deg, #ffffff, #fbfdff);
      box-shadow: 0 12px 26px rgba(15,23,42,.07), inset 0 1px 0 rgba(255,255,255,.96);
      transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
    }
    .overview-value:hover {
      transform: translateY(-2px);
      border-color: rgba(21,153,71,.34);
      box-shadow: 0 17px 34px rgba(15,23,42,.10);
    }
    .overview-value span {
      max-width: 22ch;
      color: #475467;
      font-size: 12px;
      font-weight: 900;
      line-height: 1.3;
    }
    .overview-value small {
      color: #667085;
      font-size: 11px;
      font-weight: 700;
      line-height: 1.35;
    }
    .overview-value strong {
      color: #111827;
      font-size: 25px;
      line-height: 1;
      overflow-wrap: anywhere;
    }
    .overview-value.positive strong { color: #087a48; }
    .overview-value.negative strong { color: #d64550; }
    .company-dashboard-section {
      margin: 0 0 26px;
    }
    .dashboard-currency-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 14px;
    }
    .dashboard-section-heading {
      margin-bottom: 12px;
    }
    .dashboard-section-heading h2 {
      margin-bottom: 4px;
      color: #111827;
      font-size: 21px;
    }
    .dashboard-section-heading p {
      margin: 0;
      color: #667085;
      font-size: 13px;
    }
    .payments-dashboard-section {
      margin-top: 30px;
    }
    .payments-dashboard-section .overview-value {
      min-height: 100px;
    }
    .sold-dashboard-panel {
      padding: 20px;
      margin-bottom: 22px;
      overflow: visible;
    }
    .sold-dashboard-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 14px;
    }
    .sold-dashboard-head h2 {
      margin-bottom: 4px;
      font-size: 21px;
    }
    .sold-dashboard-head p {
      margin: 0;
      color: #667085;
      font-size: 13px;
    }
    .sold-period-controls {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .sold-period-button {
      min-height: 36px;
      padding: 7px 10px;
      display: inline-flex;
      align-items: center;
      gap: 9px;
      border: 1px solid rgba(15,23,42,.13);
      border-radius: 6px;
      color: #475467;
      background: #ffffff;
      font-size: 11px;
      font-weight: 900;
      cursor: pointer;
    }
    .sold-period-button b {
      min-width: 21px;
      padding: 2px 6px;
      border-radius: 4px;
      color: #344054;
      background: #eef2f6;
      text-align: center;
    }
    .sold-period-button.active {
      color: #087a48;
      border-color: rgba(21,153,71,.38);
      background: #eefbf3;
      box-shadow: 0 5px 14px rgba(21,153,71,.10);
    }
    .sold-period-button.active b {
      color: #ffffff;
      background: #159947;
    }
    .sold-month-control {
      max-width: 500px;
      margin: 0 0 14px auto;
    }
    .sold-month-control select {
      min-height: 40px;
    }
    .sold-dashboard-panel .sold-period-summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 8px;
      border-radius: 6px;
      box-shadow: none;
    }
    .sold-dashboard-table td b,
    .sold-dashboard-table td small {
      display: block;
    }
    .dashboard-summary-charts {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }
    .dashboard-summary-charts .chart-panel {
      min-height: 360px;
      margin-bottom: 0;
      padding: 20px;
    }
    .dashboard-summary-charts .chart {
      height: 292px;
    }
    .dashboard-revenue-trend {
      margin-top: 14px;
    }
    .dashboard-revenue-trend .chart {
      height: 320px;
    }
    .app-toolbar {
      grid-template-columns: 36px minmax(0, 1fr) auto;
    }
    .chassis-page-search {
      grid-template-columns: minmax(240px, 520px) auto auto;
      justify-content: start;
    }
    .expense-month-filter {
      grid-template-columns: minmax(220px, 360px) auto auto;
      justify-content: start;
    }
    .vehicle-payment-filters {
      grid-template-columns: repeat(3, minmax(150px, 1fr)) auto auto;
    }
    .report-period-filters {
      grid-template-columns: repeat(2, minmax(220px, 1fr)) auto auto;
    }
    .table-wrap tfoot th {
      color: #111827;
      background: #eef3f7;
      font-weight: 900;
      border-top: 2px solid rgba(15,23,42,.14);
    }
    .sales-month-table {
      margin-bottom: 14px;
    }
    .sales-month-total td {
      color: #111827;
      background: #eef3f7;
      border-top: 2px solid rgba(15,23,42,.14);
      font-weight: 900;
    }
    .sales-month-pagination .pagination {
      padding: 2px 0 18px;
    }
    .table-cell-stack {
      display: block;
      min-width: 0;
    }
    .table-cell-stack small {
      display: block;
      margin-top: 3px;
    }
    .expense-month-row td {
      padding-top: 18px;
      padding-bottom: 9px;
      color: #344054;
      background: #f4f7fa;
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
    }
    @media (max-width: 1180px) {
      .overview-value-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .company-value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 860px) {
      .dashboard-overview-head,
      .sold-dashboard-head {
        align-items: flex-start;
        flex-direction: column;
      }
      .dashboard-updated { white-space: normal; }
      .overview-value-grid,
      .company-value-grid,
      .payments-value-grid,
      .dashboard-summary-charts {
        grid-template-columns: 1fr;
      }
      .overview-value-grid { gap: 10px; }
      .overview-value { min-height: 94px; padding: 15px; }
      .overview-value strong { font-size: 23px; }
      .sold-period-controls {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
      .sold-period-button {
        justify-content: space-between;
        min-width: 0;
      }
      .sold-month-control {
        max-width: none;
        margin-left: 0;
      }
      .dashboard-summary-charts .chart-panel { min-height: 320px; }
      .dashboard-summary-charts .chart { height: 250px; }
      .table-wrap {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
      }
      .table-wrap.responsive-table-wrap {
        margin-left: 0;
        margin-right: 0;
        overflow: visible;
      }
      table.responsive-table {
        display: block;
        width: 100%;
        min-width: 0;
      }
      table.responsive-table thead {
        display: none;
      }
      table.responsive-table tbody,
      table.responsive-table tr,
      table.responsive-table td {
        display: block;
        width: 100%;
      }
      table.responsive-table tr {
        margin-bottom: 12px;
        padding: 12px;
        border: 1px solid #e5eaf2;
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 8px 20px rgba(15,23,42,.07);
      }
      table.responsive-table td {
        display: grid;
        grid-template-columns: minmax(92px, 38%) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        padding: 9px 0;
        border-bottom: 1px solid #edf0f5;
        overflow-wrap: anywhere;
      }
      table.responsive-table td:last-child {
        border-bottom: 0;
      }
      table.responsive-table td::before {
        content: attr(data-label);
        color: #667085;
        font-size: 11px;
        font-weight: 900;
        text-transform: uppercase;
      }
      table.responsive-table td[data-label=""]::before,
      table.responsive-table td.empty::before {
        display: none;
      }
      table.responsive-table td.mobile-full,
      table.responsive-table td.empty {
        display: block;
      }
      table.responsive-table .sales-month-total td {
        background: transparent;
      }
    }
    @media (max-width: 480px) {
      .sold-period-controls { grid-template-columns: 1fr; }
      .chassis-page-search,
      .expense-month-filter,
      .vehicle-payment-filters,
      .report-period-filters { grid-template-columns: 1fr; }
    }

    .mt-16 { margin-top: 16px; }
    .flash {
      animation: flash-auto-dismiss 7s ease forwards;
    }
    @keyframes flash-auto-dismiss {
      0%, 82% { opacity: 1; transform: translateY(0); max-height: 160px; }
      100% { opacity: 0; transform: translateY(-6px); max-height: 0; margin: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }
    }
    .empty-guidance b,
    .empty-guidance span {
      display: block;
    }
    .empty-guidance b {
      color: var(--ink);
      margin-bottom: 6px;
    }
    .sale-step-form {
      width: min(760px, 100%);
    }
    .sale-stepper {
      display: flex;
      gap: 10px;
      margin: 8px 0 16px;
    }
    .sale-stepper span {
      flex: 1;
      border-radius: 999px;
      padding: 9px 12px;
      text-align: center;
      font-weight: 900;
      color: var(--muted);
      background: rgba(148,163,184,.18);
    }
    .sale-stepper span.active {
      color: #fff;
      background: linear-gradient(135deg, var(--primary), var(--primary-dark));
      box-shadow: var(--shadow);
    }
    .sale-step-panel {
      border-top: 1px solid var(--line);
      padding-top: 16px;
    }
    @media (max-width: 640px) {
      .sale-stepper { flex-direction: column; }
      .sale-step-form .form-actions { flex-direction: column; }
      .sale-step-form .form-actions .btn { width: 100%; }
    }
