/* ===========================================================================
   Adventory — ad-ops & creative inventory manager
   Aesthetic: refined martech cockpit. Ink navy canvas, warm amber accent,
   dense data tables, sharp pills, tactile cards. Light-on-dark workhorse.
   =========================================================================== */

:root {
  --bg: #0d1018;
  --bg-2: #11151f;
  --surface: #161b27;
  --surface-2: #1c2230;
  --surface-3: #232a3a;
  --line: #262e40;
  --line-soft: #1e2533;
  --ink: #eef1f7;
  --ink-2: #aab3c5;
  --ink-3: #929caf;
  --accent: #ff7a18;
  --accent-2: #ffb347;
  --accent-soft: rgba(255, 122, 24, 0.13);
  --blue: #4f8cff;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --purple: #a78bfa;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(255,255,255,0.02), 0 12px 32px -12px rgba(0,0,0,0.6);
  --shadow-lg: 0 24px 60px -18px rgba(0,0,0,0.75);
  --font-display: 'Clash Display', 'Space Grotesk', sans-serif;
  --font-sans: 'Satoshi', 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}

body {
  font-family: var(--font-sans);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255,122,24,0.07), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(79,140,255,0.05), transparent 55%),
    var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

::selection { background: var(--accent); color: #1a0f02; }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2e3750; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .55; }

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

.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, var(--bg-2), #0c0f17);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 20px 14px;
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 6px 10px 22px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #ff5e00);
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 6px 16px -4px rgba(255,122,24,0.6);
  position: relative;
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.brand-name b { color: var(--accent-2); font-weight: 600; }
.brand-tag { font-size: 10px; color: var(--ink-3); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 1px; }

.nav-group { margin-top: 4px; }
.nav-label { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); padding: 14px 12px 7px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 10px; color: var(--ink-2);
  font-size: 14px; font-weight: 500; transition: all .15s; position: relative;
  width: 100%; border: 0; background: transparent; text-align: left; min-height: 44px;
}
.nav-item svg { width: 18px; height: 18px; opacity: .8; }
.nav-item:hover { background: var(--surface); color: var(--ink); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-2); }
.nav-item.active svg { opacity: 1; }
.nav-item.active::before {
  content: ''; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; background: var(--accent); border-radius: 0 3px 3px 0;
}
.nav-item .badge { margin-left: auto; font-size: 10px; background: var(--surface-3); color: var(--ink-2); padding: 1px 7px; border-radius: 20px; font-weight: 600; }

.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.source-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px; font-size: 12px;
}
.source-card .row { display: flex; justify-content: space-between; align-items: center; }
.source-card .pill { font-size: 10px; background: var(--accent-soft); color: var(--accent-2); padding: 2px 8px; border-radius: 20px; font-weight: 700; letter-spacing: .04em; }
.user-chip { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 0 4px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg,#4f8cff,#a78bfa); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; }
.user-chip .meta { font-size: 12px; }
.user-chip .meta b { display: block; font-weight: 600; font-size: 12.5px; }
.user-chip .meta span { color: var(--ink-3); font-size: 11px; }

/* ===== Main ============================================================== */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 28px; border-bottom: 1px solid var(--line);
  background: rgba(13,16,24,0.82); backdrop-filter: blur(14px);
}
.page-title h1 { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.page-title p { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.topbar-spacer { flex: 1; }

.search {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 13px; width: 280px; transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search svg { width: 16px; height: 16px; color: var(--ink-3); }
.search input { background: none; border: none; color: var(--ink); font-size: 13.5px; width: 100%; outline: none; }
.search input::placeholder { color: var(--ink-3); }
.search kbd { font-size: 10px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-family: var(--font-mono); }

.icon-btn { width: 44px; height: 44px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); display: grid; place-items: center; transition: all .15s; position: relative; flex-shrink: 0; }
.icon-btn:hover { color: var(--ink); border-color: var(--surface-3); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; border: 2px solid var(--surface); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  padding: 9px 15px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  transition: all .15s;
  min-height: 44px;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: var(--surface-3); background: var(--surface-2); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff5e00); border: none; color: #1a0f02;
  box-shadow: 0 8px 20px -8px rgba(255,122,24,0.7);
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 10px 26px -8px rgba(255,122,24,0.85); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface); }

