/* "New look" skin of the dashboard (2026-10-26). Everything here is scoped to
 * html[data-skin="v2"] (set before render by skin.js), so the classic look is
 * untouched and one switch at the bottom of the menu brings it back.
 *
 * Harvest brand (docs/design/harvest-design.md): two themes, set by skin.js as
 * html[data-theme] — "copper" (Night & Copper, the default) and "olive" (Olive &
 * Terracotta). Light by default, dark when the OS is dark. In each theme:
 *   --brand   the primary ink (navy / olive): logo, the one solid button per view;
 *   --accent  the warm second colour (copper / terracotta), darkened to pass AA
 *             as text: links, focus ring, active menu item, tab underline;
 *   neutrals are tinted towards the brand; status colours stay green / amber / red.
 * Most pages style themselves with the shared variables (--bg, --panel, --text …),
 * so redefining them restyles inline page styles too; the rules below fix what
 * variables can't. */

html[data-skin="v2"] {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #f3f4f7;
  --border: rgb(20 30 52 / 0.1);
  --ring: rgb(20 30 52 / 0.12);
  --hover: rgb(20 30 52 / 0.04);
  --text: #141a26;
  --muted: #5d6678;
  --gray: #9aa1ae;
  --sidebar: #f7f8fa;
  --brand: #1c2b4a;
  --brand-ink: #ffffff;
  --accent: #9a5b1b;
  --accent-ink: #ffffff;
  --accent-soft: rgb(201 138 61 / 0.14);
  --accent-strong: #c98a3d;
  --logo-ink: #1c2b4a;
  --logo-accent: #c98a3d;
  --logo-snow: transparent;
  --login-art: url("/static/img/login-art-copper.jpg");
  --login-art-bg: #1c2b4a;
  --green: #15803d;
  --orange: #a16207;
  --red: #b91c1c;
  --shadow: 0 1px 2px rgb(20 30 52 / 0.05);
  --radius: 12px;
  --side-w: 248px;
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html[data-skin="v2"][data-theme="olive"] {
  --panel-2: #f4f4ef;
  --border: rgb(38 42 22 / 0.1);
  --ring: rgb(38 42 22 / 0.13);
  --hover: rgb(38 42 22 / 0.04);
  --text: #1c1f14;
  --muted: #64685a;
  --gray: #a2a594;
  --sidebar: #f8f8f4;
  --brand: #4a5a23;
  --accent: #a9481f;
  --accent-soft: rgb(196 98 58 / 0.13);
  --accent-strong: #c4623a;
  --logo-ink: #4a5a23;
  --logo-accent: #c4623a;
  --login-art: url("/static/img/login-art-olive.jpg");
  --login-art-bg: #4a5a23;
  --shadow: 0 1px 2px rgb(38 42 22 / 0.05);
}

@media (prefers-color-scheme: dark) {
  html[data-skin="v2"] {
    --bg: #0b1020;
    --panel: #121829;
    --panel-2: #1a2236;
    --border: rgb(255 255 255 / 0.08);
    --ring: rgb(255 255 255 / 0.12);
    --hover: rgb(255 255 255 / 0.05);
    --text: #e9edf5;
    --muted: #98a2b6;
    --gray: #6b7385;
    --sidebar: #0e1424;
    --brand: #d8a15e;
    --brand-ink: #1a1206;
    --accent: #e2ad6b;
    --accent-ink: #1a1206;
    --accent-soft: rgb(226 173 107 / 0.14);
    --accent-strong: #d8a15e;
    --logo-ink: #e9edf5;
    --logo-accent: #d8a15e;
    --logo-snow: #e9edf5;
    --green: #4ade80;
    --orange: #facc15;
    --red: #f87171;
    --shadow: none;
    color-scheme: dark;
  }
  html[data-skin="v2"][data-theme="olive"] {
    --bg: #0e100a;
    --panel: #161910;
    --panel-2: #20241a;
    --sidebar: #12140d;
    --border: rgb(255 255 255 / 0.08);
    --ring: rgb(255 255 255 / 0.12);
    --hover: rgb(255 255 255 / 0.05);
    --shadow: none;
    --text: #eceee4;
    --muted: #a3a792;
    --gray: #6f7363;
    --brand: #a7b86b;
    --brand-ink: #141708;
    --accent: #e88a62;
    --accent-ink: #1a0d06;
    --accent-soft: rgb(232 138 98 / 0.14);
    --accent-strong: #e07a50;
    --logo-ink: #dfe6c6;
    --logo-accent: #e07a50;
    --logo-snow: #dfe6c6;
  }
}

/* ------------------------------------------------------------- logo -- */
/* The logo is drawn from one-colour SVG layers used as masks, so the theme
   (and light / dark) colours it: <span class="hv-mark"><i></i><i></i><i></i></span>
   — ink, accent, snow; .hv-word has ink + accent. Built by skin.js. */
html[data-skin="v2"] .hv-lockup { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; flex: none; }
html[data-skin="v2"] :is(.hv-mark, .hv-word) { position: relative; flex: none; }
html[data-skin="v2"] .hv-mark { height: 30px; aspect-ratio: 1366 / 1402; }
html[data-skin="v2"] .hv-word { height: 17px; aspect-ratio: 1398 / 286; }
html[data-skin="v2"] :is(.hv-mark, .hv-word) > i {
  position: absolute;
  inset: 0;
  -webkit-mask: var(--m) center / contain no-repeat;
  mask: var(--m) center / contain no-repeat;
}
html[data-skin="v2"] .hv-mark > i:nth-child(1) { --m: url("/static/brand/harvest-mark-ink.svg"); background: var(--logo-ink); }
html[data-skin="v2"] .hv-mark > i:nth-child(2) { --m: url("/static/brand/harvest-mark-accent.svg"); background: var(--logo-accent); }
html[data-skin="v2"] .hv-mark > i:nth-child(3) { --m: url("/static/brand/harvest-mark-snow.svg"); background: var(--logo-snow); }
html[data-skin="v2"] .hv-word > i:nth-child(1) { --m: url("/static/brand/harvest-word-ink.svg"); background: var(--logo-ink); }
html[data-skin="v2"] .hv-word > i:nth-child(2) { --m: url("/static/brand/harvest-word-accent.svg"); background: var(--logo-accent); }
/* The page's own "Harvest" heading stays for screen readers only. */
html[data-skin="v2"] .brand:has(.hv-lockup) h1,
html[data-skin="v2"] .login-brand:has(> .hv-lockup) h1 {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* ---------------------------------------------------------------- base -- */
html[data-skin="v2"] body {
  background: var(--bg);
  color: var(--text);
  font-family: "InterVariable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss01";
  font-size: 14px;
  isolation: isolate;
}
html[data-skin="v2"] h1, html[data-skin="v2"] h2, html[data-skin="v2"] h3 {
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
html[data-skin="v2"] a { color: var(--accent); }
html[data-skin="v2"] .muted, html[data-skin="v2"] .sub { color: var(--muted); }
html[data-skin="v2"] :is(.value, .num, .right, td, .tx-amount, .tx-usd) { font-variant-numeric: tabular-nums; }
html[data-skin="v2"] :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------- app frame: sidebar -- */
html[data-skin="v2"] header {
  background: var(--sidebar);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}
html[data-skin="v2"] .brand h1 { font-size: 15px; font-weight: 600; }
html[data-skin="v2"] .dot.live { box-shadow: 0 0 0 3px rgb(5 150 105 / 0.18); }
html[data-skin="v2"] .env-badge {
  background: var(--accent-soft); color: var(--accent); border: none;
  text-transform: none; font-weight: 500; font-size: 12px; padding: 2px 8px;
}

html[data-skin="v2"] nav a {
  color: var(--muted);
  font-weight: 500;
  border-radius: 8px;
  padding: 7px 10px;
}
html[data-skin="v2"] nav a:hover { color: var(--text); background: var(--hover); }
html[data-skin="v2"] nav a.active { color: var(--text); background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent-strong); }
html[data-skin="v2"] .nav-group {
  display: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  padding: 16px 10px 4px;
  white-space: nowrap;
}
html[data-skin="v2"] .nav-foot { display: contents; }
/* Each menu item is an icon and its label (nav-auth.js). */
html[data-skin="v2"] header nav :is(a, .nav-logout) { display: flex; align-items: center; gap: 10px; }
html[data-skin="v2"] header nav :is(a, .nav-logout):focus-visible { outline-offset: -2px; }
html[data-skin="v2"] .nav-ico {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
html[data-skin="v2"] header nav a.active .nav-ico { color: var(--accent); }
/* A long name (ru, es) wraps to a second line rather than being cut off. */
html[data-skin="v2"] .nav-label { min-width: 0; white-space: normal; overflow-wrap: break-word; line-height: 1.3; }
html[data-skin="v2"] button.nav-logout {
  background: transparent; border: 0; font: inherit; font-weight: 500; color: var(--muted); text-align: left;
  border-radius: 8px; padding: 7px 10px; cursor: pointer;
}
html[data-skin="v2"] button.nav-logout:hover { color: var(--text); background: var(--hover); }
/* The fold handle sits on the sidebar's edge from 1024px (below, the burger menu). */
html[data-skin="v2"] .nav-fold { display: none; }
/* The rail's tooltip (nav-auth.js): dark on light, light on dark. */
html[data-skin="v2"] .nav-tip {
  position: fixed; z-index: 1000; transform: translateY(-50%); pointer-events: none;
  background: var(--text); color: var(--bg); box-shadow: 0 6px 18px rgb(0 0 0 / 0.18);
  font-size: 12px; font-weight: 500; line-height: 1.35; padding: 5px 9px; border-radius: 7px; white-space: nowrap;
}
html[data-skin="v2"] .nav-tip[hidden] { display: none; }
html[data-skin="v2"] .nav-tip kbd {
  font: inherit; font-size: 11px; margin-left: 2px; padding: 0 5px; border-radius: 4px;
  border: 1px solid currentColor; opacity: 0.75;
}

@media (min-width: 1024px) {
  html[data-skin="v2"] body { padding-left: var(--side-w); }
  html[data-skin="v2"] header {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--side-w);
    z-index: 20;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    padding: 18px 12px 12px;
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
  html[data-skin="v2"] .brand { padding: 0 6px 6px; flex-wrap: wrap; row-gap: 4px; }
  html[data-skin="v2"] .brand h1 { white-space: normal; }
  html[data-skin="v2"] header nav {
    flex: 1;
    min-height: 0;
    flex-direction: column;
    gap: 1px;
    overflow-x: hidden;
    overflow-y: auto;
  }
  html[data-skin="v2"] header nav a { flex: none; }
  html[data-skin="v2"] .nav-group { display: block; }
  html[data-skin="v2"] .nav-foot {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    padding: 12px 4px 0;
    border-top: 1px solid var(--border);
  }
  html[data-skin="v2"] .nav-foot .nav-user { padding: 0 6px; font-size: 12px; }
  html[data-skin="v2"] .nav-foot .theme-switch { padding: 2px 6px; }
  html[data-skin="v2"] .nav-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 2px; }
  html[data-skin="v2"] main { max-width: 1440px; padding: 28px 32px 48px; }

  /* Fold handle: a round button on the sidebar's right edge, level with the logo. */
  html[data-skin="v2"] .nav-fold {
    display: inline-flex; align-items: center; justify-content: center;
    position: absolute; top: 20px; right: -13px; z-index: 1;
    width: 26px; height: 26px; padding: 0; border-radius: 999px; cursor: pointer;
    background: var(--panel); color: var(--muted); border: 1px solid var(--ring);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.08);
  }
  html[data-skin="v2"] .nav-fold:hover { color: var(--text); border-color: var(--accent-strong); }
  html[data-skin="v2"] .nav-fold .nav-ico { width: 14px; height: 14px; stroke-width: 2.25; }
  html[data-skin="v2"] .nav-fold .nav-ico-unfold,
  html[data-skin="v2"][data-nav="rail"] .nav-fold .nav-ico-fold { display: none; }
  html[data-skin="v2"][data-nav="rail"] .nav-fold .nav-ico-unfold { display: block; }

  /* The icon rail (html[data-nav="rail"], nav-auth.js): icons only, the page
     takes the width. Labels stay for screen readers and show as tooltips. */
  /* Only where there is a menu: the sign-in and partner pages keep their layout. */
  html[data-skin="v2"][data-nav="rail"] body:has(> header) { --side-w: 56px; }
  html[data-skin="v2"][data-nav="rail"] header { padding: 18px 7px 12px; }
  html[data-skin="v2"][data-nav="rail"] .brand { justify-content: center; padding: 0 0 6px; position: relative; }
  html[data-skin="v2"][data-nav="rail"] .brand > :not(.hv-lockup):not(h1),
  html[data-skin="v2"][data-nav="rail"] .brand .hv-word { display: none; }
  html[data-skin="v2"][data-nav="rail"] .brand .hv-mark { height: 26px; }
  /* The live-feed connection light (Live, T-People) stays, small, on the logo's corner. */
  html[data-skin="v2"][data-nav="rail"] .brand > #conn-dot.dead {
    display: block; position: absolute; top: -3px; left: 5px; width: 8px; height: 8px;
  }
  /* A long admin menu scrolls in the rail too: a thin scrollbar shows there is more. */
  html[data-skin="v2"][data-nav="rail"] header nav { scrollbar-width: thin; }
  html[data-skin="v2"][data-nav="rail"] header nav :is(a, .nav-logout) {
    justify-content: center; gap: 0; padding: 0; height: 34px; flex: none;
  }
  html[data-skin="v2"][data-nav="rail"] header nav a.active { box-shadow: none; }
  html[data-skin="v2"][data-nav="rail"] .nav-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  /* Group names become thin dividers (still read out). */
  html[data-skin="v2"][data-nav="rail"] .nav-group {
    font-size: 0; line-height: 0; height: 1px; padding: 0; margin: 8px 6px; background: var(--border); overflow: hidden;
  }
  html[data-skin="v2"][data-nav="rail"] header nav > .nav-group:first-child { background: transparent; margin-top: 2px; }
  /* At the bottom only Logout; the user, theme, language and look come back with the menu. */
  html[data-skin="v2"][data-nav="rail"] .nav-foot { padding: 8px 0 0; }
  html[data-skin="v2"][data-nav="rail"] .nav-foot > :not(.nav-logout) { display: none; }
}
/* Folding glides; never for people who asked for less motion. */
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  html[data-skin="v2"] body { transition: padding-left 0.18s ease; }
  html[data-skin="v2"] header { transition: width 0.18s ease, padding 0.18s ease; }
}

