:root {
      color-scheme: light;
      --bg: #f5f7f4;
      --ink: #17201b;
      --muted: #65736b;
      --line: #dce4dd;
      --panel: #ffffff;
      --accent: #146c5f;
      --accent-2: #a83f2d;
      --soft: #e8f3ef;
      --warn: #fff2cf;
      --danger: #ffe0d7;
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      background: var(--bg);
      color: var(--ink);
    }
    a { color: inherit; text-decoration: none; }
    .app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
    .public-shell { display: block; }
    .main-shell { min-width: 0; }
    .sidebar {
      position: sticky;
      top: 0;
      height: 100vh;
      display: flex;
      flex-direction: column;
      gap: 18px;
      background: #17201b;
      color: #eef6f2;
      padding: 18px 14px;
      border-right: 1px solid rgba(255,255,255,.08);
    }
    .brand { display: grid; gap: 4px; padding: 8px 8px 14px; border-bottom: 1px solid rgba(255,255,255,.12); }
    .brand strong { font-size: 20px; letter-spacing: 0; }
    .brand span, .sidebar-footer span { color: #a8c7bc; font-size: 13px; }
    .topbar {
      background: #ffffff;
      color: var(--ink);
      padding: 22px clamp(16px, 4vw, 44px);
      border-bottom: 1px solid var(--line);
    }
    .topbar h1 { margin: 2px 0 0; font-size: clamp(26px, 4vw, 42px); letter-spacing: 0; }
    .eyebrow { margin: 0; color: var(--muted); text-transform: uppercase; font-size: 12px; font-weight: 700; }
    .nav {
      display: grid;
      gap: 4px;
    }
    .nav-label {
      margin: 14px 8px 6px;
      color: #a8c7bc;
      font-size: 11px;
      font-weight: 800;
      letter-spacing: .04em;
      text-transform: uppercase;
    }
    .nav-item {
      display: flex;
      align-items: center;
      min-height: 42px;
      padding: 10px 12px;
      border-radius: 8px;
      white-space: nowrap;
      color: #dcebe5;
      font-weight: 700;
      font-size: 14px;
    }
    .nav-item:hover, .nav-item.active { background: rgba(255,255,255,.11); color: #fff; }
    .sidebar-footer {
      margin-top: auto;
      display: grid;
      gap: 10px;
      padding: 14px 8px 4px;
      border-top: 1px solid rgba(255,255,255,.12);
    }
    .sidebar-footer div { display: grid; gap: 3px; }
    .logout-link { color: #fff; font-weight: 800; font-size: 14px; }
    .button:hover, .action-card:hover { background: var(--soft); }
    .container { width: min(1180px, calc(100% - 28px)); margin: 22px auto 52px; }
    .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
    .stats div, .panel, .login-card, .form-card, .hero-card, .choice-card {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: 0 1px 2px rgba(23, 32, 27, .04);
    }
    .stats div { padding: 18px; }
    .stats strong { display: block; font-size: 28px; }
    .stats span, .muted { color: var(--muted); }
    .section-title { margin: 22px 0 10px; font-size: 18px; }
    .grid { display: grid; gap: 16px; }
    .grid.two { grid-template-columns: 1fr 1fr; }
    .dashboard-panels {
      display: grid;
      grid-template-columns: 1fr;
      gap: 16px;
      align-items: start;
      margin-top: 18px;
    }
    .panel { overflow: hidden; }
    .panel-head { padding: 16px 18px; border-bottom: 1px solid var(--line); }
    .panel-head.with-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
    .panel-head h2 { margin: 0; font-size: 18px; }
    .table-scroll { overflow-x: auto; }
    .table-scroll table { min-width: 520px; }
    .table-scroll.wide table { min-width: 680px; }
    .reminders-scroll table { min-width: 0; }
    .reminders-table {
      table-layout: fixed;
    }
    .reminders-table th:nth-child(1), .reminders-table td:nth-child(1) { width: 15%; }
    .reminders-table th:nth-child(2), .reminders-table td:nth-child(2) { width: 28%; }
    .reminders-table th:nth-child(3), .reminders-table td:nth-child(3) { width: 37%; }
    .reminders-table th:nth-child(4), .reminders-table td:nth-child(4) { width: 20%; }
    .reminders-table th, .reminders-table td {
      overflow-wrap: anywhere;
      word-break: normal;
      white-space: normal;
    }
    .reminders-table .pill {
      overflow-wrap: normal;
      white-space: nowrap;
    }
    .due-cell { line-height: 1.35; }
    table { width: 100%; border-collapse: collapse; font-size: 14px; }
    th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
    th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0; }
    .pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-weight: 700; font-size: 12px; background: var(--soft); }
    .pill.due-soon { background: var(--warn); }
    .pill.overdue { background: var(--danger); color: #86210f; }
    .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }
    .action-grid { display: grid; grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
    .action-card {
      min-height: 92px;
      display: grid;
      align-content: center;
      gap: 5px;
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 14px;
      box-shadow: 0 1px 2px rgba(23, 32, 27, .04);
    }
    .action-card.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
    .action-card strong { font-size: 16px; }
    .action-card span { color: var(--muted); font-size: 13px; }
    .action-card.primary span { color: #d9eee7; }
    .button, button {
      border: 0;
      background: var(--accent);
      color: #fff;
      padding: 11px 14px;
      border-radius: 8px;
      font-weight: 750;
      cursor: pointer;
      min-height: 44px;
    }
    .button.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
    .text-link { color: var(--accent); font-weight: 800; }
    .field-panel { margin-top: 16px; }
    .field-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; }
    .field-list span { background: var(--soft); border-radius: 999px; padding: 8px 10px; color: #203128; font-weight: 700; font-size: 13px; }
    .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 16px; }
    .vehicle-card, .choice-card { padding: 16px; display: grid; gap: 8px; }
    .vehicle-card strong, .choice-card strong { font-size: 18px; }
    .vehicle-card span, .choice-card span { color: var(--muted); }
    .choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .choice-card { min-height: 150px; align-content: center; }
    .hero-card { padding: 18px; display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 16px; }
    .hero-card h2 { margin: 0 0 6px; font-size: 26px; }
    .hero-card p { margin: 0; color: var(--muted); }
    .form { display: grid; gap: 14px; }
    .form-card, .login-card { max-width: 620px; padding: 18px; margin: 0 auto; }
    label { display: grid; gap: 6px; font-weight: 700; color: #223229; }
    .field-help, .field-note {
      color: var(--muted);
      font-size: 13px;
      font-weight: 500;
      line-height: 1.4;
    }
    .field-note {
      margin: 0;
      padding: 12px;
      background: var(--soft);
      border-radius: 8px;
    }
    input, select, textarea {
      width: 100%;
      border: 1px solid #c9d5ce;
      border-radius: 8px;
      padding: 12px;
      font: inherit;
      min-height: 44px;
      background: #fff;
    }
    .check-row { display: flex; grid-template-columns: none; align-items: center; gap: 10px; }
    .check-row input { width: auto; min-height: auto; }
    textarea { min-height: 92px; resize: vertical; }
    .demo-users { margin-top: 18px; color: var(--muted); font-size: 14px; }
    .demo-users p { margin: 5px 0; }
    .alert { background: var(--danger); color: #86210f; padding: 12px; border-radius: 8px; }
    .empty { color: var(--muted); padding: 18px; margin: 0; }
    @media (min-width: 1500px) {
      .dashboard-panels {
        grid-template-columns: minmax(420px, .85fr) minmax(650px, 1.15fr);
      }
    }
    @media (max-width: 820px) {
      .app-shell { display: block; }
      .sidebar {
        position: static;
        height: auto;
        display: block;
        padding: 12px;
      }
      .brand { border-bottom: 0; padding: 4px 6px 10px; }
      .nav {
        display: flex;
        overflow-x: auto;
        gap: 6px;
        padding: 4px 0 2px;
      }
      .nav-label { display: none; }
      .nav-item {
        min-height: 40px;
        padding: 9px 11px;
        background: rgba(255,255,255,.06);
      }
      .sidebar-footer { display: none; }
      .container { width: min(100% - 20px, 720px); margin-top: 14px; }
      .stats, .grid.two, .dashboard-panels, .choice, .action-grid { grid-template-columns: 1fr; }
      .hero-card { display: grid; }
      table { display: block; overflow-x: auto; white-space: nowrap; }
      .reminders-table { display: table; white-space: normal; }
      .reminders-table th, .reminders-table td { padding: 10px 8px; white-space: normal; }
      .reminders-table th:nth-child(1), .reminders-table td:nth-child(1) { width: 15%; }
      .reminders-table th:nth-child(2), .reminders-table td:nth-child(2) { width: 27%; }
      .reminders-table th:nth-child(3), .reminders-table td:nth-child(3) { width: 33%; }
      .reminders-table th:nth-child(4), .reminders-table td:nth-child(4) { width: 25%; }
      .reminders-table .pill { font-size: 11px; padding: 3px 6px; }
      .topbar { padding: 18px 14px; }
    }
