:root {
  color-scheme: light;
  --page: #f7f5ef;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-raised: #ffffff;
  --input-bg: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.92);
  --ink: #17212b;
  --muted: #667085;
  --line: #d8dee8;
  --navy: #17212b;
  --burgundy: #be3455;
  --gold: #b7791f;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --brand-soft: #edf7f5;
  --hero-bg: #17212b;
  --danger-bg: #fff5f5;
  --danger-bg-hover: #fee2e2;
  --green: #27745c;
  --red: #b42318;
  --shadow: 0 18px 48px rgba(24, 33, 43, 0.07);
  --deep-shadow: 0 24px 70px rgba(24, 33, 43, 0.22);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 32rem),
    linear-gradient(180deg, #edf7f5 0, var(--page) 38%);
  color: var(--ink);
}

body.dark-theme {
  color-scheme: dark;
  --page: #0e151b;
  --surface: #17212b;
  --surface-soft: #111b23;
  --surface-raised: #1b2833;
  --input-bg: #101a22;
  --header-bg: rgba(14, 21, 27, 0.92);
  --ink: #eef6f4;
  --muted: #a6b5c2;
  --line: #2b3a46;
  --navy: #eef6f4;
  --brand: #2dd4bf;
  --brand-dark: #5eead4;
  --brand-soft: rgba(45, 212, 191, 0.12);
  --hero-bg: #08131a;
  --danger-bg: rgba(185, 28, 28, 0.16);
  --danger-bg-hover: rgba(185, 28, 28, 0.24);
  --green: #5eead4;
  --gold: #fbbf24;
  --red: #fca5a5;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  --deep-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  background:
    radial-gradient(circle at top left, rgba(45, 212, 191, 0.16), transparent 32rem),
    linear-gradient(180deg, #111c24 0, var(--page) 42%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

body.booting .site-header,
body.booting main {
  visibility: hidden;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 32rem),
    linear-gradient(180deg, #edf7f5 0, var(--page) 38%);
}

body.boot-ready .boot-screen {
  display: none;
}

.boot-screen-card {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 28px 34px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.boot-screen-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
}

.hidden {
  display: none !important;
}

.topbar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.topbar-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  flex: 0 0 auto;
  cursor: pointer;
}

.topbar-menu-toggle:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
}

.topbar-menu-toggle-bars,
.topbar-menu-toggle-bars::before,
.topbar-menu-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.topbar-menu-toggle-bars {
  position: relative;
}

.topbar-menu-toggle-bars::before,
.topbar-menu-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.topbar-menu-toggle-bars::before {
  top: -6px;
}

.topbar-menu-toggle-bars::after {
  top: 6px;
}

.topbar-menu-toggle[aria-expanded="true"] .topbar-menu-toggle-bars {
  background: transparent;
}

.topbar-menu-toggle[aria-expanded="true"] .topbar-menu-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.topbar-menu-toggle[aria-expanded="true"] .topbar-menu-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: var(--header-bg);
  border-bottom: 1px solid rgba(216, 222, 232, 0.9);
  backdrop-filter: blur(14px);
}

body.dark-theme .site-header {
  background: var(--header-bg);
  border-bottom-color: rgba(43, 58, 70, 0.9);
}

body.auth-open .site-header,
body.app-open .site-header {
  display: none;
}

body.auth-open .auth-view,
body.auth-open .auth-layout {
  min-height: 100vh;
}

.brand,
.site-nav,
.hero-actions,
.account,
.queue-stats {
  display: flex;
  align-items: center;
  gap: 14px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brand {
  min-width: 0;
  font-weight: 900;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.18);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.15;
}

.brand strong {
  font-size: 0.9rem;
  letter-spacing: 0;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.site-nav a,
.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 10px;
  font-weight: 800;
}

.site-nav a:hover,
.text-button:hover {
  color: var(--brand-dark);
}

.theme-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--navy);
  padding: 9px 12px;
  font-weight: 900;
}

.theme-toggle:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.welcome-view {
  width: 100%;
}

