/* ==========================================================================
   CreaterOS design system
   Dark-first "creator studio": near-black canvas, soft neon glows, glassy
   bento cards, Instagram-warm gradient accents. Light theme via [data-theme].
   ========================================================================== */

:root {
  --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --accent-1: #ff3d7f;
  --accent-2: #ff8a3d;
  --accent-3: #8b5cff;
  --gradient: linear-gradient(120deg, var(--accent-3) 0%, var(--accent-1) 45%, var(--accent-2) 100%);
  --gradient-soft: linear-gradient(120deg, rgba(139, 92, 255, 0.16), rgba(255, 61, 127, 0.14) 50%, rgba(255, 138, 61, 0.12));

  --ok: #33d69f;
  --warn: #ffb547;
  --bad: #ff5c6c;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --sidebar-w: 272px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Dark (default) */
  --bg: #09080d;
  --bg-elev: #111018;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-solid: #15131d;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f2f8;
  --text-2: #b4afc3;
  --text-3: #7d788d;
  --input-bg: rgba(255, 255, 255, 0.04);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --glow-opacity: 1;
  color-scheme: dark;
}

[data-theme='light'] {
  --bg: #f7f5f2;
  --bg-elev: #ffffff;
  --surface: rgba(255, 255, 255, 0.75);
  --surface-2: rgba(20, 16, 30, 0.04);
  --surface-solid: #ffffff;
  --border: rgba(20, 16, 30, 0.08);
  --border-strong: rgba(20, 16, 30, 0.16);
  --text: #16131f;
  --text-2: #57516a;
  --text-3: #8f899f;
  --input-bg: #ffffff;
  --shadow: 0 20px 50px -24px rgba(40, 20, 60, 0.25);
  --glow-opacity: 0.45;
  color-scheme: light;
}

/* ── Reset & base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  /* Ambient glows */
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: var(--glow-opacity);
  background:
    radial-gradient(600px 400px at 85% -5%, rgba(255, 61, 127, 0.16), transparent 70%),
    radial-gradient(700px 500px at 10% 0%, rgba(139, 92, 255, 0.14), transparent 70%),
    radial-gradient(500px 400px at 60% 110%, rgba(255, 138, 61, 0.1), transparent 70%);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.025em; line-height: 1.1; margin: 0; font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
p { margin: 0; }
code, .mono { font-family: var(--font-mono); font-size: 0.85em; }
code { background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
::selection { background: rgba(255, 61, 127, 0.35); }

/* ── Utilities ───────────────────────────────────────────────────────── */
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 0.85rem; }
.xs { font-size: 0.75rem; }
.center { text-align: center; }
.row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.tight { gap: 0.4rem; }
.stack > * + * { margin-top: 0.75rem; }
.stack-lg > * + * { margin-top: 1.25rem; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 22px; height: 22px; }

