/* Ads Planner
   Direction: exact, accountable, a little warm. World: a workshop order book.
   Graphite neutrals for every surface; one cognac-leather accent for the primary action,
   the selection and the one figure that matters. Signature: the range bar (low to high
   estimate, expected tick, actual marker). 4px grid, IBM Plex Sans + Mono for figures. */

:root {
  /* Light, like a Meta ad account: white cards on a soft grey page, one blue for actions. */
  --bg: #f0f2f5;
  --surface: #ffffff;
  --raised: #f5f6f7;
  --sunken: #e4e6eb;
  --line: #e4e6eb;
  --line-strong: #ced0d4;
  --text: #1c1e21;
  --text-2: #4b4f56;
  --text-3: #65676b;
  --accent: #0866ff;          /* 4.6:1 on white */
  --accent-strong: #0759d6;
  --accent-soft: #e7f0ff;
  --accent-ink: #ffffff;
  --pos: #1e7e34;
  --pos-soft: #e6f4ea;
  --neg: #d0213c;
  --neg-soft: #fdecef;
  --warn: #9a5b00;
  --warn-soft: #fff4dd;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.14);
  --focus: rgba(8, 102, 255, 0.18);
  --toast: #1c1e21;
  --toast-ink: #ffffff;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: var(--font);        /* figures use the same face, with tabular digits */
  --code: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --r-ctrl: 6px;
  --r-card: 8px;
  --sidebar: 248px;
  color-scheme: light;
}

/* Dark, like a Meta account's dark mode. Chosen with the button in the sidebar (saved per browser). */
:root[data-theme="dark"] {
  --bg: #18191a;
  --surface: #242526;
  --raised: #3a3b3c;
  --sunken: #18191a;
  --line: #3e4042;
  --line-strong: #4e5052;
  --text: #e4e6eb;
  --text-2: #c2c5ca;
  --text-3: #a8abaf;
  --accent: #4599ff;          /* 5.3:1 on the dark cards */
  --accent-strong: #6aadff;
  --accent-soft: rgba(69, 153, 255, 0.16);
  --accent-ink: #0b1220;
  --pos: #4cc26a;
  --pos-soft: rgba(76, 194, 106, 0.14);
  --neg: #ff6b7d;
  --neg-soft: rgba(255, 107, 125, 0.14);
  --warn: #f0b44c;
  --warn-soft: rgba(240, 180, 76, 0.14);
  --shadow-sm: none;
  --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.5);
  --focus: rgba(69, 153, 255, 0.3);
  --toast: #e4e6eb;
  --toast-ink: #18191a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 14px/20px var(--font); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--code); font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.muted { color: var(--text-2); }
.small { font-size: 12px; line-height: 16px; }
.num, .figure { font-variant-numeric: tabular-nums; }

.icon {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex: none; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 20px 12px 16px;
  background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-size: 16px; font-weight: 600; height: 32px; }