.auth-view {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.app-shell {
  width: calc(100% - 32px);
  max-width: 1680px;
  margin: 0 16px;
}

.hero {
  position: relative;
  min-height: calc(92vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(24px, 4vw, 58px);
  align-items: center;
  width: calc(100% - 32px);
  max-width: 1680px;
  margin: 22px 16px 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: var(--hero-bg);
  box-shadow: var(--deep-shadow);
  padding: clamp(34px, 6vw, 72px);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.kicker {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(3.25rem, 8vw, 6.8rem);
  line-height: 0.9;
  font-weight: 950;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
  font-weight: 950;
}

h3 {
  font-size: 1.25rem;
  font-weight: 900;
}

.signal {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.hero .kicker {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #d5efeb;
  padding: 8px 12px;
}

.hero h1 {
  color: #fff;
}

.hero .signal {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
}

.hero-actions {
  margin-top: 26px;
}

.hero-actions.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-secondary {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.hero-secondary:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  max-width: 640px;
}

.hero-pills span {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
  max-width: 640px;
}

.hero-stats div {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 14px;
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats strong {
  color: #fff;
  font-size: 1rem;
  font-weight: 950;
}

.hero-stats span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-image-wrap {
  position: relative;
  z-index: 1;
  min-height: 500px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  min-height: 500px;
  object-fit: cover;
  display: block;
}

.primary,
.secondary,
.tab,
.plan,
.text-button {
  border-radius: 6px;
}

.primary {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  padding: 13px 18px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.16);
}

.primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.primary.small,
.secondary.small,
.danger.small {
  padding: 10px 14px;
}

.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--navy);
  padding: 13px 18px;
  font-weight: 900;
}

.secondary:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.danger {
  border: 1px solid rgba(185, 28, 28, 0.24);
  border-radius: 6px;
  background: var(--danger-bg);
  color: #991b1b;
  padding: 13px 18px;
  font-weight: 900;
}

.danger:hover {
  border-color: rgba(185, 28, 28, 0.45);
  background: var(--danger-bg-hover);
}

.feature-band,
.workflow-band,
.plans-band {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.section-title {
  max-width: 760px;
  margin-bottom: 28px;
}

.welcome-view .section-title,
.welcome-view .feature-grid,
.welcome-view .workflow-grid,
.welcome-view .preview-plans,
.welcome-view .payment-strip {
  width: min(1680px, calc(100% - 32px));
  margin-left: 16px;
  margin-right: auto;
}

.welcome-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: clamp(20px, 2.5vw, 40px);
  align-items: start;
  width: calc(100% - 32px);
  max-width: 1680px;
  margin: 0 16px;
}

.welcome-main {
  min-width: 0;
}

.welcome-main .section-title,
.welcome-main .feature-grid,
.welcome-main .workflow-grid,
.welcome-main .preview-plans,
.welcome-main .payment-strip {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.welcome-rail {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 92px;
  padding-top: 72px;
}

.rail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.rail-card-dark {
  border-color: rgba(255, 255, 255, 0.12);
  background: var(--hero-bg);
  color: #fff;
}

.rail-card-dark h3,
.rail-card-dark .kicker {
  color: #fff;
}

.rail-card p {
  color: var(--muted);
  line-height: 1.6;
}

.rail-card-dark p {
  color: rgba(255, 255, 255, 0.72);
}

.rail-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rail-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.rail-row span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--brand-soft);
}

.rail-row strong,
.rail-row small {
  display: block;
}

.rail-row small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.4;
}

.rail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.rail-tags span {
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 900;
}

.rail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.rail-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--brand-soft);
  padding: 12px;
}

.rail-metrics strong,
.rail-metrics span,
.rail-tool-list span {
  display: block;
}

.rail-metrics strong {
  color: var(--brand-dark);
  font-size: 1.45rem;
  line-height: 1;
}

.rail-metrics span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.35;
  text-transform: uppercase;
}

.rail-tool-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.rail-tool-list span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--navy);
  padding: 10px;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.35;
}

.feature-grid,
.workflow-grid,
.preview-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-grid article,
.workflow-grid article,
.preview-plans article,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.feature-grid article,
.workflow-grid article,
.preview-plans article {
  min-height: 210px;
  padding: 24px;
}

.feature-grid span,
.workflow-grid strong {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 900;
}

.workflow-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workflow-grid article {
  min-height: 188px;
}

.workflow-grid strong {
  background: var(--hero-bg);
  color: #fff;
}

.feature-grid p,
.workflow-grid p,
.preview-plans p {
  color: var(--muted);
  line-height: 1.65;
}

.preview-plans strong {
  display: block;
  margin: 14px 0;
  color: var(--brand-dark);
  font-size: 2rem;
}

