    :root {
      --ink: #2c2522;
      --surface: #faf6f1;
      --paper: #fffdfa;
      --tint: rgba(44, 37, 34, .045);
      --line: rgba(44, 37, 34, .13);
      --dim: rgba(44, 37, 34, .62);
      --faint: rgba(44, 37, 34, .42);
      --accent: #a45f3a;
      --good: #35795c;
      --warn: #a66a2b;
      --bad: #a13e33;
      --mono: "IBM Plex Mono", ui-monospace, monospace;
      --body: "Plus Jakarta Sans", system-ui, sans-serif;
      --display: "Cormorant Garamond", Georgia, serif;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      min-height: 100vh;
      color: var(--ink);
      background: var(--surface);
      font-family: var(--body);
      font-feature-settings: "tnum" 1, "lnum" 1;
      overflow-x: hidden;
    }

    button, input, select { font: inherit; }

    .login {
      min-height: 100vh;
      display: grid;
      grid-template-columns: minmax(0, .82fr) minmax(360px, .44fr);
    }

    .login-panel {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 40px;
      background: var(--ink);
      color: var(--surface);
    }

    .login-mark,
    .eyebrow,
    .metric-label,
    .table th,
    .pill,
    .event-time,
    .tiny {
      font-family: var(--mono);
      font-size: 12px;
      letter-spacing: .14em;
      text-transform: uppercase;
    }

    .login-mark { color: rgba(250, 246, 241, .7); }

    .login h1 {
      max-width: 760px;
      margin: 0;
      font-family: var(--display);
      font-size: clamp(48px, 7vw, 92px);
      line-height: .98;
      letter-spacing: -0.02em;
      font-weight: 600;
    }

    .login-copy {
      max-width: 600px;
      color: rgba(250, 246, 241, .7);
      font-size: 17px;
      line-height: 1.65;
    }

    .login-box {
      align-self: center;
      width: min(100%, 420px);
      margin: 32px;
      padding: 30px;
      border: 1px solid var(--line);
      background: var(--paper);
    }

    .login-box h2,
    .page-title h1,
    .section-title {
      margin: 0;
      font-family: var(--display);
      font-weight: 600;
      letter-spacing: -0.02em;
    }

    .login-box h2 { font-size: 38px; line-height: 1.05; }

    .muted {
      color: var(--dim);
      line-height: 1.55;
    }

    .field { margin-top: 18px; }

    label {
      display: block;
      margin-bottom: 8px;
      color: var(--dim);
      font-family: var(--mono);
      font-size: 12px;
      letter-spacing: .12em;
      text-transform: uppercase;
    }

    input, select {
      width: 100%;
      min-height: 48px;
      border: 1px solid var(--line);
      border-radius: 3px;
      padding: 0 13px;
      color: var(--ink);
      background: #fffefa;
      outline: none;
    }

    input:focus, select:focus {
      border-color: rgba(164, 95, 58, .65);
      box-shadow: 0 0 0 3px rgba(164, 95, 58, .12);
    }

    .button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 48px;
      border: 1px solid var(--ink);
      border-radius: 3px;
      padding: 0 17px;
      color: var(--surface);
      background: var(--ink);
      font-weight: 700;
      cursor: pointer;
    }

    .button.secondary {
      color: var(--ink);
      background: transparent;
    }

    .button:disabled {
      cursor: wait;
      opacity: .7;
    }

    .login-actions {
      display: flex;
      gap: 10px;
      margin-top: 22px;
    }

    .login-error {
      display: none;
      margin: 14px 0 0;
      color: var(--bad);
      font-size: 13px;
      line-height: 1.45;
      font-weight: 700;
    }

    .login-error.show { display: block; }

    .dashboard {
      display: grid;
      min-height: 100vh;
      grid-template-columns: 256px minmax(0, 1fr);
    }

    .rail {
      position: sticky;
      top: 0;
      height: 100vh;
      padding: 24px 18px;
      color: var(--surface);
      background: var(--ink);
      overflow: auto;
    }

    .brand strong {
      display: block;
      font-family: var(--display);
      font-size: 28px;
      line-height: 1;
      font-weight: 600;
      letter-spacing: -0.02em;
    }

    .brand span {
      display: block;
      margin-top: 8px;
      color: rgba(250, 246, 241, .55);
      font-family: var(--mono);
      font-size: 11px;
      letter-spacing: .16em;
      text-transform: uppercase;
    }

    .nav {
      display: grid;
      gap: 4px;
      margin-top: 34px;
    }

    .nav a {
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 42px;
      padding: 0 10px;
      border-radius: 3px;
      color: rgba(250, 246, 241, .72);
      text-decoration: none;
      font-size: 14px;
      font-weight: 600;
    }

    .nav a:hover,
    .nav a.active {
      color: var(--surface);
      background: rgba(250, 246, 241, .08);
    }

    .nav b {
      min-width: 24px;
      border-radius: 999px;
      padding: 2px 7px;
      background: rgba(250, 246, 241, .12);
      font-family: var(--mono);
      font-size: 11px;
      font-weight: 500;
      text-align: center;
    }

    .workspace {
      min-width: 0;
      padding: 28px;
    }

    .topbar {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 24px;
      margin-bottom: 26px;
    }

    .page-title h1 {
      font-size: clamp(38px, 5vw, 58px);
      line-height: 1;
    }

    .toolbar {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 10px;
      min-width: 300px;
    }

    .health-strip {
      display: grid;
      grid-template-columns: 1.2fr .8fr .8fr .8fr;
      border: 1px solid var(--line);
      background: var(--paper);
    }

    .metric {
      min-height: 124px;
      padding: 18px;
      border-left: 1px solid var(--line);
    }

    .metric:first-child { border-left: 0; }

    .metric-label {
      color: var(--faint);
      font-size: 11px;
    }

    .metric-value {
      margin-top: 16px;
      font-family: var(--display);
      font-size: 46px;
      line-height: .9;
      letter-spacing: -0.02em;
      font-weight: 600;
    }

    .metric-note {
      margin-top: 11px;
      color: var(--dim);
      font-size: 13px;
      line-height: 1.45;
    }

    .grid {
      display: grid;
      grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
      gap: 18px;
      margin-top: 18px;
    }

    .panel {
      border: 1px solid var(--line);
      background: var(--paper);
    }

    .panel-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 17px 18px;
      border-bottom: 1px solid var(--line);
    }

    .section-title {
      font-size: 28px;
      line-height: 1.1;
    }

    .panel-body { padding: 18px; }

    .alerts {
      display: grid;
      gap: 10px;
    }

    .alert {
      display: grid;
      grid-template-columns: 10px minmax(0, 1fr) auto;
      gap: 12px;
      align-items: start;
      padding: 13px 0;
      border-bottom: 1px solid var(--line);
    }

    .alert:last-child { border-bottom: 0; }

    .severity {
      width: 10px;
      height: 10px;
      margin-top: 6px;
      border-radius: 999px;
      background: var(--bad);
    }

    .severity.warn { background: var(--warn); }
    .severity.good { background: var(--good); }

    .alert h3 {
      margin: 0;
      font-size: 15px;
      line-height: 1.35;
    }

    .alert p {
      margin: 5px 0 0;
      color: var(--dim);
      font-size: 13px;
      line-height: 1.45;
    }

    .pill {
      display: inline-flex;
      align-items: center;
      min-height: 25px;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 0 9px;
      color: var(--dim);
      background: var(--tint);
      font-size: 10px;
      white-space: nowrap;
    }

    .pill.bad {
      border-color: rgba(161, 62, 51, .28);
      color: var(--bad);
      background: rgba(161, 62, 51, .08);
    }

    .pill.good {
      border-color: rgba(53, 121, 92, .25);
      color: var(--good);
      background: rgba(53, 121, 92, .08);
    }

    .funnel {
      display: grid;
      gap: 12px;
    }

    .funnel-row {
      display: grid;
      grid-template-columns: 150px minmax(0, 1fr) 48px;
      gap: 12px;
      align-items: center;
    }

    .bar {
      height: 14px;
      background: var(--tint);
      border: 1px solid var(--line);
    }

    .bar span {
      display: block;
      height: 100%;
      background: var(--accent);
    }

    .table-wrap {
      max-width: 100%;
      overflow-x: auto;
    }

    .table {
      width: 100%;
      border-collapse: collapse;
      min-width: 760px;
    }

    .table th {
      padding: 12px 14px;
      border-bottom: 1px solid var(--line);
      color: var(--faint);
      font-size: 10px;
      text-align: left;
      white-space: nowrap;
    }

    .table td {
      padding: 13px 14px;
      border-bottom: 1px solid var(--line);
      color: var(--dim);
      font-size: 14px;
      white-space: nowrap;
    }

    .table tr:last-child td { border-bottom: 0; }

    .table strong {
      display: block;
      color: var(--ink);
      font-size: 14px;
    }

    .split {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 18px;
      margin-top: 18px;
    }

    .event-list {
      display: grid;
      gap: 0;
    }

    .event {
      display: grid;
      grid-template-columns: 96px minmax(0, 1fr);
      gap: 14px;
      padding: 13px 0;
      border-bottom: 1px solid var(--line);
    }

    .event:last-child { border-bottom: 0; }

    .event-time {
      color: var(--faint);
      font-size: 10px;
    }

    .event strong {
      display: block;
      margin-bottom: 4px;
      font-size: 14px;
    }

    .event span {
      color: var(--dim);
      font-size: 13px;
      line-height: 1.45;
    }

    .tiny { color: var(--faint); font-size: 10px; }

    [hidden],
    .hidden { display: none !important; }

    @media (max-width: 1080px) {
      .dashboard { grid-template-columns: 1fr; }
      .rail {
        position: static;
        height: auto;
      }
      .nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
      .health-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .metric:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
      .metric:nth-child(4) { border-top: 1px solid var(--line); }
      .grid, .split { grid-template-columns: 1fr; }
    }

    @media (max-width: 760px) {
      .login { grid-template-columns: 1fr; }
      .login-panel { min-height: 48vh; padding: 28px; }
      .login-box { width: auto; margin: 22px; padding: 22px; }
      .workspace { padding: 18px; }
      .topbar { display: block; }
      .toolbar {
        justify-content: flex-start;
        min-width: 0;
        margin-top: 18px;
      }
      .health-strip, .nav { grid-template-columns: 1fr; }
      .metric { border-left: 0; border-top: 1px solid var(--line); }
      .metric:first-child { border-top: 0; }
      .funnel-row { grid-template-columns: 116px minmax(0, 1fr) 38px; }
      .event { grid-template-columns: 1fr; gap: 4px; }
    }
