:root {
  --navy: #0c1a3a;
  --ink: #020617;
  --slate: #334155;
  --cta: #1a4db8;
  --cta-deep: #163e94;
  --bar: #2f6fd6;
  --bg: #eceef6;
  --card: #ffffff;
  --heading: #0c1a3a;
  --wash: #f4f6fb;
  --input: #ffffff;
  --ok: #0f766e;
  --bad: #b42318;
  --line: #d5dbe8;
  --radius: 14px;
  --sidebar-width: 240px;
  --header-height: 56px;
  --grid-gap: 12px;
  --card-padding: 12px;
  --z-header: 20;
  --z-sidecar: 30;
  --z-overlay: 40;
  --z-skip: 50;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(1200px 500px at 10% -10%, #d7e4ff 0%, transparent 50%), var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--cta); }
.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus { left: 12px; top: 12px; background: var(--card); color: var(--heading); padding: 8px 12px; z-index: var(--z-skip); }
.bar { height: 6px; background: var(--bar); }
.wrap { width: min(1100px, calc(100% - 32px)); margin: 0 auto; }
.top {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  flex-shrink: 0;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.35);
}
.top-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--heading); min-height: 44px; }
.brand-name { font-weight: 700; letter-spacing: -0.03em; color: inherit; }
img.brand-logo, img.foot-logo {
  display: block; height: 44px; width: auto; max-height: 44px; max-width: 48px;
  object-fit: contain; background: transparent;
}
img.foot-logo { height: 56px; max-height: 56px; max-width: 56px; }
.lockup-wordmark { display: block; height: 120px; width: auto; max-width: 160px; margin: 0 auto 12px; object-fit: contain; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-left: auto; }
.nav a, .linkish {
  min-height: 44px; display: inline-flex; align-items: center;
  background: none; border: 0; color: var(--heading); text-decoration: none; font: inherit; cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}