.payment-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.payment-strip span {
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 10px 12px;
  font-size: 0.86rem;
  font-weight: 900;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  width: calc(100% - 32px);
  max-width: 1680px;
  margin: 0 16px;
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
}

.site-footer > div {
  display: grid;
  gap: 14px;
  max-width: 560px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.site-footer a,
.site-footer .text-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--navy);
  padding: 10px 12px;
  font-weight: 900;
}

.site-footer a:hover,
.site-footer .text-button:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.panel {
  padding: 22px;
}

form {
  display: grid;
  gap: 16px;
}

.auth-view {
  width: 100%;
  min-height: calc(100vh - 75px);
  margin: 0;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  min-height: calc(100vh - 75px);
  background: var(--page);
}

.auth-showcase {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: clamp(32px, 6vw, 64px);
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.18), transparent 28rem),
    linear-gradient(180deg, var(--brand-soft) 0%, var(--surface) 100%);
  border-right: 1px solid var(--line);
}

.auth-back-button {
  align-self: flex-start;
  padding: 6px 0;
  color: var(--muted);
  font-weight: 800;
}

.auth-back-button:hover {
  color: var(--brand-dark);
}

.auth-showcase-brand,
.auth-mobile-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.auth-showcase-brand strong,
.auth-showcase-brand small,
.auth-mobile-brand strong,
.auth-mobile-brand small {
  display: block;
}

.auth-showcase-brand strong,
.auth-mobile-brand strong {
  color: var(--brand-dark);
  font-size: 0.92rem;
}

.auth-showcase-brand small,
.auth-mobile-brand small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.auth-showcase-copy {
  max-width: 720px;
}

