/* ============================================================
   THE HIDEOUT — dashboard.css (v2)
   The signed-in player's home. Re-skins the live FiveM dashboard
   into the v2 chrome. Loaded after styles.css.
   ============================================================ */

/* Legacy FiveM-theme token aliases -> v2 semantic palette.
   The ported markup references these names inline; mapping them here
   keeps the port 1:1 while rendering in the v2 aqua-on-near-black skin. */
:root {
  --fg-0: var(--fg);
  --fg-1: var(--fg-muted);
  --fg-2: var(--fg-dim);
  --accent: var(--aqua);
  --fm-accent: var(--aqua);
  --fm-success: #4ade80;
}

.dash-page { padding: calc(var(--nav-h) + 48px) 0 96px; position: relative; z-index: 1; }

/* ---- page header ---- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 34px; }
.dash-head h1 { font-size: clamp(34px, 5vw, 54px); margin-top: 14px; }
/* styles.css gives `.sub` the subscription-card look (border, padding, centred text, glow strip). The dashboard
   uses `.sub` for small caption lines, so undo the card look inside the dashboard pages. */
.dash-page .sub, .dash-page .sub:hover {
  position: static; display: block; background: none; border: 0; border-radius: 0; padding: 0;
  text-align: left; overflow: visible; box-shadow: none; transform: none; color: inherit;
}
.dash-page .sub::before, .dash-page .sub::after { content: none; }
.dash-page .sub:hover .sub__head, .dash-page .sub:hover .sub__name { background: none; color: inherit; }

.dash-head .sub { font-family: var(--mono); font-size: 12.5px; color: var(--fg-muted); margin-top: 10px; letter-spacing: .04em; }

/* ---- the primary pill button (Play / Join) ---- */
.btn-queue {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 13px 22px;
  border-radius: 999px; font-family: var(--display); font-weight: 600; font-size: 15px;
  background: linear-gradient(180deg, var(--aqua-bright), var(--aqua)); color: var(--on-aqua);
  box-shadow: 0 0 0 1px rgba(34,211,238,.4), 0 8px 30px -8px rgba(34,211,238,.6);
  transition: transform .2s var(--ease), box-shadow .25s var(--ease);
}
.btn-queue:hover { transform: translateY(-2px); }
.btn-queue:disabled { opacity: .55; transform: none; cursor: default; }
@media (prefers-reduced-motion: reduce) { .btn-queue:hover { transform: none; } }
.btn-queue--sm { font-size: 13px; min-height: 40px; padding: 8px 18px; letter-spacing: .06em; box-shadow: none; }
.dash-note { font-family: var(--mono); font-size: 11.5px; color: var(--fg-muted); letter-spacing: .02em; }

/* ---- section label (matches applications.html) ---- */
.player-section-label {
  font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--aqua); display: flex; align-items: center; gap: 10px; margin: 0 0 20px;
}
.player-section-label::before { content: ""; width: 26px; height: 1px; background: var(--aqua-line); }
.player-section-label.spaced { margin-top: 48px; }

/* ---- status list (shared row pattern, as on tickets/applications) ---- */
.status-list { display: grid; gap: 10px; }
.status-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, transform .1s; }
.status-row > div:first-child { flex: 1; min-width: 0; }
.status-row .title { font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--fg); }
.status-row .sub { font-family: var(--mono); font-size: 11.5px; color: var(--fg-dim); margin-top: 5px; line-height: 1.5; word-break: break-word; }
.status-row .sub a { color: var(--aqua); }
.status-row .when { font-family: var(--mono); font-size: 11px; color: var(--fg-dim); white-space: nowrap; }
.dash-veh-row[data-veh]:hover, .dash-prop-row[data-prop]:hover { border-color: var(--aqua-line); }

/* ---- status badges ---- */
.badge-status { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; flex: none; align-self: flex-start; }
.badge-status.open, .badge-status.review, .badge-status.interview { color: #38bdf8; background: rgba(56,189,248,.12); }
.badge-status.awaiting, .badge-status.pending, .badge-status.submitted, .badge-status.returned { color: #fbbf24; background: rgba(251,191,36,.12); }
.badge-status.resolved, .badge-status.accepted, .badge-status.approved { color: #4ade80; background: rgba(74,222,128,.12); }
.badge-status.denied, .badge-status.rejected { color: #f87171; background: rgba(248,113,113,.12); }

/* ---- profile card ---- */
.profile-card {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  padding: 26px 28px; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); position: relative; overflow: hidden;
}
.profile-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 120% at 100% 0%, var(--aqua-ghost), transparent 55%);
}
.profile-card .big-av { width: 92px; height: 92px; border-radius: 20px; object-fit: cover; border: 1px solid var(--line-strong); background: var(--surface-2); flex: none; }
.profile-card .info { flex: 1; min-width: 240px; position: relative; }
.profile-card .info h2 { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 3vw, 30px); color: var(--fg); margin-bottom: 14px; }
.profile-card .rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 26px; }
.profile-card .rows > div { display: flex; flex-direction: column; gap: 2px; }
.profile-card .rows .k { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-dim); }
.profile-card .rows .v { font-family: var(--mono); font-size: 13px; color: var(--fg); word-break: break-word; }
.profile-card .rows .v a { color: var(--aqua); }