.nav-toggle {
  min-height: 44px; min-width: 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  background: var(--card); color: var(--heading); border-radius: 10px; cursor: pointer; font: inherit;
}
.nav-bars,
.nav-bars::before,
.nav-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}
.nav-bars { position: relative; }
.nav-bars::before,
.nav-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-bars::before { top: -6px; }
.nav-bars::after { top: 6px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.top-inner .nav-toggle { margin-left: auto; }
main { padding: 28px 0 64px; flex: 1 1 auto; display: flex; flex-direction: column; }
.skin-site main { padding: 0; display: block; }
.auth-stage {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 0 32px;
}
.auth-stage .narrow {
  width: min(440px, 100%);
  margin: 0;
}
.auth-stage .form-card h1 {
  text-align: center;
}
.hero { padding: 12px 0 28px; max-width: 40rem; }
.hero h1, h1 { color: var(--heading); letter-spacing: -0.03em; }
.lead { color: var(--slate); font-size: 1.05rem; }
.kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; color: var(--cta); font-weight: 700; margin: 0 0 8px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 20px; border-radius: 12px; border: 0;
  background: var(--cta); color: #fff; text-decoration: none; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  letter-spacing: 0.01em; word-spacing: 0.08em;
  transition: background 180ms ease, border-color 180ms ease;
}
.btn:hover { background: var(--cta-deep); }
.btn-ghost, button.btn-ghost { background: var(--input); color: var(--heading); border: 1px solid var(--line); }
.btn-ghost:hover, button.btn-ghost:hover { background: var(--wash); }
.btn-danger, button.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover, button.btn-danger:hover { background: #8f1c14; }
.btn-small { min-height: 44px; padding: 0 14px; }
.cards, .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 20px;
  border: 1px solid rgba(255,255,255,0.4); box-shadow: 0 10px 30px rgba(12,26,58,0.06);
}
.plan-card { display: flex; flex-direction: column; gap: 8px; position: relative; transition: box-shadow 180ms ease; }
.plan-card:hover { box-shadow: 0 14px 34px rgba(12,26,58,0.1); }
.price { font-size: 1.6rem; font-weight: 700; color: var(--heading); margin: 8px 0; }
.price span { font-size: 0.9rem; color: var(--slate); font-weight: 500; }
.meta { color: var(--slate); }
.narrow { max-width: 440px; }
.form-card label { display: block; margin: 0 0 14px; font-weight: 600; }
input, select, textarea {
  width: 100%; margin-top: 6px; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; background: var(--input); color: var(--ink);
}
.pw-field {
  position: relative;
  display: block;
}
.pw-field input {
  padding-right: 48px;
}
.pw-eye {
  position: absolute;
  right: 2px;
  top: calc(6px + 50%);
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--slate);
  cursor: pointer;
}
.pw-eye svg { width: 20px; height: 20px; display: block; }
.pw-eye:hover { color: var(--heading); }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus, .nav a:focus, .linkish:focus { outline: 3px solid #93c5fd; outline-offset: 2px; }
.notice { padding: 12px 14px; border-radius: 10px; }
.notice.ok { background: #ecfdf5; color: var(--ok); }
.notice.bad { background: #fef3f2; color: var(--bad); }
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); }
.card + .table-wrap { margin-top: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { font-size: 13px; color: var(--slate); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #e2e8f0; }
.pill.paid, .pill.active, .pill.payment { background: #d1fae5; color: #065f46; }
.pill.sent, .pill.past_due, .pill.credit { background: #fef3c7; color: #92400e; }
.pill.overdue, .pill.void, .pill.refunded, .pill.suspended, .pill.refund { background: #fee2e2; color: #991b1b; }
.pill.cancelled { background: #e2e8f0; color: #334155; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.facts .span-2 { grid-column: 1 / -1; }
.facts dt { color: var(--slate); font-size: 12px; }
.facts dd { margin: 0; font-weight: 600; }
.total { font-size: 1.3rem; font-weight: 700; color: var(--heading); }
.invoice-desk { display: grid; gap: 12px; }
.invoice-doc {
  padding: 20px 20px 16px;
  border-left: 4px solid var(--navy);
}
.invoice-mast {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 24px;
  margin: 0 0 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.invoice-brand {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--navy);
}
.invoice-mast .meta { margin: 2px 0 0; }
.invoice-balance {
  margin: 0;
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--slate);
  font-size: 12px;
  font-weight: 700;
}
.invoice-balance strong {
  font-size: 1.7rem;
  line-height: 1.1;
  color: var(--navy);
}
.invoice-balance .meta { font-weight: 500; }
.invoice-doc .facts { margin: 0 0 16px; }
.invoice-doc .facts dd { display: grid; gap: 2px; }
.invoice-doc .facts .meta { font-weight: 500; }
.invoice-parties { grid-template-columns: 1fr; }
.invoice-sheet-head {
  display: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--slate);
  padding: 0 0 8px;
  border-bottom: 1px solid var(--navy);
}
.invoice-lines { margin-top: 4px; }
.invoice-line {
  display: grid;
  gap: 12px;
  padding: 12px 0 4px;
  border-top: 1px solid var(--line);
}
.invoice-line:first-of-type { border-top: 0; padding-top: 0; }
.invoice-foot {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.invoice-foot textarea { min-height: 88px; }
.invoice-sheet { margin: 4px 0 0; }
.invoice-notes { margin: 12px 0 0; }
.invoice-totals {
  display: grid;
  justify-items: end;
  gap: 6px;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--slate);
  font-weight: 600;
}
.invoice-totals strong { color: var(--heading); font-size: 1.15rem; }
.invoice-doc .compose-actions { margin-top: 12px; }
.invoice-ops {
  display: grid;
  gap: 8px;
  align-content: start;
}
.invoice-ops form { margin: 0; }
.invoice-add {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--wash);
}
.invoice-add label { margin: 0; font-weight: 600; }
@media (min-width: 560px) {
  .invoice-parties { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); }
  .invoice-sheet-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px;
    gap: 12px;
  }
  .invoice-line {
    grid-template-columns: minmax(0, 1fr) 140px;
    align-items: end;
  }
  .invoice-line .check-row { grid-column: 1 / -1; }
  .invoice-line > label:not(.check-row) { font-size: 0; color: transparent; }
  .invoice-line input { font-size: 16px; color: var(--ink); }
  .invoice-foot { grid-template-columns: 180px minmax(0, 1fr); align-items: start; }
}
@media (min-width: 900px) {
  .invoice-desk {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    align-items: start;
  }
  .invoice-ops { position: sticky; top: calc(var(--header-height) + 8px); }
}
@media (max-width: 640px) {
  .invoice-doc { padding: 14px; }
  .invoice-balance,
  .invoice-balance strong { justify-items: start; text-align: left; }
  .invoice-ops .btn,
  .invoice-ops form,
  .invoice-doc .compose-actions .btn { width: 100%; }
}
.pay-box { display: grid; gap: 16px; margin-top: 16px; }
.inline { display: inline; }
.search { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 10px; align-items: flex-end; }
.search input { min-width: min(100%, 240px); }
.search .btn { min-height: 44px; }
.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}
.sort-link:hover,
.sort-link:focus-visible { color: var(--bar); }
.sort-link.is-on { color: var(--heading); }
.sort-link::after {
  content: "↕";
  font-size: 10px;
  opacity: 0.45;
}
.sort-link.is-asc::after { content: "▲"; opacity: 1; }
.sort-link.is-desc::after { content: "▼"; opacity: 1; }
th[data-sort] { white-space: nowrap; }
.search-advanced {
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--wash);
}
.search-advanced[hidden] { display: none; }
.search-advanced label { display: grid; gap: 6px; font-weight: 600; }
.search-advanced select,
.search-advanced input {
  font-size: 16px;
  min-height: 44px;
  width: 100%;
}
.search-advanced .compose-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stat { font-size: 2rem; font-weight: 700; color: var(--heading); margin: 0; }
.sr { font-weight: 600; flex: 1; }
.foot { padding: 24px 0; color: var(--slate); font-size: 14px; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.section { padding: 28px 0 8px; }
.hero-band {
  position: relative;
  overflow: hidden;
  background: radial-gradient(900px 400px at 80% 0%, #3b1d6b 0%, transparent 50%),
    linear-gradient(160deg, #0c1a3a 0%, #10245c 55%, #1a0b2e 100%);
  color: #f8fafc;
  padding: 36px 0 48px;
}
.hero-photo { position: absolute; inset: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; display: block; }
.hero-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(12,26,58,0.92) 0%, rgba(12,26,58,0.78) 48%, rgba(16,36,92,0.55) 100%);
}
.hero-grid { position: relative; z-index: 1; display: grid; gap: 24px; align-items: center; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.2fr 0.8fr; } }
.hero-band h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.03em; }
.hero-band .lead { color: #dbe4f5; }
.hero-band .kicker { color: #93c5fd; }
.hero-mark { text-align: center; padding: 28px 24px; border-radius: var(--radius); }
.hero-mark img { width: min(220px, 70%); max-width: 220px; max-height: 220px; height: auto; margin: 0 auto; object-fit: contain; background: transparent; }
.hero-mark .meta { color: #dbe4f5; }
.glass { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.22); backdrop-filter: blur(16px); }
.plan-card .btn { margin-top: auto; }
.plan-card.featured { outline: 2px solid var(--bar); }
.badge { position: absolute; top: 12px; right: 12px; background: var(--bar); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 4px 10px; }
.toggle { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; max-width: 360px; }
.toggle .btn { flex: 1 1 140px; min-height: 44px; font-weight: 700; }
.toggle .btn-ghost,
.skin-site .toggle .btn-ghost,
.skin-site .toggle button.btn-ghost {
  background: #fff;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.toggle .btn-ghost:hover,
.skin-site .toggle .btn-ghost:hover,
.skin-site .toggle button.btn-ghost:hover {
  background: #e8eef8;
}
.toggle .btn.is-on {
  background: var(--cta);
  color: #fff;
  border: 2px solid var(--cta);
}
.is-hidden { display: none !important; }
.center { text-align: center; }
.how-grid { display: grid; gap: 20px; }
@media (min-width: 860px) {
  .how-grid { grid-template-columns: 1fr minmax(260px, 340px); align-items: stretch; }
  .how-grid .cards { grid-template-columns: 1fr; }
}
.how-photo { margin: 0; border-radius: var(--radius); overflow: hidden; min-height: 200px; background: #0c1a3a; }
.how-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cta-closer {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  margin: 40px 0 0;
  color: #f8fafc;
}
.cta-closer-photo { position: absolute; inset: 0; }
.cta-closer-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; display: block; }
.cta-closer-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(12,26,58,0.90) 0%, rgba(12,26,58,0.72) 46%, rgba(12,26,58,0.42) 100%);
}
.cta-closer .wrap { position: relative; z-index: 1; }
.cta-closer-copy { max-width: 32rem; padding: 64px 0; text-align: left; }
.cta-closer h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}
.cta-closer p { color: #dbe4f5; margin: 0; }
.wrap-notice { width: min(1100px, calc(100% - 32px)); margin: 16px auto 0; }
.plain { padding-left: 1.1rem; }
.skin-site .top { background: rgba(12,26,58,0.72); border-bottom-color: rgba(255,255,255,0.12); }
.skin-site .brand { color: #f8fafc; }
.skin-site .nav a, .skin-site .linkish { color: #e8eef8; }
.skin-site .top .btn-ghost,
.skin-site .hero-band .btn-ghost,
.skin-site .cta-closer .btn-ghost,
.skin-site .top button.btn-ghost,
.skin-site .hero-band button.btn-ghost,
.skin-site .cta-closer button.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}
.skin-site .top .btn-ghost:hover,
.skin-site .hero-band .btn-ghost:hover,
.skin-site .cta-closer .btn-ghost:hover,
.skin-site .top button.btn-ghost:hover,
.skin-site .hero-band button.btn-ghost:hover,
.skin-site .cta-closer button.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
}
.skin-site .foot { background: #0c1a3a; color: #cbd5e1; }
.skin-site .foot a { color: #93c5fd; }
.page-head {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 12px 20px; margin: 0 0 24px;
}
.page-head h1 { margin: 0 0 8px; }
.page-head .lead { margin: 0; max-width: 36rem; }
.count-pill {
  margin: 0; min-height: 44px; display: inline-flex; align-items: center;
  padding: 0 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  color: var(--heading); font-weight: 700; font-size: 14px;
}
.catalog-page { display: grid; gap: 24px; }
.catalog-cycle { grid-column: 1 / -1; margin: 0; }
.catalog-cycle > .meta { margin: 0 0 10px; }
.catalog-group h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--heading);
}
.catalog-page:has(.catalog-cycle) { row-gap: 12px; }
@media (min-width: 800px) {
  .catalog-page { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); align-items: start; }
  .catalog-list { grid-column: 1; }
  .product-compose { grid-column: 2; position: sticky; top: 88px; }
}
.catalog-group { margin: 0 0 22px; }
.product-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(7.5rem, 0.7fr) minmax(5.5rem, 0.45fr) auto;
  gap: 10px 16px; align-items: center; padding: 14px 16px; margin: 0 0 10px;
  transition: box-shadow 180ms ease;
}
.product-row:hover { box-shadow: 0 14px 34px rgba(12,26,58,0.1); }
.product-row h3 { margin: 0; font-size: 1.05rem; }
.product-row .price { margin: 0; font-size: 1.15rem; }
.product-row.is-quiet { opacity: 0.72; }
.product-row.is-editing { outline: 2px solid var(--bar); }
.compose-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.client-card-actions {
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
}
.client-card-actions .btn-danger { margin-left: auto; }
.client-delete-form { margin: 10px 0 0; }
.confirm-dialog {
  width: min(420px, calc(100% - 32px));
  max-width: 100%;
  margin: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 18px 40px rgba(12, 26, 58, 0.18);
}
.confirm-dialog::backdrop { background: rgba(12, 26, 58, 0.45); }
.confirm-dialog h2 {
  margin: 0 0 8px;
  color: var(--heading);
  font-size: 1.15rem;
}
.confirm-dialog p { margin: 0 0 16px; color: var(--slate); }
.confirm-dialog .compose-actions { justify-content: flex-end; }
.confirm-dialog .btn,
.confirm-dialog button.btn { min-height: 44px; }
@media (max-width: 640px) {
  .confirm-dialog { width: calc(100% - 24px); padding: 16px; }
  .confirm-dialog .compose-actions { flex-direction: column-reverse; }
  .confirm-dialog .compose-actions .btn { width: 100%; }
}
.product-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.compose-grid { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 400px) {
  .compose-grid { grid-template-columns: 1fr 1fr; }
  .compose-grid .span-2 { grid-column: 1 / -1; }
}
.compose-grid label { margin: 0; }
.compose-grid .form-block-title {
  margin: 8px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading);
}
@media (min-width: 400px) {
  .compose-grid .form-block-title { grid-column: 1 / -1; }
}
.mail-body {
  min-height: 280px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.45;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.check-row input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
  margin: 0;
}
.pill.open, .pill.answered { background: #dbeafe; color: #1e3a8a; }
.pill.pending { background: #fef3c7; color: #92400e; }
.pill.onhold { background: #ede9fe; color: #5b21b6; }
.pill.closed { background: #e2e8f0; }
@media (min-width: 768px) {
  .nav-toggle { display: none; }
}
@media (max-width: 767px) {
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; }
  .nav.is-open { display: flex; }
  table, thead, tbody, th, td, tr { display: block; width: 100%; }
  thead { display: none; }
  tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  td { border: 0; padding: 6px 0; }
  td::before { content: attr(data-label); display: block; color: var(--slate); font-size: 12px; font-weight: 600; }
  .hero h1 { font-size: 1.7rem; }
  .cta-closer { min-height: 0; }
  .cta-closer-copy { padding: 40px 0; }
  .cta-closer-photo::after {
    background: linear-gradient(180deg, rgba(12,26,58,0.88) 0%, rgba(12,26,58,0.75) 100%);
  }
  .product-row { grid-template-columns: 1fr 1fr; }
  .product-row .span-name { grid-column: 1 / -1; }
  .product-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .auth-stage { padding: 12px 0 24px; align-items: stretch; }
  .auth-stage .narrow { width: 100%; }
}
.guide-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
}
.guide-toc a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.28);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.guide-toc a:hover { background: rgba(255,255,255,0.18); }
.cta-closer.is-guides .cta-closer-photo::after {
  background: linear-gradient(90deg, rgba(12,26,58,0.78) 0%, rgba(12,26,58,0.48) 52%, rgba(12,26,58,0.22) 100%);
}
.hero-band.is-guides { min-height: 420px; }
.hero-band.is-guides .hero-photo::after {
  background: linear-gradient(105deg, rgba(12,26,58,0.78) 0%, rgba(12,26,58,0.48) 46%, rgba(12,26,58,0.22) 100%);
}
.hero-code { text-align: left; padding: 28px 24px; }
.hero-code .kicker { margin-bottom: 4px; }
.hero-code .code-xl {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.06em;
  margin: 8px 0 12px;
}
.hero-code .meta { color: #dbe4f5; margin: 0 0 16px; }
.guide-jumps {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .guide-jumps { grid-template-columns: repeat(3, 1fr); }
}
.guide-jump {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
  transition: box-shadow 180ms ease, transform 180ms ease;
}
.guide-jump:hover { box-shadow: 0 14px 34px rgba(12,26,58,0.12); }
.guide-jump img {
  width: 100%;
  height: 168px;
  object-fit: cover;
  display: block;
}
.guide-jump .jump-body { padding: 16px 18px 18px; }
.guide-jump h3 { margin: 0 0 6px; color: var(--heading); }
.guide-jump p { margin: 0; color: var(--slate); }
.guide-split {
  display: grid;
  gap: 24px;
  align-items: start;
  margin: 8px 0 8px;
}
@media (min-width: 860px) {
  .guide-split { grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.15fr); }
}
.guide-photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 200px;
  background: #0c1a3a;
}
.guide-photo img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
}
.guide-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  counter-reset: gs;
}
.guide-steps > li {
  counter-increment: gs;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 18px;
}
.guide-steps > li::before {
  content: counter(gs);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.guide-steps strong { display: block; color: var(--heading); margin: 6px 0 6px; }
.guide-steps p { margin: 0 0 10px; }
.code-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 1.15rem;
  margin: 0 0 12px;
}
.note-card, .warn-card {
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 12px;
}
.note-card { background: var(--wash); }
.note-card p, .warn-card p { margin: 0; }
.warn-card { background: #fef3f2; color: #7a1f1a; }
#fire-tv, #android, #phone, #device-id { scroll-margin-top: 88px; }
@media (max-width: 640px) {
  .guide-jump img { height: 148px; }
  .guide-photo img { min-height: 180px; }
  .hero-code { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
html:has(body.skin-admin) {
  height: 100dvh;
  overflow: hidden;
}
body.skin-admin {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  font-size: 14px;
}
body.skin-admin .admin-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
.sidecar {
  background: var(--navy);
  color: #e8eef8;
  padding: 16px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.06);
}
.sidecar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 8px;
  text-decoration: none;
  color: #f8fafc;
  border-radius: 10px;
}
.sidecar-brand:hover { background: rgba(255,255,255,0.06); }
.sidecar-logo {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: transparent;
}
.sidecar-name {
  display: block;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.sidecar-kicker {
  display: block;
  margin: 2px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 700;
  color: #93c5fd;
}
.sidecar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidecar-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 10px;
  border-radius: 8px;
  color: #e8eef8;
  text-decoration: none;
  font-weight: 600;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease;
}
.sidecar-nav a:hover { background: rgba(255,255,255,0.06); }
.sidecar-nav a.is-on {
  background: rgba(47, 111, 214, 0.22);
  border-left-color: var(--bar);
  color: #fff;
}
.sidecar-group {
  display: block;
}
.sidecar-group > * + * {
  margin-top: 2px;
}
.sidecar-label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 10px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #93c5fd;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  list-style: none;
  cursor: pointer;
}
.sidecar-label::-webkit-details-marker { display: none; }
.sidecar-label::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: auto;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  opacity: 0.75;
  transition: transform 160ms ease;
}
.sidecar-group:not([open]) .sidecar-label::after {
  transform: rotate(-90deg);
}
.sidecar-label:hover { background: rgba(255,255,255,0.06); }
.sidecar-group > a {
  padding-left: 38px;
}
.sidecar-sub {
  display: block;
}
.sidecar-sub > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px 0 38px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e8eef8;
  font: inherit;
  font-weight: 600;
  text-align: left;
  list-style: none;
  cursor: pointer;
}
.sidecar-sub > summary::-webkit-details-marker { display: none; }
.sidecar-sub > summary::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: auto;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  opacity: 0.75;
}
.sidecar-sub:not([open]) > summary::after {
  transform: rotate(-90deg);
}
.sidecar-sub > summary:hover { background: rgba(255,255,255,0.06); }
.sidecar-sub > a {
  padding-left: 54px;
}
.sidecar-sub .sidecar-sub > summary {
  padding-left: 54px;
}
.sidecar-sub .sidecar-sub > a {
  padding-left: 70px;
}
.mail-form [data-mail-custom],
.mail-form [data-mail-ses] {
  display: none;
}
.mail-form.is-custom [data-mail-custom],
.mail-form.is-ses [data-mail-ses] {
  display: grid;
}
.product-compose.is-page {
  max-width: 36rem;
}
.rail-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  opacity: 0.9;
}
.sidecar-meta {
  margin: auto 8px 0;
  font-size: 12px;
  color: #93c5fd;
}
.sidecar-mask {
  display: none;
  position: fixed;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(12, 26, 58, 0.46);
  z-index: var(--z-overlay);
  cursor: pointer;
}
.admin-stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  height: 100%;
  overflow: auto;
  background: var(--bg);
}
.stage-top {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  min-height: var(--header-height);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 0 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.stage-title {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--heading);
  line-height: 1.2;
}
.stage-count {
  margin: 0;
  color: var(--slate);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.stage-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-left: auto;
}
.stage-actions a,
.stage-actions .linkish {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--heading);
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  background: none;
  border: 0;
  cursor: pointer;
}
.stage-actions a:hover,
.stage-actions .linkish:hover { color: var(--cta); }
.admin-main {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap);
}
.skin-admin .page-head { margin: 0 0 4px; }
.skin-admin .page-head h1,
.skin-admin .admin-main > h1:first-of-type { display: none; }
.skin-admin .page-head .lead { max-width: 70ch; font-size: 14px; }
.skin-admin .card {
  padding: var(--card-padding) 14px;
  border-radius: 10px;
  box-shadow: none;
  border: 1px solid var(--line);
}
.skin-admin .stats { gap: var(--grid-gap); }
.skin-admin .stat { font-size: 1.45rem; }
.skin-admin .table-wrap { border-radius: 10px; }
.skin-admin th,
.skin-admin td { padding: 10px 12px; }
.skin-admin tbody tr { transition: background 160ms ease; }
.skin-admin tbody tr:hover { background: var(--wash); }
.kpi-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
}
.kpi {
  grid-column: span 3;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: var(--card-padding) 14px;
}
.kpi-row > .kpi:first-child:nth-last-child(3),
.kpi-row > .kpi:first-child:nth-last-child(3) ~ .kpi { grid-column: span 4; }
.kpi .kicker { margin: 0 0 4px; letter-spacing: 0.06em; overflow-wrap: break-word; }
.kpi .stat { margin: 0; }
.dash-desk { display: grid; gap: 16px; }
.dash-kpis > .kpi { grid-column: span 2; }
.dash-kpis a.kpi {
  display: block;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  border-left: 4px solid var(--navy);
}
.dash-kpis a.kpi:hover,
.dash-kpis a.kpi:focus-visible { border-left-color: var(--bar); }
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--grid-gap);
}
@media (min-width: 900px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dash-wide { grid-column: 1 / -1; }
}
.dash-panel { padding: 14px 16px; }
.dash-panel h2 { margin: 0 0 12px; font-size: 1rem; }
.dash-facts { display: grid; gap: 8px; margin: 0; }
.dash-facts > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 12px;
  min-height: 32px;
}
.dash-facts dt { margin: 0; color: var(--slate); }
.dash-facts dd { margin: 0; font-weight: 700; }
.dash-activity {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.dash-activity li { min-height: 44px; }
.dash-activity p { margin: 0; }
.dash-activity .muted { color: var(--slate); font-size: 0.9rem; }
@media (max-width: 640px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-wide { grid-column: auto; }
  .dash-kpis > .kpi { grid-column: span 6; }
}
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--grid-gap);
}
.report-card {
  display: block;
  min-height: 44px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}