.auth-showcase-lead {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.auth-showcase-copy h1 {
  max-width: 820px;
  font-size: clamp(2.6rem, 5.5vw, 4.5rem);
  line-height: 1.04;
  color: var(--ink);
}

.auth-benefits {
  display: grid;
  gap: 12px;
  max-width: 620px;
  margin-top: 30px;
}

.auth-benefits div {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
  padding: 13px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 800;
}

.auth-benefits span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.auth-footnote {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.auth-card-wrap {
  display: grid;
  place-items: center;
  padding: 40px 18px;
  background: var(--surface);
}

.auth-card {
  width: min(100%, 430px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
  padding: 28px;
}

.auth-mobile-brand {
  display: none;
  margin-bottom: 22px;
}

.auth-card-head {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.auth-card-head h2 {
  font-size: clamp(2rem, 4vw, 2.35rem);
}

.auth-card-head p:not(.kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}

.auth-divider span {
  height: 1px;
  flex: 1;
  background: var(--line);
}

.auth-divider strong {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.provider-actions {
  display: grid;
  gap: 10px;
}

.provider-button,
.telegram-widget {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
}

.provider-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.provider-button:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.provider-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.provider-button--google {
  background: #fff;
  border-color: #dadce0;
  color: #3c4043;
  font-weight: 700;
}

.provider-button--google:hover {
  background: #f8f9fa;
  border-color: #d2d4d8;
  color: #202124;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.provider-button--telegram {
  background: #fff;
  border-color: #d7e8f3;
  color: #17212b;
  font-weight: 700;
}

.provider-button--telegram:hover {
  background: #f3fbff;
  border-color: #9fd4ef;
  color: #0b4f71;
}

body.dark-theme .provider-button--google,
body.dark-theme .provider-button--telegram {
  background: #fff;
  color: #3c4043;
}

body.dark-theme .provider-button--google:hover,
body.dark-theme .provider-button--telegram:hover {
  background: #f8f9fa;
  color: #202124;
}

.auth-submit {
  width: 100%;
}

.telegram-widget {
  display: grid;
  place-items: center;
  padding: 10px 14px;
}

.auth-switch {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-switch .text-button {
  padding: 4px;
  color: var(--brand-dark);
  font-weight: 900;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tab {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  padding: 11px 12px;
  font-weight: 900;
}

.tab.active {
  color: var(--brand-dark);
  border-color: var(--brand);
  background: var(--brand-soft);
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  text-align: left;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--ink);
  padding: 12px;
  outline: none;
  text-align: left;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

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

.message {
  min-height: 20px;
  margin: 0;
  color: var(--gold);
}

.message.ok,
.status-sent {
  color: var(--green);
}

.message.error,
.status-failed {
  color: var(--red);
}

.app-shell {
  padding: 34px 0 72px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 18px 0 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--header-bg);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

.dashboard-topbar-menu {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  min-width: 0;
}

.dashboard-nav-menu-host {
  display: none;
}

.dashboard-menu-kicker {
  margin-bottom: 8px;
}

.dashboard-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.dashboard-brand h2 {
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1;
}

.dashboard-brand .kicker {
  margin-bottom: 4px;
}

.dashboard-brand small {
  display: block;
  max-width: 420px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-status {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  min-width: 220px;
}

.dashboard-status span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--navy);
  padding: 7px 11px;
  font-size: 0.8rem;
  font-weight: 900;
}

.dashboard-theme-toggle {
  flex: 0 0 auto;
  white-space: nowrap;
}

.account {
  position: relative;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.account-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-width: 0;
  max-width: min(200px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--ink);
  padding: 5px 8px 5px 5px;
  text-align: left;
}

.account-button > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.account-button:hover,
.account-button[aria-expanded="true"] {
  background: var(--brand-soft);
  border-color: rgba(15, 118, 110, 0.22);
}

.account-initial {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
}

.account-button strong,
.account-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-button strong {
  max-width: 100%;
  font-size: 0.84rem;
  font-weight: 900;
}

.account-button small {
  max-width: 210px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.account-caret {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin-left: 0;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1;
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
  padding: 8px;
}

.account-menu button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
  font-weight: 900;
}

.account-menu button:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.dashboard-nav {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 5px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.dash-link {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 11px 12px;
  text-align: left;
  font-weight: 850;
}

.dash-link:hover,
.dash-link.active {
  border-color: transparent;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.dashboard-content {
  display: grid;
  gap: 18px;
  justify-items: stretch;
  text-align: left;
}

.dashboard-section {
  display: grid;
  gap: 18px;
  justify-items: stretch;
  text-align: left;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 800;
}

.badge.muted {
  color: var(--muted);
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.billing-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

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

.activity-card,
.summary-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 16px;
}

.activity-card {
  display: grid;
  gap: 8px;
  min-height: 136px;
}

.activity-card span,
.profile-summary span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.activity-card strong {
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.1;
}

.activity-card small,
.summary-row small {
  color: var(--muted);
  line-height: 1.5;
}

.dashboard-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-charts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 12px;
  margin-bottom: 12px;
}

.chart-card {
  min-height: 260px;
}

.mini-chart {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.chart-row {
  display: grid;
  gap: 8px;
}

.chart-row-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.chart-row-top strong {
  color: var(--ink);
}

.chart-track {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.chart-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.bar-sent {
  background: var(--green);
}

.bar-queued {
  background: var(--gold);
}

.bar-failed {
  background: var(--red);
}

.bar-sending {
  background: var(--brand);
}

.subscription-meter {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 16px;
}

.meter-ring {
  display: grid;
  place-items: center;
  align-content: center;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface-raised) 0 58%, transparent 59%),
    conic-gradient(var(--brand) calc(var(--meter) * 1%), var(--surface-soft) 0);
  border: 1px solid var(--line);
}

.meter-ring strong {
  color: var(--ink);
  font-size: 1.75rem;
  line-height: 1;
}

.meter-ring span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.subscription-details {
  display: grid;
  gap: 8px;
}

.subscription-details div {
  display: grid;
  grid-template-columns: minmax(80px, 0.45fr) minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.subscription-details span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.subscription-details strong {
  color: var(--ink);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.profile-summary {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.profile-summary strong {
  color: var(--ink);
  word-break: break-word;
}

.recent-activity {
  margin-top: 12px;
}

.summary-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.summary-row strong,
.summary-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-row span {
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.admin-crypto-queue {
  margin-top: 12px;
}

.admin-crypto-row {
  align-items: start;
}

.admin-tx-hash {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: normal;
  word-break: break-all;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 12px;
}

.admin-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  max-height: 620px;
  overflow: auto;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.admin-row strong,
.admin-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.admin-row span {
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.admin-user-row {
  align-items: start;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 360px;
}

.admin-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 14px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}

.admin-details h4 {
  margin: 0 0 12px;
  color: var(--ink);
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: minmax(90px, 0.35fr) minmax(0, 1fr);
  gap: 8px 12px;
}

.admin-detail-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-detail-grid strong {
  min-width: 0;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-detail-actions {
  display: grid;
  gap: 10px;
  align-content: start;
}

.billing-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 14px;
}

.billing-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.billing-summary strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 1.08rem;
}

.billing-periods {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.period-option {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--muted);
  padding: 11px;
  font-weight: 900;
}

.period-option:hover,
.period-option.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.plan {
  min-height: 142px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-raised);
  color: var(--ink);
  text-align: left;
}

.plan.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.14);
}

.plan strong {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-dark);
}

.plan span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.checkout-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
}

.payment-instructions {
  margin-top: 12px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 14px;
  font-weight: 800;
  line-height: 1.6;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nested-form {
  display: grid;
  gap: 16px;
}

.wide {
  grid-column: 1 / -1;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.remember-field {
  justify-content: flex-start;
  width: fit-content;
  color: var(--ink);
  font-size: 0.9rem;
}

.check input {
  width: 18px;
  height: 18px;
}

.sender-panel,
.queue-panel {
  grid-column: span 1;
  text-align: left;
}

.sender-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 18px;
  align-items: start;
}

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

.sender-campaign-progress {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--surface-raised), var(--surface-soft));
  padding: 14px;
}

.sender-campaign-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.sender-campaign-progress-head strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
}

.sender-progress-track {
  display: flex;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.sender-progress-track span {
  display: block;
  height: 100%;
  min-width: 0;
  transition: width 0.25s ease;
}

.sender-campaign-progress-meta {
  display: grid;
  gap: 4px;
}

.sender-campaign-progress-meta small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.sender-intel-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--surface-raised), var(--surface-soft));
  padding: 14px;
}

.sender-intel-card span,
.field-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sender-intel-card strong {
  color: var(--ink);
  font-size: 1.28rem;
  line-height: 1;
}

.sender-intel-card small,
.placeholder-tool small {
  color: var(--muted);
  line-height: 1.45;
}

.sender-compose,
.sender-options {
  display: grid;
  gap: 16px;
  justify-items: stretch;
  text-align: left;
}

.sender-compose .primary {
  width: fit-content;
  align-self: start;
}

.sender-compose .action-row {
  justify-content: flex-start;
}

.sender-options {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 112px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 16px;
}

.field-block {
  display: grid;
  gap: 8px;
}

.segmented-control,
.sender-option-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 6px;
}

