/* ============================================================
   Daily Bread Academy — Trading Journal
   Clean, modern blue/white system. Light-first, with a dark mode.
   ============================================================ */

:root {
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-body: 'Inter', system-ui, sans-serif;

  --blue: #2563eb;
  --blue-600: #1d4ed8;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;
  --sky:      #0ea5e9;

  --cat1: #16a34a;   /* followed & won   — green */
  --cat2: #2563eb;   /* followed & lost  — blue */
  --cat3: #f59e0b;   /* off-plan & won   — amber */
  --cat4: #ef4444;   /* off-plan & lost  — red */

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px;

  --text-xs: 11px; --text-sm: 13px; --text-base: 14px; --text-md: 15px;
  --text-lg: 18px; --text-xl: 22px; --text-2xl: 28px;

  --transition: 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Light theme (default) ===== */
:root, [data-theme='light'] {
  --bg:          #f6f8fb;
  --bg-elev:     #ffffff;
  --surface:     #ffffff;
  --surface-2:   #f1f5f9;
  --surface-3:   #e9eef5;
  --border:      #e2e8f0;
  --border-strong:#cbd5e1;
  --text:        #0f172a;
  --text-muted:  #64748b;
  --text-faint:  #94a3b8;
  --accent:      var(--blue);
  --accent-600:  var(--blue-600);
  --accent-soft: var(--blue-50);
  --shadow-sm:   0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md:   0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg:   0 12px 32px rgba(15, 23, 42, 0.10);
}

/* ===== Dark theme ===== */
[data-theme='dark'] {
  --bg:          #0b1220;
  --bg-elev:     #111a2e;
  --surface:     #0f1729;
  --surface-2:   #16203a;
  --surface-3:   #1e2a44;
  --border:      #23304d;
  --border-strong:#334466;
  --text:        #e8eefb;
  --text-muted:  #94a3b8;
  --text-faint:  #64748b;
  --accent:      var(--blue-400);
  --accent-600:  var(--blue-500);
  --accent-soft: rgba(59, 130, 246, 0.12);
  --shadow-sm:   0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md:   0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg:   0 12px 32px rgba(0, 0, 0, 0.5);
}

/* ===== Base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
.mono { font-family: var(--font-mono); }
.bold { font-weight: 700; }
.big { font-size: var(--text-lg); }
.muted { color: var(--text-muted); }
.small { font-size: var(--text-sm); }
.pos { color: var(--cat1); }
.neg { color: var(--cat4); }
[x-cloak] { display: none !important; }
button { cursor: pointer; font-family: inherit; color: inherit; background: none; border: none; }
input, textarea, select { font-family: inherit; font-size: inherit; color: var(--text); background: var(--surface-2); }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input, textarea { caret-color: var(--text); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); background: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--blue-100); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ===== App shell ===== */
#app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

/* ===== Sidebar ===== */
.sidebar {
  display: flex; flex-direction: column; gap: var(--space-5);
  padding: var(--space-6) var(--space-4);
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: var(--space-3); padding: 0 var(--space-2); }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--sky)); color: #fff; box-shadow: var(--shadow-md); }
.brand-logo-img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: var(--text-md); letter-spacing: -0.01em; }
.brand-name span { color: var(--accent); }
.brand-verse { font-size: 10px; color: var(--text-faint); font-family: var(--font-mono); letter-spacing: 0.02em; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3); border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: 500; color: var(--text-muted);
  transition: all var(--transition); width: 100%; text-align: left;
}
.nav-item svg { flex-shrink: 0; opacity: 0.7; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item.active svg { opacity: 1; }
.nav-item.active::before { content: ''; position: absolute; left: 0; width: 3px; height: 18px; background: var(--accent); border-radius: 0 3px 3px 0; margin-left: -16px; }

.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--border); }
.storage-pill { display: inline-flex; align-items: center; gap: var(--space-2); padding: 4px 10px; border-radius: 999px; font-size: var(--text-xs); font-family: var(--font-mono); background: var(--surface-2); color: var(--text-muted); align-self: flex-start; }
.storage-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cat1); }
.storage-pill.warn .dot { background: var(--cat3); }
.quick-backup { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); font-size: var(--text-xs); font-weight: 600; color: var(--accent); background: var(--accent-soft); align-self: flex-start; transition: all var(--transition); }
.quick-backup:hover { background: var(--blue-100); }
.skool-link { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); font-size: var(--text-xs); font-weight: 600; color: var(--accent); background: var(--accent-soft); align-self: flex-start; transition: all var(--transition); text-decoration: none; border: 1px solid transparent; }
.skool-link:hover { background: var(--blue-100); border-color: var(--blue-200); color: var(--blue-700); }

/* ===== Main / topbar ===== */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-5) var(--space-8); border-bottom: 1px solid var(--border); background: var(--bg-elev); position: sticky; top: 0; z-index: 20; }
.page-title h1 { font-family: var(--font-head); font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.02em; }
.page-sub { font-size: var(--text-sm); color: var(--text-muted); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: var(--space-3); }
.live-tag { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); font-family: var(--font-mono); color: var(--text-muted); padding: 4px 10px; border-radius: 999px; background: var(--surface-2); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cat4); animation: pulse 2s ease-in-out infinite; }