.report-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
}
.report-card p {
  margin: 0;
  color: var(--slate);
  font-size: 14px;
}
.report-card:hover { border-color: var(--bar); }
.catalog-page.is-list { grid-template-columns: minmax(0, 1fr); }
.cycle-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.catalog-cycle.cycle-filter { margin: 0; }
.cycle-filter .btn {
  min-height: 44px;
  min-width: 44px;
}
.cycle-filter + select { width: 100%; }
[data-cycle-item][hidden],
.catalog-group[hidden] {
  display: none;
}
.bulk-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 12px;
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--wash);
}
.bulk-bar-foot { margin: 16px 0 0; }
.bulk-title {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--slate);
}
.bulk-bar .compose-actions { grid-column: 1 / -1; }
.txn-bulk { margin: 12px 0 0; padding: 10px 12px; }
.client-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.client-head,
.client-line {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
  padding: 0 16px;
}
.client-cols,
.client-card > .client-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr) minmax(0, 1.1fr) minmax(0, 0.7fr) 110px 72px 80px 20px;
  column-gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 52px;
  padding: 0 14px;
}
.client-line > .client-pick,
.client-head > .client-pick {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 52px;
  margin: 0;
}
.client-head,
.client-line {
  border: 1px solid var(--line);
  border-radius: 10px;
}
.client-head {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--slate);
  background: var(--wash);
}
.client-line { background: var(--card); }
.client-card,
.skin-admin .client-card {
  display: block;
  min-width: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.client-card.is-quiet { opacity: 0.72; }
.client-card > .client-summary {
  cursor: pointer;
  list-style: none;
}
.client-card > .client-summary::-webkit-details-marker { display: none; }
.client-card > .client-summary::marker { content: ""; }
.client-chevron-slot { width: 20px; }
.client-name {
  min-width: 0;
  font-weight: 700;
  color: var(--heading);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.client-cell {
  min-width: 0;
  color: var(--slate);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.client-credit {
  font-weight: 600;
  color: var(--heading);
}
.client-pick { margin: 0; }
.client-status {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  justify-self: start;
}
.client-card > .client-summary .client-status { justify-self: start; }
.client-card > .client-summary::after {
  content: "";
  width: 8px;
  height: 8px;
  justify-self: end;
  border-right: 2px solid var(--slate);
  border-bottom: 2px solid var(--slate);
  transform: rotate(45deg);
}
.client-line:has(> .client-card[open]) {
  border: 2px solid var(--bar);
}
.client-card[open] {
  outline: none;
  border: 0;
}
.client-card[open] > .client-summary::after { transform: rotate(-135deg); }
.client-profile {
  padding: 4px 14px 18px;
  border-top: 1px solid var(--line);
}
.client-profile .facts { margin: 14px 0 8px; }
.toggle.client-tabs,
.client-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 14px 0 8px;
  max-width: none;
  overflow-x: auto;
}
.toggle.client-tabs .btn,
.client-tabs .btn {
  flex: 1 0 auto;
  min-width: max-content;
  width: auto;
  min-height: 44px;
  padding-left: 8px;
  padding-right: 8px;
  font-size: 13px;
  white-space: nowrap;
}
.client-pane { margin-top: 8px; }
.client-pane .table-wrap { margin-top: 12px; }
.sub-add { margin-bottom: 12px; }
.sub-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 12px;
  background: var(--wash);
}
.sub-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}
.sub-head h3 {
  margin: 0;
  font-size: 16px;
}
.sub-card .facts { margin: 0; }
@media (max-width: 640px) {
  .client-head .client-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    min-height: 0;
    padding: 8px 0;
  }
  .client-head .sort-link {
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
  }
  .client-head .client-chevron-slot { display: none; }
  .client-card > .client-summary {
    grid-template-columns: minmax(0, 1fr) auto 20px;
    grid-template-areas:
      "name status chev"
      "email email email"
      "plan credit credit";
    row-gap: 2px;
    column-gap: 8px;
    align-items: center;
    padding: 12px 14px;
    min-height: 0;
  }
  .client-name { grid-area: name; }
  .client-email { grid-area: email; font-size: 13px; }
  .client-plan { grid-area: plan; }
  .client-credit { grid-area: credit; justify-self: end; }
  .client-phone,
  .client-expires { display: none; }
  .client-card > .client-summary .client-status {
    grid-area: status;
    justify-self: end;
  }
  .client-name::before,
  .client-cell::before,
  .client-card > .client-summary .pill::before {
    content: none;
    display: none;
  }
  .client-card > .client-summary::after {
    grid-area: chev;
  }
}
.mail-table .group-row td {
  padding-top: 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  background: var(--wash);
}
.mail-table .is-quiet { opacity: 0.7; }
.mail-table .row-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-end;
}
.skin-admin .mail-table .btn,
.skin-admin .mail-table button.btn {
  min-height: 36px;
  padding: 0 10px;
  font-size: 13px;
}
.editor-page { display: grid; gap: var(--grid-gap); }
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  position: sticky;
  top: var(--header-height);
  z-index: 10;
  padding: 8px 0;
  background: var(--bg);
}
.editor-work .meta { margin: 0 0 8px; }
.crumb {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--slate);
}
.crumb a { color: var(--cta); text-decoration: none; font-weight: 600; }
.merge-group { margin: 0 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.merge-group summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 700;
  color: var(--heading);
}
.merge-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 10px 10px;
}
.merge-chip {
  min-height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--wash);
  color: var(--heading);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background 160ms ease;
}
.merge-chip:hover { background: #e8eef8; }
.mail-preview {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}
@media (min-width: 900px) {
  body.skin-admin .admin-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    align-items: stretch;
  }
  .sidecar {
    position: sticky;
    top: 0;
    align-self: stretch;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: auto;
    padding: 18px 12px 24px;
  }
  .admin-stage {
    height: 100dvh;
    max-height: 100dvh;
  }
  .sidecar-mask { display: none !important; }
  .skin-admin .nav-toggle { display: none; }
  .editor-page { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); align-items: start; }
  .editor-toolbar { grid-column: 1 / -1; }
  .editor-side { position: sticky; top: calc(var(--header-height) + 8px); display: grid; gap: 12px; }
}
@media (max-width: 899px) {
  .skin-admin .nav-toggle { display: inline-flex; }
  .sidecar {
    display: none;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(var(--sidebar-width), 86vw);
    z-index: calc(var(--z-overlay) + 1);
    min-height: 100dvh;
    overflow: auto;
  }
  .sidecar.is-open { display: flex; }
  .admin-shell.is-nav-open .sidecar-mask { display: block; }
  .kpi { grid-column: span 6; }
}
@media (max-width: 767px) {
  .skin-admin .stage-top { padding: 8px 12px; }
  .kpi,
  .kpi-row > .kpi:first-child:nth-last-child(3),
  .kpi-row > .kpi:first-child:nth-last-child(3) ~ .kpi,
  .kpi-row > .kpi:first-child:nth-last-child(4),
  .kpi-row > .kpi:first-child:nth-last-child(4) ~ .kpi {
    grid-column: span 6;
  }
  .mail-table .row-actions { justify-content: flex-start; }
  .mail-table .group-row td::before { content: none; }
}
.wizard-steps {
  display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 20px; padding: 0;
}
.wizard-steps li {
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  color: var(--slate); font-weight: 700; font-size: 14px;
}
.wizard-steps li.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }
.wizard-services .service-pick {
  display: grid; gap: 20px;
}
@media (min-width: 860px) {
  .wizard-services .service-pick { grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); align-items: start; }
  .wizard-services .catalog-cycle { grid-column: 1 / -1; }
  .invoice-preview { position: sticky; top: 88px; }
}
.service-card {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px 12px;
  align-items: center; margin: 0 0 10px; padding: 14px 16px;
  background: var(--card); border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.4); box-shadow: 0 10px 30px rgba(12,26,58,0.06);
  font-weight: 600; cursor: pointer;
}
.service-card.is-none { grid-template-columns: 22px minmax(0, 1fr); }
.service-card.is-on { outline: 2px solid var(--bar); }
.service-card input { width: 22px; min-height: 22px; margin: 0; }
.service-card .price { margin: 0; font-size: 1.05rem; text-align: right; }
.service-card strong { display: block; }
.service-card .meta { display: block; font-weight: 500; }
.invoice-preview-line { display: grid; gap: 12px; margin: 16px 0; }
.invoice-preview-line div { display: grid; gap: 4px; }
.invoice-preview-line dt { color: var(--slate); font-size: 12px; font-weight: 600; }
.invoice-preview-line dd { margin: 0; font-weight: 700; color: var(--heading); overflow-wrap: break-word; }
@media (max-width: 640px) {
  .service-card { grid-template-columns: 22px minmax(0, 1fr); }
  .service-card .price { grid-column: 2; text-align: left; }
  .cycle-filter { margin-bottom: 10px; }
  .toggle { max-width: none; }
  .toggle .btn { flex: 1 1 calc(50% - 4px); }
  .toggle.client-tabs { max-width: none; flex-wrap: nowrap; }
  .toggle.client-tabs .btn { flex: 1 0 auto; min-width: max-content; }
}
.device-field,
.sub-change { margin: 12px 0; }
.device-field .meta { display: block; margin-top: 6px; }
.stepper {
  display: flex;
  align-items: stretch;
  max-width: 160px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--input);
}
.stepper input[type="number"] {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  font-size: 16px;
  text-align: center;
  -moz-appearance: textfield;
}
.stepper input[type="number"]::-webkit-outer-spin-button,
.stepper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.stepper-btns {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  flex: 0 0 44px;
}
.stepper-btns button {
  flex: 1;
  min-height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--wash);
  color: var(--heading);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.stepper-btns button + button { border-top: 1px solid var(--line); }