.content { padding: 24px 28px 60px; }

/* ===== KPI cards ========================================================= */
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 17px; position: relative; overflow: hidden; box-shadow: var(--shadow);
  transition: transform .18s, border-color .18s;
}
.kpi:hover { transform: translateY(-2px); border-color: var(--surface-3); }
.kpi::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); opacity: .55; }
.kpi-head { display: flex; align-items: center; gap: 9px; }
.kpi-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); }
.kpi-ico svg { width: 16px; height: 16px; }
.kpi-label { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.kpi-value { font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -0.03em; margin: 10px 0 5px; }
.kpi-value .unit { font-size: 15px; color: var(--ink-3); font-family: var(--font-sans); margin-left: 1px; }
.kpi-delta { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.kpi-delta svg { width: 13px; height: 13px; }
.kpi-delta.up { color: var(--green); }
.kpi-delta.down { color: var(--red); }
.kpi-delta span { color: var(--ink-3); font-weight: 500; margin-left: 3px; }
.spark { position: absolute; right: 12px; bottom: 12px; width: 70px; height: 30px; opacity: .55; }

/* ===== Panels ============================================================ */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.panel-head h2 { font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.panel-head p { font-size: 12px; color: var(--ink-3); }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 18px; }

.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 22px; }

/* segmented control */
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { background: none; border: none; color: var(--ink-3); font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 6px; transition: all .14s; min-height: 38px; }
.seg button.active { background: var(--surface-2); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.3); }

/* chart */
.chart-wrap { position: relative; height: 248px; }
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

/* channel donut breakdown list */
.breakdown { display: flex; flex-direction: column; gap: 13px; }
.bd-row { display: flex; align-items: center; gap: 11px; font-size: 13px; }
.bd-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.bd-name { font-weight: 500; min-width: 74px; }
.bd-bar { flex: 1; height: 7px; background: var(--bg-2); border-radius: 6px; overflow: hidden; }
.bd-bar i { display: block; height: 100%; border-radius: 6px; }
.bd-val { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); min-width: 64px; text-align: right; }

/* ===== Toolbar (filters) ================================================= */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
  padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 500; transition: all .14s;
  min-height: 44px;
}
.filter-chip svg { width: 14px; height: 14px; opacity: .7; }
.filter-chip:hover { color: var(--ink); border-color: var(--surface-3); }
.filter-chip.active { background: var(--accent-soft); border-color: rgba(255,122,24,0.4); color: var(--accent-2); }
.filter-chip select { background: none; border: none; color: inherit; font-size: 13px; font-weight: 500; outline: none; cursor: pointer; }
.filter-chip select option { background: var(--surface-2); color: var(--ink); }
.toolbar .search { width: 260px; }
.toolbar-spacer { flex: 1; }
.result-count { font-size: 12.5px; color: var(--ink-3); }