/* Phone and tablet: a slim top bar, the menu opens as a full-width sheet. */
@media (max-width: 1023px) {
  html[data-skin="v2"] header { background: var(--bg); padding: 10px 14px; }
  html[data-skin="v2"] .nav-toggle { background: transparent; border-color: var(--border); border-radius: 10px; width: 44px; height: 44px; }
  html[data-skin="v2"] header.nav-open {
    position: fixed; inset: 0; z-index: 50; align-content: flex-start; overflow-y: auto;
  }
  html[data-skin="v2"] header.nav-open nav { border-top-color: var(--border); }
  html[data-skin="v2"] header nav :is(a, .nav-logout) { font-size: 16px; padding: 12px; color: var(--text); }
  html[data-skin="v2"] header nav a.active { background: var(--accent-soft); }
  html[data-skin="v2"] .nav-group { display: block; padding: 18px 12px 4px; font-size: 13px; }
  html[data-skin="v2"] .nav-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; }
  html[data-skin="v2"] .nav-foot .theme-switch { padding: 12px 12px 0; font-size: 13px; gap: 12px; }
  html[data-skin="v2"] .theme-switch button { width: 28px; height: 28px; }
  html[data-skin="v2"] main { padding: 18px 16px 40px; }
}

/* ------------------------------------------------------ surfaces / cards -- */
html[data-skin="v2"] :is(.card, .panel, .panel-box, .feed, .chain-pill, .live-box, .metric-card) {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
}
html[data-skin="v2"] .card { padding: 16px 18px; }
html[data-skin="v2"] .card .label {
  text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html[data-skin="v2"] .card .value { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
html[data-skin="v2"] .cards { gap: 12px; }
html[data-skin="v2"] .feed-header { border-bottom-color: var(--border); }
/* Classic dark-glass fills (feed footer, chart wells) read as grey bars on the light skin. */
html[data-skin="v2"] .feed-footer { background: transparent; }
html[data-skin="v2"] .stacked-canvas-wrap { background: var(--panel-2); }
html[data-skin="v2"] .legend-item { background: var(--panel); border-color: var(--ring); }
/* The T-People feed grid is 1250px; the page lets it scroll inside its frame only
   below a 1280px window, which forgets the 248px menu — the whole page slid sideways
   on a 1440 laptop. With the menu, the frame scrolls up to 1600px. */
@media (max-width: 1600px) {
  html[data-skin="v2"] .feed-table-wrap { overflow-x: auto; }
}
/* --gray is for placeholders; as status text on white it fell below 3:1. */
html[data-skin="v2"] :is(.bill-status.no-activity, .status-retired) { color: var(--muted); }
/* Phone: the Users/Team tables scroll inside their box (a 1fr column grew to the
   table's width and widened the page), and the 24 hourly bars of Analytics shrink. */
@media (max-width: 880px) {
  html[data-skin="v2"] .users-grid { grid-template-columns: minmax(0, 1fr); }
  html[data-skin="v2"] .users-grid .panel-box { overflow-x: auto; }
}
@media (max-width: 600px) {
  html[data-skin="v2"] .mini-bars { grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; }
}
html[data-skin="v2"] .chain-pill .net { color: var(--text); text-transform: none; font-size: 13px; }
html[data-skin="v2"] .chain-pill .health-line { text-transform: none; letter-spacing: 0; font-size: 12px; }
html[data-skin="v2"] .chain-pill .health-dot { box-shadow: none !important; }
html[data-skin="v2"] .chain-pill.level-green { border-color: var(--border); }

/* ------------------------------------------------------------- tables -- */
html[data-skin="v2"] :is(table, .analytics-table, .clients-table, table.users, table.infra, .delta-table) {
  border-collapse: collapse;
}
html[data-skin="v2"] :is(th, .feed-columns) {
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--muted) !important;
  white-space: nowrap;
  background: transparent !important;
}
html[data-skin="v2"] :is(th, td) { border-left: none !important; border-right: none !important; }
html[data-skin="v2"] td { border-bottom: 1px solid var(--border); }
html[data-skin="v2"] thead th { border-bottom: 1px solid var(--border); }
html[data-skin="v2"] tbody tr:hover td { background: var(--hover); }
html[data-skin="v2"] .feed-columns { border-bottom-color: var(--border); }
html[data-skin="v2"] .tx-row { border-bottom: 1px solid var(--border); }
html[data-skin="v2"] .tx-row:hover { background: var(--hover); }

/* ------------------------------------------------------ forms & buttons -- */
html[data-skin="v2"] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--ring);
  border-radius: 8px;
}
html[data-skin="v2"] :is(input, select, textarea):focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
html[data-skin="v2"] :is(input, select, textarea)::placeholder { color: var(--gray); }
html[data-skin="v2"] input[type="checkbox"], html[data-skin="v2"] input[type="radio"] { accent-color: var(--accent); }