.segment {
  flex: 1 1 88px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  font-weight: 900;
}

.segment.active {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.sender-option-tabs .tab {
  flex: 1 1 110px;
}

.delivery-test-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}

.delivery-test-row label {
  margin: 0;
}

.test-send-options {
  display: grid;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.test-send-options .check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.test-send-options .check input[type="number"] {
  width: 88px;
}

.subscription-trial-banner,
.subscription-expired-banner,
.trial-plan-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
  display: grid;
  gap: 8px;
}

.subscription-expired-banner {
  border-color: #d9a441;
  background: rgba(217, 164, 65, 0.08);
}

.trial-plan-card {
  margin-bottom: 12px;
}

.dash-link-locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.sender-option-panel {
  display: grid;
  gap: 14px;
}

.placeholder-tool,
.sender-readiness {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 14px;
}

.placeholder-groups {
  display: grid;
  gap: 12px;
}

.placeholder-groups strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.86rem;
}

.placeholder-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.placeholder-chips button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 7px 9px;
  font-size: 0.78rem;
  font-weight: 850;
}

.placeholder-chips button:hover {
  border-color: rgba(15, 118, 110, 0.35);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.sender-readiness ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sender-readiness li {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.sender-readiness li.ready {
  color: var(--brand-dark);
}

.smtp-manager {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 16px;
}

.smtp-profiles {
  display: grid;
  gap: 10px;
}

.smtp-profile-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.1fr) 92px minmax(140px, 0.9fr) minmax(140px, 0.9fr) minmax(180px, 1fr) 70px auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 12px;
}

.smtp-secure-check {
  min-height: 46px;
}

.sender-compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.templates-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.template-library {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 112px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 16px;
}

.template-search {
  width: 100%;
}

.template-list {
  display: grid;
  gap: 10px;
}

.template-item {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  padding: 12px;
  text-align: left;
}

.template-item:hover,
.template-item.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.template-item strong,
.template-item span,
.template-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-item span,
.template-item small,
.empty-state span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.template-editor {
  align-items: start;
}

.template-preview {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}