.content { padding: var(--space-8); overflow-y: auto; flex: 1; }
.view { max-width: 1320px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-6); }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600; font-family: var(--font-head); transition: all var(--transition); white-space: nowrap; border: 1px solid transparent; }
.btn-sm { padding: var(--space-2) var(--space-3); font-size: var(--text-xs); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-600); box-shadow: var(--shadow-md); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn-danger-ghost { background: transparent; color: var(--cat4); border-color: var(--border); }
.btn-danger-ghost:hover { background: rgba(239, 68, 68, 0.08); border-color: var(--cat4); }
.icon-btn { width: 32px; height: 32px; border-radius: var(--radius-md); display: grid; place-items: center; color: var(--text-muted); transition: all var(--transition); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.link-btn { font-size: var(--text-xs); font-weight: 600; color: var(--accent); transition: opacity var(--transition); }
.link-btn:hover { opacity: 0.7; }
.link-btn.danger { color: var(--cat4); }

/* ===== Empty state ===== */
.empty-state { text-align: center; padding: var(--space-16) var(--space-4); display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.empty-state.small { padding: var(--space-8); }
.empty-icon { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: var(--space-2); }
.empty-state h2 { font-family: var(--font-head); font-size: var(--text-lg); font-weight: 700; }
.empty-state p { color: var(--text-muted); font-size: var(--text-sm); max-width: 420px; }

/* ===== Panels ===== */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-sm); }
.panel-wide { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.panel-head h3 { font-family: var(--font-head); font-size: var(--text-md); font-weight: 700; }
.panel-sub { font-size: var(--text-xs); color: var(--text-muted); }

/* ===== KPIs ===== */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.kpi { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-sm); overflow: hidden; min-width: 0; }
.kpi::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--blue-400)); }
.kpi-label { font-size: var(--text-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; font-family: var(--font-mono); }
.kpi-value { font-size: var(--text-xl); font-weight: 700; font-family: var(--font-mono); letter-spacing: -0.02em; }
.kpi-value.sm { font-size: var(--text-lg); }
.kpi-sub { font-size: var(--text-xs); color: var(--text-muted); font-family: var(--font-mono); }
.small-kpi .kpi-value { font-size: var(--text-lg); }

/* ===== Four Buckets + donut ===== */
.buckets-and-donut { display: flex; gap: var(--space-6); align-items: stretch; flex-wrap: wrap; }
.buckets { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); flex: 1; min-width: 0; }
.bucket { position: relative; border-radius: var(--radius-md); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); background: var(--surface-2); border: 1px solid var(--border); border-top: 3px solid var(--border-strong); overflow: hidden; min-width: 0; }
.bucket.b1 { border-top-color: var(--cat1); } .bucket.b2 { border-top-color: var(--cat2); } .bucket.b3 { border-top-color: var(--cat3); } .bucket.b4 { border-top-color: var(--cat4); }
.bucket-tag { font-size: var(--text-xs); color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-mono); }
.bucket-title { font-size: var(--text-xs); font-weight: 600; }
.bucket-count { font-size: var(--text-xl); font-weight: 700; font-family: var(--font-mono); }
.bucket-pct { font-size: var(--text-xs); color: var(--text-muted); font-family: var(--font-mono); }
.bucket-bar { height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 2px; background: var(--accent); transition: width 500ms cubic-bezier(0.16,1,0.3,1); }

.cat-donut-wrap { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; }
.cat-donut { width: 150px; height: 150px; border-radius: 50%; flex-shrink: 0; position: relative; box-shadow: var(--shadow-md); }
.cat-donut-center { position: absolute; inset: 22%; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.cdc-num { font-family: var(--font-mono); font-weight: 700; font-size: var(--text-xl); }
.cdc-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); font-family: var(--font-mono); }
.cat-legend { display: flex; flex-direction: column; gap: var(--space-2); flex: 1; min-width: 180px; }
.cat-legend-row { display: grid; grid-template-columns: 10px 1fr auto auto; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--surface-2); }
.cat-dot { width: 10px; height: 10px; border-radius: 2px; }
.cat-legend-row .clr-label { font-size: var(--text-xs); font-weight: 600; }
.cat-legend-row .clr-count { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text-muted); }
.cat-legend-row .clr-pct { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 700; }

/* ===== Previous sessions recap ===== */
.recap-list { display: flex; flex-direction: column; gap: var(--space-2); }
.recap-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border); transition: all var(--transition); cursor: pointer; }
.recap-row:hover { border-color: var(--accent); background: var(--accent-soft); }
.rr-left { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.rr-right { display: flex; align-items: center; gap: var(--space-4); }
.rr-date { font-size: var(--text-sm); font-weight: 600; }
.rr-tag { font-size: var(--text-xs); font-family: var(--font-mono); padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-muted); }
.rr-tag.done { background: rgba(22,163,74,0.12); color: var(--cat1); }
.rr-tag.open { background: rgba(245,158,11,0.12); color: var(--cat3); }
.rr-wr { font-size: var(--text-sm); font-weight: 600; }
.rr-pnl { font-size: var(--text-sm); font-weight: 700; }

/* ===== Scripture card ===== */
.scripture-card { background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.scripture-ref { display: block; font-size: var(--text-sm); font-weight: 700; color: var(--accent); margin-bottom: var(--space-2); }
.scripture-text { font-size: var(--text-md); line-height: 1.6; margin-bottom: var(--space-2); }
.scripture-theme { display: block; font-size: var(--text-xs); color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; }

/* ===== Edge snapshot ===== */
.edge-snap { display: flex; flex-direction: column; gap: var(--space-2); }
.edge-row { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border); transition: border-color var(--transition); }
.edge-row.pos { border-left: 3px solid var(--cat1); }
.edge-row.neg { border-left: 3px solid var(--cat4); }
.edge-cond { display: flex; flex-direction: column; }
.edge-dim { font-size: var(--text-xs); color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em; }
.edge-val { font-weight: 600; }
.edge-stat { display: flex; align-items: center; gap: var(--space-3); }
.edge-wr { font-family: var(--font-mono); font-weight: 700; }
.edge-lift { font-size: var(--text-xs); color: var(--text-muted); font-family: var(--font-mono); }
.edge-n { font-size: var(--text-xs); color: var(--text-faint); font-family: var(--font-mono); }

