/* ClickBaza Buyers — design system. One file, no framework, no CDN. */

@font-face { font-family: Inter; src: url("/static/fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url("/static/fonts/Inter-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url("/static/fonts/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url("/static/fonts/Inter-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: InterDisplay; src: url("/static/fonts/InterDisplay-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #0d1220;
  --ink-2: #344054;
  --muted: #667085;
  --faint: #98a2b3;
  --line: #e7e9f0;
  --line-2: #d6dae5;
  --bg: #f5f6f9;
  --surface: #ffffff;
  --surface-2: #fafafc;
  --accent: #5b57f6;
  --accent-ink: #403cd8;
  --accent-soft: #eeeefe;
  --lime: #c8f169;
  --green: #0e9f6e;
  --green-soft: #e6f7f0;
  --amber: #a85a00;
  --amber-soft: #fff4e3;
  --red: #d92d20;
  --red-soft: #feecea;
  --violet: #7a5af8;
  --violet-soft: #f2eeff;
  --nav: #0a0f1e;
  --nav-2: #0e1528;
  --nav-ink: #98a2b8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .03);
  --shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, .14), 0 4px 12px rgba(16, 24, 40, .05);
  --focus: 0 0 0 3px rgba(91, 87, 246, .16);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 78% -12%, #e9e9ff 0%, rgba(233, 233, 255, 0) 58%),
    radial-gradient(900px 420px at 8% 0%, #f0f7e6 0%, rgba(240, 247, 230, 0) 50%),
    var(--bg);
  color: var(--ink);
  font: 400 14px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.015em; }
p { margin: 0; }
::selection { background: #dcdcff; }

/* ── layout ─────────────────────────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.page { width: 100%; max-width: 1560px; margin: 0 auto; padding: 26px 34px 64px; }

.side {
  width: 252px; flex: 0 0 252px; position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, var(--nav) 0%, var(--nav-2) 58%, #0b1120 100%);
  color: #fff; display: flex; flex-direction: column; padding: 20px 14px 14px;
  overflow: hidden; z-index: 40;
}
.side::before {
  content: ""; position: absolute; inset: -30% -60% auto -20%; height: 380px;
  background: radial-gradient(closest-side, rgba(122, 90, 248, .28), transparent 72%);
  pointer-events: none;
}
.side::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 220px;
  background: radial-gradient(closest-side at 30% 100%, rgba(200, 241, 105, .07), transparent 70%);
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 3px 8px 22px; position: relative; z-index: 1; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--lime), #a9e02f); color: #0b1020;
  box-shadow: 0 6px 18px rgba(200, 241, 105, .22);
}
.brand__mark svg { width: 21px; height: 21px; }
.brand__name { font-size: 15px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.brand__sub { font-size: 9px; letter-spacing: .2em; color: #6f7a91; text-transform: uppercase; margin-top: 2px; }

.side__create {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 9px;
  width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 10px;
  background: linear-gradient(135deg, #5b57f6, #7c6bff); color: #fff;
  font-size: 13px; font-weight: 600; box-shadow: 0 8px 20px -8px rgba(91, 87, 246, .9);
  transition: transform .15s var(--ease), filter .15s;
}
.side__create:hover { filter: brightness(1.08); }
.side__create:active { transform: scale(.985); }
.side__create kbd { margin-left: auto; }
.side__create svg { width: 17px; height: 17px; }

kbd {
  font: 500 10px/1 Inter, sans-serif; padding: 4px 5px; border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .08); color: #c7cede;
}
.topbar kbd { border-color: var(--line); background: #fff; color: var(--faint); }

.nav { margin-top: 22px; position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; }
.nav__label {
  font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: #566177;
  padding: 14px 10px 7px;
}
.nav__item {
  display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px;
  border-radius: 9px; color: var(--nav-ink); font-size: 13px; font-weight: 500;
  transition: background .15s, color .15s; position: relative;
}
.nav__item svg { width: 18px; height: 18px; opacity: .86; }
.nav__item:hover { background: rgba(255, 255, 255, .05); color: #e8ebf3; }
.nav__item.is-active { background: rgba(255, 255, 255, .075); color: #fff; }
.nav__item.is-active::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--lime);
}
.nav__count {
  margin-left: auto; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 6px;
  display: grid; place-items: center; font-size: 10px; font-weight: 600;
  background: rgba(255, 255, 255, .1); color: #d7dcea;
}
.nav__count--hot { background: rgba(217, 45, 32, .2); color: #ff9d94; }

.side__foot { margin-top: auto; position: relative; z-index: 1; display: flex; flex-direction: column; gap: 9px; }
.balance-box {
  border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .035);
  border-radius: 12px; padding: 12px 13px;
}
.balance-box__label { display: flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #6f7a91; }
.balance-box__value { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.balance-box__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 5px; font-size: 10.5px; color: #6f7a91; }
.balance-box a { color: #aeb7c9; }
.balance-box a:hover { color: #fff; }

.side__help {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 12px;
  background: rgba(200, 241, 105, .06); border: 1px solid rgba(200, 241, 105, .12);
  color: #b9c4a7; font-size: 11px; line-height: 1.45; text-align: left; width: 100%;
}
.side__help:hover { background: rgba(200, 241, 105, .1); }
.side__help svg { width: 15px; height: 15px; color: var(--lime); flex: none; margin-top: 1px; }
.side__help b { display: block; color: #e7f5c9; font-size: 11.5px; font-weight: 600; margin-bottom: 1px; }

/* ── topbar ─────────────────────────────────────────────────────────────── */
.topbar {
  height: 62px; display: flex; align-items: center; gap: 16px; padding: 0 34px;
  border-bottom: 1px solid rgba(214, 218, 229, .7); background: rgba(255, 255, 255, .62);
  backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 30;
}
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); min-width: 0; }
.crumbs b { color: var(--ink-2); font-weight: 500; }
.crumbs svg { width: 13px; height: 13px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-btn {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; min-width: 190px;
  border: 1px solid var(--line); background: #fff; border-radius: 9px; color: var(--faint);
  font-size: 12px; box-shadow: var(--shadow);
}
.search-btn:hover { border-color: var(--line-2); color: var(--muted); }
.search-btn kbd { margin-left: auto; }
.search-btn svg { width: 15px; height: 15px; }
.chip-demo {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px;
  border-radius: 7px; background: var(--amber-soft); color: var(--amber);
  font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  border: 1px solid #f5dfbc;
}
.chip-demo i { width: 5px; height: 5px; border-radius: 50%; background: #e59a1a; }
.chip-live {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px;
  border-radius: 7px; background: var(--green-soft); color: var(--green);
  font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  border: 1px solid #cdeee1;
}
.chip-live i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(14,159,110,.12); }
.sync-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px;
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  font-size: 11px; color: var(--muted); box-shadow: var(--shadow);
}
.sync-chip:hover { border-color: var(--line-2); }
.sync-chip svg { width: 13px; height: 13px; }
.sync-chip.is-syncing svg { animation: spin .9s linear infinite; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(145deg, #202a44, #0d1220); color: #fff; font-size: 11px; font-weight: 600;
  border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line);
}
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; color: var(--muted); box-shadow: var(--shadow);
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.icon-btn svg { width: 17px; height: 17px; }
.mobile-menu { display: none; }

/* ── page head ──────────────────────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; gap: 24px; margin: 4px 0 22px; flex-wrap: wrap; }
.eyebrow { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--faint); }
.eyebrow i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.page-head h1 { font: 700 30px/1.1 InterDisplay, Inter, sans-serif; letter-spacing: -.035em; margin-top: 8px; }
.page-head .lead { color: var(--muted); font-size: 13px; max-width: 720px; margin-top: 7px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 37px; padding: 0 14px; border-radius: 9px; border: 1px solid transparent;
  background: #fff; color: var(--ink); font-size: 12.5px; font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: #f8f8fb; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px -8px rgba(91, 87, 246, .8); }
.btn--primary:hover { background: var(--accent-ink); }
.btn--secondary { border-color: var(--line); box-shadow: var(--shadow); }
.btn--secondary:hover { border-color: var(--line-2); background: #fff; }
.btn--ghost { background: transparent; color: var(--muted); }
.btn--ghost:hover { background: rgba(13, 18, 32, .04); color: var(--ink); }
.btn--danger { background: var(--red); color: #fff; }
.btn--danger:hover { background: #b42318; }
.btn--sm { height: 31px; padding: 0 10px; font-size: 11.5px; border-radius: 7px; }
.btn--lg { height: 44px; padding: 0 20px; font-size: 13.5px; border-radius: 10px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn--block { width: 100%; }
.link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 12px; font-weight: 500; }
.link:hover { color: var(--accent-ink); }
.link svg { width: 13px; height: 13px; }
.link--muted { color: var(--muted); }
.link--muted:hover { color: var(--ink); }

/* ── cards & grids ──────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); min-width: 0;
}
.card__head { display: flex; align-items: center; gap: 12px; padding: 17px 20px 0; }
.card__title { font-size: 14px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 7px; }
.card__title svg { width: 16px; height: 16px; color: var(--faint); }
.card__sub { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.card__action { margin-left: auto; }
.card__body { padding: 16px 20px 20px; }
.card__foot { border-top: 1px solid var(--line); padding: 12px 20px; display: flex; align-items: center; gap: 10px; }
.grid { display: grid; gap: 14px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--dash { grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mt-14 { margin-top: 14px; } .mt-20 { margin-top: 20px; } .mt-28 { margin-top: 28px; }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; border-radius: 20px; color: #fff;
  background: linear-gradient(120deg, #0a0f1e 0%, #121a33 52%, #1b1436 100%);
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr);
  box-shadow: 0 20px 50px -24px rgba(10, 15, 30, .55);
}
.hero::before {
  content: ""; position: absolute; width: 520px; height: 520px; right: -120px; top: -260px;
  background: radial-gradient(closest-side, rgba(122, 90, 248, .38), transparent 70%); pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; left: -80px; bottom: -240px; width: 460px; height: 460px;
  background: radial-gradient(closest-side, rgba(200, 241, 105, .12), transparent 70%); pointer-events: none;
}
.hero__main { padding: 25px 28px 24px; position: relative; z-index: 1; }
.hero__kicker { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #8f9ab2; }
.hero__kicker i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(200, 241, 105, .12); }
.hero h2 { font: 700 24px/1.25 InterDisplay, Inter, sans-serif; letter-spacing: -.03em; margin-top: 12px; max-width: 620px; }
.hero h2 em { font-style: normal; color: var(--lime); }
.hero__summary { color: #aeb7ca; font-size: 12.5px; line-height: 1.55; margin-top: 9px; max-width: 600px; }
.hero__actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.hero__btn {
  display: inline-flex; align-items: center; gap: 7px; height: 35px; padding: 0 13px; border-radius: 9px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); color: #fff;
  font-size: 12px; font-weight: 500; transition: background .15s;
}
.hero__btn:hover { background: rgba(255, 255, 255, .12); }
.hero__btn svg { width: 14px; height: 14px; }
.hero__btn--primary { background: var(--lime); border-color: var(--lime); color: #10160a; }
.hero__btn--primary:hover { background: #d6fb7d; }
.hero__stats { display: flex; gap: 22px; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08); }
.hero__stat span { display: block; font-size: 10px; color: #7e899f; letter-spacing: .06em; text-transform: uppercase; }
.hero__stat b { display: block; font-size: 18px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }
.hero__stat i { font-style: normal; font-size: 10.5px; margin-left: 5px; color: var(--lime); }
.hero__focus { border-left: 1px solid rgba(255, 255, 255, .08); padding: 18px 14px; position: relative; z-index: 1; }
.hero__focus-label { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: #6f7a91; padding: 0 10px 8px; }
.focus-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 10px;
  transition: background .15s; position: relative;
}
.focus-item:hover { background: rgba(255, 255, 255, .05); }
.focus-item__icon {
  width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; flex: none; margin-top: 1px;
  background: rgba(255, 255, 255, .06); color: #c7cede;
}
.focus-item__icon svg { width: 14px; height: 14px; }
.focus-item--danger .focus-item__icon { background: rgba(217, 45, 32, .16); color: #ff9d94; }
.focus-item--warn .focus-item__icon { background: rgba(229, 154, 26, .14); color: #ffca7a; }
.focus-item--good .focus-item__icon { background: rgba(200, 241, 105, .12); color: var(--lime); }
.focus-item--info .focus-item__icon { background: rgba(122, 90, 248, .18); color: #c5b8ff; }
.focus-item__body { min-width: 0; display: flex; flex-direction: column; }
.focus-item__title, .focus-item__text { display: block; }
.focus-item__title { font-size: 12px; font-weight: 600; color: #f2f4f8; }
.focus-item__text { font-size: 10.8px; color: #8f9ab2; line-height: 1.45; margin-top: 2px; }
.focus-item__arrow { margin-left: auto; align-self: center; color: #5f6b80; }
.focus-item__arrow svg { width: 14px; height: 14px; }

/* ── KPI ────────────────────────────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px 10px;
  box-shadow: var(--shadow); min-width: 0; position: relative; overflow: hidden;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.kpi:hover { border-color: var(--line-2); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.kpi__label { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.kpi__value { font-size: 27px; font-weight: 600; letter-spacing: -.035em; line-height: 1.15; margin-top: 7px; font-variant-numeric: tabular-nums; }
.kpi__value small { font-size: 13px; font-weight: 500; color: var(--faint); letter-spacing: 0; }
.kpi__foot { display: flex; align-items: center; gap: 7px; margin-top: 5px; min-height: 24px; }
.kpi__spark { margin: 4px -2px -4px; height: 30px; }
.kpi__spark svg { width: 100%; height: 30px; display: block; overflow: visible; }

.delta {
  display: inline-flex; align-items: center; gap: 2px; height: 20px; padding: 0 5px;
  border-radius: 5px; font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--green-soft); color: var(--green);
}
.delta--down { background: var(--red-soft); color: var(--red); }
.delta--flat { background: #f2f4f7; color: var(--faint); }
.delta--invert.delta--up { background: var(--red-soft); color: var(--red); }
.delta--invert.delta--down { background: var(--green-soft); color: var(--green); }
.delta svg { width: 10px; height: 10px; }
.delta-note { font-size: 10.5px; color: var(--faint); }

/* ── chart ──────────────────────────────────────────────────────────────── */
.chart { position: relative; }
.chart__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.chart__legend { display: flex; align-items: center; gap: 14px; font-size: 11px; color: var(--muted); }
.chart__legend span { display: flex; align-items: center; gap: 5px; }
.chart__legend i { width: 8px; height: 8px; border-radius: 3px; }
.chart__svg { margin-top: 10px; height: 250px; }
.chart__svg svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart-tip {
  position: absolute; pointer-events: none; background: #0d1220; color: #fff; border-radius: 9px;
  padding: 8px 10px; font-size: 11px; line-height: 1.55; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translate(-50%, -110%); transition: opacity .12s; z-index: 5; white-space: nowrap;
}
.chart-tip.is-on { opacity: 1; }
.chart-tip b { font-weight: 600; }
.chart-tip .tip-row { display: flex; justify-content: space-between; gap: 14px; }
.chart-tip .tip-row span { color: #98a2b3; }

/* ── tables ─────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th {
  text-align: left; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint); padding: 0 10px 9px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table th.num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table th a { display: inline-flex; align-items: center; gap: 3px; }
.table th a:hover { color: var(--ink-2); }
.table td { padding: 11px 10px; border-bottom: 1px solid #f0f1f5; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .strong { font-weight: 500; color: var(--ink); }
.table .sub { font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-main__text { min-width: 0; }
.thumb {
  width: 36px; height: 54px; border-radius: 7px; object-fit: cover; flex: none;
  border: 1px solid var(--line); background: #f2f4f7;
}
.thumb--wide { width: 54px; height: 36px; }
.thumb--lg { width: 54px; height: 82px; border-radius: 9px; }
.bar-cell { position: relative; min-width: 90px; }
.bar-cell__bar { position: absolute; inset: 7px 0 7px auto; height: 22px; border-radius: 5px; background: #f0f0fe; z-index: 0; }
.bar-cell span { position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.hookline { font-size: 11.5px; line-height: 1.45; color: var(--ink-2); }
.hookline .kw { color: #a07a00; font-weight: 600; }

/* ── pills, chips, badges ───────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 7px;
  border-radius: 6px; font-size: 10.5px; font-weight: 500; white-space: nowrap;
  background: #f2f4f7; color: var(--muted);
}
.pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill--green { background: var(--green-soft); color: var(--green); }
.pill--amber { background: var(--amber-soft); color: var(--amber); }
.pill--red { background: var(--red-soft); color: var(--red); }
.pill--violet { background: var(--violet-soft); color: var(--violet); }
.pill--blue { background: #eaf3ff; color: #1a6fdc; }
.pill--gray { background: #f2f4f7; color: #667085; }
.pill--dark { background: #1a2236; color: #d8deea; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted);
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip svg { width: 13px; height: 13px; }
.chip__n { font-size: 10px; padding: 1px 5px; border-radius: 4px; background: rgba(13, 18, 32, .05); }
.chip.is-on .chip__n { background: rgba(255, 255, 255, .14); }
.formula {
  display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 7px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 10.5px; font-weight: 600; white-space: nowrap;
}
.formula b { font-weight: 700; opacity: .55; font-size: 9px; }
.tag { font-size: 10px; color: var(--faint); }
.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.good { color: var(--green); } .bad { color: var(--red); } .warn { color: var(--amber); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }

/* ── tooltip ────────────────────────────────────────────────────────────── */
.tip {
  position: relative; display: inline-grid; place-items: center; width: 14px; height: 14px;
  border-radius: 50%; border: 1px solid var(--line-2); color: var(--faint); font-size: 9px;
  font-weight: 600; cursor: help; flex: none; user-select: none;
}
.tip:hover, .tip:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.tip::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(3px);
  width: max-content; max-width: 260px; padding: 7px 9px; border-radius: 8px; background: #0d1220; color: #eef1f6;
  font-size: 10.5px; font-weight: 400; line-height: 1.45; letter-spacing: 0; text-align: left;
  opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s; z-index: 80;
  box-shadow: var(--shadow-lg); white-space: normal;
}
.tip::before {
  content: ""; position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #0d1220; opacity: 0; transition: opacity .12s; z-index: 81;
}
.tip:hover::after, .tip:focus-visible::after, .tip:hover::before, .tip:focus-visible::before { opacity: 1; transform: translate(-50%, 0); }

/* ── forms ──────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.label { font-size: 11.5px; font-weight: 500; color: var(--ink-2); display: flex; align-items: center; gap: 5px; }
.input, .select, .textarea {
  height: 38px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff;
  font-size: 12.5px; transition: border-color .15s, box-shadow .15s; min-width: 0; width: 100%;
}
.textarea { height: auto; padding: 10px 11px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.input::placeholder, .textarea::placeholder { color: #b0b7c5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2398a2b3' stroke-width='1.8'%3E%3Cpath d='m2 4 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.hint { font-size: 10.8px; color: var(--faint); line-height: 1.45; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.form-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-stack { display: flex; flex-direction: column; gap: 12px; }
.input-group { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; overflow: hidden; }
.input-group span { padding: 0 0 0 10px; color: var(--faint); font-size: 12px; }
.input-group .input { border: 0; box-shadow: none; padding-left: 4px; }
.input-group:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--accent); margin-top: 1px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.toggle input { display: none; }
.toggle span { width: 30px; height: 18px; border-radius: 999px; background: #d6dae5; position: relative; transition: background .15s; }
.toggle span::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::after { transform: translateX(12px); }
.seg { display: inline-flex; background: #f2f4f8; border-radius: 9px; padding: 3px; gap: 2px; }
.seg button, .seg a {
  height: 27px; padding: 0 9px; border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  font-size: 11px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px;
}
.seg button:hover, .seg a:hover { color: var(--ink); }
.seg .is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.seg__n { font-size: 9.5px; color: var(--faint); }

/* ── empty / banner ─────────────────────────────────────────────────────── */
.empty { border: 1px dashed var(--line-2); border-radius: 14px; padding: 34px 24px; text-align: center; background: rgba(255,255,255,.5); }
.empty__icon { width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty__icon svg { width: 21px; height: 21px; }
.empty h3 { font-size: 14px; }
.empty p { font-size: 12px; color: var(--muted); max-width: 430px; margin: 5px auto 0; line-height: 1.55; }
.empty .btn { margin-top: 14px; }
.banner {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 11px;
  background: var(--accent-soft); border: 1px solid #dedcfb; color: var(--accent-ink); font-size: 12px; line-height: 1.5;
}
.banner svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.banner b { font-weight: 600; }
.banner--warn { background: var(--amber-soft); border-color: #f3e0bf; color: #7a4a00; }
.banner--danger { background: var(--red-soft); border-color: #f6d3cf; color: #9b241b; }
.banner--good { background: var(--green-soft); border-color: #cdeee1; color: #086b4c; }

/* ── activity ───────────────────────────────────────────────────────────── */
.activity { display: flex; flex-direction: column; }
.activity__item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f2f3f7; }
.activity__item:last-child { border-bottom: 0; }
.activity__icon { width: 25px; height: 25px; border-radius: 7px; display: grid; place-items: center; flex: none; background: #f4f5f9; color: var(--muted); }
.activity__icon svg { width: 13px; height: 13px; }
.activity__icon--danger { background: var(--red-soft); color: var(--red); }
.activity__icon--warn { background: var(--amber-soft); color: var(--amber); }
.activity__icon--good { background: var(--green-soft); color: var(--green); }
.activity__icon--money { background: var(--green-soft); color: var(--green); }
.activity__icon--creative { background: var(--violet-soft); color: var(--violet); }
.activity__body { min-width: 0; font-size: 11.5px; color: var(--ink-2); line-height: 1.45; }
.activity__body b { font-weight: 500; }
.activity__meta { font-size: 10px; color: var(--faint); margin-top: 2px; }

/* ── progress / misc ────────────────────────────────────────────────────── */
.progress { height: 6px; border-radius: 999px; background: #eef0f5; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #8b7bff); transition: width .6s var(--ease); }
.progress--good span { background: linear-gradient(90deg, #0e9f6e, #35c88f); }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.section-title svg { width: 16px; height: 16px; color: var(--faint); }
.hr { height: 1px; background: var(--line); margin: 14px 0; }
.divider-label { display: flex; align-items: center; gap: 10px; font-size: 9.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); margin: 20px 0 10px; }
.divider-label::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 11.5px; }
.dl dt { color: var(--faint); }
.dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11.5px; padding: 5px 0; }
.kv span { color: var(--faint); }
.kv b { font-weight: 500; font-variant-numeric: tabular-nums; }

/* ── drawer ─────────────────────────────────────────────────────────────── */
.drawer { position: fixed; inset: 0; z-index: 90; display: none; }
.drawer.is-open { display: block; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(13, 18, 32, .32); backdrop-filter: blur(2px); animation: fade .2s; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 94vw); background: #fff;
  box-shadow: -20px 0 50px -20px rgba(13,18,32,.3); display: flex; flex-direction: column;
  animation: slideIn .26s var(--ease);
}
.drawer__head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 18px; letter-spacing: -.02em; }
.drawer__head p { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.drawer__tabs { display: flex; gap: 4px; padding: 10px 18px 0; border-bottom: 1px solid var(--line); }
.drawer__tab { height: 32px; padding: 0 10px; border: 0; background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 500; border-bottom: 2px solid transparent; }
.drawer__tab.is-on { color: var(--ink); border-bottom-color: var(--accent); }
.drawer__body { padding: 18px 22px 30px; overflow-y: auto; }
.drawer__section { display: none; }
.drawer__section.is-on { display: block; }
.help-item { padding: 12px 0; border-bottom: 1px solid #f2f3f7; }
.help-item:last-child { border-bottom: 0; }
.help-item h4 { font-size: 12.5px; font-weight: 600; }
.help-item p { font-size: 11.8px; color: var(--muted); line-height: 1.55; margin-top: 3px; }
.help-links { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }
.help-links a { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--accent); }
.help-links svg { width: 14px; height: 14px; }
.gloss { display: flex; flex-direction: column; }
.gloss__row { padding: 10px 0; border-bottom: 1px solid #f2f3f7; }
.gloss__row:last-child { border-bottom: 0; }
.gloss__term { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 600; }
.gloss__term code { font-size: 9.5px; color: var(--faint); background: #f6f7fa; padding: 2px 5px; border-radius: 4px; }
.gloss__def { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 3px; }
.routine__item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f2f3f7; }
.routine__time { font-size: 10px; font-weight: 600; color: var(--accent); width: 38px; flex: none; padding-top: 2px; }
.routine__title { font-size: 12px; font-weight: 600; }
.routine__text { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 2px; }

/* ── dialogs / palette ──────────────────────────────────────────────────── */
dialog { border: 0; padding: 0; background: transparent; color: var(--ink); }
dialog::backdrop { background: rgba(13, 18, 32, .38); backdrop-filter: blur(3px); }
.dialog-card {
  width: min(520px, 92vw); background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
  overflow: hidden; animation: pop .2s var(--ease);
}
.dialog-card--wide { width: min(700px, 94vw); }
.dialog__head { padding: 20px 22px 0; }
.dialog__head h3 { font-size: 16px; letter-spacing: -.02em; }
.dialog__head p { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.dialog__body { padding: 16px 22px 20px; }
.dialog__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 22px; border-top: 1px solid var(--line); background: var(--surface-2); }
.dialog__x { margin-left: auto; width: 30px; height: 30px; border: 0; background: #f4f5f9; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.dialog__x:hover { background: #eceef4; color: var(--ink); }
.dialog__x svg { width: 15px; height: 15px; }

.palette { width: min(620px, 94vw); background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .18s var(--ease); }
.palette__input { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 54px; border-bottom: 1px solid var(--line); }
.palette__input svg { width: 19px; height: 19px; color: var(--faint); }
.palette__input input { border: 0; outline: none; flex: 1; font-size: 14px; background: transparent; }
.palette__list { max-height: 380px; overflow-y: auto; padding: 6px; }
.palette__group { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 8px 10px 4px; }
.palette__item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 12.5px;
  color: var(--ink-2); cursor: pointer;
}
.palette__item.is-on, .palette__item:hover { background: var(--accent-soft); color: var(--accent-ink); }
.palette__item svg { width: 15px; height: 15px; color: var(--faint); }
.palette__item.is-on svg { color: var(--accent); }
.palette__sub { margin-left: auto; font-size: 10px; color: var(--faint); }
.palette__empty { padding: 28px; text-align: center; font-size: 12px; color: var(--faint); }
.palette__foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 10px; color: var(--faint); background: var(--surface-2); }
.palette__foot kbd { border-color: var(--line); background: #fff; color: var(--faint); }

/* ── toasts ─────────────────────────────────────────────────────────────── */
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: flex-start; gap: 9px; min-width: 260px; max-width: 380px; padding: 11px 13px;
  border-radius: 11px; background: #0d1220; color: #fff; font-size: 11.8px; line-height: 1.45;
  box-shadow: var(--shadow-lg); animation: toastIn .24s var(--ease);
}
.toast svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--lime); }
.toast--danger svg { color: #ff9d94; }
.toast--warn svg { color: #ffca7a; }

/* ── studio ─────────────────────────────────────────────────────────────── */
.studio-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 14px; align-items: stretch; }
.studio-form { padding: 20px 22px; }
.studio-form textarea { min-height: 78px; font-size: 14px; line-height: 1.45; }
.studio-form__controls { display: flex; gap: 10px; align-items: flex-end; margin-top: 12px; flex-wrap: wrap; }
.studio-form__actions { display: flex; gap: 8px; align-items: center; margin-top: 11px; flex-wrap: wrap; }
.studio-form__controls .field { min-width: 110px; }
.studio-form__cost { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--faint); margin-left: auto; }
.studio-info { padding: 20px 22px; background: linear-gradient(150deg, #0d1220, #141a30); color: #fff; border-color: #1c2440; }
.studio-info h3 { font-size: 13px; display: flex; align-items: center; gap: 7px; }
.studio-info h3 svg { width: 15px; height: 15px; color: var(--lime); }
.studio-info p { font-size: 11.5px; color: #98a2b8; line-height: 1.55; margin-top: 6px; }
.studio-info__steps { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.studio-info__step { display: flex; gap: 9px; font-size: 11px; color: #c6cdda; }
.studio-info__step b { color: var(--lime); font-weight: 600; }
.studio-info__foot { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); font-size: 10px; color: #6f7a91; }

.gen-progress { margin-top: 14px; padding: 20px 22px; }
.gen-progress__head { display: flex; align-items: center; gap: 12px; }
.gen-progress__head h3 { font-size: 14px; }
.gen-progress__pct { margin-left: auto; font-size: 20px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.gen-stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.gen-stage { font-size: 10px; color: var(--faint); padding-top: 7px; border-top: 2px solid #eef0f5; position: relative; }
.gen-stage.is-done { border-top-color: var(--green); color: var(--ink-2); }
.gen-stage.is-on { border-top-color: var(--accent); color: var(--accent); font-weight: 600; }
.gen-stage.is-on::after { content: ""; position: absolute; top: -2px; left: 0; height: 2px; width: 40%; background: var(--accent); animation: load 1.2s infinite; }

.studio-results { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); gap: 14px; margin-top: 14px; align-items: start; }
.creative-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.creative-tile {
  border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; text-align: left;
  padding: 0; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; position: relative;
}
.creative-tile:hover { border-color: var(--line-2); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.creative-tile.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,87,246,.12); }
.creative-tile__img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; display: block; background: #eef0f5; }
.creative-tile__body { padding: 9px 10px 10px; }
.creative-tile__row { display: flex; align-items: center; gap: 5px; }
.creative-tile__score { margin-left: auto; font-size: 9.5px; color: var(--faint); }
.creative-tile__hook { font-size: 10.5px; line-height: 1.4; color: var(--ink-2); margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.creative-tile__check {
  position: absolute; top: 7px; right: 7px; width: 20px; height: 20px; border-radius: 6px;
  background: #fff; border: 1px solid var(--line-2); display: grid; place-items: center; color: transparent;
}
.creative-tile.is-approved .creative-tile__check { background: var(--green); border-color: var(--green); color: #fff; }
.creative-tile.is-approved .creative-tile__check svg { width: 12px; height: 12px; }
.creative-tile__flag { position: absolute; top: 7px; left: 7px; }

.editor { position: sticky; top: 76px; }
.editor__preview { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); display: block; background: #eef0f5; }
.editor__hook { font-size: 12px; line-height: 1.5; margin-top: 12px; }
.editor__meta { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.editor__actions { display: flex; gap: 7px; margin-top: 12px; }
.editor__actions .btn { flex: 1; }

/* ── campaign page ──────────────────────────────────────────────────────── */
.camp-head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr); gap: 14px; }
.camp-title { padding: 20px 22px; }
.camp-title h1 { font-size: 24px; letter-spacing: -.03em; margin-top: 6px; }
.camp-title__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 11px; color: var(--muted); }
.camp-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.camp-kpis > div { background: #fff; padding: 13px 15px; }
.camp-kpis span { display: block; font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.camp-kpis b { display: block; font-size: 18px; font-weight: 600; margin-top: 3px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.adset-list { display: flex; flex-direction: column; gap: 10px; }
.adset-row { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(56px, .55fr)) 80px auto; gap: 12px; align-items: center; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.adset-row:hover { border-color: var(--line-2); }
.adset-row__name { font-size: 12.5px; font-weight: 500; }
.adset-row__sub { font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.adset-row__num span { display: block; font-size: 9.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.adset-row__num b { font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.adset-row__spark { width: 72px; height: 24px; }
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ad-card { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.ad-card__img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; display: block; background: #eef0f5; }
.ad-card__body { padding: 9px 10px 11px; }
.ad-card__hook { font-size: 10.5px; line-height: 1.4; color: var(--ink-2); min-height: 29px; }
.ad-card__meta { display: flex; align-items: center; gap: 5px; margin-top: 6px; }

/* ── moderation ─────────────────────────────────────────────────────────── */
.mod-item { display: grid; grid-template-columns: 92px minmax(0, 1fr) 150px; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; align-items: start; }
.mod-item + .mod-item { margin-top: 9px; }
.mod-item--rejected { border-left: 3px solid var(--red); }
.mod-item--pending { border-left: 3px solid #e59a1a; }
.mod-item--limited { border-left: 3px solid var(--violet); }
.mod-item__img { width: 92px; aspect-ratio: 9/16; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #eef0f5; }
.mod-item__title { font-size: 12.5px; font-weight: 500; }
.mod-item__hook { font-size: 11.5px; color: var(--muted); line-height: 1.45; margin-top: 4px; }
.mod-item__reason { font-size: 11px; line-height: 1.5; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.mod-item__reason b { display: flex; align-items: center; gap: 5px; color: var(--ink-2); font-weight: 600; margin-bottom: 2px; }
.mod-item__actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.mod-item__actions .btn { width: 100%; }

/* ── stats ──────────────────────────────────────────────────────────────── */
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); margin-bottom: 14px; }
.filters__sep { width: 1px; height: 22px; background: var(--line); margin: 0 3px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 11px 10px; font-size: 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a.is-on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 500; }
.insight { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid #f2f3f7; }
.insight:last-child { border-bottom: 0; }
.insight__icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.insight__icon svg { width: 15px; height: 15px; }
.insight__icon--good { background: var(--green-soft); color: var(--green); }
.insight__icon--warn { background: var(--amber-soft); color: var(--amber); }
.insight__icon--info { background: var(--accent-soft); color: var(--accent); }
.insight h4 { font-size: 12px; font-weight: 600; }
.insight p { font-size: 11px; color: var(--muted); line-height: 1.45; margin-top: 2px; }

/* ── launch wizard ──────────────────────────────────────────────────────── */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 18px; }
.step { display: flex; align-items: center; gap: 9px; padding-right: 20px; position: relative; color: var(--faint); font-size: 12px; font-weight: 500; }
.step + .step::before { content: ""; position: absolute; left: -8px; width: 8px; height: 1px; background: var(--line-2); }
.step__n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: #fff; font-size: 11px; font-weight: 600; color: var(--faint); }
.step.is-on { color: var(--ink); }
.step.is-on .step__n { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px rgba(91,87,246,.1); }
.step.is-done .step__n { background: var(--green-soft); border-color: #b9e8d7; color: var(--green); }
.launch-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); gap: 14px; align-items: start; }
.launch-main { min-height: 420px; }
.launch-side { position: sticky; top: 76px; }
.launch-hero { padding: 20px 22px; }
.launch-hero h2 { font-size: 18px; letter-spacing: -.02em; }
.launch-hero p { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.choice { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; position: relative; transition: border-color .15s, box-shadow .15s; }
.choice:hover { border-color: var(--line-2); }
.choice.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,87,246,.1); }
.choice input { position: absolute; opacity: 0; }
.choice__radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; margin-top: 1px; display: grid; place-items: center; }
.choice.is-on .choice__radio { border-color: var(--accent); }
.choice.is-on .choice__radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.choice b { display: block; font-size: 12px; font-weight: 600; }
.choice span { display: block; font-size: 10.5px; color: var(--faint); line-height: 1.45; margin-top: 2px; }
.launch-creatives { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.launch-creative { position: relative; border-radius: 9px; overflow: hidden; border: 1.5px solid transparent; cursor: pointer; }
.launch-creative.is-on { border-color: var(--accent); }
.launch-creative img { width: 100%; aspect-ratio: 9/16; object-fit: cover; display: block; }
.launch-creative__check { position: absolute; top: 5px; right: 5px; width: 18px; height: 18px; border-radius: 5px; background: rgba(255,255,255,.92); border: 1px solid var(--line-2); display: grid; place-items: center; color: transparent; }
.launch-creative.is-on .launch-creative__check { background: var(--accent); border-color: var(--accent); color: #fff; }
.launch-creative__check svg { width: 11px; height: 11px; }
.launch-creative .hint { white-space: normal !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.summary-card { padding: 18px 20px; }
.summary-card h3 { font-size: 13px; }
.summary-card .big { font-size: 28px; font-weight: 600; letter-spacing: -.035em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.summary-card .big small { font-size: 11px; color: var(--faint); font-weight: 400; letter-spacing: 0; }
.summary-list { margin-top: 12px; }
.summary-list .kv { padding: 7px 0; border-bottom: 1px solid #f2f3f7; }
.summary-list .kv:last-child { border-bottom: 0; }
.forecast { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px; margin-top: 12px; }

/* ── agents / settings ──────────────────────────────────────────────────── */
.agent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.agent-card { padding: 18px 18px 16px; position: relative; overflow: hidden; }
.agent-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: var(--accent-soft); opacity: .5; }
.agent-card__icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); position: relative; z-index: 1; }
.agent-card__icon svg { width: 18px; height: 18px; }
.agent-card h3 { font-size: 14px; margin-top: 12px; }
.agent-card p { font-size: 11.5px; color: var(--muted); line-height: 1.55; margin-top: 5px; min-height: 54px; }
.agent-card__foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.proposal { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.proposal + .proposal { margin-top: 9px; }
.proposal__head { display: flex; align-items: center; gap: 7px; }
.proposal__agent { font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.proposal h4 { font-size: 12.5px; margin-top: 5px; }
.proposal p { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 3px; }
.proposal__why { font-size: 10.5px; color: var(--faint); margin-top: 6px; padding-top: 6px; border-top: 1px solid #f2f3f7; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline__item { display: flex; gap: 12px; padding: 0 0 18px; position: relative; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); margin-top: 5px; flex: none; position: relative; z-index: 1; }
.timeline__item.is-done .timeline__dot { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.timeline__item.is-now .timeline__dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline__item::before { content: ""; position: absolute; left: 4px; top: 14px; bottom: 0; width: 1px; background: var(--line); }
.timeline__item:last-child::before { display: none; }
.timeline h4 { font-size: 12px; }
.timeline p { font-size: 11px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .75fr); gap: 14px; align-items: start; }
.setting-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f2f3f7; }
.setting-row:last-child { border-bottom: 0; }
.setting-row__icon { width: 30px; height: 30px; border-radius: 8px; background: #f4f5f9; display: grid; place-items: center; color: var(--muted); flex: none; }
.setting-row__icon svg { width: 15px; height: 15px; }
.setting-row__body { min-width: 0; }
.setting-row__body b { display: block; font-size: 12px; font-weight: 500; }
.setting-row__body > span { display: block; font-size: 10.5px; color: var(--faint); margin-top: 1px; }
.setting-row__value { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.env-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.env-dot.is-on { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.team-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f2f3f7; }
.team-row:last-child { border-bottom: 0; }
.team-ava { width: 30px; height: 30px; border-radius: 50%; background: #eef0f5; display: grid; place-items: center; font-size: 10px; font-weight: 600; color: var(--muted); }
.team-row b { display: block; font-size: 12px; font-weight: 500; }
.team-row span { display: block; font-size: 10.5px; color: var(--faint); }
.team-row .pill { margin-left: auto; }
.danger-zone { border-color: #f3d4d1; }
.danger-zone .card__head { color: var(--red); }

/* ── animations ─────────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes slideIn { from { transform: translateX(24px); opacity: .4; } }
@keyframes pop { from { transform: translateY(6px) scale(.99); opacity: 0; } }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }
@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }
.fade-in { animation: fade .25s var(--ease); }

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1360px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .creative-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .page { padding: 22px 22px 60px; }
  .topbar { padding: 0 22px; }
  .hero { grid-template-columns: 1fr; }
  .hero__focus { border-left: 0; border-top: 1px solid rgba(255,255,255,.08); display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
  .hero__focus-label { grid-column: 1 / -1; }
  .grid--dash, .studio-results, .launch-grid, .settings-grid, .camp-head { grid-template-columns: 1fr; }
  .launch-side, .editor { position: static; }
  .studio-hero { grid-template-columns: 1fr; }
  .agent-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .side { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: 20px 0 50px rgba(0,0,0,.25); }
  .side.is-open { transform: none; }
  .mobile-menu { display: grid; }
  .main { width: 100%; }
  .search-btn { min-width: 0; width: 34px; padding: 0; justify-content: center; }
  .search-btn span, .search-btn kbd { display: none; }
  .topbar { padding: 0 18px; }
  .page { padding: 18px 18px 60px; }
  .crumbs { font-size: 11px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .mod-item { grid-template-columns: 72px minmax(0, 1fr); }
  .mod-item__actions { grid-column: 1 / -1; flex-direction: row; }
  .mod-item__img { width: 72px; }
  .adset-row { grid-template-columns: minmax(0, 1fr) auto; }
  .adset-row__num, .adset-row__spark { display: none; }
}
@media (max-width: 720px) {
  .page-head h1 { font-size: 24px; }
  .page-head .actions { width: 100%; margin-left: 0; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi__value { font-size: 22px; }
  .hero__main { padding: 20px; }
  .hero h2 { font-size: 20px; }
  .hero__focus { grid-template-columns: 1fr; }
  .hero__stats { flex-wrap: wrap; gap: 12px 20px; }
  .chart__svg { height: 190px; }
  .creative-grid { grid-template-columns: 1fr 1fr; }
  .choice-grid { grid-template-columns: 1fr; }
  .filters { gap: 6px; }
  .filters .filters__sep { display: none; }
  .steps { overflow-x: auto; padding-bottom: 4px; }
  .step { padding-right: 14px; font-size: 11px; }
  .top-actions .sync-chip span { display: none; }
  .chip-demo { display: none; }
}

/* print-friendly table export is a CSV; the screen does not need print rules */

/* ── create menu ────────────────────────────────────────────────────────── */
.create-menu {
  position: absolute; left: 0; right: 0; top: 46px; z-index: 60; display: none;
  background: #121a2e; border: 1px solid rgba(255,255,255,.09); border-radius: 12px;
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.55); padding: 5px; overflow: hidden;
}
.create-menu.is-open { display: block; animation: pop .16s var(--ease); }
.create-menu a { display: flex; align-items: flex-start; gap: 9px; padding: 9px 9px; border-radius: 8px; color: #d9deea; }
.create-menu a:hover { background: rgba(255,255,255,.06); }
.create-menu a > svg { width: 15px; height: 15px; margin-top: 2px; color: #8d98ae; flex: none; }
.create-menu b { display: block; font-size: 11.5px; font-weight: 500; color: #f2f4f8; }
.create-menu small { display: block; font-size: 10px; color: #77839a; margin-top: 1px; }
.create-menu__hr { height: 1px; background: rgba(255,255,255,.07); margin: 4px 6px; }

/* ── dashboard bits ─────────────────────────────────────────────────────── */
tr[data-href] { cursor: pointer; }
.mod-mini { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f2f3f7; color: var(--ink); }
.mod-mini:last-child { border-bottom: 0; }
.mod-mini:hover .mod-mini__title { color: var(--accent); }
.mod-mini__img { width: 34px; height: 50px; border-radius: 6px; object-fit: cover; border: 1px solid var(--line); flex: none; background: #eef0f5; }
.mod-mini__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mod-mini__title { font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod-mini__sub { font-size: 10px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.spark { display: inline-block; width: 100%; height: 30px; }
.spark svg { width: 100%; height: 100%; display: block; }

/* ── campaign detail extras ─────────────────────────────────────────────── */
.stat-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 14px; box-shadow: var(--shadow); }
.stat-strip > div { background: #fff; padding: 11px 14px; }
.stat-strip span { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.stat-strip b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.adset-row details { grid-column: 1 / -1; }
.adset-row details summary { cursor: pointer; color: var(--accent); font-size: 11px; list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.adset-row details summary::-webkit-details-marker { display: none; }
.adset-row details summary::before { content: "▾"; font-size: 9px; }
.adset-edit { display: grid; grid-template-columns: 130px 130px auto 1fr; gap: 9px; align-items: end; padding-top: 11px; margin-top: 9px; border-top: 1px solid var(--line); }
.adset-edit .hint { padding-bottom: 9px; }
.camp-param { display: flex; flex-direction: column; }
.camp-param .kv { padding: 7px 0; border-bottom: 1px solid #f2f3f7; }
.camp-param .kv:last-child { border-bottom: 0; }
.ad-card__actions { display: flex; gap: 4px; margin-top: 7px; }
.ad-card__actions .btn { flex: 1; height: 27px; font-size: 10.5px; padding: 0 6px; }
@media (max-width: 900px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } .adset-edit { grid-template-columns: 1fr 1fr; } }

/* ── settings / rules ───────────────────────────────────────────────────── */
.code { display: flex; align-items: center; gap: 8px; background: #0d1220; color: #d7dcea; border-radius: 9px; padding: 8px 9px 8px 11px; }
.code code { font: 500 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; flex: 1; overflow-x: auto; white-space: nowrap; }
.code .btn { color: #aab3c5; flex: none; }
.code .btn:hover { color: #fff; background: rgba(255,255,255,.08); }
details.card > summary { list-style: none; cursor: pointer; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before { content: "▸"; color: var(--faint); font-size: 10px; }
details.card[open] > summary::before { content: "▾"; }
.rule-item { padding: 11px 0; border-bottom: 1px solid #f2f3f7; }
.rule-item:last-child { border-bottom: 0; }
.rule-item h4 { font-size: 12px; font-weight: 600; }
.rule-item p { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 3px; }

.chart-empty { height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; color: var(--faint); }
.chart-empty b { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.chart-empty span { font-size: 11px; max-width: 320px; line-height: 1.5; }
.chart-empty .empty__icon { margin-bottom: 2px; }

.nav-scrim { display: none; }
@media (max-width: 1024px) {
  .side.is-open + .nav-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(13, 18, 32, .38); backdrop-filter: blur(2px); animation: fade .2s; }
}