/* ===== Table ============================================================= */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; padding: 11px 16px; border-bottom: 1px solid var(--line);
  background: var(--bg-2); white-space: nowrap; position: sticky; top: 0; user-select: none;
}
.sort-button { background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; padding: 6px 0; min-height: 36px; }
table.data th:hover { color: var(--ink-2); }
table.data th.sorted { color: var(--accent-2); }
table.data th .arrow { font-size: 9px; margin-left: 3px; }
table.data th.nosort { cursor: default; }
table.data td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tbody tr { transition: background .12s; cursor: pointer; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tbody tr:focus-visible { outline: 3px solid var(--accent-2); outline-offset: -3px; background: var(--surface-2); }
table.data tbody tr:last-child td { border-bottom: none; }

.cmp-name { display: flex; align-items: center; gap: 11px; }
.cmp-name b { font-weight: 600; font-size: 13.5px; }
.cmp-name .sub { font-size: 11.5px; color: var(--ink-3); }
.chan-badge { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0; }

.money { font-family: var(--font-mono); font-size: 13px; }
.muted { color: var(--ink-3); }

.spend-cell { min-width: 150px; }
.spend-top { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 5px; }
.spend-top b { font-family: var(--font-mono); font-weight: 500; }
.progress { height: 6px; background: var(--bg-2); border-radius: 6px; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.progress.over i { background: linear-gradient(90deg, #fb7185, var(--red)); }
.progress.healthy i { background: linear-gradient(90deg, var(--green), #10b981); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 20px;
  background: var(--surface-3); color: var(--ink-2); white-space: nowrap;
}
.pill .pdot { width: 6px; height: 6px; border-radius: 50%; }
.pill.active { background: rgba(52,211,153,0.13); color: var(--green); }
.pill.active .pdot { background: var(--green); box-shadow: 0 0 0 3px rgba(52,211,153,0.18); }
.pill.paused { background: rgba(251,191,36,0.13); color: var(--amber); }
.pill.paused .pdot { background: var(--amber); }
.pill.completed { background: rgba(79,140,255,0.13); color: var(--blue); }
.pill.completed .pdot { background: var(--blue); }
.pill.draft { background: var(--surface-3); color: var(--ink-3); }
.pill.draft .pdot { background: var(--ink-3); }
.pill.scheduled { background: rgba(167,139,250,0.13); color: var(--purple); }
.pill.scheduled .pdot { background: var(--purple); }
.pill.review { background: rgba(167,139,250,0.13); color: var(--purple); }
.pill.review .pdot { background: var(--purple); }

.perf { display: flex; align-items: center; gap: 8px; }
.perf-dots { display: flex; gap: 3px; }
.perf-dots i { width: 5px; height: 14px; border-radius: 2px; background: var(--surface-3); }
.perf-dots i.on { background: var(--accent); }
.perf-dots i.on.hi { background: var(--green); }
.perf-dots i.on.lo { background: var(--amber); }
.perf-score { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }

.row-menu { color: var(--ink-3); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 7px; border: 0; background: transparent; }
.row-menu:hover { background: var(--surface-3); color: var(--ink); }

/* ===== Creative library ================================================== */
.creative-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(244px, 1fr)); gap: 16px; }
.creative-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .18s, border-color .18s, box-shadow .18s; box-shadow: var(--shadow);
  color: var(--ink); width: 100%; text-align: left;
}
.creative-card:hover { transform: translateY(-3px); border-color: var(--surface-3); box-shadow: var(--shadow-lg); }
.creative-thumb { position: relative; cursor: pointer; background: var(--bg-2); }
.creative-thumb svg { display: block; width: 100%; height: auto; }
.format-tag { position: absolute; top: 9px; left: 9px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(13,16,24,0.7); backdrop-filter: blur(6px); color: #fff; padding: 3px 8px; border-radius: 6px; }
.variant-tag { position: absolute; top: 9px; right: 9px; width: 22px; height: 22px; border-radius: 6px; background: rgba(255,122,24,0.9); color: #1a0f02; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.creative-meta { padding: 13px 14px; }
.creative-meta .cm-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.creative-meta .cm-row { display: flex; align-items: center; gap: 8px; margin-top: 9px; justify-content: space-between; }
.score-ring { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.score-ring svg { width: 28px; height: 28px; }
.cm-stats { font-size: 11px; color: var(--ink-3); font-family: var(--font-mono); }

/* ===== Calendar / Gantt ================================================== */
.gantt { overflow-x: auto; }
.gantt-inner { min-width: 980px; }
.gantt-header { display: grid; grid-template-columns: 220px 1fr; border-bottom: 1px solid var(--line); }
.gantt-months { display: flex; }
.gantt-month { flex: 1; font-size: 11px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 11px 10px; border-left: 1px solid var(--line-soft); }
.gantt-row { display: grid; grid-template-columns: 220px 1fr; border-bottom: 1px solid var(--line-soft); align-items: center; }
.gantt-row:hover { background: var(--surface-2); }
.gantt-label { padding: 13px 16px; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.gantt-track { position: relative; height: 56px; }
.gantt-grid { position: absolute; inset: 0; display: flex; }
.gantt-grid span { flex: 1; border-left: 1px solid var(--line-soft); }
.gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); opacity: .7; z-index: 2; }
.gantt-today::after { content: 'Today'; position: absolute; top: -1px; left: 5px; font-size: 9px; color: var(--accent-2); font-weight: 700; }
.gantt-bar {
  position: absolute; top: 50%; transform: translateY(-50%); height: 26px; border-radius: 7px;
  display: flex; align-items: center; padding: 0 10px; font-size: 11px; font-weight: 600; color: #fff;
  overflow: hidden; cursor: pointer; transition: filter .15s, transform .15s; z-index: 1;
}
.gantt-bar:hover { filter: brightness(1.12); transform: translateY(-50%) scale(1.01); }
.gantt-bar .gb-fill { position: absolute; inset: 0; background: rgba(0,0,0,0.28); }
.gantt-bar span { position: relative; z-index: 1; white-space: nowrap; }

/* ===== Modal ============================================================= */
.overlay {
  position: fixed; inset: 0; background: rgba(6,8,13,0.72); backdrop-filter: blur(5px);
  display: grid; place-items: center; z-index: 100; padding: 24px; opacity: 0; pointer-events: none;
  transition: opacity .22s;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  width: 100%; max-width: 720px; max-height: 90vh; overflow: hidden;
  box-shadow: var(--shadow-lg); transform: translateY(14px) scale(.98); transition: transform .22s;
  display: flex; flex-direction: column;
}
.overlay.open .modal { transform: none; }
.modal.wide { max-width: 900px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.modal-head h2 { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.modal-head p { font-size: 12.5px; color: var(--ink-3); }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line-soft); }
.modal-foot .spacer { flex: 1; }
.close-x { margin-left: auto; }

/* wizard steps */
.steps { display: flex; gap: 0; padding: 16px 22px 0; }
.step { flex: 1; display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-3); position: relative; }
.step:not(:last-child)::after { content: ''; position: absolute; right: 16px; top: 13px; left: 38px; height: 2px; background: var(--line); }
.step.done:not(:last-child)::after { background: var(--accent); }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; transition: all .2s; z-index: 1; }
.step.active .step-num { background: var(--accent); color: #1a0f02; box-shadow: 0 0 0 4px var(--accent-soft); }
.step.done .step-num { background: var(--accent); color: #1a0f02; }
.step.active { color: var(--ink); font-weight: 600; }
.step.done { color: var(--ink-2); }

.field { margin-bottom: 17px; }
.field label, .field-label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 7px; color: var(--ink-2); }
.field .hint { font-size: 11.5px; color: var(--ink-3); font-weight: 400; }
.input, .field select, .field textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; color: var(--ink); font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field select option { background: var(--surface-2); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.option-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.option-card {
  background: var(--bg-2); border: 1.5px solid var(--line); border-radius: 12px; padding: 15px 14px;
  cursor: pointer; transition: all .15s; text-align: left;
}
.option-card:hover { border-color: var(--surface-3); }
.option-card.sel { border-color: var(--accent); background: var(--accent-soft); }
.option-card .oc-ico { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; margin-bottom: 10px; color: var(--accent-2); }
.option-card.sel .oc-ico { background: var(--accent); color: #1a0f02; }
.option-card .oc-ico svg { width: 17px; height: 17px; }
.option-card b { display: block; font-size: 13.5px; font-weight: 600; }
.option-card span { font-size: 11.5px; color: var(--ink-3); }

.chan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.chan-opt { display: flex; align-items: center; gap: 10px; background: var(--bg-2); color: var(--ink); border: 1.5px solid var(--line); border-radius: 11px; padding: 12px; cursor: pointer; transition: all .15s; text-align: left; min-height: 52px; }
.chan-opt:hover { border-color: var(--surface-3); }
.chan-opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.chan-opt b { font-size: 13.5px; font-weight: 600; }
.chan-opt .check { margin-left: auto; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line); display: grid; place-items: center; }
.chan-opt.sel .check { background: var(--accent); border-color: var(--accent); }
.chan-opt.sel .check svg { width: 12px; height: 12px; color: #1a0f02; }
.chan-opt:not(.sel) .check svg { display: none; }

.pick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.pick-card { border: 2px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; transition: all .15s; position: relative; background: var(--surface); color: var(--ink); text-align: left; }
.pick-card:hover { border-color: var(--surface-3); }
.pick-card.sel { border-color: var(--accent); }
.pick-card .pick-check { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 6px; background: var(--accent); display: none; place-items: center; }
.pick-card.sel .pick-check { display: grid; }
.pick-card .pick-check svg { width: 13px; height: 13px; color: #1a0f02; }
.pick-card .pick-name { font-size: 11px; padding: 7px 9px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* review */
.review-list { display: flex; flex-direction: column; gap: 1px; background: var(--line-soft); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.review-row { display: flex; justify-content: space-between; padding: 13px 16px; background: var(--bg-2); font-size: 13.5px; }
.review-row span:first-child { color: var(--ink-3); }
.review-row b { font-weight: 600; }

/* budget slider */
.slider-row { display: flex; align-items: center; gap: 14px; }
input[type=range] { -webkit-appearance: none; flex: 1; height: 6px; border-radius: 6px; background: var(--surface-3); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 2px 8px rgba(255,122,24,0.5); border: 3px solid var(--bg); }
.budget-val { font-family: var(--font-display); font-size: 24px; font-weight: 600; min-width: 120px; }

/* ===== Creative preview modal ============================================ */
.preview-stage { background: var(--bg-2); border-radius: 12px; padding: 28px; display: grid; place-items: center; margin-bottom: 18px; min-height: 280px; }
.preview-stage svg { max-width: 100%; height: auto; border-radius: 8px; box-shadow: var(--shadow-lg); }
.ab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ab-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.ab-card .ab-tag { font-size: 11px; font-weight: 800; color: var(--accent-2); margin-bottom: 9px; letter-spacing: .04em; }
.ab-card svg { width: 100%; height: auto; border-radius: 8px; }
.ab-card .ab-stat { display: flex; justify-content: space-between; font-size: 12px; margin-top: 11px; }
.ab-card .ab-stat b { font-family: var(--font-mono); }
.ab-winner { border-color: rgba(52,211,153,0.5); box-shadow: 0 0 0 1px rgba(52,211,153,0.3); }
.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.stat-box { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 13px; }
.stat-box .sb-label { font-size: 11px; color: var(--ink-3); }
.stat-box .sb-val { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin-top: 3px; }

/* ===== Campaign detail =================================================== */
.detail-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.detail-head .dh-main { flex: 1; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); margin-bottom: 12px; font-weight: 500; background: none; border: 0; padding: 6px 0; }
.back-link:hover { color: var(--ink); }
.back-link svg { width: 15px; height: 15px; }
.detail-title { font-family: var(--font-display); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; display: flex; align-items: center; gap: 12px; }
.detail-sub { display: flex; align-items: center; gap: 14px; margin-top: 9px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.detail-sub .dot-sep { color: var(--ink-3); }

.pacing-card { display: flex; align-items: center; gap: 22px; }
.pacing-ring { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.pacing-ring .pr-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.pacing-ring .pr-pct { font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.pacing-ring .pr-lbl { font-size: 10px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.pacing-info { flex: 1; }
.pacing-info .pi-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.pacing-info .pi-row:last-child { border: none; }
.pacing-info .pi-row b { font-family: var(--font-mono); }
.pace-badge { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.pace-badge.on { background: rgba(52,211,153,0.13); color: var(--green); }
.pace-badge.fast { background: rgba(248,113,113,0.13); color: var(--red); }
.pace-badge.slow { background: rgba(251,191,36,0.13); color: var(--amber); }

.target-list { display: flex; flex-direction: column; gap: 14px; }
.target-row { display: flex; align-items: center; gap: 12px; }
.target-row .tr-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); }
.target-row .tr-ico svg { width: 17px; height: 17px; }
.target-row .tr-text b { display: block; font-size: 13.5px; font-weight: 600; }
.target-row .tr-text span { font-size: 11.5px; color: var(--ink-3); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font-size: 11px; background: var(--surface-3); color: var(--ink-2); padding: 3px 9px; border-radius: 7px; }

.detail-creatives { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 13px; }

/* ===== Toast ============================================================= */
.toast-stack { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px;
  padding: 13px 16px; display: flex; align-items: center; gap: 11px; min-width: 280px;
  box-shadow: var(--shadow-lg); transform: translateX(120%); transition: transform .35s cubic-bezier(.2,.9,.3,1);
}
.toast.show { transform: none; }
.toast .t-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.toast.success .t-ico { background: rgba(52,211,153,0.15); color: var(--green); }
.toast.info .t-ico { background: var(--accent-soft); color: var(--accent-2); }
.toast .t-ico svg { width: 17px; height: 17px; }
.toast b { font-size: 13.5px; font-weight: 600; display: block; }
.toast span { font-size: 12px; color: var(--ink-3); }

/* ===== Notifications ===================================================== */
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px;
  padding: 12px 14px; color: var(--ink); transition: border-color .14s, transform .14s;
}
.notif-row:hover { border-color: var(--surface-3); transform: translateX(2px); }
.notif-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.notif-ico svg { width: 17px; height: 17px; }
.notif-ico.alert { background: rgba(248,113,113,0.14); color: var(--red); }
.notif-ico.warn { background: rgba(251,191,36,0.14); color: var(--amber); }
.notif-ico.info { background: var(--accent-soft); color: var(--accent-2); }
.notif-ico.done { background: rgba(79,140,255,0.14); color: var(--blue); }
.notif-text { flex: 1; min-width: 0; }
.notif-text b { display: block; font-size: 13.5px; font-weight: 600; }
.notif-text span { font-size: 12px; color: var(--ink-3); }
.notif-chev { width: 16px; height: 16px; color: var(--ink-3); flex-shrink: 0; }

/* ===== Empty state ======================================================= */
.empty { text-align: center; padding: 60px 20px; color: var(--ink-3); }
.empty .e-ico { width: 56px; height: 56px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 16px; }
.empty .e-ico svg { width: 26px; height: 26px; color: var(--ink-3); }
.empty b { display: block; font-size: 15px; color: var(--ink-2); margin-bottom: 5px; }

/* ===== Animations ======================================================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.anim { opacity: 0; animation: fadeUp .5s cubic-bezier(.2,.7,.3,1) forwards; }
.view { animation: fadeUp .35s cubic-bezier(.2,.7,.3,1); }

.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ===== Account chip + menu =============================================== */
.user-chip {
  display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 8px 8px;
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  text-align: left; transition: border-color .15s, background .15s; position: relative;
}
.user-chip:hover { border-color: var(--surface-3); background: var(--surface-2); }
.user-chip.open { border-color: rgba(255,122,24,0.4); }
.user-chip .meta { flex: 1; min-width: 0; }
.user-chip .meta b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.chip-caret { width: 15px; height: 15px; color: var(--ink-3); flex-shrink: 0; }
.account-menu {
  position: absolute; bottom: 64px; left: 14px; right: 14px; z-index: 40;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; animation: fadeUp .18s ease;
}
.account-menu .am-head { padding: 9px 11px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 5px; }
.account-menu .am-head b { display: block; font-size: 13px; font-weight: 600; }
.account-menu .am-head span { font-size: 11.5px; color: var(--ink-3); }
.am-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: none; color: var(--ink-2); font-size: 13px; font-weight: 500;
  padding: 9px 11px; border-radius: 8px; transition: background .12s, color .12s;
}
.am-item:hover { background: var(--surface-3); color: var(--ink); }
.am-item svg { width: 16px; height: 16px; opacity: .8; }

/* ===== App footer ======================================================== */
.app-foot {
  margin-top: auto; padding: 18px 28px; border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); flex-wrap: wrap;
}
.app-foot .foot-sep { opacity: .5; }
.app-foot .foot-link { color: var(--ink-2); font-weight: 500; transition: color .14s; background: none; border: 0; padding: 6px; font-size: inherit; }
.app-foot .foot-link:hover { color: var(--accent-2); }

/* ===== Account banner (client dashboard personalization) ================= */
.acct-banner {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(255,122,24,0.10), rgba(79,140,255,0.06) 60%, transparent), var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.acct-main { flex: 1; min-width: 240px; }
.acct-greet { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.acct-co { font-family: var(--font-display); font-size: 23px; font-weight: 600; letter-spacing: -0.02em; margin: 2px 0 11px; }
.acct-channels { display: flex; flex-wrap: wrap; gap: 8px; }
.acct-chan { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--line); padding: 4px 10px 4px 4px; border-radius: 20px; }
.acct-chan.muted { color: var(--ink-3); padding: 5px 12px; }
.acct-chan.muted a { color: var(--accent-2); font-weight: 600; }
.acct-budget { width: 280px; max-width: 100%; }
.acct-budget .ab-row { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 7px; }
.acct-budget .ab-row b { font-family: var(--font-mono); font-size: 14px; }
.acct-budget .ab-bar { height: 8px; background: var(--bg-2); border-radius: 6px; overflow: hidden; }
.acct-budget .ab-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.acct-budget .ab-foot { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }

/* ===== Onboarding ======================================================== */
.onboarding {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(900px 600px at 80% -10%, rgba(255,122,24,0.12), transparent 60%),
              radial-gradient(700px 500px at 0% 100%, rgba(79,140,255,0.08), transparent 55%),
              rgba(8,10,16,0.96);
  backdrop-filter: blur(8px); opacity: 0; transition: opacity .28s;
}
.onboarding.open { opacity: 1; }
.onb-card {
  position: relative; width: 100%; max-width: 560px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 30px 30px 22px; transform: translateY(16px) scale(.98); transition: transform .28s;
}
.onboarding.open .onb-card { transform: none; }
.onb-card.onb-welcome { max-width: 600px; text-align: center; }
.onb-skip { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--ink-3); font-size: 12.5px; font-weight: 500; min-height: 44px; padding: 0 6px; }
.onb-skip:hover { color: var(--ink-2); }
.onb-progress { display: flex; gap: 8px; margin-bottom: 22px; }
.onb-dot { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-3); transition: background .3s; }
.onb-dot.active { background: var(--accent); }
.onb-dot.done { background: rgba(255,122,24,0.45); }

.onb-hero .onb-mark { width: 56px; height: 56px; border-radius: 16px; margin: 8px auto 18px; background: linear-gradient(135deg, var(--accent), #ff5e00); display: grid; place-items: center; box-shadow: 0 12px 30px -8px rgba(255,122,24,0.7); }
.onb-hero .onb-mark svg { width: 30px; height: 30px; }
.onb-kicker { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-2); font-weight: 700; }
.onb-hero h1 { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -0.03em; margin: 10px 0 12px; line-height: 1.12; }
.onb-hero p { font-size: 14.5px; color: var(--ink-2); max-width: 420px; margin: 0 auto 24px; }
.onb-feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.onb-feature { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 12px; }
.onb-feature .onb-fic { width: 34px; height: 34px; border-radius: 9px; margin: 0 auto 10px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; }
.onb-feature .onb-fic svg { width: 18px; height: 18px; }
.onb-feature b { display: block; font-size: 13px; font-weight: 600; }
.onb-feature span { font-size: 11.5px; color: var(--ink-3); }

.onb-step-head { margin-bottom: 22px; }
.onb-step-no { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); font-weight: 700; }
.onb-step-head h2 { font-family: var(--font-display); font-size: 23px; font-weight: 600; letter-spacing: -0.02em; margin: 7px 0 5px; }
.onb-step-head p { font-size: 13.5px; color: var(--ink-3); }
.onb-mock-note { color: var(--ink-3); font-style: italic; }
.onb-form .field:last-child { margin-bottom: 0; }

.onb-budget { text-align: center; }
.onb-budget-val { font-family: var(--font-display); font-size: 40px; font-weight: 600; letter-spacing: -0.03em; }
.onb-budget-val span { font-size: 17px; color: var(--ink-3); font-family: var(--font-sans); }
.onb-budget input[type=range] { width: 100%; margin: 18px 0 6px; }
.onb-budget-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); font-family: var(--font-mono); }
.onb-budget-summary { margin-top: 22px; text-align: left; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.onb-sum-row { display: flex; justify-content: space-between; padding: 11px 15px; font-size: 13px; border-bottom: 1px solid var(--line-soft); }
.onb-sum-row:last-child { border-bottom: none; }
.onb-sum-row span { color: var(--ink-3); }
.onb-sum-row b { font-weight: 600; }

.onb-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 26px; }
.onb-welcome .onb-foot { justify-content: center; }
.onb-foot .btn-primary svg { width: 16px; height: 16px; }

/* ===== Mobile ============================================================ */
.menu-toggle { display: none; }
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 248px; transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: none; }
  .menu-toggle { display: grid; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .search { display: none; }
  .content { padding: 18px 16px 50px; }
  .topbar { padding: 14px 16px; }
  .option-grid, .chan-grid { grid-template-columns: 1fr 1fr; }
  .pick-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .ab-grid { grid-template-columns: 1fr; }
  .pacing-card { flex-direction: column; align-items: stretch; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 25; }
}
@media (max-width: 520px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .acct-banner { flex-direction: column; align-items: stretch; gap: 16px; }
  .acct-budget { width: 100%; }
  .onb-card { padding: 24px 20px 18px; border-radius: 16px; }
  .onb-hero h1 { font-size: 24px; }
  .onb-feature-row { grid-template-columns: 1fr; }
  .onb-budget-val { font-size: 32px; }
  .app-foot { padding: 16px; }
  .account-menu { bottom: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .anim { opacity: 1; }
}

/* ===== AI features (ad copy + insights) ===== */
.ai-copy {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--accent-soft), transparent);
  padding: 14px; margin-bottom: 18px;
}
.ai-copy-head { display: flex; align-items: center; gap: 12px; }
.ai-copy-head > div { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ai-copy-head b { font-size: 13.5px; color: var(--ink); }
.ai-copy-out { margin-top: 14px; }
.ai-loading {
  display: flex; align-items: center; gap: 9px; color: var(--ink-3);
  font-size: 13px; padding: 8px 2px;
}
.ai-loading svg { width: 17px; height: 17px; animation: ai-spin 1.1s linear infinite; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-block { margin-bottom: 14px; }
.ai-block:last-child { margin-bottom: 0; }
.ai-lbl {
  font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; margin-bottom: 7px;
}
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-chip {
  font-size: 13px; padding: 7px 11px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s;
}
.ai-chip:hover { border-color: var(--accent); background: var(--surface-3); }
.ai-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.ai-list li { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.ai-primary { font-size: 13.5px; color: var(--ink); line-height: 1.6; margin: 0; }
.ai-insights .hint { font-size: 13px; }

/* ===== Real-app additions: empty CTAs, honest errors, creative builder ===== */
.empty.empty-lg { padding: 56px 24px; display: flex; flex-direction: column; align-items: center; }
.empty.empty-lg b { font-size: 17px; }

/* honest AI error (no canned fallback output) */
.ai-error {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--amber, #f59e0b);
  background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 9px; padding: 11px 13px;
}
.link-btn {
  background: none; border: none; color: var(--accent); cursor: pointer;
  font: inherit; font-weight: 600; text-decoration: underline; padding: 0;
}

/* creative builder */
.cr-build { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 22px; align-items: start; }
.cr-build-form { display: flex; flex-direction: column; gap: 12px; }
.cr-build-preview { position: sticky; top: 0; }
.cb-stage {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; display: grid; place-items: center; min-height: 200px;
}
.cb-stage svg { max-width: 280px; border-radius: 8px; }
.pal-row { display: flex; flex-wrap: wrap; gap: 9px; }
.pal-swatch {
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer;
  border: 2px solid var(--line); padding: 0; transition: transform .12s, border-color .12s;
}
.pal-swatch:hover { transform: scale(1.06); }
.pal-swatch.sel { border-color: var(--ink); box-shadow: 0 0 0 2px var(--accent-soft); }
@media (max-width: 720px) {
  .cr-build { grid-template-columns: 1fr; }
  .cr-build-preview { position: static; }
}
