/* HOT OS dashboard: a SaaS analytics layout in the houseoftaraasha.com brand (live theme 189360767293, scheme-1/2):
   cream #f5f0e6, ivory #faf7f0, maroon #7a2d26, deep maroon #5c1a1b, gold #c8a84e, saffron #d4813b, sand #e8e0d0, stone #8a7e72.
   Playfair Display headings, DM Sans UI and figures, Cormorant Garamond for the alert strip (the store's announcement bar).
   Spacing on an 8px grid. Dark mode follows the system. */
:root {
  --bg: #f5f0e6; --surface: #faf7f0; --surface2: #efe7d8; --ink: #3d1414; --ink2: #6b4c45; --mute: #8a7e72;
  --line: #e8e0d0; --head: #7a2d26; --accent: #7a2d26; --accent-hover: #5c1a1b; --on-accent: #faf7f0;
  --gold: #c8a84e; --gold-ink: #85671c; --gold-soft: #f1e6c8; --saffron: #d4813b;
  --strip: #5c1a1b; --strip-ink: #f5f0e6;
  --good: #3f7a4a; --good-soft: #e1ecdf; --bad: #b3261e; --bad-soft: #f7ddd7; --warn: #a75a17; --warn-soft: #f6e5d3;
  --blue: #2b3a67; --blue-soft: #e1e4ee; --teal: #2f6b62; --teal-soft: #dcebe7;
  --c1: #a8433a; --c2: #0e938c; --c3: #c9a24a; --c4: #4d63ad; --c5: #d07a36; --c0: #c3b8aa;
  --r: 4px; --shadow: 0 1px 2px rgba(92, 26, 27, .04), 0 4px 16px -8px rgba(92, 26, 27, .12);
  --serif: 'Playfair Display Variable', 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans Variable', 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --strip-font: 'Cormorant Garamond Variable', 'Cormorant Garamond', Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171010; --surface: #211716; --surface2: #2c201e; --ink: #f3e9dc; --ink2: #d2c1b1; --mute: #a3958a;
    --line: #3a2b28; --head: #efc7b8; --accent: #c8a84e; --accent-hover: #d4813b; --on-accent: #241514;
    --gold: #c8a84e; --gold-ink: #dcc27a; --gold-soft: #3a3020; --saffron: #e39a5a;
    --strip: #3a1012; --strip-ink: #f3e9dc;
    --good: #93c79c; --good-soft: #1f2e22; --bad: #f2877f; --bad-soft: #3d2120; --warn: #eba468; --warn-soft: #3a2a1c;
    --blue: #a9b9e6; --blue-soft: #222a3d; --teal: #8fc7bb; --teal-soft: #1e2f2c;
    --c1: #c4574d; --c2: #1fa098; --c3: #b58c33; --c4: #6e86d0; --c5: #cf7a35; --c0: #5d524b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px -10px rgba(0, 0, 0, .6);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
code { font-size: .9em; background: var(--surface2); padding: 1px 4px; border-radius: 2px; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mute { color: var(--mute); }
.num, td, .kpi .v, .val { font-variant-numeric: tabular-nums lining-nums; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; margin: 0; color: var(--head); font-variant-numeric: lining-nums; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 300; }
.eyebrow { font: 500 10.5px/16px var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--accent); }

/* controls */
button { font: 500 13px/1 var(--sans); cursor: pointer; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent);
  border-radius: 2px; padding: 0 16px; min-height: 40px; transition: background .15s, color .15s, border-color .15s; }
button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button:disabled { opacity: .55; cursor: default; }
button.ghost { background: transparent; color: var(--accent); border-color: var(--line); }
button.ghost:hover { border-color: var(--accent); background: transparent; }
button.sm { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.icon-btn { background: transparent; border: 1px solid var(--line); color: var(--ink2); width: 40px; min-height: 40px; padding: 0; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--surface); color: var(--accent); border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.seg { display: inline-flex; padding: 2px; gap: 2px; background: var(--surface2); border-radius: var(--r); flex: none; }
.seg button { background: transparent; border: 0; color: var(--ink2); min-height: 32px; padding: 0 12px; border-radius: 2px; font-size: 13px; }
.seg button:hover { color: var(--accent); background: transparent; }
.seg button.on { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); font-weight: 600; }
input, select { font: 14px var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 2px; min-height: 40px; padding: 0 12px; }
@media (max-width: 640px) { input, select { font-size: 16px; } }

