/* ryme.club — Creator Studio, Ops Console, sign-in. Tokens mirror the design file. */
:root {
  --ink: #09090b; --ink-2: #18181b; --ink-3: #3f3f46; --ink-4: #52525b; --muted: #71717a; --faint: #a1a1aa;
  --line: #ececee; --line-2: #e4e4e7; --line-3: #d4d4d8; --bg: #f4f4f5; --bg-2: #fafafa; --white: #ffffff;
  --accent: #ff5a00; --accent-ink: #c2410c; --accent-soft: #fff1e8; --accent-line: #fdba74;
  --green: #16a34a; --green-ink: #15803d; --red: #dc2626; --amber: #f59e0b;
  --r-xs: 8px; --r-sm: 10px; --r: 12px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 10000px;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --gloss: inset 0 0.5px 0 0 rgba(255,255,255,0.5), inset 0 9px 14px -5px rgba(117,123,133,0.4), 0 0 0 1.5px rgb(44,46,52), 0 4px 6px 0 rgba(0,0,0,0.14);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); font-family: var(--sans); color: var(--ink-2); -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.45; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--ink-3); }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon { display: inline-block; flex: none; vertical-align: middle; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: var(--gap, 8px); flex-wrap: wrap; }
.row.tight { flex-wrap: nowrap; }
.between { justify-content: space-between; }
.grid-auto { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(var(--min, 280px), 100%), 1fr)); }
.grid-fit { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 180px), 100%), 1fr)); align-items: start; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-2); background: var(--white); color: var(--ink-2);
  font-size: 14px; font-weight: 500; padding: 11px 16px; border-radius: var(--r-md); text-decoration: none; line-height: 1.2; white-space: nowrap; min-height: 40px; }
