:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --sidebar: #0e1115;
  --surface: #12161b;
  --surface-raised: #171c22;
  --surface-muted: #0f1317;
  --text: #f2f4f6;
  --text-secondary: #c0c7ce;
  --muted: #8e98a3;
  --subtle: #68727d;
  --line: #252c34;
  --line-strong: #35404a;
  --brand: #c9f36b;
  --brand-strong: #b5e34f;
  --brand-ink: #10150a;
  --success: #6fce92;
  --warning: #f0a35b;
  --danger: #f27676;
  --info: #7da7ea;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-overlay: 0 24px 72px rgba(0, 0, 0, .46);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --sidebar-width: 224px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, .button-link, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--text); }
h1 { margin-bottom: var(--space-3); font-size: clamp(28px, 3vw, 36px); line-height: 1.2; letter-spacing: -.035em; }
h2 { margin-bottom: var(--space-2); font-size: 24px; line-height: 1.25; letter-spacing: -.025em; }
h3 { margin-bottom: var(--space-2); font-size: 16px; line-height: 1.35; }
p { margin-bottom: 0; color: var(--muted); line-height: 1.65; }
.hidden { display: none !important; }
.desktop-only { display: inline-flex; }
.section-kicker {
  margin-bottom: var(--space-2);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}
.hint, .fine-print { color: var(--subtle); font-size: 12px; line-height: 1.6; }
.label-note { color: var(--subtle); font-weight: 500; }