/* Primary: solid brand ink (one per view in practice — the main action). */
html[data-skin="v2"] :is(.primary-btn, .btn-primary, button[type="submit"]:not(.ghost-btn):not(.btn-ghost):not(.btn)) {
  background: var(--brand);
  color: var(--brand-ink);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  padding: 8px 14px;
}
html[data-skin="v2"] :is(.primary-btn, .btn-primary):hover { filter: brightness(1.06); }
/* Secondary: quiet outline. */
html[data-skin="v2"] :is(.ghost-btn, .btn-ghost, .btn, .icon-btn, .pct-btn, .tab-btn, .filters button, .delta-actions button, .row-actions button, .tag-edit, .mini-refresh) {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--ring);
  border-radius: 8px;
}
html[data-skin="v2"] :is(.ghost-btn, .btn-ghost, .btn, .icon-btn, .pct-btn, .tab-btn, .filters button, .row-actions button, .tag-edit):hover {
  background: var(--panel-2);
  border-color: var(--ring);
}
/* Dangerous actions stay secondary — red text only. */
html[data-skin="v2"] :is(.btn-danger, .btn.danger, .row-actions button.danger, button.danger) {
  background: var(--panel);
  color: var(--red);
  border: 1px solid var(--ring);
}
html[data-skin="v2"] :is(.btn-danger, .btn.danger, button.danger):hover { background: rgb(220 38 38 / 0.06); }