.template-preview iframe {
  width: 100%;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.empty-state {
  display: grid;
  gap: 6px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 16px;
}

.polished-empty {
  justify-items: start;
  gap: 10px;
  border-style: solid;
  background:
    linear-gradient(135deg, var(--brand-soft), transparent 58%),
    var(--surface-raised);
}

.polished-empty .empty-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 1.25rem;
}

.polished-empty strong {
  color: var(--ink);
  font-size: 1rem;
}

.polished-empty small {
  color: var(--muted);
  line-height: 1.55;
}

.polished-empty .secondary {
  margin-top: 4px;
}

.mini-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mini-section-head h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
}

.tall-field {
  min-height: 150px;
}

.letter-field {
  min-height: 280px;
}

.soft-hidden {
  display: none;
}

.qr-preview-wrap {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.qr-panel canvas {
  width: 256px;
  height: 256px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
}

.qr-tag-preview {
  margin: 0;
  font-size: 0.92rem;
}

.saved-qr-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.saved-qr-list {
  display: grid;
  gap: 12px;
}

.saved-qr-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}

.saved-qr-card img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fffdf8;
}

.saved-qr-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.saved-qr-meta strong {
  color: var(--navy);
  font-size: 0.98rem;
}

.saved-qr-meta code,
.saved-qr-meta small {
  word-break: break-word;
}

.saved-qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .saved-qr-card {
    grid-template-columns: 72px 1fr;
  }

  .saved-qr-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

.inbox-save-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}

.saved-inbox-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.saved-inbox-list {
  display: grid;
  gap: 12px;
}

.saved-inbox-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}

.saved-inbox-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.saved-inbox-meta strong {
  color: var(--navy);
  font-size: 0.98rem;
}

.saved-inbox-meta code,
.saved-inbox-meta small {
  word-break: break-word;
}

.saved-inbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .inbox-save-row {
    grid-template-columns: 1fr;
  }

  .saved-inbox-card {
    grid-template-columns: 1fr;
  }

  .saved-inbox-actions {
    justify-content: flex-start;
  }
}