/* ---- signed-out prompt ---- */
.dash-signin {
  text-align: center; padding: 40px 24px; background: var(--surface); border: 1px dashed var(--line-strong);
  border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.dash-signin p { font-family: var(--mono); font-size: 13px; color: var(--fg-muted); max-width: 440px; line-height: 1.7; }
.dash-note { font-family: var(--mono); font-size: 12px; color: var(--fg-dim); padding: 8px 2px; }

/* ---- character selector + in-game profile ---- */
.char-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.char-tab {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; cursor: pointer;
  background: color-mix(in oklch, var(--surface-2) 70%, transparent);
  border: 1px solid var(--line); border-radius: 10px; min-width: 150px; transition: all .15s; min-height: 44px;
}
.char-tab:hover { border-color: var(--aqua-line); }
.char-tab.active { border-color: var(--aqua); box-shadow: 0 0 0 1px var(--aqua) inset; }
.char-tab .cn { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--fg); }
.char-tab .cj { font-family: var(--mono); font-size: 11px; color: var(--fg-dim); letter-spacing: 0.04em; }
.char-tab a { color: var(--aqua); }

.char-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.char-stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
}
.char-stat .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-dim); margin-bottom: 6px; }
.char-stat .val { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--fg); }
.char-stat .val.sm { font-size: 15px; }
.char-stat .val.pos { color: var(--fm-success); }

/* ---- collapsible asset categories ---- */
.dash-collapse { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.dash-collapse > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 18px; user-select: none; min-height: 44px; }
.dash-collapse > summary::-webkit-details-marker { display: none; }
.dash-collapse > summary:hover { background: var(--aqua-ghost); }
.dash-collapse > summary:focus-visible { outline: 2px solid var(--aqua); outline-offset: -2px; }
.dash-collapse .dc-title { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg); }
.dash-collapse .dc-sum { font-family: var(--mono); font-size: 11px; color: var(--fg-dim); letter-spacing: 0.04em; }
.dash-collapse .dc-chev { margin-left: auto; color: var(--fg-muted); font-size: 14px; line-height: 1; transition: transform 0.2s; }
.dash-collapse[open] .dc-chev { transform: rotate(180deg); }
.dash-collapse[open] > summary { border-bottom: 1px solid var(--line); }
.dash-collapse .dc-body { padding: 16px 18px 6px; }
.dash-collapse .dc-body .status-row { background: var(--surface-2); }
@media (prefers-reduced-motion: reduce) { .dash-collapse .dc-chev { transition: none; } }

/* ---- server population gauge ---- */
.gauge-card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 28px; }
.gauge-wrap { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; }
.gauge { position: relative; width: 200px; height: 118px; flex: none; margin: 0; }
.gauge__track { fill: none; stroke: var(--surface-3); stroke-width: 14; stroke-linecap: round; }
.gauge__value { fill: none; stroke: url(#gaugeFill); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; filter: drop-shadow(0 0 8px rgba(34,211,238,.4)); transition: stroke-dashoffset .9s var(--ease); }
.gauge__center { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; }
.gauge__num { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; color: var(--fg); }
.gauge__cap { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--fg-dim); margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .gauge__value { transition: none; } }

.gauge-info { flex: 1; min-width: 240px; }
.gauge-info .st { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted); }
.gauge-info .st .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fg-dim); box-shadow: 0 0 10px currentColor; }
.gauge-info .nm { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--fg); margin-top: 8px; }
.gauge-sub { font-family: var(--mono); font-size: 12px; color: var(--fg-dim); letter-spacing: .04em; margin-top: 2px; }
.gauge-readout { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin: 18px 0; }
.gauge-readout > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.gauge-readout dt { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-dim); }
.gauge-readout dd { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--fg); margin-top: 3px; }