/* -------------------------------------------- badges, tags, pills, tabs -- */
html[data-skin="v2"] :is(.tag-chip, .pill, .role-badge, .avg-delta-pill, .deal-badge, .tg-chip) {
  border: none;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 500;
}
html[data-skin="v2"] .tx-tag { border-radius: 999px; font-weight: 500; }
html[data-skin="v2"] .role-superadmin { background: rgb(217 119 6 / 0.12); color: var(--orange); }
html[data-skin="v2"] .role-admin { background: var(--accent-soft); color: var(--accent); }
html[data-skin="v2"] .pill.ok { background: rgb(5 150 105 / 0.12); color: var(--green); }
html[data-skin="v2"] .pill.wait { background: rgb(217 119 6 / 0.12); color: var(--orange); }
html[data-skin="v2"] .avg-delta-pill { background: var(--accent-soft); color: var(--accent); }

html[data-skin="v2"] .client-tabs { gap: 4px; border-bottom: 1px solid var(--border); padding-bottom: 0; flex-wrap: nowrap; overflow-x: auto; }
html[data-skin="v2"] .client-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
html[data-skin="v2"] .client-tab:hover { color: var(--text); }
html[data-skin="v2"] .client-tab.is-active { color: var(--text); border-bottom-color: var(--accent); }