/* ── Brand ───────────────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.03em; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; background: var(--gradient); display: grid; place-items: center;
  box-shadow: 0 8px 24px -8px rgba(255, 61, 127, 0.7);
}
.brand-mark svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2.2; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 40px; padding: 0 1rem; border-radius: 12px; border: 1px solid var(--border);
  background: var(--btn-bg); color: var(--text); font: 600 0.9rem/1 var(--font-body);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.btn:hover { border-color: var(--border-strong); background: var(--surface); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .chip:focus-within, a:focus-visible {
  outline: 2px solid var(--accent-1); outline-offset: 2px;
}
.btn[disabled], .btn.is-busy { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  border: 0; color: #fff; background: var(--gradient); background-size: 150% 100%;
  box-shadow: 0 10px 30px -12px rgba(255, 61, 127, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover { background: var(--gradient); background-position: 100% 0; box-shadow: 0 14px 34px -12px rgba(255, 61, 127, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }
.btn-danger { color: var(--bad); border-color: rgba(255, 92, 108, 0.3); background: rgba(255, 92, 108, 0.08); }
.btn-danger:hover { background: rgba(255, 92, 108, 0.15); border-color: rgba(255, 92, 108, 0.5); }
.btn-sm { height: 32px; padding: 0 0.7rem; font-size: 0.82rem; border-radius: 10px; }
.btn-lg { height: 52px; padding: 0 1.5rem; font-size: 1rem; border-radius: 16px; }
.btn-icon { width: 40px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.btn-block { width: 100%; }
.is-busy { position: relative; color: transparent !important; }
.is-busy::after {
  content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin 0.7s linear infinite;
}
.btn:not(.btn-primary).is-busy::after { border-color: var(--border-strong); border-top-color: var(--text); }
.link { color: var(--accent-1); text-decoration: none; font-weight: 600; cursor: pointer; background: none; border: 0; padding: 0; font: inherit; }
.link:hover { text-decoration: underline; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Forms ───────────────────────────────────────────────────────────── */
label.field, .field { display: block; }
.field-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text); }
.field-hint { display: block; font-size: 0.8rem; color: var(--text-3); margin-top: 0.4rem; }
.field-hint.ok { color: var(--ok); }
.field-hint.warn { color: var(--warn); }
.field-hint.bad { color: var(--bad); }
input[type='text'], input[type='url'], input[type='email'], input[type='password'], input[type='time'], input[type='number'], input:not([type]), select, textarea {
  width: 100%; height: 44px; padding: 0 0.9rem; border-radius: 12px; border: 1px solid var(--border);
  background: var(--input-bg); color: var(--text); font: 400 0.95rem var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
/* "@" in front of an Instagram username field */
.input-prefix { position: relative; display: block; }
.input-prefix > span { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--text-3); font-weight: 600; pointer-events: none; }
.input-prefix > input { padding-left: 1.9rem !important; width: 100%; }
textarea { height: auto; min-height: 110px; padding: 0.75rem 0.9rem; line-height: 1.55; resize: vertical; }
textarea.mono { font-family: var(--font-mono); font-size: 0.82rem; }
select { appearance: none; padding-right: 2.2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23918aa3' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-1); box-shadow: 0 0 0 4px rgba(255, 61, 127, 0.15); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input[type='file'] { font: inherit; color: var(--text-2); font-size: 0.85rem; }
input[type='file']::file-selector-button { font: 600 0.82rem var(--font-body); color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 0.5rem 0.8rem; margin-right: 0.75rem; cursor: pointer; }

/* Switch */
.reel-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.9rem 1.1rem; margin: 0.5rem 0 0.4rem calc(42px + 0.85rem); padding: 0.9rem 0 0.2rem 1rem; border-left: 2px solid var(--border); }
.reel-options .span-all { grid-column: 1 / -1; }
.input-suffix { display: flex; align-items: center; gap: 0.6rem; }
.input-suffix input { max-width: 110px; }
.input-suffix span { color: var(--text-3); font-size: 0.85rem; }
@media (max-width: 560px) { .reel-options { margin-left: 0.4rem; } }
.switch { display: flex; align-items: center; gap: 0.85rem; cursor: pointer; padding: 0.35rem 0; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-strong); position: relative; cursor: pointer; flex: none; transition: background 0.25s var(--ease); margin: 0; }
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: transform 0.25s var(--ease), background 0.25s; }
.switch input:checked { background: var(--gradient); border-color: transparent; }
.switch input:checked::after { transform: translateX(18px); background: #fff; }
.switch input:disabled { opacity: 0.45; cursor: not-allowed; }
.switch-text strong { display: block; font-size: 0.92rem; font-weight: 600; }
.switch-text span { display: block; font-size: 0.8rem; color: var(--text-3); }

/* ── Cards ───────────────────────────────────────────────────────────── */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.35rem; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.card-title { display: flex; align-items: center; gap: 0.55rem; font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; }
.card-title .icon { color: var(--accent-1); }
.card-sub { color: var(--text-3); font-size: 0.85rem; margin-top: 0.2rem; }
.card-glow::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 61, 127, 0.5), transparent 40%, transparent 60%, rgba(139, 92, 255, 0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.bento { display: grid; gap: 1rem; grid-template-columns: repeat(12, 1fr); }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

/* Stat tile */
.stat-value { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin-top: 0.6rem; }
.stat-label { display: flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; color: var(--text-3); font-weight: 500; }
.stat-foot { margin-top: 0.5rem; font-size: 0.82rem; color: var(--text-2); }

/* ── Badges & chips ──────────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 0.4rem; height: 24px; padding: 0 0.6rem; border-radius: 999px; font-size: 0.74rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.no-dot::before { display: none; }
.pill.ok { color: var(--ok); background: rgba(51, 214, 159, 0.12); }
.pill.warn { color: var(--warn); background: rgba(255, 181, 71, 0.12); }
.pill.bad { color: var(--bad); background: rgba(255, 92, 108, 0.12); }
.pill.accent { color: var(--accent-3); background: rgba(139, 92, 255, 0.14); }
.pill.accent::before { display: none; }
.pill.accent .icon { width: 13px; height: 13px; }
.pill.live::before { box-shadow: 0 0 0 0 currentColor; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(51, 214, 159, 0.6); } 70% { box-shadow: 0 0 0 7px rgba(51, 214, 159, 0); } 100% { box-shadow: 0 0 0 0 rgba(51, 214, 159, 0); } }
.chip { display: inline-flex; align-items: center; gap: 0.35rem; height: 30px; padding: 0 0.75rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.8rem; font-weight: 500; color: var(--text-2); }
.chip.accent { background: rgba(255, 61, 127, 0.12); border-color: rgba(255, 61, 127, 0.3); color: var(--text); }
.kbd { font-family: var(--font-mono); font-size: 0.72rem; padding: 0.1rem 0.4rem; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--text-3); }

/* ── Avatars ─────────────────────────────────────────────────────────── */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; font-weight: 700; color: #fff; background: var(--gradient); font-family: var(--font-display); }
.avatar-ring { padding: 2px; border-radius: 50%; background: var(--gradient); flex: none; display: inline-flex; }
.avatar-ring > .avatar { border: 2px solid var(--bg); }
.avatar-ring.muted-ring { background: var(--border-strong); }
.avatar-xl { width: 76px; height: 76px; font-size: 1.8rem; }
.avatar-sm { width: 30px; height: 30px; font-size: 0.8rem; }

/* ── App shell ───────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1.5rem;
  padding: 1.25rem 1rem; border-right: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); z-index: 30;
}
.sidebar-section { display: flex; flex-direction: column; gap: 0.25rem; min-height: 0; }
.sidebar-section.scroll { overflow-y: auto; flex: 1; margin: 0 -0.5rem; padding: 0 0.5rem; }
.sidebar .eyebrow { padding: 0 0.6rem 0.4rem; }
.nav-item {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.6rem; border-radius: 12px; text-decoration: none;
  color: var(--text-2); font-weight: 500; font-size: 0.92rem; transition: background 0.2s, color 0.2s; border: 1px solid transparent; cursor: pointer; background: none; width: 100%; text-align: left; font-family: inherit;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.nav-item .avatar { width: 32px; height: 32px; font-size: 0.85rem; }
.nav-item .avatar-ring > .avatar { border-width: 2px; }
.nav-item .meta { min-width: 0; flex: 1; }
.nav-item .meta strong { display: block; font-weight: 600; color: var(--text); font-size: 0.9rem; }
.nav-item .meta span { display: block; font-size: 0.74rem; color: var(--text-3); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-3); }
.status-dot.ok { background: var(--ok); box-shadow: 0 0 10px rgba(51, 214, 159, 0.8); }
.status-dot.warn { background: var(--warn); }
.status-dot.bad { background: var(--bad); box-shadow: 0 0 10px rgba(255, 92, 108, 0.8); }
.add-account { border: 1px dashed var(--border-strong); justify-content: center; color: var(--text-2); margin-top: 0.4rem; }
.add-account:hover { border-color: var(--accent-1); color: var(--text); }
.user-chip { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.user-chip .avatar { width: 34px; height: 34px; font-size: 0.85rem; }

.scrim { display: none; }
.main-col { min-width: 0; }
.main { min-width: 0; padding: 2rem clamp(1rem, 3vw, 2.5rem) 4rem; }
.main-inner { max-width: 1180px; margin: 0 auto; }
.topbar { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head p { color: var(--text-2); margin-top: 0.4rem; }

/* Segmented tabs */
.tabs { display: inline-flex; gap: 0.25rem; padding: 0.3rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); margin: 1.5rem 0; overflow-x: auto; max-width: 100%; }
.tabs a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.5rem 0.95rem; border-radius: 10px; text-decoration: none; color: var(--text-2); font-weight: 600; font-size: 0.87rem; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--surface-solid); color: var(--text); box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.5); }
.tabs .count { font-size: 0.7rem; padding: 0 0.4rem; border-radius: 999px; background: var(--surface-2); color: var(--text-3); }

