/* ===== Hub v6, professional skin (Nov 2026, V: "the Hub looks gamified or childish, make it modern and professional") =====
   Loaded after hub5.css. Ideas from the enterprise tools V's team knows (Linear, Stripe Dashboard, HubSpot, Close.com): one calm accent instead of a colour per
   workspace, flat surfaces with a hairline border, small radii, quiet type (one family, medium weights, no heavy display headings), neutral rail with plain icons,
   solid primary buttons, no bounce. Dark rules live in the usual prefers-color-scheme blocks, which public/js/theme.js can force on or off. */
:root {
  --bg: #E3EAE6; --surface: #FFFFFF; --surface-2: #EDF2EF; --ink: #0E1A15; --ink-2: #26362F; --muted: #42514A; --line: #C3CFC8; --line-2: #A5B5AD;
  --acc: #0A6B4C; --acc-soft: #D6EBE1; --btn: #0A6B4C; --btn-ink: #FFFFFF; --btn-hover: #085A40;
  --fill: #FFFFFF; --on-fill: #15201B; --sel: #0A6B4C; --on-sel: #FFFFFF;
  --mint-soft: #E1EDE7; --mint-mid: #C9E0D5;
  --r: 10px; --shadow: 0 1px 2px rgba(13, 25, 20, .10), 0 8px 20px -12px rgba(13, 25, 20, .24);
  --display: 'Instrument Sans', system-ui, sans-serif;
  --ws-home: var(--acc); --ws-sell: var(--acc); --ws-inbox: var(--acc); --ws-clients: var(--acc); --ws-deliver: var(--acc); --ws-insights: var(--acc); --ws-money: var(--acc); --ws-automate: var(--acc); --ws-settings: var(--acc);
  --wsc: var(--acc); --wst: var(--acc); --wsl: var(--acc-soft);
  --rail: #111A16; --rail-ink: #A9B8B1;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C1210; --surface: #121A17; --surface-2: #161F1B; --ink: #E8EEEB; --ink-2: #C3CFC9; --muted: #8F9E97; --line: #243029; --line-2: #33413A;
    --acc: #5CD6A8; --acc-soft: rgba(92, 214, 168, .12); --btn: #2FBF8D; --btn-ink: #04140D; --btn-hover: #4BD3A2;
    --fill: #121A17; --on-fill: #E8EEEB; --sel: #2FBF8D; --on-sel: #04140D;
    --mint-soft: rgba(92, 214, 168, .08); --mint-mid: rgba(92, 214, 168, .16);
    --rail: #090F0D; --rail-ink: #94A39C; --shadow: none;
    --ws-home: var(--acc); --ws-sell: var(--acc); --ws-inbox: var(--acc); --ws-clients: var(--acc); --ws-deliver: var(--acc); --ws-insights: var(--acc); --ws-money: var(--acc); --ws-automate: var(--acc); --ws-settings: var(--acc);
    --wsc: var(--acc); --wst: var(--acc); --wsl: var(--acc-soft);
  }
}
body { font-size: 15px; }
h1, h2, h3, .hub .main h2 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; }
.hub .main .page-head h1 { font: 600 24px/1.25 var(--display); letter-spacing: -.015em; }
.hub .main h2 { font-size: 18px; } .hub .main h3 { font-size: 15.5px; }
.stat-num, .tile .stat-num, .ins-tile b, .num, .mono.big { font-weight: 600; letter-spacing: -.01em; }
.stat-num { font-weight: 600; }