/* ---- quick actions ---- */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.quick-action {
  display: flex; align-items: center; gap: 12px; padding: 18px 20px; min-height: 60px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--fg);
  transition: border-color .18s, transform .1s, background .18s;
}
.quick-action:hover { border-color: var(--aqua-line); transform: translateY(-2px); background: var(--surface-2); }
.quick-action .ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--aqua-ghost); border: 1px solid var(--aqua-line); color: var(--aqua); font-size: 16px; flex: none; }
@media (prefers-reduced-motion: reduce) { .quick-action:hover { transform: none; } }

@media (max-width: 620px) {
  .gauge-wrap { gap: 20px; justify-content: center; }
  .profile-card { gap: 18px; }
  .profile-card .big-av { width: 72px; height: 72px; }
}

/* ============================================================
   Dashboard v3: dense, scannable player home.
   Structure: identity bar > character switcher > section nav >
   overview (hero, needs attention, KPIs) > money > records >
   vehicles > homes > progress > account.
   Spacing follows an 8px scale; type scale 11/12/13/15/18/24/32.
   ============================================================ */
.dash-page { --ok: #4ade80; --warn: #fbbf24; --bad: #f87171; --info: #38bdf8; }
.dash-page h1, .dash-page h2, .dash-page h3 { margin: 0; }
.dash-page .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dh-ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- identity bar ---- */
.dh-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.dh-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.dh-id .big-av { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; border: 1px solid var(--line-strong); background: var(--surface-2); flex: none; }
.dh-id h1 { font-family: var(--display); font-weight: 800; font-size: clamp(24px, 3.4vw, 32px); line-height: 1.1; color: var(--fg); }
.dh-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--fg-muted); }
.dh-meta b { color: var(--fg-dim); font-weight: 400; letter-spacing: .12em; text-transform: uppercase; font-size: 10px; margin-right: 6px; }
.dh-meta a { color: var(--aqua); }

/* ---- character switcher ---- */
.dh-chars { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 0 8px; scrollbar-width: thin; }
.dh-char { display: flex; align-items: center; gap: 12px; min-width: 220px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; text-align: left; color: inherit; font: inherit; transition: border-color .15s, background .15s; }
.dh-char:hover { border-color: var(--aqua-line); background: var(--surface-2); }
.dh-char[aria-pressed="true"] { border-color: var(--aqua); background: var(--aqua-ghost); box-shadow: 0 0 0 1px var(--aqua) inset; }
.dh-char:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
.dh-char .av { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 14px; background: var(--surface-3); color: var(--aqua-bright); flex: none; }
.dh-char .cn { display: block; font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--fg); }
.dh-char .cj { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-dim); margin-top: 2px; }

/* ---- section nav ---- */
.dh-nav { position: sticky; top: calc(var(--nav-h) + 8px); z-index: 20; display: flex; gap: 4px; overflow-x: auto; margin: 0 0 32px; padding: 6px; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--line-strong); border-radius: 999px; scrollbar-width: none; width: fit-content; max-width: 100%; }
.dh-nav::-webkit-scrollbar { display: none; }
.dh-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--fg-muted); white-space: nowrap; border: 1px solid transparent; min-height: 40px; }
.dh-nav a:hover { color: var(--fg); background: var(--surface); }
.dh-nav a[aria-current="true"] { color: var(--aqua-bright); background: var(--aqua-ghost); border-color: var(--aqua-line); }
.dh-nav a:focus-visible { outline: 2px solid var(--aqua); outline-offset: 1px; }
.dh-nav .n { font-family: var(--mono); font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--fg-muted); }
.dh-nav .n.hot { background: rgba(248,113,113,.18); color: var(--bad); }

/* ---- sections + cards ---- */
.dh-sec { scroll-margin-top: calc(var(--nav-h) + 80px); margin-bottom: 40px; }
.dash-page .dh-h { display: flex; align-items: baseline; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--fg); margin-bottom: 16px; }
.dh-h small { font-family: var(--mono); font-weight: 400; font-size: 11.5px; letter-spacing: .04em; color: var(--fg-dim); }
.dh-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.dh-grid > * { grid-column: span 12; min-width: 0; }
@media (min-width: 900px) { .s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; } .s7 { grid-column: span 7; } .s8 { grid-column: span 8; } }
@media (min-width: 560px) and (max-width: 899px) { .s3, .s4 { grid-column: span 6; } }
.dh-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.dh-card--lead { border-color: var(--line-strong); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.dh-card__h { display: flex; align-items: center; gap: 10px; }
.dh-card__h h3 { font-family: var(--display); font-weight: 700; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-muted); }
.dh-card__h .dh-ic { color: var(--aqua); }
.dh-card__h .grow { flex: 1; }
.dh-card__h a, .dh-link { font-family: var(--mono); font-size: 11.5px; color: var(--aqua); letter-spacing: .02em; }
.dh-card__h a:hover, .dh-link:hover { text-decoration: underline; }
.dh-empty { display: flex; align-items: center; gap: 12px; padding: 18px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--fg-muted); font-size: 14px; line-height: 1.5; }
.dh-empty .dh-ic { color: var(--ok); width: 22px; height: 22px; }
.dh-note { font-family: var(--mono); font-size: 11.5px; color: var(--fg-dim); line-height: 1.5; }
.dh-unavail { font-family: var(--mono); font-size: 12px; color: var(--fg-dim); padding: 14px; border: 1px dashed var(--line); border-radius: 12px; }