/* ===== Trade table ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
.table-wrap.wide { overflow-x: auto; }
.trade-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.trade-table th { text-align: left; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; font-family: var(--font-mono); padding: var(--space-3); background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.trade-table td { padding: var(--space-3); font-size: var(--text-sm); border-bottom: 1px solid var(--border); vertical-align: middle; }
.trade-table tbody tr:last-child td { border-bottom: none; }
.trow { cursor: pointer; transition: background var(--transition); }
.trow:hover { background: var(--accent-soft); }
.col-wrap { max-width: 220px; }
.col-head { white-space: nowrap; }
.dir-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: var(--text-xs); font-weight: 700; font-family: var(--font-mono); }
.dir-tag.long { background: rgba(22,163,74,0.12); color: var(--cat1); }
.dir-tag.short { background: rgba(239,68,68,0.12); color: var(--cat4); }
.result-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: var(--text-xs); font-weight: 700; text-transform: capitalize; }
.result-tag.win { background: rgba(22,163,74,0.12); color: var(--cat1); }
.result-tag.loss { background: rgba(239,68,68,0.12); color: var(--cat4); }
.result-tag.breakeven { background: rgba(100,116,139,0.15); color: var(--text-muted); }
.result-tag.open { background: rgba(59,130,246,0.12); color: var(--accent); }
.proc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.proc-dot.good { background: var(--cat1); }
.proc-dot.bad { background: var(--cat4); }

/* ===== Trades view filters ===== */
.filter-bar { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.search-input { padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface); font-size: var(--text-sm); min-width: 220px; }
.search-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.chip-filters { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.chip { padding: var(--space-2) var(--space-3); border-radius: 999px; font-size: var(--text-xs); font-weight: 600; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); transition: all var(--transition); }
.chip:hover { border-color: var(--border-strong); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== Edge finder ===== */
.edge-intro { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.edge-intro h3 { font-family: var(--font-head); font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--space-2); }
.edge-intro p { color: var(--text-muted); font-size: var(--text-sm); max-width: 640px; }
.baseline-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--space-4); border-radius: var(--radius-lg); background: var(--accent-soft); border: 1px solid var(--border); min-width: 160px; }
.edge-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
.edge-list { display: flex; flex-direction: column; gap: var(--space-2); }
.edge-item { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: var(--space-4); align-items: center; padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border); }
.edge-item.up { border-left: 3px solid var(--cat1); }
.edge-item.down { border-left: 3px solid var(--cat4); }
.ei-main { display: flex; flex-direction: column; }
.ei-val { font-weight: 600; font-size: var(--text-sm); }
.ei-meta { font-size: var(--text-xs); color: var(--text-muted); font-family: var(--font-mono); }
.ei-bar { display: flex; align-items: center; gap: var(--space-3); }
.ei-bar-track { flex: 1; height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.ei-bar-fill { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.ei-wr { font-family: var(--font-mono); font-weight: 700; font-size: var(--text-sm); }
.ei-lift { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.lift-pill { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.lift-pill.up { background: rgba(22,163,74,0.12); color: var(--cat1); }
.lift-pill.down { background: rgba(239,68,68,0.12); color: var(--cat4); }
.lift-pill.flat { background: var(--surface-3); color: var(--text-muted); }
.ei-n { font-size: 10px; color: var(--text-faint); }
.insight-list { display: flex; flex-direction: column; gap: var(--space-3); }
.insight { display: flex; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border); }
.insight.up { border-left: 3px solid var(--cat1); }
.insight.down { border-left: 3px solid var(--cat4); }
.insight-icon { font-size: var(--text-md); }
.insight p { font-size: var(--text-sm); color: var(--text-muted); }
.insight strong { color: var(--text); }

/* ===== Backtest lab ===== */
.bt-intro { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.bt-intro h3 { font-family: var(--font-head); font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--space-2); }
.bt-intro p { color: var(--text-muted); font-size: var(--text-sm); max-width: 640px; }
.bt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.bt-list { display: flex; flex-direction: column; gap: var(--space-3); }
.bt-card { padding: var(--space-4); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.bt-head { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-2); }
.bt-setup, .bt-thesis, .bt-tags { font-size: var(--text-sm); margin-bottom: var(--space-1); }
.bt-label { font-size: var(--text-xs); color: var(--text-muted); font-weight: 600; }
.bt-foot { margin-top: var(--space-2); }

/* ===== Settings ===== */
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4); border-top: 1px solid var(--border); }
.setting-row:first-of-type { border-top: none; }
.setting-row strong { display: block; font-size: var(--text-sm); }
.setting-row p { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; max-width: 480px; }
.danger-row strong { color: var(--cat4); }
.tag-editor { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.tag-editor:first-of-type { border-top: none; }
.tag-dim-label { font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); font-family: var(--font-mono); }
.tag-chips { display: flex; gap: var(--space-1); flex-wrap: wrap; min-height: 4px; }
.tag-chip { font-size: var(--text-xs); padding: 3px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-family: var(--font-mono); }
.tag-chip.editable { display: inline-flex; align-items: center; gap: 4px; padding-right: 4px; }
.tag-x { border: none; background: transparent; color: var(--text-faint); font-size: 14px; line-height: 1; padding: 0 2px; cursor: pointer; border-radius: 999px; }
.tag-x:hover { color: var(--cat4); background: rgba(239,68,68,0.12); }
.tag-add { display: flex; gap: var(--space-2); align-items: center; width: 100%; max-width: 320px; }
.tag-add input { flex: 1; padding: 5px 9px; font-size: var(--text-xs); border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); }
.tag-add input:focus { outline: none; border-color: var(--accent); }
.tag-panel-intro { padding: 0 var(--space-4) var(--space-3); line-height: 1.5; }
.tag-panel-foot { display: flex; justify-content: flex-end; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border); }
.asset-chips { margin: 0 var(--space-4) var(--space-3); }
.asset-chips .tag-chip { font-size: var(--text-sm); padding: 4px 10px; }
.btn-xs { padding: 4px 10px; font-size: 11px; }
.save-pick { margin-top: var(--space-2); align-self: flex-start; background: var(--accent-soft); border: 1px dashed var(--accent); color: var(--accent); font-size: var(--text-xs); padding: 5px 10px; border-radius: var(--radius); cursor: pointer; font-weight: 600; }
.save-pick:hover { background: var(--accent); color: #fff; }
@media (max-width: 640px) {
  .tag-dim-label { min-width: 0; }
  .tag-add { max-width: 100%; }
}
.about-panel p { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.7; }

/* ===== Session log (read-only view of a saved session) ===== */
.session-log { display: flex; flex-direction: column; gap: var(--space-5); }
.log-back { align-self: flex-start; display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 600; color: var(--accent); }
.log-header { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.log-header h2 { font-family: var(--font-head); font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.02em; }
.log-header .lh-meta { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.log-stats { display: flex; gap: var(--space-5); flex-wrap: wrap; }
.log-stat { display: flex; flex-direction: column; }
.log-stat .ls-label { font-size: var(--text-xs); color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; }
.log-stat .ls-value { font-size: var(--text-lg); font-weight: 700; font-family: var(--font-mono); }
.log-a-plus { background: var(--accent-soft); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); }
.aplus-template .aplus-name { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-head); font-weight: 700; font-size: var(--text-md); color: var(--accent); margin-bottom: var(--space-1); }
.aplus-template .aplus-name .aplus-icon { font-size: var(--text-lg); }
.aplus-blurb { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--space-3); overflow-wrap: anywhere; }
.aplus-checklist { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-3); }
.aplus-step { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
.aplus-step::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.aplus-meta { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-3); }
.aplus-meta .am-pill { font-size: var(--text-xs); font-family: var(--font-mono); padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.aplus-notes { font-size: var(--text-sm); color: var(--text); line-height: 1.6; padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); }
.log-section .detail-label { display: block; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; font-family: var(--font-mono); margin-bottom: var(--space-2); }
.log-section p { font-size: var(--text-sm); line-height: 1.6; }
.log-trades { display: flex; flex-direction: column; gap: var(--space-4); }
.log-trade { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-sm); }
.lt-head { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.lt-head .big { font-size: var(--text-lg); }
.lt-grid { display: grid; grid-template-columns: repeat(4, auto); gap: var(--space-4); margin-bottom: var(--space-3); }
.lt-grid > div { display: flex; flex-direction: column; }
.lt-grid .muted { font-size: var(--text-xs); }
.lt-shots { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin: var(--space-3) 0; }
.lt-shot { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.lt-shot .ls-label { font-size: var(--text-xs); color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; }
.lt-shot img { width: 100%; max-width: 100%; height: auto; display: block; border-radius: var(--radius-md); border: 1px solid var(--border); background: #0b1220; }
.log-review { background: var(--surface-2); border-left: 3px solid var(--accent); }
.log-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* ===== Session list cards ===== */
.session-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-4); }
.session-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); cursor: pointer; transition: all var(--transition); box-shadow: var(--shadow-sm); }
.session-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.sc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.sc-date { font-size: var(--text-sm); font-weight: 700; }
.sc-count { font-size: var(--text-xs); font-family: var(--font-mono); padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); }
.sc-body { display: flex; flex-direction: column; gap: var(--space-3); }
.sc-section .sc-label { display: block; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-family: var(--font-mono); margin-bottom: var(--space-1); }
.sc-section p { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-tags { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.mini-trade { font-size: var(--text-xs); font-family: var(--font-mono); padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.mini-trade.win { color: var(--cat1); border-color: rgba(22,163,74,0.3); }
.mini-trade.loss { color: var(--cat4); border-color: rgba(239,68,68,0.3); }
.mini-trade.breakeven { color: var(--text-muted); }
.mini-trade.open { color: var(--accent); border-color: rgba(59,130,246,0.3); }
.sc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.sc-status { font-size: var(--text-xs); font-weight: 600; padding: 3px 10px; border-radius: 999px; font-family: var(--font-mono); }
.sc-status.done { background: rgba(22,163,74,0.12); color: var(--cat1); }
.sc-status.open { background: rgba(245,158,11,0.12); color: var(--cat3); }

/* ===== Modal overlay ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; padding: var(--space-4); animation: fadeIn 180ms ease; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; }
.modal.wizard { max-width: 640px; }
.modal.detail { max-width: 640px; }

/* ===== Wizard ===== */
.wizard-progress { padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); }
.wp-track { height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; margin-bottom: var(--space-2); }
.wp-fill { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width 300ms cubic-bezier(0.16,1,0.3,1); }
.wp-label { font-size: var(--text-xs); color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.wp-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.mic-btn-wiz { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-weight: 500; }
.wizard-body { padding: var(--space-6); }
.step { display: flex; flex-direction: column; gap: var(--space-3); }
.step-q { font-family: var(--font-head); font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.01em; }
.step-hint { font-size: var(--text-sm); color: var(--text-muted); }
.step-textarea { width: 100%; padding: var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-2); font-size: var(--text-sm); resize: vertical; min-height: 110px; transition: border-color var(--transition); }
.step-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.step-input { width: 100%; padding: var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-2); font-size: var(--text-sm); transition: border-color var(--transition); }
.step-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* symbol quick-pick */
.sym-chips { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-1); }
.sym-chip { padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-2); font-weight: 700; font-family: var(--font-mono); font-size: var(--text-sm); transition: all var(--transition); }
.sym-chip:hover { border-color: var(--border-strong); }
.sym-chip.selected { background: var(--accent); color: #fff; border-color: var(--accent); }

/* A+ setup template picker */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3); }
.tpl-card { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-2); text-align: left; transition: all var(--transition); }
.tpl-card:hover { border-color: var(--border-strong); }
.tpl-card.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.tpl-icon { font-size: var(--text-xl); }
.tpl-name { font-weight: 700; font-family: var(--font-head); font-size: var(--text-sm); }
.tpl-blurb { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.tpl-detail { margin-top: var(--space-3); display: flex; flex-direction: column; gap: var(--space-3); }
.aplus-steps { display: flex; flex-direction: column; gap: var(--space-2); }
.aplus-step { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
.aplus-step::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.tf-chips { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.tf-chip { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600; transition: all var(--transition); }
.tf-chip:hover { border-color: var(--border-strong); }
.tf-chip.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.smt-toggle { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); transition: all var(--transition); }
.smt-toggle.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.smt-toggle .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); }
.smt-toggle.on .dot { background: var(--accent); }