/* Rail: narrow, neutral, plain icons. Active = a lighter tile with a thin accent edge. */
@media (min-width: 901px) {
  .hub, body.rail-collapsed .hub { grid-template-columns: 76px minmax(0, 1fr); }
  .rail nav a.ws-tile { border-radius: 8px; font: 500 11px/1.1 var(--body); padding: 9px 2px 7px; color: var(--rail-ink); }
  .rail nav a.ws-tile:hover { background: rgba(255, 255, 255, .06); color: #fff; }
  .rail nav a.ws-tile.is-active, html[data-ws] .rail nav a.ws-tile.is-active { background: rgba(255, 255, 255, .10); color: #fff; box-shadow: inset 2px 0 0 var(--acc); }
  html[data-ws=money] .rail nav a.ws-tile.is-active, html[data-ws=deliver] .rail nav a.ws-tile.is-active { color: #fff; }
  .rail nav a.ws-tile .nbadge { background: #D64545; }
  .rail nav a.ws-tile.is-active .nbadge { background: #D64545; color: #fff; }
}
html .rail nav [data-wsg] .ws-tile:not(.is-active) svg, html .rail nav a.ws-tile[data-nav] svg { color: inherit; }
.rail nav a.ws-tile svg { width: 20px; height: 20px; stroke-width: 1.7; }
.rail-brand .rb-mark { border-radius: 8px; }
@media (max-width: 900px) { .rail nav a.ws-tile.is-active { background: rgba(255, 255, 255, .1); } .rail nav a.ws-tile.is-active::before { background: var(--acc); } }

/* Command bar and tabs */
.hub .cmd { box-shadow: none; border-bottom: 1px solid var(--line); }
.cmd-title small, .cmd-title[data-ws] small { display: none; }
.cmd-title b { font: 600 16px var(--display); letter-spacing: -.005em; }
.cmd-search, .cmd-ico, .stpill { border-radius: 8px; }
.cmd-search:hover, .cmd-ico:hover { border-color: var(--line-2); }
.ws-tabs a { font: 500 14px var(--body); padding: 12px 12px 11px; }
.ws-tabs a.is-active { color: var(--ink); font-weight: 600; }
.ws-tabs a::after { height: 2px; border-radius: 0; }
.ws-tabs a .nbadge { background: #D64545; }
.hub .main .tabs a, .hub .main .tabs button { font-weight: 500; }
.hub .main .tabs a.is-active, .hub .main .tabs button.is-active { font-weight: 600; }

/* Surfaces */
.hub .main .card, .card { border-radius: var(--r); box-shadow: none; }
.hub .main .stat { border-radius: 8px; }
.hub .main .stat[class*="tint-"], .hub .main .card[class*="wc-"] { box-shadow: none; background: var(--surface); }
.hub .main .stat.hero, .hub .main .tile.hero { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.stat.hero .stat-num, .hero .stat-num { color: var(--ink); } .stat.hero .stat-label, .hero .stat-label { color: var(--muted); }
.hub .resume-strip { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; }
.hub .resume-strip .rs-text b { color: var(--ink); font: 600 14.5px var(--body); }
.hello h1, .hello .hello-name { font-weight: 600; }
.hello-av { border-radius: 10px; }

/* Controls */
.btn { border-radius: 8px; font: 600 14px var(--body); min-height: 38px; padding: 8px 16px; transition: background .12s, border-color .12s; }
.btn-sm { min-height: 32px; padding: 5px 12px; font-size: 13px; border-radius: 7px; }
.btn-xl { min-height: 52px; border-radius: 10px; font-size: 16px; }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line-2); }
.btn-mint { background: var(--acc-soft); color: var(--acc); box-shadow: none; border-color: transparent; }
.btn-mint:hover:not(:disabled) { background: var(--mint-mid); }
input, select, textarea { border-radius: 8px; min-height: 38px; padding: 8px 12px; background: var(--surface); }
textarea { min-height: 90px; }
input:focus, select:focus, textarea:focus, :focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
.badge { border-radius: 6px; font-weight: 600; }
.chip, .chips button, .seg, .seg button, .tiers button { border-radius: 8px; }
.pill, .stpill { border-radius: 8px; }
.modal { border-radius: 12px; }
.toast { border-radius: 8px; }
.col, .board .col { border-radius: 10px; }


/* Dark: sticky bits that hub.css paints with the old accent */
@media (prefers-color-scheme: dark) {
  .tabs a.is-active, .seg button.is-on, .tiers button.is-on, .aib, .hello-av, .pbub { background: var(--sel); color: var(--on-sel); }
}
.pbub, .hello-av { background: var(--acc-soft); color: var(--acc); border: 1px solid var(--line); font-weight: 600; }
.pbub.big { background: var(--acc-soft); }
@media (prefers-color-scheme: dark) { .pbub, .hello-av { background: var(--acc-soft); color: var(--acc); } }


/* ===== Easy on the eyes (Nov 2026, V: keep every animation and sound, make it modern, calm, not overwhelming or cluttered) =====
   Less color, fewer borders, quieter helpers, more air. Nothing is removed: info dots, quick links, the Ask Claude button and the list strip all still work,
   they just stay quiet until you need them. Modeled on the restraint in Linear, Stripe Dashboard and Notion. */
:root { --gap: 18px; --pad: 20px; }
.bento { gap: var(--gap); }
.hub .main .card, .card { padding: var(--pad); border-color: var(--line); }
.hub .main .stat { padding: 18px 20px; }
.hub .main { --section-gap: 22px; }

/* One colour only: no rainbow dots, tops or tints */
.card[class*="wc-"] { border-top: 1px solid var(--line); }
.card[class*="wc-"] .card-head h2::before { display: none; }
.stat[class*="tint-"] { background: var(--surface); border-color: var(--line); }
.stat[class*="tint-"] .stat-num { color: var(--ink); }
.stat::after { display: none; }
.tile-spark { opacity: .55; }
.col { border-top: 2px solid color-mix(in srgb, var(--sc, var(--line-2)) 55%, var(--line)); }

/* Helpers stay quiet until hovered */
.xi { opacity: 0; transition: opacity .15s; border-color: transparent; background: transparent; }
.stat:hover .xi, .card:hover .xi, .xi:focus-visible, .xi[aria-expanded="true"], label:hover .xi, th:hover .xi { opacity: .75; }
@media (hover: none) { .xi { opacity: .45; } }
.qb-chip { border-color: transparent; background: transparent; color: var(--muted); font-weight: 500; padding: 5px 9px; }
.qb-chip:hover { background: var(--mint-soft); color: var(--ink); }
.cmd-ico, .cmd-search, .stpill { border-color: transparent; background: transparent; }
.cmd-search { background: var(--surface-2); }
.cmd-ico:hover, .stpill:hover { background: var(--surface-2); border-color: var(--line); }
.hub .cmd { gap: 6px; }

/* Ask Claude: a small round button instead of a big black block */
.aib { width: 42px; height: 42px; border-radius: 50%; background: var(--surface); color: var(--acc); border: 1px solid var(--line-2); box-shadow: 0 4px 16px rgba(10, 30, 22, .12); }
.aib svg { width: 20px; height: 20px; }
@media (prefers-color-scheme: dark) { .aib { background: var(--surface-2); color: var(--acc); } }
@media (max-width: 900px) { .aib { width: 42px; height: 42px; } }

/* The "load a list" strip: one slim line */
.hub .resume-strip { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 8px 4px; margin: 0 0 6px; }
.hub .resume-strip .rs-text { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.hub .resume-strip .rs-text b { font: 600 13.5px var(--body); }
.hub .resume-strip .rs-text span { color: var(--muted); font-size: 13px; }
.hub .resume-strip .btn-primary { background: transparent; color: var(--acc); border: 1px solid var(--line-2); box-shadow: none; }
.hub .resume-strip .btn-primary:hover { background: var(--acc-soft); }

/* Type and lines: lighter, more space */
.hub .main .tabs { gap: 4px; }
.hub .main h2 { font-weight: 600; }
.hub .main .stat-label, .hub .main .muted, .hub .main .small { color: var(--muted); }
th { font: 600 11.5px var(--body); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
tbody tr, .table tr { border-color: var(--line); }
.hub .main .btn-ghost { border-color: var(--line); }
.hub .main .btn-mint { background: var(--acc-soft); }
.rail { background: var(--rail); }
.rail nav a.ws-tile.is-active, html[data-ws] .rail nav a.ws-tile.is-active { background: rgba(255, 255, 255, .08); }

/* ===== Shaded light mode (Nov 2026, V: light mode looked whitewashed, wants shading and colour with a contrast graded palette, whole Hub) =====
   The light tokens above are now a tinted canvas (#E3EAE6) under white panels with a visible edge (#C3CFC8) and a soft two part shadow, darker muted text
   (#42514A, 6.9 to 1 on the canvas) and stronger input borders. Dark mode is untouched: every rule below reads variables, and --shadow is none there.
   Same palette in public/audit.css, scanshell.css and styles.css so the Hub, the report, the scan tool and the client app match. */
.hub .main .card, .card, .hub .main .stat, .hub .tbl-wrap, .hub .table-wrap, .hub .main .col, .hub .main .tile { box-shadow: var(--shadow); }
.hub .main .stat { border-top: 3px solid color-mix(in srgb, var(--acc) 70%, var(--line)); }
.hub .main .card { border-color: var(--line); }
.hub .cmd { background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.hub #wsbar { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); border-bottom: 1px solid var(--line); }
.hub .main th, .hub .main thead th { background: var(--surface-2); color: var(--muted); }
.hub .main tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.hub .main tbody tr:hover td { background: var(--mint-soft); }
.hub input:not([type=checkbox]):not([type=radio]), .hub select, .hub textarea, .input { border-color: var(--line-2); background: var(--surface); }
.hub input:focus, .hub select:focus, .hub textarea:focus { outline: 2px solid var(--acc); outline-offset: 1px; border-color: var(--acc); }
.hub .btn:not(.btn-primary):not(.btn-mint) { border-color: var(--line-2); }
.hub .chip, .hub .chips button { border-color: var(--line-2); }
.hub .chip.on, .hub .chips button.on { background: var(--sel); color: var(--on-sel); border-color: var(--sel); }
.hub .main .col { background: color-mix(in srgb, var(--surface-2) 75%, var(--bg)); }
.badge, .hub .badge { border: 1px solid color-mix(in srgb, currentColor 25%, transparent); }

/* ---------- Pipeline filters, compact (Nov 2026, V: large spacing and a messy look) ----------
   One control height, short labels above, four to a row on a wide screen, two on a phone. The dropdowns stay real dropdowns here
   (class keep-select), so the segmented buttons no longer give every field a different height. */
#fpanel.card { padding: 14px 16px; }
#fpanel .form-grid.filt { grid-template-columns: repeat(auto-fill, minmax(min(168px, 100%), 1fr)); gap: 10px 12px; align-items: end; }
#fpanel .field { display: grid; gap: 4px; margin: 0; align-content: end; }
#fpanel .field > span { font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.2; }
#fpanel .field input, #fpanel .field select { height: 38px; min-height: 38px; padding: 0 10px; font-size: 14px; border-radius: 9px; width: 100%; box-sizing: border-box; }
#fpanel input[type=number] { -moz-appearance: textfield; appearance: textfield; }
#fpanel input[type=number]::-webkit-inner-spin-button, #fpanel input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
#fpanel > .row { margin-top: 12px !important; padding-top: 10px; border-top: 1px solid var(--line); gap: 8px 18px; flex-wrap: wrap; align-items: center; }
#fpanel > .row label.row { min-height: 32px; }
@media (max-width: 560px) { #fpanel .form-grid.filt { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== Hub contrast (Nov 2026, V: "everything in every tab is white washed", iPad screenshots of Call insights, Clients, Dashboard, Pipeline filters) =====
   Modeled on the depth steps in Linear and Stripe Dashboard: chrome, canvas and cards are three clearly different shades, every card has a firm edge,
   and chart ink (lines, bars, heat squares, sparklines) is full strength instead of pale. Light mode only; the dark block at the end keeps dark as it was.
   The tokens themselves (--bg, --line, --muted) move in :root so every page that reads them follows. */
:root {
  --bg: #D3DED8; --line: #AFC0B7; --line-2: #8CA298; --muted: #364740; --ink-2: #1B2A24;
  --surface-2: #E4ECE8; --mint-soft: #D2E4DA;
  --shadow: 0 1px 2px rgba(13, 25, 20, .16), 0 10px 22px -12px rgba(13, 25, 20, .34);
}
.hub .main .card, .card { border: 1px solid var(--line-2); }
.hub .main .stat, .hub .main .tile { border: 1px solid var(--line-2); border-top: 3px solid var(--acc); }
.hub .tbl-wrap, .hub .table-wrap, .hub .main .col { border: 1px solid var(--line-2); }
.hub .main .card-head, .hub .main .card > h2:first-child { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.hub .cmd { background: var(--surface); box-shadow: 0 1px 0 var(--line-2), 0 6px 14px -10px rgba(13, 25, 20, .35); }
.hub #wsbar { background: color-mix(in srgb, var(--surface) 45%, var(--bg)); border-bottom: 1px solid var(--line-2); }
.hub .main th, .hub .main thead th { background: color-mix(in srgb, var(--surface-2) 70%, var(--line)); color: var(--ink-2); border-bottom: 1px solid var(--line-2); }
.hub .main tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 80%, var(--surface)); }
.hub .main tbody td { border-color: var(--line); }
.hub .main .stat-label, .hub .main .muted, .hub .main .small, .hub .main .legend, .heat-key, .heat > span { color: var(--muted); }
.hub .main .stat-label { font-weight: 600; }
.hub .main .btn-ghost, .hub .main .btn-ghost:not(:hover) { border-color: var(--line-2); color: var(--ink-2); }
.hub .seg { background: color-mix(in srgb, var(--surface-2) 70%, var(--line)); border-color: var(--line-2); }
.hub .seg button { color: var(--ink-2); }
.hub .seg button.on, .hub .seg button.is-on { background: var(--sel); color: var(--on-sel); box-shadow: none; }
.hub .main .empty { background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 12px; color: var(--ink-2); }
.hub .ws-tabs a { color: var(--ink-2); }

/* Chart ink at full strength */
.hub .linkbtn, .hub .resume-strip a, .hub .resume-strip .linkbtn { color: var(--acc); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.hub .tile-spark svg polyline { stroke-width: 2.6; }
.hub .tile.hero .tile-spark svg { --mint: var(--acc); }
.hub .tile.hero .tile-spark svg polyline, .hub .tile.hero .tile-spark svg circle { stroke: var(--acc); }
.hub .tile.hero .tile-spark svg circle { fill: var(--acc); }
.tile-spark { opacity: 1; }
.chart .grid { stroke: var(--line-2); stroke-opacity: .55; }
.chart text { fill: var(--ink-2); }
.hub .main .spark polygon { opacity: .22; }
.donut-bg { stroke: var(--line-2); opacity: 1; }
.hbar .track, .rep-star .track, .progress { background: color-mix(in srgb, var(--surface-2) 55%, var(--line-2)); }
.heat > i { background: color-mix(in srgb, var(--ws-insights) calc(8% + var(--v, 0) * 92%), var(--surface-2)); border-color: var(--line-2); }
.heat > i.none { background: repeating-linear-gradient(45deg, var(--line), var(--line) 3px, var(--surface-2) 3px, var(--surface-2) 6px); }
.heat-key b { background: linear-gradient(90deg, color-mix(in srgb, var(--ws-insights) 8%, var(--surface-2)), var(--ws-insights)); border: 1px solid var(--line-2); }
.progress > span { background: var(--acc); }
.funnel-bar { border: 1px solid color-mix(in srgb, var(--acc) 55%, transparent); }

@media (prefers-color-scheme: dark) {
  :root { --bg: #0C1210; --line: #243029; --line-2: #33413A; --muted: #8F9E97; --ink-2: #C3CFC9; --surface-2: #161F1B; --mint-soft: rgba(92, 214, 168, .08); --shadow: none; }
  .hub .main .card, .card, .hub .main .stat, .hub .main .tile { border-color: var(--line-2); }
  .hub .main th, .hub .main thead th { background: var(--surface-2); color: var(--muted); }
  .hub .main tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
  .hub .seg { background: var(--surface-2); }
  .hub .main .empty { background: var(--surface-2); }
  .tile-spark { opacity: .8; }
  .hub .tile.hero .tile-spark svg polyline, .hub .tile.hero .tile-spark svg circle { stroke: var(--mint); }
  .hub .tile.hero .tile-spark svg circle { fill: var(--mint); }
  .chart .grid { stroke: var(--line); stroke-opacity: 1; }
  .chart text { fill: var(--muted); }
  .hbar .track, .rep-star .track, .progress { background: var(--surface-2); }
  .progress > span { background: linear-gradient(90deg, var(--mint-strong), var(--mint)); }
  .heat > i { border-color: var(--line); }
  .heat > i.none { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 3px, transparent 3px, transparent 6px); }
}