/* ---- chips ---- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--fg-muted); white-space: nowrap; }
.chip.good { color: var(--ok); border-color: rgba(74,222,128,.4); background: rgba(74,222,128,.1); }
.chip.warn { color: var(--warn); border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.1); }
.chip.bad { color: var(--bad); border-color: rgba(248,113,113,.45); background: rgba(248,113,113,.1); }
.chip.info { color: var(--info); border-color: rgba(56,189,248,.4); background: rgba(56,189,248,.1); }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---- hero ---- */
.dh-hero { display: grid; grid-template-columns: auto 1fr; gap: 18px 22px; align-items: center; }
.dh-hero .av { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 26px; color: var(--on-aqua); background: linear-gradient(160deg, var(--aqua-bright), var(--aqua-deep)); position: relative; }
.dh-hero .av .duty { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--surface-2); background: var(--fg-dim); }
.dh-hero .av .duty.on { background: var(--ok); }
.dh-hero h2 { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.15; color: var(--fg); }
.dh-hero .role { margin-top: 6px; color: var(--fg-muted); font-size: 14px; }
.dh-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dh-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.dh-fact { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.dh-fact dt { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-dim); }
.dh-fact dd { margin: 4px 0 0; font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.dh-copy { border: 0; background: transparent; color: var(--fg-dim); cursor: pointer; padding: 4px; border-radius: 6px; display: inline-grid; place-items: center; }
.dh-copy:hover { color: var(--aqua); background: var(--aqua-ghost); }
.dh-copy:focus-visible { outline: 2px solid var(--aqua); }

/* ---- needs attention ---- */
.dh-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dh-item { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px 12px 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dh-item::before { content: ""; align-self: stretch; background: var(--fg-dim); grid-column: 1; }
.dh-item.urgent::before { background: var(--bad); } .dh-item.high::before { background: var(--warn); } .dh-item.normal::before { background: var(--info); }
.dh-item .t { font-family: var(--display); font-weight: 600; font-size: 14.5px; color: var(--fg); }
.dh-item .b { font-size: 13px; color: var(--fg-muted); margin-top: 2px; line-height: 1.45; }
.dh-item a.go { font-family: var(--mono); font-size: 11.5px; color: var(--aqua); white-space: nowrap; }
.dh-item .t, .dh-item .b { padding-left: 0; }

/* ---- KPI strip ---- */
.dh-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 12px; }
.dh-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.dh-kpi .l { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-dim); }
.dh-kpi .l .dh-ic { width: 15px; height: 15px; color: var(--aqua); }
.dh-kpi .v { font-family: var(--display); font-weight: 800; font-size: clamp(19px, 2.4vw, 24px); overflow-wrap: anywhere; line-height: 1.15; margin-top: 8px; color: var(--fg); font-variant-numeric: tabular-nums; }
.dh-kpi .v.pos { color: var(--ok); } .dh-kpi .v.gold { color: #fbbf24; }
.dh-kpi .d { margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--fg-dim); }

/* ---- bars / rings ---- */
.dh-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; display: flex; }
.dh-bar > i { display: block; height: 100%; background: var(--aqua); }
.dh-bar > i.ok { background: var(--ok); } .dh-bar > i.warn { background: var(--warn); } .dh-bar > i.bad { background: var(--bad); }
.dh-split { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--surface-3); gap: 2px; }
.dh-split i { display: block; height: 100%; }
.dh-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--fg-muted); }
.dh-legend span { display: inline-flex; align-items: center; gap: 7px; }
.dh-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.dh-legend b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.dh-ring { position: relative; width: 84px; height: 84px; flex: none; }
.dh-ring svg { width: 84px; height: 84px; transform: rotate(-90deg); }
.dh-ring circle { fill: none; stroke-width: 8; stroke-linecap: round; }
.dh-ring .tr { stroke: var(--surface-3); }
.dh-ring .vl { stroke: var(--aqua); }
.dh-ring .n { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--fg); }
.dh-score { display: flex; align-items: center; gap: 16px; }
.dh-score .cap { font-size: 13px; color: var(--fg-muted); line-height: 1.5; }