/* ── Account hero ────────────────────────────────────────────────────── */
.hero-card { overflow: hidden; padding: 1.6rem; }
.hero-card::after {
  content: ''; position: absolute; right: -80px; top: -120px; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 61, 127, 0.35), transparent 65%); pointer-events: none; opacity: var(--glow-opacity);
}
.hero-top { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-top h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.hero-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.5rem; position: relative; z-index: 1; }

.countdown { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; margin-top: 0.7rem; }
.countdown small { font-size: 0.5em; font-weight: 600; letter-spacing: -0.02em; color: var(--text-2); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: flex; gap: 0.9rem; align-items: center; padding: 0.6rem 0; position: relative; }
.timeline li:not(:last-child)::after { content: ''; position: absolute; left: 21px; top: 44px; bottom: -6px; width: 1px; background: var(--border-strong); }
.timeline .when { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; text-align: center; flex: none; line-height: 1.05; }
.timeline .when b { display: block; font-family: var(--font-display); font-size: 1rem; }
.timeline .when span { display: block; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.timeline li:first-child .when { background: var(--gradient); color: #fff; }
.timeline li:first-child .when span { color: rgba(255, 255, 255, 0.8); }

/* Activity feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 0.85rem; align-items: flex-start; padding: 0.85rem 0; border-top: 1px solid var(--border); }
.feed li:first-child { border-top: 0; padding-top: 0.2rem; }
.feed .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); }
.feed .dot.ok { color: var(--ok); background: rgba(51, 214, 159, 0.12); }
.feed .dot.bad { color: var(--bad); background: rgba(255, 92, 108, 0.12); }
.feed .dot.warn { color: var(--warn); background: rgba(255, 181, 71, 0.12); }
.feed .body { min-width: 0; flex: 1; }
.feed .body strong { font-weight: 600; font-size: 0.9rem; }
.feed .err { color: var(--bad); font-size: 0.82rem; margin-top: 0.2rem; word-break: break-word; }

/* Checklist */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.checklist li { display: flex; align-items: center; gap: 0.7rem; font-size: 0.9rem; color: var(--text-2); }
.checklist .tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed var(--border-strong); flex: none; }
.checklist .done { color: var(--text); }
.checklist .done .tick { border: 0; background: var(--gradient); color: #fff; }
.progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 0.9rem 0 1.1rem; }
.progress span { display: block; height: 100%; background: var(--gradient); border-radius: inherit; transition: width 0.6s var(--ease); }

/* ── Publishing settings ─────────────────────────────────────────────── */
.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }
.mode-card {
  position: relative; display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.mode-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.mode-card .mode-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); transition: background 0.2s, color 0.2s; }
