:root {
  color-scheme: light;
  --ink: #171827;
  --ink-soft: #353746;
  --muted: #707384;
  --subtle: #9b9eac;
  --surface: #ffffff;
  --surface-soft: #f7f7fb;
  --surface-tint: #f2f0ff;
  --line: #e4e5ed;
  --line-strong: #d5d7e2;
  --brand: #5c50ee;
  --brand-dark: #4438cc;
  --brand-bright: #7b68ff;
  --brand-soft: #efedff;
  --green: #10976a;
  --green-soft: #e7f8f1;
  --amber: #a66b0b;
  --amber-soft: #fff5d9;
  --red: #c63f52;
  --red-soft: #fff0f2;
  --shadow-xs: 0 2px 8px rgba(28, 30, 54, .045);
  --shadow-sm: 0 10px 32px rgba(28, 30, 54, .07);
  --shadow-md: 0 24px 64px rgba(28, 30, 54, .11);
  --shadow-brand: 0 16px 38px rgba(79, 63, 220, .24);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --workspace-width: 1200px;
  --workspace-gutter: 40px;
  --page-header-gap: 28px;
}

/* Admin workspace */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.admin-page { width: min(1320px, calc(100% - 40px)); }
.admin-auth-card { max-width: 560px; }
.admin-hero-icon { background: linear-gradient(145deg, #232536, #11121c); }

.admin-topbar-actions,
.admin-row-actions,
.admin-identity-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-topbar-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}
.admin-topbar-nav a {
  padding: 7px 11px;
  color: var(--muted);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
}
.admin-topbar-nav a:hover,
.admin-topbar-nav a[aria-current="page"] { color: var(--brand-dark); background: #fff; box-shadow: var(--shadow-sm); }
.admin-mode-badge { text-decoration: none; }

.admin-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  color: #3f398c;
  border: 1px solid #d9d6ff;
  border-radius: 999px;
  background: #f0efff;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: .02em;
}

.admin-mode-badge i,
.admin-live > span,
.status-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}

.admin-head h1 { font-size: clamp(40px, 6vw, 64px); }

.admin-head-actions { display: flex; align-items: center; gap: 10px; }

.admin-live {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  padding: 12px 15px;
  color: var(--green);
  border: 1px solid #d6eee5;
  border-radius: 16px;
  background: rgba(245, 255, 251, .9);
  box-shadow: var(--shadow-sm);
}

.admin-live > span {
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 5px rgba(16, 151, 106, .1);
}

.admin-live small,
.admin-live strong { display: block; }
.admin-live small { color: var(--muted); font-size: 11px; }
.admin-live strong { color: var(--ink); font-size: 14px; }

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.admin-metric {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow-sm);
}

.admin-metric-primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(145deg, #6e63fb, #5146dd);
  box-shadow: 0 16px 35px rgba(81, 70, 221, .2);
}

