:root {
  --bg: #141414;
  --sidebar: #191919;
  --card: #1e1e1e;
  --line: #2c2c2c;
  --muted: #b5b5b5;
  --accent: #ad103a;
  --accent-2: #961033;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: #fff;
  font-family: Inter, sans-serif;
}
a { color: inherit; }
button, a { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
::selection { background: var(--accent); color: #fff; }
h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
h2 { margin: 0; font-size: 16px; }
p { margin: 0; }

.app { min-height: 100vh; }
.topbar, .side-head, .sidebar, .card, .auth-card, .balance-box, .choice, .switch-card, input, textarea, select {
  border-color: var(--line);
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 16px;
  background: var(--sidebar);
  border-bottom: 1px solid var(--line);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: 250px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  transform: translateX(-100%);
}
body.nav-open .sidebar { transform: none; }
.backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  border: 0;
  background: rgba(0, 0, 0, .6);
}
body.nav-open .backdrop { display: block; }
.side-head, .who, .page-head, .form-foot, .admin-grid, .switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.side-head { padding: 20px 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.brand.big { margin-bottom: 22px; }
.brand.big span { display: grid; }
.brand small, .who-mail, .muted { color: var(--muted); }
.brand small { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; }
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
}
.logo svg { width: 16px; height: 16px; }
.nav { display: grid; gap: 4px; padding: 0 12px; }
.nav a, .icon-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, .75);
  text-decoration: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}