.stepper-btns button:hover { background: #dbe7fb; }
.sub-change { margin-top: 12px; }
@media (display-mode: standalone) {
  body {
    min-height: 100dvh;
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
  }
  .skin-admin .stage-top {
    padding-top: max(8px, env(safe-area-inset-top));
  }
}
.settings-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.settings-jump a {
  min-height: 44px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  text-decoration: none;
}
.settings-jump a[aria-current="page"] {
  background: #d7e4ff;
  color: var(--navy);
}
.settings-stack { display: grid; gap: 16px; }
.setting-card { font-size: 16px; }
.setting-card h2 { margin: 0 0 8px; }
.twofa-option .twofa-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.twofa-option .twofa-head h2 { margin: 0; }
.twofa-option .btn { min-height: 44px; }
.twofa-steps {
  margin: 0 0 16px;
  padding-left: 1.2em;
  display: grid;
  gap: 8px;
}
.twofa-steps li { min-height: 28px; }
.qr-figure {
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
  justify-items: start;
}
.qr-figure img {
  width: 220px;
  height: 220px;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.swift-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 16px;
}
.swift-actions .btn { min-height: 44px; }
@media (max-width: 640px) {
  .qr-figure img { width: min(100%, 280px); height: auto; aspect-ratio: 1; }
}
.setting-form { display: grid; gap: 14px; }
.setting-form h2 { margin-top: 8px; }
.setting-card .compose-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}
.setting-card .compose-actions .btn,
.setting-card .compose-actions button.btn {
  font-size: 16px;
}
.setting-form + .compose-actions { margin-top: 16px; }
.form-card form .btn { margin-top: 4px; }
.form-card > .meta { margin-top: 16px; }
.choice-set {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 8px;
}
.choice-set legend { padding: 0 6px; font-weight: 700; color: var(--heading); }
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  font-weight: 600;
}
.choice input { width: 22px; min-height: 22px; margin: 0; }
.passkey-row { margin: 16px 0 0; }
#passkey-status:empty { display: none; }
@media (max-width: 640px) {
  .settings-jump a { flex: 1 1 auto; justify-content: center; }
  .settings-stack { gap: 12px; }
  .choice-set { padding: 10px 12px; }
  .twofa-option .btn,
  .twofa-option .btn-ghost { width: 100%; }
  .setting-card .compose-actions { flex-direction: column; }
  .setting-card .compose-actions .btn,
  .setting-card .compose-actions button.btn { width: 100%; }
  .form-card form .btn { width: 100%; }
}
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f1f5f9;
  --slate: #9fb0c8;
  --bg: #070d1c;
  --card: #121c36;
  --line: #2a3a5c;
  --heading: #e8eef8;
  --wash: #0d162c;
  --input: #0c1428;
}
html[data-theme="dark"] body {
  background: radial-gradient(1200px 500px at 10% -10%, #1a2a4a 0%, transparent 50%), var(--bg);
}
html[data-theme="dark"] .card {
  border-color: var(--line);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
html[data-theme="dark"] .top {
  background: rgba(7, 13, 28, 0.88);
  border-bottom-color: var(--line);
}
html[data-theme="dark"] .brand,
html[data-theme="dark"] .nav a,
html[data-theme="dark"] .linkish { color: var(--heading); }
html[data-theme="dark"] h2,
html[data-theme="dark"] h3 { color: var(--heading); }
html[data-theme="dark"] .notice.ok { background: #0f2f2c; }
html[data-theme="dark"] .notice.bad { background: #3a1614; }
html[data-theme="dark"] .pill { background: #1e2a44; color: var(--heading); }
html[data-theme="dark"] .pill.paid,
html[data-theme="dark"] .pill.active,
html[data-theme="dark"] .pill.payment { background: #134e4a; color: #99f6e4; }
html[data-theme="dark"] .pill.sent,
html[data-theme="dark"] .pill.past_due,
html[data-theme="dark"] .pill.credit,
html[data-theme="dark"] .pill.pending { background: #5b3b0a; color: #fde68a; }
html[data-theme="dark"] .pill.overdue,
html[data-theme="dark"] .pill.void,
html[data-theme="dark"] .pill.refunded,
html[data-theme="dark"] .pill.suspended,
html[data-theme="dark"] .pill.refund { background: #4a1515; color: #fecaca; }
html[data-theme="dark"] .merge-chip:hover,
html[data-theme="dark"] .stepper-btns button:hover { background: #1a2744; }
html[data-theme="dark"] .toggle .btn-ghost,
html[data-theme="dark"] .skin-site .toggle .btn-ghost,
html[data-theme="dark"] .skin-site .toggle button.btn-ghost {
  background: var(--input);
  color: var(--heading);
  border-color: var(--line);
}
html[data-theme="dark"] .toggle .btn-ghost:hover,
html[data-theme="dark"] .skin-site .toggle .btn-ghost:hover,
html[data-theme="dark"] .skin-site .toggle button.btn-ghost:hover {
  background: var(--wash);
}
html[data-theme="dark"] .warn-card { background: #3a1614; color: #fecaca; }
html[data-theme="dark"] .pw-eye { color: var(--slate); }
html[data-theme="dark"] .pw-eye:hover { color: var(--heading); }
