/* AdCliks Ssenariy — same dark look as the lead panels (Geist). Phone first: blocks stay compact. */
:root {
  --background: oklch(0.165 0.008 286);
  --foreground: oklch(0.95 0.004 286);
  --card: oklch(0.215 0.01 286);
  --raise: oklch(0.255 0.01 286);
  --primary: oklch(0.66 0.2 292);
  --primary-fg: oklch(0.99 0 0);
  --muted-fg: oklch(0.68 0.012 286);
  --accent-fg: oklch(0.88 0.08 292);
  --destructive: oklch(0.68 0.19 25);
  --success: oklch(0.74 0.16 150);
  --warn: oklch(0.82 0.14 85);
  --border: oklch(1 0 0 / 9%);
  --input: oklch(1 0 0 / 13%);
  --radius: 12px;
  color-scheme: dark;
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--background); color: var(--foreground); -webkit-font-smoothing: antialiased; }
body { font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 600; }
.muted { color: var(--muted-fg); }
.small { font-size: 12.5px; }
.grow { flex: 1; }
.no-scrollbar { scrollbar-width: none; } .no-scrollbar::-webkit-scrollbar { display: none; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.brand { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--primary); color: var(--primary-fg); font-size: 14px; font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 7px 14px; border-radius: 10px; border: 1px solid var(--input); background: transparent; font-size: 14px; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--raise); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.btn.primary:hover { opacity: .9; background: var(--primary); }
.btn.good { border-color: color-mix(in oklch, var(--success) 60%, transparent); color: var(--success); }
.btn.danger { color: var(--destructive); }
.btn.block { width: 100%; }
.btn.small { min-height: 30px; padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: default; }
.input { width: 100%; min-height: 38px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--input); background: var(--background); font-size: 14px; }
select.input { padding-right: 28px; }
textarea.input { resize: vertical; line-height: 1.55; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px oklch(0.66 0.2 292 / 20%); }
.field { display: grid; gap: 5px; }
.field > span { font-size: 12.5px; color: var(--muted-fg); }
.form-msg { min-height: 18px; font-size: 13px; color: var(--accent-fg); }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stack { display: grid; gap: 12px; }
.two { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }

/* Login */
.login { min-height: 100dvh; display: grid; place-content: center; gap: 18px; padding: 20px; justify-items: center; }
.login-card { width: min(360px, 88vw); padding: 20px; display: grid; gap: 12px; }

/* Shell */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: color-mix(in oklch, var(--background) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.client-pick { width: auto; max-width: 46vw; min-height: 34px; padding: 4px 28px 4px 10px; font-weight: 500; }
.tabs { display: flex; gap: 4px; padding: 8px 12px 0; overflow-x: auto; border-bottom: 1px solid var(--border); }
.tabs a { padding: 8px 12px; border-radius: 9px 9px 0 0; color: var(--muted-fg); font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--foreground); border-bottom-color: var(--primary); }
.view { max-width: 920px; margin: 0 auto; padding: 16px 16px 90px; display: grid; gap: 14px; }
.head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.notice { padding: 10px 12px; border-radius: 10px; border: 1px solid color-mix(in oklch, var(--warn) 40%, transparent); color: var(--warn); font-size: 13px; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted-fg); }

/* Chips + badges */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--input); background: transparent; font-size: 13px; color: var(--muted-fg); }
.chip.on { background: var(--raise); color: var(--foreground); border-color: var(--primary); }
.chip b { font-weight: 600; margin-left: 4px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--raise); color: var(--muted-fg); white-space: nowrap; }
.badge.draft { color: var(--muted-fg); }
.badge.approved { color: var(--success); }
.badge.filmed { color: oklch(0.78 0.12 230); }
.badge.posted { color: var(--accent-fg); }
.badge.rejected { color: var(--destructive); }

/* Lists */
.list { display: grid; gap: 8px; }
.item { display: grid; gap: 3px; padding: 11px 13px; }
a.item:hover { border-color: var(--input); }
.item-title { font-weight: 600; line-height: 1.35; }
.item-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted-fg); }
.item pre, .pre { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; font: inherit; color: var(--foreground); }
details > summary { cursor: pointer; color: var(--muted-fg); font-size: 13px; }

/* Editor */
.editor { display: grid; gap: 12px; }
.panel { padding: 14px; display: grid; gap: 10px; }
.label { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; color: var(--muted-fg); text-transform: uppercase; }
.counter { font-variant-numeric: tabular-nums; font-weight: 600; }
.counter.off { color: var(--warn); }
.title-input { font-size: 16px; font-weight: 600; }
.hook-opt { text-align: left; padding: 7px 11px; border-radius: 9px; border: 1px solid var(--input); background: transparent; font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.hook-opt.on { border-color: var(--primary); background: oklch(0.66 0.2 292 / 14%); }
.checks { display: grid; gap: 4px; font-size: 13px; color: var(--warn); }
.busy { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: var(--accent-fg); }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--input); border-top-color: var(--primary); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.sticky-bar { position: sticky; bottom: 0; z-index: 4; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 12px; margin: 0 -4px; border-radius: 12px; background: color-mix(in oklch, var(--card) 94%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--border); }

/* Ideas */
.idea { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 11px 13px; }
.idea input[type=checkbox] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); }
.idea .state { font-size: 12.5px; white-space: nowrap; }
.state.ok { color: var(--success); } .state.err { color: var(--destructive); } .state.run { color: var(--accent-fg); }

/* Reading view */
.reader { position: fixed; inset: 0; z-index: 20; overflow-y: auto; background: #000; color: #fff; padding: 18px 22px calc(40px + env(safe-area-inset-bottom)); }
.reader-bar { position: sticky; top: 0; display: flex; gap: 8px; justify-content: flex-end; padding-bottom: 10px; background: linear-gradient(#000 70%, transparent); }
.reader-text { max-width: 760px; margin: 0 auto; white-space: pre-wrap; font-size: var(--reader-size, 26px); line-height: 1.5; font-weight: 500; }
.reader-text b { color: oklch(0.86 0.14 90); }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 30; max-width: 88vw; padding: 10px 14px; border-radius: 10px; background: var(--raise); border: 1px solid var(--input); font-size: 13.5px; box-shadow: 0 6px 24px oklch(0 0 0 / 45%); }
.toast.err { border-color: var(--destructive); color: oklch(0.85 0.1 25); }

@media (max-width: 640px) {
  .view { padding: 12px 12px 90px; gap: 12px; }
  .two { grid-template-columns: 1fr; }
  .who, .brand-name { display: none; }
  .top { padding: 8px 12px; }
  .panel { padding: 12px; }
  .idea { grid-template-columns: auto 1fr; }
  .idea .state { grid-column: 2; }
}