html[data-skin="v2"] .lang-switch, html[data-skin="v2"] .skin-switch { border-color: var(--ring); border-radius: 8px; }
html[data-skin="v2"] .lang-switch button.active { background: var(--accent-soft); color: var(--accent); }
html[data-skin="v2"] .skin-switch {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: var(--muted); border: 1px solid var(--ring);
  padding: 4px 8px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
html[data-skin="v2"] .skin-switch:hover { color: var(--text); background: var(--panel-2); }
/* Theme picker: one round swatch per theme (brand ink + warm accent halves). */
html[data-skin="v2"] .theme-switch { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
html[data-skin="v2"] .theme-switch button {
  position: relative; width: 20px; height: 20px; padding: 0; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--ring);
  background: linear-gradient(135deg, var(--sw-ink) 50%, var(--sw-accent) 50%);
}
html[data-skin="v2"] .theme-switch button[aria-pressed="true"] { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
html[data-skin="v2"] .theme-switch button::after { content: ""; position: absolute; inset: -12px; }
html[data-skin="v2"] .theme-switch [data-theme-set="copper"] { --sw-ink: #1c2b4a; --sw-accent: #c98a3d; }
html[data-skin="v2"] .theme-switch [data-theme-set="olive"] { --sw-ink: #4a5a23; --sw-accent: #c4623a; }
html[data-skin="v2"] .nav-logout { color: var(--muted); }

/* --------------------------------------------------------------- dialogs -- */
html[data-skin="v2"] dialog {
  background: var(--panel);
  color: var(--text);
  border: none;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgb(0 0 0 / 0.18), 0 0 0 1px var(--ring);
}
html[data-skin="v2"] dialog::backdrop { background: rgb(9 9 11 / 0.4); backdrop-filter: blur(2px); }
@media (prefers-color-scheme: dark) {
  html[data-skin="v2"] dialog { box-shadow: 0 0 0 1px var(--ring); }
  html[data-skin="v2"] dialog::backdrop { background: rgb(0 0 0 / 0.6); }
}

/* --------------------------------------------------------- banners etc. -- */
html[data-skin="v2"] #auth-banner, html[data-skin="v2"] .banner {
  border-radius: 10px; border: 1px solid var(--border);
}

/* ------------------------------------------------------------- login -- */
/* Form on the left, artwork on the right from 900px; the form alone on phones. */
@media (min-width: 900px) {
  html[data-skin="v2"] body:has(.login-card) {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    min-height: 100dvh;
  }
  html[data-skin="v2"] body:has(.login-card)::after {
    content: "";
    background: var(--login-art-bg) var(--login-art) center / cover no-repeat;
  }
}
html[data-skin="v2"] .login-card {
  background: transparent;
  border: none;
  box-shadow: none;
  max-width: 340px;
  padding: 8px 0;
}
html[data-skin="v2"] .login-card h1 { font-size: 22px; }
html[data-skin="v2"] .login-card .sub { font-size: 14px; }
html[data-skin="v2"] .login-card label { font-size: 13px; font-weight: 500; color: var(--text); }
html[data-skin="v2"] .login-card input { background: var(--panel); border: 1px solid var(--ring); padding: 10px 12px; }
html[data-skin="v2"] .login-card button { background: var(--brand); color: var(--brand-ink); }
html[data-skin="v2"] .login-brand { margin-bottom: 28px; }
html[data-skin="v2"] .login-brand .dot { display: none; }
html[data-skin="v2"] .login-card .hv-mark { height: 40px; }
html[data-skin="v2"] .login-card .hv-word { height: 22px; }
/* The code-setup step: the logo above its own heading. */
html[data-skin="v2"] .login-card > .hv-lockup { margin-bottom: 20px; }
html[data-skin="v2"] .login-error { border-color: transparent; }
@media (min-width: 900px) {
  html[data-skin="v2"] .login-lang { right: auto; left: 24px; top: 20px; }
}

/* ------------------------------------------------- no shouting labels -- */
/* The classic look writes small labels in CAPS with letter-spacing; the new
   look uses sentence case everywhere (pages set it in many local styles). */
html[data-skin="v2"] :is(h1, h2, h3, h4, label, th, .label, .l, .kpi .label, .section-title, .stat .l,
  .net-card .net-name, .tx-net, .tx-fee-note, .env-badge, .health-line, .feed-columns, .legend-label,
  [class*="-label"], [class*="label-"], [class*="eyebrow"], [class*="caption"],
  .tx-group-head, .tx-status, .tx-dir, .tx-tag, .chain-pill .net, .status-pill, .badge) {
  text-transform: none !important;
  letter-spacing: 0 !important;
}
html[data-skin="v2"] .section-title { color: var(--text); font-size: 15px; font-weight: 600; }
html[data-skin="v2"] .kpi .label, html[data-skin="v2"] .stat .l { color: var(--muted); font-size: 13px; font-weight: 500; }
/* One solid button per page: on Users the team form's button is secondary. */
html[data-skin="v2"] #team-save { background: var(--panel); color: var(--text); border: 1px solid var(--ring); font-weight: 500; }
html[data-skin="v2"] #team-save:hover { background: var(--panel-2); }
/* Referrals: "Add preset" is the page's solid button; the partner-login form is secondary. */
html[data-skin="v2"] #cab-form button[type="submit"] { background: var(--panel); color: var(--text); border: 1px solid var(--ring); font-weight: 500; }
html[data-skin="v2"] #cab-form button[type="submit"]:hover { background: var(--panel-2); }
/* Arc filter: the chosen segment is soft, not a second solid button; the weight never changes. */
html[data-skin="v2"] .seg button { font-weight: 500; }
html[data-skin="v2"] .seg button.active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
/* Phones: the artwork as a slim band above the form. */
@media (max-width: 899px) {
  html[data-skin="v2"] body:has(.login-card)::before {
    content: "";
    display: block;
    height: 190px;
    background: var(--login-art-bg) var(--login-art) 50% 30% / cover no-repeat;
  }
  html[data-skin="v2"] body:has(.login-card) .login-wrap { min-height: calc(100dvh - 190px); align-items: flex-start; padding-top: 36px; }
  html[data-skin="v2"] .login-lang .lang-switch { background: rgb(255 255 255 / 0.9); border-color: transparent; }
}
/* Phones: summary cards side by side in a swipeable row, not a screen-tall stack. */
@media (max-width: 640px) {
  html[data-skin="v2"] .cards {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
    margin: 0 -16px 20px;
    padding: 0 16px 4px;
    scrollbar-width: none;
  }
  html[data-skin="v2"] .cards::-webkit-scrollbar { display: none; }
  html[data-skin="v2"] .cards > .card { flex: 0 0 74%; scroll-snap-align: start; }
  html[data-skin="v2"] .card .value { font-size: 24px; }
}