/* gate */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.gate-card { width: 100%; max-width: 440px; text-align: center; }
.gate-card img { height: 88px; width: auto; margin-bottom: 24px; }
.gate-card h1 { font-size: 40px; font-weight: 300; line-height: 1.1; margin: 8px 0; }
.gate-card p { color: var(--ink2); font-size: 15px; }
.gate-card form { text-align: left; margin-top: 24px; display: grid; gap: 8px; }
.gate-card input { width: 100%; min-height: 48px; font-size: 16px; }
.gate-card form button { min-height: 48px; background: var(--gold); border-color: var(--gold); color: #5c1a1b; letter-spacing: .16em; text-transform: uppercase; font-size: 12px; }
.gate-card form button:hover { background: var(--saffron); border-color: var(--saffron); }
.msg { min-height: 24px; margin: 16px 0 0; }
.msg.bad { color: var(--bad); }

/* app frame: side nav on desktop, bottom tab bar on phones */
.app { min-height: 100vh; }
.shell { min-width: 0; }
.side { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 4px 0 calc(4px + env(safe-area-inset-bottom)); }
.side-logo, .side-foot { display: none; }
.nav { display: flex; justify-content: space-around; }
.nav a { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 4px;
  color: var(--mute); text-decoration: none; font-size: 10.5px; font-weight: 500; }
.nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nav a.on { color: var(--accent); }
.nav a.on::before { content: ''; position: absolute; top: -4px; left: 28%; right: 28%; height: 2px; background: var(--gold); }
.dot { position: absolute; top: 2px; right: calc(50% - 20px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--bad); color: #fff;
  font: 600 10px/16px var(--sans); text-align: center; padding: 0 4px; }
@media (min-width: 1024px) {
  .app { display: grid; grid-template-columns: 240px 1fr; }
  .side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-top: 0; border-right: 1px solid var(--line);
    background: var(--surface); backdrop-filter: none; padding: 24px 0 16px; }
  .side-logo { display: block; padding: 0 24px 24px; }
  .side-logo img { height: 56px; width: auto; display: block; }
  .side-foot { display: block; margin-top: auto; padding: 16px 24px 0; font: 500 10px var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--mute); }
  .nav { flex-direction: column; justify-content: flex-start; gap: 2px; padding: 0 12px; }
  .nav a { flex: none; flex-direction: row; gap: 12px; font-size: 14px; padding: 8px 12px; color: var(--ink2); border-radius: var(--r); min-height: 40px; }
  .nav a:hover { color: var(--accent); background: var(--surface2); }
  .nav a.on { background: var(--bg); color: var(--accent); font-weight: 600; }
  .nav a.on::before { top: 8px; bottom: 8px; left: 0; right: auto; width: 2px; height: auto; }
  .nav svg { width: 18px; height: 18px; }
  .dot { position: static; margin-left: auto; }
}