.admin-metric-alert { border-color: #f1ccd2; background: #fff8f9; }
.admin-metric-feedback { border-color: #dcd8ff; background: #f8f7ff; }

.admin-metric-icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  color: var(--brand-dark);
  border-radius: 12px;
  background: var(--brand-soft);
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
}

.admin-metric-primary .admin-metric-icon { color: #fff; background: rgba(255, 255, 255, .16); }
.admin-metric > div { min-width: 0; }
.admin-metric small,
.admin-metric strong,
.admin-metric em { display: block; }
.admin-metric small { color: var(--muted); font-size: 11px; font-weight: 720; }
.admin-metric strong { margin: 3px 0 1px; font-size: 27px; letter-spacing: -.04em; line-height: 1; }
.admin-metric em { overflow: hidden; color: var(--muted); font-size: 11px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.admin-metric-primary small,
.admin-metric-primary em { color: rgba(255, 255, 255, .72); }
.admin-metric-link {
  color: inherit;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.admin-metric-link:hover {
  border-color: #d6d1ff;
  box-shadow: 0 12px 32px rgba(52, 43, 154, .1);
  transform: translateY(-1px);
}
.admin-metric-link.admin-metric-alert:hover { border-color: #eebac3; }

.admin-directory,
.admin-detail-card,
.admin-activity { padding: clamp(20px, 3vw, 30px); }

.admin-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.admin-section-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.admin-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 190px 190px auto auto;
  gap: 10px;
  align-items: end;
  margin: 22px 0 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.admin-filters label { margin: 0; }
.admin-filters label > span { display: block; margin: 0 0 5px; color: var(--muted); font-size: 11px; }
.admin-filters input,
.admin-filters select { min-height: 44px; background: #fff; }
.admin-search { position: relative; }
.admin-search > span {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 13px;
  display: grid;
  width: 18px;
  height: 18px;
  margin: 0;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
  place-items: center;
}
.admin-search > span svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }
.admin-search input { padding-left: 38px; }
.admin-reset { align-self: center; margin-top: 18px; text-align: center; text-decoration: none; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  padding: 10px 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .055em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-table td {
  padding: 15px 12px;
  border-bottom: 1px solid #eeeff4;
  color: var(--ink-soft);
  font-size: 13px;
  vertical-align: middle;
}
.admin-table tbody tr { transition: background .15s ease; }
.admin-table tbody tr:hover { background: #fafafe; }
.admin-table tbody tr:last-child td { border-bottom: 0; }

.admin-creator-cell {
  min-width: 190px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.admin-creator-cell strong,
.admin-creator-cell small { display: block; }
.admin-creator-cell strong { font-size: 14px; }
.admin-creator-cell small { max-width: 175px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}
.status-pill-ok,
.status-pill-running { color: #08724e; border-color: #c8eadc; background: var(--green-soft); }
.status-pill-error { color: #a52d3f; border-color: #f0cbd1; background: var(--red-soft); }
.status-pill-paused { color: #777a89; background: #f2f2f5; }
.admin-number { font-size: 15px; font-variant-numeric: tabular-nums; }
.number-error,
.definition-error { color: var(--red); }
.admin-empty-value { color: var(--subtle); }

.button-quiet {
  min-height: 34px;
  padding: 7px 10px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-size: 12px;
}

.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.icon-button:hover:not(:disabled) { color: var(--brand-dark); border-color: #cfcaff; background: var(--brand-soft); }
.icon-button:disabled { opacity: .35; cursor: not-allowed; }
.button-danger-soft { color: var(--red); background: var(--red-soft); border: 1px solid #f2ccd2; }

.admin-empty { padding: 54px 20px; color: var(--muted); text-align: center; }
.admin-empty > span { display: block; margin-bottom: 10px; color: var(--subtle); font-size: 34px; }
.admin-empty h3 { margin: 0; color: var(--ink); font-size: 18px; }
.admin-empty p { margin: 5px 0 0; }
.admin-empty.compact { padding: 28px 20px; }

.admin-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: -8px 0 18px;
  color: var(--muted);
  font-size: 13px;
}
.admin-breadcrumb a { color: var(--brand-dark); font-weight: 740; text-decoration: none; }
.admin-sync-status {
  margin-left: auto;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 650;
}

[data-admin-write].is-busy { opacity: .65; }

.admin-toast-region {
  position: fixed;
  z-index: 1000;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  width: min(380px, calc(100vw - 36px));
  gap: 8px;
  pointer-events: none;
}

.admin-toast {
  padding: 13px 15px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 720;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}
.admin-toast.is-visible { opacity: 1; transform: translateY(0); }
.admin-toast-success { color: #08724e; border-color: #c8eadc; background: #f1fcf8; }
.admin-toast-error { color: var(--red); border-color: #f0cbd1; background: #fff7f8; }

.admin-creator-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 4vw, 34px);
  margin-bottom: 18px;
}
.admin-creator-identity { min-width: 0; display: flex; align-items: center; gap: 17px; }
.admin-avatar-large {
  display: grid;
  place-items: center;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  color: #fff;
  border-radius: 19px;
  background: linear-gradient(145deg, #ff9272, #a558e8);
  box-shadow: 0 10px 25px rgba(165, 88, 232, .18);
  font-size: 23px;
  font-weight: 880;
}
.admin-identity-title { flex-wrap: wrap; }
.admin-identity-title h1 { font-size: clamp(28px, 5vw, 42px); }
.admin-creator-identity p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.admin-detail-metrics { grid-template-columns: repeat(4, 1fr); }
.admin-detail-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; margin-bottom: 18px; }

.admin-definition-list { margin: 20px 0 0; }
.admin-definition-list > div {
  display: grid;
  grid-template-columns: minmax(120px, .7fr) minmax(0, 1.3fr);
  gap: 18px;
  padding: 13px 0;
  border-top: 1px solid #eeeff4;
}
.admin-definition-list dt { color: var(--muted); font-size: 12px; }
.admin-definition-list dd { min-width: 0; margin: 0; color: var(--ink-soft); font-size: 13px; font-weight: 660; overflow-wrap: anywhere; }
.admin-definition-list code { padding: 3px 6px; border-radius: 6px; background: var(--surface-soft); font-size: 11px; }
.admin-link { color: var(--brand-dark); }
.admin-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.admin-tags span { padding: 4px 7px; color: var(--brand-dark); border-radius: 7px; background: var(--brand-soft); font-size: 11px; }

.activity-list { margin: 20px 0 0; padding: 0; list-style: none; }
.activity-list li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 13px 0;
  border-top: 1px solid #eeeff4;
}
.activity-dot { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--subtle); }
.activity-sent,
.activity-info,
.activity-clicked,
.activity-completed { background: var(--green); }
.activity-error { background: var(--red); }
.activity-scheduled,
.activity-queued,
.activity-processing { background: var(--amber); }
.activity-list strong,
.activity-list small { display: block; }
.activity-list strong { font-size: 13px; }
.activity-list small { margin-top: 2px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.activity-list time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.activity-list li.is-error { margin: 0 -12px; padding: 13px 12px; border-radius: 14px; background: #fff8f9; }
.activity-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.activity-copy p { margin: 3px 0 0; color: var(--ink-soft); font-size: 12px; }
.activity-status { padding: 3px 7px; color: var(--muted); border-radius: 999px; background: var(--surface-soft); font-size: 9px; font-weight: 820; letter-spacing: .03em; text-transform: uppercase; }
.activity-status-sent,
.activity-status-completed,
.activity-status-clicked,
.activity-status-info { color: #08724e; background: var(--green-soft); }
.activity-status-error { color: var(--red); background: var(--red-soft); }
.activity-status-scheduled,
.activity-status-queued,
.activity-status-processing { color: #8b5d04; background: #fff5d9; }
.activity-copy details { margin-top: 8px; }
.activity-copy summary { width: fit-content; color: var(--brand-dark); font-size: 10px; font-weight: 720; cursor: pointer; }
.activity-copy details code { display: block; max-width: 760px; padding: 9px 10px; margin-top: 7px; overflow: auto; color: #7b2936; border: 1px solid #f0d7dc; border-radius: 9px; background: #fff; font-size: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }

.admin-errors-card {
  padding: clamp(20px, 3vw, 30px);
  margin-bottom: 18px;
  scroll-margin-top: 92px;
}
.admin-errors-head form { flex: 0 0 auto; }
.admin-error-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}
.admin-error-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 35px;
  padding: 7px 11px;
  color: var(--muted);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 780;
  text-decoration: none;
}
.admin-error-tabs a:hover,
.admin-error-tabs a.is-active { color: var(--brand-dark); background: #fff; box-shadow: var(--shadow-xs); }
.admin-error-tabs span {
  min-width: 21px;
  padding: 3px 6px;
  color: inherit;
  border-radius: 999px;
  background: var(--brand-soft);
  font-size: 9px;
  text-align: center;
}
.admin-error-list { display: grid; gap: 10px; margin-top: 15px; }
.admin-error-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid #f0cbd1;
  border-radius: 17px;
  background: linear-gradient(145deg, #fff, #fff8f9);
}
.admin-error-item.is-resolved { border-color: #dce1e6; background: #fbfcfc; }
.admin-error-marker {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--red);
  border-radius: 12px;
  background: var(--red-soft);
  font-size: 16px;
  font-weight: 900;
}
.admin-error-item.is-resolved .admin-error-marker { color: #08724e; background: var(--green-soft); }
.admin-error-body { min-width: 0; }
.admin-error-body > header,
.admin-error-body > header > div,
.admin-error-body footer,
.admin-error-context { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.admin-error-body > header { align-items: flex-start; justify-content: space-between; gap: 15px; }
.admin-error-body h3 { margin: 0; font-size: 14px; }
.admin-error-body > header > time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.admin-error-body > p { margin: 7px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.48; }
.admin-error-context { margin-top: 9px; }
.admin-error-context span,
.admin-error-context code {
  padding: 4px 7px;
  color: var(--muted);
  border-radius: 7px;
  background: var(--surface-soft);
  font-size: 9px;
}
.admin-error-context code { color: #7b2936; background: #fff0f2; }
.admin-error-body details { margin-top: 10px; }
.admin-error-body summary { width: fit-content; color: var(--brand-dark); font-size: 10px; font-weight: 730; cursor: pointer; }
.admin-error-body details code { display: block; max-height: 210px; padding: 10px; margin-top: 7px; overflow: auto; color: #7b2936; border: 1px solid #f0d7dc; border-radius: 10px; background: #fff; font-size: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-error-body footer { justify-content: flex-end; padding-top: 11px; margin-top: 11px; border-top: 1px solid #f1e7e9; }
.admin-error-item.is-resolved .admin-error-body footer { border-color: var(--line); }
.admin-error-body footer .admin-link { margin-right: auto; font-size: 11px; font-weight: 720; }
.admin-error-body footer .button { min-height: 34px; padding: 7px 10px; }
.activity-status-resolved { color: #08724e; background: var(--green-soft); }

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}
.admin-pagination > div { display: flex; gap: 8px; }
.admin-pagination > span { color: var(--muted); font-size: 11px; font-weight: 680; }
.admin-pagination .button { text-decoration: none; }
.admin-pagination .is-disabled { opacity: .42; pointer-events: none; }

@media (max-width: 1100px) {
  .admin-metrics { grid-template-columns: repeat(3, 1fr); }
  .admin-filters { grid-template-columns: minmax(220px, 1fr) 170px 170px auto; }
  .admin-reset { grid-column: 1 / -1; justify-self: start; margin: 0; }
}

@media (max-width: 840px) {
  .admin-page { width: min(100% - 28px, 760px); padding-top: 32px; }
  .admin-head { align-items: flex-start; }
  .admin-live { min-width: auto; }
  .admin-metrics,
  .admin-detail-metrics { grid-template-columns: repeat(2, 1fr); }
  .admin-filters { grid-template-columns: 1fr 1fr; }
  .admin-search { grid-column: 1 / -1; }
  .admin-filters .button { align-self: stretch; }
  .admin-table thead { display: none; }
  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td { display: block; width: 100%; }
  .admin-table tbody { display: grid; gap: 12px; }
  .admin-table tr { padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
  .admin-table td { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 8px 0; border: 0; }
  .admin-table td::before { content: attr(data-label); flex: 0 0 auto; color: var(--muted); font-size: 10px; font-weight: 780; text-transform: uppercase; }
  .admin-table td:first-child { padding-top: 0; }
  .admin-table td:first-child::before,
  .admin-table td:last-child::before { display: none; }
  .admin-table td:last-child { padding-bottom: 0; }
  .admin-creator-cell { width: 100%; }
  .admin-row-actions { width: 100%; justify-content: flex-end; }
  .admin-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .admin-head { display: block; }
  .admin-live { width: fit-content; margin-top: 18px; }
  .admin-metrics,
  .admin-detail-metrics { grid-template-columns: 1fr; }
  .admin-metric { align-items: center; }
  .admin-filters { grid-template-columns: 1fr; }
  .admin-search { grid-column: auto; }
  .admin-reset { grid-column: auto; }
  .admin-creator-hero { align-items: flex-start; flex-direction: column; }
  .admin-hero-action,
  .admin-hero-action .button { width: 100%; }
  .admin-definition-list > div { grid-template-columns: 1fr; gap: 4px; }
  .activity-list li { grid-template-columns: 10px minmax(0, 1fr); }
  .activity-list time { grid-column: 2; }
  .admin-pagination { align-items: stretch; flex-direction: column; }
  .admin-pagination > div { display: grid; grid-template-columns: 1fr 1fr; }
  .admin-pagination .button { justify-content: center; text-align: center; }
  .admin-topbar-actions { gap: 6px; }
  .admin-mode-badge { display: none; }
  .admin-topbar-nav a { padding-inline: 9px; }
  .admin-head-actions { align-items: stretch; flex-direction: column; }
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: #f8f9fc;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 86% -4%, rgba(116, 94, 255, .14), transparent 30rem),
    radial-gradient(circle at -8% 34%, rgba(98, 198, 168, .08), transparent 26rem),
    linear-gradient(180deg, #fbfbfe 0, #f5f6fb 44rem, #f8f9fc 100%);
  color: var(--ink);
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 10px;
  left: 12px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  color: #fff;
  border-radius: 12px;
  background: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-140%);
  transition: transform .18s ease;
}

.skip-link:focus { transform: translateY(0); }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  padding: max(10px, env(safe-area-inset-top)) 20px 10px;
  background: rgba(249, 249, 253, .82);
  border-bottom: 1px solid rgba(224, 225, 235, .78);
  box-shadow: 0 8px 30px rgba(28, 30, 54, .035);
  backdrop-filter: blur(24px) saturate(165%);
}

.topbar-shell {
  width: min(var(--workspace-width), 100%);
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -.035em;
  text-decoration: none;
}

.brand-mark {
  display: block;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.brand-copy, .brand-name, .brand-copy small { display: block; }
.brand-name { line-height: 1; }
.brand-copy small { margin-top: 4px; color: var(--subtle); font-size: 8px; font-weight: 750; letter-spacing: .08em; line-height: 1; text-transform: uppercase; }

.locale-switch {
  display: inline-grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin-left: -12px;
  place-items: center;
  color: var(--brand-dark);
  border: 1px solid #dcd8ff;
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-decoration: none;
}
.locale-switch:hover { background: var(--brand-soft); }
.locale-switch:focus-visible { outline: 3px solid rgba(97, 83, 243, .25); outline-offset: 3px; }

.page {
  width: min(var(--workspace-width), calc(100% - var(--workspace-gutter)));
  margin: 0 auto;
  padding: 38px 0 104px;
}

.centered-page {
  width: min(600px, calc(100% - 32px));
  min-height: calc(100vh - 150px);
  display: grid;
  place-items: center;
  padding: 36px 0 64px;
}

.auth-card, .panel {
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.auth-card {
  width: 100%;
  padding: clamp(28px, 6vw, 50px);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.hero-icon, .instagram-orb {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 24px;
  color: #fff;
  border-radius: 24px;
  background: linear-gradient(145deg, #766bff, #4c42de);
  box-shadow: 0 18px 38px rgba(98, 88, 245, .24);
  font-size: 34px;
  font-weight: 850;
  transform: rotate(-4deg);
}

.instagram-orb {
  background: linear-gradient(145deg, #f6b84a, #df3f8d 46%, #7055e7);
  transform: none;
}

.auth-mark {
  display: block;
  width: 76px;
  height: 76px;
  margin: 0 auto 24px;
  border-radius: 22px;
  filter: drop-shadow(0 18px 24px rgba(76, 59, 210, .2));
}

.eyebrow, .section-kicker {
  margin: 0 0 9px;
  color: var(--brand);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.section-kicker { margin-bottom: 5px !important; }

h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 50px);
  line-height: 1.04;
  letter-spacing: -.05em;
}

.creator-page-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  margin: 0 0 var(--page-header-gap);
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid rgba(215, 213, 241, .9);
  border-radius: 30px;
  background:
    linear-gradient(122deg, rgba(255, 255, 255, .98) 0%, rgba(249, 248, 255, .96) 58%, rgba(238, 235, 255, .94) 100%);
  box-shadow: 0 22px 60px rgba(43, 38, 104, .09), inset 0 1px 0 rgba(255, 255, 255, .95);
}

.creator-page-header::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -135px;
  right: -80px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(111, 92, 255, .2) 0, rgba(111, 92, 255, .06) 44%, transparent 70%);
}

.creator-page-header::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: 23%;
  bottom: -75px;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(94, 78, 232, .08);
  border-radius: 44px;
  transform: rotate(22deg);
}

.creator-page-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 720px;
}

.creator-page-header .eyebrow {
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 9px;
  border: 1px solid rgba(106, 87, 238, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
}

.creator-page-header h1 {
  max-width: 760px;
  font-size: clamp(40px, 5vw, 56px);
}

.creator-page-header .lead {
  max-width: 690px;
  color: #65687a;
}

.creator-page-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.creator-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.creator-section-head h2 {
  font-size: 26px;
}

.creator-section-head > div > p:last-child {
  max-width: 700px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.creator-stat-grid > div {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.creator-stat-grid > div:hover {
  border-color: #d7d2ff;
  box-shadow: 0 16px 38px rgba(35, 33, 75, .09);
  transform: translateY(-2px);
}

.creator-accent-panel {
  border-color: #dedbff;
  background: linear-gradient(135deg, #fff 35%, #f7f6ff 100%);
}

/* The SPA focuses a new page heading for assistive technology. The heading
   is not interactive or reachable with Tab, so hide only this focus ring. */
.creator-route-heading:focus { outline: none; }

h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -.025em;
}

.lead {
  max-width: 650px;
  margin: 18px auto 28px;
  color: var(--muted);
  font-size: 18px;
}

.lead.compact {
  margin: 12px 0 0;
  font-size: 16px;
}

.stack {
  display: grid;
  gap: 10px;
  margin-top: 26px;
  text-align: left;
}

label {
  display: block;
  margin: 20px 0 8px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 740;
}

input, textarea, select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  outline: none;
  background: #fbfbfe;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

textarea {
  min-height: 96px;
  line-height: 1.5;
  resize: vertical;
}

select {
  cursor: pointer;
}

input:hover, textarea:hover, select:hover { border-color: #c6c8d5; }

input:focus, textarea:focus, select:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(98, 88, 245, .11);
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 0;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:focus-visible, .text-button:focus-visible, .repeat-row > button:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(98, 88, 245, .25);
  outline-offset: 3px;
}

.button-large { min-height: 52px; font-size: 16px; }

.button-primary {
  color: #fff;
  background: linear-gradient(145deg, var(--brand-bright), var(--brand) 56%, var(--brand-dark));
  box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.button-primary:hover { background: linear-gradient(145deg, #7162f8, var(--brand-dark)); box-shadow: 0 19px 42px rgba(75, 59, 210, .3); }

.button-instagram {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  box-shadow: 0 9px 24px rgba(31, 33, 57, .08);
}

.button-secondary { color: var(--brand-dark); border: 1px solid #ddd9ff; background: #f4f2ff; }
.button-secondary:hover:not(:disabled) { border-color: #c7c0ff; background: #ebe8ff; }
.button[disabled], .button.disabled { opacity: .46; pointer-events: none; }

.text-button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 2px;
  color: var(--muted);
  border: 0;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.text-button.danger { color: var(--red); }
.fine-print { margin: 18px auto 0; color: var(--muted); font-size: 13px; }
.connect-retry { width: 100%; margin-top: 10px; }
.auth-recovery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.auth-recovery a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 720;
}

.help-details {
  margin: 18px 0 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  text-align: left;
}

.help-details summary { min-width: 44px; min-height: 44px; display: flex; align-items: center; color: var(--brand-dark); font-weight: 750; cursor: pointer; }
.help-details p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

.trust-list { display: grid; gap: 10px; margin: 24px 0; text-align: left; }
.trust-list > div { display: flex; gap: 12px; align-items: flex-start; padding: 13px; background: var(--surface-soft); border-radius: 14px; }
.trust-list span { display: grid; place-items: center; flex: 0 0 25px; height: 25px; color: #fff; border-radius: 50%; background: var(--green); font-weight: 900; }
.trust-list p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.trust-list strong { color: var(--ink); }

.alert {
  margin: 18px 0;
  padding: 13px 15px;
  border-radius: 14px;
  text-align: left;
  font-size: 14px;
  font-weight: 650;
}

.alert-error { color: #892130; background: var(--red-soft); border: 1px solid #f4ccd2; }
.alert-success { color: #086944; background: #edfff7; border: 1px solid #bcebd6; }
.alert-warning { color: #75530c; background: #fff8df; border: 1px solid #f0dda2; }

.account-chip {
  display: inline-flex;
  max-width: 48vw;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  overflow: hidden;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-xs);
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu { position: relative; flex: 0 0 auto; }
.account-menu > summary { list-style: none; cursor: pointer; user-select: none; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary:hover,
.account-menu[open] > summary { border-color: #d5d1ff; background: #fff; box-shadow: 0 7px 22px rgba(46, 38, 119, .09); }
.account-menu > summary:focus-visible { outline: 3px solid rgba(98, 88, 245, .2); outline-offset: 2px; }
.account-menu-chevron { color: var(--subtle); font-size: 14px; line-height: 1; transition: transform .16s ease; }
.account-menu[open] .account-menu-chevron { transform: rotate(180deg); }
.account-menu-popover {
  position: absolute;
  z-index: 50;
  top: calc(100% + 10px);
  right: 0;
  width: min(330px, calc(100vw - 28px));
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 20px 54px rgba(31, 33, 57, .16);
}
.account-menu-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 22px;
  width: 11px;
  height: 11px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #fff;
  transform: rotate(45deg);
}
.account-menu-identity { display: flex; align-items: center; gap: 10px; }
.account-menu-identity > span:last-child { min-width: 0; }
.account-menu-identity strong,
.account-menu-identity small { display: block; }
.account-menu-identity strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-identity small { margin-top: 2px; color: var(--green); font-size: 10px; font-weight: 720; }
.account-menu-identity small i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: currentColor; }
.account-menu-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin-top: 13px;
  padding: 10px 11px;
  color: var(--ink-soft);
  border-radius: 11px;
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
}
.account-menu-link:hover { color: var(--brand-dark); background: var(--brand-soft); }
.account-menu-link span { width: 18px; text-align: center; }
.account-menu-popover form { margin: 0; padding-top: 11px; border-top: 1px solid var(--line); }
.account-menu-logout {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  color: var(--ink-soft);
  border: 0;
  border-radius: 11px;
  background: transparent;
  font-size: 12px;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}
.account-menu-logout:hover { color: var(--brand-dark); background: var(--brand-soft); }
.account-menu-logout span { display: inline-block; font-size: 18px; line-height: 1; transform: rotate(180deg); }
.account-session-action { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 16px 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.account-session-action strong,
.account-session-action small { display: block; }
.account-session-action strong { font-size: 13px; }
.account-session-action small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.account-session-action form { flex: 0 0 auto; margin: 0; }
.account-session-action .button { min-height: 40px; padding: 8px 14px; }
.account-email-settings { margin: 14px 0 18px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.account-email-settings > div strong,
.account-email-settings > div small { display: block; }
.account-email-settings > div strong { font-size: 14px; }
.account-email-settings > div small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.account-email-settings form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin: 14px 0 0; }
.account-email-settings input { min-width: 0; min-height: 44px; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; }
.account-email-settings input:focus { outline: 3px solid rgba(91, 77, 245, .14); border-color: var(--primary); }
.account-email-settings .button { min-height: 44px; }
.account-email-status { min-height: 18px; margin: 10px 0 0; color: var(--muted); font-size: 11px; font-weight: 650; }
.account-email-status.is-verified { color: var(--green); }
.account-email-status.is-pending { color: #75530c; }
.account-email-status.is-error { color: var(--red); }

.account-page { max-width: 1040px; }
.account-page-header { margin-bottom: 18px; }
.account-page-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.account-page-card { min-width: 0; padding: 24px; }
.account-page-wide { grid-column: 1 / -1; }
.account-card-heading { display: flex; align-items: center; gap: 13px; }
.account-card-heading > div { min-width: 0; }
.account-card-heading h2,
.account-page-card h2 { margin: 3px 0 0; font-size: 22px; letter-spacing: -.025em; }
.account-card-heading .status-pill { margin-left: auto; }
.account-card-icon { display: grid; flex: 0 0 46px; width: 46px; height: 46px; place-items: center; color: #fff; border-radius: 15px; background: linear-gradient(145deg, #ff8ca0, #c657df 52%, #7253ee); font-size: 18px; font-weight: 850; }
.account-card-copy { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.account-page-card.account-email-settings { margin: 0; background: var(--surface); }
.account-page-card.account-email-settings form { margin-top: 22px; }
.account-action-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.account-action-row > div { min-width: 0; }
.account-action-row form { flex: 0 0 auto; margin: 0; }
.account-danger-zone { border-color: #f2ccd2; }
.account-danger-zone h2 { color: var(--red); }

.account-avatar, .preview-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff8ca0, #c657df 52%, #7253ee);
  font-size: 12px;
  font-weight: 850;
}

.creator-nav { display: flex; align-items: center; gap: 14px; }
.creator-nav nav { display: flex; gap: 4px; padding: 4px; border: 1px solid rgba(220, 221, 232, .94); border-radius: 15px; background: rgba(255, 255, 255, .82); box-shadow: var(--shadow-xs); }
.creator-nav nav a { position: relative; display: inline-flex; min-height: 38px; align-items: center; gap: 7px; padding: 8px 12px; color: var(--muted); border-radius: 11px; font-size: 12px; font-weight: 770; text-decoration: none; white-space: nowrap; transition: color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease; }
.creator-nav nav a svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.creator-nav nav a:hover { color: var(--ink); background: var(--surface-soft); transform: translateY(-1px); }
.creator-nav nav a.is-active { color: var(--brand-dark); background: linear-gradient(145deg, #f5f3ff, #ebe8ff); box-shadow: inset 0 0 0 1px rgba(102, 85, 235, .08), 0 5px 14px rgba(73, 60, 182, .09); }
.creator-is-navigating .page { opacity: .56; pointer-events: none; }
.page { transition: opacity 140ms ease; }
.creator-navigation-error { position: fixed; z-index: 1000; right: 20px; bottom: 20px; max-width: min(420px, calc(100vw - 40px)); padding: 14px 17px; color: #8f2936; border: 1px solid #f3b7c0; border-radius: 14px; background: #fff3f5; box-shadow: 0 14px 40px rgba(40, 31, 58, .14); font-size: 14px; font-weight: 700; }

.dashboard-title { max-width: 700px; }

.hero-status {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  min-width: 205px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, .84);
  border-radius: 18px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 15px 38px rgba(48, 40, 126, .11), inset 0 1px 0 #fff;
  backdrop-filter: blur(12px);
}

.hero-status-icon {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 13%, transparent);
}

.hero-status small, .hero-status strong { display: block; }
.hero-status small { margin-bottom: 2px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.hero-status strong { color: var(--ink); font-size: 15px; }
.hero-status-on { color: var(--green); }
.hero-status-off { color: var(--subtle); }
.hero-status-error { color: var(--red); }

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.metrics > div {
  min-width: 0;
  display: flex;
  align-items: center;
  min-height: 88px;
  gap: 14px;
  padding: 17px 18px;
}

.metric-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  color: var(--brand-dark);
  border-radius: 13px;
  background: var(--brand-soft);
  font-size: 14px;
  font-weight: 900;
}

.metric-sent { color: var(--green); background: var(--green-soft); }
.metric-errors { color: var(--red); background: var(--red-soft); }
.metrics strong, .metrics small { display: block; }
.metrics strong { font-size: 24px; line-height: 1.05; letter-spacing: -.04em; }
.metrics small { margin-top: 3px; color: var(--muted); font-size: 11px; }

.strategy-heatmap {
  margin: 0 0 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-xs);
}
.strategy-heatmap header,
.strategy-heatmap footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.strategy-heatmap header span { color: var(--muted); font-size: 11px; font-weight: 760; }
.strategy-heatmap header strong { font-size: 12px; }
.strategy-heatmap-grid { display: grid; grid-template-columns: repeat(14, 13px); gap: 4px; width: fit-content; margin: 12px 0 8px; }
.strategy-heatmap-cell { width: 13px; height: 13px; border-radius: 4px; background: #ececf2; box-shadow: inset 0 0 0 1px rgba(35, 36, 52, .03); }
.heatmap-level-1 { background: #ded9ff; }
.heatmap-level-2 { background: #aaa0fb; }
.heatmap-level-3 { background: #7664ed; }
.heatmap-level-4 { background: #4f36d7; }
.strategy-heatmap footer { width: 234px; color: var(--subtle); font-size: 9px; }
.strategy-heatmap-compact { margin: 0 0 16px; padding: 13px; border-radius: 14px; background: #fff; }
.strategy-heatmap-compact .strategy-heatmap-grid { grid-template-columns: repeat(14, 11px); gap: 3px; }
.strategy-heatmap-compact .strategy-heatmap-cell { width: 11px; height: 11px; border-radius: 3px; }
.strategy-heatmap-compact footer { width: 193px; }

.transcriber-page { width: min(var(--workspace-width), calc(100% - var(--workspace-gutter))); }
.transcriber-privacy { flex: 0 0 auto; padding: 10px 13px; color: #087552; border: 1px solid #c3ead9; border-radius: 999px; background: rgba(231, 248, 241, .9); box-shadow: var(--shadow-xs); font-size: 11px; font-weight: 800; }
.transcriber-privacy::before { content: "✓"; display: inline-grid; place-items: center; width: 17px; height: 17px; margin-right: 6px; color: #fff; border-radius: 50%; background: var(--green); font-size: 9px; }
.transcriber-new-card { position: relative; padding: clamp(26px, 4vw, 36px); overflow: hidden; border-radius: var(--radius-lg); box-shadow: 0 18px 50px rgba(43, 37, 110, .09); }
.transcriber-new-card::after { content: ""; position: absolute; top: -95px; right: -70px; width: 230px; height: 230px; border-radius: 50%; background: radial-gradient(circle, rgba(108, 93, 244, .16), transparent 68%); pointer-events: none; }
.transcriber-new-copy { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 15px; }
.transcriber-new-icon { display: grid; place-items: center; flex: 0 0 50px; height: 50px; color: #fff; border-radius: 16px; background: linear-gradient(145deg, #8477ff, #5043dc); box-shadow: 0 14px 30px rgba(81, 68, 223, .28); font-size: 25px; font-weight: 400; }
.transcriber-new-copy h2 { margin: 3px 0 5px; font-size: clamp(23px, 3vw, 30px); }
.transcriber-new-copy p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.transcriber-create-form { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 23px; }
.transcriber-create-form input { min-height: 54px; margin: 0; padding-inline: 18px; background: rgba(255, 255, 255, .9); }
.transcriber-create-form .button { min-width: 174px; }
.transcriber-create-form .button b { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.transcriber-create-form .button.is-loading { opacity: .65; }
.transcriber-library { margin-top: 42px; }
.transcriber-library-toolbar { margin-bottom: 16px; }
.transcriber-library-toolbar h2 { margin: 3px 0 0; }
.transcriber-library-summary { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.transcriber-library-summary > span { padding: 7px 10px; color: var(--muted); border-radius: 10px; background: #eeeff4; font-size: 10px; }
.transcriber-library-summary strong { color: var(--ink); font-size: 13px; }
.transcriber-library-summary .text-button { margin-left: 4px; }
.transcriber-library-summary .text-button:disabled { opacity: .35; cursor: default; }
.transcription-library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.transcription-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255, 255, 255, .97); box-shadow: var(--shadow-sm); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.transcription-card:hover { border-color: #cfc9ff; box-shadow: 0 16px 36px rgba(61, 51, 153, .1); transform: translateY(-2px); }
.transcription-card-main { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 13px; min-height: 205px; padding: 17px; color: inherit; text-decoration: none; }
.transcription-card-top { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.transcription-card-top time { color: var(--subtle); font-size: 10px; }
.transcription-card-status { display: inline-flex; align-items: center; min-height: 25px; padding: 5px 8px; color: #8b5d04; border-radius: 8px; background: #fff4d4; font-size: 9px; font-weight: 820; letter-spacing: .025em; text-transform: uppercase; }
.transcription-card.status-completed .transcription-card-status { color: #08724e; background: var(--green-soft); }
.transcription-card.status-failed .transcription-card-status { color: var(--red); background: var(--red-soft); }
.transcription-card.status-processing .transcription-card-icon { animation: transcription-pulse 1.5s ease-in-out infinite; }
@keyframes transcription-pulse { 50% { box-shadow: 0 0 0 8px rgba(104, 91, 244, .11); } }
.transcription-card-icon { display: grid; place-items: center; width: 46px; height: 46px; color: #fff; border-radius: 15px; background: linear-gradient(145deg, #8579ff, #5548e4); box-shadow: 0 9px 20px rgba(81, 68, 223, .2); font-size: 14px; }
.transcription-card-copy { min-width: 0; }
.transcription-card-copy h3 { display: -webkit-box; margin: 1px 0 4px; overflow: hidden; font-size: 16px; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.transcription-card-copy p { margin: 0; color: var(--muted); font-size: 11px; }
.transcription-card-copy > span { display: -webkit-box; margin-top: 13px; overflow: hidden; color: var(--ink-soft); font-size: 12px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.transcription-card-meta { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; }
.transcription-card-meta b { display: grid; place-items: center; width: 28px; height: 28px; color: var(--brand-dark); border-radius: 9px; background: var(--brand-soft); font-size: 15px; transition: transform .18s ease; }
.transcription-card:hover .transcription-card-meta b { transform: translateX(2px); }
.transcription-library-empty { grid-column: 1 / -1; display: grid; place-items: center; min-height: 270px; padding: 34px; border: 1px dashed #d2cffa; border-radius: 26px; background: linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(246, 244, 255, .72)); text-align: center; }
.transcription-library-empty > span { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 10px; color: var(--brand-dark); border-radius: 15px; background: var(--brand-soft); font-size: 22px; }
.transcription-library-empty strong { font-size: 17px; }
.transcription-library-empty p { max-width: 410px; margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.transcriber-detail-page { width: min(920px, calc(100% - 40px)); }
.transcriber-detail-head { margin-bottom: 22px; }
.transcriber-back { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 24px; color: var(--brand-dark); font-size: 12px; font-weight: 760; text-decoration: none; }
.transcriber-back:hover span { text-decoration: underline; }
.transcriber-detail-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.transcriber-detail-title h1 { max-width: 720px; margin: 5px 0 7px; font-size: clamp(29px, 5vw, 46px); line-height: 1.08; }
.transcriber-detail-title p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.transcription-detail-status { flex: 0 0 auto; padding: 8px 11px; color: #8b5d04; border-radius: 10px; background: #fff4d4; font-size: 10px; font-weight: 820; text-transform: uppercase; }
.transcription-detail-status.status-completed { color: #08724e; background: var(--green-soft); }
.transcription-detail-status.status-failed { color: var(--red); background: var(--red-soft); }
.transcriber-detail-shell { overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: rgba(255, 255, 255, .94); box-shadow: var(--shadow-md); }
.transcriber-detail-toolbar { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.transcriber-detail-toolbar > div { display: flex; align-items: center; gap: 9px; }
.transcriber-detail-toolbar a { color: var(--brand-dark); font-size: 11px; font-weight: 740; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.transcriber-chat { min-height: 440px; overflow: auto; padding: 34px 24px 24px; background: linear-gradient(180deg, #f7f7fb, #fbfbfd); scroll-behavior: smooth; }
.transcriber-single-chat { max-height: min(65vh, 720px); }
.transcription-turn { display: grid; gap: 11px; margin: 0 0 22px; }
.chat-row { display: flex; align-items: flex-end; gap: 9px; }
.chat-row-user { justify-content: flex-end; padding-left: 18%; }
.chat-row-assistant { padding-right: 10%; }
.chat-avatar { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; color: #fff; border-radius: 10px; background: linear-gradient(145deg, #766bff, #4c42de); font-size: 12px; font-weight: 850; box-shadow: 0 6px 14px rgba(98, 88, 245, .18); }
.chat-bubble { max-width: min(680px, 100%); padding: 13px 15px; border: 1px solid var(--line); border-radius: 18px 18px 18px 5px; background: #fff; box-shadow: 0 5px 16px rgba(30, 31, 49, .04); overflow-wrap: anywhere; }
.chat-row-user .chat-bubble { color: #fff; border: 0; border-radius: 18px 18px 5px 18px; background: linear-gradient(145deg, #6e62fa, #5145df); }
.chat-row-user a { color: inherit; font-size: 13px; font-weight: 650; }
.chat-bubble strong, .chat-bubble span { display: block; }
.chat-bubble span { margin-top: 3px; color: var(--muted); font-size: 13px; }
.transcriber-source-message { margin-bottom: 28px; }
.transcriber-source-message .chat-bubble { min-width: min(500px, 82%); }
.transcriber-source-message small { display: block; margin-bottom: 5px; color: rgba(255, 255, 255, .68); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.transcriber-source-message strong { margin-bottom: 6px; font-size: 15px; }
.transcript-bubble { min-width: min(620px, calc(100vw - 150px)); }
.transcript-bubble.status-failed { color: #892130; border-color: #f0cbd1; background: #fff7f8; }
.transcript-bubble.status-failed span { color: #9f4654; }
.failure-heading { display: flex; align-items: flex-start; gap: 10px; }
.failure-heading > i { flex: 0 0 26px; width: 26px; height: 26px; display: grid; place-items: center; color: #fff; border-radius: 9px; background: var(--red); font-size: 13px; font-style: normal; font-weight: 850; }
.failure-heading span { margin-top: 2px; }
.failure-hint { margin: 12px 0 0; color: #78404a; font-size: 12px; line-height: 1.5; }
.failure-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.failure-actions button,
.failure-actions a { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 7px 10px; color: var(--brand-dark); border: 1px solid #d7d2ff; border-radius: 10px; background: #fff; font-size: 11px; font-weight: 760; text-decoration: none; cursor: pointer; }
.failure-actions button { color: #fff; border-color: var(--brand); background: var(--brand); }
.transcript-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.transcript-actions > div span { margin-top: 2px; font-size: 10px; }
.transcript-actions button { padding: 5px 8px; color: var(--brand-dark); border: 0; border-radius: 8px; background: var(--brand-soft); font-size: 11px; font-weight: 760; cursor: pointer; }
.transcript-bubble pre { max-height: none; margin: 15px 0 0; overflow: visible; color: var(--ink-soft); font: 13px/1.7 Inter, ui-sans-serif, system-ui, sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.typing-indicator { display: flex; gap: 4px; margin-top: 10px; }
.typing-indicator b { width: 6px; height: 6px; border-radius: 50%; background: #aaa5c9; animation: typing-pulse 1.1s infinite ease-in-out; }
.typing-indicator b:nth-child(2) { animation-delay: .14s; }
.typing-indicator b:nth-child(3) { animation-delay: .28s; }
@keyframes typing-pulse { 0%, 70%, 100% { opacity: .35; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }
.transcriber-detail-actions { display: flex; align-items: center; gap: 9px; padding: 14px 16px; border-top: 1px solid var(--line); background: #fff; }
.transcriber-detail-actions form { display: none; }
.transcriber-detail-actions #delete-transcription { margin-left: auto; color: var(--red); }
.composer-status { margin: 12px 16px 16px; padding: 10px 12px; color: #7c2634; border: 1px solid #f0cbd1; border-radius: 12px; background: #fff7f8; font-size: 12px; }
.transcriber-new-card .composer-status { position: relative; z-index: 1; margin: 12px 0 0; }
.composer-status[hidden] { display: none; }
.composer-status strong,
.composer-status span { display: block; }
.composer-status span { margin-top: 2px; color: #9f4654; }

.admin-transcriptions-card { padding: clamp(20px, 3vw, 30px); margin-bottom: 18px; }
.admin-mini-stats { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.admin-mini-stats span { padding: 6px 9px; color: var(--muted); border-radius: 10px; background: var(--surface-soft); font-size: 10px; }
.admin-mini-stats strong { color: var(--ink); font-size: 13px; }
.admin-mini-stats .has-error { color: var(--red); background: var(--red-soft); }
.admin-mini-stats .has-error strong { color: var(--red); }
.admin-job-list { display: grid; gap: 10px; margin-top: 20px; }
.admin-job-item { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.admin-job-item.is-error { border-color: #f0cbd1; background: #fffafb; }
.admin-job-state { display: flex; align-items: flex-start; flex-direction: column; gap: 7px; }
.admin-job-state time { color: var(--muted); font-size: 10px; }
.status-job-completed { color: #08724e; border-color: #c8eadc; background: var(--green-soft); }
.status-job-failed { color: var(--red); border-color: #f0cbd1; background: var(--red-soft); }
.status-job-processing,
.status-job-queued { color: #8b5d04; border-color: #f0d89c; background: #fff5d9; }
.admin-job-content { min-width: 0; }
.admin-job-content > strong { display: inline-block; margin-right: 10px; font-size: 13px; }
.admin-job-content > a { color: var(--brand-dark); font-size: 11px; font-weight: 720; }
.admin-job-content p { margin: 5px 0 0; color: var(--ink-soft); font-size: 12px; }
.admin-job-content small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.admin-job-content details { margin-top: 8px; }
.admin-job-content summary { width: fit-content; color: var(--brand-dark); font-size: 10px; cursor: pointer; }
.admin-job-content code { display: inline-block; padding: 4px 7px; margin-top: 6px; border-radius: 7px; background: var(--surface-soft); font-size: 10px; }

.strategy-manager {
  margin: 0 0 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow-sm);
}
.strategy-manager-head { align-items: flex-end; }
.strategy-manager-head h2 { margin: 3px 0; }
.strategy-manager-head p { margin: 0; color: var(--muted); font-size: 12px; }
.strategy-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 16px; }
.strategy-tab {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 15px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  text-decoration: none;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.strategy-tab:hover { transform: translateY(-1px); border-color: #c9c3ff; box-shadow: 0 8px 22px rgba(91, 72, 214, .09); }
.strategy-tab.is-active { border-color: #8d7dff; background: linear-gradient(145deg, #fff 36%, #f4f2ff); box-shadow: 0 0 0 3px rgba(101, 80, 236, .1), 0 12px 26px rgba(70, 55, 176, .08); }
.strategy-tab-state { width: 9px; height: 9px; border-radius: 50%; background: #c5c7d1; }
.strategy-tab-state.is-running { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.strategy-tab strong, .strategy-tab small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strategy-tab strong { font-size: 14px; }
.strategy-tab small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.strategy-tab b { color: var(--muted); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.strategy-name-field { margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
#strategy-name { max-width: 460px; margin-bottom: 14px; font-size: 18px; font-weight: 800; }
.strategy-delete { margin: 14px 0 22px; text-align: right; }

.admin-connection-grid { grid-template-columns: minmax(0, 1fr); }
.admin-strategies-card { margin-bottom: 18px; }
.admin-strategy-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 18px; }
.admin-strategy-item { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-soft); }
.admin-strategy-item > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.admin-strategy-item h3 { margin: 0 0 8px; font-size: 17px; }
.admin-strategy-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 16px 0; }
.admin-strategy-stats span { min-width: 0; padding: 9px; border-radius: 11px; background: #fff; }
.admin-strategy-stats strong, .admin-strategy-stats small { display: block; }
.admin-strategy-stats strong { font-size: 17px; }
.admin-strategy-stats small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.admin-definition-list.compact { margin-top: 0; }

.panel { margin: 18px 0; padding: clamp(24px, 3vw, 32px); }
.panel p { margin: 6px 0 0; color: var(--muted); }

.activation-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-color: #d8d4ff;
  background: linear-gradient(120deg, #fff 0, #fbfaff 62%, #efecff 100%);
  box-shadow: 0 18px 46px rgba(54, 43, 140, .09);
}

.activation-panel::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--brand);
}

.activation-copy { min-width: 0; }
.activation-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.activation-description { font-size: 14px; }

.automation-state {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.automation-state::before { content: ""; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: currentColor; }
.state-running { color: #087149; background: var(--green-soft); }
.state-stopped { color: #6f7180; background: #edeef2; }
.state-pending { color: var(--amber); background: var(--amber-soft); }
.state-error { color: #892130; background: var(--red-soft); }

.launch-panel { overflow: hidden; }

.launch-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: clamp(-30px, -3vw, -22px);
  padding: clamp(22px, 3vw, 30px);
  cursor: pointer;
  list-style: none;
}

.launch-panel > summary::-webkit-details-marker { display: none; }
.launch-panel > summary::after { content: "⌄"; flex: 0 0 auto; color: var(--subtle); font-size: 21px; transition: transform .2s; }
.launch-panel[open] > summary::after { transform: rotate(180deg); }
.launch-panel[open] > summary { margin-bottom: 0; padding-bottom: 20px; }
.launch-panel.test-complete { border-color: #bee8d7; background: #fbfffd; }

.test-heading { display: flex; align-items: center; gap: 13px; }
.test-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  height: 38px;
  color: var(--brand-dark);
  border-radius: 12px;
  background: var(--brand-soft);
  font-size: 13px;
  font-weight: 900;
}

.test-complete .test-icon { color: #fff; background: var(--green); }
.test-result { flex: 0 0 auto; margin-left: auto; padding: 6px 10px; color: var(--brand-dark); border-radius: 999px; background: var(--brand-soft); font-size: 11px; font-weight: 850; }
.test-complete .test-result { color: #087149; background: var(--green-soft); }
.test-progress { height: 5px; margin: 4px 0 3px; overflow: hidden; border-radius: 999px; background: #e9e8ee; }
.test-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #9088ff); transition: width .35s ease; }
.test-progress .progress-0 { width: 0; }
.test-progress .progress-1 { width: 33.333%; }
.test-progress .progress-2 { width: 66.667%; }
.test-progress .progress-3 { width: 100%; }
.test-complete .test-progress span { background: var(--green); }

.checklist {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  min-height: 56px;
  display: flex;
  align-items: center;
  padding: 10px 10px 10px 38px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
  font-size: 13px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 17px;
  height: 17px;
  border: 2px solid #c9cbd5;
  border-radius: 50%;
  transform: translateY(-50%);
}

.checklist li.done { color: var(--ink-soft); background: #fff; }
.checklist li.done::before { content: "✓"; display: grid; place-items: center; color: #fff; border-color: var(--green); background: var(--green); font-size: 10px; font-weight: 900; }
.test-hint { margin-top: 12px !important; font-size: 12px; }

.workspace-grid,
.dashboard-tail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
  align-items: start;
}

.dashboard-tail-content { min-width: 0; }
.dashboard-tail-content .account-panel { margin-top: 0; }

.settings-column, .preview-column { min-width: 0; }
.setup-panel { padding: 28px; }
.setup-panel { border-color: #e2e3ec; box-shadow: 0 12px 38px rgba(31, 33, 57, .055); }
.setup-panel:hover { border-color: #d8d5ef; }

.step-title {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.step-title > span {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  height: 34px;
  color: #fff;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--brand-bright), var(--brand-dark));
  box-shadow: 0 8px 18px rgba(74, 58, 204, .2);
  font-size: 13px;
  font-weight: 850;
}

.switch { display: flex; align-items: center; gap: 11px; margin: 0; cursor: pointer; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch > span { position: relative; flex: 0 0 46px; height: 27px; border-radius: 999px; background: #d7d9e2; transition: background .2s; }
.switch > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(0, 0, 0, .16); transition: transform .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(19px); }
.switch input:focus-visible + span { outline: 3px solid rgba(98, 88, 245, .2); outline-offset: 3px; }
.switch em { min-width: 0; color: var(--ink-soft); font-style: normal; font-weight: 720; }
.switch em strong, .switch em small { display: block; }
.switch em small { margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.35; }
.switch-prominent { flex-direction: row-reverse; }
.switch-prominent em { white-space: nowrap; }
.switch-prominent > span { flex-basis: 52px; height: 30px; }
.switch-prominent > span::after { width: 24px; height: 24px; }
.switch-prominent input:checked + span::after { transform: translateX(22px); }

.option-list { overflow: hidden; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 16px; }
.row-switch { min-height: 66px; padding: 12px 14px; background: #fbfbfd; }
.option-list .row-switch + .row-switch { border-top: 1px solid var(--line); }
.field-group { margin-top: 20px; }
.field-hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.field-hint-top { margin: -2px 0 10px; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.label-row label { margin: 0 0 8px; }
.label-row small { color: var(--subtle); font-size: 12px; }

.repeat-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.repeat-row textarea { min-height: 80px; }
.repeat-row > button {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  color: var(--subtle);
  border: 0;
  border-radius: 11px;
  background: var(--surface-soft);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.repeat-row > button:hover:not(:disabled) { color: var(--red); background: var(--red-soft); }
.repeat-row > button:disabled { opacity: .25; cursor: default; }
.add-option { margin-top: 7px; }

.field-grid { display: grid; grid-template-columns: minmax(170px, .7fr) 1.3fr; gap: 14px; margin-top: 16px; }
.hint-card { align-self: end; min-height: 82px; display: flex; gap: 10px; padding: 13px; border: 1px solid #e0ddff; border-radius: 14px; background: #f7f6ff; }
.hint-card > span { display: grid; place-items: center; flex: 0 0 22px; height: 22px; color: #fff; border-radius: 50%; background: var(--brand); font-size: 12px; font-weight: 900; }
.hint-card p { font-size: 12px; line-height: 1.4; }

.feature-block { margin-top: 22px; padding: 4px 16px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.feature-block .row-switch { margin-inline: -2px; padding-inline: 2px; background: transparent; }
.feature-block select, .feature-block textarea { background: #fff; }

.preview-sticky { position: sticky; top: 86px; }
.preview-panel { padding: 24px; }
.preview-panel { border-color: #dddaf3; box-shadow: 0 18px 48px rgba(34, 31, 76, .09); }
.preview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.preview-caption { font-size: 12px; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; color: #087149; border-radius: 999px; background: var(--green-soft); font-size: 10px; font-weight: 850; }
.live-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(16, 151, 106, .13); }

.journey { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 17px 0 14px; color: var(--subtle); font-size: 10px; font-weight: 750; }
.journey button { appearance: none; margin: 0; padding: 6px 9px; color: inherit; border: 0; border-radius: 999px; background: var(--surface-soft); font: inherit; line-height: 1.2; cursor: pointer; transition: color .16s ease, background .16s ease, transform .16s ease; }
.journey button:hover { color: var(--text); background: #e9e9f1; transform: translateY(-1px); }
.journey button:focus-visible { outline: 3px solid rgba(98, 88, 245, .22); outline-offset: 2px; }
.journey .journey-active { color: var(--brand-dark); background: var(--brand-soft); }
.journey i { width: 14px; height: 1px; background: var(--line-strong); }

.phone-preview {
  width: min(100%, 322px);
  max-height: 620px;
  margin: 0 auto;
  overflow: auto;
  padding: 10px 12px 14px;
  border: 7px solid #252633;
  border-radius: 32px;
  background: #f2f2f6;
  box-shadow: 0 20px 40px rgba(22, 24, 39, .16);
  scrollbar-width: thin;
}

.preview-phone-top { display: flex; justify-content: space-between; padding: 2px 8px 9px; color: #343542; font-size: 9px; font-weight: 800; }
.preview-user { display: flex; align-items: center; gap: 9px; margin: 0 -2px 20px; padding: 8px 7px 11px; border-bottom: 1px solid #dcdee5; font-size: 11px; }
.preview-avatar { flex-basis: 30px; width: 30px; height: 30px; }
.preview-user strong, .preview-user small { display: block; }
.preview-user small { color: var(--subtle); font-size: 9px; font-weight: 500; }
.preview-stage-panel { min-height: 190px; }
.preview-context-label { margin: 3px 3px 11px; color: var(--subtle); font-size: 8px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.preview-comment { display: flex; align-items: flex-start; gap: 8px; padding: 10px 8px; border-radius: 14px; background: #fff; box-shadow: 0 2px 7px rgba(0, 0, 0, .045); }
.preview-comment + .preview-comment { margin-top: 9px; }
.preview-comment-reply { margin-left: 20px; background: #e8e5ff; }
.preview-person-avatar { display: grid; place-items: center; flex: 0 0 24px; height: 24px; color: #fff; border-radius: 50%; background: #989baa; font-size: 9px; font-weight: 850; }
.preview-person-avatar.creator-avatar { background: linear-gradient(145deg, #ff7c91, #b352f2); }
.preview-comment > span:last-child { min-width: 0; }
.preview-comment strong, .preview-comment span span { display: block; }
.preview-comment strong { margin-bottom: 2px; font-size: 9px; }
.preview-comment span span { font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.bubble { max-width: 91%; margin: 8px 0 0; padding: 11px 12px; border-radius: 17px 17px 17px 5px; background: #fff; box-shadow: 0 2px 7px rgba(0, 0, 0, .045); font-size: 12px; line-height: 1.4; white-space: pre-wrap; }
.bubble.secondary { margin-top: 19px; }
.preview-button { max-width: 91%; margin: 2px 0 0; padding: 10px; color: #3c72d1; border-radius: 4px 4px 15px 5px; background: #fff; text-align: center; font-size: 12px; font-weight: 760; }
.preview-branch-label { max-width: 91%; margin: 18px 0 4px; color: var(--subtle); font-size: 8px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.preview-composer { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding: 9px 11px; color: #9a9ca8; border: 1px solid #daddE4; border-radius: 999px; background: #fafafd; font-size: 10px; }
.preview-composer i { color: #6e7080; font-style: normal; font-size: 15px; }
.preview-note { margin-top: 14px !important; text-align: center; font-size: 10px; }

.save-bar {
  position: fixed;
  z-index: 65;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(560px, calc(100vw - 32px));
  padding: 8px 8px 8px 12px;
  border: 1px solid rgba(222, 223, 232, .94);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 42px rgba(31, 33, 57, .15);
  backdrop-filter: blur(18px) saturate(150%);
  transform: translateX(-50%);
}

.save-message { min-width: 0; display: flex; align-items: center; gap: 10px; }
.save-indicator { display: grid; place-items: center; flex: 0 0 31px; height: 31px; color: var(--amber); border-radius: 10px; background: var(--amber-soft); font-size: 12px; font-weight: 900; }
.save-message strong, .save-message small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.save-message strong { font-size: 13px; }
.save-message small { margin-top: 1px; color: var(--muted); font-size: 10px; }
.save-bar .button { min-width: 132px; min-height: 42px; }
.save-bar .button:disabled { color: #8b8d99; background: #edeef2; box-shadow: none; cursor: default; opacity: 1; }
.save-state.has-changes { color: var(--amber); }
.save-bar.has-changes .save-indicator { color: var(--amber); background: var(--amber-soft); }
.save-bar.is-saved { border-color: #bcebd6; }
.save-bar.is-saved .save-indicator { color: #fff; background: var(--green); }
.save-bar.save-error { border-color: #f0bdc5; }
.save-bar.save-error .save-indicator { color: var(--red); background: var(--red-soft); }

.account-panel { padding: 0; overflow: hidden; }
.account-panel > summary { padding: 20px 24px; cursor: pointer; list-style: none; }
.account-panel > summary::-webkit-details-marker { display: none; }
.account-panel > summary > span { display: flex; align-items: center; gap: 12px; }
.account-panel > summary > span::after { content: "⌄"; margin-left: auto; color: var(--subtle); font-size: 20px; transition: transform .2s; }
.account-panel[open] > summary > span::after { transform: rotate(180deg); }
.account-settings-icon { display: grid; place-items: center; flex: 0 0 35px; height: 35px; color: var(--muted); border-radius: 11px; background: var(--surface-soft); }
.account-panel summary strong, .account-panel summary small { display: block; }
.account-panel summary small { margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 500; }
.account-panel-body { padding: 0 24px 24px; border-top: 1px solid var(--line); }
.account-panel dl { margin: 14px 0 18px; }
.account-panel dl div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.account-panel dt { color: var(--muted); }
.account-panel dd { margin: 0; font-weight: 700; text-align: right; }
.account-panel form { margin-top: 14px; }

.verification-page { display: grid; min-height: calc(100vh - 190px); place-items: center; }
.verification-card { width: min(560px, 100%); padding: clamp(28px, 6vw, 54px); text-align: center; }
.verification-card h1 { margin: 10px 0 12px; font-size: clamp(30px, 6vw, 48px); letter-spacing: -.04em; }
.verification-card > p:not(.section-kicker) { max-width: 440px; margin: 0 auto 26px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.verification-icon { display: grid; width: 64px; height: 64px; margin: 0 auto 20px; place-items: center; border-radius: 20px; background: var(--red-soft); color: var(--red); font-size: 30px; font-weight: 900; }
.verification-icon.is-success { background: var(--green-soft); color: var(--green); }

/* Creator feedback */
.feedback-trigger {
  position: fixed;
  z-index: 70;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 15px 10px 11px;
  color: #fff;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(145deg, #7065ff, #5146dd);
  box-shadow: 0 14px 34px rgba(81, 70, 221, .28);
  cursor: pointer;
  transition: bottom .2s ease, transform .16s ease, box-shadow .16s ease;
}
.feedback-trigger > span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: rgba(255, 255, 255, .16); }
.feedback-trigger b { font-size: 12px; letter-spacing: .01em; }
.feedback-trigger:hover { transform: translateY(-1px); box-shadow: 0 18px 38px rgba(81, 70, 221, .34); }
.save-action-visible .feedback-trigger { bottom: max(92px, calc(env(safe-area-inset-bottom) + 82px)); }
.save-action-visible .page { padding-bottom: 88px; }

.feedback-dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: min(820px, calc(100dvh - 28px));
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid rgba(216, 217, 230, .9);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(27, 28, 48, .26);
}
.feedback-dialog::backdrop { background: rgba(21, 22, 37, .46); backdrop-filter: blur(7px); }
.feedback-dialog-card { max-height: inherit; overflow-y: auto; }
.feedback-dialog-head { display: flex; justify-content: space-between; gap: 22px; padding: 26px 28px 20px; border-bottom: 1px solid var(--line); }
.feedback-dialog-head h2 { margin: 3px 0 5px; font-size: 27px; }
.feedback-dialog-head p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.feedback-close { flex: 0 0 36px; width: 36px; height: 36px; padding: 0; color: var(--muted); border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); font-size: 23px; line-height: 1; cursor: pointer; }
.feedback-form { padding: 22px 28px 24px; }
.feedback-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 0 0 20px; padding: 0; border: 0; }
.feedback-types legend { grid-column: 1 / -1; margin-bottom: 8px; font-size: 12px; font-weight: 780; }
.feedback-types label { position: relative; margin: 0; cursor: pointer; }
.feedback-types input { position: absolute; opacity: 0; pointer-events: none; }
.feedback-types label > span { display: flex; min-height: 108px; padding: 13px; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); transition: border-color .16s, background .16s, box-shadow .16s; }
.feedback-types label > span > b { display: grid; place-items: center; width: 27px; height: 27px; margin-bottom: 9px; color: var(--brand-dark); border-radius: 9px; background: var(--brand-soft); font-size: 11px; }
.feedback-types strong, .feedback-types small { display: block; }
.feedback-types strong { font-size: 13px; }
.feedback-types small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.feedback-types input:checked + span { border-color: #aaa3ff; background: #f5f3ff; box-shadow: 0 0 0 3px rgba(98, 88, 245, .09); }
.feedback-types input:focus-visible + span { outline: 3px solid rgba(98, 88, 245, .25); outline-offset: 2px; }
.feedback-form > label { margin-bottom: 7px; font-size: 12px; font-weight: 780; }
.feedback-form textarea { min-height: 132px; resize: vertical; }
.feedback-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 10px; }
.feedback-form-footer > span { color: var(--subtle); font-size: 10px; font-variant-numeric: tabular-nums; }
.feedback-form-footer .button { min-width: 150px; }
.feedback-result { margin-top: 13px; padding: 11px 13px; border-radius: 12px; font-size: 12px; font-weight: 690; }
.feedback-result.is-success { color: #08724e; background: var(--green-soft); }
.feedback-result.is-error { color: var(--red); background: var(--red-soft); }
.feedback-history { padding: 22px 28px 28px; border-top: 1px solid var(--line); background: #fafafd; }
.feedback-history > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.feedback-history h3 { margin: 0; font-size: 16px; }
.feedback-history > div:first-child small { color: var(--muted); font-size: 10px; }
.feedback-history-item { padding: 13px 0; border-top: 1px solid var(--line); }
.feedback-history-item:first-child { border-top: 0; }
.feedback-history-item > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feedback-history-item strong { font-size: 11px; }
.feedback-history-item span { padding: 4px 7px; color: var(--brand-dark); border-radius: 999px; background: var(--brand-soft); font-size: 9px; font-weight: 800; }
.feedback-history-item.status-done span { color: #08724e; background: var(--green-soft); }
.feedback-history-item.status-closed span { color: var(--muted); background: #ececf1; }
.feedback-history-item p { margin: 8px 0 5px; color: var(--ink-soft); font-size: 12px; white-space: pre-line; }
.feedback-history-item time, .feedback-history-empty { color: var(--subtle); font-size: 10px; }
.feedback-history-empty { margin: 0; padding: 10px 0; }

/* Admin feedback inbox */
.admin-feedback-card { margin-top: 18px; padding: clamp(20px, 3vw, 30px); }
.feedback-inbox-count { padding: 7px 10px; color: var(--brand-dark); border-radius: 999px; background: var(--brand-soft); font-size: 11px; font-weight: 820; }
.admin-feedback-list { display: grid; gap: 10px; margin-top: 20px; }
.admin-feedback-item { padding: 16px; border: 1px solid var(--line); border-left: 4px solid #cbc8ff; border-radius: 16px; background: #fff; }
.admin-feedback-item.status-new { border-left-color: var(--brand); background: #fdfcff; }
.admin-feedback-item.status-done { border-left-color: var(--green); }
.admin-feedback-item.status-closed { border-left-color: #bbbcc6; opacity: .78; }
.admin-feedback-meta, .admin-feedback-foot, .admin-feedback-foot form { display: flex; align-items: center; gap: 9px; }
.admin-feedback-meta time { margin-left: auto; color: var(--subtle); font-size: 10px; }
.feedback-category, .feedback-admin-status { padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 820; }
.feedback-category { color: var(--brand-dark); background: var(--brand-soft); }
.feedback-category.category-problem { color: #9b3b16; background: #fff0e9; }
.feedback-category.category-other { color: var(--muted); background: #eeeef3; }
.feedback-admin-status { color: var(--ink-soft); border: 1px solid var(--line); background: #fff; }
.admin-feedback-item > p { margin: 13px 0; color: var(--ink-soft); font-size: 13px; line-height: 1.55; white-space: pre-line; }
.admin-feedback-foot { justify-content: space-between; padding-top: 12px; border-top: 1px solid #efeff4; }
.admin-feedback-foot > a { color: var(--brand-dark); font-size: 12px; font-weight: 780; text-decoration: none; }
.admin-feedback-foot select { min-height: 34px; padding: 6px 34px 6px 9px; font-size: 11px; }
.admin-feedback-foot .button { min-height: 34px; }

/* Reels radar */
.radar-page { width: min(var(--workspace-width), calc(100% - var(--workspace-gutter))); }
.radar-section-head, .radar-result-top, .radar-card-actions,
.radar-form-actions, .radar-monitor-actions, .radar-monitor-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.radar-hero .button { flex: 0 0 auto; }
.radar-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 30px; }
.radar-summary > div { min-height: 100px; display: flex; align-items: center; gap: 15px; padding: 19px 21px; }
.radar-summary-icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; color: var(--brand-dark); border-radius: 14px; background: linear-gradient(145deg, #f2f0ff, #e8e4ff); font-size: 18px; font-weight: 900; }
.radar-summary small, .radar-summary strong { display: block; }
.radar-summary small { color: var(--muted); font-size: 11px; font-weight: 720; }
.radar-summary strong { margin-top: 4px; font-size: 29px; letter-spacing: -.04em; }
.radar-create { margin-bottom: 28px; padding: clamp(22px, 4vw, 34px); }
.radar-section-head { align-items: flex-start; }
.icon-button { flex: 0 0 38px; width: 38px; height: 38px; padding: 0; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); cursor: pointer; font-size: 22px; }
.radar-query-guide { margin: 20px 0 18px; padding: 14px 16px; border: 1px solid #dedbff; border-radius: 16px; background: #f8f7ff; }
.radar-query-guide summary { color: var(--brand-dark); cursor: pointer; font-size: 12px; font-weight: 820; }
.radar-query-guide-body { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 12px; margin-top: 14px; }
.radar-query-guide-body > div { min-width: 0; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .86); }
.radar-query-guide-body strong, .radar-query-guide-body code, .radar-query-guide-body small { display: block; }
.radar-query-guide-body strong { color: var(--ink); font-size: 11px; }
.radar-query-guide-body p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.radar-query-guide-body code { margin-top: 7px; color: var(--ink-soft); font-family: inherit; font-size: 10px; line-height: 1.55; }
.radar-query-guide-body small { margin-top: 7px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.radar-query-guide > .field-hint { margin: 12px 2px 0; }
.radar-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.radar-form-grid .radar-wide { grid-column: 1 / -1; }
.radar-form-grid textarea { min-height: 112px; }
.radar-form-grid .field-hint { margin-top: 6px; }
.radar-view-filter { margin-bottom: 18px; padding: 13px 14px 11px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.radar-range-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.radar-range-head label { margin: 0; }
.radar-range-head output { padding: 5px 8px; color: var(--brand-dark); border-radius: 9px; background: var(--brand-soft); font-size: 10px; font-weight: 820; white-space: nowrap; }
.radar-view-filter input[type="range"] { width: 100%; height: 24px; margin: 12px 0 2px; padding: 0; appearance: none; border: 0; background: transparent; cursor: pointer; }
.radar-view-filter input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--brand) 0 var(--range-progress, 0%), #dddde7 var(--range-progress, 0%) 100%); }
.radar-view-filter input[type="range"]::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -7px; appearance: none; border: 4px solid #fff; border-radius: 50%; background: var(--brand); box-shadow: 0 2px 8px rgba(65, 52, 185, .3); }
.radar-view-filter input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: #dddde7; }
.radar-view-filter input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--brand); }
.radar-view-filter input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 4px solid #fff; border-radius: 50%; background: var(--brand); box-shadow: 0 2px 8px rgba(65, 52, 185, .3); }
.radar-view-filter input[type="range"]:focus-visible { outline: 3px solid rgba(95, 78, 255, .2); outline-offset: 4px; }
.radar-range-scale { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); color: var(--muted); font-size: 7px; font-weight: 650; }
.radar-range-scale span { text-align: center; white-space: nowrap; }
.radar-range-scale span:first-child { text-align: left; }
.radar-range-scale span:last-child { text-align: right; }
.radar-option-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }
.radar-option { position: relative; cursor: pointer; }
.radar-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.radar-option span { display: block; padding: 9px 10px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 11px; background: #fff; text-align: center; font-size: 10px; font-weight: 740; transition: .16s ease; }
.radar-option input:checked + span { color: var(--brand-dark); border-color: rgba(95, 78, 255, .35); background: var(--brand-soft); box-shadow: inset 0 0 0 1px rgba(95, 78, 255, .08); }
.radar-option input:focus-visible + span { outline: 3px solid rgba(95, 78, 255, .2); outline-offset: 2px; }
.radar-filter-picker { margin: 4px 0 18px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.radar-filter-picker summary { cursor: pointer; font-size: 12px; font-weight: 800; }
.radar-filter-picker summary span { margin-left: 5px; color: var(--muted); font-size: 9px; font-weight: 600; }
.radar-country-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); max-height: 210px; padding: 3px 2px; overflow-y: auto; }
.radar-country-mode { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .7fr); align-items: center; gap: 12px; margin-top: 13px; }
.radar-country-mode label { margin: 0; }
.radar-cost { display: flex; align-items: flex-start; gap: 12px; margin-top: 20px; padding: 14px 16px; border: 1px solid #dedbff; border-radius: 16px; background: #f8f7ff; }
.radar-cost > span { display: grid; place-items: center; flex: 0 0 32px; height: 32px; color: var(--brand-dark); border-radius: 10px; background: var(--brand-soft); font-weight: 900; }
.radar-cost strong, .radar-cost p { display: block; }
.radar-cost strong { font-size: 13px; }
.radar-cost p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.radar-form-actions { justify-content: flex-start; margin-top: 18px; }
.radar-monitors, .radar-results { margin-top: 38px; }
.radar-monitor-list { display: grid; gap: 10px; margin-top: 15px; }
.radar-monitor { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 22px; padding: 21px 22px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255, 255, 255, .96); box-shadow: var(--shadow-sm); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.radar-monitor:hover { border-color: #d7d2ff; box-shadow: 0 16px 38px rgba(35, 33, 75, .08); transform: translateY(-1px); }
.radar-monitor > div:first-child { min-width: 0; display: flex; align-items: flex-start; gap: 11px; }
.radar-monitor > div:first-child > div { min-width: 0; }
.radar-monitor strong { font-size: 15px; }
.radar-monitor p { overflow: hidden; margin: 5px 0 0; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.radar-monitor-state { flex: 0 0 9px; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: #b9bbc5; box-shadow: 0 0 0 5px #f0f0f4; }
.radar-monitor-state.status-processing, .radar-monitor-state.status-queued { background: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); animation: radar-pulse 1.3s ease-in-out infinite; }
.radar-monitor-state.status-completed { background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.radar-monitor-state.status-failed { background: var(--red); box-shadow: 0 0 0 5px var(--red-soft); }
@keyframes radar-pulse { 50% { opacity: .42; } }
.radar-monitor-meta { gap: 7px; flex-direction: column; align-items: flex-end; color: var(--muted); font-size: 10px; }
.radar-monitor-meta span:first-child { color: var(--ink-soft); font-weight: 780; }
.radar-monitor-actions { justify-content: flex-end; gap: 5px; }
.radar-monitor-actions button { min-height: 34px; padding: 8px 10px; color: var(--brand-dark); border: 1px solid transparent; border-radius: 10px; background: var(--brand-soft); cursor: pointer; font-size: 10px; font-weight: 800; transition: background .16s ease, transform .16s ease; }
.radar-monitor-actions button:hover:not(:disabled) { background: #e5e1ff; transform: translateY(-1px); }
.radar-monitor-actions button:last-child { color: var(--muted); background: var(--surface-soft); }
.radar-monitor-actions button:disabled { opacity: .45; cursor: default; }
.radar-monitor-error { grid-column: 1 / -1; padding: 9px 11px; color: var(--red) !important; border-radius: 10px; background: var(--red-soft); white-space: normal !important; }
.radar-result-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 17px; }
.radar-result-card { min-width: 0; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.radar-result-card:hover { border-color: #d6d2ff; box-shadow: 0 20px 46px rgba(35, 32, 85, .1); transform: translateY(-2px); }
.radar-result-top { align-items: flex-start; }
.radar-result-top > div { min-width: 0; }
.radar-result-top strong, .radar-result-top small { display: block; }
.radar-result-top strong { margin-top: 9px; font-size: 16px; }
.radar-result-top small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.radar-result-top > b { color: var(--brand-dark); font-size: 29px; letter-spacing: -.05em; }
.radar-locale-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.radar-locale-tags span { max-width: 100%; overflow: hidden; padding: 5px 7px; color: var(--muted); border-radius: 8px; background: var(--surface-soft); font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.hit-level { display: inline-flex; padding: 5px 8px; color: #79530b; border-radius: 999px; background: var(--amber-soft); font-size: 9px; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; }
.hit-level.hit-strong { color: #a04118; background: #fff0e8; }
.hit-level.hit-viral { color: #fff; background: linear-gradient(145deg, #786dff, #5146dd); }
.radar-caption { min-height: 58px; margin: 16px 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.radar-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin: 0 0 16px; }
.radar-metrics > div { padding: 10px; border-radius: 12px; background: var(--surface-soft); }
.radar-metrics dt { color: var(--muted); font-size: 9px; }
.radar-metrics dd { margin: 3px 0 0; font-size: 14px; font-weight: 800; }
.radar-card-actions { justify-content: flex-start; flex-wrap: wrap; gap: 7px; }
.radar-card-actions .button { min-height: 39px; padding: 8px 11px; font-size: 10px; }
.radar-card-actions .radar-hide-result { margin-left: auto; color: var(--muted); border-color: transparent; background: transparent; box-shadow: none; }
.radar-card-actions .radar-hide-result:hover { color: var(--red); background: var(--red-soft); }
.radar-card-actions .radar-hide-result:disabled { opacity: .55; cursor: wait; }
.radar-empty { grid-column: 1 / -1; display: grid; place-items: center; min-height: 240px; padding: 32px; border: 1px dashed #d2cffa; border-radius: 26px; background: linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(246, 244, 255, .7)); text-align: center; }
.radar-empty > span { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 9px; color: var(--brand-dark); border-radius: 14px; background: var(--brand-soft); font-size: 20px; font-weight: 900; }
.radar-empty strong { font-size: 15px; }
.radar-empty p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }

.footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  width: min(var(--workspace-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 max(30px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 12px;
}

.footer a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); }
[hidden] { display: none !important; }

@media (max-width: 980px) {
  .workspace-grid,
  .dashboard-tail-grid { grid-template-columns: 1fr; }
  .preview-sticky { position: static; }
  .preview-panel { margin-top: 4px; }
  .phone-preview { width: min(100%, 350px); }
}

@media (max-width: 720px) {
  :root { --workspace-gutter: 28px; --page-header-gap: 20px; }
  .topbar { padding: max(9px, env(safe-area-inset-top)) 14px 9px; }
  .topbar-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px 12px;
  }
  .topbar-shell > .brand { grid-column: 1; grid-row: 1; width: fit-content; }
  .topbar-shell > .creator-nav { display: contents; }
  .topbar-shell > .locale-switch { grid-column: 2; grid-row: 1; margin-right: 54px; }
  .creator-nav nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .creator-nav nav a { min-width: 0; justify-content: center; padding-inline: 8px; }
  .creator-nav nav a span { overflow: hidden; text-overflow: ellipsis; }
  .creator-nav .account-menu { grid-column: 2; grid-row: 1; justify-self: end; }
  .page { padding-top: 24px; }
  .creator-page-header { align-items: flex-start; flex-direction: column; gap: 20px; padding: 26px; border-radius: 26px; }
  .creator-page-header::before { top: -145px; right: -125px; }
  .creator-page-actions { width: 100%; justify-content: flex-start; }
  .creator-section-head { align-items: flex-start; }
  .transcriber-privacy { display: inline-flex; }
  .transcriber-library-toolbar { align-items: flex-start; flex-direction: column; }
  .transcriber-library-summary { justify-content: flex-start; }
  .transcription-library-grid { grid-template-columns: 1fr; }
  .transcriber-detail-title { align-items: flex-start; flex-direction: column; }
  .hero-status { width: fit-content; min-width: 0; margin-top: 18px; }
  .checklist { grid-template-columns: 1fr; }
  .checklist li { min-height: 50px; }
  .field-grid { grid-template-columns: 1fr; }
  .strategy-manager-head { align-items: flex-start; flex-direction: column; }
  .strategy-manager-head form, .strategy-manager-head .button { width: 100%; }
  .radar-result-list { grid-template-columns: 1fr; }
  .radar-monitor { grid-template-columns: 1fr auto; }
  .radar-monitor-meta { grid-column: 1 / 2; align-items: flex-start; flex-direction: row; }
  .radar-monitor-actions { grid-column: 2; grid-row: 1 / 3; flex-direction: column; }
  .account-page-grid { grid-template-columns: 1fr; }
  .account-page-wide { grid-column: auto; }
}

@media (max-width: 560px) {
  .topbar { min-height: 0; padding-inline: 12px; }
  .brand-copy small, .account-chip .account-name { display: none; }
  .brand-name { display: block; }
  .creator-nav nav { max-width: none; overflow: visible; }
  .creator-nav nav a { min-height: 42px; flex-direction: column; gap: 2px; padding: 5px 3px; font-size: 9px; line-height: 1.1; }
  .creator-nav nav a svg { width: 15px; height: 15px; }
  .transcriber-new-card { padding: 19px 16px; border-radius: 22px; }
  .transcriber-new-copy { gap: 11px; }
  .transcriber-new-icon { flex-basis: 39px; height: 39px; border-radius: 12px; }
  .transcriber-create-form { grid-template-columns: 1fr; margin-top: 18px; }
  .transcriber-create-form .button { width: 100%; }
  .transcriber-library { margin-top: 28px; }
  .transcriber-library-summary .text-button { width: 100%; margin: 4px 0 0; text-align: left; }
  .transcription-card-main { min-height: 190px; padding: 15px; }
  .transcriber-detail-page { width: min(100% - 20px, 920px); }
  .transcriber-detail-title h1 { font-size: 30px; }
  .transcriber-detail-toolbar { align-items: flex-start; flex-direction: column; padding-block: 14px; }
  .transcriber-chat { min-height: 54vh; padding: 22px 12px 16px; }
  .chat-row-user { padding-left: 10%; }
  .chat-row-assistant { padding-right: 2%; }
  .transcript-bubble { min-width: 0; width: calc(100vw - 92px); }
  .transcriber-source-message .chat-bubble { min-width: 0; width: 88%; }
  .transcript-actions { align-items: flex-start; flex-direction: column; }
  .transcript-actions button { width: 100%; min-height: 36px; }
  .transcriber-detail-actions { align-items: stretch; flex-direction: column; }
  .transcriber-detail-actions .button { width: 100%; }
  .transcriber-detail-actions #delete-transcription { margin-left: 0; }
  .brand { font-size: 17px; }
  .brand-mark { width: 32px; height: 32px; }
  .account-chip { max-width: 50vw; }
  .account-menu-popover { position: fixed; top: 67px; right: 12px; }
  .account-menu-popover::before { right: 18px; }
  .account-session-action { align-items: stretch; flex-direction: column; }
  .account-session-action form,
  .account-session-action .button { width: 100%; }
  .account-email-settings form { grid-template-columns: 1fr; }
  .account-email-settings .button { width: 100%; }
  .account-action-row { align-items: stretch; flex-direction: column; }
  .account-action-row form,
  .account-action-row .button { width: 100%; }
  .page { width: min(100% - 24px, var(--workspace-width)); padding: 20px 0 82px; }
  .creator-page-header { padding: 22px 20px; border-radius: 23px; }
  .creator-page-header h1 { font-size: clamp(34px, 10vw, 42px); }
  .creator-page-header .eyebrow { margin-bottom: 11px; }
  .creator-page-header .button { width: 100%; }
  .creator-page-actions { align-items: stretch; flex-direction: column; }
  .creator-section-head { flex-direction: column; gap: 12px; }
  .creator-section-head h2 { font-size: 22px; }
  .lead.compact { font-size: 15px; }
  .metrics { gap: 7px; }
  .metrics > div { display: block; padding: 12px 9px; text-align: center; }
  .metric-icon { width: 28px; height: 28px; margin: 0 auto 7px; }
  .metrics strong { font-size: 18px; }
  .strategy-manager { padding: 16px; border-radius: 20px; }
  .strategy-tabs { grid-template-columns: 1fr; }
  .admin-strategy-list { grid-template-columns: 1fr; }
  .admin-strategy-item > header { align-items: flex-start; flex-direction: column; }
  .admin-strategy-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-section-head { flex-direction: column; }
  .admin-errors-head form,
  .admin-errors-head form .button { width: 100%; }
  .admin-error-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .admin-error-tabs a { justify-content: center; }
  .admin-error-item { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 13px; }
  .admin-error-marker { width: 32px; height: 32px; border-radius: 10px; }
  .admin-error-body > header { flex-direction: column; gap: 7px; }
  .admin-error-body > header > time { white-space: normal; }
  .admin-error-body footer { align-items: stretch; flex-direction: column; }
  .admin-error-body footer .admin-link { margin: 0; }
  .admin-error-body footer form,
  .admin-error-body footer .button { width: 100%; }
  .admin-mini-stats { justify-content: flex-start; }
  .admin-job-item { grid-template-columns: 1fr; gap: 9px; }
  .admin-job-state { align-items: center; flex-direction: row; justify-content: space-between; }
  .panel { border-radius: 20px; }
  .activation-panel { align-items: flex-start; flex-direction: column; }
  .switch-prominent { flex-direction: row; }
  .setup-panel { padding: 21px 18px; }
  .step-title { gap: 11px; }
  .step-title > span { flex-basis: 31px; height: 31px; }
  .launch-panel > summary { align-items: flex-start; }
  .test-heading { align-items: flex-start; }
  .test-result { display: none; }
  .option-list .row-switch { align-items: flex-start; }
  .option-list .switch > span { margin-top: 3px; }
  .repeat-row { align-items: flex-start; }
  .repeat-row > button { margin-top: 6px; }
  .preview-panel { padding: 20px 14px; }
  .save-bar { bottom: max(8px, env(safe-area-inset-bottom)); gap: 10px; width: calc(100vw - 16px); padding: 8px; }
  .save-message small { display: none; }
  .save-indicator { display: none; }
  .save-bar .button { min-width: 0; min-height: 50px; }
  .save-message { flex: 1 1 auto; padding-left: 7px; }
  .save-message strong { white-space: normal; line-height: 1.2; }
  .account-panel > summary { padding: 18px; }
  .account-panel-body { padding: 0 18px 20px; }
  .footer { gap: 12px; }
  .feedback-trigger { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: 43px; min-height: 43px; padding: 9px; border-radius: 14px; }
  .save-action-visible .feedback-trigger { bottom: max(76px, calc(env(safe-area-inset-bottom) + 68px)); }
  .feedback-trigger > span { width: 25px; height: 25px; }
  .feedback-trigger b { display: none; }
  .feedback-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 22px; }
  .feedback-dialog-head, .feedback-form, .feedback-history { padding-inline: 18px; }
  .feedback-types { grid-template-columns: 1fr; }
  .feedback-types label > span { min-height: 0; display: grid; grid-template-columns: 29px 1fr; column-gap: 9px; }
  .feedback-types label > span > b { grid-row: 1 / 3; margin: 0; }
  .feedback-form-footer .button { min-width: 130px; }
  .feedback-history > div:first-child { align-items: flex-start; flex-direction: column; gap: 3px; }
  .admin-feedback-foot { align-items: flex-start; flex-direction: column; }
  .admin-feedback-foot form { width: 100%; }
  .admin-feedback-foot select { flex: 1; min-width: 0; }
  .radar-summary { gap: 7px; }
  .radar-summary > div { padding: 13px 10px; text-align: center; }
  .radar-summary strong { font-size: 21px; }
  .radar-form-grid { grid-template-columns: 1fr; }
  .radar-form-grid .radar-wide { grid-column: auto; }
  .radar-query-guide-body { grid-template-columns: 1fr; }
  .radar-range-head { align-items: flex-start; flex-direction: column; gap: 7px; }
  .radar-range-scale { font-size: 6px; }
  .radar-option-grid, .radar-country-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .radar-country-mode { grid-template-columns: 1fr; }
  .radar-form-actions { align-items: stretch; flex-direction: column; }
  .radar-form-actions .button { width: 100%; }
  .radar-monitor { grid-template-columns: 1fr; }
  .radar-monitor-meta, .radar-monitor-actions { grid-column: auto; grid-row: auto; }
  .radar-monitor-actions { align-items: stretch; flex-direction: row; justify-content: flex-start; }
  .radar-monitor-actions button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Keep admin layout overrides after the shared creator styles. */
.page.admin-page { width: min(1320px, calc(100% - 40px)); }
.hero-icon.admin-hero-icon { background: linear-gradient(145deg, #232536, #11121c); }
.button.button-quiet { min-height: 34px; padding: 7px 10px; }

@media (max-width: 840px) {
  .page.admin-page { width: min(100% - 28px, 760px); }
}
/* Billing */
.billing-page { width: min(var(--workspace-width), calc(100% - var(--workspace-gutter))); max-width: none; }
.billing-page-actions { align-items: stretch; }
.billing-current-price {
  display: flex;
  align-items: baseline;
  padding: 13px 16px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 13px 32px rgba(54, 44, 134, .1);
}
.billing-current-price strong { font-size: 28px; letter-spacing: -.045em; }
.billing-current-price span, .billing-price span { margin-left: 4px; color: var(--muted); font-size: 12px; }
.billing-usage-card { padding: clamp(22px, 3vw, 30px); }
.billing-usage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.billing-usage-grid article { padding: 19px; border: 1px solid var(--line); border-radius: var(--radius-md); background: linear-gradient(145deg, #fbfbfe, #f6f5fc); }
.billing-usage-grid article strong { font-size: 14px; }
.billing-usage-grid article > div:first-child { display: flex; justify-content: space-between; gap: 12px; }
.billing-usage-grid span, .billing-usage-grid small { color: var(--muted); }
.billing-meter { height: 8px; margin: 14px 0 9px; overflow: hidden; border-radius: 20px; background: #e7e7ef; }
.billing-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #9c76ff); }
.free-plan-notice { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; margin: 0 0 18px; padding: 16px 18px; color: #f7f7ff; border: 1px solid rgba(203, 255, 90, .3); border-radius: 19px; background: linear-gradient(120deg, #171927, #27204c); box-shadow: 0 14px 35px rgba(25, 21, 64, .13); }
.free-plan-notice > span { display: grid; width: 42px; height: 42px; color: var(--ink); border-radius: 13px; background: var(--lime); font-size: 18px; font-weight: 950; place-items: center; }
.free-plan-notice strong, .free-plan-notice p { display: block; margin: 0; }
.free-plan-notice p { margin-top: 3px; color: rgba(247, 247, 255, .68); font-size: 12px; }
.free-plan-notice a { min-height: 40px; display: inline-flex; align-items: center; padding: 8px 12px; color: var(--ink); border-radius: 11px; background: var(--lime); font-size: 11px; font-weight: 850; text-decoration: none; }
.preview-branding { width: fit-content; margin: -3px 0 8px 12px; color: var(--subtle); font-size: 9px; font-weight: 720; }
.billing-plans { margin: 32px 0; }
.billing-plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-top: 18px; }
.billing-plan { position: relative; display: flex; min-height: 450px; flex-direction: column; padding: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: rgba(255, 255, 255, .97); box-shadow: var(--shadow-sm); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.billing-plan::after { content: ""; position: absolute; top: -90px; right: -85px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(103, 87, 239, .1), transparent 69%); pointer-events: none; }
.billing-plan:hover { border-color: #d3ceff; box-shadow: 0 22px 50px rgba(44, 38, 105, .11); transform: translateY(-3px); }
.billing-plan.is-featured { border-color: #cfcaff; background: linear-gradient(160deg, #fff 28%, #f4f1ff 100%); box-shadow: 0 20px 48px rgba(92, 74, 225, .15); }
.billing-plan.is-current { outline: 3px solid rgba(88, 205, 159, .16); }
.billing-plan h3 { margin: 0; font-size: 24px; letter-spacing: -.035em; }
.billing-plan > p { min-height: 48px; color: var(--muted); }
.billing-price { display: flex; align-items: baseline; margin: 8px 0 18px; }
.billing-price strong { font-size: 39px; letter-spacing: -.055em; }
.billing-plan ul { flex: 1; margin: 0 0 25px; padding: 0; list-style: none; }
.billing-plan li { position: relative; padding: 10px 0 10px 25px; border-bottom: 1px solid var(--line); font-size: 13px; }
.billing-plan li::before { content: "✓"; position: absolute; left: 0; top: 10px; display: grid; place-items: center; width: 17px; height: 17px; color: var(--green); border-radius: 50%; background: var(--green-soft); font-size: 9px; font-weight: 900; }
.billing-plan-badge { position: absolute; top: 20px; right: 20px; padding: 6px 9px; color: var(--brand-dark); border-radius: 999px; background: var(--brand-soft); font-size: 10px; font-weight: 800; }
.billing-plan-badge-free { color: #0a6849; background: var(--green-soft); }
.billing-plan form, .billing-plan button { width: 100%; }
.billing-setup-note { color: var(--muted); text-align: center; }
.billing-compare { margin-top: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow-sm); }
.billing-compare > div { display: grid; grid-template-columns: minmax(180px, 1.35fr) repeat(4, minmax(90px, 1fr)); align-items: center; min-height: 58px; border-top: 1px solid var(--line); }
.billing-compare > div:first-child { border-top: 0; }
.billing-compare span, .billing-compare b, .billing-compare strong { padding: 13px 16px; }
.billing-compare span { color: var(--muted); font-size: 12px; font-weight: 700; }
.billing-compare b, .billing-compare strong { text-align: center; font-size: 12px; }
.billing-compare-head { color: #fff; background: #191a29; }
.billing-compare-head span { color: rgba(255, 255, 255, .62); }
@media (max-width: 1100px) {
  .billing-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .billing-usage-grid, .billing-plan-grid { grid-template-columns: 1fr; }
  .billing-plan > p { min-height: 0; }
  .billing-plan { min-height: 0; }
  .billing-compare { overflow-x: auto; }
  .billing-compare > div { min-width: 700px; }
  .free-plan-notice { grid-template-columns: 38px minmax(0, 1fr); }
  .free-plan-notice > span { width: 38px; height: 38px; }
  .free-plan-notice a { grid-column: 1 / -1; justify-content: center; }
  .creator-nav nav { overflow-x: auto; }
}
.admin-billing-status{display:block;margin-top:3px;color:var(--muted)}.admin-billing-usage{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:18px}.admin-billing-usage div{display:flex;justify-content:space-between;gap:10px;padding:10px 12px;border-radius:12px;background:var(--surface-soft);font-size:.82rem}
.admin-billing-entitlement-actions{margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}.admin-billing-entitlement-actions form{display:flex;align-items:flex-end;flex-wrap:wrap;gap:10px}.admin-billing-entitlement-actions label{display:grid;gap:6px;color:var(--muted);font-size:.76rem;font-weight:750}.admin-billing-entitlement-actions select{min-width:150px;padding:10px 34px 10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit}.admin-inline-note{margin:0;color:var(--muted);font-size:.82rem;line-height:1.5}
.billing-access-alert{align-items:center;display:flex;justify-content:space-between;gap:16px}.billing-access-alert a{color:inherit;font-weight:800;white-space:nowrap}

/* Admin billing workspace */
.admin-billing-page { max-width: 1440px; }
.admin-billing-head { align-items: center; }
.admin-live.is-offline { color: var(--red); border-color: #f1ccd2; background: #fff8f9; }
.admin-sandbox-alert { color: #684b00; border-color: #efd99a; background: #fffaf0; }
.admin-sandbox-alert strong { color: #553d00; }
.admin-billing-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-billing-metrics .admin-metric strong time { font-size: 15px; letter-spacing: 0; }
.admin-launch-readiness { padding: clamp(20px, 3vw, 30px); margin: 0 0 18px; }
.admin-readiness-score { flex: 0 0 auto; color: #9a6200; font-size: 30px; letter-spacing: -.05em; text-align: right; }
.admin-readiness-score.is-ready { color: var(--green); }
.admin-readiness-score small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 760; letter-spacing: 0; text-transform: uppercase; }
.admin-readiness-meter { display: block; height: 7px; margin-top: 18px; overflow: hidden; border-radius: 99px; background: #ecebf4; }
.admin-readiness-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6a58f5, #9b75ff); }
.admin-readiness-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; padding: 0; margin: 18px 0 0; list-style: none; }
.admin-readiness-list li { display: flex; min-width: 0; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.admin-readiness-list li > span { display: grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; color: #8c6100; border-radius: 9px; background: #fff1c7; font-size: 10px; font-weight: 850; }
.admin-readiness-list li.is-complete > span { color: #087c59; background: #dff8ed; }
.admin-readiness-list strong, .admin-readiness-list small { display: block; }
.admin-readiness-list strong { font-size: 11px; line-height: 1.25; }
.admin-readiness-list small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.admin-readiness-note { margin: 14px 0 0; padding: 12px 14px; color: var(--muted); border-radius: 12px; background: var(--brand-soft); font-size: 10px; line-height: 1.5; }
.admin-readiness-note strong { color: var(--ink); }
.admin-test-label { display: block; margin-bottom: 2px; color: #9a6200; font-size: 8px; letter-spacing: .08em; }
.admin-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.admin-plan-card { padding: 20px; overflow: hidden; }
.admin-plan-card > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.admin-plan-card > div > span { font-size: 17px; font-weight: 820; }
.admin-plan-card > div > strong { color: var(--brand-dark); font-size: 25px; letter-spacing: -.04em; }
.admin-plan-card > div > strong small { margin-left: 2px; color: var(--muted); font-size: 10px; letter-spacing: 0; }
.admin-plan-card dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 0; }
.admin-plan-card dl div { padding: 10px; border-radius: 12px; background: var(--surface-soft); }
.admin-plan-card dt { color: var(--muted); font-size: 9px; font-weight: 760; text-transform: uppercase; }
.admin-plan-card dd { margin: 3px 0 0; font-size: 15px; font-weight: 820; }
.admin-plan-card.plan-creator { border-color: #d4d0ff; box-shadow: 0 16px 35px rgba(81, 70, 221, .09); }
.admin-growth-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 18px; margin-bottom: 18px; }
.admin-funnel-card, .admin-opportunities-card { padding: clamp(20px, 3vw, 30px); }
.admin-funnel-conversion { flex: 0 0 auto; color: var(--brand-dark); font-size: 30px; letter-spacing: -.05em; text-align: right; }
.admin-funnel-conversion small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 720; letter-spacing: 0; }
.admin-funnel-list, .admin-opportunities-list { padding: 0; margin: 20px 0 0; list-style: none; }
.admin-funnel-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.admin-funnel-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.admin-funnel-step { display: flex; min-width: 0; align-items: center; gap: 11px; }
.admin-funnel-step > span { display: grid; place-items: center; flex: 0 0 29px; width: 29px; height: 29px; color: var(--brand-dark); border-radius: 10px; background: var(--brand-soft); font-size: 11px; font-weight: 850; }
.admin-funnel-step strong, .admin-funnel-step small, .admin-funnel-result strong, .admin-funnel-result small { display: block; }
.admin-funnel-step strong { font-size: 13px; }
.admin-funnel-step small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-funnel-result { text-align: right; }
.admin-funnel-result strong { font-size: 19px; line-height: 1; }
.admin-funnel-result small { margin-top: 3px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.admin-funnel-meter { grid-column: 1 / -1; height: 5px; overflow: hidden; border-radius: 99px; background: #ecebf4; }
.admin-funnel-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6a58f5, #9b75ff); }
.admin-opportunities-count { display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 9px; color: var(--brand-dark); border-radius: 12px; background: var(--brand-soft); font-size: 13px; font-weight: 850; }
.admin-opportunities-list li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.admin-opportunities-list li:last-child { border-bottom: 0; }
.admin-opportunities-list .account-avatar { width: 36px; height: 36px; }
.admin-opportunities-list li > div { min-width: 0; }
.admin-opportunities-list li > div > span, .admin-opportunities-list li > div > strong, .admin-opportunities-list li > div > small { display: block; }
.admin-opportunities-list li > div > span { margin-bottom: 2px; color: var(--brand-dark); font-size: 9px; font-weight: 820; text-transform: uppercase; }
.admin-opportunities-list li > div > strong { font-size: 13px; }
.admin-opportunities-list li > div > small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-opportunities-list li.is-danger > div > span { color: var(--red); }
.admin-opportunities-list li.is-warning > div > span { color: #a55f00; }
.admin-opportunities-list li.is-hot > div > span { color: #6a45e7; }
.admin-opportunities-list .button { min-height: 34px; padding: 8px 11px; font-size: 10px; white-space: nowrap; }
.admin-opportunities-more { margin: 12px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.admin-billing-directory, .admin-stripe-events { padding: clamp(20px, 3vw, 30px); }
.admin-billing-directory { margin-bottom: 18px; }
.admin-billing-filters { grid-template-columns: minmax(250px, 1fr) 190px 180px auto auto; }
.admin-billing-table .status-pill + small { display: block; }
.billing-row-warning { margin-top: 5px; color: #a55f00; font-size: 9px; font-weight: 720; }
.billing-stripe-id { display: block; max-width: 130px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; }
.billing-usage-summary { min-width: 125px; }
.billing-usage-summary > strong { font-size: 13px; }
.billing-usage-summary > span { display: block; height: 5px; margin: 5px 0; overflow: hidden; border-radius: 99px; background: #e8e8f0; }
.billing-usage-summary > span i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6a58f5, #9b75ff); }
.billing-usage-summary > small { display: block; color: var(--muted); font-size: 9px; }
.admin-stripe-events ol { padding: 0; margin: 20px 0 0; list-style: none; }
.admin-stripe-events li { display: grid; grid-template-columns: 100px minmax(190px, 1fr) minmax(180px, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.admin-stripe-events li:last-child { border-bottom: 0; }
.admin-stripe-events li code { overflow: hidden; font-size: 11px; font-weight: 720; text-overflow: ellipsis; }
.admin-stripe-events li small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; }
.admin-stripe-events li time { color: var(--muted); font-size: 11px; white-space: nowrap; }

@media (max-width: 1100px) {
  .admin-billing-metrics { grid-template-columns: repeat(3, 1fr); }
  .admin-readiness-list { grid-template-columns: repeat(3, 1fr); }
  .admin-billing-filters { grid-template-columns: minmax(220px, 1fr) 170px 170px auto; }
  .admin-growth-grid { grid-template-columns: 1fr; }
}
@media (max-width: 840px) {
  .admin-billing-metrics, .admin-plan-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-readiness-list { grid-template-columns: repeat(2, 1fr); }
  .admin-billing-filters { grid-template-columns: 1fr 1fr; }
  .admin-billing-filters .admin-search { grid-column: 1 / -1; }
  .admin-stripe-events li { grid-template-columns: auto 1fr; }
  .admin-stripe-events li small { grid-column: 2; }
  .admin-stripe-events li time { grid-column: 2; }
}
@media (max-width: 620px) {
  .admin-billing-metrics, .admin-plan-grid, .admin-billing-filters { grid-template-columns: 1fr; }
  .admin-readiness-list { grid-template-columns: 1fr; }
  .admin-readiness-score { font-size: 24px; }
  .admin-billing-filters .admin-search { grid-column: auto; }
  .admin-billing-head .button { width: 100%; }
  .admin-plan-card dl { gap: 6px; }
  .admin-funnel-conversion { font-size: 24px; }
  .admin-funnel-step small { white-space: normal; }
  .admin-opportunities-list li { grid-template-columns: 36px minmax(0, 1fr); }
  .admin-opportunities-list .button { grid-column: 2; justify-self: start; }
}
