/* ============================================================
   M&M EXODUS — COMMAND CENTER (owner/operator console)
   Phone-first dashboard. Matches the brand site.
   Palette: deep navy #09163C · gold #AB852C · off-white #F4EFE6
   Type: Fraunces (display) · Outfit (body)
   ============================================================ */

:root {
  --navy: #09163C;
  --navy-2: #0C1C4A;
  --navy-3: #122455;
  --navy-deep: #060F2B;
  --card: #0E1B45;
  --card-2: #11214F;
  --gold: #AB852C;
  --gold-bright: #D4AF5E;
  --gold-pale: #EBD9A8;
  --cream: #F4EFE6;
  --ink: #101830;
  --muted: rgba(244, 239, 230, 0.7);
  --faint: rgba(244, 239, 230, 0.45);
  --line: rgba(171, 133, 44, 0.28);
  --line-soft: rgba(244, 239, 230, 0.1);
  --good: #4FB286;
  --good-soft: rgba(79, 178, 134, 0.16);
  --warn: #E0A93B;
  --warn-soft: rgba(224, 169, 59, 0.16);
  --bad: #D9605A;
  --bad-soft: rgba(217, 96, 90, 0.16);
  --shadow-card: 0 20px 60px -24px rgba(0, 0, 0, 0.6);
  --shadow-soft: 0 8px 28px -16px rgba(0, 0, 0, 0.5);
  --radius: 20px;
  --radius-sm: 14px;
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Outfit", "Helvetica Neue", Arial, sans-serif;
  --bottom-nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--navy-3) 0%, transparent 60%),
    var(--navy);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: var(--gold-bright); text-decoration: none; }
::selection { background: var(--gold); color: var(--navy); }

/* ambient gradient-mesh backdrop */
.bg-mesh {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0.9;
}
.bg-mesh svg { width: 100%; height: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--cream);
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.hidden { display: none !important; }
.gold { color: var(--gold-bright); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ---------- Layout shell ---------- */
#app { min-height: 100vh; }

.appbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(6, 15, 43, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.appbar img.logo {
  height: 32px; width: 32px; object-fit: contain; flex: none;
  padding: 4px; border-radius: 10px;
  background: radial-gradient(circle at 30% 25%, rgba(212,175,94,0.18), transparent 70%);
  border: 1px solid var(--line-soft);
}
.appbar .titles { line-height: 1.1; }
.appbar .titles .brand { font-family: var(--font-display); font-size: 1.05rem; }
.appbar .titles .sub { font-size: 0.7rem; color: var(--faint); letter-spacing: 0.06em; text-transform: uppercase; }
.appbar .spacer { flex: 1; }
.appbar .who {
  font-size: 0.72rem; color: var(--muted); text-align: right; line-height: 1.2;
}
.appbar .who b { color: var(--gold-bright); font-weight: 600; }
.icon-btn {
  background: transparent; border: 1px solid var(--line-soft);
  color: var(--muted); border-radius: 10px; padding: 7px 10px; font-size: 0.78rem;
}

main {
  max-width: 920px; margin: 0 auto;
  padding: 22px 18px calc(var(--bottom-nav-h) + 34px);
  animation: fadeUp 0.4s ease;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.view-head { margin: 6px 0 22px; }
.view-head h1 { font-size: 1.85rem; letter-spacing: -0.02em; }
.view-head p { margin: 6px 0 0; color: var(--muted); font-size: 0.88rem; }

/* section header with inline icon */
.sec-head { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.sec-head .sec-ico {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(171,133,44,0.13); border: 1px solid var(--line);
  color: var(--gold-bright);
}
.sec-head .sec-ico svg { width: 17px; height: 17px; }
.sec-head h2 { font-size: 1.12rem; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(212,175,94,0.05), transparent 55%),
    linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 20px;
  overflow: hidden;
}
/* gold hairline accent along the card top */
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,175,94,0.5), transparent);
}
.card + .card { margin-top: 16px; }
.card h2, .card h3 { font-size: 1.12rem; margin-bottom: 4px; }
.card .card-sub { color: var(--faint); font-size: 0.78rem; margin-bottom: 16px; }
.section-gap { margin-top: 24px; }