.subsection {
  display: grid;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.subsection h4 {
  margin: 0;
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 900;
}

.extractor-results {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

#extractorResults {
  min-height: 220px;
}

.section-tabs {
  margin-bottom: 18px;
}

.validator-results {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.result-table {
  display: grid;
  gap: 10px;
}

.api-validator-tabs {
  margin-bottom: 14px;
}

.api-validator-subpanel {
  display: grid;
  gap: 12px;
}

.api-checker-results {
  margin-top: 8px;
}

.smtp-checker-results,
.saved-smtp-results,
.proxy-checker-results,
.saved-proxy-results,
.api-checker-results {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.smtp-checker-tables {
  display: grid;
  gap: 18px;
}

.smtp-results-block {
  display: grid;
  gap: 10px;
}

.smtp-results-block h4 {
  margin: 0;
  font-size: 0.95rem;
}

.smtp-checker-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
}

.smtp-checker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.smtp-checker-table th,
.smtp-checker-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.smtp-checker-table th {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  background: color-mix(in srgb, var(--surface-raised) 88%, var(--line));
}

.smtp-checker-table tr:last-child td {
  border-bottom: none;
}

.smtp-checker-table .status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.smtp-checker-table .status-pill.valid {
  color: var(--brand-dark);
  background: color-mix(in srgb, var(--brand) 18%, transparent);
}

.smtp-checker-table .status-pill.invalid {
  color: #b42318;
  background: color-mix(in srgb, #f04438 14%, transparent);
}

.smtp-checker-empty {
  padding: 14px 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.saved-smtp-actions {
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.saved-smtp-select-all {
  margin: 0;
}

.smtp-checker-table .smtp-select-cell {
  width: 42px;
  text-align: center;
}

.smtp-checker-table .smtp-select-cell input {
  width: 16px;
  height: 16px;
}

.range-label,
.status-sending {
  color: var(--brand-dark);
}

.queue-stats {
  color: var(--muted);
  font-size: 0.82rem;
}

.jobs {
  display: grid;
  gap: 10px;
  max-height: 560px;
  overflow: auto;
}

.job {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-raised);
}

.job-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.job small {
  color: var(--muted);
  word-break: break-word;
}

.status-queued {
  color: var(--gold);
}

.status-running {
  color: var(--brand);
}

.status-completed {
  color: var(--green);
}

.task-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.task-row-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.task-row-top strong,
.task-row-top small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-progress {
  display: grid;
  gap: 6px;
}

.task-progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.task-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  transition: width 0.25s ease;
}

.task-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 940px) {
  body.topbar-menu-open {
    overflow: hidden;
  }

  .topbar-menu-toggle {
    display: inline-flex;
  }

  .site-header,
  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-header .topbar-toolbar,
  .dashboard-header .topbar-toolbar {
    width: 100%;
  }

  .topbar-menu-panel {
    display: none;
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .topbar-menu-panel.is-open {
    display: flex;
  }

  .site-nav.topbar-menu-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .site-nav.topbar-menu-panel a,
  .site-nav.topbar-menu-panel button {
    width: 100%;
    justify-content: center;
  }

  .dashboard-topbar-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .dashboard-nav-menu-host {
    display: block;
  }

  .dashboard-nav-slot .dashboard-nav {
    position: static;
    display: grid;
    gap: 6px;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .dashboard-layout > .dashboard-nav {
    display: none;
  }

  .dashboard-status,
  .dashboard-theme-toggle,
  .account {
    width: 100%;
    min-width: 0;
  }

  .account-button {
    width: 100%;
    max-width: none;
  }

  .dashboard-status {
    justify-content: flex-start;
  }

  .dashboard-brand small {
    max-width: 100%;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .welcome-body,
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .hero,
  .welcome-view .section-title,
  .welcome-view .feature-grid,
  .welcome-view .workflow-grid,
  .welcome-view .preview-plans,
  .welcome-view .payment-strip,
  .welcome-body,
  .site-footer {
    width: calc(100% - 32px);
    margin-left: 16px;
    margin-right: 16px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-showcase {
    display: none;
  }

  .auth-card-wrap {
    min-height: calc(100vh - 75px);
    background:
      radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 24rem),
      var(--page);
  }

  .auth-mobile-brand {
    display: flex;
  }

  .dashboard-nav {
    position: static;
  }

  .hero-image-wrap,
  .hero-image-wrap img {
    min-height: 360px;
  }

  .feature-grid,
  .workflow-grid,
  .preview-plans,
  .plans,
  .billing-summary,
  .activity-grid,
  .dashboard-summary-grid,
  .dashboard-charts,
  .sender-intel-grid,
  .admin-layout,
  .admin-details,
  .billing-periods,
  .checkout-form,
  .sender-workspace,
  .templates-workspace,
  .smtp-profile-row,
  .sender-compact-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .template-library {
    position: static;
    max-height: none;
  }

  .welcome-rail {
    position: static;
    padding-top: 0;
  }

  .site-footer {
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .admin-row,
  .admin-detail-grid {
    grid-template-columns: 1fr;
  }

  .admin-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .subscription-meter {
    grid-template-columns: 1fr;
  }

  .sender-options {
    position: static;
    max-height: none;
  }

  .wide {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: calc(100% - 20px);
    margin: 0 10px;
    padding: 16px 0 48px;
  }

  .panel,
  .summary-block,
  .activity-card,
  .sender-options,
  .template-library,
  .template-preview,
  .admin-details {
    padding: 14px;
  }

  .dashboard-header {
    margin-top: 10px;
    padding: 12px;
  }

  .dash-link {
    min-height: 40px;
  }

  .dashboard-content,
  .dashboard-section {
    gap: 14px;
  }

  .section-head,
  .mini-section-head {
    gap: 10px;
  }

  .letter-field {
    min-height: 190px;
  }

  .tall-field {
    min-height: 120px;
  }

  .template-preview iframe {
    min-height: 260px;
  }

  .action-row,
  .quick-actions,
  .admin-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .action-row .primary,
  .action-row .secondary,
  .action-row .danger,
  .quick-actions .secondary,
  .admin-actions .secondary,
  .admin-actions .danger,
  .admin-detail-actions .primary,
  .admin-detail-actions .secondary,
  .admin-detail-actions .danger,
  .sender-compose .primary {
    width: 100%;
  }

  .account-menu {
    left: 0;
    right: auto;
    width: 100%;
  }

  .admin-list,
  .jobs {
    max-height: none;
  }

  .admin-row strong,
  .admin-row small,
  .summary-row strong,
  .summary-row small,
  .template-item strong,
  .template-item span,
  .template-item small {
    white-space: normal;
  }

  .subscription-details div {
    grid-template-columns: 1fr;
  }
}