/* choice grid */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--space-2); }
.choice { display: flex; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-2); font-size: var(--text-sm); font-weight: 600; transition: all var(--transition); }
.choice:hover { border-color: var(--border-strong); background: var(--surface-3); }
.choice.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.choice-icon { font-size: var(--text-md); }

/* conditions grid */
.cond-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
.cond-block { display: flex; flex-direction: column; gap: var(--space-2); }
.cond-dim { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; font-family: var(--font-mono); }
.cond-opts { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.cond-opt { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); font-size: var(--text-xs); transition: all var(--transition); }
.cond-opt:hover { border-color: var(--border-strong); }
.cond-opt.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.cond-hint { margin-top: -2px; }
.cond-block.is-pd { padding-bottom: var(--space-1); }
.pd-tfs { display: flex; flex-direction: column; gap: var(--space-1); margin-top: var(--space-1); padding-left: var(--space-1); border-left: 2px solid var(--accent-soft); }
.pd-tf-row { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); }
.pd-tf-name { min-width: 96px; color: var(--text-muted); font-family: var(--font-mono); font-weight: 600; }
.pd-tf-row select { padding: 3px 7px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: var(--text-xs); }

/* Open-trades review banner */
.open-banner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--accent-soft); border: 1px solid var(--accent); margin-bottom: var(--space-4); }
.ob-text { display: flex; align-items: center; gap: var(--space-2); }
.ob-count { font-size: var(--text-lg); font-weight: 800; color: var(--accent); font-family: var(--font-mono); }
.ob-label { font-weight: 600; color: var(--text); }
.ob-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* Expanded performance stats */
.stats-panel { padding: var(--space-4); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-cell { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3); border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.stat-label { font-size: var(--text-xs); color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-val { font-size: var(--text-lg); font-weight: 800; font-family: var(--font-mono); }
.stat-sub { font-size: 11px; color: var(--text-muted); }

/* Trade of the day picker */
.tod-list { display: flex; flex-direction: column; gap: var(--space-2); }
.tod-card { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3); border-radius: var(--radius); border: 1.5px solid var(--border); background: var(--surface-2); text-align: left; cursor: pointer; transition: all var(--transition); }
.tod-card:hover { border-color: var(--accent); }
.tod-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.tod-head { display: flex; align-items: center; gap: var(--space-2); }
.tod-meta { display: flex; align-items: center; gap: var(--space-2); }
.tod-skip { background: none; border: none; color: var(--text-muted); font-size: var(--text-xs); cursor: pointer; align-self: flex-start; margin-top: var(--space-1); text-decoration: underline; }
/* Trade of the day display in session log */
.tod-display { border-left: 3px solid var(--accent); }
.tod-display-row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }

/* Date step (pre-market session date selection) */
.date-step { display: flex; flex-direction: column; gap: var(--space-3); }
.date-quick { display: flex; gap: var(--space-2); }
.date-chip { padding: var(--space-2) var(--space-4); border-radius: var(--radius-full); border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); font-size: var(--text-sm); font-weight: 500; cursor: pointer; transition: all var(--transition); }
.date-chip.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.date-chip:hover { border-color: var(--accent); }
.date-input { max-width: 220px; }

/* Compact chart attachment (pre-market scenarios + trade of the day) */
.chart-attach { margin-top: var(--space-3); }
.chart-attach-btn { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--bg); color: var(--text-muted); font-size: var(--text-xs); cursor: pointer; transition: all var(--transition); }
.chart-attach-btn:hover { border-color: var(--accent); color: var(--accent); }
.chart-attach-btn svg { flex-shrink: 0; }
.chart-attach-btn .shot-input { display: none; }
.chart-attach-preview { position: relative; max-width: 360px; margin-top: var(--space-2); }
.chart-attach-preview img { width: 100%; border-radius: var(--radius-md); border: 1px solid var(--border); background: #0b1220; }
.chart-attach-remove { position: absolute; top: var(--space-2); right: var(--space-2); padding: 4px 10px; border-radius: var(--radius-md); background: rgba(15,23,42,0.8); color: #fff; font-size: var(--text-xs); font-weight: 600; }

/* In-trade check-in modal */
.check-in-modal { max-width: 480px; }
.manage-modal { max-width: 520px; }
.ci-field { display: flex; flex-direction: column; gap: var(--space-2); margin: var(--space-3) 0; }
.ci-foot { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-3); }
.ob-pair { display: inline-flex; gap: 4px; align-items: center; }

/* Check-in log in trade detail */
.checkin-log { display: flex; flex-direction: column; gap: var(--space-2); }
.checkin-entry { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }

/* Trade management log in detail */
.manage-log { display: flex; flex-direction: column; gap: var(--space-3); }
.manage-entry { border-left: 2px solid var(--accent); padding: var(--space-2) var(--space-3); background: var(--surface-2); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.manage-head { display: flex; align-items: center; gap: var(--space-2); margin-bottom: 4px; }
.manage-notes { font-size: var(--text-sm); line-height: 1.5; margin: 0 0 6px; white-space: pre-wrap; }
.manage-shot { max-width: 100%; border-radius: var(--radius-md); }

/* Voice dictation mic button */
.mic-btn.dictating { background: var(--accent); color: #fff; animation: mic-pulse 1.2s ease-in-out infinite; }
@keyframes mic-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

/* Economic news feed */
.news-panel { padding: var(--space-4); }
.news-list { display: flex; flex-direction: column; }
.news-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border); }
.news-row:last-child { border-bottom: none; }
.news-row.high { background: var(--accent-soft); }
.news-when { display: flex; flex-direction: column; min-width: 110px; }
.news-date { font-size: var(--text-xs); color: var(--text-muted); font-weight: 600; }
.news-time { font-size: var(--text-sm); font-weight: 700; }
.news-body { display: flex; align-items: center; gap: var(--space-2); flex: 1; }
.news-impact { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 6px; border-radius: 999px; }
.news-impact.high { background: rgba(239,68,68,0.14); color: #dc2626; }
.news-impact.medium { background: rgba(245,158,11,0.16); color: #d97706; }
.news-impact.low { background: var(--surface-3); color: var(--text-muted); }
.news-title { font-size: var(--text-sm); }
.news-attrib { font-size: 11px; color: var(--text-muted); margin-top: var(--space-2); }

/* numbers */
.num-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.num-field { display: flex; flex-direction: column; gap: var(--space-1); }
.num-field span { font-size: var(--text-xs); color: var(--text-muted); font-weight: 600; }
.num-field input { padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-2); font-family: var(--font-mono); }
.num-field input:focus { outline: none; border-color: var(--accent); }
.num-field.calc { justify-content: center; }
.num-calc { font-size: var(--text-lg); font-weight: 700; }

/* screenshot dropzone */
.shot-drop { border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); padding: var(--space-6); text-align: center; transition: all var(--transition); }
.shot-drop.drag { border-color: var(--accent); background: var(--accent-soft); }
.shot-empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); color: var(--text-muted); }
.shot-input { margin-top: var(--space-2); }
.shot-preview { position: relative; }
.shot-preview img { width: 100%; border-radius: var(--radius-md); border: 1px solid var(--border); background: #0b1220; }
.shot-remove { position: absolute; top: var(--space-2); right: var(--space-2); padding: 4px 10px; border-radius: var(--radius-md); background: rgba(15,23,42,0.8); color: #fff; font-size: var(--text-xs); font-weight: 600; }

/* trade summary */
.trade-summary { display: flex; flex-direction: column; gap: var(--space-3); }
.ts-head { display: flex; align-items: center; gap: var(--space-2); }
.ts-cat { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2); border-radius: var(--radius-md); background: var(--surface-2); }
.ts-cat-label { font-size: var(--text-xs); color: var(--text-muted); }
.ts-cat-value { font-weight: 700; font-size: var(--text-sm); }
.ts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.ts-grid > div { display: flex; flex-direction: column; }
.ts-thesis { font-size: var(--text-sm); line-height: 1.5; padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface-2); }
.ts-conds { font-size: var(--text-sm); }