/* Controls */
button, .button-link {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  background: transparent;
  color: var(--text);
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, opacity .16s ease;
}
button:disabled { cursor: not-allowed; opacity: .42; }
.primary { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.primary:hover:not(:disabled) { border-color: var(--brand-strong); background: var(--brand-strong); }
.secondary { border-color: var(--line-strong); background: var(--surface-raised); color: var(--text-secondary); }
.secondary:hover:not(:disabled) { border-color: #46525e; background: #1d242b; color: var(--text); }
.text-button { min-height: 36px; padding: 6px 8px; color: var(--muted); }
.text-button:hover { color: var(--text); background: var(--surface-raised); }
.danger { border-color: rgba(242, 118, 118, .34); background: rgba(242, 118, 118, .08); color: #ff9999; }
.danger:hover:not(:disabled) { border-color: rgba(242, 118, 118, .55); background: rgba(242, 118, 118, .13); }
.text-danger { border-color: transparent; background: transparent; }
.wide { display: flex; width: 100%; align-items: center; justify-content: center; }
.compact { min-height: 36px; padding: 7px 11px; font-size: 13px; }
.button-link { display: inline-flex; align-items: center; justify-content: center; }

label { display: grid; gap: 7px; margin-bottom: var(--space-4); color: var(--text-secondary); font-size: 13px; font-weight: 620; }
input, textarea, select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--surface-muted);
  color: var(--text);
  outline: none;
}
input::placeholder, textarea::placeholder { color: #5f6973; }
input:focus, textarea:focus, select:focus { border-color: #7f9848; box-shadow: 0 0 0 3px rgba(201, 243, 107, .08); }
textarea { min-height: 88px; resize: vertical; line-height: 1.55; }
select { appearance: auto; }
input[type="checkbox"], input[type="radio"] {
  width: 19px;
  min-height: 19px;
  height: 19px;
  padding: 0;
  accent-color: var(--brand);
}

/* Marketing site and authentication */
.brand-lockup { display: inline-flex; width: max-content; align-items: center; gap: var(--space-3); text-decoration: none; }
.brand-lockup img { width: 42px; height: 42px; border-radius: 11px; }
.brand-lockup span { display: grid; gap: 1px; }
.brand-lockup strong { font-size: 17px; letter-spacing: -.02em; }
.brand-lockup small { color: var(--subtle); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.landing-screen { min-height: 100vh; overflow: hidden; background: #0b0d10; }
.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-8);
  padding: 12px max(24px, calc((100vw - 1200px) / 2));
  border-bottom: 1px solid rgba(53, 64, 74, .66);
  background: rgba(11, 13, 16, .94);
  backdrop-filter: blur(14px);
}
.site-nav { display: flex; align-items: center; gap: var(--space-8); }
.site-nav a, .site-login-link { color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; }
.site-nav a:hover, .site-login-link:hover { color: var(--text); }
.site-header-actions { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-5); }
.site-header-actions .button-link { min-height: 38px; padding: 8px 16px; }

.landing-hero {
  width: min(1200px, calc(100% - 48px));
  min-height: min(760px, calc(100vh - 72px));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .72fr);
  align-items: center;
  gap: clamp(56px, 8vw, 120px);
  margin: 0 auto;
  padding: 72px 0 88px;
}
.landing-hero-copy { max-width: 680px; }
.landing-hero-copy h1 { margin-bottom: var(--space-6); font-size: clamp(44px, 5.4vw, 72px); line-height: 1.08; letter-spacing: -.055em; }
.hero-description { max-width: 620px; color: var(--text-secondary); font-size: 17px; line-height: 1.8; }
.hero-actions { display: flex; gap: var(--space-3); margin-top: var(--space-8); }
.hero-actions .button-link { min-height: 46px; padding: 12px 18px; }
.hero-primary { min-width: 150px; }
.hero-note { margin-top: var(--space-5); color: var(--subtle); font-size: 12px; }

.product-preview {
  position: relative;
  width: min(100%, 430px);
  justify-self: end;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  padding: 20px;
  background: #101419;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .34);
}
.product-preview::before {
  position: absolute;
  z-index: -1;
  inset: -70px -90px auto auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(201, 243, 107, .08);
  filter: blur(30px);
  content: "";
}
.preview-topbar, .preview-schedule { display: flex; align-items: center; justify-content: space-between; }
.preview-topbar > span:first-child { color: var(--text-secondary); font-size: 13px; font-weight: 700; }
.preview-live { color: var(--success); font-size: 11px; }
.preview-live::before { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; content: ""; }
.preview-progress { display: flex; align-items: center; justify-content: space-between; margin: 22px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.preview-progress div { display: grid; gap: 4px; }
.preview-progress small { color: var(--subtle); font-size: 11px; }
.preview-progress strong { font-size: 38px; line-height: 1; letter-spacing: -.05em; }
.preview-progress strong span { margin-left: 5px; color: var(--subtle); font-size: 15px; font-weight: 500; }
.progress-ring { width: 62px; height: 62px; display: grid; place-items: center; border: 6px solid rgba(201, 243, 107, .14); border-top-color: var(--brand); border-right-color: var(--brand); border-radius: 50%; color: var(--brand); font-size: 11px; font-weight: 800; transform: rotate(12deg); }
.preview-list { display: grid; }
.preview-list > div { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.preview-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #202830; color: var(--text-secondary); font-size: 12px; font-weight: 800; }
.preview-list p { display: grid; gap: 2px; }
.preview-list p strong { color: var(--text-secondary); font-size: 12px; }
.preview-list p small { color: var(--subtle); font-size: 10px; }
.preview-done, .preview-wait { font-size: 10px; font-weight: 700; }
.preview-done { color: var(--success); }
.preview-wait { color: var(--warning); }
.preview-schedule { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-muted); }
.preview-schedule span { color: var(--muted); font-size: 11px; }
.preview-schedule strong { color: var(--brand); font-size: 14px; }

.landing-proof {
  width: min(1200px, calc(100% - 48px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 auto;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.landing-proof > div { display: grid; gap: 5px; padding: 25px 24px; border-right: 1px solid var(--line); }
.landing-proof > div:last-child { border-right: 0; }
.landing-proof strong { color: var(--text-secondary); font-size: 17px; }
.landing-proof span { color: var(--subtle); font-size: 11px; }

.landing-section { width: min(1200px, calc(100% - 48px)); margin: 0 auto; padding: 120px 0; }
.landing-section-heading { max-width: 620px; margin-bottom: 52px; }
.landing-section-heading h2, .landing-final-cta h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.18; letter-spacing: -.04em; }
.landing-section-heading > p:last-child { font-size: 15px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-strong); }
.steps-grid article { min-height: 240px; padding: 26px 32px 32px 0; border-right: 1px solid var(--line); }
.steps-grid article + article { padding-left: 32px; }
.steps-grid article:last-child { border-right: 0; }
.steps-grid article > span { display: block; margin-bottom: 54px; color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.steps-grid h3 { font-size: 19px; }
.steps-grid p { max-width: 290px; font-size: 13px; }

.feature-section { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); gap: clamp(56px, 8vw, 120px); border-top: 1px solid var(--line); }
.compact-heading { margin-bottom: 0; }
.feature-list { border-top: 1px solid var(--line-strong); }
.feature-list article { display: grid; grid-template-columns: 40px 1fr; gap: 18px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.feature-index { color: var(--brand); font-size: 11px; font-weight: 800; }
.feature-list h3 { margin-bottom: 4px; font-size: 16px; }
.feature-list p { font-size: 13px; }

.plans-section { border-top: 1px solid var(--line); }
.plan-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.plan-cards article { display: flex; min-height: 370px; flex-direction: column; padding: 30px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: #0f1317; }
.plan-cards .recommended-plan { border-color: rgba(201, 243, 107, .4); background: rgba(201, 243, 107, .035); }
.plan-label { margin-bottom: 28px; color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.plan-cards h3 { font-size: 24px; }
.plan-cards ul { display: grid; gap: 11px; margin: 28px 0 32px; padding: 0; color: var(--text-secondary); font-size: 13px; list-style: none; }
.plan-cards li::before { margin-right: 9px; color: var(--brand); content: "✓"; }
.plan-cards .button-link, .plan-cards button { margin-top: auto; }

.landing-final-cta { width: min(1200px, calc(100% - 48px)); margin: 0 auto; padding: 112px 0; border-top: 1px solid var(--line-strong); text-align: center; }
.landing-final-cta h2 { margin: 0 auto 30px; }
.landing-final-cta .button-link { min-height: 48px; padding: 13px 22px; }
.landing-final-cta > p:last-child { margin-top: 18px; color: var(--subtle); font-size: 11px; }
.site-footer { width: min(1200px, calc(100% - 48px)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; margin: 0 auto; padding: 28px 0 40px; border-top: 1px solid var(--line); }
.site-footer .brand-lockup img { width: 34px; height: 34px; border-radius: 8px; }
.site-footer p, .site-footer > span { color: var(--subtle); font-size: 11px; }
.site-footer > span { justify-self: end; }

.auth-screen { min-height: 100vh; background: #0d1013; }
.auth-header { min-height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 12px max(24px, calc((100vw - 1120px) / 2)); border-bottom: 1px solid var(--line); }
.auth-header .brand-lockup { justify-self: center; }
.back-link { justify-self: start; border: 0; padding: 8px 0; color: var(--muted); font-size: 12px; }
.back-link:hover { color: var(--text); }
.auth-help { justify-self: end; color: var(--subtle); font-size: 11px; }
.auth-main { width: min(1040px, calc(100% - 48px)); min-height: calc(100vh - 72px); display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: center; gap: clamp(72px, 10vw, 140px); margin: 0 auto; padding: 64px 0; }
.auth-context { max-width: 510px; }
.auth-context h1 { margin-bottom: 32px; font-size: clamp(36px, 4.5vw, 54px); line-height: 1.13; letter-spacing: -.05em; }
.auth-context ul { display: grid; gap: 12px; margin: 0; padding: 24px 0 0; border-top: 1px solid var(--line-strong); color: var(--muted); font-size: 13px; list-style: none; }
.auth-context li::before { margin-right: 10px; color: var(--brand); content: "—"; }
.auth-panel { width: 100%; padding: 30px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); }
.form-heading { margin-bottom: 24px; }
.form-heading h2 { margin-bottom: 6px; font-size: 27px; }
.form-heading p { font-size: 13px; }
.auth-mode-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.auth-mode-tabs button { min-height: 42px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); }
.auth-mode-tabs button.active { border-bottom-color: var(--brand); color: var(--text); }
.identity-choice { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; color: var(--muted); font-size: 12px; }
.identity-choice > div { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-muted); }
.identity-choice button { min-height: 30px; padding: 5px 12px; color: var(--muted); font-size: 11px; }
.identity-choice button.active { background: var(--surface-raised); color: var(--text); }
.code-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); }
.code-input-row button { min-width: 116px; white-space: nowrap; }
.auth-submit { min-height: 46px; margin-top: 2px; }
.auth-otp-details { margin: -2px 0 16px; }
.auth-otp-details summary { width: max-content; margin-left: auto; color: var(--subtle); font-size: 11px; cursor: pointer; }
.auth-otp-details[open] summary { margin: 0 0 10px; color: var(--text-secondary); }
.auth-otp-details label { margin-bottom: 0; }
.auth-method-toggle { width: 100%; min-height: 36px; margin-top: 10px; padding: 6px; color: var(--muted); font-size: 12px; }
.auth-method-toggle:hover { color: var(--text); }
.fine-print { margin-top: var(--space-3); text-align: center; }
.auth-agreement { margin-top: 12px; color: var(--subtle); font-size: 10px; line-height: 1.55; text-align: center; }

/* Product shell */
.app-layout { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: var(--space-5) var(--space-4);
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}
.sidebar-brand { padding: 0 var(--space-2); }
.sidebar-nav { display: grid; gap: 3px; margin-top: var(--space-10); }
.sidebar-nav a, .sidebar-nav button {
  min-height: 42px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  text-align: left;
}
.sidebar-nav a:hover, .sidebar-nav button:hover { background: var(--surface-raised); color: var(--text); }
.sidebar-nav .active { background: rgba(201, 243, 107, .09); color: var(--brand); }
.sidebar-footer { margin-top: auto; display: grid; gap: var(--space-3); padding: var(--space-4) var(--space-2) 0; border-top: 1px solid var(--line); }
.plan-summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.plan-summary span { color: var(--subtle); font-size: 11px; }
.plan-summary strong { color: var(--text-secondary); font-size: 12px; text-transform: uppercase; }
.sidebar-footer .text-button { justify-self: start; margin-left: -8px; }
.workspace { min-width: 0; }
.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 13, 16, .96);
}
.topbar > div:first-child { display: flex; align-items: center; gap: var(--space-3); }
.topbar strong { font-size: 14px; }
.mobile-brand { display: none; }
.topbar-actions { display: flex; align-items: center; gap: var(--space-2); }
.notification-button { display: inline-flex; align-items: center; gap: 7px; color: var(--text-secondary); }
.notification-button:hover { background: var(--surface-raised); }
.count-badge {
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--warning);
  color: #1b1108;
  font-size: 10px;
  font-weight: 800;
}
.workspace-content { width: min(100%, 1280px); margin: 0 auto; padding: 0 clamp(24px, 4vw, 48px) 64px; }
.workspace-section { padding-top: clamp(40px, 6vw, 64px); }
.page-heading, .section-title, .settings-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
}
.page-heading { margin-bottom: var(--space-6); }
.page-heading h1 { margin-bottom: 6px; }
.page-heading > div > p:last-child, .section-title > div > p:last-child { font-size: 13px; }
.attention-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding: 13px 15px;
  border: 1px solid rgba(240, 163, 91, .34);
  border-radius: var(--radius-md);
  background: rgba(240, 163, 91, .07);
}
.attention-panel strong { color: #ffc38c; }
.attention-panel span { color: var(--text-secondary); font-size: 13px; }
.attention-panel > div { display: flex; align-items: center; gap: 6px; }
.attention-panel button { flex: 0 0 auto; }
.status-board { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(420px, 1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.today-card { display: flex; min-height: 170px; align-items: flex-end; justify-content: space-between; gap: var(--space-8); padding: clamp(24px, 4vw, 36px); border-right: 1px solid var(--line); }
.today-card > div:first-child { max-width: 430px; }
.status-label { display: block; margin-bottom: var(--space-3); color: var(--muted); font-size: 12px; }
.today-card > div > strong { display: block; margin-bottom: var(--space-2); font-size: 24px; }
.today-number { flex: 0 0 auto; text-align: right; }
.today-number strong { display: block; color: var(--brand); font-size: clamp(38px, 5vw, 56px); line-height: 1; }
.today-number span { color: var(--subtle); font-size: 11px; }
.overview-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.overview-grid article, .overview-grid > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-5);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.overview-grid article:nth-child(2n) { border-right: 0; }
.overview-grid article:nth-last-child(-n+2) { border-bottom: 0; }
.overview-grid span { color: var(--muted); font-size: 11px; }
.overview-grid strong { margin-top: var(--space-3); color: var(--text); font-size: 25px; font-weight: 680; }
.accounts-section { padding-top: 72px; }
.section-title { margin-bottom: var(--space-5); }
.section-title h2 { margin-bottom: 5px; }

/* Account list */
.account-list { border-top: 1px solid var(--line); }
.account-card {
  display: grid;
  grid-template-columns: minmax(230px, .9fr) minmax(360px, 1.35fr) auto;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-5) var(--space-2);
  border-bottom: 1px solid var(--line);
}
.account-main { min-width: 0; display: flex; align-items: center; gap: var(--space-3); }
.account-avatar, .contact-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
  color: var(--brand);
  font-weight: 700;
}
.account-avatar { width: 42px; height: 42px; border-radius: var(--radius-md); }
.account-card h3 { margin: 0 0 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-state-line { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.status-pill {
  display: inline-flex;
  width: max-content;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}
.status-pill.active, .status-pill.success { border-color: rgba(111, 206, 146, .28); background: rgba(111, 206, 146, .08); color: var(--success); }
.status-pill.expired, .status-pill.login_required, .status-pill.warning, .status-pill.partial { border-color: rgba(240, 163, 91, .3); background: rgba(240, 163, 91, .08); color: var(--warning); }
.status-pill.failed, .status-pill.error, .status-pill.cancelled { border-color: rgba(242, 118, 118, .3); background: rgba(242, 118, 118, .08); color: var(--danger); }
.status-pill.running, .status-pill.queued { border-color: rgba(125, 167, 234, .3); background: rgba(125, 167, 234, .08); color: var(--info); }
.account-state-line small { color: var(--subtle); }
.account-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.account-metric { min-width: 0; }
.account-metric span { display: block; margin-bottom: 4px; color: var(--subtle); font-size: 10px; }
.account-metric strong { display: block; overflow: hidden; color: var(--text-secondary); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.health-pill.ok { color: var(--success); }
.health-pill.error, .health-pill.login_required { color: var(--warning); }
.queue-pill { color: var(--info); }
.account-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); }
.account-actions button { white-space: nowrap; }
.account-more { position: relative; }
.account-more summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--muted);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.account-more summary::-webkit-details-marker { display: none; }
.account-menu {
  position: absolute;
  z-index: 8;
  top: calc(100% + 6px);
  right: 0;
  width: 156px;
  display: grid;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #181d23;
  box-shadow: var(--shadow-overlay);
}
.account-menu button { min-height: 38px; border: 0; background: transparent; color: var(--text-secondary); text-align: left; }
.account-menu button:hover { background: #222931; }
.account-menu .danger { color: var(--danger); }
.empty-state { padding: 64px 20px; border-bottom: 1px solid var(--line); text-align: center; }
.empty-state img { width: 48px; height: 48px; margin-bottom: var(--space-4); border-radius: 12px; }
.empty-state h3 { font-size: 18px; }
.empty-state p { margin-bottom: var(--space-5); }

/* Client choices */
.clients-section { padding-top: 80px; }
.client-list { border-top: 1px solid var(--line); }
.client-row {
  display: grid;
  grid-template-columns: 92px minmax(240px, 1.4fr) minmax(260px, .9fr) auto;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-6) var(--space-2);
  border-bottom: 1px solid var(--line);
}
.client-row.recommended { background: rgba(201, 243, 107, .025); }
.client-platform { color: var(--subtle); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.client-row h3 { margin-bottom: 4px; }
.client-row p { font-size: 12px; }
.client-row dl { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin: 0; }
.client-row dl div { display: grid; gap: 3px; }
.client-row dt { color: var(--subtle); font-size: 10px; }
.client-row dd { margin: 0; color: var(--text-secondary); font-size: 12px; }
.product-footer { padding: 56px 0 8px; color: var(--subtle); text-align: center; font-size: 11px; }
.mobile-nav { display: none; }

/* Dialogs and drawers */
.dialog {
  width: min(760px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  background: #12161b;
  color: var(--text);
  box-shadow: var(--shadow-overlay);
}
.dialog::backdrop { background: rgba(2, 4, 6, .78); }
.small-dialog { width: min(440px, calc(100% - 32px)); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-5); margin-bottom: var(--space-6); }
.dialog-head h2 { margin-bottom: 5px; }
.dialog-head p:last-child { max-width: 560px; font-size: 12px; }
.close-button { flex: 0 0 auto; min-height: 34px; padding: 6px 8px; color: var(--muted); font-size: 12px; }
.close-button:hover { background: var(--surface-raised); color: var(--text); }
.form-actions, .dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-6); }
.settings-dialog { width: min(980px, calc(100% - 32px)); padding: 0; }
.settings-dialog form { padding: 0 var(--space-6); }
.sticky-dialog-head { position: sticky; z-index: 4; top: 0; margin: 0 calc(var(--space-6) * -1); padding: var(--space-6); border-bottom: 1px solid var(--line); background: #12161b; }
.settings-section { margin-top: var(--space-4); padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-muted); }
.settings-section-head { align-items: flex-start; margin-bottom: var(--space-4); }
.settings-section-head h3 { margin-bottom: 3px; }
.settings-section-head p { color: var(--subtle); font-size: 12px; }
.inline-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2); }
.contact-toolbar { margin-bottom: var(--space-3); }
.contact-filter { margin: 0; }
.contact-picker { max-height: 460px; overflow: auto; border-top: 1px solid var(--line); }
.contact-empty { padding: 44px 16px; color: var(--muted); text-align: center; }
.contact-option {
  display: grid;
  grid-template-columns: auto 40px minmax(160px, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  padding: 13px var(--space-2);
  border-bottom: 1px solid var(--line);
}
.contact-option.selected { background: rgba(201, 243, 107, .025); }
.contact-avatar { position: relative; width: 40px; height: 40px; border-radius: 50%; }
.contact-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.contact-detail { min-width: 0; display: grid; gap: 5px; }
.contact-identity { display: flex; min-width: 0; align-items: center; gap: var(--space-2); }
.contact-name { overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.streak-badge { color: var(--warning); font-size: 10px; white-space: nowrap; }
.streak-badge.empty { color: var(--subtle); }
.contact-status { display: flex; flex-wrap: wrap; gap: var(--space-2); color: var(--subtle); font-size: 10px; }
.state-good { color: var(--success); }
.state-bad { color: var(--danger); }
.contact-message-editor { min-width: 180px; }
.contact-message-editor summary { color: var(--muted); font-size: 12px; cursor: pointer; text-align: right; list-style: none; }
.contact-message-editor summary::-webkit-details-marker { display: none; }
.contact-message-editor[open] { grid-column: 3 / -1; width: 100%; margin-top: var(--space-2); }
.contact-message-editor[open] summary { margin-bottom: var(--space-2); text-align: left; }
.contact-message { min-height: 84px; font-size: 12px; }
.contact-message:disabled { opacity: .42; }
.manual-contact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); margin-top: var(--space-3); }
.manual-contact input { margin: 0; }
.contact-settings > .hint { margin: var(--space-2) 0 0; }
.settings-columns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.settings-columns .settings-section { height: calc(100% - var(--space-4)); }
.switch-label { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.switch-label > span { display: grid; gap: 3px; }
.switch-label strong { font-size: 13px; }
.switch-label small { color: var(--subtle); font-size: 11px; font-weight: 500; }
.protection-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.sticky-form-actions {
  position: sticky;
  z-index: 4;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin: var(--space-6) calc(var(--space-6) * -1) 0;
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--line);
  background: #12161b;
}
.sticky-form-actions > div { display: flex; gap: var(--space-2); }
.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px solid rgba(242, 118, 118, .22);
  border-radius: var(--radius-md);
  background: rgba(242, 118, 118, .04);
}
.danger-zone p { margin-top: 4px; font-size: 11px; }
.browser-dialog { width: min(1040px, calc(100% - 24px)); }
.login-steps { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 var(--space-5); padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); list-style: none; }
.login-steps li { padding: 10px 12px; border-right: 1px solid var(--line); color: var(--subtle); font-size: 11px; text-align: center; }
.login-steps li:last-child { border: 0; }
.login-steps .active { background: rgba(201, 243, 107, .07); color: var(--brand); }
.browser-status { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); color: var(--muted); font-size: 12px; }
.browser-status span:first-child { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); }
.browser-status.ready span:first-child { background: var(--success); }
.browser-canvas-wrap { aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #050607; }
#browser-image { display: block; width: 100%; height: 100%; object-fit: contain; touch-action: manipulation; cursor: crosshair; }
.remote-input { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2); margin-top: var(--space-3); }
.remote-keys { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.remote-keys button { min-height: 34px; padding: 6px 10px; border-color: var(--line); background: var(--surface-muted); color: var(--muted); font-size: 11px; }
.history-dialog { width: min(820px, calc(100% - 32px)); }
.subsection-title { margin: var(--space-5) 0 var(--space-3); color: var(--text-secondary); font-size: 13px; }
.runs-list, .notifications-list, .sessions-list { display: grid; gap: var(--space-2); }
.run-item, .notification-item, .session-item {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}
.run-top, .notification-head, .session-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.run-item p, .notification-item p, .session-item p { margin-top: 6px; font-size: 12px; }
.run-detail { display: grid; gap: 6px; margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.run-detail strong { color: var(--text-secondary); }
.notification-item.unread { border-left: 3px solid var(--brand); }
.notification-head small { flex: 0 0 auto; color: var(--subtle); font-size: 10px; }
.notification-level { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--info); }
.notification-level.warning { background: var(--warning); }
.notification-level.error { background: var(--danger); }
.dialog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-4); }
.drawer-dialog { width: min(520px, 100%); height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: 0; border-top: 0; border-right: 0; border-bottom: 0; padding: var(--space-6); }
.drawer-note { margin-top: var(--space-5); }
.security-dialog { width: min(620px, 100%); }
.secret-code { display: block; margin: var(--space-3) 0; padding: var(--space-3); overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #090b0e; color: var(--brand); user-select: all; }
.recovery-codes { margin-top: var(--space-3); padding: var(--space-3); border: 1px solid rgba(240, 163, 91, .3); border-radius: var(--radius-sm); background: rgba(240, 163, 91, .06); color: #ffc38c; font-family: ui-monospace, SFMono-Regular, monospace; line-height: 1.75; }

/* Admin productivity layout */
.admin-dialog { width: min(1280px, calc(100% - 32px)); height: calc(100dvh - 32px); max-height: calc(100dvh - 32px); }
.admin-head { margin-bottom: var(--space-5); }
.admin-overview { grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.admin-overview > div { border-bottom: 0; }
.admin-layout { display: grid; grid-template-columns: minmax(320px, .75fr) minmax(560px, 1.4fr); gap: var(--space-5); align-items: start; }
.admin-layout .settings-section { margin: 0; }
.code-controls { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
.code-controls label { margin: 0; }
.code-controls button { grid-column: 1 / -1; }
.code-list { margin-top: var(--space-4); }
.admin-users-section { min-width: 0; }
.admin-table-head, .admin-user {
  display: grid;
  grid-template-columns: minmax(170px, 1.5fr) 100px 96px 110px 86px 64px;
  gap: var(--space-2);
  align-items: center;
}
.admin-table-head { padding: 0 var(--space-2) var(--space-2); color: var(--subtle); font-size: 10px; }
.admin-users { border-top: 1px solid var(--line); }
.admin-user { padding: var(--space-3) var(--space-2); border-bottom: 1px solid var(--line); }
.admin-user-identity { min-width: 0; }
.admin-user-identity strong { display: block; overflow: hidden; color: var(--text-secondary); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-identity small { color: var(--subtle); font-size: 10px; }
.admin-user input, .admin-user select { min-height: 36px; padding: 7px 8px; font-size: 11px; }
.admin-user .admin-disabled { display: flex; align-items: center; gap: 5px; margin: 0; color: var(--muted); font-size: 11px; font-weight: 500; }
.admin-user .admin-disabled input { width: 17px; min-height: 17px; }
.admin-user button { min-height: 34px; padding: 6px 9px; font-size: 11px; }

/* Feedback */
.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  width: min(420px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 12px 14px;
  border: 1px solid rgba(111, 206, 146, .34);
  border-radius: var(--radius-sm);
  background: #16231b;
  color: #b8eac9;
  box-shadow: var(--shadow-overlay);
  text-align: center;
  font-size: 13px;
  font-weight: 650;
}
.toast.is-error { border-color: rgba(242, 118, 118, .36); background: #281718; color: #ffb3b3; }

@media (max-width: 1040px) {
  :root { --sidebar-width: 196px; }
  .status-board { grid-template-columns: 1fr; }
  .today-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .account-card { grid-template-columns: minmax(210px, .9fr) minmax(300px, 1.2fr); }
  .account-actions { grid-column: 1 / -1; justify-content: flex-start; padding-left: 54px; }
  .client-row { grid-template-columns: 78px minmax(220px, 1fr) auto; }
  .client-row dl { display: none; }
  .admin-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 58px; }
  body { padding-bottom: 0; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .desktop-only { display: none !important; }
  .brand-lockup img { width: 36px; height: 36px; border-radius: 9px; }
  .site-header { min-height: 60px; grid-template-columns: 1fr auto; padding: 10px 16px; }
  .site-header .brand-lockup small, .site-nav, .site-login-link { display: none; }
  .site-header-actions { gap: 0; }
  .site-header-actions .button-link { min-height: 36px; padding: 7px 14px; }
  .landing-hero { width: calc(100% - 32px); min-height: auto; grid-template-columns: 1fr; gap: 46px; padding: 64px 0 60px; }
  .landing-hero-copy h1 { margin-bottom: 18px; font-size: clamp(38px, 11vw, 50px); line-height: 1.09; }
  .hero-description { font-size: 14px; line-height: 1.75; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; margin-top: 26px; }
  .hero-actions .button-link { min-height: 44px; padding: 10px 8px; font-size: 12px; }
  .hero-note { font-size: 10px; line-height: 1.6; }
  .product-preview { width: 100%; justify-self: stretch; border-radius: 15px; padding: 17px; }
  .product-preview::before { right: -70px; }
  .landing-proof { width: calc(100% - 32px); grid-template-columns: 1fr 1fr; }
  .landing-proof > div { padding: 18px 12px; }
  .landing-proof > div:nth-child(2) { border-right: 0; }
  .landing-proof > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .landing-proof strong { font-size: 15px; }
  .landing-section { width: calc(100% - 32px); padding: 80px 0; }
  .landing-section-heading { margin-bottom: 34px; }
  .landing-section-heading h2, .landing-final-cta h2 { font-size: 31px; }
  .landing-section-heading > p:last-child { font-size: 13px; }
  .steps-grid { grid-template-columns: 1fr; }
  .steps-grid article, .steps-grid article + article { min-height: auto; display: grid; grid-template-columns: 42px 1fr; gap: 0 10px; padding: 24px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .steps-grid article > span { grid-row: 1 / 3; margin: 3px 0 0; }
  .steps-grid h3 { margin-bottom: 5px; font-size: 16px; }
  .steps-grid p { font-size: 12px; }
  .feature-section { grid-template-columns: 1fr; gap: 36px; }
  .feature-list article { grid-template-columns: 30px 1fr; gap: 12px; padding: 22px 0; }
  .plan-cards { grid-template-columns: 1fr; }
  .plan-cards article { min-height: 340px; padding: 24px; }
  .landing-final-cta { width: calc(100% - 32px); padding: 80px 0; }
  .site-footer { width: calc(100% - 32px); grid-template-columns: 1fr auto; }
  .site-footer > p { display: none; }
  .site-footer .brand-lockup small { display: none; }

  .auth-header { min-height: 60px; grid-template-columns: 1fr auto; padding: 10px 16px; }
  .auth-header .brand-lockup { justify-self: end; }
  .auth-header .brand-lockup span, .auth-help { display: none; }
  .back-link { min-height: 36px; }
  .auth-main { width: 100%; min-height: calc(100dvh - 60px); display: block; padding: 28px 16px calc(36px + env(safe-area-inset-bottom)); }
  .auth-context { display: none; }
  .auth-panel { width: 100%; padding: 22px 18px; border-color: var(--line); }
  .form-heading { margin-bottom: 18px; }
  .form-heading h2 { margin-bottom: 4px; font-size: 24px; }
  .form-heading p { font-size: 12px; }
  .auth-mode-tabs { margin-bottom: 20px; }
  .auth-panel label { margin-bottom: 14px; }
  .auth-panel input { min-height: 44px; }
  .identity-choice { margin-bottom: 16px; }

  .app-layout { display: block; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .app-sidebar { display: none; }
  .workspace-content { padding: 0 16px 36px; }
  .topbar { height: 56px; padding: 0 16px; }
  .topbar > div:first-child { display: grid; gap: 0; }
  .topbar strong { display: none; }
  .mobile-brand { display: block; color: var(--text); font-size: 15px; font-weight: 700; }
  .topbar-actions #install-button { display: none !important; }
  .workspace-section { padding-top: 24px; }
  .page-heading { align-items: flex-start; margin-bottom: 14px; }
  .page-heading > div > p:last-child { display: none; }
  .page-heading .primary { flex: 0 0 auto; min-height: 36px; padding: 7px 10px; font-size: 12px; }
  .attention-panel { align-items: flex-start; }
  .attention-panel > div { display: block; }
  .attention-panel span { display: block; margin-top: 3px; font-size: 11px; }
  .attention-panel button { min-height: 34px; padding: 6px 8px; font-size: 11px; }
  .status-board { border-radius: var(--radius-md); }
  .today-card { min-height: 112px; align-items: center; padding: 16px; }
  .today-card > div > strong { margin-bottom: 5px; font-size: 19px; }
  .today-card p { font-size: 11px; line-height: 1.45; }
  .status-label { margin-bottom: 8px; }
  .today-number strong { font-size: 34px; }
  .overview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .overview-grid article {
    min-height: 72px;
    padding: 11px 8px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }
  .overview-grid article:nth-child(2n) { border-right: 1px solid var(--line); }
  .overview-grid article:last-of-type { border-right: 0; }
  .overview-grid span { min-height: 28px; font-size: 10px; line-height: 1.35; }
  .overview-grid strong { margin-top: 5px; font-size: 20px; }
  .accounts-section { padding-top: 32px; }
  .clients-section { padding-top: 48px; }
  .section-title { align-items: flex-start; }
  .section-title > div > p:last-child { font-size: 12px; }
  .account-card { grid-template-columns: 1fr; gap: 12px; padding: 14px 0; }
  .account-metrics { padding-left: 54px; }
  .account-actions { grid-column: auto; padding-left: 54px; justify-content: flex-start; }
  .account-actions > button { flex: 1; }
  .account-more { flex: 0 0 auto; }
  .account-menu { right: auto; left: 0; }
  .client-row { grid-template-columns: 1fr auto; gap: 12px; padding: 20px 0; }
  .client-platform { grid-column: 1 / -1; }
  .client-row > div:nth-child(2) { grid-column: 1 / 2; }
  .client-row > button, .client-row > a { grid-column: 2; grid-row: 2; }
  .mobile-nav {
    position: fixed;
    z-index: 20;
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(60px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 5px 8px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: #0e1115;
  }
  .mobile-nav a, .mobile-nav button {
    position: relative;
    min-height: 48px;
    display: grid;
    place-items: center;
    border: 0;
    padding: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
  }
  .mobile-nav .active { color: var(--brand); }
  .nav-dot { position: absolute; top: 8px; right: calc(50% - 20px); width: 6px; height: 6px; border-radius: 50%; background: var(--warning); }
  .dialog {
    width: 100%;
    max-height: 92dvh;
    margin: auto 0 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 14px 14px 0 0;
    padding: 18px;
  }
  .small-dialog { width: 100%; }
  .dialog-head { margin-bottom: 20px; }
  .dialog-head h2 { font-size: 21px; }
  .settings-dialog, .drawer-dialog, .security-dialog, .history-dialog, .browser-dialog, .admin-dialog {
    width: 100%;
    height: 94dvh;
    max-height: 94dvh;
    margin: auto 0 0;
    border-radius: 14px 14px 0 0;
  }
  .settings-dialog form { padding: 0 16px; }
  .sticky-dialog-head { margin: 0 -16px; padding: 18px 16px; }
  .settings-columns { grid-template-columns: 1fr; }
  .settings-columns .settings-section { height: auto; }
  .settings-section { padding: 16px; }
  .settings-section-head { gap: 12px; }
  .inline-actions { align-items: stretch; }
  .contact-picker { max-height: 47dvh; }
  .contact-option { grid-template-columns: auto 38px minmax(0, 1fr); gap: 10px; padding: 12px 2px; }
  .contact-avatar { width: 38px; height: 38px; }
  .contact-message-editor { grid-column: 3; min-width: 0; }
  .contact-message-editor summary { text-align: left; }
  .contact-message-editor[open] { grid-column: 2 / -1; }
  .manual-contact { grid-template-columns: 1fr; }
  .protection-grid { grid-template-columns: 1fr; }
  .sticky-form-actions { margin: 20px -16px 0; padding: 13px 16px calc(13px + env(safe-area-inset-bottom)); }
  .sticky-form-actions > div { flex: 1; justify-content: flex-end; }
  .sticky-form-actions .text-danger { padding: 7px 4px; font-size: 11px; }
  .login-steps li { padding: 8px 4px; font-size: 10px; }
  .browser-canvas-wrap { aspect-ratio: 16 / 11; }
  .remote-input { grid-template-columns: 1fr; }
  .remote-keys { display: grid; grid-template-columns: repeat(3, 1fr); }
  .dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .dialog-toolbar { align-items: stretch; }
  .danger-zone { align-items: flex-start; }
  .admin-overview { grid-template-columns: repeat(2, 1fr); }
  .admin-overview > div:nth-child(2) { border-right: 0; }
  .admin-overview > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .admin-table-head { display: none; }
  .admin-user {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 16px 0;
  }
  .admin-user-identity { grid-column: 1 / -1; }
  .admin-user .admin-disabled { align-self: center; }
  .admin-user button { width: 100%; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (max-width: 420px) {
  .auth-main { padding-right: 12px; padding-left: 12px; }
  .auth-panel { padding: 20px 16px; }
  .code-input-row { grid-template-columns: minmax(0, 1fr) 104px; }
  .today-card { align-items: flex-end; gap: 12px; }
  .today-number span { display: block; max-width: 66px; }
  .account-metrics, .account-actions { padding-left: 0; }
  .account-actions { display: grid; grid-template-columns: 1fr 1fr auto; }
  .client-row { grid-template-columns: 1fr; }
  .client-row > button, .client-row > a { grid-column: 1; grid-row: auto; }
  .inline-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .settings-section-head { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