.mode-card strong { font-size: 0.95rem; }
.mode-card small { color: var(--text-3); font-size: 0.8rem; line-height: 1.45; }
.mode-card:has(input:checked) { border-color: transparent; background: var(--gradient-soft); box-shadow: 0 0 0 1.5px var(--accent-1), 0 18px 40px -20px rgba(255, 61, 127, 0.6); }
.mode-card:has(input:checked) .mode-icon { background: var(--gradient); color: #fff; }
.mode-card:has(input:focus-visible) { outline: 2px solid var(--accent-1); outline-offset: 2px; }

.folder-input { display: flex; gap: 0.5rem; }
.folder-input input { flex: 1; min-width: 0; }
.share-hint { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.85rem 1rem; border-radius: var(--radius); background: var(--gradient-soft); border: 1px solid var(--border); font-size: 0.85rem; color: var(--text-2); margin-bottom: 1.2rem; }
.share-hint code { cursor: copy; }

.schedule-list { display: grid; gap: 0.6rem; }
.slot { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 0.6rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.slot input[type='time'] { width: 150px; height: 38px; font-family: var(--font-mono); font-size: 0.9rem; }
.slot .cron-input { width: 200px; height: 38px; font-family: var(--font-mono); font-size: 0.85rem; }
.days { display: flex; gap: 0.3rem; flex-wrap: wrap; flex: 1; }
.day { position: relative; }
.day input { position: absolute; opacity: 0; }
.day span { display: grid; place-items: center; width: 38px; height: 32px; border-radius: 10px; font-size: 0.75rem; font-weight: 600; background: var(--surface-2); color: var(--text-3); cursor: pointer; transition: all 0.15s; border: 1px solid transparent; }
.day input:checked + span { background: rgba(255, 61, 127, 0.16); color: var(--text); border-color: rgba(255, 61, 127, 0.45); }
.day input:focus-visible + span { outline: 2px solid var(--accent-1); }
.slot-note { font-size: 0.75rem; color: var(--text-3); }

.sticky-save {
  position: sticky; bottom: 1rem; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem 0.75rem 0.75rem 1.2rem; border-radius: 18px; margin-top: 1.25rem;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}

/* Drive access + folder picker */
.access-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.access-option { position: relative; display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.9rem 1rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.access-option input { position: absolute; opacity: 0; }
.access-option:has(input:checked) { border-color: var(--accent-1); background: var(--gradient-soft); }
.access-option:has(input:focus-visible) { outline: 2px solid var(--accent-1); outline-offset: 2px; }
.access-option strong { display: block; font-size: 0.92rem; }
.access-option span.faint { display: block; font-size: 0.8rem; }
.google-mark { width: 34px; height: 34px; border-radius: 10px; background: #fff; display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }
.google-mark svg { width: 20px; height: 20px; }
.connect-google { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; padding: 1.1rem; border-radius: var(--radius); background: var(--gradient-soft); border: 1px solid var(--border); margin-bottom: 1.25rem; }
.folder-pick { display: flex; align-items: center; gap: 0.75rem; width: 100%; min-height: 52px; padding: 0.55rem 0.6rem 0.55rem 0.9rem; border-radius: 14px; border: 1px dashed var(--border-strong); background: var(--input-bg); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.folder-pick:hover { border-color: var(--accent-1); }
.folder-pick.has-value { border-style: solid; }
.folder-pick .folder-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 181, 71, 0.14); color: var(--warn); flex: none; }
.folder-pick .meta { flex: 1; min-width: 0; }
.folder-pick .meta strong { display: block; font-size: 0.92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-pick .meta span { display: block; font-size: 0.75rem; color: var(--text-3); }
.folder-modal { width: min(640px, calc(100vw - 2rem)); }
.email-modal { width: min(680px, calc(100vw - 2rem)); }
.email-modal textarea { font-size: 0.88rem; line-height: 1.5; }
.email-foot { flex-wrap: wrap; align-items: center; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem; font-size: 0.85rem; margin-bottom: 0.6rem; min-height: 28px; }
.crumbs button { background: none; border: 0; color: var(--text-2); font: inherit; padding: 0.2rem 0.45rem; border-radius: 8px; cursor: pointer; }
.crumbs button:hover { background: var(--surface-2); color: var(--text); }
.crumbs button:last-child { color: var(--text); font-weight: 600; }
.crumbs .sep { color: var(--text-3); }
.folder-list { height: 340px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.35rem; background: var(--surface); }
.folder-row { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.6rem 0.7rem; border-radius: 12px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.folder-row:hover, .folder-row:focus-visible { background: var(--surface-2); outline: none; }
.folder-row .folder-ico { color: var(--warn); }
.folder-row .grow strong { display: block; font-weight: 500; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-row .grow span { display: block; font-size: 0.72rem; color: var(--text-3); }
.folder-row .pick { opacity: 0; }
.folder-row:hover .pick, .folder-row:focus-visible .pick { opacity: 1; }
.new-folder { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.new-folder input { height: 36px; }

/* Notifications */
.bell { position: relative; }
.bell .count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 0.68rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.bell .count.soft { background: var(--accent-3); }
.nav-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 0.66rem; font-weight: 700; display: inline-grid; place-items: center; }
.nav-badge.soft { background: var(--surface-2); color: var(--text-2); }
.nav-badge.new { background: var(--accent-3); }

/* ── Music library (admin) ─────────────────────────────────────────── */
.music-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.75rem; }
.music-stat { padding: 0.9rem 1rem; }
.music-stat-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-top: 0.2rem; }
.music-stat-value.ok { color: var(--ok); }
.track-list { display: grid; gap: 0.1rem; }
.track-row { display: flex; align-items: flex-start; gap: 0.9rem; padding: 0.85rem 0.2rem; border-top: 1px solid var(--border); }
.track-row:first-child { border-top: 0; }
.track-row.is-off { opacity: 0.55; }
.track-row .chip { height: 24px; font-size: 0.72rem; padding: 0 0.55rem; }
.track-play { flex: none; border-radius: 50%; }
.track-play.is-playing { background: var(--gradient); color: #fff; border-color: transparent; }
.track-side { display: flex; align-items: center; gap: 0.4rem; flex: none; }
@media (max-width: 560px) { .track-row { flex-wrap: wrap; } .track-side { margin-left: auto; } }

/* ── What's new ──────────────────────────────────────────────────────── */
.update-item { display: flex; align-items: center; gap: 1rem; color: inherit; text-decoration: none; transition: border-color 0.2s var(--ease), transform 0.2s var(--ease); }
.update-item:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.update-item .feature-icon { margin: 0; flex: none; }
.update-item > .icon:last-child { color: var(--text-3); flex: none; }
.update-item.unread { border-color: color-mix(in srgb, var(--accent-3) 45%, var(--border)); }
.update-detail { max-width: 720px; }
.update-detail .lead { font-size: 1.05rem; margin-top: 0.5rem; line-height: 1.55; }
.update-detail section { margin-top: 1.5rem; }
.update-detail h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.update-detail ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.45rem; color: var(--text-2); line-height: 1.55; }
.update-detail .btn-primary { margin-top: 1.75rem; }
.update-toast { color: inherit; text-decoration: none; cursor: pointer; }
.toast.update-toast .icon { color: var(--accent-3); }
.update-toast .eyebrow { margin-bottom: 0.15rem; }

dialog.drawer { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(440px, 100vw); border-radius: 24px 0 0 24px; border-right: 0; display: none; flex-direction: column; padding: 0; }
dialog.drawer[open] { display: flex; animation: drawer-in 0.3s var(--ease); }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.2rem 0.9rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 0 0.6rem 1.2rem; }
.notif { display: flex; gap: 0.8rem; align-items: flex-start; width: 100%; padding: 0.8rem 0.7rem; border-radius: 14px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; position: relative; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--surface); }
.notif.unread::before { content: ''; position: absolute; left: 2px; top: 1.3rem; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-1); }
.notif .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); }
.notif .dot.error { color: var(--bad); background: rgba(255, 92, 108, 0.12); }
.notif .dot.warning { color: var(--warn); background: rgba(255, 181, 71, 0.12); }
.notif .dot.success { color: var(--ok); background: rgba(51, 214, 159, 0.12); }
.notif .body { flex: 1; min-width: 0; }
.notif .body strong { display: block; font-size: 0.9rem; font-weight: 600; }
.notif .body p { font-size: 0.82rem; color: var(--text-2); margin-top: 0.15rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.notif .meta { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.35rem; font-size: 0.72rem; color: var(--text-3); }
.notif .read-btn { flex: none; opacity: 0.6; }
.notif:hover .read-btn { opacity: 1; }

/* Run details */
.steps-list { list-style: none; margin: 0; padding: 0; }
.steps-list li { display: flex; gap: 0.85rem; padding: 0.55rem 0; position: relative; }
.steps-list li:not(:last-child)::after { content: ''; position: absolute; left: 13px; top: 36px; bottom: -8px; width: 2px; background: var(--border); }
.step-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-3); z-index: 1; }
.step-icon.done { background: rgba(51, 214, 159, 0.15); color: var(--ok); }
.step-icon.failed { background: rgba(255, 92, 108, 0.15); color: var(--bad); }
.step-icon.running { background: rgba(255, 181, 71, 0.15); color: var(--warn); }
.step-icon.running .icon { animation: spin 1.2s linear infinite; }
.step-icon.skipped { opacity: 0.55; }
.steps-list .step-body { flex: 1; min-width: 0; padding-top: 0.2rem; }
.steps-list .step-body strong { font-size: 0.9rem; font-weight: 600; }
.steps-list li.skipped strong { color: var(--text-3); font-weight: 500; }
.steps-list .step-note { font-size: 0.8rem; color: var(--text-2); margin-top: 0.15rem; word-break: break-word; }
.steps-list .step-error { font-size: 0.82rem; color: var(--bad); margin-top: 0.25rem; word-break: break-word; }
.caption-preview { white-space: pre-wrap; font-size: 0.85rem; color: var(--text-2); background: var(--surface-2); border-radius: 12px; padding: 0.85rem 1rem; max-height: 260px; overflow-y: auto; }
.feed li.clickable { cursor: pointer; border-radius: 12px; margin: 0 -0.5rem; padding-left: 0.5rem; padding-right: 0.5rem; }
.feed li.clickable:hover { background: var(--surface-2); }