.wizard-foot { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border); }
.foot-spacer { flex: 1; }

/* ===== Trade detail modal ===== */
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); }
.detail-head > div { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.cat-badge { font-size: var(--text-xs); font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); }
.detail-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.detail-grid > div { display: flex; flex-direction: column; }
.detail-section .detail-label { display: block; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; font-family: var(--font-mono); margin-bottom: var(--space-1); }
.detail-section p { font-size: var(--text-sm); line-height: 1.6; }
.cond-chips { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.cond-chip { font-size: var(--text-xs); padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-family: var(--font-mono); }
.cond-chip.stop-bad { background: rgba(239,68,68,0.12); border-color: var(--cat4); color: var(--cat4); }
.detail-shot { width: 100%; border-radius: var(--radius-md); border: 1px solid var(--border); background: #0b1220; }
.detail-foot { padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: var(--space-2); position: sticky; bottom: 0; background: var(--surface); z-index: 1; }

/* ===== Backtest modal ===== */
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); }
.modal-head h3 { font-family: var(--font-head); font-size: var(--text-md); font-weight: 700; }
.bt-form { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.form-full { display: flex; flex-direction: column; gap: var(--space-1); }
.form-full span, .form-row span { font-size: var(--text-xs); color: var(--text-muted); font-weight: 600; }
.form-row input, .form-row select, .form-full input, .form-full textarea { padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-2); font-size: var(--text-sm); }
.form-row input:focus, .form-row select:focus, .form-full input:focus, .form-full textarea:focus { outline: none; border-color: var(--accent); }
.modal-foot { padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }

/* ===== Scripture modal ===== */
.scripture-modal .scripture-modal-body { max-width: 520px; text-align: center; padding: var(--space-8); background: linear-gradient(160deg, var(--accent-soft), var(--surface)); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
.scripture-modal-kicker { display: block; font-size: var(--text-xs); color: var(--accent); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; margin-bottom: var(--space-4); }
.scripture-modal-body .scripture-ref { font-size: var(--text-2xl); margin-bottom: var(--space-4); }
.scripture-modal-body .scripture-text { font-size: var(--text-lg); line-height: 1.7; margin-bottom: var(--space-4); font-family: var(--font-head); }
.scripture-modal-body .scripture-theme { font-size: var(--text-xs); }

/* ===== Toast ===== */
.toast { position: fixed; bottom: var(--space-6); left: 50%; transform: translateX(-50%); padding: var(--space-3) var(--space-5); border-radius: var(--radius-md); background: var(--text); color: var(--surface); font-size: var(--text-sm); font-weight: 600; box-shadow: var(--shadow-lg); z-index: 200; }

/* ===== Animations ===== */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  #app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; flex-direction: column; gap: var(--space-2); padding: var(--space-3); min-width: 0; overflow-x: hidden; }
  .brand { padding: 0; }
  .brand-verse { display: none; }
  .nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 2px; padding-bottom: 2px; min-width: 0; }
  .nav::-webkit-scrollbar { height: 0; }
  .nav-item { padding: var(--space-2); font-size: var(--text-xs); white-space: nowrap; flex-shrink: 0; width: auto; position: relative; }
  .nav-item.active::before { display: none; }
  .sidebar-footer { flex-direction: row; margin-top: 0; }
  .storage-pill { font-size: 9px; padding: 2px 6px; }
  .quick-backup { padding: var(--space-1); font-size: 9px; }
  .skool-link { padding: var(--space-1); font-size: 9px; }
  .topbar { padding: var(--space-3); flex-wrap: wrap; gap: var(--space-2); }
  .topbar-actions { flex-wrap: wrap; }
  .live-tag { display: none; }
  .page-title h1 { font-size: var(--text-base); }
  .page-sub { font-size: var(--text-xs); }
  .content { padding: var(--space-3); }
  .dash-grid, .edge-groups { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .buckets { grid-template-columns: repeat(2, 1fr); }
  .buckets-and-donut { flex-direction: column; }
  .cat-donut-wrap { flex-direction: column; align-items: stretch; }
  .cat-donut { width: 120px; height: 120px; align-self: center; }
  .rr-left { flex-direction: column; align-items: flex-start; gap: var(--space-1); }
  .choice-grid { grid-template-columns: 1fr; }
  .num-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .edge-item { grid-template-columns: 1fr; }
  .bucket-count { font-size: var(--text-lg); }
  .lt-shots { grid-template-columns: 1fr; }
  .lt-grid { grid-template-columns: repeat(2, 1fr); }
  .ts-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .session-list { grid-template-columns: 1fr; }
}

/* ============================
   EQUITY CURVE
   ============================ */