/* top bar */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 8px 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-logo img { height: 40px; width: auto; display: block; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; order: 3; width: 100%; }
@media (max-width: 640px) { .seg button { padding: 0 10px; } }
.custom { display: flex; gap: 8px; align-items: center; color: var(--mute); flex-wrap: wrap; }
.custom input { min-height: 36px; }
.top-r { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.asof { font-size: 12.5px; color: var(--mute); white-space: nowrap; }
.avatar { list-style: none; cursor: pointer; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; font: 500 16px var(--serif); }
.avatar::-webkit-details-marker { display: none; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: 48px; z-index: 60; width: 240px; padding: 16px; display: grid; gap: 4px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.menu-pop span { color: var(--mute); font-size: 12.5px; overflow-wrap: anywhere; margin-bottom: 8px; }
@media (min-width: 1024px) {
  .top { padding: 12px 32px; min-height: 64px; flex-wrap: nowrap; }
  .top-logo { display: none; }
  .filters { order: 0; width: auto; }
}
@media (max-width: 480px) { .asof { display: none; } }

/* alert strip: the store's announcement bar */
.alerts { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; background: var(--strip); color: var(--strip-ink);
  padding: 8px 16px; font: 500 13px/1.2 var(--strip-font); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.alerts::-webkit-scrollbar { display: none; }
.alerts b { color: var(--gold); font-weight: 600; flex: none; }
.alerts button { flex: none; background: transparent; border: 1px solid rgba(245, 240, 230, .25); color: var(--strip-ink); min-height: 28px; padding: 0 12px;
  font: 500 12.5px/1 var(--strip-font); letter-spacing: .08em; text-transform: uppercase; border-radius: 2px; }
.alerts button:hover { border-color: var(--gold); color: var(--gold); background: transparent; }
@media (min-width: 1024px) { .alerts { padding: 8px 32px; } }
.alerts, .alerts button { font-variant-numeric: lining-nums; }

/* main + views */
main { max-width: 1440px; margin: 0 auto; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { main { padding: 24px 32px 48px; } }
.view { display: none; }
.view.on { display: block; }
.ptitle { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.ptitle h1 { font-size: 32px; line-height: 1.15; font-weight: 300; margin-top: 8px; }
.ptitle p { margin: 4px 0 0; color: var(--mute); }
@media (min-width: 1024px) { .ptitle h1 { font-size: 40px; } }
.grid { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 1100px) { .g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .g-2-1 > #trend { order: -1; } }
@media (min-width: 900px) { .g-1-1 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.grid + .panel, .panel + .panel, .kpis + .panel { margin-top: 16px; }
.who.solo { margin-top: 16px; padding: 12px 16px; border: 1px solid var(--line); border-left: 2px solid var(--gold); background: var(--surface); border-radius: var(--r); }
/* Phones and narrow tablets lead with the person's queue: "Needs you today" above the KPIs (owner ruling). */
@media (max-width: 1099px) {
  #overview.on { display: flex; flex-direction: column; gap: 16px; }
  #overview .g-2-1 { display: contents; }
  #overview > *, #overview .grid > .panel { margin-top: 0; }
  #ov-title { order: 0; } #mine { order: 1; } #kpi { order: 2; } #kpinext { order: 3; } #trend { order: 4; } #overview > .g-1-1, #topprod { order: 5; }
  #overview .ptitle { margin-bottom: 0; }
  #kpinext .who.solo { margin-top: 0; }
}
.grid > .panel, .chans > .panel, .ccards > .panel { margin-top: 0; }

/* panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; box-shadow: var(--shadow); }
@media (min-width: 1024px) { .panel { padding: 24px; } }
.ph { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.ph h3 { font-size: 20px; line-height: 1.25; }
.ph p { margin: 2px 0 0; color: var(--mute); font-size: 12.5px; }
.who { display: flex; gap: 4px 16px; flex-wrap: wrap; align-items: baseline; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink2); }
.who .ow { font: 600 10px/20px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.who .nx { flex: 1 1 260px; }
.who .nx b { color: var(--ink); font-weight: 600; }
.chart-box { position: relative; height: 280px; }
#trend { display: flex; flex-direction: column; }
#trend .chart-box { flex: 1; min-height: 280px; height: auto; }
.tabs-line { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs-line::-webkit-scrollbar { display: none; }
.tabs-line button { flex: none; background: transparent; color: var(--ink2); border: 0; border-bottom: 2px solid transparent; border-radius: 0; margin-bottom: -1px;
  padding: 0 16px; min-height: 40px; display: inline-flex; gap: 8px; align-items: center; font-size: 13.5px; }
.tabs-line button:hover { background: transparent; color: var(--accent); }
.tabs-line button.on { color: var(--accent); border-bottom-color: var(--gold); font-weight: 600; }
.badge { min-width: 20px; height: 20px; border-radius: 10px; display: inline-grid; place-items: center; font: 600 11px var(--sans); padding: 0 6px;
  background: var(--surface2); color: var(--ink); }
.badge.hot { background: var(--bad); color: #fff; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 4px; font: 600 10.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; border-radius: 2px;
  padding: 4px 6px; background: var(--surface2); color: var(--ink2); white-space: nowrap; }
.chip.P0, .chip.bad, .chip.complaint, .chip.escalated, .chip.overdue, .chip.fail, .chip.alert { background: var(--bad-soft); color: var(--bad); }
.chip.P1, .chip.warn, .chip.blocked { background: var(--warn-soft); color: var(--warn); }
.chip.P2, .chip.price { background: var(--gold-soft); color: var(--gold-ink); }
.chip.good, .chip.ok, .chip.compliment, .chip.answered, .chip.done { background: var(--good-soft); color: var(--good); }
.chip.size, .chip.doing, .chip.info { background: var(--blue-soft); color: var(--blue); }
.chip.shipping, .chip.availability { background: var(--teal-soft); color: var(--teal); }
.chip.agent { background: transparent; box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold-ink); }

/* KPI cards */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1280px) { .kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.kpi .lb { font-size: 12.5px; color: var(--mute); font-weight: 500; }
.kpi .v { font: 500 26px/1.15 var(--sans); color: var(--ink); margin: 8px 0 2px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v2 { font-size: 12px; color: var(--mute); min-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .d { font-size: 12.5px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.kpi .d .p { color: var(--mute); font-weight: 400; }
@media (min-width: 1024px) { .kpi .v { font-size: 28px; } }
.up { color: var(--good); } .down { color: var(--bad); } .flat { color: var(--mute); }
.spark { display: block; width: 100%; height: 32px; margin-top: 8px; overflow: visible; }
.spark .ln { fill: none; stroke: var(--accent); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.spark .ar { fill: var(--gold); opacity: .2; }
.spark .pv { fill: none; stroke: var(--mute); stroke-width: 1.25; opacity: .55; }
.spark .hit { fill: transparent; }
.spark .hit:hover { fill: var(--gold); opacity: .25; }
.note { font-size: 12.5px; color: var(--mute); margin: 8px 0 0; }

/* compact "needs you" list */
.nl { list-style: none; margin: 0; padding: 0; }
.nl > li + li { border-top: 1px solid var(--line); }
.nl details > summary { list-style: none; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 12px 4px; cursor: pointer; border-radius: 2px; }
.nl details > summary::-webkit-details-marker { display: none; }
.nl details > summary:hover { background: var(--bg); }
.nl .pr { grid-column: 1; grid-row: 1 / span 2; align-self: start; margin-top: 2px; }
.nl .tt { grid-column: 2; grid-row: 1; font-weight: 500; color: var(--ink); min-width: 0; }
.nl .mt { grid-column: 2; grid-row: 2; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--mute); }
.nl > li { position: relative; }
.nl > li.has-act summary { padding-right: 88px; }
.nl .act { position: absolute; right: 4px; top: 12px; z-index: 1; }
.nl .act button { min-height: 32px; }
.nl li.gone { opacity: 0; transition: opacity .25s; }
.nl .body { padding: 0 4px 16px; margin-left: 52px; font-size: 13.5px; color: var(--ink2); display: grid; gap: 8px; }
.nl .body b { color: var(--ink); font-weight: 600; }
.nl .why { padding: 8px 12px; background: var(--bg); border-left: 2px solid var(--gold); }
.mt .late { color: var(--bad); font-weight: 600; }
.links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.links a, .links .nolink { font-size: 12.5px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 2px; text-decoration: none; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--bg); }
.links .nolink { color: var(--mute); }
.person { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); }
.av { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-ink);
  font: 500 11.5px var(--serif); flex: none; font-style: normal; font-variant-numeric: lining-nums; }
.more { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; }

/* empty / error / skeleton / banner / toast */
.empty { border: 1px dashed var(--gold); border-radius: var(--r); padding: 24px; color: var(--ink2); background: var(--bg); }
.empty b { color: var(--head); display: block; font: 400 18px var(--serif); margin-bottom: 4px; }
.err { border: 1px solid var(--bad); background: var(--bad-soft); color: var(--bad); padding: 16px; border-radius: var(--r); }
.skel { background: linear-gradient(90deg, var(--surface2) 0%, var(--surface) 50%, var(--surface2) 100%); background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite; border-radius: var(--r); }
.skel.h1 { height: 40px; width: 40%; margin-bottom: 24px; }
.skel.tile { height: 136px; }
.skel.chart { height: 280px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skel, .icon-btn.spin svg { animation: none; } }
.banner { margin: 0 0 16px; padding: 12px 16px; background: var(--bad-soft); color: var(--bad); border: 1px solid var(--bad); border-radius: var(--r);
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banner ul { margin: 4px 0 0; padding-left: 16px; }
.banner button { background: var(--bad); border-color: var(--bad); color: #fff; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 70; background: var(--strip); color: var(--strip-ink);
  padding: 8px 8px 8px 16px; border-radius: var(--r); display: flex; gap: 16px; align-items: center; max-width: calc(100vw - 32px); box-shadow: var(--shadow); }
.toast button { background: transparent; border-color: transparent; color: var(--gold); min-height: 32px; }
@media (min-width: 1024px) { .toast { bottom: 32px; } }

/* funnel */
.step { display: grid; grid-template-columns: 96px minmax(0, 1fr) 72px; gap: 8px; align-items: center; margin: 8px 0; font-size: 13.5px; }
.step .lbl { color: var(--ink2); }
.bar { height: 24px; background: var(--surface2); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; min-width: 2px; background: var(--accent); border-radius: 0 4px 4px 0; transition: width .5s ease; }
.step .val { text-align: right; font-weight: 600; }
.drop { margin: -4px 0 -4px 104px; font-size: 12px; color: var(--mute); }
.drop.worst { color: var(--bad); font-weight: 600; }
.mini { height: 4px; background: var(--surface2); border-radius: 2px; overflow: hidden; margin-top: 4px; min-width: 64px; }
.mini i { display: block; height: 100%; width: 0; background: var(--gold); }

/* donut legend (doubles as the table view) */
.mixwrap { display: grid; gap: 16px; align-items: center; }
@media (min-width: 560px) { .mixwrap { grid-template-columns: 200px minmax(0, 1fr); } }
.mixwrap .chart-box { height: 200px; }
.legend-t { width: 100%; font-size: 13px; }
.legend-t td { padding: 6px 4px; }
.legend-t td:first-child { display: flex; align-items: center; gap: 8px; }
.sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }
.sw.c1 { background: var(--c1); } .sw.c2 { background: var(--c2); } .sw.c3 { background: var(--c3); } .sw.c4 { background: var(--c4); } .sw.c5 { background: var(--c5); } .sw.c0 { background: var(--c0); }

/* channels */
.chans { display: grid; gap: 16px; }
@media (min-width: 640px) { .chans { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .chans { grid-template-columns: repeat(3, 1fr); } }
.chan { display: flex; flex-direction: column; gap: 4px; }
.chan .hd { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12.5px; font-weight: 600; }
.chan .nm { font: 400 20px var(--serif); color: var(--head); }
.chan .big { font: 500 24px/1.2 var(--sans); font-variant-numeric: tabular-nums; }
.chan .big small { font-size: 12.5px; font-weight: 400; color: var(--mute); }
.chan .sub { font-size: 12.5px; color: var(--ink2); }
.chan .todo { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink2); display: grid; gap: 8px; }
.chan .todo b { color: var(--ink); font-weight: 600; }

/* content cards + calendar */
.ccards { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .ccards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
.cc { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.thumb { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; text-align: center; padding: 16px 16px 24px; color: #f5f0e6; text-decoration: none;
  background: linear-gradient(135deg, #7a2d26 0%, #5c1a1b 55%, #8a6d1f 140%); }
.thumb.pinterest { background: linear-gradient(135deg, #a8433a 0%, #7a2d26 70%); }
.thumb.facebook, .thumb.manychat { background: linear-gradient(135deg, #2b3a67 0%, #5c1a1b 120%); }
.thumb span { font: 400 italic 17px/1.25 var(--serif); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.thumb small { position: absolute; left: 8px; top: 8px; font: 600 10px var(--sans); letter-spacing: .12em; text-transform: uppercase; background: rgba(0, 0, 0, .3); padding: 4px 6px; border-radius: 2px; }
.thumb .views { position: absolute; right: 8px; bottom: 8px; font: 600 12.5px var(--sans); background: rgba(0, 0, 0, .35); padding: 4px 8px; border-radius: 2px; }
.cc .cb { padding: 12px 16px 16px; display: grid; gap: 4px; }
.cc .cm { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--mute); }
.cc .cm b { color: var(--ink); font-weight: 600; }
.calbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.calbar .t { font: 400 18px var(--serif); color: var(--head); margin-right: auto; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink2); margin: 0 0 16px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.st-idea { background: var(--mute); } .st-planned { background: var(--gold); } .st-scheduled { background: var(--blue); }
.st-posted { background: var(--good); } .st-killed { background: var(--bad); }
.cal { display: grid; gap: 8px; }
@media (min-width: 900px) { .cal { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.day { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; min-height: 72px; min-width: 0; }
.day.today { border-color: var(--gold); box-shadow: inset 0 2px 0 var(--gold); }
.day .dh { font: 600 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px; display: flex; justify-content: space-between; }
.day.today .dh { color: var(--gold-ink); }
.ci { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.35; padding: 4px 8px; background: var(--surface); border-radius: 2px; margin-top: 4px; overflow-wrap: anywhere; }
.ci .sw { margin-top: 3px; }
.ci.killed { text-decoration: line-through; color: var(--mute); }
.ci small { color: var(--mute); }
@media (max-width: 899px) { .day.none { display: none; } }

/* tables */
.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th { font: 600 11px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); background: var(--surface); position: sticky; top: 0; z-index: 1; }
th:first-child, td:first-child, .l { text-align: left; }
td.l { white-space: normal; min-width: 200px; }
tbody tr:hover td { background: var(--bg); }
th.sort { cursor: pointer; user-select: none; }
th.sort:hover { color: var(--accent); }
th.sort[aria-sort]::after { content: ' \2193'; }
th.sort[aria-sort=ascending]::after { content: ' \2191'; }
tr.sub td { font-size: 12.5px; color: var(--ink2); background: var(--bg); }
tr.sub td:first-child { padding-left: 32px; }
.scroll { max-height: 560px; overflow: auto; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.tools input { flex: 1 1 240px; }
.tools .cnt { font-size: 12.5px; color: var(--mute); }
.m-bad { color: var(--bad); font-weight: 600; } .m-good { color: var(--good); font-weight: 600; }

/* inbox */
.ig + .ig { margin-top: 24px; }
.ig .gh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; color: var(--ink2); }
.cv { display: flex; gap: 12px; padding: 12px 16px; }
.cv + .cv { border-top: 1px solid var(--line); }
.cv .bd { flex: 1; min-width: 0; }
.cv .hd { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--mute); }
.cv .hd b { color: var(--ink); font-size: 13.5px; font-weight: 600; }
.cv .tx { margin: 4px 0 0; overflow-wrap: anywhere; }
.cv .rp { margin-top: 8px; font-size: 13px; color: var(--ink2); border-left: 2px solid var(--gold); padding-left: 8px; }
.list { padding: 0; overflow: hidden; }
details.fold > summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 600; padding: 8px 0; }

/* learning loop */
.board { display: grid; gap: 16px; }
@media (min-width: 900px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.col h4 { margin: 0 0 8px; font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--mute); display: flex; justify-content: space-between;
  padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ins { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; margin-bottom: 8px; }
.ins .t { font: 400 16px/1.35 var(--serif); color: var(--head); margin: 8px 0 4px; font-variant-numeric: lining-nums; }
.ins .e { font-size: 13px; color: var(--ink2); }
.ins .f { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--mute); flex-wrap: wrap; }
.tl { list-style: none; margin: 0; padding: 0 0 0 4px; }
.tl li { position: relative; padding: 0 0 16px 24px; border-left: 1px solid var(--line); margin-left: 8px; }
.tl li:last-child { border-left-color: transparent; }
.tl li::before { content: ''; position: absolute; left: -6px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--mute); border: 2px solid var(--surface); }
.tl li.ok::before { background: var(--good); }
.tl li.fail::before { background: var(--bad); }
.tl li.fail .s { color: var(--bad); font-weight: 600; }
.tl .w { font-size: 12px; color: var(--mute); }
.tl .a { font-size: 12px; color: var(--ink2); }
@media (prefers-color-scheme: dark) { .side-logo img, .top-logo img, .gate-card img { background: #f5f0e6; border-radius: 4px; padding: 4px 8px; } }