/* ---------- KPI band ---------- */
.kpi-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.kpi {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(212,175,94,0.06), transparent 60%),
    linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 15px 16px;
}
.kpi .kpi-top { display: flex; align-items: center; gap: 7px; }
.kpi .kpi-ico {
  width: 26px; height: 26px; flex: none; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(171,133,44,0.13); border: 1px solid var(--line);
  color: var(--gold-bright);
}
.kpi .kpi-ico svg { width: 15px; height: 15px; }
.kpi .label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); }
.kpi .value { font-family: var(--font-display); font-size: 1.65rem; margin-top: 8px; color: var(--cream); letter-spacing: -0.01em; line-height: 1; }
.kpi .value.gold { color: var(--gold-bright); }
.kpi .value.good { color: var(--good); }
.kpi .value.bad { color: var(--bad); }
.kpi .delta { font-size: 0.72rem; color: var(--muted); margin-top: 5px; display: inline-flex; align-items: center; gap: 4px; }
.kpi .delta svg { width: 12px; height: 12px; }
.kpi .delta.up { color: var(--good); }
.kpi .delta.down { color: var(--bad); }

/* ---------- Toggle (month / all-time) ---------- */
.seg {
  display: inline-flex; background: var(--navy-deep);
  border: 1px solid var(--line-soft); border-radius: 999px; padding: 3px;
}
.seg button {
  border: none; background: transparent; color: var(--muted);
  padding: 6px 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 400;
}
.seg button.active { background: var(--gold); color: var(--navy); font-weight: 600; }