.eq-panel { padding-bottom: 8px; }
.eq-wrap {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-2) 0 var(--space-4);
}
.eq-current { display: flex; flex-direction: column; gap: 2px; padding-right: var(--space-5); border-right: 1px solid var(--border); }
.eq-current-label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.eq-current-val { font-family: var(--font-mono); font-size: var(--text-2xl); font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.eq-current.pos .eq-current-val { color: var(--cat1); }
.eq-current.neg .eq-current-val { color: var(--cat4); }
.eq-svg { width: 100%; height: 150px; display: block; }
.eq-line { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.eq-area { opacity: 0.12; }
.eq-baseline { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.eq-empty { color: var(--text-faint); font-size: var(--text-sm); padding: var(--space-6) 0; text-align: center; }
@media (max-width: 640px) {
  .eq-wrap { grid-template-columns: 1fr; gap: var(--space-3); }
  .eq-current { flex-direction: row; align-items: baseline; gap: var(--space-3); padding-right: 0; border-right: none; border-bottom: 1px solid var(--border); padding-bottom: var(--space-3); }
  .eq-svg { height: 120px; }
}

/* ============================
   RULE STATUS CHIP (session log header)
   ============================ */
.rule-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: var(--text-xs);
  padding: 2px 9px; border-radius: 100px; border: 1px solid var(--border-strong);
  letter-spacing: .02em;
}
.rule-chip.clear { color: var(--cat1); background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.3); }
.rule-chip.at-limit { color: var(--cat4); background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.3); }
.rule-chip-flag { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
@media (max-width: 640px) {
  .rule-chip { font-size: 10px; padding: 2px 7px; }
}

/* ============================
   GUARDRAIL MODAL
   ============================ */
.guardrail-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-8) var(--space-7) var(--space-6);
  max-width: 440px; width: 92%; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
}
.guardrail-ring { width: 56px; height: 56px; margin: 0 auto var(--space-3); display: flex; align-items: center; justify-content: center; }
.guardrail-ring svg { width: 100%; height: 100%; overflow: visible; }
.gr-ring-outer { fill: none; stroke: var(--cat4); stroke-width: 2; opacity: 0.25; }
.gr-ring-mid { fill: none; stroke: var(--cat4); stroke-width: 2; opacity: 0.5; }
.gr-ring-core { fill: var(--cat4); opacity: 0.85; transform-origin: center; animation: gr-breathe 3.2s ease-in-out infinite; }
@keyframes gr-breathe { 0%, 100% { opacity: 0.85; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }
.guardrail-modal h3 { font-family: var(--font-head); font-size: var(--text-lg); margin-bottom: var(--space-3); color: var(--cat4); }
.guardrail-msg { font-size: var(--text-base); line-height: 1.5; color: var(--text); margin-bottom: var(--space-3); }
.guardrail-sub { font-size: var(--text-sm); color: var(--text-faint); line-height: 1.5; margin-bottom: var(--space-6); }
.guardrail-foot { justify-content: center; gap: var(--space-3); }
.guardrail-signals { list-style: none; padding: 0; margin: 0 0 var(--space-3); text-align: left; display: flex; flex-direction: column; gap: var(--space-2); }
.guardrail-signals li { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.5; padding-left: var(--space-4); position: relative; }
.guardrail-signals li::before { content: '•'; position: absolute; left: 0; color: var(--cat4); }

/* ============================
   ACCOUNTABILITY PARTNER CARD
   ============================ */
.ap-card { display: flex; flex-direction: column; gap: 0; }
.ap-empty { padding: var(--space-5) var(--space-5) var(--space-6); line-height: 1.6; }
.ap-signal { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border); }
.ap-signal:first-of-type { border-top: none; }
.ap-tone-dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 999px; margin-top: 6px; }
.ap-signal.pos .ap-tone-dot { background: var(--cat1); }
.ap-signal.neg .ap-tone-dot { background: var(--cat4); }
.ap-signal-body { display: flex; flex-direction: column; gap: 2px; }
.ap-title { font-family: var(--font-head); font-size: var(--text-sm); font-weight: 700; color: var(--text); }
.ap-body { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; }
.ap-action { font-size: var(--text-xs); color: var(--accent); font-weight: 600; line-height: 1.5; }
.ap-signal.pos .ap-title { color: var(--cat1); }
.ap-signal.neg .ap-title { color: var(--cat4); }

/* ============================
   POST-TRADE REFLECTION MODAL
   ============================ */
.reflection-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-8) var(--space-7) var(--space-6);
  max-width: 440px; width: 92%; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
}
.reflection-icon { width: 48px; height: 48px; margin: 0 auto var(--space-3); color: var(--cat3); display: flex; align-items: center; justify-content: center; }
.reflection-icon svg { width: 100%; height: 100%; }
.reflection-modal h3 { font-family: var(--font-head); font-size: var(--text-lg); margin-bottom: var(--space-3); color: var(--text); }
.reflection-body { font-size: var(--text-base); line-height: 1.55; color: var(--text); margin-bottom: var(--space-3); }
.reflection-action { font-size: var(--text-sm); color: var(--accent); font-weight: 600; line-height: 1.5; margin-bottom: var(--space-6); }
.reflection-modal .modal-foot { justify-content: center; }
@media (max-width: 640px) {
  .ap-signal { padding: var(--space-3) var(--space-4); }
  .ap-empty { padding: var(--space-4); }
}

/* ============================
   CSV IMPORT MODAL
   ============================ */
.csv-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-5) var(--space-6) var(--space-5);
  max-width: 720px; width: 94%; max-height: 88vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
}
.csv-fname { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text-faint); font-weight: 400; }
.csv-help { font-size: var(--text-sm); color: var(--text-faint); line-height: 1.5; margin: var(--space-3) 0 var(--space-4); }
.csv-preview-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: var(--space-4); }
.csv-preview { border-collapse: collapse; width: 100%; font-size: var(--text-xs); min-width: 100%; }
.csv-preview th { background: var(--surface-2); padding: 7px 9px; text-align: left; font-weight: 600; color: var(--text-faint); white-space: nowrap; border-bottom: 1px solid var(--border); }
.csv-preview td { padding: 6px 9px; white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.csv-map { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.csv-map-row { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: var(--space-3); padding: 6px 0; border-bottom: 1px solid var(--border); }
.csv-map-head { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csv-map-row select { width: 100%; font-size: var(--text-xs); padding: 5px 7px; }
.csv-modal .modal-foot { position: sticky; bottom: 0; background: var(--surface); padding: var(--space-3) 0 0; margin-top: var(--space-2); z-index: 1; border-top: 1px solid var(--border); }
@media (max-width: 640px) {
  .csv-map { grid-template-columns: 1fr; }
  .csv-modal { padding: var(--space-4); }
}

/* ============================
   TRADING RULES PANEL (settings)
   ============================ */
.rules-intro { margin: var(--space-3) 0 var(--space-4); line-height: 1.5; }
.rules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); align-items: end; }
.rule-field { display: flex; flex-direction: column; gap: 4px; }
.rule-field-label { font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); }
.rule-field input { width: 100%; font-family: var(--font-mono); padding: 7px 9px; }
.rule-field-hint { font-size: 10px; color: var(--text-faint); }
.rule-save-wrap { grid-column: 1 / -1; display: flex; justify-content: flex-end; margin-top: var(--space-2); }
@media (max-width: 720px) { .rules-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .rules-grid { grid-template-columns: 1fr; } }