/* ── Automations ─────────────────────────────────────────────────────── */
.rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.rule-card { display: flex; flex-direction: column; gap: 1rem; }
.flow { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.6rem; align-items: stretch; }
.flow-step { padding: 0.75rem; border-radius: 14px; background: var(--surface-2); min-width: 0; }
.flow-step .eyebrow { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.4rem; }
.flow-arrow { display: grid; place-items: center; color: var(--accent-1); }
.keyword { display: inline-flex; margin: 0.15rem 0.2rem 0 0; padding: 0.15rem 0.55rem; border-radius: 8px; background: rgba(255, 61, 127, 0.14); color: var(--text); font-size: 0.78rem; font-weight: 600; }
.bubble { font-size: 0.82rem; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── History grid ────────────────────────────────────────────────────── */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.post { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.post-media { aspect-ratio: 4 / 5; background: var(--gradient-soft); display: grid; place-items: center; color: var(--text-3); position: relative; overflow: hidden; }
.post-media img { width: 100%; height: 100%; object-fit: cover; }
.post-media .type { position: absolute; top: 0.6rem; right: 0.6rem; }
.post-body { padding: 0.85rem 0.95rem 0.95rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.post-caption { font-size: 0.82rem; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: auto; }

/* ── Connections ─────────────────────────────────────────────────────── */
.platform { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.platform-logo { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; flex: none; }
.platform-logo.ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.platform-logo.threads { background: #000; border: 1px solid var(--border-strong); }
.platform-logo.drive { background: var(--surface-2); }

/* ── Tables ──────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); font-weight: 600; padding: 0 0.75rem 0.6rem; }
td { padding: 0.75rem; border-top: 1px solid var(--border); }

/* ── Empty states & skeletons ────────────────────────────────────────── */
.empty { text-align: center; padding: 2.5rem 1rem; }
.empty .empty-art { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 1rem; display: grid; place-items: center; background: var(--gradient-soft); border: 1px solid var(--border); color: var(--accent-1); }
.empty h3 { margin-bottom: 0.4rem; }
.empty p { color: var(--text-2); max-width: 30rem; margin: 0 auto; }
.skeleton { border-radius: var(--radius-lg); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border: 1px solid var(--border); }
@keyframes shimmer { to { background-position: -200% 0; } }

.callout { display: flex; gap: 0.85rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: var(--radius); border: 1px solid rgba(255, 181, 71, 0.3); background: rgba(255, 181, 71, 0.08); margin-bottom: 1rem; }
.callout .icon { color: var(--warn); margin-top: 2px; }
.callout.bad { border-color: rgba(255, 92, 108, 0.35); background: rgba(255, 92, 108, 0.08); }
.callout.bad .icon { color: var(--bad); }
.callout strong { display: block; margin-bottom: 0.15rem; }
.callout.ok { border-color: rgba(51, 214, 159, 0.35); background: rgba(51, 214, 159, 0.08); }
.callout.ok .icon { color: var(--ok); }
.callout.info { border-color: var(--border); background: var(--surface-2); }
.callout.info .icon { color: var(--accent-3); }

/* ── Closed beta: connect help, access queue, Liftoff ─────────────────── */
.beta-callout { margin: 0 0 1.25rem; }
.beta-callout .icon-sm { width: 13px; height: 13px; vertical-align: -2px; }
.beta-help { border-color: rgba(255, 181, 71, 0.35); }
.beta-help .card-title .icon { color: var(--warn); }
.beta-help-steps { margin: 0.75rem 0 1rem; padding-left: 1.2rem; display: grid; gap: 0.6rem; font-size: 0.9rem; color: var(--text-2); }
.beta-help-steps strong { color: var(--text); }
.flash { animation: flash-ring 1.6s ease-out; }
@keyframes flash-ring { 0% { box-shadow: 0 0 0 0 rgba(255, 61, 127, 0.55); } 100% { box-shadow: 0 0 0 18px rgba(255, 61, 127, 0); } }
.beta-needs { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.beta-need { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 0.7rem 0.85rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); font-size: 0.9rem; }
.beta-need .grow { min-width: 200px; }
.ig-input { min-width: 150px; }
.ig-input input { height: 34px; font-size: 0.85rem; }
.tester-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: 1rem; }
.tester-handle { font-family: var(--font-mono); font-size: 1rem; padding: 0.35rem 0.6rem; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.warn-text { color: var(--warn); }
.user-delete:hover { color: var(--bad); }
.liftoff-card .card-title .icon { color: var(--accent-1); }
.liftoff-card.is-live { border-color: rgba(51, 214, 159, 0.35); }


/* ── Onboarding / connect ────────────────────────────────────────────── */
.connect-hero { max-width: 640px; margin: 3rem auto; text-align: center; }
.connect-orb {
  width: 120px; height: 120px; margin: 0 auto 1.75rem; border-radius: 36px; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
  box-shadow: 0 30px 80px -20px rgba(214, 36, 159, 0.7); animation: float 6s ease-in-out infinite;
}
.connect-orb svg { width: 56px; height: 56px; stroke-width: 1.6; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-3deg); } }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 2rem 0; text-align: left; }
.step { padding: 1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--gradient); color: #fff; font-size: 0.8rem; margin-bottom: 0.6rem; }
.step p { font-size: 0.85rem; color: var(--text-2); }

/* ── Dialogs ─────────────────────────────────────────────────────────── */
dialog {
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 0; background: var(--surface-solid); color: var(--text);
  width: min(620px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.8);
}
dialog::backdrop { background: rgba(5, 4, 10, 0.6); backdrop-filter: blur(6px); }
dialog[open] { animation: pop 0.25s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.4rem 0; }
.dialog-body { padding: 1.2rem 1.4rem; overflow-y: auto; max-height: calc(100vh - 12rem); }
.dialog-foot { display: flex; justify-content: flex-end; gap: 0.6rem; padding: 0 1.4rem 1.3rem; }
.segmented { display: inline-flex; padding: 0.25rem; border-radius: 12px; background: var(--surface-2); gap: 0.25rem; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 0.4rem 0.85rem; border-radius: 9px; font-size: 0.85rem; font-weight: 600; color: var(--text-2); cursor: pointer; }
.segmented input:checked + span { background: var(--surface-solid); color: var(--text); box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.5); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 0.5rem; max-height: 280px; overflow-y: auto; margin-top: 0.75rem; }
.media-grid button { padding: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--surface-2); border: 2px solid transparent; cursor: pointer; color: var(--text-3); font-size: 0.7rem; }
.media-grid button.selected { border-color: var(--accent-1); box-shadow: 0 0 0 3px rgba(255, 61, 127, 0.25); }
.media-grid img { width: 100%; height: 100%; object-fit: cover; }