.brand-mark { width: 28px; height: 28px; border-radius: 7px; flex: none; display: block; box-shadow: 0 0 0 1px var(--line); }
.brand-name { font-weight: 400; color: var(--text-2); font-size: 15px; }
.brand-name b { font-weight: 600; color: var(--text); }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; }
.nav-label { font-size: 12px; color: var(--text-3); padding: 0 8px; margin: 20px 0 6px; }
.nav-label:first-child { margin-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 34px; width: 100%; padding: 0 8px;
  border: 0; border-radius: var(--r-ctrl); background: none; color: var(--text-2);
  font: 500 14px/20px var(--font); text-align: left; cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.nav-item .icon { color: var(--text-3); }
.nav-item:hover { background: var(--raised); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item.active .icon { color: var(--accent); }
.count {
  margin-left: auto; font: 500 12px/20px var(--mono); color: var(--neg);
  background: var(--neg-soft); border-radius: 6px; padding: 0 6px;
}
.status-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.status-dot.on { background: var(--pos); }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; }
.who { font-size: 12px; color: var(--text-3); padding: 0 8px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 28px 32px 20px;
  max-width: 1360px; width: 100%;
}
.topbar h1 { font-size: 24px; line-height: 32px; letter-spacing: -0.01em; }
.page-sub { color: var(--text-2); margin-top: 2px; }
.icon-btn.menu-btn { display: none; }
.content { padding: 0 32px 64px; max-width: 1360px; width: 100%; }
.view { display: flex; flex-direction: column; gap: 16px; animation: enter .35s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.card.flush { padding: 0; overflow: hidden; }
.card-title { font-size: 15px; font-weight: 500; line-height: 20px; margin-bottom: 4px; }
.card > .muted { margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head .card-title { margin: 0; }
.card-head.padded { padding: 20px 24px 16px; margin: 0; align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.split.wide-left { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.eyebrow { font-size: 12px; color: var(--text-3); }
.hint { font-size: 12px; line-height: 16px; color: var(--text-3); margin-top: 8px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field > span { font-size: 13px; color: var(--text-2); }
.field.grow { flex: 1; margin-bottom: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row.tight { display: flex; gap: 8px; align-items: flex-end; }
.field-row.tight > input { flex: 1; }
.field-row.end .field { margin-bottom: 0; }
input, select, textarea {
  width: 100%; height: 36px; padding: 0 12px; font: 400 14px/20px var(--font); color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-ctrl);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
textarea { height: auto; padding: 8px 12px; resize: vertical; font-family: var(--mono); font-size: 12px; line-height: 18px; }
#edit-note { font-family: var(--font); font-size: 14px; line-height: 20px; }
input[type="number"] { font-variant-numeric: tabular-nums; }
input[type="file"] { height: auto; padding: 6px; font-size: 13px; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
select { appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2373736f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
select.compact { height: 32px; width: auto; font-size: 13px; }
input:hover, select:hover, textarea:hover { border-color: var(--text-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.affix { display: flex; align-items: stretch; }
.affix em {
  font: 500 12px/34px var(--mono); font-style: normal; color: var(--text-3); padding: 0 10px;
  background: var(--raised); border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--r-ctrl) 0 0 var(--r-ctrl);
}
.affix input { border-radius: 0 var(--r-ctrl) var(--r-ctrl) 0; }
.affix.suffix em { border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 var(--r-ctrl) var(--r-ctrl) 0; }
.affix.suffix input { border-radius: var(--r-ctrl) 0 0 var(--r-ctrl); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.form-error { color: var(--neg); font-size: 13px; min-height: 20px; margin-top: 12px; }

/* ---------- buttons ---------- */
.btn, button.btn, a.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  font: 500 14px/20px var(--font); color: var(--text); white-space: nowrap; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-ctrl);
  transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease);
}
.btn:hover { background: var(--raised); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.ghost { border-color: transparent; background: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--raised); color: var(--text); }
.btn.danger-text { color: var(--neg); }
.btn.small { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn .icon { color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: var(--r-ctrl); background: var(--surface); color: var(--text); cursor: pointer; }

/* ---------- tags, verdicts ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; line-height: 16px; color: var(--text-2); background: var(--raised); white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.tag.approved::before, .tag.ahead::before, .tag.improved::before, .tag.high::before, .tag.active::before { background: var(--pos); }
.tag.launched::before, .tag.on_track::before, .tag.medium::before { background: var(--accent); }
.tag.behind::before, .tag.worse::before, .tag.critical::before { background: var(--neg); }
.tag.low::before, .tag.warning::before, .tag.paused::before { background: var(--warn); }
.tag.completed::before, .tag.no_data::before, .tag.neutral::before, .tag.draft::before { background: var(--text-3); }
.conf { color: var(--text-2); }

/* ---------- plan page ---------- */
.plan-top { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.estimate .card-title, .empty-estimate .card-title { margin-bottom: 16px; }
.est-figure { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.est-figure > span:not(.unit) { font-size: 44px; line-height: 48px; font-weight: 500; letter-spacing: -0.02em; }
.est-figure .dash { color: var(--text-3); }
.est-figure .unit { font-size: 15px; color: var(--text-2); margin-left: 6px; }
.est-meta { color: var(--text-2); margin: 4px 0 24px; }
.est-meta strong { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.stats > div { padding: 14px 0 0; }
.stats > div:nth-child(n+4) { padding-top: 16px; }
.stats dt { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.stats dd { margin: 0; font: 500 15px/20px var(--mono); font-variant-numeric: tabular-nums; }
.stats dd small { display: block; font: 400 12px/16px var(--mono); color: var(--text-3); margin-top: 2px; }
.notes { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 8px; }
.notes li { display: flex; gap: 8px; font-size: 13px; color: var(--text-2); padding: 10px 12px; background: var(--warn-soft); border-radius: var(--r-ctrl); }
.notes li .icon { color: var(--warn); margin-top: 2px; }
.empty-estimate .muted { max-width: 52ch; }

/* range bar: the signature */
.range { position: relative; height: 32px; margin: 16px 0 4px; }
.range .track { position: absolute; left: 0; right: 0; top: 11px; height: 6px; border-radius: 3px; background: var(--sunken); }
.range .band { position: absolute; top: 11px; height: 6px; border-radius: 3px; background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.range .tick { position: absolute; top: 6px; width: 2px; height: 16px; border-radius: 1px; background: var(--accent); transform: translateX(-1px); }
.range .actual { position: absolute; top: 7px; width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 2px solid var(--surface); transform: translateX(-7px); }
.range .scale { position: absolute; top: 22px; left: 0; right: 0; display: flex; justify-content: space-between; font: 400 11px/12px var(--mono); color: var(--text-3); }
.range.compact { height: 18px; margin: 0; min-width: 120px; }
.range.compact .track, .range.compact .band { top: 7px; height: 4px; }
.range.compact .tick { top: 3px; height: 12px; }
.range.compact .actual { top: 3px; width: 12px; height: 12px; transform: translateX(-6px); }

.plan { padding: 0; }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.plan-head .eyebrow { margin-bottom: 6px; }
.plan-head .eyebrow #plan-id { font-family: var(--mono); }
.plan > .panel, .plan > #plan-view, .plan > #plan-editor, .plan > .plan-section, .plan > .versions { margin: 0 24px; }
.panel { margin-top: 20px !important; padding: 16px; border-radius: var(--r-ctrl); background: var(--raised); font-size: 13px; }
.panel-title { font-weight: 500; font-size: 14px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.panel ul { margin: 8px 0 0; padding-left: 18px; color: var(--text-2); }
.panel .muted { margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 4px 0; color: var(--text); }
.check .icon { margin-top: 2px; }
.check.ok .icon { color: var(--pos); }
.check.fail .icon { color: var(--neg); }
.check.warn .icon { color: var(--warn); }
.check.ok span { color: var(--text-2); }

.plan-section { padding: 24px 0; border-bottom: 1px solid var(--line); }
#plan-view > .plan-section:last-child { border-bottom: 0; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.plan-section h3 { font-size: 14px; font-weight: 500; }
.summary { font-size: 15px; line-height: 24px; max-width: 75ch; }
.objective { color: var(--text-2); margin-top: 8px; }

.phase-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; margin-bottom: 12px; }
.phase-bar span { background: var(--sunken); }
.phase-bar span:first-child { background: var(--accent); }
.phase-bar span:nth-child(2) { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.phase .head { display: flex; justify-content: space-between; gap: 8px; font-weight: 500; }
.phase .head .mono { color: var(--text-3); font-weight: 400; }
.phase p { color: var(--text-2); margin-top: 4px; }

.adsets { width: 100%; border-collapse: collapse; }
.adsets td { padding: 12px 16px 12px 0; border-top: 1px solid var(--line); vertical-align: top; }
.adsets tr:first-child td { border-top: 0; padding-top: 0; }
.adsets td:first-child { width: 22%; font-weight: 500; }
.adsets td:last-child { width: 120px; padding-right: 0; text-align: right; }
.adsets .aud { color: var(--text); }
.adsets .meta { color: var(--text-3); font-size: 12px; margin-top: 4px; }
.share { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font: 500 13px/16px var(--mono); }
.share i { display: block; width: 48px; height: 4px; border-radius: 2px; background: var(--sunken); position: relative; overflow: hidden; }
.share i b { position: absolute; inset: 0 auto 0 0; background: var(--accent); }

.creatives { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.creative { border: 1px solid var(--line); border-radius: var(--r-ctrl); padding: 16px; }
.creative .fmt { font: 400 12px/16px var(--mono); color: var(--text-3); }
.creative .hook { font-weight: 500; margin: 6px 0 8px; }
.creative .copy { color: var(--text-2); }
.creative .foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.creative .foot .cta { font: 500 12px/16px var(--mono); color: var(--accent); }

.rules-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.rules-cols h4 { margin: 0 0 8px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.rules-cols ul { margin: 0; padding-left: 16px; color: var(--text); }
.rules-cols li { margin-bottom: 6px; }
.rules-cols li::marker { color: var(--text-3); }

.targets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.target { padding: 12px 16px; border-radius: var(--r-ctrl); background: var(--raised); }
.target dt { font-size: 12px; color: var(--text-3); }
.target dd { margin: 4px 0 0; font: 500 18px/24px var(--mono); font-variant-numeric: tabular-nums; }

#plan-editor { padding: 24px 0; }
#plan-editor .field > span { font-family: var(--mono); font-size: 12px; }

.versions { padding: 16px 0 20px; color: var(--text-2); font-size: 13px; }
.versions summary { cursor: pointer; color: var(--text-2); width: max-content; }
.versions ol { margin: 8px 0 0; padding-left: 20px; }
.versions li { padding: 2px 0; }

/* creatives panel */
.photo-row { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.photo-box { width: 96px; height: 96px; flex: none; border-radius: var(--r-ctrl); background: var(--raised); border: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-fields { flex: 1; min-width: 0; }
.photo-fields .field { margin-bottom: 12px; }
.slot { border: 1px solid var(--line); border-radius: var(--r-ctrl); padding: 16px; margin-bottom: 12px; }
.slot .head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.slot .head b { font-weight: 500; }
.slot .head .fmt { font: 400 12px/16px var(--mono); color: var(--text-3); margin-left: 8px; }
.slot .prompt { font-size: 13px; color: var(--text-2); margin: 8px 0 12px; max-width: 90ch; }
.slot select { height: 30px; width: auto; font-size: 13px; padding-left: 10px; }
.thumbs { display: flex; gap: 12px; flex-wrap: wrap; }
.thumb { width: 144px; border: 1px solid var(--line); border-radius: var(--r-ctrl); overflow: hidden; background: var(--raised); }
.thumb.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.thumb img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.thumb .bar { display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 6px 8px; font: 400 11px/16px var(--mono); color: var(--text-3); background: var(--surface); }
.thumb .bar button { border: 0; background: none; cursor: pointer; font: 500 12px/16px var(--font); color: var(--text-2); padding: 2px 4px; border-radius: 4px; }
.thumb .bar button:hover { background: var(--raised); color: var(--text); }
.thumb.selected .bar [data-toggle] { color: var(--accent); }
.thumb .bar .del .icon { width: 14px; height: 14px; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--text-3); padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table th:first-child, .table td:first-child { padding-left: 24px; }
.table th:last-child, .table td:last-child { padding-right: 24px; }
.table .num { text-align: right; font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.table th.num { font-family: var(--font); font-size: 12px; }
.table tr[data-id] { cursor: pointer; }
.table tbody tr[data-id]:hover td { background: var(--raised); }
.table .empty td { color: var(--text-3); padding: 32px 24px; text-align: center; }
.table .sub { color: var(--text-3); font-size: 12px; }
.table td.bad { color: var(--neg); }
.table td.good { color: var(--pos); }
.table tr.campaign td { font-weight: 500; background: var(--raised); }
.table tr.ad td:first-child { padding-left: 40px; color: var(--text-2); }
.table-foot { padding: 12px 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.table-foot:empty { display: none; }

/* ---------- rows (rules, action log) ---------- */
.rows { list-style: none; padding: 0; margin: 16px 0 0; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows li .meta { display: block; font: 400 12px/16px var(--mono); color: var(--text-3); margin-top: 2px; }
.rows li.inactive > span { color: var(--text-3); text-decoration: line-through; }
.rows li.bad > span { color: var(--neg); }
.rows .empty { color: var(--text-3); }

.calibration { display: flex; gap: 12px; flex-wrap: wrap; }
.cal { padding: 12px 16px; border-radius: var(--r-ctrl); background: var(--raised); min-width: 160px; }
.cal .name { font-size: 12px; color: var(--text-3); }
.cal .factor { font: 500 20px/28px var(--mono); margin-top: 2px; }
.cal .factor.up { color: var(--pos); }
.cal .factor.down { color: var(--neg); }

/* ---------- monitor ---------- */
.alert { padding: 16px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 8px 1fr; column-gap: 12px; }
.alert:first-child { border-top: 0; padding-top: 4px; }
.alert .sev { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--text-3); }
.alert.warning .sev { background: var(--warn); }
.alert.critical .sev { background: var(--neg); }
.alert.info .sev { background: var(--pos); }
.alert .head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.alert .msg { font-weight: 500; }
.alert .meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.alert .meta.figures { font-family: var(--mono); }
.alert .diag { margin-top: 10px; color: var(--text-2); }
.alert ol { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; counter-reset: opt; }
.alert ol li { counter-increment: opt; display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: start; padding: 10px 12px; background: var(--raised); border-radius: var(--r-ctrl); font-size: 13px; }
.alert ol li::before { content: counter(opt); font: 500 12px/20px var(--mono); color: var(--text-3); }
.alert ol .eff { color: var(--text-2); display: block; margin-top: 2px; }
.alert ol .risk { color: var(--text-3); }
.alert-empty { color: var(--text-3); padding: 8px 0; }

.launch-card .outcome { margin: 4px 0 16px; }
.outcome-row { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 16px; background: var(--raised); border-radius: var(--r-ctrl); }
.outcome-row .fig { font: 500 24px/28px var(--mono); }
.outcome-row .fig small { font: 400 13px/16px var(--font); color: var(--text-2); margin-left: 6px; }
.outcome-row .side { text-align: right; font-size: 13px; color: var(--text-2); }
.outcome-summary { font-size: 13px; color: var(--text-2); margin-top: 8px; }
.progress { height: 4px; background: var(--sunken); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.progress > div { height: 100%; background: var(--text-3); }
.targets-line { font-size: 12px; color: var(--text-3); margin: 12px 0; font-family: var(--mono); }

.switches { display: flex; flex-direction: column; margin-bottom: 20px; border-top: 1px solid var(--line); }
.toggle { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; }

/* ---------- connections ---------- */
#meta-status ul { margin: 4px 0 12px; padding-left: 16px; }
#meta-status h4 { margin: 12px 0 4px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.connect { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.conn-line { font-size: 13px; margin-bottom: 12px; color: var(--text-2); }
.conn-line b { color: var(--text); font-weight: 500; }
.paste { margin-top: 12px; }
.paste .hint { margin: 0 0 8px; }

/* ---------- login ---------- */
.login { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--bg); }
.login-card { width: 100%; max-width: 360px; }
.login-card .brand { padding: 0; margin-bottom: 40px; }
.login-card h1 { font-size: 24px; line-height: 32px; margin-bottom: 8px; }
.login-card > .muted { margin-bottom: 24px; min-height: 0; }
.login-card .btn { margin-top: 8px; height: 40px; }

/* ---------- toast ---------- */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 60;
  max-width: min(560px, calc(100vw - 32px)); padding: 10px 16px; border-radius: var(--r-ctrl);
  background: var(--text); color: var(--bg); font-size: 13px; box-shadow: var(--shadow-float);
  animation: toast .2s var(--ease);
}
#toast.error { background: var(--neg); color: #fff; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .plan-top, .split, .split.wide-left { grid-template-columns: 1fr; }
  .rules-cols { grid-template-columns: 1fr; gap: 16px; }
  .targets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .sidebar { position: fixed; z-index: 40; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-float); }
  .sidebar.open { transform: none; }
  .icon-btn.menu-btn { display: inline-flex; }
  .topbar { padding: 16px; }
  .topbar h1 { font-size: 20px; line-height: 28px; }
  .content { padding: 0 16px 48px; }
  .card { padding: 16px; }
  .card-head.padded { padding: 16px; }
  .plan-head { padding: 16px; }
  .plan > .panel, .plan > #plan-view, .plan > #plan-editor, .plan > .plan-section, .plan > .versions { margin: 0 16px; }
  .est-figure > span:not(.unit) { font-size: 36px; line-height: 40px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .field-row.tight { flex-wrap: wrap; }
  .card.flush { overflow-x: auto; }
  .table { min-width: 640px; }
  .table th:first-child, .table td:first-child { padding-left: 16px; }
  .outcome-row { grid-template-columns: 1fr; gap: 12px; }
  .outcome-row .side { text-align: left; }
  .adsets td:first-child { width: auto; }
  .photo-row { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

input[type="file"]::file-selector-button {
  height: 28px; margin-right: 12px; padding: 0 10px; font: 500 13px/20px var(--font); color: var(--text);
  background: var(--raised); border: 1px solid var(--line-strong); border-radius: 6px; cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--sunken); }

/* ---------- activity ---------- */
.filters { display: flex; gap: 8px; padding: 16px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 200px; }
.search .icon { position: absolute; left: 10px; top: 10px; color: var(--text-3); }
.search input { padding-left: 34px; height: 32px; font-size: 13px; }
.activity { padding: 0 24px; }
.day { font-size: 12px; color: var(--text-3); padding: 16px 0 4px; }
.event { display: grid; grid-template-columns: 72px 8px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.event:last-child { border-bottom: 0; }
.event time { font: 400 12px/20px var(--mono); color: var(--text-3); white-space: nowrap; }
.event .lvl { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); align-self: center; }
.event.ok .lvl { background: var(--pos); }
.event.warning .lvl { background: var(--warn); }
.event.error .lvl { background: var(--neg); }
.event .what { min-width: 0; }
.event .what .t { color: var(--text); }
.event.error .what .t { color: var(--neg); }
.event .what .d { color: var(--text-2); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.event .who { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.event .area { font: 400 11px/16px var(--mono); color: var(--text-3); margin-left: 8px; }
.table-foot.center { text-align: center; }
.activity-empty { color: var(--text-3); padding: 32px 0; text-align: center; }

/* ---------- payments ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; box-shadow: var(--shadow-sm); }
.kpi .label { font-size: 13px; color: var(--text-2); }
.kpi .value { font: 500 28px/36px var(--mono); font-variant-numeric: tabular-nums; margin-top: 8px; letter-spacing: -0.01em; }
.kpi .value.accent { color: var(--accent); }
.kpi .sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.kpi .meter { height: 4px; border-radius: 2px; background: var(--sunken); margin-top: 12px; overflow: hidden; }
.kpi .meter > div { height: 100%; background: var(--accent); }
.kpi .meter.over > div { background: var(--neg); }

.bars { display: flex; align-items: flex-end; gap: 4px; height: 200px; padding-top: 8px; border-bottom: 1px solid var(--line); position: relative; }
.bars .bar { flex: 1; min-width: 4px; background: var(--sunken); border-radius: 3px 3px 0 0; position: relative; }
.bars .bar.today { background: var(--accent); }
.bars .bar:hover { background: var(--text-3); }
.bars .bar.today:hover { background: var(--accent-strong); }
.bars-axis { display: flex; justify-content: space-between; font: 400 11px/16px var(--mono); color: var(--text-3); margin-top: 6px; }
.bars-empty { color: var(--text-3); align-self: center; margin: auto; font-size: 13px; }

.spent { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.spent i { flex: 1; height: 4px; border-radius: 2px; background: var(--sunken); overflow: hidden; display: block; }
.spent i b { display: block; height: 100%; background: var(--accent); }
.spent span { font: 400 12px/16px var(--mono); color: var(--text-3); width: 40px; text-align: right; }

.prices { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.prices summary { cursor: pointer; color: var(--text-2); font-size: 13px; width: max-content; }
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px 84px 84px; gap: 8px; align-items: center; padding: 6px 0; }
.price-row.head { font-size: 12px; color: var(--text-3); }
.price-row code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price-row input { height: 30px; font: 400 12px/16px var(--mono); padding: 0 8px; text-align: right; }

@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .filters, .activity { padding-left: 16px; padding-right: 16px; }
  .event { grid-template-columns: 64px 8px minmax(0, 1fr); }
  .event .who { grid-column: 3; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi .value { font-size: 22px; line-height: 28px; }
}


/* ---------- today ---------- */
.todo-item { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 24px; border-top: 1px solid var(--line); }
.todo-item:first-child { border-top: 0; }
.todo-item .pri { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.todo-item.high .pri { background: var(--neg); }
.todo-item.medium .pri { background: var(--accent); }
.todo-item .t { font-weight: 500; }
.todo-item .d { color: var(--text-2); font-size: 13px; margin-top: 2px; max-width: 80ch; }
.todo-item .btn .icon { width: 14px; height: 14px; }

/* ---------- estimate: profit and season ---------- */
.stats.profit { margin-top: 16px; }
.stats dd .pos { color: var(--pos); }
.stats dd .neg { color: var(--neg); }
.season { font-size: 12px; color: var(--text-3); margin-top: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-family: var(--mono); }
.season .tag { font-family: var(--font); }
@media (max-width: 820px) {
  .todo-item { grid-template-columns: 8px minmax(0, 1fr); padding: 14px 16px; }
  .todo-item .btn { grid-column: 2; justify-self: start; }
}

/* ---------- usability pass ---------- */
.topbar .grow { flex: 1; min-width: 0; }
.topbar h1 { overflow: hidden; text-overflow: ellipsis; }
.conv { font: 400 12px/16px var(--mono); color: var(--text-3); min-height: 16px; }
.field-group { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }
.group-title { font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.optional { font-size: 11px; color: var(--text-3); background: var(--raised); border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.btn.danger { background: var(--neg); border-color: var(--neg); color: #fff; }
.btn.danger:hover { filter: brightness(0.92); background: var(--neg); }

.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* plan progress */
.plan-head .eyebrow { display: flex; align-items: center; gap: 8px; }
.steps { list-style: none; display: flex; gap: 0; margin: 10px 0 0; padding: 0; counter-reset: st; flex-wrap: wrap; }
.steps li { counter-increment: st; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); }
.steps li::before { content: counter(st); width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font: 500 11px/1 var(--mono); border: 1px solid var(--line-strong); color: var(--text-3); }
.steps li + li { margin-left: 8px; }
.steps li:not(:last-child)::after { content: ""; display: inline-block; width: 20px; height: 1px; background: var(--line-strong); margin-left: 8px; }
.steps li.done { color: var(--text-2); }
.steps li.done::before { content: "✓"; background: var(--pos-soft); border-color: transparent; color: var(--pos); }
.steps li.current { color: var(--text); font-weight: 500; }
.steps li.current::before { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.next { margin-top: 10px; color: var(--text-2); font-size: 13px; max-width: 70ch; }

.target small { display: block; font: 400 11px/16px var(--mono); color: var(--text-3); margin-top: 2px; }
.stats dt[title] { cursor: help; text-decoration: underline dotted var(--line-strong); text-underline-offset: 3px; }

/* structured plan editor */
.edit-section { padding: 16px 0; border-top: 1px solid var(--line); }
.edit-section:first-child { border-top: 0; padding-top: 0; }
.edit-section h3 { font-size: 14px; font-weight: 500; margin-bottom: 10px; }
.edit-section > textarea, .item textarea { font-family: var(--font); font-size: 14px; line-height: 20px; }
.items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.item { border: 1px solid var(--line); border-radius: var(--r-ctrl); padding: 12px 16px 4px; background: var(--surface); }
.item-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.item-head b { font-weight: 500; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 12px; }
.item-grid .field { margin-bottom: 12px; }
.item-grid .field.wide { grid-column: 1 / -1; }
#plan-editor .field > span { font-family: var(--font); font-size: 12px; }
.note-field em { font-style: normal; color: var(--text-3); }
.note-field { background: var(--accent-soft); padding: 12px; border-radius: var(--r-ctrl); margin-top: 8px; }

/* tables: an explicit "open" affordance */
.table td.open { color: var(--text-3); font-size: 12px; white-space: nowrap; text-align: right; }
.table td.open .icon { width: 14px; height: 14px; vertical-align: -3px; }
.table tr[data-id]:hover td.open { color: var(--accent); }

.alert-empty, .activity-empty { display: flex; align-items: center; gap: 8px; justify-content: center; }
.alert-empty { justify-content: flex-start; }
.alert-empty .icon, .activity-empty .icon { color: var(--pos); }

/* connections */
.conn-ok, .conn-bad { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--r-ctrl); font-size: 13px; }
.conn-ok { background: var(--pos-soft); }
.conn-ok .icon { color: var(--pos); margin-top: 2px; }
.conn-bad { background: var(--warn-soft); }
.conn-bad .icon { color: var(--warn); margin-top: 2px; }
.conn-ok b, .conn-bad b { font-weight: 500; }
details.connect > summary { cursor: pointer; font-size: 13px; color: var(--text-2); width: max-content; max-width: 100%; }
details.connect[open] > summary { margin-bottom: 12px; }
.howto { margin: 0 0 12px; padding-left: 18px; font-size: 13px; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; }
.howto code { overflow-wrap: anywhere; }

/* dialog */
.dialog { border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; width: min(440px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-float); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.dialog h2 { font-size: 17px; line-height: 24px; font-weight: 500; margin-bottom: 8px; }
.dialog p { color: var(--text-2); margin-bottom: 16px; }
.dialog[open] { animation: enter .2s var(--ease); }

@media (max-width: 820px) {
  .topbar { flex-wrap: wrap; }
  #btn-new-plan { order: 3; width: 100%; }
  .steps li:not(:last-child)::after { width: 10px; }
  .item-grid { grid-template-columns: 1fr; }
}

.where { font-size: 12px; line-height: 16px; color: var(--text-3); }
.where code { font-size: 11px; }
@media (max-width: 820px) {
  .adsets tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
  .adsets tr:first-child { border-top: 0; padding-top: 0; }
  .adsets td, .adsets tr:first-child td { border: 0; padding: 0; width: auto !important; }
  .adsets td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .adsets td:last-child { grid-row: 1; grid-column: 2; }
}

/* ---------- account ---------- */
.team-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 16px; }
.rows li .who-tag { margin-left: 8px; }
.btn.ghost.danger-text { color: var(--neg); }
@media (max-width: 820px) { .team-form { grid-template-columns: 1fr; } }

/* ---------- light account look ---------- */
.btn, button.btn, a.btn { font-weight: 600; }
.btn.primary { box-shadow: none; }
.card, .kpi { border-color: var(--line); }
.topbar { background: transparent; }
.sidebar { box-shadow: 1px 0 0 var(--line); border-right: 0; }
.table th { background: var(--raised); color: var(--text-2); font-weight: 600; }
.table .num, .stats dd, .kpi .value, .target dd, .cal .factor, .outcome-row .fig { letter-spacing: 0; }
.kpi .value { font-weight: 600; }
.tag { background: var(--raised); color: var(--text-2); }
.panel { background: var(--raised); border: 1px solid var(--line); }
input, select, textarea { background: var(--surface); }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px var(--focus); }
#toast { background: var(--toast); color: var(--toast-ink); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.35); }

/* ---------- compact density (about 10% smaller everywhere) ---------- */
:root { --sidebar: 216px; }
body { font-size: 13px; line-height: 18px; }
.sidebar { padding: 14px 10px 12px; }
.brand { font-size: 14px; height: 28px; gap: 8px; }
.brand-mark { width: 24px; height: 24px; border-radius: 6px; }
.brand-name { font-size: 14px; }
.nav { margin-top: 12px; }
.nav-label { font-size: 11px; margin: 14px 0 4px; }
.nav-item { height: 30px; font-size: 13px; gap: 8px; }
.nav-item .icon { width: 15px; height: 15px; }
.nav-item:focus-visible { outline-width: 2px; outline-offset: -2px; }
.who { font-size: 11px; }
.topbar { padding: 18px 24px 12px; }
.topbar h1 { font-size: 20px; line-height: 26px; }
.page-sub { font-size: 13px; }
.content { padding: 0 24px 48px; }
.view { gap: 12px; }
.card { padding: 18px; }
.card-head.padded { padding: 14px 18px 12px; }
.card-title { font-size: 14px; }
.kpis { gap: 12px; }
.kpi { padding: 14px 16px; }
.kpi .label { font-size: 12px; }
.kpi .value { font-size: 22px; line-height: 28px; margin-top: 4px; }
.kpi .sub { font-size: 11px; }
.todo-item { padding: 12px 18px; gap: 12px; }
.todo-item .d { font-size: 12px; }
.btn, button.btn, a.btn { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.small { height: 28px; padding: 0 9px; font-size: 12px; }
input, select, textarea { height: 32px; font-size: 13px; }
textarea { height: auto; }
.field { margin-bottom: 12px; gap: 4px; }
.field > span { font-size: 12px; }
.affix em { line-height: 30px; }
.est-figure > span:not(.unit) { font-size: 36px; line-height: 40px; }
.stats dd { font-size: 14px; }
.plan-head { padding: 14px 18px; }
.plan > .panel, .plan > #plan-view, .plan > #plan-editor, .plan > .plan-section, .plan > .versions { margin: 0 18px; }
.plan-section { padding: 18px 0; }
.table th { padding: 8px 12px; font-size: 11px; }
.table td { padding: 9px 12px; }
.table th:first-child, .table td:first-child { padding-left: 18px; }
.table th:last-child, .table td:last-child { padding-right: 18px; }
.target dd { font-size: 16px; }
.alert { padding: 12px 0; }
@media (max-width: 820px) {
  .topbar { padding: 14px 16px; }
  .content { padding: 0 16px 40px; }
}

/* ---------- sign-in ---------- */
.login { overflow-y: auto; }
.login-wrap { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: stretch; gap: 20px; margin: auto; }
.login-logo { text-align: center; }
.login-logo img { display: block; margin: 0 auto 12px; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); }
.login-name { font-size: 20px; line-height: 26px; color: var(--text-2); }
.login-name b { color: var(--text); font-weight: 600; }
.login-tag { margin-top: 4px; color: var(--text-3); font-size: 13px; }
.login-card { max-width: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 28px 28px 20px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 8px 16px rgba(0, 0, 0, 0.06); }
.login-card h1 { font-size: 20px; line-height: 26px; margin-bottom: 4px; text-align: center; }
.login-card > .muted { text-align: center; margin-bottom: 16px; }
.login-card .field { margin-bottom: 14px; }
.login-card input { height: 42px; font-size: 14px; }
.login-card .btn.primary { margin-top: 6px; height: 44px; font-size: 15px; }
.login-card .form-error { text-align: center; min-height: 18px; margin-top: 10px; }
.login-help { text-align: center; color: var(--text-3); font-size: 12px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.login-foot { text-align: center; color: var(--text-3); font-size: 12px; }
.pw { position: relative; }
.pw input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 30px; padding: 0 10px; border: 0; border-radius: 6px;
  background: none; color: var(--accent); font: 600 12px/1 var(--font); cursor: pointer; }
.pw-toggle:hover { background: var(--accent-soft); }
:root[data-theme="dark"] .login-card { box-shadow: none; }
