/* Noctemque Campaign Manager - light theme only */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f9fc;
  --line: #e3e8ee;
  --line-strong: #d0d7e0;
  --ink: #0a2540;
  --ink-2: #425466;
  --ink-3: #697386;
  --primary: #635bff;
  --primary-600: #5247e6;
  --primary-50: #f3f2ff;
  --primary-100: #e4e2ff;
  --green: #0e6245;
  --green-50: #d7f7c2;
  --amber: #8a4b04;
  --amber-50: #fbe9b8;
  --red: #c4133f;
  --red-50: #ffe3e8;
  --slate-50: #f1f4f8;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 1px rgba(10, 37, 64, .04), 0 2px 4px rgba(10, 37, 64, .03);
  --shadow: 0 2px 5px rgba(60, 66, 87, .08), 0 1px 1px rgba(0, 0, 0, .06);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --appbar-h: 64px;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 var(--font); letter-spacing: -.003em; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; } a:hover { color: var(--primary-600); }
h1, h2, h3 { margin: 0; line-height: 1.25; color: var(--ink); }
code, pre { font-family: var(--mono); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- App shell: top bar + sidebar ---------- */
.appbar { position: sticky; top: 0; z-index: 30; height: var(--appbar-h); display: grid; grid-template-columns: 264px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 0 28px 0 12px; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px; font-weight: 650; font-size: 16px; color: var(--ink); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(140deg, #0a2540 0%, #635bff 100%); display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 700; box-shadow: 0 1px 2px rgba(10,37,64,.25); }
.search { position: relative; width: min(520px, 100%); justify-self: center; }
.search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; stroke: var(--ink-3); fill: none; stroke-width: 2; stroke-linecap: round; }
.search input { width: 100%; height: 40px; padding: 0 14px 0 38px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; box-shadow: var(--shadow-sm); font-size: 14px; }
.search input::placeholder { color: #8792a2; }
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-100); outline: 0; }
.appbar-right { display: flex; align-items: center; gap: 22px; }
.appbar-right .link { color: var(--ink); font-weight: 500; } .appbar-right .link:hover { color: var(--primary); text-decoration: none; }
.userbox { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: 13px; border: 1px solid var(--primary-100); }
.who { line-height: 1.2; } .who b { display: block; font-size: 13px; font-weight: 600; } .who span { font-size: 12px; color: var(--ink-3); }
.linklike { background: none; border: 0; padding: 0; color: var(--ink-3); cursor: pointer; font-size: 13px; font-weight: 500; } .linklike:hover { color: var(--ink); }

.layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); align-items: start; }
.sidebar { position: sticky; top: var(--appbar-h); height: calc(100vh - var(--appbar-h)); padding: 28px 12px 20px; overflow-y: auto; }
.nav a { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 22px; margin-bottom: 2px; border-radius: 6px; color: var(--ink); font-weight: 500; font-size: 14.5px; }
.nav a:hover { background: var(--slate-50); text-decoration: none; }
.nav a.active { color: var(--primary); font-weight: 600; background: transparent; }
.nav a.active::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--primary); }
.nav-label { font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 22px 12px 8px 22px; }
.sidebar-note { margin: 28px 12px 0 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }

.main { min-width: 0; padding: 28px 40px 72px 28px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-title h1 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-title p { margin: 6px 0 0; color: var(--ink-3); font-size: 14.5px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.page-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin: -4px 0 26px; overflow-x: auto; }
.page-tabs a { padding: 0 0 12px; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.page-tabs a:hover { color: var(--ink); text-decoration: none; }
.page-tabs a.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.page-tabs .n { margin-left: 7px; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.content { padding: 0; }

/* ---------- Components ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; } .card-head p { margin: 3px 0 0; color: var(--ink-3); font-size: 13.5px; }
.card-body { padding: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 7px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm); transition: background .12s, border-color .12s, box-shadow .12s, transform .05s; }
.btn:hover { background: #f8fafc; text-decoration: none; border-color: #b9c3d0; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn svg, .nav svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(50,50,93,.25), inset 0 1px 0 rgba(255,255,255,.14); }
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
.btn-success { background: #0e7a57; border-color: #0e7a57; color: #fff; box-shadow: 0 1px 2px rgba(14,122,87,.3), inset 0 1px 0 rgba(255,255,255,.14); } .btn-success:hover { background: #0b6547; border-color: #0b6547; color: #fff; }
.btn-danger { color: var(--red); } .btn-danger:hover { background: var(--red-50); border-color: #f4b6c1; color: var(--red); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 13px; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--ink-2); } .btn-ghost:hover { background: var(--slate-50); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--primary-100); outline-offset: 0; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 600; background: var(--slate-50); color: var(--ink-2); line-height: 20px; vertical-align: middle; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.no-dot::before { display: none; }
.badge-active { background: var(--green-50); color: var(--green); } .badge-paused { background: var(--amber-50); color: var(--amber); }
.badge-draft { background: #e8edf3; color: #3c4f69; } .badge-archived { background: #edeef2; color: var(--ink-3); }
.badge-suspended { background: var(--red-50); color: var(--red); } .badge-planned { background: #eef1f6; color: var(--ink-3); font-size: 11.5px; padding: 0 8px; font-weight: 600; }
.badge-planned::before { display: none; }
.page-title .badge { font-size: 13px; }

.alert { display: flex; gap: 10px; padding: 13px 16px; border-radius: var(--radius); border: 1px solid; margin-bottom: 18px; font-weight: 500; }
.alert-success { background: #eefcdf; border-color: #c4ec9c; color: #1d5b12; } .alert-error { background: #fff1f3; border-color: #ffc9d2; color: #a3123a; }
.alert-warning { background: #fff8e6; border-color: #f6dc9b; color: #7a4308; } .alert-info { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary-600); }
.alert ul { margin: 6px 0 0 18px; padding: 0; font-weight: 400; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; } .field:last-child { margin-bottom: 0; }
.field > label, .label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; }
.field .opt { color: var(--ink-3); font-weight: 400; }
input[type=text], input[type=number], input[type=email], input[type=password], input[type=url], input[type=datetime-local], select, textarea {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.45; }
input:hover, select:hover, textarea:hover { border-color: #b3bccd; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); outline: 0; }
.has-error input, .has-error select, .has-error textarea, .has-error .chips { border-color: var(--red); background: #fffafa; }
.err { color: var(--red); font-size: 12.5px; margin-top: 5px; font-weight: 500; }
.row { display: grid; gap: 16px; } .row.c2 { grid-template-columns: 1fr 1fr; } .row.c3 { grid-template-columns: repeat(3, 1fr); } .row.c4 { grid-template-columns: repeat(4, 1fr); }
.input-affix { position: relative; } .input-affix > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.input-affix input { padding-left: 26px; } .input-affix.suffix input { padding-left: 12px; padding-right: 30px; } .input-affix.suffix > span { left: auto; right: 12px; }
.inline-fields { display: grid; grid-template-columns: 110px auto 110px 1fr; gap: 10px; align-items: center; }
.inline-fields span { color: var(--ink-2); white-space: nowrap; }

.option-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.option-card { position: relative; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 14px 16px 14px 44px; cursor: pointer; background: var(--surface); transition: border-color .12s, background .12s; }
.option-card:hover { border-color: #a9b5cc; }
.option-card input { position: absolute; left: 16px; top: 17px; width: 16px; height: 16px; accent-color: var(--primary); }
.option-card b { display: block; font-size: 14px; } .option-card small { color: var(--ink-3); font-size: 12.5px; }
.option-card:has(input:checked) { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 1px var(--primary) inset; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span { display: inline-block; padding: 6px 13px; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--surface); font-weight: 500; font-size: 13px; color: var(--ink-2); cursor: pointer; user-select: none; }
.pill:hover span { border-color: #a9b5cc; }
.pill input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--primary-100); }
.hours { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.hours .pill span { display: block; text-align: center; padding: 6px 0; border-radius: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.presets { display: flex; gap: 8px; margin: 10px 0 0; } .presets button { background: none; border: 0; color: var(--primary); cursor: pointer; font-size: 12.5px; font-weight: 600; padding: 0; } .presets button:hover { text-decoration: underline; }

.seg { display: inline-flex; padding: 3px; background: var(--slate-50); border-radius: 8px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 14px; border-radius: 6px; font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: 99px; background: var(--line); font-size: 11px; line-height: 18px; color: var(--ink-2); }
.seg button.on .count { background: var(--primary-100); color: var(--primary); }
.seg button[data-side=exclude].on .count { background: var(--red-50); color: var(--red); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 42px; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: text; }
.chips:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 6px; background: var(--primary-50); color: var(--primary-600); font-weight: 600; font-size: 13px; }
.chips[data-side=exclude] .chip { background: var(--red-50); color: var(--red); }
.chip button { border: 0; background: none; width: 20px; height: 20px; border-radius: 4px; cursor: pointer; color: inherit; font-size: 15px; line-height: 1; opacity: .7; } .chip button:hover { opacity: 1; background: rgba(0,0,0,.06); }
.chips input { flex: 1; min-width: 120px; height: 28px; border: 0; padding: 0 4px; box-shadow: none !important; background: transparent; }

/* ---------- Tables / lists ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.data td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; } table.data tbody tr:hover { background: #fafbfe; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; } table.data th.num { text-align: right; }
.cell-title { font-weight: 600; color: var(--ink); } .cell-title:hover { color: var(--primary); text-decoration: none; } .cell-sub { color: var(--ink-3); font-size: 12.5px; }
.filters { display: flex; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.filters input, .filters select { height: 36px; width: auto; min-width: 150px; } .filters input[type=text] { flex: 1; min-width: 220px; }
.tabs { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 12px 12px; color: var(--ink-3); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; } .tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { color: var(--primary); border-bottom-color: var(--primary); } .tabs .n { margin-left: 6px; font-size: 12px; background: var(--slate-50); padding: 1px 7px; border-radius: 99px; color: var(--ink-2); }
.empty { text-align: center; padding: 56px 20px; color: var(--ink-3); } .empty h3 { color: var(--ink); font-size: 16px; margin-bottom: 6px; }
.menu-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------- Dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.kpi { padding: 18px 20px; } .kpi .k { color: var(--ink-3); font-size: 13px; font-weight: 500; } .kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; } .kpi .s { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); } .list-row:last-child { border-bottom: 0; }
.sync { display: flex; align-items: center; gap: 8px; font-weight: 600; } .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-50); } .dot.warn { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-50); }

/* ---------- Campaign editor ---------- */
.editor { display: grid; grid-template-columns: 210px minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.editor-nav { position: sticky; top: 16px; }
.editor-nav ol { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.editor-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 500; }
.editor-nav a:hover { background: var(--surface); text-decoration: none; }
.editor-nav a::before { counter-increment: s; content: counter(s); width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink-3); background: var(--surface); flex: none; }
.editor-nav a.on { color: var(--primary); background: var(--primary-50); } .editor-nav a.on::before { border-color: var(--primary); color: #fff; background: var(--primary); }
.editor-nav a.err-dot::before { border-color: var(--red); color: var(--red); }
.section { scroll-margin-top: 16px; margin-bottom: 20px; }
.section .card-head { padding: 18px 22px; } .section .card-body { padding: 22px; }
.section-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--primary-50); color: var(--primary); font-weight: 700; font-size: 13px; margin-right: 10px; }
.summary { position: sticky; top: 16px; }
.summary h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 16px 18px 0; }
.sum-name { padding: 8px 18px 14px; font-size: 17px; font-weight: 700; border-bottom: 1px solid var(--line); word-break: break-word; }
.sum-list { padding: 8px 18px; } .sum-item { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; } .sum-item:last-child { border-bottom: 0; }
.sum-item span:first-child { color: var(--ink-3); } .sum-item span:last-child { font-weight: 600; text-align: right; }
.checklist { padding: 12px 18px 18px; border-top: 1px solid var(--line); } .check { display: flex; align-items: center; gap: 9px; padding: 4px 0; color: var(--ink-3); font-size: 13px; }
.check i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; font-style: normal; font-size: 11px; color: transparent; }
.check.ok { color: var(--ink); } .check.ok i { background: var(--green); border-color: var(--green); color: #fff; }
.creative { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; background: var(--surface-2); }
.creative-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
.creative-body { padding: 16px; display: grid; grid-template-columns: 1fr 210px; gap: 18px; }
.preview { border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: repeating-conic-gradient(#f0f2f7 0% 25%, #fff 0% 50%) 50% / 16px 16px; display: grid; place-items: center; min-height: 150px; overflow: hidden; color: var(--ink-3); font-size: 12.5px; text-align: center; padding: 8px; }
.preview img { max-width: 100%; max-height: 190px; display: block; }
details.adv summary { cursor: pointer; font-weight: 600; color: var(--primary); font-size: 13px; padding: 4px 0; } details.adv[open] summary { margin-bottom: 10px; }
.dim { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; background: var(--surface); }
.dim-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; flex-wrap: wrap; } .dim-head b { font-size: 14px; } .dim-head small { display: block; color: var(--ink-3); font-size: 12.5px; }
.dim-body { padding: 0 16px 16px; }
.tabs.inner { padding: 0; margin-bottom: 18px; }
.actionbar { position: sticky; bottom: 0; z-index: 5; margin: 0 -32px -48px; padding: 14px 32px; background: rgba(255,255,255,.94); backdrop-filter: blur(6px); border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.actionbar .left { color: var(--ink-3); font-size: 13px; }

/* ---------- Detail ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.kv { display: grid; grid-template-columns: 190px 1fr; gap: 0; } .kv > div { padding: 11px 20px; border-bottom: 1px solid var(--line); } .kv > div:nth-last-child(-n+2) { border-bottom: 0; } .kv .k { color: var(--ink-3); font-weight: 500; } .kv .v { font-weight: 500; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 6px; background: var(--primary-50); color: var(--primary-600); font-size: 12.5px; font-weight: 600; margin: 2px 4px 2px 0; } .tag.x { background: var(--red-50); color: var(--red); }
pre.code { margin: 0; padding: 16px 20px; max-height: 420px; overflow: auto; font-size: 12px; line-height: 1.55; background: #fafbfd; border-radius: 0 0 var(--radius) var(--radius); color: #2d3748; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1100px 500px at 15% -10%, #dfe7ff 0%, transparent 60%), radial-gradient(900px 500px at 100% 110%, #e6f4ff 0%, transparent 55%), var(--bg); }
.login-card { width: 100%; max-width: 400px; padding: 34px; } .login-card .brand { padding: 0 0 22px; font-size: 18px; } .login-card h1 { font-size: 21px; margin-bottom: 4px; } .login-card p { color: var(--ink-3); margin: 0 0 22px; }

@media (max-width: 1180px) { .editor { grid-template-columns: minmax(0, 1fr) 280px; } .editor-nav { display: none; } .kpis { grid-template-columns: repeat(2, 1fr); } .two-col, .detail { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .shell { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 12px; } .sidebar-foot { margin: 0 0 0 auto; border: 0; padding: 0; } .brand { padding: 0 12px 0 0; } .nav { display: flex; } .nav-label { display: none; }
  .editor { grid-template-columns: 1fr; } .summary { position: static; } .row.c2, .row.c3, .row.c4, .option-cards, .creative-body { grid-template-columns: 1fr; } .content, .topbar { padding-left: 16px; padding-right: 16px; } .actionbar { margin: 0 -16px -48px; padding: 12px 16px; } .hours { grid-template-columns: repeat(6, 1fr); } .kv { grid-template-columns: 1fr; } .kv .k { border-bottom: 0 !important; padding-bottom: 0; } }

/* ---------- Premium refinements (override earlier rules) ---------- */
table.data th { background: transparent; color: var(--ink-3); font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 600; padding: 12px 20px; border-bottom: 1px solid var(--line); }
table.data td { padding: 16px 20px; border-bottom: 1px solid var(--line); }
table.data tbody tr:hover { background: #fafbfd; }
.cell-title { font-weight: 600; color: var(--ink); } .cell-title:hover { color: var(--primary); text-decoration: none; }
.filters { padding: 16px 20px; gap: 12px; border-bottom: 1px solid var(--line); }
.filters input, .filters select { height: 36px; border-radius: 7px; }
.card > .tabs { display: none; }
.kpis { gap: 20px; margin-bottom: 26px; }
.kpi { padding: 22px 24px; } .kpi .k { color: var(--ink-3); font-size: 13.5px; font-weight: 500; } .kpi .v { font-size: 30px; font-weight: 700; letter-spacing: -.025em; margin-top: 6px; color: var(--ink); } .kpi .s { font-size: 13px; }
.two-col { gap: 24px; } .stack { gap: 24px; }
.list-row { padding: 14px 22px; }
input[type=text], input[type=number], input[type=email], input[type=password], input[type=url], input[type=datetime-local], select { border-radius: 7px; box-shadow: var(--shadow-sm); height: 40px; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-100); }
.field > label, .label { font-weight: 600; font-size: 13.5px; }
.pill input:checked + span { background: var(--primary); border-color: var(--primary); }
.option-card:has(input:checked) { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 1px var(--primary) inset; }
.option-card input { accent-color: var(--primary); }
.seg button.on { color: var(--ink); }
.editor { grid-template-columns: 200px minmax(0, 1fr) 300px; gap: 28px; }
.editor-nav { top: calc(var(--appbar-h) + 20px); } .summary { top: calc(var(--appbar-h) + 20px); } .section { scroll-margin-top: calc(var(--appbar-h) + 20px); }
.editor-nav a.on { background: transparent; } .editor-nav a.on::before { background: var(--primary); border-color: var(--primary); }
.section-num { background: var(--primary-50); color: var(--primary); border-radius: 7px; }
.actionbar { margin: 0 -40px -64px -24px; padding: 14px 40px 14px 24px; }
.checklist .check.ok i { background: #0e7a57; border-color: #0e7a57; }
.kv .k { color: var(--ink-3); } pre.code { background: #f8fafc; }
.tabs.inner { gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 20px; } .tabs.inner a { padding: 0 0 12px; margin-bottom: -1px; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(900px 480px at 12% -8%, #ece9ff 0%, transparent 60%), radial-gradient(800px 420px at 105% 105%, #e3f0ff 0%, transparent 55%), #fff; }
.login-card { width: 100%; max-width: 408px; padding: 36px; box-shadow: 0 10px 30px rgba(10,37,64,.08), 0 1px 3px rgba(10,37,64,.08); border-radius: 12px; }
.login-card .brand { padding: 0 0 24px; font-size: 19px; }
.login-card h1 { font-size: 23px; margin-bottom: 4px; letter-spacing: -.02em; } .login-card p { color: var(--ink-3); margin: 0 0 24px; }

@media (max-width: 1180px) { .editor { grid-template-columns: minmax(0, 1fr) 280px; } .editor-nav { display: none; } .kpis { grid-template-columns: repeat(2, 1fr); } .two-col, .detail { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .appbar { grid-template-columns: auto 1fr auto; padding: 0 14px; } .search { display: none; } .who { display: none; }
  .layout { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; padding: 8px 12px 0; border-bottom: 1px solid var(--line); } .nav { display: flex; gap: 4px; overflow-x: auto; } .nav a { padding: 8px 14px; white-space: nowrap; } .nav a.active::before { display: none; } .nav a.active { background: var(--primary-50); } .nav-label, .sidebar-note { display: none; }
  .main { padding: 20px 16px 48px; } .editor { grid-template-columns: 1fr; } .summary { position: static; }
  .row.c2, .row.c3, .row.c4, .option-cards, .creative-body { grid-template-columns: 1fr; } .hours { grid-template-columns: repeat(6, 1fr); } .kv { grid-template-columns: 1fr; } .kv .k { border-bottom: 0 !important; padding-bottom: 0; }
  .actionbar { margin: 0 -16px -48px; padding: 12px 16px; } .page-head { flex-direction: column; } .kpis { grid-template-columns: 1fr 1fr; }
}

/* ---------- Full-width layout + alignment polish ---------- */
.actionbar { margin: 40px -40px -72px -28px; padding: 14px 40px 14px 28px; justify-content: flex-end; gap: 16px; box-shadow: 0 -4px 16px rgba(10,37,64,.04); }
.actionbar .left { margin-right: auto; }
.actionbar .actions { flex-wrap: nowrap; }
.actions form { margin: 0; display: flex; }
.actions .btn, .menu-actions .btn { height: 36px; }
.menu-actions .btn { height: 30px; }
.menu-actions { align-items: center; }
.menu-actions form { margin: 0; display: flex; }
table.data td:last-child, table.data th:last-child { padding-right: 20px; }
table.data th.num, table.data td.num { text-align: right; }
.card-head .btn, .card-head .actions { flex: none; }
.kpi .v { line-height: 1.15; }
.two-col { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
.detail { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); }
@media (min-width: 1700px) { .two-col { grid-template-columns: minmax(0, 3fr) minmax(340px, 1fr); } .editor { grid-template-columns: 210px minmax(0, 1fr) 340px; } }
@media (max-width: 900px) { .actionbar { margin: 32px -16px -48px; padding: 12px 16px; } }
.detail > *, .two-col > *, .editor > * { min-width: 0; }
.detail .stack { min-width: 0; }
pre.code { white-space: pre; overflow: auto; max-width: 100%; }
.menu-actions form .btn { min-width: 92px; }
.stack { grid-template-columns: minmax(0, 1fr); }

/* ---------- Account dropdown ---------- */
.appbar-right { gap: 20px; }
.dropdown { position: relative; }
.userbtn { display: flex; align-items: center; gap: 10px; padding: 5px 8px 5px 5px; border: 1px solid transparent; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; }
.userbtn:hover, .userbtn[aria-expanded="true"] { background: var(--slate-50); border-color: var(--line); }
.userbtn:focus-visible { outline: 3px solid var(--primary-100); }
.userbtn .chev { width: 16px; height: 16px; stroke: var(--ink-3); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.userbtn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.avatar.lg { width: 40px; height: 40px; font-size: 16px; flex: none; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 260px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(10,37,64,.14), 0 2px 6px rgba(10,37,64,.06); z-index: 50; animation: menu-in .12s ease-out; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.menu-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head b { display: block; font-size: 14px; } .menu-head div > span { display: block; font-size: 12.5px; color: var(--ink-3); }
.menu-item { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); font-weight: 500; font-size: 14px; text-align: left; cursor: pointer; }
.menu-item:hover, .menu-item:focus-visible { background: var(--slate-50); text-decoration: none; color: var(--ink); outline: 0; }
.menu-item.danger { color: var(--red); } .menu-item.danger:hover { background: var(--red-50); color: var(--red); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 0; }
.menu form { margin: 0; }
@media (max-width: 900px) { .userbtn .who, .userbtn .chev { display: none; } .appbar-right .link { display: none; } }
.check-row { display: flex; align-items: center; gap: 10px; font-weight: 500 !important; cursor: pointer; } .check-row input { width: 16px; height: 16px; accent-color: var(--primary); }
.card > form.filters, .card-head .filters { background: transparent; }
.tag { margin: 3px 4px 3px 0; font-family: var(--mono); font-size: 12px; }

/* ---------- Bulk actions ---------- */
.bulkbar { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 22px; padding: 10px 14px 10px 20px; background: var(--ink); color: #fff; border-radius: 12px; box-shadow: 0 12px 32px rgba(10,37,64,.35); }
.bulkbar[hidden] { display: none !important; }
.bulkbar .btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); color: #fff; box-shadow: none; }
.bulkbar .btn:hover { background: rgba(255,255,255,.2); color: #fff; }
.bulkbar .btn-danger { color: #ffb3c0; } .bulkbar .btn-danger:hover { background: rgba(255,80,110,.25); color: #fff; }
.bulkbar .btn-ghost { background: transparent; border-color: transparent; color: #c3cfe0; }
.bulk-count { font-size: 14px; white-space: nowrap; } .bulk-count b { font-size: 16px; }
table.data input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
table.data tr.selected { background: var(--primary-50); }

/* ---------- Upload + list pickers + snippets ---------- */
.upload-row { display: flex; gap: 8px; align-items: center; } .upload-row input[type=url] { flex: 1; min-width: 0; }
.upload-btn { cursor: pointer; flex: none; } .upload-btn input { display: none; }
.preview.dragover { border-color: var(--primary); background-color: var(--primary-50); }
.hint.ok { color: var(--green); } .hint.bad { color: var(--red); font-weight: 500; }
.listpick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.listpick-label { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-right: 4px; }
.listpick-empty { font-size: 12.5px; color: var(--ink-3); }
.listpick .pill[hidden] { display: none !important; }
pre.snippet { margin: 0; padding: 12px 14px; background: #f6f9fc; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; line-height: 1.5; overflow-x: auto; white-space: pre-wrap; word-break: break-all; user-select: all; }

/* File inputs */
input[type=file] { width: 100%; padding: 6px; height: auto; border: 1px dashed var(--line-strong); border-radius: 7px; background: var(--surface-2); color: var(--ink-2); box-shadow: none; }
input[type=file]::file-selector-button { margin-right: 12px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm); }
input[type=file]::file-selector-button:hover { background: #f8fafc; border-color: #b9c3d0; }

/* ---------- Data grid ---------- */
.grid-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.grid-toolbar .grow { flex: 1; }
.grid-toolbar select, .grid-toolbar input[type=text], .grid-toolbar input[type=date] { height: 36px; width: auto; min-width: 150px; border-radius: 7px; }
.grid-toolbar .narrow { min-width: 170px; max-width: 200px; }
.grid-toolbar.wrap { row-gap: 10px; }
.date-range { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); } .date-range input { min-width: 0; padding: 0 8px; }
.search-box { position: relative; flex: 1 1 260px; max-width: 420px; }
.search-box svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; stroke: var(--ink-3); fill: none; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search-box input { width: 100%; height: 36px; padding: 0 30px 0 34px; border-radius: 7px; }
.search-box .clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%; text-align: center; line-height: 19px; color: var(--ink-3); font-size: 16px; }
.search-box .clear:hover { background: var(--slate-50); color: var(--ink); text-decoration: none; }
.grid-tools { display: flex; gap: 8px; align-items: center; }
.cols-menu { min-width: 200px; right: 0; max-height: 340px; overflow: auto; }
.cols-menu label { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; cursor: pointer; font-weight: 500; }
.cols-menu label:hover { background: var(--slate-50); } .cols-menu input { width: 16px; height: 16px; accent-color: var(--primary); }
.cols-menu .menu-note { padding: 6px 10px 4px; font-size: 12px; color: var(--ink-3); }

.table-wrap { max-height: calc(100vh - 300px); min-height: 160px; overflow: auto; }
table.data thead th { position: sticky; top: 0; z-index: 2; background: #fff; box-shadow: 0 1px 0 var(--line); border-bottom: 0; white-space: nowrap; }
table.data th.sortable a { color: var(--ink-3); display: inline-flex; align-items: center; gap: 5px; } table.data th.sortable a:hover { color: var(--ink); text-decoration: none; }
table.data th.sorted a { color: var(--primary); }
.sort-ind { font-size: 11px; opacity: .55; } th.sorted .sort-ind { opacity: 1; }
table.data th.num a { flex-direction: row-reverse; }
table.data.compact td { padding-top: 8px; padding-bottom: 8px; } table.data.compact .cell-sub { display: none; }
table.data td { transition: background .1s; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pager-info { color: var(--ink-3); font-size: 13.5px; } .pager-info b { color: var(--ink); font-weight: 600; } .pager-warn { color: var(--amber); }
.pager-nav { display: flex; align-items: center; gap: 4px; }
.pg { min-width: 32px; height: 32px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; color: var(--ink-2); font-weight: 500; font-size: 13.5px; border: 1px solid transparent; }
.pg:hover { background: var(--slate-50); text-decoration: none; color: var(--ink); }
.pg.current { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary); font-weight: 600; }
.pg.disabled { opacity: .35; pointer-events: none; } .pg.gap { pointer-events: none; color: var(--ink-3); }
.pg.wide { padding: 0 12px; border-color: var(--line-strong); background: #fff; box-shadow: var(--shadow-sm); }
.pager-size { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 13px; } .pager-size select { height: 32px; width: auto; min-width: 64px; padding: 0 8px; }

.prio { display: inline-flex; align-items: baseline; gap: 5px; padding: 1px 9px; border-radius: 6px; font-weight: 700; font-size: 12.5px; line-height: 20px; font-variant-numeric: tabular-nums; }
.prio small { font-weight: 500; font-size: 11px; opacity: .8; text-transform: capitalize; }
.prio-high { background: #ece9ff; color: #4b3fd6; } .prio-normal { background: #e8eef7; color: #3c4f69; } .prio-low { background: #f0f1f4; color: #6b7384; }

/* ---------- Priority selector ---------- */
.priority-scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.priority-scale label { position: relative; cursor: pointer; }
.priority-scale input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.priority-scale span { display: grid; place-items: center; height: 40px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; font-weight: 700; color: var(--ink-2); box-shadow: var(--shadow-sm); transition: all .12s; }
.priority-scale label:hover span { border-color: #a9b5cc; }
.priority-scale input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(50,50,93,.25); }
.priority-scale input:focus-visible + span { outline: 3px solid var(--primary-100); }
.priority-legend { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--ink-3); }

/* ---------- Uniform upload row ---------- */
.upload-row { display: flex; gap: 8px; align-items: stretch; }
.upload-row input[type=url] { flex: 1; min-width: 0; }
.upload-row .upload-btn { height: 40px; padding: 0 16px; font-size: 14px; }

@media (max-width: 900px) { .grid-toolbar .grow { display: none; } .search-box { max-width: none; flex-basis: 100%; } .pager { justify-content: center; } .priority-scale { grid-template-columns: repeat(5, 1fr); } }

/* ---------- Grid layout polish ---------- */
input[type=search], input[type=date] { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); -webkit-appearance: none; appearance: none; }
input[type=search]::-webkit-search-cancel-button { display: none; }
input[type=search]:focus, input[type=date]:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-100); outline: 0; }
.grid-toolbar input[type=search], .grid-toolbar input[type=date] { height: 36px; border-radius: 7px; }
.search-box input[type=search] { padding: 0 30px 0 34px; }
table.data { min-width: 960px; }
table.data th, table.data td { white-space: nowrap; }
table.data td[data-col=name] { white-space: normal; min-width: 230px; max-width: 340px; }
table.data td[data-col=what] { white-space: normal; min-width: 320px; }
table.data td[data-col=actions], table.data th[data-col=actions] { position: sticky; right: 0; background: #fff; z-index: 1; padding-left: 12px; box-shadow: -10px 0 10px -10px rgba(10,37,64,.14); }
table.data thead th[data-col=actions] { z-index: 3; }
table.data tbody tr:hover td[data-col=actions] { background: #fafbfd; }
table.data tbody tr.selected td[data-col=actions] { background: var(--primary-50); }
table.data .menu-actions { flex-wrap: nowrap; }
.search input[type=search] { padding: 0 14px 0 38px; height: 40px; border-radius: 8px; }

/* ---------- Bid hierarchy ---------- */
.hier { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; list-style: none; margin: 0 0 14px; padding: 0; counter-reset: h; }
.hier li { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface-2); margin-left: -1px; }
.hier li:first-child { border-radius: 8px 0 0 8px; margin-left: 0; } .hier li:last-child { border-radius: 0 8px 8px 0; }
.hier li.base { background: var(--primary-50); border-color: var(--primary-100); }
.hier-n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.hier li.base .hier-n { background: var(--ink-3); }
.hier b { display: block; font-size: 13.5px; } .hier small { display: block; color: var(--ink-3); font-size: 12px; line-height: 1.35; margin-top: 2px; }
.bid-head, .bid-row { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto; gap: 10px; align-items: center; }
.bid-head.has-type, .bid-row:has(select) { grid-template-columns: 170px minmax(0, 1fr) 160px auto; }
.bid-head { padding: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.bid-row { padding: 6px 0; } .bid-row .row-err { grid-column: 1 / -1; margin-top: -2px; }
.bid-row.has-error input, .bid-row.has-error select { border-color: var(--red); }
.bid-actions { display: flex; gap: 8px; margin-top: 10px; }
.bid-empty { padding: 18px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--ink-3); text-align: center; font-size: 13px; }
.bid-empty[hidden] { display: none; }
.bid-bulk { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); display: grid; gap: 10px; }
.bid-bulk textarea { font-family: var(--mono); font-size: 12.5px; }
.bid-bulk-actions { display: flex; gap: 12px; align-items: center; }
@media (max-width: 900px) { .hier { grid-template-columns: 1fr 1fr; } .hier li { margin-left: 0; border-radius: 8px !important; } .bid-head { display: none; } .bid-row, .bid-row:has(select) { grid-template-columns: 1fr 120px auto; } .bid-row select { grid-column: 1 / -1; } }

/* Header: account menu stays on the right now that the search box is gone */
.appbar-right { grid-column: 3; justify-self: end; }
/* Bid rows: compact columns so the value field gets the room */
.bid-head, .bid-row { grid-template-columns: minmax(0, 1fr) 120px 40px; }
.bid-head.has-type, .bid-row:has(select) { grid-template-columns: 150px minmax(0, 1fr) 120px 40px; }
.bid-row [data-bid-remove] { padding: 0; width: 40px; height: 40px; font-size: 20px; line-height: 1; }
.bid-row input, .bid-row select { height: 40px; }
@media (max-width: 900px) { .appbar-right { grid-column: 3; } .bid-row, .bid-row:has(select) { grid-template-columns: 1fr 110px 40px; } .bid-row select { grid-column: 1 / -1; } }

/* ---------- Reports & dashboard ---------- */
.range-picker { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.seg-links { display: inline-flex; padding: 3px; background: var(--slate-50); border-radius: 8px; gap: 2px; }
.seg-links a { padding: 6px 12px; border-radius: 6px; color: var(--ink-2); font-weight: 600; font-size: 13px; white-space: nowrap; }
.seg-links a:hover { text-decoration: none; color: var(--ink); } .seg-links a.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.range-custom { display: flex; align-items: center; gap: 6px; color: var(--ink-3); } .range-custom input[type=date] { height: 34px; width: 140px; padding: 0 8px; font-size: 13px; }
.delta { font-weight: 600; font-size: 12px; } .delta.up { color: var(--green); } .delta.down { color: var(--red); } .delta.neutral { color: var(--ink-2); }
.kpi .s { display: flex; gap: 4px; flex-wrap: wrap; }
.dash-split { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: stretch; }
.chart-card { min-width: 0; } .chart-area { position: relative; padding: 8px 12px 12px; } .chart-area svg { display: block; width: 100%; height: 260px; }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; padding: 8px 10px; border-radius: 7px; font-size: 12px; display: grid; gap: 2px; box-shadow: var(--shadow); white-space: nowrap; }
.chart-tip[hidden] { display: none; }
.health-row { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; } .health-row b { display: block; font-size: 13.5px; } .health-row small { display: block; color: var(--ink-3); font-size: 12.5px; }
.health-row .dot { margin-top: 5px; flex: none; }
.wallet-figure { font-size: 32px; font-weight: 700; letter-spacing: -.02em; } .wallet-figure.empty { color: var(--red); }
.budget { min-width: 130px; } .budget .bar { height: 6px; background: var(--slate-50); border-radius: 99px; overflow: hidden; margin-bottom: 4px; }
.budget .bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; } .budget .bar i.full { background: var(--amber); } .budget span { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
table.data tfoot td { position: sticky; bottom: 0; background: #f8fafc; border-top: 1px solid var(--line-strong); font-variant-numeric: tabular-nums; }
tr.totals td { padding-top: 14px; padding-bottom: 14px; }
@media (max-width: 1180px) { .dash-split { grid-template-columns: 1fr; } .range-picker { justify-content: flex-start; } }

/* Range row + KPI polish + dense report tables */
.range-row { margin: -6px 0 18px; display: flex; }
.range-row .range-picker { justify-content: flex-start; }
.kpi .s { align-items: center; gap: 8px; margin-top: 4px; color: var(--ink-3); font-size: 12.5px; } .kpi .s2 { color: var(--ink-2); font-size: 12.5px; margin-top: 2px; }
table.data.dense th, table.data.dense td { padding-left: 12px; padding-right: 12px; }
table.data.dense td[data-col=name] { min-width: 210px; max-width: 280px; }

/* Campaign page: performance card + lifetime caps */
.mini-kpis { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.mini-kpis > div { padding: 16px 20px; border-right: 1px solid var(--line); } .mini-kpis > div:last-child { border-right: 0; }
.mini-kpis span { display: block; color: var(--ink-3); font-size: 12.5px; } .mini-kpis b { display: block; font-size: 22px; letter-spacing: -.02em; margin: 2px 0; } .mini-kpis small { color: var(--ink-3); font-size: 12px; }
.chart-inline .card { border: 0; box-shadow: none; border-radius: 0; border-bottom: 1px solid var(--line); } .chart-inline .card-head { border: 0; padding-bottom: 0; }
.cap { margin: 2px 0 8px; } .cap span { font-size: 13px; } .cap .bar { height: 6px; background: var(--slate-50); border-radius: 99px; overflow: hidden; margin-top: 4px; max-width: 320px; } .cap .bar i { display: block; height: 100%; background: var(--primary); }
@media (max-width: 900px) { .mini-kpis { grid-template-columns: 1fr 1fr; } }

/* ---------- Event logs, trace timeline ---------- */
.mono { font-family: var(--mono); font-size: 12.5px; }
.trace-form { display: flex; gap: 8px; align-items: center; } .trace-form input { height: 34px; width: 240px; font-family: var(--mono); font-size: 13px; }
.timeline { list-style: none; margin: 0; padding: 8px 24px 20px 40px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 47px; top: 24px; bottom: 30px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 12px 0 12px 28px; }
.tl-dot { position: absolute; left: -1px; top: 17px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--line-strong); }
.tl-win .tl-dot { border-color: var(--primary); } .tl-click .tl-dot { border-color: #0e7a57; } .tl-conversion .tl-dot { border-color: #b25e09; background: #fbe9b8; } .tl-pixel .tl-dot { border-color: #8792a2; }
.tl-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; } .tl-head b { font-size: 14.5px; }
.tl-details { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; font-size: 13px; } .tl-details span { color: var(--ink); } .tl-details i { font-style: normal; color: var(--ink-3); margin-right: 6px; }

.check-inline { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--ink-2); font-weight: 400; }

.badge-succeeded { background: var(--green-50); color: var(--green); } .badge-pending { background: var(--amber-50); color: var(--amber); }
.badge-failed, .badge-rejected, .badge-disputed { background: var(--red-50); color: var(--red); } .badge-expired, .badge-canceled { background: #edeef2; color: var(--ink-3); }

/* A form that is one input and its button on a single line, aligned on the input. */
.inline-form { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 8px; }
.inline-form .field { flex: 1; margin: 0; }
.inline-form .btn { flex: none; height: 40px; }
/* Long lists inside a card scroll instead of stretching the page. */
.scroll-list { max-height: 340px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
@media (max-width: 640px) { .inline-form { flex-direction: column; align-items: stretch; } }
.card-body .list-row { padding-left: 0; padding-right: 0; }
.card-body .scroll-list .list-row { padding-left: 4px; padding-right: 8px; }

/* Wallet balance in the top bar (advertisers). Red when empty or suspended: campaigns cannot bid. */
.wallet-chip { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; text-decoration: none; }
.wallet-chip:hover { border-color: #b3bccd; background: var(--slate-50); text-decoration: none; color: var(--ink); }
.wallet-chip svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--green); }
.wallet-chip span { display: flex; flex-direction: column; line-height: 1.15; }
.wallet-chip small { font-size: 11px; color: var(--ink-3); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.wallet-chip b { font-size: 15px; font-variant-numeric: tabular-nums; }
.wallet-chip.empty, .wallet-chip.suspended { border-color: #f4b6c1; background: var(--red-50); }
.wallet-chip.empty svg, .wallet-chip.suspended svg, .wallet-chip.empty b, .wallet-chip.suspended b { color: var(--red); }
@media (max-width: 640px) { .wallet-chip small { display: none; } }

/* Quiet informational notice: outlined blue "i", grey text (used where a choice cannot be undone later). */
.notice-info { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 13px; color: var(--muted, #697386); }
.notice-info svg { flex: none; width: 20px; height: 20px; fill: none; stroke: #1a73e8; stroke-width: 2; stroke-linecap: round; }

.macro-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.macro-chip { font: inherit; font-size: 12px; padding: 1px 8px; border: 1px solid #1a73e8; border-radius: 4px; background: #fff; color: #1a73e8; cursor: pointer; }
.macro-chip:hover { background: #e8f0fe; }

/* Ad format cards (first step of a campaign) */
.format-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.format-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 10px 14px; border: 1px solid var(--line, #e3e6ea); border-radius: 8px; background: #fff; cursor: pointer; text-align: center; }
.format-card input { position: absolute; top: 12px; left: 12px; }
.format-card svg { width: 64px; height: 56px; fill: none; stroke: #0a2540; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.format-card svg .f { fill: #20c9b4; stroke: none; }
.format-card b { font-weight: 500; }
.format-card small { color: var(--muted, #697386); font-size: 12px; line-height: 1.4; }
.format-card.on { border-color: #1a73e8; box-shadow: 0 0 0 1px #1a73e8 inset; }
.format-tag { position: absolute; top: -10px; right: 8px; background: #dcecff; color: #4a90e2; border-radius: 4px; padding: 2px 8px; font-size: 12px; }

/* Numbered setup steps (conversion tracking helper) */
.steps { display: grid; gap: 22px; }
.step > b { display: block; margin-bottom: 4px; }
.step p { margin: 0 0 10px; }

/* The creative editor sits in a column that can be narrow: stack the preview below the fields when it is, and let the
   fields take the whole width when there is no preview (destination-only creatives, video). */
.creative { container-type: inline-size; }
@container (max-width: 560px) { .creative-body { grid-template-columns: 1fr; } }
.creative-body:has(> .preview[hidden]) { grid-template-columns: 1fr; }