/* ---- tables ---- */
.dh-tablewrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.dh-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dh-table caption { text-align: left; }
.dh-table th { text-align: left; font-family: var(--mono); font-size: 10px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-dim); padding: 8px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.dh-table th button { all: unset; cursor: pointer; letter-spacing: inherit; text-transform: inherit; }
.dh-table th button:hover, .dh-table th[aria-sort] button { color: var(--aqua); }
.dh-table th button:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
.dh-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--fg-muted); vertical-align: middle; }
.dh-table td.num, .dh-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.dh-table td .nm { color: var(--fg); font-family: var(--display); font-weight: 600; font-size: 14px; }
.dh-table td .sub2 { display: block; font-family: var(--mono); font-size: 11px; color: var(--fg-dim); margin-top: 2px; }
.dh-table tr.exp > td { background: var(--surface-2); }
.dh-table .more { cursor: pointer; }
.dh-table .more:hover td { background: var(--aqua-ghost); }
.dh-table .pos { color: var(--ok); } .dh-table .neg { color: var(--bad); }
.dh-fuel { display: flex; align-items: center; gap: 8px; min-width: 96px; }
.dh-fuel .dh-bar { flex: 1; height: 6px; }
.dh-fuel span { font-family: var(--mono); font-size: 11px; color: var(--fg-dim); width: 32px; text-align: right; }
.dh-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dh-in { background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 10px; color: var(--fg); font: inherit; font-size: 14px; padding: 9px 12px; min-height: 40px; min-width: 220px; }
.dh-in:focus { outline: none; border-color: var(--aqua); box-shadow: 0 0 0 3px var(--aqua-ghost); }
.dh-btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 13px; padding: 9px 16px; min-height: 40px; border-radius: 999px; border: 1px solid var(--aqua-line); background: var(--aqua-ghost); color: var(--aqua-bright); cursor: pointer; }
.dh-btn:hover { background: rgba(34,211,238,.2); }
.dh-btn:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
.dh-btn[disabled] { opacity: .5; cursor: default; }

/* ---- lists & stat chips ---- */
.dh-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.dh-rows li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--fg-muted); }
.dh-rows li:last-child { border-bottom: 0; }
.dh-rows .main { flex: 1; min-width: 0; }
.dh-rows .main b { display: block; color: var(--fg); font-family: var(--display); font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.dh-rows .main small { display: block; font-family: var(--mono); font-size: 11px; color: var(--fg-dim); margin-top: 2px; }
.dh-rows .amt { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dh-rows .amt.pos { color: var(--ok); } .dh-rows .amt.neg { color: var(--bad); }
.dh-licenses { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dh-lic { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.dh-lic b { font-family: var(--display); font-weight: 600; font-size: 14px; color: var(--fg); text-transform: capitalize; }
.dh-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.dh-stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.dh-stat .v { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--fg); font-variant-numeric: tabular-nums; }
.dh-stat .l { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-dim); margin-top: 3px; }
.dh-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.dh-tabs button { font-family: var(--display); font-weight: 600; font-size: 12.5px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--fg-muted); cursor: pointer; min-height: 36px; }
.dh-tabs button[aria-pressed="true"] { color: var(--aqua-bright); border-color: var(--aqua-line); background: var(--aqua-ghost); }
.dh-tabs button:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
.dh-home { display: flex; flex-direction: column; gap: 12px; }
.dh-home h4 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--fg); }
.dh-home .addr { font-family: var(--mono); font-size: 11.5px; color: var(--fg-dim); margin-top: 3px; }
.dh-twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .dh-twocol { grid-template-columns: 1fr; } }
.dh-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ---- skeleton ---- */
.dh-skel { border-radius: 12px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: dhsk 1.4s linear infinite; min-height: 96px; }
@keyframes dhsk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .dh-skel { animation: none; } .dh-char, .dh-btn { transition: none; } }

@media (max-width: 620px) {
  .dh-card { padding: 16px; }
  .dh-hero { grid-template-columns: 1fr; }
  .dh-table .hide-sm { display: none; }
  .dh-nav { top: calc(var(--nav-h) - 4px); }
}

/* v3 polish */
.dh-card .gauge-card { border: 0; background: none; padding: 0; }
.dh-card .btn-queue { align-self: flex-start; }
.dh-nav { background: color-mix(in srgb, var(--surface) 97%, transparent); }

@media (min-width: 900px) { .dh-grid > .s12 { grid-column: span 12; } }