/* ============ AUTH (login screen) ============ */
.auth-shell {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 120% at 50% 0%, #eff6ff 0%, #f8fafc 45%, #f1f5f9 100%);
  padding: 24px;
}
[data-theme="dark"] .auth-shell {
  background: radial-gradient(120% 120% at 50% 0%, #0b1220 0%, #0f172a 50%, #020617 100%);
}
.auth-card {
  width: 100%; max-width: 380px;
  background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0);
  border-radius: 20px; padding: 40px 32px; box-shadow: 0 24px 60px -20px rgba(2,6,23,.25);
  display: flex; flex-direction: column; gap: 14px; text-align: center;
}
.auth-logo {
  width: 72px; height: 72px; margin: 0 auto 4px; border-radius: 14px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #000;
}
.auth-logo-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-title { font-family: var(--font-head); font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 0; color: var(--text, #0f172a); }
.auth-title span { color: var(--blue, #2563eb); }
.auth-sub { font-size: 13px; color: var(--muted, #64748b); margin: -4px 0 8px; letter-spacing: .04em; text-transform: uppercase; }
.auth-field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.auth-field span { font-size: 12px; font-weight: 600; color: var(--muted, #64748b); }
.auth-field input {
  padding: 11px 13px; border: 1px solid var(--border, #e2e8f0); border-radius: 11px;
  font-size: 15px; background: var(--surface-2, #fff); color: var(--text, #0f172a); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.auth-field input:focus { border-color: var(--blue, #2563eb); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.auth-error { color: #dc2626; font-size: 13px; margin: -2px 0; }
.auth-submit { margin-top: 6px; width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.auth-foot { font-size: 11.5px; color: var(--muted, #94a3b8); line-height: 1.5; margin-top: 6px; }
.auth-link { color: var(--accent, #2563eb); font-weight: 600; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.auth-community { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; margin-top: 10px; }
.auth-links { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
.link-btn { background: none; border: none; padding: 0; font: inherit; color: var(--blue, #2563eb); font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.link-btn:hover { opacity: .8; }
.auth-done { font-size: 12.5px; color: #16a34a; line-height: 1.5; margin: -2px 0; }

/* ============ Students (admin invite list) ============ */
.inline-form { display: flex; gap: 8px; align-items: stretch; margin: 10px 0 6px; }
.inline-form input { flex: 1; min-width: 0; }
.student-list { margin-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.student-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--border, #e2e8f0); }
.student-row:last-child { border-bottom: none; }
.student-row-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.student-row-main .mono { font-size: 13.5px; overflow-wrap: anywhere; }
.auth-spinner {
  width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 50%;
  border: 3px solid var(--border, #e2e8f0); border-top-color: var(--blue, #2563eb);
  animation: auth-spin .8s linear infinite;
}
.auth-connecting { color: var(--muted, #64748b); font-size: 14px; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* ============ Sidebar account / logout ============ */
.user-pill {
  display: flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 9px;
  background: var(--surface-2, #f8fafc); font-size: 12.5px; font-weight: 600; color: var(--text, #0f172a);
}
.user-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex: none; }
.quick-logout {
  display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%;
  padding: 8px; border: 1px solid var(--border, #e2e8f0); border-radius: 9px;
  background: transparent; color: var(--muted, #64748b); font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.quick-logout:hover { color: #dc2626; border-color: #fecaca; background: #fef2f2; }
[data-theme="dark"] .quick-logout:hover { background: rgba(220,38,38,.1); }

/* ============ Shared / share-link UI ============ */
.shared-section { margin-bottom: 24px; }
.section-title { font-family: var(--font-head); font-size: 15px; font-weight: 600; color: var(--muted, #64748b); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px; }

/* ===== Matthew: accountability partner persona ===== */
.matthew-head { gap: 12px; }
.matthew-avatar {
  position: relative; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: var(--accent, #2563eb);
  background: color-mix(in srgb, var(--accent, #2563eb) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #2563eb) 22%, transparent);
}
.matthew-dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: #22c55e; border: 2px solid var(--surface, #fff); }
.matthew-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent, #2563eb); margin-bottom: 4px; }

/* ===== Shared-view banner ===== */
.shared-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--accent, #2563eb) 9%, transparent); border: 1px solid color-mix(in srgb, var(--accent, #2563eb) 22%, transparent); }
.shared-banner .sb-icon { color: var(--accent, #2563eb); display: grid; place-items: center; }
.shared-banner .sb-text { font-size: 13px; color: var(--text-dim, #555); }
.shared-banner .sb-signin { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--accent, #2563eb); background: none; border: none; cursor: pointer; }
.guest-cta { padding: 14px; border-top: 1px solid var(--border, #eee); display: grid; gap: 8px; justify-items: stretch; }

/* ===== Share-link modal ===== */
.share-link-modal { width: min(440px, 92vw); background: var(--surface, #fff); border-radius: 16px; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.18); text-align: center; }
.share-link-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center; color: var(--accent, #2563eb); background: color-mix(in srgb, var(--accent, #2563eb) 12%, transparent); }
.share-link-modal h3 { margin-bottom: 6px; }
.share-link-url { width: 100%; margin: 16px 0; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border, #ddd); background: var(--bg, #f7f8fa); font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--text-dim, #444); }

/* Matthew card: "+N more" footer */
.ap-more { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border, #e2e8f0); font-style: italic; }

/* Access code page */
.access-current { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; margin-bottom: 14px; background: var(--surface-2, #f8fafc); }
.access-code-value { font-size: 18px; font-weight: 700; letter-spacing: .5px; }