/* ── Menus ───────────────────────────────────────────────────────────── */
.menu { position: relative; }
.menu-panel { position: absolute; bottom: calc(100% + 8px); left: 0; right: 0; padding: 0.35rem; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow); z-index: 40; }
.menu-panel .nav-item { font-size: 0.88rem; }

/* ── Toasts ──────────────────────────────────────────────────────────── */
#toasts { position: fixed; right: 1.25rem; bottom: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; z-index: 1000; max-width: min(400px, calc(100vw - 2.5rem)); }
.toast {
  display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.85rem 1rem; border-radius: 14px; font-size: 0.9rem;
  background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow); animation: toast-in 0.35s var(--ease);
}
.toast .icon { margin-top: 1px; color: var(--ok); }
.toast.error .icon { color: var(--bad); }
.toast.warn .icon { color: var(--warn); }
.toast.leaving { animation: toast-out 0.25s forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(0.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }

/* ── Auth pages ──────────────────────────────────────────────────────── */
.auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-art { position: relative; overflow: hidden; padding: 2.5rem; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--border); }
.auth-art::before { content: ''; position: absolute; inset: -20%; background: conic-gradient(from 200deg at 60% 40%, rgba(139, 92, 255, 0.5), rgba(255, 61, 127, 0.45), rgba(255, 138, 61, 0.35), rgba(139, 92, 255, 0.5)); filter: blur(80px); opacity: calc(0.55 * var(--glow-opacity) + 0.2); animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: rotate(25deg) scale(1.1); } }
.auth-art > * { position: relative; }
.auth-quote { font-family: var(--font-display); font-size: clamp(2rem, 3.4vw, 3.1rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; max-width: 14ch; }
.auth-form-wrap { display: grid; place-items: center; padding: 2rem 1.25rem; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 2rem; margin: 1.5rem 0 0.4rem; }
.float-card { position: absolute; padding: 0.85rem 1rem; border-radius: 16px; background: color-mix(in srgb, var(--surface-solid) 80%, transparent); border: 1px solid var(--border-strong); box-shadow: var(--shadow); backdrop-filter: blur(16px); font-size: 0.85rem; display: flex; gap: 0.7rem; align-items: center; animation: float 7s ease-in-out infinite; }
.float-card .icon { color: var(--accent-1); }
.error-text { color: var(--bad); font-size: 0.87rem; }

/* ── Landing ─────────────────────────────────────────────────────────── */
.landing-nav { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem clamp(1rem, 4vw, 3rem); max-width: 1240px; margin: 0 auto; }
.landing-hero { max-width: 1240px; margin: 0 auto; padding: 3rem clamp(1rem, 4vw, 3rem) 2rem; display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.landing-hero h1 { font-size: clamp(2.8rem, 6.5vw, 5.4rem); line-height: 0.98; letter-spacing: -0.055em; font-weight: 800; }
.landing-hero .lead { font-size: 1.15rem; color: var(--text-2); max-width: 34rem; margin: 1.5rem 0 2rem; }
.mock { position: relative; }
.mock-phone { width: min(300px, 80vw); margin: 0 auto; aspect-ratio: 9 / 18.5; border-radius: 44px; padding: 10px; background: linear-gradient(160deg, #2a2733, #0e0d13); box-shadow: 0 50px 120px -30px rgba(255, 61, 127, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.mock-screen { height: 100%; border-radius: 36px; overflow: hidden; background: #0b0a10; display: flex; flex-direction: column; color: #f4f2f8; }
.mock-head { display: flex; align-items: center; gap: 0.6rem; padding: 1.2rem 1rem 0.7rem; font-size: 0.8rem; font-weight: 600; }
.mock-post { margin: 0 0.6rem; border-radius: 22px; aspect-ratio: 4 / 5; background: linear-gradient(160deg, #ff8a3d, #ff3d7f 50%, #8b5cff); position: relative; overflow: hidden; }
.mock-post::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 70% 25%, rgba(255, 255, 255, 0.55), transparent 35%), radial-gradient(circle at 20% 90%, rgba(0, 0, 0, 0.35), transparent 50%); }
.mock-cap { padding: 0.8rem 1rem; font-size: 0.72rem; color: #b4afc3; line-height: 1.5; }
.mock .float-card { color: var(--text); }
.logo-row { max-width: 1240px; margin: 2rem auto 0; padding: 0 clamp(1rem, 4vw, 3rem); }
.feature-bento { max-width: 1240px; margin: 4rem auto; padding: 0 clamp(1rem, 4vw, 3rem); display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.feature-bento .card { padding: 1.6rem; }
.feature-bento h3 { font-size: 1.35rem; margin: 1rem 0 0.5rem; }
.feature-bento p { color: var(--text-2); font-size: 0.93rem; }
.feature-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--gradient); color: #fff; }
.landing-cta { max-width: 1240px; margin: 0 auto 4rem; padding: 0 clamp(1rem, 4vw, 3rem); }
.landing-cta .card { text-align: center; padding: 3.5rem 1.5rem; overflow: hidden; }
.landing-cta h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.045em; }
.landing-foot { text-align: center; color: var(--text-3); font-size: 0.82rem; padding: 0 1rem 2rem; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .span-3 { grid-column: span 6; }
  .span-4, .span-5, .span-7, .span-8 { grid-column: span 12; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform 0.3s var(--ease); box-shadow: var(--shadow); background: var(--bg-elev); }
  .shell.nav-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 25; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  .shell.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
  .main { padding-top: 1.25rem; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .landing-hero { grid-template-columns: 1fr; text-align: center; }
  .landing-hero .lead { margin-left: auto; margin-right: auto; }
  .landing-hero .row { justify-content: center; }
  .feature-bento { grid-template-columns: 1fr; }
  .feature-bento > * { grid-column: auto !important; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .span-3 { grid-column: span 12; }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); }
  .slot input[type='time'] { width: 140px; }
  .sticky-save { flex-direction: column; align-items: stretch; }
  .tabs { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 901px) {
  #mobile-brand { display: none; }
}

/* ── Legal pages ─────────────────────────────────────────────────────── */
.legal { max-width: 760px; margin: 0 auto; padding: 2rem 1.25rem 4rem; line-height: 1.65; color: var(--text-2); }
.legal h1 { color: var(--text); margin-bottom: 0.4rem; }
.legal h2 { color: var(--text); font-size: 1.15rem; margin: 2rem 0 0.6rem; }
.legal p, .legal ul { margin: 0.6rem 0; }
.legal ul { padding-left: 1.2rem; display: grid; gap: 0.4rem; }
.legal a { color: var(--accent-3); }
.legal strong { color: var(--text); }
.landing-foot a { color: inherit; }
.legal-links { font-size: 0.8rem; color: var(--text-3); }
.legal-links a { color: inherit; text-decoration: underline; }
.danger-card { border-color: rgba(255, 92, 108, 0.28); }
.drive-mode-switch { margin-top: 1.1rem; font-size: 0.8rem; color: var(--text-3); }
.drive-using { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 1rem; }
.drive-using .google-mark { width: 22px; height: 22px; }
.usage-meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 0.4rem; }
.usage-meter span { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.usage-meter.warn span { background: var(--warn); }
.usage-meter.bad span { background: var(--bad); }

/* ── Waitlist form honeypot ──────────────────────────────────────────── */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Admin: content calendar ─────────────────────────────────────────── */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; margin-top: 1.25rem; align-items: start; }
.cal-title { font-size: 1.35rem; min-width: 11rem; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { font-size: 0.72rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; padding: 0 0.4rem 0.3rem; }
.cal-cell { min-height: 104px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); padding: 0.45rem; display: flex; flex-direction: column; gap: 0.35rem; color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.cal-cell:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.cal-cell.outside { opacity: 0.4; }
.cal-cell.today { border-color: var(--accent-1); box-shadow: 0 0 0 1px var(--accent-1) inset; }
.cal-cell.all-done { background: rgba(51, 214, 159, 0.06); }
.cal-cell.overdue { border-color: rgba(255, 92, 108, 0.55); }
.cal-date { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; }
.cal-cell.today .cal-date { color: var(--accent-1); }
.cal-items { display: flex; flex-direction: column; gap: 3px; }
.cal-chip { display: flex; align-items: center; gap: 0.3rem; font-size: 0.68rem; font-weight: 600; padding: 2px 6px; border-radius: 7px; border: 1px solid var(--border); white-space: nowrap; overflow: hidden; }
.cal-chip .icon { width: 12px; height: 12px; flex: none; }
.cal-chip.linkedin { color: #4b9cff; }
.cal-chip.x { color: var(--text); }
.cal-chip.instagram { color: var(--accent-1); }
.cal-chip.posted { background: rgba(51, 214, 159, 0.16); border-color: rgba(51, 214, 159, 0.4); }
.cal-chip.skipped { opacity: 0.45; text-decoration: line-through; }
.cal-filter { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; font-weight: 600; padding: 0.25rem 0.55rem; border-radius: 999px; border: 1px solid var(--border); cursor: pointer; }
.cal-filter input { accent-color: var(--accent-1); }
.cal-filter .icon { width: 13px; height: 13px; }
.cal-key::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 0.35rem; vertical-align: -1px; border: 1px solid var(--border-strong); }
.cal-key.posted::before { background: rgba(51, 214, 159, 0.6); }
.cal-key.skipped::before { opacity: 0.4; }
.cal-key.overdue::before { border-color: var(--bad); }
.switch-mini { position: relative; display: inline-block; width: 32px; height: 18px; flex: none; }
.switch-mini input { opacity: 0; width: 0; height: 0; }
.switch-mini span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border-strong); cursor: pointer; transition: .15s; }
.switch-mini span::after { content: ''; position: absolute; width: 12px; height: 12px; left: 2px; top: 2px; border-radius: 50%; background: var(--text-2); transition: .15s; }
.switch-mini input:checked + span { background: var(--gradient); border-color: transparent; }
.switch-mini input:checked + span::after { transform: translateX(14px); background: #fff; }
.checklist li { align-items: center; }

.content-item.status-posted { border-color: rgba(51, 214, 159, 0.35); }
.content-item.status-skipped { opacity: 0.7; }
.content-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.25rem; margin-top: 1rem; }
.platform-badge { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; color: #fff; }
.platform-badge.linkedin { background: #0a66c2; }
.platform-badge.x { background: #111; border: 1px solid var(--border-strong); }
.platform-badge.instagram { background: var(--gradient); }
.pv { border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); padding: 0.9rem 1rem; }
.pv-head { display: flex; gap: 0.6rem; align-items: center; margin-bottom: 0.6rem; }
.post-text { white-space: pre-wrap; word-break: break-word; font-size: 0.88rem; line-height: 1.55; margin: 0.35rem 0 0.6rem; }
.pv-x { display: flex; flex-direction: column; gap: 0.6rem; background: transparent; border: 0; padding: 0; }
.tweet { border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); padding: 0.7rem 0.9rem; }
.tweet.reply { border-style: dashed; }
.comment-box, .asset-box, .status-box { border-radius: 14px; border: 1px dashed var(--border-strong); padding: 0.75rem 0.9rem; display: flex; flex-direction: column; gap: 0.45rem; }
.status-box { border-style: solid; border-color: var(--border); }
.asset-files { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.asset-file { display: inline-flex; align-items: center; gap: 0.3rem; font-family: var(--font-mono); font-size: 0.72rem; padding: 0.2rem 0.5rem; border-radius: 8px; background: var(--surface-2); }
.asset-file .icon { width: 12px; height: 12px; }
.alt-list summary { cursor: pointer; margin: 0.3rem 0; }
.alt-row { gap: 0.6rem; padding: 0.4rem 0; border-top: 1px solid var(--border); flex-wrap: nowrap; }
.row.wrap { flex-wrap: wrap; }

/* ── Admin: waitlist ─────────────────────────────────────────────────── */
.waitlist-table td { vertical-align: top; }
.waitlist-table select { min-width: 120px; }
.note-input { margin-top: 0.4rem; font-size: 0.78rem; padding: 0.3rem 0.5rem; height: auto; }

@media (max-width: 1100px) {
  .cal-layout { grid-template-columns: 1fr; }
  .content-body { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .cal-cell { min-height: 64px; padding: 0.3rem; }
  .cal-chip span { display: none; }
  .cal-dow { padding: 0 0.1rem 0.2rem; font-size: 0.6rem; }
}

/* ── Admin: QA sessions ──────────────────────────────────────────────── */
.qa-start { display: grid; gap: 1rem; }
.qa-start-grid { display: grid; grid-template-columns: 2fr 1.2fr 1fr 1fr; gap: 0.9rem; }
.qa-kit { margin-top: 1.25rem; }
.qa-kit summary, .qa-card summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.75rem; }
.qa-kit summary::-webkit-details-marker, .qa-card summary::-webkit-details-marker { display: none; }
.qa-kit summary .card-title { flex: 1; }
.qa-kit-list { margin: 1rem 0 0; padding-left: 1.2rem; display: grid; gap: 0.7rem; }
.qa-kit-list li strong { display: block; }
.qa-kit-list li span { color: var(--text-2); font-size: 0.88rem; }
.qa-table td { vertical-align: middle; }
.qa-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.qa-bar span { height: 100%; transition: width 0.3s var(--ease); }
.qa-bar .passed { background: var(--ok); }
.qa-bar .failed { background: var(--bad); }
.qa-bar .blocked { background: var(--warn); }
.qa-bar .skipped { background: var(--text-3); }
.qa-stats { grid-template-columns: repeat(5, 1fr) 2fr; }
.qa-progress .qa-bar { margin-top: 0.8rem; height: 10px; }
.qa-filters { margin: 1.25rem 0 0.5rem; gap: 0.6rem; flex-wrap: wrap; }
.qa-filters select { max-width: 200px; }
.qa-filters input { max-width: 260px; }
.qa-area { font-size: 1rem; color: var(--text-2); margin: 1.6rem 0 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-body); font-weight: 600; }
.qa-card { padding: 0; margin-bottom: 0.7rem; border-left: 3px solid var(--border-strong); }
.qa-card summary { padding: 1rem 1.2rem; }
.qa-card.qa-passed { border-left-color: var(--ok); }
.qa-card.qa-failed { border-left-color: var(--bad); }
.qa-card.qa-blocked { border-left-color: var(--warn); }
.qa-card.qa-skipped { border-left-color: var(--text-3); }
.qa-card summary strong { display: block; }
.qa-id { font-family: var(--font-mono); font-size: 0.75rem; padding: 0.2rem 0.5rem; border-radius: 8px; background: var(--surface-2); color: var(--text-2); flex: none; }
.qa-body { padding: 0 1.2rem 1.2rem; display: grid; gap: 1rem; }
.qa-blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.8rem; }
.qa-block { border-radius: 14px; background: var(--surface-2); padding: 0.8rem 0.95rem; }
.qa-block-title { display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); margin-bottom: 0.4rem; }
.qa-block ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.35rem; font-size: 0.87rem; }
.qa-steps { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.qa-steps th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border); }
.qa-steps td { padding: 0.65rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.qa-steps td:nth-child(3) { width: 45%; }
.qa-steps tr.done td:nth-child(3), .qa-steps tr.done td:nth-child(4) { opacity: 0.55; }
.qa-steps input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--ok); margin-top: 2px; }
.qa-steps code, .qa-kit-list code, .qa-block code { font-size: 0.8em; }
.qa-prev { font-size: 0.85rem; padding: 0.7rem 0.9rem; border-radius: 12px; border: 1px dashed var(--border-strong); color: var(--text-2); }
.qa-actions .btn.qa-on.passed { background: var(--ok); color: #09080d; border-color: transparent; }
.qa-actions .btn.qa-on.failed { background: var(--bad); color: #fff; border-color: transparent; }
.qa-actions .btn.qa-on.blocked { background: var(--warn); color: #09080d; border-color: transparent; }
.qa-actions .btn.qa-on.skipped { background: var(--text-3); color: #fff; border-color: transparent; }
@media (max-width: 900px) {
  .qa-start-grid { grid-template-columns: 1fr 1fr; }
  .qa-stats { grid-template-columns: repeat(3, 1fr); }
  .qa-progress { grid-column: 1 / -1; }
  .qa-steps thead { display: none; }
  .qa-steps tr { display: grid; grid-template-columns: 28px 22px 1fr; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
  .qa-steps td { border: 0; padding: 0.2rem 0.3rem; }
  .qa-steps td:nth-child(3) { width: auto; }
  .qa-steps td:nth-child(4) { grid-column: 3; }
}

/* Non-production environment marker (e.g. DEV) next to the logo */
.env-badge { margin-left: 0.5rem; padding: 0.15rem 0.45rem; border-radius: 6px; font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; color: #09080d; background: var(--warn); vertical-align: middle; }