.nav a.active { background: #2a2a2a; color: #fff; }
.nav a:hover, .icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.nav svg, .icon-btn svg { width: 16px; height: 16px; }
.side-foot { margin-top: auto; padding: 12px 12px 16px; }
.who { padding: 0 4px 12px; }
.who-name, .clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-mail { font-size: 12px; }
.who form { margin: 0; }
.icon-btn { width: 40px; justify-content: center; padding: 0; }
.balance-box {
  display: block;
  padding: 12px;
  text-align: center;
  border: 1px solid var(--accent);
  border-radius: 12px;
}
.kicker { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.balance-value, .stat-value { margin-top: 4px; font-size: 22px; font-weight: 600; }
.main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.pad { padding: 22px; }
.card-head { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.table-card { margin-top: 16px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head p, .card-head p, .pad > .muted { margin-top: 4px; }
.stats, .choices, .report-grid, .admin-grid { display: grid; gap: 12px; }
.stats { grid-template-columns: repeat(2, 1fr); margin-bottom: 16px; }
.stat { padding: 16px; }
.btn, .preset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.btn:hover, .preset.on { background: var(--accent-2); }
.btn-block { width: 100%; height: 44px; margin-top: 12px; }
.btn-deep { background: var(--accent-2); }
.btn-ghost, .preset { background: #2a2a2a; border: 1px solid var(--line); font-weight: 500; }
.btn-ghost:hover { background: #333; }
.row-actions, .presets { display: flex; flex-wrap: wrap; gap: 8px; }
.notes { margin: 12px 0 0; color: rgba(255, 255, 255, .8); font-size: 14px; line-height: 1.6; }
ul.notes { padding-left: 18px; }
ul.notes li + li { margin-top: 4px; }
label, .label { display: block; margin-top: 16px; font-size: 14px; font-weight: 500; }
input, textarea, select {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #141414;
  color: #fff;
  font: inherit;
  outline: none;
}
input, select { height: 42px; padding: 0 12px; }
textarea { min-height: 180px; padding: 12px; line-height: 1.6; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
.choices { margin-top: 8px; }
.choice { margin: 0; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: block;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.choice strong, .choice b, .choice small { display: block; }
.choice b { margin-top: 4px; font-weight: 500; }
.choice small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.choice input:checked + span { border-color: var(--accent); background: rgba(173, 16, 58, .1); }
.option-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; align-items: start; }
.switch-row > span:first-child { min-width: 0; }
.option-row .switch-card { margin-top: 0; }
.switch-card { margin-top: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; }
.switch-card:has(.switch-input:checked) { border-color: var(--accent); background: rgba(173, 16, 58, .1); }
.switch-row { margin: 0; cursor: pointer; }
.switch-row strong, .switch-row small { display: block; }
.switch-row small { margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 400; }
.switch-input { position: absolute; opacity: 0; }
.switch { position: relative; width: 44px; height: 24px; flex: 0 0 auto; border-radius: 999px; background: rgba(255, 255, 255, .15); }
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s;
}
.switch-card:has(.switch-input:checked) .switch { background: var(--accent); }
.switch-card:has(.switch-input:checked) .switch::after { transform: translateX(20px); }
.switch-extra { display: none; margin-top: 12px; }
.switch-card:has(.switch-input:checked) .switch-extra { display: block; }
.switch-card:has(.switch-input:checked) .switch-extra.two { display: grid; }
.switch-extra label { margin-top: 0; }
.form-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.form-foot p { font-size: 14px; color: rgba(255, 255, 255, .8); }
.form-foot .short { color: #fca5a5; }
.alert { margin: 12px 0; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.alert-error { color: #fca5a5; background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .4); }
.alert-success { color: #86efac; background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .35); }
.alert-info { color: #bfdbfe; background: rgba(59, 130, 246, .1); border: 1px solid rgba(59, 130, 246, .35); }
.alert a { text-decoration: underline; }
.hidden { display: none !important; }
.warn { color: #fcd34d; font-size: 14px; }
.tiny { font-size: 12px; }
.empty { padding: 28px 20px; color: var(--muted); font-size: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.right { text-align: right; }
.ok { color: #34d399; }
.bad { color: #f87171; }
.pill { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: rgba(255, 255, 255, .1); }
.pill-completed { color: #34d399; background: rgba(16, 185, 129, .15); }
.pill-failed { color: #f87171; background: rgba(239, 68, 68, .15); }
.pill-drip { color: #ffb3c4; background: rgba(173, 16, 58, .15); }
.pill-scheduled { color: #fcd34d; background: rgba(245, 158, 11, .15); }
.history-head { align-items: center; margin-bottom: 20px; }
.history-head + .table-card { margin-top: 0; }
.job .back { display: inline-block; margin-bottom: 16px; }
.job .page-head { align-items: center; margin-bottom: 18px; }
.job-side { display: flex; align-items: center; gap: 22px; }
.job .fee { min-width: 88px; text-align: right; }
.job .page-head .muted { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.job .bar { margin-top: 4px; }
.job .progress-note { margin: 10px 0 22px; }
.job .stats { margin-bottom: 22px; }
.job .stat { padding: 18px 20px; }
.report-grid.solo { grid-template-columns: 1fr; }
.bar { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.bar span { display: block; height: 100%; background: var(--accent); }
.back { color: var(--muted); text-decoration: none; font-size: 14px; }
.back:hover { color: #fff; }
.links { max-height: 420px; margin: 14px 0 0; padding: 0; overflow: auto; list-style: none; color: rgba(255, 255, 255, .82); font-size: 13px; line-height: 1.7; }
.links li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.links li + li { margin-top: 2px; }
.narrow { max-width: 720px; }
.pay h1 + .muted { margin-top: 8px; }
.pay .card.pad { margin-top: 24px; padding: 28px; }
.pay .stat-value { margin-top: 10px; font-size: 36px; }
.pay .presets { margin-top: 28px; gap: 12px; }
.pay .preset { min-width: 76px; height: 44px; }
.pay label { margin-top: 28px; }
.pay .btn { margin-top: 22px; height: 46px; padding: 0 22px; }
.pay .table-card { margin-top: 28px; }
.pay .card-head { padding: 20px 24px; }
.pay th, .pay td { padding: 16px 24px; }
.stack { display: grid; gap: 12px; margin-top: 16px; }
.sitemap-row { display: flex; gap: 8px; margin-top: 12px; }
.sitemap-row input { margin: 0; }
.nav a.nav-invite { margin-top: 8px; color: #ffb3c4; border: 1px solid rgba(173, 16, 58, .5); background: rgba(173, 16, 58, .12); }
.nav a.nav-invite:hover, .nav a.nav-invite.active { color: #fff; background: rgba(173, 16, 58, .3); }
.invite h1 + .muted { margin-top: 10px; line-height: 1.6; }
.invite .card.pad { margin-top: 28px; padding: 28px; }
.invite .card.pad .notes { margin-top: 18px; }
.invite .stats { grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0 0; }
.invite .stat { padding: 20px 22px; }
.invite .stat-value { margin-top: 8px; font-size: 28px; }
.invite .table-card { margin-top: 20px; }
.invite .card-head { padding: 20px 24px; }
.invite th, .invite td { padding: 16px 24px; }
.invite table { min-width: 520px; }
.copy-row { display: flex; gap: 10px; margin-top: 12px; }
.copy-row input { flex: 1 1 auto; min-width: 0; margin: 0; height: 46px; }
.copy-row .btn { flex: 0 0 auto; height: 46px; padding: 0 22px; }
.auth-grid { min-height: 100vh; display: grid; }
.pitch { display: flex; flex-direction: column; justify-content: center; padding: 48px 24px; }
.pitch h1 { max-width: 640px; font-size: 32px; line-height: 1.15; }
.pitch > p { max-width: 640px; margin-top: 16px; color: var(--muted); line-height: 1.7; }
.pitch h2 { margin-top: 36px; font-size: 14px; }
.price-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 440px; margin-top: 12px; padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.price-check { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; background: #166534; color: #fff; }
.price-check svg { width: 16px; height: 16px; }
.price-card.accent { border-color: var(--accent); background: rgba(173, 16, 58, .1); }
.price { margin-top: 4px; font-size: 28px; font-weight: 600; }
.price span { font-size: 16px; font-weight: 500; color: var(--muted); }
.price-card p { margin-top: 8px; color: rgba(255, 255, 255, .75); font-size: 14px; }
.pitch-video { position: relative; width: 100%; max-width: 640px; margin-top: 20px; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #000; }
.pitch-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.with-video h2 { margin-top: 20px; }
.with-video .prices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 640px; }
.with-video .price-card { max-width: none; margin-top: 10px; padding: 12px 16px; }
.with-video .price { font-size: 22px; }
.with-video .price span { font-size: 14px; }
.with-video .price-card p { margin-top: 4px; font-size: 13px; }
.auth-side { display: flex; align-items: center; justify-content: center; padding: 24px 16px 40px; }
.auth-card { width: min(420px, 100%); padding: 32px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.auth-switch { margin-top: 16px; color: var(--muted); text-align: center; font-size: 14px; }
.auth-switch a { color: #fff; }
.mobile-only { display: flex; }

@media (min-width: 720px) {
  .stats, .choices, .switch-extra.two { grid-template-columns: 1fr 1fr; }
  .report-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-grid { grid-template-columns: 1fr 1fr auto; align-items: end; }
  .admin-grid .btn { margin-bottom: 1px; }
  .form-foot { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
  .pitch { padding: 48px 40px; }
  .pitch h1 { font-size: 40px; }
}
@media (min-width: 900px) {
  .topbar, .backdrop, .mobile-only { display: none; }
  .sidebar { transform: none; }
  .main { width: min(1120px, calc(100% - 250px - 64px)); margin-left: 282px; padding-top: 32px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .invite .stats { grid-template-columns: 1fr 1fr; }
  .auth-grid { grid-template-columns: 1fr 1fr; }
  .pitch { padding: 48px 64px; }
  .pitch.with-video { padding: 28px 56px; }
  .with-video h1 { font-size: 30px; }
  .with-video > p { margin-top: 10px; font-size: 15px; line-height: 1.6; }
  .with-video .pitch-video { max-width: min(640px, calc((100vh - 400px) * 16 / 9)); }
}
@media (max-width: 479px) {
  .with-video .prices { grid-template-columns: 1fr; }
}
@media (max-width: 719px) {
  .admin-grid .btn, .form-foot .btn { width: 100%; }
}