/* ---------- Gauge ---------- */
.gauge-wrap { display: flex; align-items: center; gap: 16px; }
.gauge { position: relative; width: 120px; height: 120px; flex: none; }
.gauge svg { transform: rotate(-90deg); }
.gauge .gauge-num {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.gauge .gauge-num b { font-family: var(--font-display); font-size: 1.6rem; }
.gauge .gauge-num span { font-size: 0.62rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.gauge .gauge-arc { transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }

/* ---------- Bars (hand-rolled charts) ---------- */
.bars { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.bar-row { display: grid; grid-template-columns: 88px 1fr auto; gap: 10px; align-items: center; }
.bar-row .bl { font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { background: var(--navy-deep); border-radius: 999px; height: 12px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.4); }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); animation: barGrow 0.7s cubic-bezier(.2,.8,.2,1); transform-origin: left; }
@keyframes barGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.bar-fill.good { background: linear-gradient(90deg, #2f7d5b, var(--good)); }
.bar-fill.bad { background: linear-gradient(90deg, #a8413c, var(--bad)); }
.bar-row .bv { font-size: 0.78rem; color: var(--cream); text-align: right; min-width: 56px; }

/* trend (mini line chart) */
.trend { width: 100%; height: 120px; }
.trend .axis { stroke: var(--line-soft); stroke-width: 1; }
.trend .line { fill: none; stroke: var(--gold-bright); stroke-width: 2.5; }
.trend .area { fill: url(#trendgrad); opacity: 0.5; }
.trend .dot { fill: var(--gold-bright); }
.trend-x { display: flex; justify-content: space-between; font-size: 0.62rem; color: var(--faint); margin-top: 4px; }

/* stacked cost bar */
.stack { display: flex; height: 26px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-soft); }
.stack span { display: flex; align-items: center; justify-content: center; font-size: 0.64rem; color: var(--navy); font-weight: 600; }
.stack .s-mentor { background: var(--gold-bright); }
.stack .s-aff { background: #8FA8D8; }
.stack .s-ad { background: var(--good); }
.stack .s-net { background: rgba(244,239,230,0.18); color: var(--cream); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 0.74rem; color: var(--muted); }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
table.data th, table.data td { padding: 9px 8px; text-align: left; white-space: nowrap; }
table.data th {
  color: var(--faint); font-weight: 500; text-transform: uppercase;
  font-size: 0.66rem; letter-spacing: 0.05em; border-bottom: 1px solid var(--line-soft);
  cursor: pointer; user-select: none;
}
table.data th.sort-asc::after { content: " ▲"; color: var(--gold-bright); }
table.data th.sort-desc::after { content: " ▼"; color: var(--gold-bright); }
table.data td { border-bottom: 1px solid rgba(244,239,230,0.05); }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr:last-child td { border-bottom: none; }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.02em;
  background: var(--navy-deep); color: var(--muted); border: 1px solid var(--line-soft);
}
.pill.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.gold { background: rgba(171,133,44,0.18); color: var(--gold-bright); border-color: transparent; }

.callout {
  margin-top: 12px; padding: 11px 13px; border-radius: var(--radius-sm);
  background: var(--good-soft); border: 1px solid rgba(79,178,134,0.3);
  font-size: 0.8rem; color: var(--cream);
}
.callout.bad { background: var(--bad-soft); border-color: rgba(217,96,90,0.3); }
.callout b { color: var(--gold-bright); }

/* ---------- Pipeline / lists ---------- */
.status-group { margin-top: 18px; }
.status-group > .sg-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.status-group .sg-head h3 { font-size: 0.92rem; }
.count-chip {
  font-size: 0.68rem; background: var(--navy-deep); border: 1px solid var(--line-soft);
  border-radius: 999px; padding: 1px 8px; color: var(--muted);
}
.row-item {
  display: flex; align-items: center; gap: 13px; width: 100%;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 13px 15px; margin-bottom: 9px; text-align: left; color: inherit;
  transition: border-color 0.16s ease, transform 0.1s ease;
}
.row-item:active { transform: scale(0.995); }
.row-item:hover { border-color: var(--line); }
.row-item .ri-avatar {
  width: 38px; height: 38px; flex: none; border-radius: 11px;
  display: grid; place-items: center; font-family: var(--font-display);
  font-size: 0.95rem; color: var(--gold-bright);
  background: rgba(171,133,44,0.12); border: 1px solid var(--line);
}
.row-item .ri-main { flex: 1; min-width: 0; }
.row-item .ri-title { font-size: 0.92rem; color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-item .ri-sub { font-size: 0.74rem; color: var(--faint); margin-top: 1px; }
.row-item .ri-right { text-align: right; flex: none; }
.row-item .ri-amt { font-family: var(--font-display); font-size: 0.98rem; color: var(--gold-bright); }

/* search */
.searchbar {
  display: flex; gap: 8px; margin-bottom: 14px;
}
.searchbar input {
  flex: 1; background: var(--navy-deep); border: 1px solid var(--line-soft);
  color: var(--cream); border-radius: 999px; padding: 10px 16px; font-size: 0.9rem;
}
.searchbar input::placeholder { color: var(--faint); }

/* ---------- Forms ---------- */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 0.74rem; color: var(--muted); margin-bottom: 5px; letter-spacing: 0.02em; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--navy-deep); border: 1px solid var(--line-soft);
  color: var(--cream); border-radius: 12px; padding: 13px 15px; font-size: 0.92rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(171,133,44,0.16);
}
.field textarea { min-height: 80px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: var(--navy); border: none; font-weight: 600;
  border-radius: 999px; padding: 13px 22px; font-size: 0.92rem; width: 100%;
  box-shadow: 0 8px 22px -10px rgba(171,133,44,0.7);
  transition: transform 0.12s ease, box-shadow 0.18s ease, opacity 0.12s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--gold-bright); border: 1px solid var(--line); }
.btn.sm { padding: 8px 14px; font-size: 0.82rem; width: auto; }
.btn.good { background: var(--good); color: #04130c; }

.form-msg { font-size: 0.8rem; margin-top: 8px; min-height: 1.1em; }
.form-msg.ok { color: var(--good); }
.form-msg.err { color: var(--bad); }

/* ---------- Empty / loading states ---------- */
.empty {
  text-align: center; padding: 36px 22px; color: var(--faint);
  border: 1px dashed var(--line-soft); border-radius: var(--radius-sm);
  background: radial-gradient(80% 80% at 50% 0%, rgba(212,175,94,0.04), transparent 70%);
}
.empty .e-art { width: 96px; height: 96px; margin: 0 auto 14px; opacity: 0.95; }
.empty .e-art svg { width: 100%; height: 100%; }
.empty .e-icon { font-size: 1.6rem; margin-bottom: 8px; opacity: 0.6; }
.empty .e-title { color: var(--muted); font-size: 1rem; font-family: var(--font-display); }
.empty .e-sub { font-size: 0.82rem; margin-top: 6px; line-height: 1.5; max-width: 40ch; margin-left: auto; margin-right: auto; }
.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, var(--card-2) 50%, var(--card) 75%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px;
  height: 14px; margin: 8px 0;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.loading-line { color: var(--faint); font-size: 0.84rem; padding: 12px 0; }

/* ---------- Bottom nav (mobile-first) ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  height: var(--bottom-nav-h);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(6, 15, 43, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-soft);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav button {
  position: relative;
  background: transparent; border: none; color: var(--faint);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; font-size: 0.62rem; letter-spacing: 0.02em;
  transition: color 0.18s ease;
}
.bottom-nav button .ico { line-height: 1; display: grid; place-items: center; }
.bottom-nav button .ico svg { width: 22px; height: 22px; transition: transform 0.18s ease; }
.bottom-nav button.active { color: var(--gold-bright); }
.bottom-nav button.active .ico svg { transform: translateY(-1px); }
/* active pill indicator above the icon */
.bottom-nav button.active::before {
  content: ""; position: absolute; top: 8px; width: 26px; height: 3px; border-radius: 999px;
  background: var(--gold-bright); box-shadow: 0 0 10px rgba(212,175,94,0.6);
}

/* ---------- "More" sheet ---------- */
.more-list { display: flex; flex-direction: column; gap: 8px; }
.more-list button {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 16px 18px; color: var(--cream); font-size: 0.98rem;
  transition: border-color 0.18s ease, transform 0.12s ease;
}
.more-list button:active { transform: scale(0.99); }
.more-list button .ico {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(171,133,44,0.12); border: 1px solid var(--line); color: var(--gold-bright);
}
.more-list button .ico svg { width: 18px; height: 18px; }
.more-list button .chev { margin-left: auto; color: var(--faint); display: grid; place-items: center; }
.more-list button .chev svg { width: 16px; height: 16px; }

/* ---------- Drawer (deal / client detail) ---------- */
.drawer-scrim {
  position: fixed; inset: 0; z-index: 60; background: rgba(3, 8, 22, 0.66);
  backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity 0.22s ease;
}
.drawer-scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  max-height: 88vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
  border-top: 1px solid var(--line);
  border-radius: 22px 22px 0 0;
  transform: translateY(102%); transition: transform 0.26s cubic-bezier(.2,.8,.2,1);
  padding: 10px 18px calc(28px + env(safe-area-inset-bottom));
}
.drawer.open { transform: translateY(0); }
.drawer .grab { width: 42px; height: 4px; border-radius: 999px; background: var(--line); margin: 6px auto 14px; }
.drawer h2 { font-size: 1.3rem; }
.drawer .dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.drawer .dl .dl-item .k { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); }
.drawer .dl .dl-item .v { font-size: 0.95rem; color: var(--cream); margin-top: 2px; }
.drawer .sub-h { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold-bright); margin: 18px 0 8px; }
.drawer .md-body { font-size: 0.88rem; line-height: 1.6; color: var(--cream); }
.drawer .md-body h1, .drawer .md-body h2, .drawer .md-body h3 { font-family: var(--font-display); margin: 14px 0 6px; }
.drawer .md-body h1 { font-size: 1.15rem; }
.drawer .md-body h2 { font-size: 1.05rem; }
.drawer .md-body h3 { font-size: 0.95rem; }
.drawer .md-body ul { padding-left: 18px; }
.drawer .md-body code { background: var(--navy-deep); padding: 1px 5px; border-radius: 5px; font-size: 0.85em; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.login-card {
  position: relative; overflow: hidden;
  width: min(420px, 100%);
  background:
    radial-gradient(130% 70% at 50% 0%, rgba(212,175,94,0.08), transparent 60%),
    linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow-card); padding: 36px 28px 30px; text-align: center;
  animation: fadeUp 0.5s ease;
}
.login-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
}
/* emblem: gilded ring framing the logo */
.login-emblem { position: relative; width: 96px; height: 96px; margin: 0 auto 20px; }
.login-emblem svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: emblemSpin 60s linear infinite; }
@keyframes emblemSpin { to { transform: rotate(360deg); } }
.login-emblem img.logo {
  position: absolute; inset: 0; margin: auto; height: 50px; width: auto;
}
.login-card h1 { font-size: 1.7rem; letter-spacing: -0.01em; }
.login-card p.tag { color: var(--muted); font-size: 0.9rem; margin: 8px 0 24px; }
.login-card .field { text-align: left; }
.login-card .field label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); }
.otp-input { letter-spacing: 0.4em; text-align: center; font-size: 1.2rem !important; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(20px);
  bottom: calc(var(--bottom-nav-h) + 16px); z-index: 80;
  background: var(--navy-deep); border: 1px solid var(--line);
  color: var(--cream); padding: 11px 18px; border-radius: 999px; font-size: 0.85rem;
  opacity: 0; pointer-events: none; transition: all 0.25s ease; box-shadow: var(--shadow-card);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Social: content calendar (kanban) ---------- */
.kanban { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.kan-col {
  background: var(--navy-deep); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 12px;
}
.kan-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.kan-body { display: flex; flex-direction: column; gap: 9px; }
.kan-empty { font-size: 0.76rem; color: var(--faint); padding: 8px 2px; }
.kan-card {
  display: block; width: 100%; text-align: left; color: inherit;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line-soft); border-radius: 12px; padding: 11px 13px;
  transition: border-color 0.16s ease, transform 0.1s ease;
}
.kan-card:hover { border-color: var(--line); }
.kan-card:active { transform: scale(0.99); }
.kan-card .kc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.kan-card .kc-plat { width: 22px; height: 22px; flex: none; border-radius: 7px; display: grid; place-items: center;
  background: rgba(171,133,44,0.13); border: 1px solid var(--line); color: var(--gold-bright); }
.kan-card .kc-plat svg { width: 13px; height: 13px; }
.kan-card .kc-title { font-size: 0.86rem; color: var(--cream); line-height: 1.35; }
.kan-card .kc-meta { font-size: 0.72rem; color: var(--faint); margin-top: 4px; }

/* social action button rows */
.social-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* inline insert forms (ideas / accounts) */
.inline-form {
  margin-top: 12px; padding: 14px; border-radius: var(--radius-sm);
  background: var(--navy-deep); border: 1px solid var(--line-soft);
}

/* idea cards */
.idea-card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 14px 15px; margin-bottom: 10px;
}
.idea-card .idea-top { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.idea-card .idea-hook { font-size: 0.92rem; color: var(--cream); font-family: var(--font-display); line-height: 1.3; }
.idea-card .idea-angle { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.idea-card .idea-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.idea-card .idea-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* analytics per-platform blocks */
.plat-block { margin-bottom: 18px; }
.plat-block:last-child { margin-bottom: 0; }
.plat-block .plat-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; font-size: 0.92rem; }
.plat-block .plat-head .kc-plat { width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: rgba(171,133,44,0.13); border: 1px solid var(--line); color: var(--gold-bright); }
.plat-block .plat-head .kc-plat svg { width: 15px; height: 15px; }

/* quick-control links (reuse more-list look, as anchors) */
.qc-link {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 16px 18px; color: var(--cream); font-size: 0.98rem;
  transition: border-color 0.18s ease, transform 0.12s ease;
}
.qc-link:active { transform: scale(0.99); }
.qc-link:hover { border-color: var(--line); }
.qc-link .ico {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(171,133,44,0.12); border: 1px solid var(--line); color: var(--gold-bright);
}
.qc-link .ico svg { width: 18px; height: 18px; }
.qc-link .chev { margin-left: auto; color: var(--faint); display: grid; place-items: center; }
.qc-link .chev svg { width: 16px; height: 16px; }

/* ---------- Desktop niceties ---------- */
@media (min-width: 720px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .kanban { flex-direction: row; align-items: start; }
  .kanban .kan-col { flex: 1; min-width: 0; }
  .drawer {
    left: auto; right: 0; top: 0; bottom: 0; width: min(520px, 100%);
    max-height: 100vh; border-radius: 0; border-left: 1px solid var(--line); border-top: none;
    transform: translateX(102%);
  }
  .drawer.open { transform: translateX(0); }
  .drawer .grab { display: none; }
}