.btn:hover { background: var(--bg-2); color: var(--ink-2); }
.btn-primary { background: var(--ink); color: var(--white); border: none; box-shadow: var(--gloss); }
.btn-primary:hover { background: #1f1f23; color: var(--white); }
.btn-accent { background: var(--accent); color: var(--white); border: none; }
.btn-accent:hover { background: #ea5200; color: var(--white); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-3); }
.btn-quiet { background: var(--bg); border-color: transparent; }
.btn-link { border: none; background: transparent; padding: 0; min-height: 0; font-size: 13px; color: var(--ink-4); text-decoration: underline; text-underline-offset: 3px; font-weight: 400; }
.btn-link:hover { background: transparent; color: var(--ink); }
.btn-danger { color: var(--red); border-color: #fecaca; }
.btn-sm { font-size: 13px; padding: 8px 12px; border-radius: var(--r); min-height: 34px; }
.btn-xs { font-size: 12px; padding: 6px 10px; border-radius: var(--r-xs); min-height: 28px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: 0.4; pointer-events: none; }
.icon-btn { width: 36px; height: 36px; border: none; border-radius: 50%; background: var(--bg); display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); flex: none; }
.icon-btn:hover { background: var(--line-2); }
form.inline { display: inline; }
form.button_to { display: inline-flex; }

/* ---------- shell ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--white); box-shadow: rgb(228,228,231) 0 -1px 0 0 inset; }
.topbar-in { max-width: 1480px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 16px; }
.topbar .logo img { display: block; height: 34px; width: auto; }
.tag-ops { font-size: 12px; padding: 4px 8px; background: var(--ink); color: var(--white); border-radius: var(--r-sm); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.live-pill { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border: 1px solid var(--line); border-radius: var(--r); }
.live-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.live-pill .dot.draft { background: var(--accent); }
.live-pill a { font-size: 13px; color: var(--ink-2); text-decoration: none; }
.chip-btn { border: none; background: var(--bg); color: var(--ink-2); font-size: 12px; padding: 6px 10px; border-radius: var(--r-xs); }
.user-btn { display: flex; align-items: center; gap: 8px; border: none; background: transparent; padding: 4px 10px 4px 4px; border-radius: var(--r-pill); text-decoration: none; color: var(--ink); }
.user-btn:hover, .user-btn.on { background: var(--bg); color: var(--ink); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--bg) center 25% / cover no-repeat; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; color: var(--ink-3); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 36px; height: 36px; }
.user-btn .name { font-size: 14px; font-weight: 500; }

.shell { max-width: 1480px; width: 100%; margin: 0 auto; padding: 24px; display: flex; gap: 24px; align-items: flex-start; }
.sidebar { flex: 0 0 220px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 80px; }
.sidebar-head { padding: 10px 12px 14px; display: flex; align-items: center; gap: 10px; }
.sidebar-head .who { display: flex; flex-direction: column; min-width: 0; }
.sidebar-head .who strong { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-head .who span { font-size: 12px; color: var(--muted); }
.nav-item { display: flex; align-items: center; gap: 10px; text-align: left; border: none; background: transparent; color: var(--ink-3); font-size: 14px; padding: 12px 14px; border-radius: var(--r-md); min-height: 44px; text-decoration: none; }
.nav-item:hover { background: var(--bg-2); color: var(--ink); }
.nav-item.on { background: var(--bg); color: var(--ink); font-weight: 500; }
.nav-item .count { margin-left: auto; font-size: 12px; padding: 2px 8px; border-radius: var(--r-sm); background: var(--bg); color: var(--ink-4); font-weight: 400; }
.nav-item .count.hot { background: var(--accent); color: var(--white); }
.nav-sep { height: 1px; background: var(--line); margin: 8px 12px; }
.main { flex: 1 1 min(600px, 100%); min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding-top: 8px; }
.page-head .kicker { font-size: 14px; color: var(--muted); }
.page-head h1 { margin-top: 4px; font-size: 40px; line-height: 1.28; }
.page-head .lede { margin: 6px 0 0; font-size: 14px; color: var(--ink-4); max-width: 640px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.section-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.section-head h2 { font-size: 22px; }
.section-head .sub { font-size: 13px; color: var(--muted); }

/* ---------- cards ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 24px; }
.card-tight { padding: 18px 20px; }
.card-flush { padding: 0; overflow: hidden; }
.card-dark { background: var(--ink-2); color: var(--white); border: none; }
.card-dark h2 { color: var(--white); }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.card-head h2 { flex: 1; font-size: 20px; }
.card-head h3 { flex: 1; font-size: 16px; }
.card-head a, .card-head .link { font-size: 13px; color: var(--ink-4); text-decoration: none; }
.card-dark .card-head a { color: var(--faint); }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; }
.kpi .label { font-size: 13px; color: var(--ink-4); }
.kpi .value { font-size: 28px; line-height: 1.2; font-weight: 600; color: var(--ink); }
.kpi .note { font-size: 12px; color: var(--muted); }
.kpi .note.warn { color: var(--accent-ink); }
.inset { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; line-height: 1.45; }
.callout.neutral { background: var(--bg); color: var(--ink-3); }
.callout.good { background: #ecfdf3; color: var(--green-ink); }
.code-box { font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--ink-3); padding: 10px 12px; background: var(--bg); border-radius: var(--r); overflow-wrap: anywhere; }

/* ---------- offer cards ---------- */
.offer-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; display: flex; flex-direction: column; }
.offer-card .media { position: relative; aspect-ratio: 16 / 8; background: var(--bg) center / cover no-repeat; }
.offer-card .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.offer-card .media .badge-tl { position: absolute; top: 14px; left: 14px; }
.offer-card .media .badge-tr { position: absolute; top: 14px; right: 14px; }
.offer-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.offer-card .merchant { font-size: 13px; color: var(--muted); }
.offer-card .headline { font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.offer-card .earn { display: flex; align-items: baseline; gap: 6px; }
.offer-card .earn span { font-size: 13px; color: var(--muted); }
.offer-card .earn strong { font-size: 16px; color: var(--ink); }
.offer-card .reason { font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.offer-card .why { font-size: 12px; line-height: 1.45; color: var(--ink-3); background: var(--bg); border-radius: var(--r); padding: 8px 10px; }
.offer-card .terms { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.offer-card .terms dt { color: var(--muted); }
.offer-card .terms dd { margin: 0; color: var(--ink-2); }
.offer-card .foot { margin-top: auto; padding-top: 6px; display: flex; gap: 8px; }
.offer-card .foot .btn { padding: 10px 14px; }
.offer-card .blocked { font-size: 12px; color: var(--accent-ink); }
.offer-card.is-ineligible { opacity: 0.72; }
.no-img { display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; color: var(--faint); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: var(--r-sm); border: 1px solid var(--line-3); background: var(--white); color: var(--ink-2); line-height: 1.3; white-space: nowrap; }
.badge-solid { background: var(--ink); color: var(--white); border-color: var(--ink); }
.badge-dark { background: var(--ink-3); color: var(--bg-2); border-color: var(--ink-3); }
.badge-soft { background: var(--bg); color: var(--ink-3); border-color: var(--line-2); }
.badge-ghost { background: var(--white); color: var(--muted); border-color: var(--line); }
.badge-accent { background: var(--accent); color: var(--white); border-color: var(--accent); }
.badge-faded { background: var(--bg); color: var(--muted); border-color: var(--bg); }
.badge-outline { background: var(--white); color: var(--ink); border-color: var(--ink); }
.badge-green { background: #ecfdf3; color: var(--green-ink); border-color: #bbf7d0; }
.badge-lg { font-size: 12px; padding: 4px 9px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--faint); }
.dot.green { background: var(--green); } .dot.red { background: var(--red); } .dot.orange { background: var(--accent); } .dot.grey { background: var(--faint); }

/* ---------- segmented filters & tabs ---------- */
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--white); color: var(--ink-2); font-size: 13px; padding: 7px 12px; border-radius: var(--r-pill); text-decoration: none; }
.filter:hover { background: var(--bg-2); color: var(--ink); }
.filter.on { background: var(--ink); color: var(--white); border-color: var(--ink); }
.filter .n { font-size: 12px; opacity: 0.7; }
.seg { display: flex; padding: 4px; background: var(--bg); border-radius: var(--r-md); gap: 2px; }
.seg > * { flex: 1; border: none; background: transparent; color: var(--ink-4); font-size: 13px; font-weight: 500; padding: 8px; border-radius: var(--r-sm); text-align: center; text-decoration: none; }
.seg > .on { background: var(--white); color: var(--ink); box-shadow: rgba(0,0,0,0.05) 0 2px 6px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 12px; font-weight: 400; color: var(--muted); padding: 0 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data th:first-child, table.data td:first-child { padding-left: 0; }
table.data th:last-child, table.data td:last-child { padding-right: 0; }
table.data .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data tr.sel td { background: var(--bg); }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: var(--bg-2); }
table.data td .primary { color: var(--ink); font-weight: 500; }
table.data td .sub { display: block; font-size: 12px; color: var(--muted); }
.row-link { color: inherit; text-decoration: none; display: block; }

/* ---------- charts ---------- */
.spark { height: 22px; width: 64px; display: flex; align-items: flex-end; gap: 2px; }
.spark span { flex: 1; background: var(--line-3); border-radius: 2px 2px 0 0; min-height: 2px; }
.spark span.hi { background: var(--ink); }
.bars { height: 84px; display: flex; align-items: flex-end; gap: 3px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.bars span { flex: 1; background: var(--line-3); border-radius: 3px 3px 0 0; min-height: 3px; }
.bars span.hi { background: var(--ink); }
.bars span.warn { background: var(--accent); }
.bars.short { height: 36px; }
.meter { height: 10px; border-radius: 6px; background: var(--bg); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 6px; background: var(--ink); }
.meter.thin { height: 4px; }
.funnel-row { display: grid; grid-template-columns: 96px minmax(0,1fr) 56px; gap: 10px; align-items: center; font-size: 13px; }
.funnel-row .k { color: var(--ink-4); }
.funnel-row .v { text-align: right; font-weight: 500; color: var(--ink); }
.statline { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.statline > div { background: var(--white); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.statline .k { font-size: 12px; color: var(--muted); }
.statline .v { font-size: 16px; font-weight: 600; color: var(--ink); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > .label, .field > label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .hint.ok { color: var(--green-ink); }
.field .hint.err { color: var(--accent-ink); }
.input, .select, .textarea { width: 100%; height: 44px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r); padding: 0 12px; font-size: 14px; color: var(--ink); outline: none; }
.textarea { height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(9,9,11,0.06); }
.input.mono { font-family: var(--mono); letter-spacing: 0.04em; }
.input.err { border-color: var(--accent-line); }
.input-group { display: flex; align-items: center; height: 44px; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: var(--bg-2); }
.input-group .prefix { padding: 0 4px 0 12px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.input-group input { flex: 1; min-width: 0; height: 100%; border: none; background: var(--white); padding: 0 12px; font-size: 14px; outline: none; }
.input-group input.mono { font-family: var(--mono); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-3); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); }
.switch-row .t { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.switch-row .t strong { font-size: 14px; font-weight: 500; color: var(--ink); }
.switch-row .t span { font-size: 12px; color: var(--muted); }
.switch { position: relative; flex: none; width: 44px; height: 26px; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; border-radius: 13px; background: var(--line-3); transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: transform .15s; }
.switch input:checked + .track { background: var(--ink); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--white); cursor: pointer; }
.radio-card input { margin: 3px 0 0; accent-color: var(--ink); width: 16px; height: 16px; flex: none; }
.radio-card:has(input:checked) { border-color: var(--ink); }
.radio-card .t { display: flex; flex-direction: column; gap: 1px; }
.radio-card .t strong { font-size: 14px; font-weight: 500; color: var(--ink); }
.radio-card .t span { font-size: 12px; color: var(--muted); }
.pick-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-chip { position: relative; }
.pick-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick-chip span { display: inline-flex; align-items: center; border: 1px solid var(--line-2); background: var(--white); color: var(--ink-2); font-size: 14px; padding: 9px 14px; border-radius: var(--r-pill); }
.pick-chip input:checked + span { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pick-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.errors { margin: 0; padding: 12px 14px 12px 32px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; }

/* ---------- flash ---------- */
.flash-stack { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(480px, calc(100% - 32px)); }
.flash { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: var(--r-md); background: var(--ink); color: var(--white); font-size: 14px; box-shadow: 0 12px 30px rgba(0,0,0,0.2); animation: flash-in .2s ease-out; }
.flash.alert { background: var(--accent-ink); }
.flash button { margin-left: auto; border: none; background: transparent; color: inherit; opacity: 0.7; padding: 0; }
@keyframes flash-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------- dialog ---------- */
dialog.modal { border: none; padding: 0; background: transparent; max-width: 100%; max-height: 100%; width: 100%; height: 100%; }
dialog.modal::backdrop { background: rgba(9,9,11,0.45); }
.modal-scroll { min-height: 100%; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; }
.modal-panel { width: 100%; max-width: 940px; background: var(--white); border-radius: 32px; box-shadow: 0 30px 80px rgba(0,0,0,0.3); display: flex; flex-wrap: wrap; overflow: hidden; }
.modal-panel .form-side { min-width: 0; flex: 1 1 min(440px, 100%); padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.modal-panel .preview-side { min-width: 0; flex: 1 1 min(340px, 100%); background: var(--bg); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.modal-panel h2 { font-size: 26px; }
.modal-panel.narrow { max-width: 520px; }

/* ---------- empty states ---------- */
.empty { padding: 40px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); }
.empty h3 { font-size: 16px; color: var(--ink); }
.empty p { margin: 0; max-width: 360px; font-size: 13px; }

/* ---------- misc ---------- */
.qr { width: 132px; height: 132px; padding: 8px; background: var(--white); border-radius: var(--r-md); border: 1px solid var(--line); flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }
.short-link { font-family: var(--mono); font-size: 15px; color: var(--ink); word-break: break-all; }
.list-divided > * + * { border-top: 1px solid var(--line); }
.card-dark .list-divided > * + * { border-top-color: var(--ink-3); }
.thumb { width: 44px; height: 44px; border-radius: var(--r); background: var(--ink-3) center / cover no-repeat; flex: none; object-fit: cover; }
.thumb.light { background-color: var(--bg); }
.timeline { display: flex; flex-direction: column; gap: 14px; }
.timeline .ev { display: grid; grid-template-columns: 10px 1fr; gap: 12px; font-size: 13px; }
.timeline .ev .dot { margin-top: 5px; }
.timeline .ev .meta { font-size: 12px; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.steps .s { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.steps .s .bar { height: 4px; border-radius: 4px; background: var(--line); }
.steps .s.done { color: var(--ink); }
.steps .s.done .bar { background: var(--ink); }
.steps .s.now { font-weight: 600; }
.steps .s small { font-size: 12px; font-weight: 400; color: var(--muted); }
.checklist { display: flex; flex-direction: column; gap: 8px; }
.checklist label { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); cursor: pointer; }
.checklist label:has(input:checked) { color: var(--ink-2); }
.checklist input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.kbd-copy { cursor: pointer; }
.pager { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); padding-top: 12px; }
.divider { height: 1px; background: var(--line); border: none; margin: 4px 0; }

@media (max-width: 900px) {
  .shell { padding: 16px; flex-direction: column; gap: 16px; }
  .sidebar { position: static; flex: none; width: 100%; flex-direction: row; overflow-x: auto; border-radius: var(--r-lg); padding: 6px; gap: 4px; scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar-head, .nav-sep { display: none; }
  .nav-item { white-space: nowrap; min-height: 40px; padding: 10px 12px; }
  .page-head h1 { font-size: 30px; }
  .topbar-in { padding: 10px 16px; gap: 10px; }
  .topbar .live-pill, .topbar .hide-sm { display: none; }
  .card { padding: 18px; border-radius: var(--r-lg); }
  .modal-panel .form-side, .modal-panel .preview-side { padding: 22px; }
  .modal-scroll { padding: 16px 8px; }
}

/* ---------- auth ---------- */
.auth-body { background: var(--white); }
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; background: var(--white); }
.auth-art { flex: 1 1 min(480px, 100%); min-height: 640px; background: var(--ink) center 30% / cover no-repeat; color: var(--white); padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 28px; position: relative; overflow: hidden; }
.auth-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9,9,11,0.55) 0%, rgba(9,9,11,0) 22%, rgba(9,9,11,0) 42%, rgba(9,9,11,0.92) 100%); }
.auth-logo { position: relative; align-self: flex-start; }
.auth-logo img { display: block; height: 40px; width: auto; }
.auth-floats { position: relative; flex: 1; display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-end; gap: 10px; padding-bottom: 4px; }
.glass { background: rgba(255,255,255,0.14); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,0.22); }
.auth-floats .stat { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 18px; }
.auth-floats .stat-ic { width: 34px; height: 34px; border-radius: 11px; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.auth-floats .t { display: flex; flex-direction: column; }
.auth-floats .t strong { font-size: 16px; }
.auth-floats .t span { font-size: 12px; color: var(--line-2); }
.auth-floats .live { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-md); font-size: 13px; }
.live-tag { font-size: 11px; font-weight: 600; padding: 2px 7px; background: var(--accent); color: var(--white); border-radius: var(--r-xs); }
.auth-copy { position: relative; display: flex; flex-direction: column; gap: 16px; max-width: 540px; }
.auth-copy h1 { color: var(--white); font-size: clamp(34px, 3.4vw, 46px); line-height: 1.06; letter-spacing: -0.035em; }
.auth-copy .pill { display: inline-block; padding: 0 0.28em 0.06em; margin: 0.04em 0; background: var(--accent); border-radius: var(--r-pill); line-height: 1.08; }
.auth-copy p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--line-3); text-wrap: pretty; }
.auth-tags { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.auth-tags span { font-size: 13px; font-weight: 500; padding: 7px 12px; border-radius: var(--r-pill); }
.auth-form { flex: 1 1 min(480px, 100%); display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-panel { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 20px; }
.auth-panel h2 { font-size: 32px; line-height: 1.2; letter-spacing: -0.02em; }
.auth-panel .sub { margin: 6px 0 0; font-size: 15px; color: var(--ink-4); }
.auth-panel .input { height: 48px; font-size: 15px; padding: 0 14px; }
.auth-panel .btn-primary.submit { height: 48px; }
.auth-panel .or { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--faint); }
.auth-panel .or::before, .auth-panel .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-panel .seg > * { font-size: 14px; padding: 10px; }
.auth-panel .foot { display: flex; flex-direction: column; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-4); }
.auth-panel .foot a { font-weight: 500; }
.auth-panel .foot .ops-link { font-size: 13px; color: var(--muted); }
.notice-box { font-size: 13px; padding: 10px 12px; border-radius: var(--r); background: var(--accent-soft); color: #9a3412; }
.notice-box.neutral { background: var(--bg); color: var(--ink-2); }
.btn-google { height: 48px; gap: 10px; }
.otp-input { font-family: var(--mono); font-size: 22px !important; letter-spacing: 0.4em; text-align: center; }
@media (max-width: 900px) { .auth-art { min-height: 460px; } .auth-floats { display: none; } }

/* ---------- onboarding ---------- */
.ob { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
.ob-top { max-width: 1280px; width: 100%; margin: 0 auto; padding: 20px 24px; display: flex; align-items: center; gap: 16px; }
.ob-logo { display: block; height: 34px; width: auto; }
.ob-step { margin-left: auto; font-size: 13px; color: var(--ink-4); }
.ob-bars { max-width: 640px; width: 100%; margin: 8px auto 0; padding: 0 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ob-bars span { height: 4px; border-radius: 4px; background: var(--line-2); }
.ob-bars span.on { background: var(--ink); }
.ob-main { flex: 1; display: flex; justify-content: center; padding: 32px 24px 64px; }
.ob-card { width: 100%; max-width: 640px; background: var(--white); border: 1px solid var(--line); border-radius: 36px; padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 28px; align-self: flex-start; }
.ob-card h1 { font-size: 32px; line-height: 1.2; letter-spacing: -0.02em; }
.ob-card .lede { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-4); text-wrap: pretty; }
.ob-foot { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.input-group.big { height: 56px; border-radius: var(--r-md); }
.input-group.big .prefix { font-size: 17px; padding-left: 16px; }
.input-group.big input { font-size: 17px; font-weight: 500; padding-left: 2px; background: var(--bg-2); }
.social-row { display: flex; align-items: center; gap: 12px; }
.social-row .social-ic { flex: none; width: 48px; height: 48px; border-radius: var(--r); background: var(--bg); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.social-row .input { height: 48px; font-size: 15px; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 10px; }
.theme-opt { position: relative; text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; }
.theme-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.theme-opt:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.theme-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-opt .swatches { display: flex; gap: 4px; }
.theme-opt .swatches span { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); }
.theme-opt .t { display: flex; flex-direction: column; gap: 2px; }
.theme-opt .t strong { font-size: 14px; color: var(--ink); }
.theme-opt .t span { font-size: 12px; color: var(--muted); }
.deal-row { display: flex; gap: 12px; align-items: center; padding: 14px 0; color: var(--white); text-decoration: none; }
.deal-row:hover { color: var(--white); opacity: 0.9; }
.deal-row .t { font-size: 15px; font-weight: 500; }
.deal-row .s { font-size: 13px; color: var(--faint); }
.card-dark .badge-ghost { background: transparent; color: var(--line-3); border-color: var(--ink-3); }

/* ---------- links ---------- */
.split { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.split > .table-card { flex: 1 1 min(560px, 100%); min-width: 0; padding: 14px 22px; }
.split > .side-panel { flex: 1 1 min(360px, 100%); max-width: 440px; display: flex; flex-direction: column; gap: 16px; }
.links-table td:first-child { min-width: 140px; }
.dark-note { background: var(--ink-2); color: var(--white); }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.preview-card { background: var(--white); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.qr.big { width: 168px; height: 168px; border: none; padding: 0; }
.code-box.white { background: var(--white); font-size: 11px; }
.pick-chip.small span { font-size: 13px; padding: 8px 12px; min-height: 36px; }
#link_preview { display: flex; flex-direction: column; gap: 16px; }
.toolbar { --gap: 12px; }
.search { position: relative; display: flex; align-items: center; min-width: min(280px, 100%); }
.search .icon { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.search .input { padding-left: 40px; border-radius: var(--r-pill); }
.boost { align-self: flex-start; font-size: 13px; font-weight: 600; padding: 5px 10px; background: var(--accent-soft); color: #9a3412; border-radius: var(--r-sm); }
.pill-note { min-height: 44px; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--ink-3); font-size: 13px; border-radius: var(--r-md); padding: 0 12px; text-align: center; }
.contents { display: contents; }
.change-img { position: absolute; right: 14px; bottom: 14px; display: flex; align-items: center; height: 34px; padding: 0 12px; border-radius: var(--r-sm); background: rgba(9,9,11,0.7); color: var(--white); font-size: 13px; font-weight: 500; cursor: pointer; }
.small-label { font-size: 12px !important; color: var(--ink-4) !important; }
.form-grid.tight2 { grid-template-columns: 1fr 1fr; gap: 10px; }
.add-tile { min-height: 280px; border: 2px dashed var(--line-3); border-radius: var(--r-xl); background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--ink-2); padding: 24px; text-align: center; width: 100%; }
.add-tile .plus { font-size: 28px; line-height: 1; }
.add-tile strong { font-size: 15px; }
.add-tile .muted { font-size: 13px; max-width: 240px; }
.offer-card .foot form.grow { display: flex; flex: 1; }

/* ---------- builder ---------- */
.builder { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; justify-content: center; }
.builder-left { flex: 1 1 min(240px, 100%); max-width: 280px; display: flex; flex-direction: column; gap: 16px; }
.builder-right { flex: 1 1 min(300px, 100%); max-width: 360px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; }
.phone-col { flex: 0 0 auto; display: flex; flex-direction: column; gap: 12px; max-width: 100%; }
.builder-phone { width: 390px; max-width: 100%; height: 780px; background: var(--canvas); border: 8px solid #18181b; border-radius: 52px; overflow: hidden; box-shadow: rgba(0,0,0,0.10) 0 16px 40px; display: flex; flex-direction: column; }
.phone-screen { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.builder-phone .sf { min-height: 100%; }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); cursor: grab; }
.palette-item:hover { border-color: var(--faint); }
.palette-item.is-full { opacity: 0.5; cursor: default; }
.palette-item strong { font-size: 14px; font-weight: 500; color: var(--ink); }
.pi-ic { flex: none; width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--bg); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.pi-add { flex: none; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); display: flex; align-items: center; justify-content: center; color: var(--ink); padding: 0; }
.pi-add:hover { background: var(--bg); }
.cat-row { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 4px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); }
.cat-row .t { flex: none; width: 26px; height: 26px; border: none; border-radius: var(--r-xs); background: transparent; display: flex; align-items: center; justify-content: center; color: var(--muted); padding: 0; }
.cat-row .t:hover { background: var(--bg); }
.cat-row .t[disabled] { opacity: 0.3; }
.cat-move { display: flex; flex-direction: column; }
.cat-move .t { width: 20px; height: 15px; }
.rot90 { transform: rotate(90deg); }
.cat-input { width: 100%; border: none; outline: none; background: transparent; font-size: 14px; color: var(--ink); padding: 6px 2px; }
.cover-prev { height: 96px; border-radius: var(--r-md); background: var(--bg); overflow: hidden; }
.cover-prev img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xl { width: 64px; height: 64px; font-size: 20px; }
.social-row.small .social-ic { width: 40px; height: 40px; border-radius: var(--r-sm); }
.social-row.small .input { height: 40px; font-size: 14px; }
.theme-grid.small { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.theme-grid.small .theme-opt { padding: 10px; gap: 8px; border-radius: var(--r-md); }
.theme-opt.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
button.theme-opt { font: inherit; cursor: pointer; }
.accent-dot { width: 30px; height: 30px; border-radius: 50%; border: none; box-shadow: 0 0 0 1px var(--line-3); cursor: pointer; padding: 0; }
.accent-dot.on { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--ink); }
.font-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
.font-opt { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); cursor: pointer; font: inherit; color: var(--ink); }
.font-opt.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.font-opt .aa { width: 36px; font-size: 22px; line-height: 1; text-align: center; }
.font-opt strong { font-size: 13px; font-weight: 500; }
.builder.preview-only .builder-phone { height: 820px; }
@media (max-width: 900px) { .builder-right { position: static; max-height: none; max-width: none; } .builder-left { max-width: none; } }

/* ---------- account ---------- */
.acct { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.acct-head { display: flex; flex-direction: column; gap: 4px; }
.acct-head h2 { font-size: 20px; }
.acct-head span { font-size: 13px; color: var(--muted); line-height: 1.5; }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; max-width: 320px; }
.strength span { height: 4px; border-radius: 4px; background: var(--line-2); }
.rules { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.rules .ok { color: var(--green-ink); }
.kyc-mark { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--line-2); color: var(--white); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.kyc-mark.ok { background: var(--green); }
.kyc-mark.warn { background: var(--amber); }

/* ---------- ops ---------- */
.kpi .bars.short { margin-top: 10px; }
.alert-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; }
.alert-row .dot { margin-top: 6px; }
.alert-row strong { font-size: 14px; color: var(--ink); font-weight: 500; }
table.data.compact td { padding: 6px 8px; font-size: 12px; }
.map-row { display: grid; grid-template-columns: minmax(0,1fr) 16px minmax(0,1fr); gap: 10px; align-items: center; }
.map-row strong { font-size: 13px; font-weight: 500; }
details.inset summary { cursor: pointer; font-weight: 500; }
.bulk-bar { --gap: 6px; }
.bulk-bar .small { color: var(--ink-4); margin-right: 4px; }

/* ---------- insights editor ---------- */
.article-thumb { display: block; width: 72px; height: 46px; border-radius: var(--r-sm); object-fit: cover; background: var(--bg); }
.article-editor { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.article-main { flex: 1 1 min(620px, 100%); min-width: 0; }
.article-side { flex: 0 1 320px; min-width: min(300px, 100%); }
.title-input { width: 100%; border: none; outline: none; font: inherit; font-size: 30px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); padding: 4px 0; background: transparent; }
.cover-prev-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-md); }
.article-editor trix-toolbar { position: sticky; top: 64px; z-index: 5; background: var(--white); padding-top: 6px; }
.article-editor trix-toolbar .trix-button-group { border-color: var(--line-2); border-radius: var(--r-sm); }
.article-editor trix-toolbar .trix-button { border-bottom: none; }
.article-editor trix-editor.article-body { min-height: 420px; border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 16px 18px; font-size: 16px; line-height: 1.7; color: var(--ink-3); background: var(--white); }
.article-editor trix-editor.article-body:focus { border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(9,9,11,0.06); }
.article-editor trix-editor img { border-radius: var(--r); }
