:root {
  --ink: #17211f;
  --muted: #66736f;
  --line: #d9e2de;
  --surface: #ffffff;
  --soft: #f5f8f6;
  --accent: #0f766e;
  --accent-2: #2563eb;
  --success: #0f766e;
  --warn: #b45309;
  --danger: #b91c1c;
  --shadow: 0 18px 50px rgba(23, 33, 31, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #eef3f1;
}

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

main { min-height: calc(100vh - 72px); }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar-auth {
  justify-content: flex-start;
}

.brand, .nav, .nav-shell, .account-actions, .hero-actions, .row-item, .metric-line, .tag-line { display: flex; align-items: center; }

.brand {
  flex: 0 0 auto;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
}

.nav-shell {
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  margin-left: auto;
}

.nav {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 14px;
  color: #31413d;
}

.guest-nav {
  align-items: center;
}

.guest-login-button {
  border-color: rgba(15, 118, 110, 0.3);
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent);
}

.account-actions {
  flex: 0 0 auto;
  gap: 10px;
}

.preference-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.preference-control {
  display: inline-grid;
  grid-template-columns: auto minmax(118px, auto);
  gap: 6px;
  align-items: center;
  min-height: 38px;
  margin: 0;
  padding: 4px 6px 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #31413d;
  box-shadow: var(--shadow-soft);
}

.preference-control span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.preference-control select {
  max-width: 160px;
  min-height: 28px;
  padding: 0 26px 0 8px;
  border: 0;
  border-radius: 6px;
  background: var(--soft);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  text-overflow: ellipsis;
}

.guide-icon-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background: #ecfdf9;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.guide-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 20px;
  border: 2px solid currentColor;
  border-left-width: 5px;
  border-radius: 4px 3px 3px 4px;
}

.guide-icon::before,
.guide-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 3px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.guide-icon::before { top: 5px; }
.guide-icon::after { top: 10px; }

.guide-icon-button:hover {
  border-color: rgba(15, 118, 110, 0.42);
  background: white;
}

.workspace-pill {
  max-width: 170px;
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: #31413d;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 58px;
  max-width: min(640px, 54vw);
  padding: 7px 10px 7px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(245, 248, 246, 0.9)),
    white;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-card-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.account-card-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-card-copy strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.1;
}

.account-meta-table {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, auto));
  gap: 4px;
  align-items: stretch;
}

.account-meta-table > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid rgba(217, 226, 222, 0.72);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.66);
}

.account-meta-table b {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.account-meta-table em {
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-meta-table > span:last-child {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, white), rgba(255, 255, 255, 0.9));
}

.account-meta-table > span:last-child em {
  color: var(--accent);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.menu-toggle span {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(9, 18, 16, 0.42);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.app-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: min(460px, calc(100vw - 24px));
  height: 100vh;
  height: 100dvh;
  padding: 0;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 250, 0.98)),
    var(--surface);
  box-shadow: -28px 0 70px rgba(23, 33, 31, 0.2);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  overflow: hidden;
  visibility: hidden;
}

.menu-open {
  overflow: hidden;
}

.menu-open .menu-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.menu-open .app-menu {
  transform: translateX(0);
  visibility: visible;
}

.app-menu-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 38px;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(236, 253, 249, 0.9), rgba(238, 246, 255, 0.78)),
    var(--surface);
}

.app-menu-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-size: 15px;
  font-weight: 900;
}

.app-menu-title {
  min-width: 0;
}

.app-menu-title .eyebrow {
  margin-bottom: 4px;
}

.app-menu-title strong,
.app-menu-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-menu-title strong {
  font-size: 16px;
  line-height: 1.2;
}

.app-menu-title span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.menu-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.app-menu-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 14px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.app-menu .app-nav {
  display: grid;
  gap: 8px;
}

.menu-preferences {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(217, 226, 222, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(245, 248, 246, 0.72)),
    var(--surface);
}

.menu-preferences-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.menu-preferences-head .eyebrow {
  margin-bottom: 0;
}

.menu-preferences-head strong {
  color: #31413d;
  font-size: 13px;
  font-weight: 900;
}

.menu-preference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.menu-preference-control {
  width: 100%;
  grid-template-columns: 1fr;
  gap: 8px;
  min-height: 82px;
  padding: 12px;
  background: white;
  box-shadow: 0 8px 20px rgba(23, 33, 31, 0.05);
}

.menu-preference-control span {
  color: var(--muted);
  font-size: 11px;
}

.menu-preference-control select {
  width: 100%;
  max-width: none;
  min-height: 34px;
  padding-block: 6px;
  background: var(--soft);
  font-size: 13px;
}

.menu-primary-link,
.submenu a {
  display: grid;
  gap: 3px;
  min-height: 52px;
  justify-content: stretch;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.menu-primary-link span,
.submenu a span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.menu-primary-link:hover,
.submenu a:hover {
  border-color: rgba(15, 118, 110, 0.16);
  background: rgba(236, 253, 249, 0.82);
  color: var(--accent);
}

.menu-link-active {
  border-color: rgba(15, 118, 110, 0.28);
  background: white;
  color: var(--accent);
  box-shadow: 0 10px 26px rgba(23, 33, 31, 0.08);
}

.menu-link-active span {
  color: #3f5f59;
}

.menu-primary-link[data-icon] {
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
}

.menu-primary-link[data-icon] .button-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent);
}

.menu-primary-link[data-icon] strong,
.menu-primary-link[data-icon] > span:not(.button-icon) {
  grid-column: 2;
}

.menu-guide-link {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
}

.menu-guide-link .menu-primary-icon,
.menu-guide-link .button-icon {
  grid-row: 1 / span 2;
  color: var(--accent);
}

.menu-guide-link strong,
.menu-guide-link > span:not(.menu-primary-icon):not(.button-icon) {
  grid-column: 2;
}

.menu-guide-card {
  position: relative;
  margin-top: 4px;
  border-color: rgba(37, 99, 235, 0.16);
  background:
    linear-gradient(135deg, rgba(238, 246, 255, 0.92), rgba(236, 253, 249, 0.76)),
    var(--surface);
}

.menu-guide-card em {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: white;
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(23, 33, 31, 0.06);
}

.menu-group {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  overflow: visible;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.menu-group-open,
.menu-group-current {
  border-color: rgba(217, 226, 222, 0.92);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(23, 33, 31, 0.06);
}

.menu-group-disabled {
  opacity: 0.82;
  border-color: rgba(217, 226, 222, 0.76);
  background: rgba(245, 248, 246, 0.62);
}

.menu-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 11px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.menu-group-disabled .menu-group-toggle {
  cursor: default;
}

.menu-group-toggle span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.menu-group-toggle strong {
  font-size: 14px;
  line-height: 1.2;
}

.menu-group-toggle em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.45;
}

.menu-group-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
}

.menu-group-status {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ecfdf9;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.submenu {
  display: grid;
  gap: 6px;
  padding: 0 8px 10px 48px;
  overflow: visible;
}

.submenu[hidden] {
  display: none;
}

.submenu a {
  min-height: 48px;
  padding: 10px 11px;
  background: transparent;
}

.app-menu form {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.app-menu .link-button {
  width: 100%;
  justify-content: center;
  min-height: 44px;
}

.nav a,
.nav .link-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: #31413d;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.link-button:hover {
  border-color: #fca5a5;
  color: var(--danger);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  min-height: 620px;
  padding: clamp(48px, 8vw, 96px) clamp(18px, 6vw, 86px);
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.92), rgba(37, 99, 235, 0.72)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1800&q=80") center/cover;
  color: white;
}

.hero h1, .auth-card h1, .page-head h1 { margin: 0; line-height: 1.04; }
.hero h1 { font-size: clamp(44px, 7vw, 84px); }
.hero p { max-width: 760px; font-size: 18px; line-height: 1.7; color: rgba(255, 255, 255, 0.9); }

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
}

.hero .eyebrow { color: rgba(255, 255, 255, 0.78); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.button[data-icon],
.link-button[data-icon],
.menu-primary-link[data-icon] {
  gap: 10px;
}

.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.button-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.button-small .button-icon {
  width: 16px;
  height: 16px;
}

.button-secondary .button-icon,
.link-button .button-icon {
  color: currentColor;
}

.button-secondary { background: white; color: var(--accent); border-color: white; }
.button-small { min-height: 36px; padding-inline: 14px; }

.hero-panel, .panel, .auth-card, .feature-card, .module, .stat, .record-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel { padding: 26px; color: var(--ink); }
.metric-line { justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--line); }
.metric-line:last-child { border-bottom: 0; }
.metric-line strong { font-size: 28px; }

.band, .pricing-band, .page-head, .stats-grid, .two-column, .module-grid, .auth-shell {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

.band { padding: 54px 0; }
.pricing-band { padding: 12px 0 64px; }
.section-head { max-width: 760px; margin-bottom: 24px; }
.section-head h2, .panel h2, .module h3, .feature-card h3 { margin: 0 0 10px; }
.section-head p, .feature-card p, .muted { color: var(--muted); line-height: 1.6; }

.full-grid-head {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

.feature-grid, .module-grid, .stats-grid, .report-grid, .automation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.feature-card, .module, .stat { padding: 22px; }
.feature-card { box-shadow: none; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}

.pricing-card-featured {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: var(--shadow);
}

.pricing-card h3 {
  margin: 0;
  font-size: 26px;
}

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

.plan-badge {
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  background: #dff7f3;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-top: 4px;
}

.plan-price strong {
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1;
}

.plan-price span {
  color: var(--muted);
  font-weight: 700;
}

.plan-features {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-features li {
  position: relative;
  padding-left: 28px;
  color: #31413d;
  line-height: 1.45;
}

.plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: inset 0 0 0 4px #dff7f3;
}

.pricing-card .button {
  width: 100%;
  margin-top: auto;
}

.pricing-card .button-secondary {
  border-color: var(--line);
  color: var(--ink);
}

.pricing-feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.pricing-feature-strip div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.pricing-feature-strip strong,
.pricing-feature-strip span {
  display: block;
}

.pricing-feature-strip span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.billing-hero {
  align-items: stretch;
  gap: 18px;
  margin-bottom: 18px;
}

.billing-current-plan {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 210px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(236, 253, 249, 0.9), rgba(238, 246, 255, 0.72)),
    var(--surface);
  box-shadow: 0 16px 42px rgba(23, 33, 31, 0.08);
}

.billing-current-plan span,
.billing-summary-grid span,
.billing-plan-card .billing-limit-list span,
.billing-due-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.billing-current-plan strong {
  font-size: 28px;
  line-height: 1;
}

.billing-current-plan em {
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
}

.billing-summary-grid,
.billing-plan-board,
.billing-detail-grid {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

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

.billing-summary-grid article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 12px 34px rgba(23, 33, 31, 0.08);
}

.billing-summary-grid strong {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1;
}

.billing-summary-grid em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.billing-plan-form {
  display: grid;
  gap: 18px;
  margin-bottom: 32px;
}

.billing-plan-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  width: min(1280px, calc(100% - 36px));
  padding: 18px;
  border: 1px solid rgba(217, 226, 222, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(245, 248, 246, 0.74)),
    var(--surface);
  box-shadow: 0 18px 48px rgba(23, 33, 31, 0.07);
}

.billing-plan-board .section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  max-width: none;
  margin-bottom: 2px;
}

.billing-plan-board .section-head h2 {
  margin-bottom: 0;
}

.billing-plan-board .section-head p:last-child {
  max-width: 520px;
  margin: 0;
  text-align: right;
}

.billing-plan-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 100%;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 250, 0.9)),
    white;
  box-shadow: 0 12px 32px rgba(23, 33, 31, 0.07);
  cursor: pointer;
}

.billing-plan-card:hover,
.billing-plan-selected {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 16px 42px rgba(23, 33, 31, 0.1);
}

.billing-plan-current {
  border-color: rgba(15, 118, 110, 0.34);
  background:
    linear-gradient(180deg, rgba(236, 253, 249, 0.94), rgba(255, 255, 255, 0.98)),
    white;
}

.billing-plan-enterprise {
  border-color: rgba(15, 118, 110, 0.32);
  background:
    linear-gradient(145deg, rgba(230, 250, 246, 0.92), rgba(248, 251, 250, 0.98)),
    white;
}

.billing-plan-enterprise .billing-plan-head strong {
  color: var(--accent);
}

.billing-plan-radio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.billing-plan-radio input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.billing-plan-head {
  display: grid;
  gap: 7px;
}

.billing-plan-head h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.billing-plan-head strong {
  font-size: clamp(20px, 1.75vw, 26px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.billing-limit-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.billing-limit-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.billing-limit-list span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.billing-limit-list li:last-child {
  border-bottom: 0;
}

.billing-limit-list em {
  color: #31413d;
  max-width: 58%;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.billing-plan-card .button {
  width: 100%;
  align-self: end;
  margin-top: auto;
}

.billing-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.65fr);
  gap: 18px;
  margin-bottom: 26px;
}

.billing-flow-list {
  display: grid;
  gap: 12px;
}

.billing-flow-list div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.billing-flow-list span {
  display: grid;
  grid-row: 1 / span 2;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.billing-flow-list em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
}

.billing-payment-modal[hidden] {
  display: none;
}

.billing-payment-modal {
  position: fixed;
  inset: 0;
  z-index: 2200;
}

.billing-payment-modal-open {
  overflow: hidden;
}

.billing-payment-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 33, 31, 0.5);
}

.billing-payment-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  gap: 16px;
  width: min(640px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  outline: none;
  overflow-y: auto;
  transform: translate(-50%, -50%);
}

.billing-payment-head,
.billing-payment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.billing-payment-head h2 {
  margin: 0;
}

.billing-payment-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.billing-due-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 14px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  background: #ecfdf9;
}

.billing-due-card span {
  grid-column: 1 / -1;
}

.billing-due-card strong {
  font-size: 22px;
  line-height: 1;
}

.billing-due-card em {
  color: var(--accent);
  font-size: 18px;
  font-style: normal;
  font-weight: 900;
}

.billing-method-fields {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.billing-method-fields[hidden] {
  display: none;
}

.billing-gateway-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(236, 253, 249, 0.88), rgba(238, 246, 255, 0.62)),
    var(--surface);
}

.billing-gateway-card strong {
  color: var(--ink);
  font-size: 15px;
}

.billing-gateway-card span,
.billing-gateway-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
}

.billing-payment-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  padding-top: 4px;
}

.billing-page {
  width: min(1320px, calc(100% - 36px));
  margin: 0 auto 44px;
  gap: 18px;
}

.billing-command-center {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.36fr);
  gap: 18px;
  align-items: stretch;
}

.billing-hero-copy,
.billing-account-panel,
.billing-plan-board {
  border: 1px solid rgba(217, 226, 222, 0.88);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 250, 0.88)),
    var(--surface);
  box-shadow: 0 18px 46px rgba(23, 33, 31, 0.08);
}

.billing-hero-copy {
  display: grid;
  align-content: center;
  min-height: 188px;
  padding: clamp(22px, 4vw, 38px);
}

.billing-hero-copy h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.95;
}

.billing-hero-copy p:last-child {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.58;
}

.billing-account-panel {
  display: grid;
  align-content: space-between;
  gap: 14px;
  min-height: 188px;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(236, 253, 249, 0.92), rgba(238, 246, 255, 0.74)),
    var(--surface);
}

.billing-account-panel > span,
.billing-plan-board-head > span,
.billing-plan-radio span,
.billing-limit-list span,
.billing-due-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.billing-account-panel > strong {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}

.billing-account-panel > em {
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
}

.billing-account-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.billing-account-meta div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(217, 226, 222, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.billing-account-meta b,
.billing-account-meta i {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.billing-account-meta b {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.billing-account-meta i {
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.billing-plan-board {
  width: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  padding: 18px;
}

.billing-plan-board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 4px;
}

.billing-plan-board-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}

.billing-plan-board-head > span {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: #ecfdf9;
  color: var(--accent);
}

.billing-plan-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
  min-width: 0;
  min-height: 100%;
  padding: 16px;
  border: 1px solid rgba(217, 226, 222, 0.92);
  border-radius: 8px;
  background: white;
  box-shadow: none;
  cursor: pointer;
}

.billing-plan-card:hover,
.billing-plan-selected {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.36);
  box-shadow: 0 16px 38px rgba(23, 33, 31, 0.09);
}

.billing-plan-current,
.billing-plan-enterprise {
  border-color: rgba(15, 118, 110, 0.32);
  background:
    linear-gradient(180deg, rgba(236, 253, 249, 0.74), rgba(255, 255, 255, 0.98)),
    white;
}

.billing-plan-enterprise {
  background:
    linear-gradient(145deg, rgba(238, 246, 255, 0.9), rgba(236, 253, 249, 0.72)),
    white;
}

.billing-plan-radio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  margin: 0;
}

.billing-plan-radio input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.billing-plan-radio span {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: #42615b;
}

.billing-plan-current .billing-plan-radio span,
.billing-plan-selected .billing-plan-radio span {
  background: #0f766e;
  color: white;
}

.billing-plan-head {
  display: grid;
  gap: 7px;
}

.billing-plan-head h3,
.billing-plan-head p {
  margin: 0;
}

.billing-plan-head h3 {
  font-size: 18px;
  line-height: 1.15;
}

.billing-plan-head strong {
  color: var(--ink);
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.billing-plan-enterprise .billing-plan-head strong {
  color: var(--accent);
}

.billing-plan-head p {
  min-height: 38px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.billing-limit-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.billing-limit-list li {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 34px;
  border-top: 1px solid var(--line);
}

.billing-limit-list em {
  color: #253a35;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.billing-plan-card .button {
  width: 100%;
  align-self: end;
  min-height: 40px;
  margin-top: 2px;
}

.billing-payment-backdrop {
  background: rgba(8, 19, 16, 0.54);
  backdrop-filter: blur(4px);
}

.billing-payment-panel {
  gap: 16px;
  width: min(620px, calc(100% - 32px));
  padding: 20px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 250, 0.98)),
    white;
}

.billing-payment-head {
  align-items: flex-start;
}

.billing-payment-head h2 {
  font-size: 24px;
  line-height: 1.1;
}

.billing-payment-close {
  background: white;
}

.billing-due-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 14px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(236, 253, 249, 0.94), rgba(238, 246, 255, 0.7)),
    var(--surface);
}

.billing-due-card span {
  grid-column: 1 / -1;
}

.billing-due-card strong {
  font-size: 24px;
}

.billing-due-card em {
  color: var(--accent);
  font-size: 18px;
}

.billing-payment-basics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.billing-method-fields,
.billing-gateway-card,
.billing-payment-ack {
  border-radius: 8px;
}

.billing-gateway-card {
  background:
    linear-gradient(135deg, rgba(236, 253, 249, 0.88), rgba(238, 246, 255, 0.66)),
    var(--surface);
}

.billing-payment-actions {
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 1180px) {
  .billing-command-center {
    grid-template-columns: 1fr;
  }

  .billing-plan-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .billing-page {
    width: min(100% - 28px, 1320px);
  }

  .billing-hero-copy,
  .billing-account-panel,
  .billing-plan-board {
    padding: 16px;
  }

  .billing-page .billing-plan-board,
  .billing-payment-basics {
    grid-template-columns: 1fr;
  }

  .billing-plan-board-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .billing-account-meta {
    grid-template-columns: 1fr;
  }

  .billing-due-card {
    grid-template-columns: 1fr;
  }

  .billing-due-card em {
    text-align: left;
  }
}

.security-hero {
  align-items: flex-end;
}

.security-score-card {
  display: grid;
  place-items: center;
  width: 154px;
  height: 154px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at center, white 58%, transparent 60%),
    conic-gradient(var(--accent) calc(var(--score) * 1%), #e7efeb 0);
  box-shadow: 0 14px 38px rgba(23, 33, 31, 0.08);
}

.security-score-card strong {
  grid-area: 1 / 1;
  font-size: 28px;
  line-height: 1;
}

.security-score-card span {
  grid-area: 1 / 1;
  margin-top: 54px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.security-summary-grid,
.security-grid,
.security-audit-panel {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

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

.security-summary-grid article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 12px 34px rgba(23, 33, 31, 0.08);
}

.security-summary-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.security-summary-grid strong {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1;
}

.security-summary-grid em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.security-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
  align-items: start;
}

.security-card,
.security-audit-panel {
  border-color: rgba(217, 226, 222, 0.92);
  box-shadow: 0 16px 46px rgba(23, 33, 31, 0.08);
}

.security-card h2,
.security-audit-panel h2 {
  font-size: 24px;
  line-height: 1.15;
}

.security-card .section-help,
.security-audit-panel .section-help {
  font-size: 14px;
}

.security-detail {
  max-width: 760px;
  margin-top: 8px;
}

.security-policy-card {
  width: 100%;
  gap: 16px;
}

.security-policy-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.security-policy-section-head {
  display: grid;
  gap: 4px;
}

.security-policy-section-head .eyebrow {
  margin: 0;
}

.security-policy-section-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.security-policy-section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.security-safeguard-list .toggle-row {
  min-height: 100%;
}

.security-safeguard-list,
.security-posture-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.security-posture-grid article {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.security-posture-grid strong {
  font-size: 15px;
}

.security-posture-grid span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.security-audit-panel {
  margin-bottom: 28px;
}

.security-audit-filter {
  display: grid;
  grid-template-columns: minmax(190px, 0.9fr) minmax(160px, 0.6fr) minmax(160px, 0.6fr) minmax(280px, 1.35fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.security-audit-filter label {
  min-width: 0;
}

.audit-search-field input {
  width: 100%;
}

.audit-filter-submit {
  align-self: end;
  white-space: nowrap;
}

.security-audit-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.security-audit-head,
.security-audit-row {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(420px, 1.7fr) minmax(150px, 0.5fr) minmax(170px, 0.55fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
}

.security-audit-head {
  border-bottom: 1px solid var(--line);
  background: #f8fbfa;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.security-audit-row {
  border-bottom: 1px solid var(--line);
  background: white;
  font-size: 13px;
}

.security-audit-row:last-child {
  border-bottom: 0;
}

.security-audit-row code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #31413d;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: clip;
  white-space: pre-wrap;
  word-break: break-word;
}

.security-audit-row span,
.security-audit-row em {
  color: var(--muted);
  font-style: normal;
}

.security-audit-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.security-audit-footer .section-help {
  margin: 0;
}

.integrations-hero {
  align-items: flex-end;
}

.integration-summary-grid,
.integration-layout {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

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

.integration-summary-grid article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 12px 34px rgba(23, 33, 31, 0.08);
}

.integration-summary-grid span,
.integration-meta-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.integration-summary-grid strong {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1;
}

.integration-summary-grid em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.integration-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.32fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 28px;
}

.integration-catalog-panel {
  position: sticky;
  top: 92px;
}

.integration-catalog-list,
.integration-card-grid {
  display: grid;
  gap: 12px;
}

.integration-catalog-list article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.integration-catalog-list span {
  color: var(--muted);
  line-height: 1.5;
}

.integration-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(23, 33, 31, 0.06);
}

.integration-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.integration-card-head h3 {
  margin: 0 0 6px;
}

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

.integration-meta-grid div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.integration-meta-grid strong {
  font-size: 18px;
  line-height: 1.2;
}

.integration-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  background: #fee2e2;
  color: var(--danger);
  font-weight: 700;
}

.integration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.integration-actions form {
  margin: 0;
}

.integration-form-modal[hidden] {
  display: none;
}

.integration-form-modal {
  position: fixed;
  inset: 0;
  z-index: 2200;
}

.integration-form-modal-open {
  overflow: hidden;
}

.integration-form-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 33, 31, 0.5);
}

.integration-form-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(900px, calc(100% - 32px));
  max-height: min(820px, calc(100vh - 32px));
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  outline: none;
  overflow-y: auto;
  transform: translate(-50%, -50%);
}

.integration-form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.integration-form-head h2 {
  margin: 0;
}

.integration-form-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.integration-form-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.integration-form-section h3 {
  margin: 0;
}

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

.advanced-summary-grid,
.advanced-layout,
.advanced-results-panel {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

.feature-catalog-hero {
  align-items: flex-end;
}

.feature-catalog-summary,
.feature-catalog-layout {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

.feature-catalog-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.feature-catalog-summary article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, white, #f8fbfa);
  box-shadow: 0 12px 34px rgba(23, 33, 31, 0.08);
}

.feature-catalog-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.feature-catalog-summary strong {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1;
}

.feature-catalog-summary em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.feature-catalog-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.32fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 28px;
}

.feature-catalog-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
  box-shadow: 0 16px 46px rgba(23, 33, 31, 0.08);
}

.feature-filter-form,
.feature-bulk-form {
  display: grid;
  gap: 12px;
}

.feature-bulk-form {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.feature-filter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.feature-catalog-groups {
  display: grid;
  gap: 16px;
}

.feature-group-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  box-shadow: 0 16px 46px rgba(23, 33, 31, 0.08);
}

.feature-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.feature-group-head h2 {
  margin: 0;
}

.feature-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.feature-catalog-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 22px rgba(23, 33, 31, 0.05);
}

.feature-catalog-card:hover {
  border-color: rgba(15, 118, 110, 0.32);
}

.feature-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.feature-card-title > div:first-child {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.feature-card-title strong {
  line-height: 1.3;
}

.feature-card-title span:not(.status-pill):not(.feature-priority-pill) {
  color: var(--muted);
  font-size: 12px;
}

.feature-card-badges {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

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

.feature-card-fields label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #31413d;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.feature-card-fields label:last-child {
  grid-column: 1 / -1;
}

.feature-card-fields input,
.feature-card-fields select,
.feature-card-fields textarea {
  font-size: 14px;
  text-transform: none;
}

.feature-card-fields textarea {
  min-height: 76px;
}

.feature-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.feature-card-actions .button {
  min-width: 130px;
}

.feature-priority-pill {
  justify-self: start;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.priority-low {
  background: #e0f2fe;
  color: #075985;
}

.priority-medium {
  background: #dff7f3;
  color: #0f766e;
}

.priority-high {
  background: #fef3c7;
  color: #92400e;
}

.priority-critical {
  background: #fee2e2;
  color: #7f1d1d;
}

.status-available {
  background: #dcfce7;
  color: #14532d;
}

.status-planned {
  background: #e0f2fe;
  color: #075985;
}

.status-in_progress {
  background: #fef3c7;
  color: #92400e;
}

.status-blocked,
.status-disabled {
  background: #fee2e2;
  color: #7f1d1d;
}

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

.advanced-summary-grid article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 12px 34px rgba(23, 33, 31, 0.08);
}

.advanced-summary-grid span,
.advanced-score-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.advanced-summary-grid strong {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1;
}

.advanced-summary-grid em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.advanced-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.advanced-run-form,
.advanced-catalog-panel,
.advanced-results-panel {
  border-color: rgba(217, 226, 222, 0.92);
  box-shadow: 0 16px 46px rgba(23, 33, 31, 0.08);
}

.advanced-region-grid,
.advanced-tool-list,
.advanced-run-grid {
  display: grid;
  gap: 12px;
}

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

.advanced-tool-list article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.advanced-tool-list span {
  color: var(--muted);
  line-height: 1.5;
}

.advanced-results-panel {
  margin-bottom: 28px;
}

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

.advanced-run-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.advanced-run-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.advanced-run-head h3 {
  margin: 0 0 6px;
}

.advanced-score-row {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  background: #ecfdf9;
}

.advanced-score-row strong {
  font-size: 34px;
  line-height: 1;
}

.advanced-result-code {
  display: block;
  max-height: 160px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  color: #31413d;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.home-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: clamp(28px, 6vw, 86px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(56px, 8vw, 104px) clamp(18px, 6vw, 86px) clamp(40px, 6vw, 72px);
  background:
    linear-gradient(112deg, rgba(9, 37, 45, 0.92), rgba(15, 118, 110, 0.78) 48%, rgba(176, 83, 23, 0.5)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1800&q=80") center/cover;
  color: white;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 9% 6% auto auto;
  z-index: -1;
  width: min(420px, 34vw);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  transform: rotate(12deg);
  animation: heroOrbit 12s ease-in-out infinite alternate;
}

.home-hero-copy {
  position: relative;
  z-index: 1;
  animation: contentRise 0.56s ease both;
}

.home-hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(52px, 8vw, 104px);
  line-height: 0.96;
}

.home-hero .eyebrow { color: rgba(255, 255, 255, 0.76); }

.home-hero-lede {
  max-width: 760px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.7;
}

.home-hero .hero-actions { margin-top: 28px; gap: 12px; flex-wrap: wrap; }

.launch-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 760px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
  backdrop-filter: blur(10px);
}

.launch-note strong {
  color: white;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 680px;
  margin-top: 34px;
}

.hero-proof span {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(10px);
}

.hero-proof strong {
  color: white;
  font-size: 28px;
}

.hero-dashboard {
  position: relative;
  z-index: 1;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 26px 80px rgba(6, 20, 24, 0.38);
  animation: dashboardFloat 0.7s ease both, panelDrift 7s ease-in-out 1s infinite alternate;
}

.dashboard-topline,
.dashboard-metrics,
.dashboard-flow,
.analytics-header,
.workflow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard-topline {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.dashboard-topline strong {
  padding: 6px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #14532d;
  font-size: 12px;
  text-transform: uppercase;
}

.dashboard-metrics {
  gap: 12px;
  margin-top: 18px;
}

.dashboard-metrics div {
  flex: 1;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.dashboard-metrics span,
.dashboard-flow span,
.workflow-row span,
.analytics-header span,
.analytics-bars span {
  color: var(--muted);
}

.dashboard-metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.dashboard-chart {
  display: flex;
  align-items: end;
  gap: 10px;
  height: 220px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 8px;
  background:
    linear-gradient(#e7efeb 1px, transparent 1px) 0 0 / 100% 25%,
    #f9fbfa;
}

.dashboard-chart span {
  flex: 1;
  min-width: 22px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #2563eb, #0f766e);
  transform-origin: bottom;
  animation: barGrow 0.8s ease both;
}

.dashboard-chart span:nth-child(2) { animation-delay: 0.08s; }
.dashboard-chart span:nth-child(3) { animation-delay: 0.16s; }
.dashboard-chart span:nth-child(4) { animation-delay: 0.24s; }
.dashboard-chart span:nth-child(5) { animation-delay: 0.32s; }
.dashboard-chart span:nth-child(6) { animation-delay: 0.4s; }
.dashboard-chart span:nth-child(7) { animation-delay: 0.48s; }

.logo-strip,
.launch-band,
.home-section,
.final-cta {
  animation: contentRise 0.42s ease both;
}

.dashboard-flow {
  gap: 10px;
  margin-top: 18px;
}

.dashboard-flow span {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  background: #eef6ff;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.logo-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 1px;
  width: min(1180px, calc(100% - 36px));
  margin: 18px auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.logo-strip span {
  display: grid;
  place-items: center;
  min-height: 58px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: #31413d;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.launch-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: min(1180px, calc(100% - 36px));
  margin: 18px auto 0;
}

.launch-band article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.launch-band strong {
  font-size: 18px;
}

.launch-band span {
  color: var(--muted);
  line-height: 1.55;
}

.home-section {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
  padding: 72px 0;
}

.home-section h2,
.final-cta h2 {
  margin: 0;
  font-size: clamp(32px, 4.5vw, 58px);
  line-height: 1.04;
}

.home-section > p,
.split-section p {
  color: var(--muted);
  line-height: 1.7;
}

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

.home-feature-card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 248, 246, 0.94));
}

.home-feature-card:nth-child(2n) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(238, 246, 255, 0.82));
}

.home-feature-card:nth-child(3n) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 247, 237, 0.78));
}

.use-case-section { padding-top: 18px; }

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.use-case-grid article {
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(238, 246, 255, 0.76)),
    var(--surface);
}

.use-case-grid h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.use-case-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}

.split-section.reverse { grid-template-columns: minmax(320px, 1fr) minmax(0, 1fr); }

.step-list {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.step-list div {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.step-list strong {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #17211f;
  color: white;
}

.step-list span { font-weight: 800; }

.workflow-panel,
.analytics-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.workflow-row {
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

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

.workflow-row.active {
  margin: -4px -8px 0;
  padding: 18px 8px;
  border-radius: 8px;
  background: #fff7ed;
}

.dark-section {
  width: auto;
  max-width: none;
  padding: 74px clamp(18px, 6vw, 86px);
  background: #17211f;
  color: white;
}

.dark-section .section-head {
  width: min(1180px, 100%);
  max-width: 1180px;
  margin-inline: auto;
}

.dark-section .section-head p,
.compliance-section .section-head p,
.faq-section .section-head p {
  max-width: 760px;
}

.dark-section .section-head p,
.dark-section .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: min(1180px, 100%);
  margin: 24px auto 0;
}

.ops-grid article {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.ops-grid h3,
.compliance-grid h3,
.faq-grid h3 {
  margin: 0 0 10px;
}

.ops-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

.analytics-panel {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(15, 118, 110, 0.08)),
    var(--surface);
}

.analytics-header {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.analytics-header strong {
  color: #14532d;
  font-size: 30px;
}

.analytics-bars {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.analytics-bars div {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding-bottom: 22px;
}

.analytics-bars div::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  border-radius: 999px;
  background: #e7efeb;
}

.analytics-bars em {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  height: 8px;
  border-radius: 999px;
  background: #2563eb;
}

.mini-grid,
.integration-grid {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

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

.mini-grid span,
.integration-grid span {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-weight: 800;
}

.testimonial-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 16px;
  align-items: stretch;
  padding-top: 24px;
}

.testimonial-quote,
.testimonial-stats span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.testimonial-quote {
  padding: clamp(24px, 4vw, 42px);
}

.testimonial-quote p {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.25;
}

.testimonial-quote strong {
  display: block;
  margin-top: 20px;
  color: var(--muted);
}

.testimonial-stats {
  display: grid;
  gap: 16px;
}

.testimonial-stats span {
  display: grid;
  gap: 8px;
  padding: 22px;
  color: var(--muted);
}

.testimonial-stats strong {
  color: var(--ink);
  font-size: 38px;
}

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

.integration-grid span {
  display: grid;
  place-items: center;
  min-height: 70px;
  text-align: center;
}

.compliance-section {
  padding: 72px clamp(18px, 6vw, 86px);
  background: #fff7ed;
  width: auto;
  max-width: none;
}

.compliance-section .section-head,
.compliance-grid {
  width: min(1180px, 100%);
  max-width: 1180px;
  margin-inline: auto;
}

.compliance-grid,
.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.compliance-grid article,
.faq-grid article {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.compliance-grid p,
.faq-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.pricing-section { padding-bottom: 42px; }

.pricing-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  line-height: 1.55;
}

.pricing-note strong {
  color: var(--ink);
}

.pricing-card {
  overflow: hidden;
}

.pricing-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), #b45309);
  opacity: 0.62;
}

.pricing-card-featured::after {
  height: 7px;
  opacity: 1;
}

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

.faq-section {
  padding-top: 54px;
}

.final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto 72px;
  padding: clamp(28px, 5vw, 48px);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.94), rgba(37, 99, 235, 0.88)),
    url("https://images.unsplash.com/photo-1557804506-669a67965ba0?auto=format&fit=crop&w=1600&q=80") center/cover;
  color: white;
}

.final-cta .eyebrow { color: rgba(255, 255, 255, 0.74); }

.final-cta h2 {
  max-width: 780px;
  color: white;
}

.final-cta .button {
  flex: 0 0 auto;
  background: white;
  color: var(--accent);
  border-color: white;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 72px);
  padding: 40px 0;
}

.auth-card { width: min(460px, 100%); padding: 32px; }

.login-shell {
  grid-template-columns: repeat(2, minmax(360px, 440px));
  gap: clamp(18px, 4vw, 46px);
  align-items: stretch;
  justify-content: center;
  width: min(1080px, calc(100% - 36px));
  margin-inline: auto;
  place-items: stretch;
}

.login-form {
  align-self: stretch;
}

.marketing-auth-shell {
  position: relative;
  padding-block: 56px;
}

.marketing-auth-shell::before,
.sales-landing-shell::before {
  content: "";
  position: fixed;
  inset: 72px 0 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), transparent 36%),
    linear-gradient(315deg, rgba(37, 99, 235, 0.1), transparent 34%),
    #eef3f1;
}

.login-visual-panel,
.sales-visual-panel {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid rgba(217, 226, 222, 0.9);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: contentRise 0.42s ease both;
}

.sales-visual-photo {
  min-height: 360px;
  background:
    linear-gradient(180deg, rgba(10, 27, 31, 0.05), rgba(10, 27, 31, 0.62)),
    url("https://images.unsplash.com/photo-1551836022-d5d88e9218df?auto=format&fit=crop&w=1100&q=80") center/cover;
}

.login-icon-panel {
  display: grid;
  gap: 18px;
  align-content: center;
  justify-items: center;
  width: min(440px, 100%);
  min-height: 0;
  padding: clamp(24px, 4vw, 38px);
  background:
    linear-gradient(140deg, rgba(236, 253, 249, 0.92), rgba(238, 246, 255, 0.78)),
    var(--surface);
}

.login-icon-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: min(300px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.92) 0 29%, transparent 30%),
    conic-gradient(from 120deg, rgba(15, 118, 110, 0.14), rgba(37, 99, 235, 0.14), rgba(180, 83, 9, 0.12), rgba(15, 118, 110, 0.14));
}

.login-icon-orbit::before,
.login-icon-orbit::after {
  content: "";
  position: absolute;
  inset: 13%;
  border: 1px dashed rgba(15, 118, 110, 0.24);
  border-radius: 50%;
}

.login-icon-orbit::after {
  inset: 27%;
  border-style: solid;
  border-color: rgba(37, 99, 235, 0.18);
}

.login-shield-icon {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 24px 48px rgba(15, 118, 110, 0.24);
  animation: panelDrift 5s ease-in-out infinite alternate;
}

.login-shield-icon svg {
  width: 66px;
  height: 66px;
}

.login-orbit-icon {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent);
  box-shadow: 0 16px 34px rgba(23, 33, 31, 0.12);
}

.login-orbit-icon svg {
  width: 25px;
  height: 25px;
}

.login-orbit-mail {
  top: 12%;
  right: 17%;
}

.login-orbit-lock {
  left: 9%;
  bottom: 23%;
  color: var(--accent-2);
}

.login-orbit-chart {
  right: 12%;
  bottom: 15%;
  color: #b45309;
}

.login-visual-card {
  position: static;
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  box-shadow: 0 16px 40px rgba(23, 33, 31, 0.1);
  backdrop-filter: blur(14px);
}

.login-visual-card span,
.login-visual-card em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
}

.login-visual-card strong {
  font-size: 48px;
  line-height: 1;
}

.login-visual-steps {
  position: static;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.login-visual-steps span,
.sales-proof-grid span {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(9, 37, 45, 0.64);
  color: white;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  backdrop-filter: blur(10px);
}

.login-visual-steps span {
  place-items: start;
  min-height: 72px;
  background: rgba(9, 37, 45, 0.74);
  line-height: 1.25;
}

.login-visual-steps strong {
  display: block;
  margin-bottom: 4px;
  color: #a7f3d0;
}

.login-form,
.contact-sales-card {
  animation: contentRise 0.48s ease both;
}

.login-form-card {
  width: min(440px, 100%);
  height: 100%;
  padding: clamp(24px, 4vw, 38px);
  border-color: rgba(15, 118, 110, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 250, 0.94)),
    var(--surface);
  box-shadow: 0 22px 60px rgba(23, 33, 31, 0.12);
}

.login-form-card h1 {
  font-size: clamp(36px, 5vw, 54px);
}

.login-form-card .button {
  width: 100%;
  margin-top: 6px;
}

.login-onboarding-card {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(236, 253, 249, 0.86), rgba(238, 246, 255, 0.72)),
    var(--soft);
}

.login-onboarding-card strong {
  font-size: 16px;
  line-height: 1.25;
}

.login-onboarding-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.login-onboarding-card .button {
  width: fit-content;
  margin-top: 2px;
  border-color: rgba(15, 118, 110, 0.28);
}

.contact-sales-shell {
  grid-template-columns: minmax(340px, 0.82fr) minmax(460px, 1fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: stretch;
  width: min(1200px, calc(100% - 36px));
}

.sales-landing-shell {
  padding-block: 56px;
}

.sales-svg-panel {
  display: grid;
  gap: 18px;
  align-content: center;
  padding: clamp(22px, 4vw, 38px);
  background:
    linear-gradient(145deg, rgba(236, 253, 249, 0.9), rgba(238, 246, 255, 0.76)),
    var(--surface);
}

.sales-illustration {
  display: grid;
  place-items: center;
  min-height: 310px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 22%, rgba(15, 118, 110, 0.14), transparent 34%),
    radial-gradient(circle at 80% 72%, rgba(37, 99, 235, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.68);
  color: var(--accent);
  overflow: hidden;
}

.sales-illustration svg {
  width: min(100%, 420px);
  height: auto;
  filter: drop-shadow(0 24px 42px rgba(23, 33, 31, 0.12));
}

.sales-svg-card {
  fill: rgba(255, 255, 255, 0.92);
  stroke: rgba(15, 118, 110, 0.18);
  stroke-width: 2;
}

.sales-svg-card-one {
  animation: salesCardFloat 5.6s ease-in-out infinite alternate;
}

.sales-svg-card-two {
  animation: salesCardFloat 6.2s ease-in-out 0.3s infinite alternate;
}

.sales-svg-card-three {
  animation: salesCardFloat 5.8s ease-in-out 0.6s infinite alternate;
}

.sales-svg-path {
  color: rgba(15, 118, 110, 0.46);
  stroke-dasharray: 10 10;
  animation: salesPathMove 10s linear infinite;
}

.sales-svg-node {
  fill: var(--accent);
  stroke: white;
  stroke-width: 6;
}

.sales-svg-node-two {
  fill: var(--accent-2);
}

.sales-svg-node-three {
  fill: #b45309;
}

.sales-svg-mail,
.sales-svg-mail-line,
.sales-svg-bars,
.sales-svg-check {
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.sales-svg-mail {
  fill: rgba(15, 118, 110, 0.08);
  stroke: var(--accent);
}

.sales-svg-mail-line,
.sales-svg-bars {
  stroke: var(--accent);
}

.sales-svg-check {
  stroke: white;
}

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

.sales-proof-grid span {
  place-items: start;
  min-height: auto;
  padding: 14px;
  border-color: rgba(15, 118, 110, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  text-align: left;
  animation: contentRise 0.5s ease both;
}

.sales-proof-grid span:nth-child(2) {
  animation-delay: 0.08s;
}

.sales-proof-grid span:nth-child(3) {
  animation-delay: 0.16s;
}

.sales-proof-grid strong {
  display: block;
  margin-bottom: 3px;
  color: var(--accent);
  font-size: 22px;
}

.sales-launch-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sales-launch-flow span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  background: rgba(9, 37, 45, 0.78);
  color: white;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  animation: contentRise 0.5s ease both;
}

.sales-launch-flow span:nth-child(2) {
  animation-delay: 0.08s;
}

.sales-launch-flow span:nth-child(3) {
  animation-delay: 0.16s;
}

.contact-sales-card {
  width: min(760px, 100%);
  border-color: rgba(15, 118, 110, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 250, 0.94)),
    var(--surface);
  box-shadow: 0 22px 60px rgba(23, 33, 31, 0.12);
}

.contact-sales-form {
  display: grid;
  gap: 16px;
  align-content: start;
}

.contact-sales-card h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.04;
}

.contact-sales-card .section-help {
  margin: 0;
}

.contact-sales-field-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.contact-sales-form label {
  min-height: 0;
  margin-bottom: 0;
}

.contact-sales-form input,
.contact-sales-form select,
.contact-sales-form textarea {
  width: 100%;
}

.contact-sales-form textarea {
  min-height: 118px;
}

.contact-sales-captcha {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 82px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 8px;
  background: rgba(245, 248, 246, 0.78);
  overflow-x: auto;
}

.contact-plan-reference {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(236, 253, 249, 0.78), rgba(238, 246, 255, 0.62)),
    var(--soft);
}

.contact-plan-floating-button {
  position: fixed;
  right: 0;
  top: 68%;
  z-index: 950;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 104px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: var(--accent);
  color: white;
  box-shadow: 0 18px 38px rgba(23, 33, 31, 0.18);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  transform: translateY(-50%);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, opacity 0.16s ease, visibility 0.16s ease;
}

.contact-plan-floating-button:hover,
.contact-plan-floating-button:focus-visible {
  background: color-mix(in srgb, var(--accent) 88%, #0b1f1c);
  box-shadow: 0 22px 46px rgba(23, 33, 31, 0.24);
  transform: translateY(-50%) translateX(-2px);
}

.contact-plan-drawer[hidden] {
  display: none;
}

.contact-plan-drawer {
  position: fixed;
  left: clamp(12px, 4vw, 56px);
  right: clamp(12px, 4vw, 56px);
  bottom: 24px;
  z-index: 1200;
}

.contact-plan-drawer-open {
  overflow: auto;
}

.contact-plan-drawer-panel {
  width: min(1180px, 100%);
  max-height: min(56vh, 430px);
  margin-inline: auto;
  gap: 14px;
  padding: 16px;
  border-width: 1px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 253, 249, 0.94)),
    var(--surface);
  box-shadow: 0 26px 70px rgba(23, 33, 31, 0.22);
  overflow-y: auto;
  animation: contactPlanStripIn 0.2s ease both;
}

.contact-plan-drawer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 14px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(217, 226, 222, 0.9);
}

.contact-plan-drawer-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  cursor: pointer;
}

.contact-plan-reference-head {
  display: grid;
  gap: 5px;
}

.contact-plan-reference-head strong {
  font-size: 16px;
  line-height: 1.25;
}

.contact-plan-reference-head span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.contact-plan-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.contact-plan-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(217, 226, 222, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.contact-plan-item-featured {
  border-color: rgba(15, 118, 110, 0.32);
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.1);
}

.contact-plan-item > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.contact-plan-item strong {
  font-size: 15px;
}

.contact-plan-item span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.contact-plan-item ul {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  list-style: none;
}

.contact-plan-item li {
  position: relative;
  padding-left: 14px;
}

.contact-plan-item li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.contact-sales-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
  border-top: 1px solid rgba(217, 226, 222, 0.86);
}

.contact-sales-actions .button {
  flex: 0 0 auto;
  min-width: 210px;
}

.form-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: right;
}

.form-footnote a {
  color: var(--accent);
  font-weight: 800;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
}

[data-connection-field][hidden] {
  display: none !important;
}

.field-label-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
}

.field-label-text {
  min-width: 0;
}

.required-marker {
  margin-left: 3px;
  color: #be123c;
  font-weight: 900;
}

.section-help {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.field-help {
  position: relative;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 0;
  border: 1px solid #c7d4cf;
  border-radius: 50%;
  background: #eef6ff;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
  outline: none;
  overflow: visible;
  text-indent: -9999px;
}

.field-help::before {
  content: "i";
  font-style: normal;
  text-indent: 0;
}

.field-help::after {
  content: attr(data-help);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 20;
  width: min(300px, calc(100vw - 48px));
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  text-indent: 0;
  transform: translate(calc(-50% + var(--field-help-shift-x, 0px)), -4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.field-help:hover::after,
.field-help:focus::after,
.field-help:focus-visible::after {
  opacity: 1;
  transform: translate(calc(-50% + var(--field-help-shift-x, 0px)), 0);
}

.field-help.field-help-above::after {
  top: auto;
  bottom: calc(100% + 8px);
  transform: translate(calc(-50% + var(--field-help-shift-x, 0px)), 4px);
}

.field-help.field-help-above:hover::after,
.field-help.field-help-above:focus::after,
.field-help.field-help-above:focus-visible::after {
  transform: translate(calc(-50% + var(--field-help-shift-x, 0px)), 0);
}

.field-help[aria-hidden="true"]:focus::after,
.field-help[aria-hidden="true"]:focus-visible::after {
  opacity: 0;
  transform: translate(calc(-50% + var(--field-help-shift-x, 0px)), -4px);
}

.check .field-help {
  margin-left: 4px;
}

.section-help {
  max-width: 760px;
  margin: 8px 0 0;
  font-size: 15px;
}

input, select, textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c7d4cf;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: white;
}

textarea { resize: vertical; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 40px 0 20px;
}

.page-head h1 { font-size: clamp(30px, 5vw, 52px); }

.page-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.page-guide h2 {
  margin: 0;
  font-size: 20px;
}

.page-guide-head {
  display: grid;
  align-content: start;
  gap: 8px;
}

.page-guide-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  min-height: 36px;
  margin-top: 4px;
  padding: 0 12px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  background: #ecfdf9;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.page-guide-trigger:hover {
  border-color: rgba(15, 118, 110, 0.42);
  background: white;
}

.page-guide-trigger .guide-icon {
  width: 16px;
  height: 18px;
}

.page-guide-modal[hidden] { display: none; }

.page-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
}

.page-guide-modal-open {
  overflow: hidden;
}

.page-guide-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 33, 31, 0.44);
}

.page-guide-modal-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  gap: 0;
  width: min(620px, calc(100% - 32px));
  max-height: min(720px, calc(100vh - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  outline: none;
  overflow: hidden;
  transform: translate(-50%, -50%);
}

.page-guide-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.page-guide-modal-head h2 {
  margin: 0;
  font-size: 22px;
}

.page-guide-modal-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.page-guide-modal-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 18px 18px 18px 40px;
  color: var(--muted);
  line-height: 1.55;
  overflow-y: auto;
}

.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.stat { box-shadow: none; }
.stat span, .report-grid span { display: block; color: var(--muted); text-transform: capitalize; }
.stat strong { display: block; margin-top: 8px; font-size: 32px; }

.color-value {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
}

.color-value i {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.brand-color-setting {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.workspace-utility-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.52fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

.workspace-preference-controls {
  align-self: stretch;
}

.color-picker-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
}

.color-swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-swatch {
  width: 30px;
  height: 30px;
  border: 2px solid white;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
}

.color-swatch:focus,
.color-swatch:hover {
  box-shadow: 0 0 0 2px var(--accent);
}

.color-swatch-selected {
  box-shadow: 0 0 0 2px var(--accent);
}

.color-picker {
  min-height: 42px;
  padding: 4px;
  cursor: pointer;
}

.color-text {
  color: var(--muted);
  font-weight: 800;
}

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

.two-column {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  margin-bottom: 24px;
}

.panel { padding: 24px; box-shadow: none; }
.form-grid { align-content: start; }

.guide-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
  gap: 18px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto 34px;
  align-items: start;
}

.guide-sidebar {
  position: sticky;
  top: 92px;
}

.guide-sidebar nav,
.guide-content,
.guide-module-list,
.guide-detail-grid,
.guide-steps {
  display: grid;
  gap: 12px;
}

.guide-sidebar a {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: #31413d;
  font-weight: 800;
}

.guide-card {
  margin-bottom: 18px;
}

.guide-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

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

.guide-detail-grid article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.guide-detail-grid span,
.guide-steps span {
  color: var(--muted);
  line-height: 1.55;
}

.guide-steps {
  margin: 16px 0 0;
  padding-left: 22px;
}

.guide-compact-steps {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.guide-compact-steps li {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.guide-compact-steps li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.guide-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.guide-notes span {
  padding: 8px 10px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  background: #ecfdf9;
  color: #0f766e;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.guide-modal[hidden] {
  display: none;
}

.guide-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.guide-modal-open {
  overflow: hidden;
}

.guide-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 33, 31, 0.52);
}

.guide-modal-panel {
  position: absolute;
  inset: 22px;
  display: flex;
  flex-direction: column;
  max-width: 1180px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3f1;
  box-shadow: var(--shadow);
  outline: none;
  overflow: hidden;
}

.guide-modal-head {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.guide-modal-head h2 {
  margin: 0;
  font-size: 22px;
}

.guide-modal-head .eyebrow {
  margin-bottom: 4px;
}

.guide-full-link {
  margin-left: auto;
}

.guide-modal-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.guide-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.guide-modal-body .page-head,
.guide-modal-body .page-guide,
.guide-modal-body .guide-layout {
  width: 100%;
}

.guide-modal-body .page-head {
  padding-top: 0;
}

.guide-modal-body .guide-sidebar {
  top: 18px;
}

.panel-rule {
  width: 100%;
  margin: 24px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.module-launcher {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto 18px;
}

.module-launcher a {
  display: grid;
  gap: 7px;
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 246, 0.92)),
    var(--surface);
  box-shadow: 0 10px 24px rgba(23, 33, 31, 0.06);
}

.module-launcher strong {
  line-height: 1.2;
}

.module-launcher span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-head {
  align-items: flex-start;
  overflow: hidden;
  border-color: rgba(15, 118, 110, 0.16);
  background:
    linear-gradient(135deg, rgba(236, 253, 249, 0.94), rgba(238, 246, 255, 0.78)),
    var(--surface);
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.dashboard-kpis,
.dashboard-grid,
.dashboard-usage {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

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

.dashboard-kpi,
.usage-card {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 250, 0.9)),
    var(--surface);
  box-shadow: 0 12px 28px rgba(23, 33, 31, 0.07);
}

.dashboard-kpi span,
.usage-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-kpi strong {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.dashboard-kpi em,
.usage-card small,
.empty-state {
  color: var(--muted);
  font-style: normal;
  line-height: 1.5;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 20px;
  margin-bottom: 20px;
}

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

.dashboard-main-card,
.dashboard-health-card {
  min-height: 100%;
}

.dashboard-overview-grid {
  grid-template-columns: 1fr;
}

.dashboard-overview-panel .overview-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.dashboard-bars {
  display: grid;
  gap: 18px;
}

.dashboard-bars div {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(80px, auto) minmax(180px, 1.4fr);
  gap: 14px;
  align-items: center;
}

.dashboard-bars span {
  color: var(--muted);
  font-weight: 800;
}

.dashboard-bars strong {
  text-align: right;
}

.dashboard-bars em,
.usage-card em {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7efeb;
}

.dashboard-bars i,
.usage-card i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.health-ring {
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  margin: 22px auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface) 58%, transparent 60%),
    conic-gradient(var(--accent) calc(var(--score) * 1%), #e7efeb 0);
}

.health-ring strong {
  grid-area: 1 / 1;
  font-size: 42px;
}

.health-ring span {
  grid-area: 1 / 1;
  margin-top: 62px;
  color: var(--muted);
  font-weight: 800;
}

.health-list,
.overview-list,
.mini-dashboard-columns,
.checklist {
  display: grid;
  gap: 10px;
}

.health-list div,
.health-list a,
.overview-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: inherit;
}

.health-list span,
.overview-list span {
  color: var(--muted);
}

.dashboard-row-link {
  color: inherit;
}

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

.usage-card strong {
  font-size: 28px;
}

.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-action-grid a,
.checklist a {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.quick-action-grid span,
.mini-dashboard-columns span,
.checklist span {
  color: var(--muted);
  line-height: 1.5;
}

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

.mini-dashboard-columns div {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.checklist a {
  grid-template-columns: 52px 1fr;
  align-items: center;
}

.checklist a span {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: white;
  color: var(--warn);
  font-size: 12px;
  font-weight: 900;
}

.checklist a.done span {
  color: #14532d;
  background: #dcfce7;
}

.dashboard-modules {
  padding-top: 28px;
  padding-bottom: 72px;
}

.dashboard-modules .section-head {
  max-width: 860px;
}

.report-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.report-grid div, .automation-grid div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.report-grid strong { font-size: 24px; }

.row-item {
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.row-item:last-child { border-bottom: 0; }
.row-item span { font-weight: 800; }
.row-item em { color: var(--muted); font-style: normal; text-align: right; }

.module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 50px; }
.module { box-shadow: none; }
.module ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.75; }

.record-card { padding: 16px; margin-bottom: 14px; box-shadow: none; overflow-wrap: anywhere; }
.record-card h3 { margin-top: 0; }

.provider-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  box-shadow: 0 12px 34px rgba(23, 33, 31, 0.08);
}

.infrastructure-head {
  align-items: flex-start;
}

.infra-stats,
.infra-layout,
.provider-board {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

.infra-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.infra-stats article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, white, #f8fbfa);
  box-shadow: 0 12px 34px rgba(23, 33, 31, 0.08);
}

.infra-stats span,
.infra-stats em,
.provider-capacity span,
.provider-health-card span {
  color: var(--muted);
  font-style: normal;
}

.infra-stats span,
.provider-health-card span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.infra-stats strong {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1;
}

.infra-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  gap: 20px;
  margin-bottom: 26px;
}

.provider-setup-card,
.provider-guide-card {
  display: grid;
  gap: 16px;
  align-self: start;
}

.provider-setup-card .panel-title-row {
  margin-bottom: 0;
}

.email-connection-sections,
.email-connection-section {
  display: grid;
  gap: 14px;
}

.email-connection-section {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.email-connection-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.email-connection-section-head {
  display: grid;
  gap: 4px;
}

.email-connection-section-head .eyebrow,
.email-connection-section-head h3 {
  margin: 0;
}

.email-connection-section-head h3 {
  font-size: 17px;
  line-height: 1.2;
}

.provider-setup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 2px;
}

.provider-setup-actions .button {
  min-width: 150px;
  justify-content: center;
}

.provider-guide-grid {
  display: grid;
  gap: 12px;
}

.provider-guide-grid article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.provider-guide-grid span {
  color: var(--muted);
  line-height: 1.5;
}

.provider-board {
  padding-bottom: 42px;
}

.provider-board > .section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  max-width: none;
}

.provider-board > .section-head > div {
  max-width: 760px;
}

.provider-board > .section-head .button {
  flex: 0 0 auto;
  margin-top: 26px;
}

.provider-grid,
.provider-list {
  display: grid;
  gap: 16px;
}

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

.provider-list {
  grid-template-columns: 1fr;
}

.provider-list .provider-card {
  border-radius: 8px;
}

.provider-card-head,
.provider-actions,
.provider-action-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.provider-list .provider-edit-form {
  display: grid;
  gap: 14px;
}

.provider-list .provider-edit-form > .compact-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.provider-list .provider-actions {
  justify-content: flex-end;
}

.provider-list .provider-action-row {
  justify-content: flex-end;
}

.provider-list .provider-action-row .button-small {
  min-width: 132px;
  justify-content: center;
}

.email-connection-row-list {
  gap: 12px;
}

.email-connection-table-wrap {
  width: 100%;
  overflow-x: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 16px 42px rgba(23, 33, 31, 0.07);
}

.email-connection-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.email-connection-name-col { width: 15%; }
.email-connection-status-col { width: 8%; }
.email-connection-type-col { width: 8%; }
.email-connection-host-col { width: 22%; }
.email-connection-from-col { width: 17%; }
.email-connection-limit-col { width: 7%; }
.email-connection-test-col { width: 8%; }
.email-connection-actions-col { width: 144px; }

.email-connection-table th,
.email-connection-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.email-connection-table th {
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: normal;
}

.email-connection-table td {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.email-connection-table tbody tr:last-child td {
  border-bottom: 0;
}

.email-connection-table td strong,
.email-connection-table td span {
  display: block;
}

.email-connection-table td span:not(.status-pill):not(.button-icon) {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.email-connection-table td:last-child {
  width: 184px;
  min-width: 184px;
}

.email-connection-table th:nth-child(2),
.email-connection-status-cell,
.email-connection-actions-cell {
  text-align: center;
}

.email-connection-table th:nth-child(6),
.email-connection-number-cell {
  text-align: right;
}

.email-connection-status-cell .status-pill {
  display: inline-flex;
  justify-content: center;
}

.email-connection-test-cell strong,
.email-connection-test-cell span {
  max-width: 100%;
}

.email-connection-table-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 4px;
  width: max-content;
  min-width: max-content;
  padding-top: 0;
  border-top: 0;
  justify-content: center;
}

.provider-list .email-connection-table-actions .button-small {
  min-width: 0;
  padding-inline: 12px;
}

.email-connection-icon-button {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  padding-inline: 0;
}

.email-connection-icon-button .button-icon {
  width: 15px;
  height: 15px;
}

.email-connection-icon-button .button-icon {
  margin: 0;
}

.provider-card-head h3 {
  margin-bottom: 4px;
}

.provider-health-card {
  display: grid;
  grid-template-columns: minmax(170px, 0.45fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.provider-health-card div {
  display: grid;
  gap: 5px;
}

.provider-health-card strong {
  font-size: 22px;
  line-height: 1.1;
}

.provider-health-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
}

.provider-health-card p {
  margin: 0;
  color: #31413d;
  line-height: 1.5;
}

.provider-health-ok {
  border-color: rgba(22, 163, 74, 0.25);
  background: #f0fdf4;
}

.provider-health-failed {
  border-color: rgba(185, 28, 28, 0.22);
  background: #fef2f2;
}

.provider-health-pending {
  border-color: rgba(180, 83, 9, 0.22);
  background: #fffbeb;
}

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

.compact-form-grid label {
  margin-bottom: 0;
}

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

.provider-capacity div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.provider-capacity strong {
  font-size: 22px;
}

.status-pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-active {
  background: #dcfce7;
  color: #14532d;
}

.status-paused {
  background: #fef3c7;
  color: #92400e;
}

.status-failed {
  background: #fee2e2;
  color: #7f1d1d;
}

.provider-delete-form {
  display: flex;
  justify-content: flex-end;
}

.provider-action-row {
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.provider-action-row form {
  margin: 0;
}

.deliverability-hero {
  align-items: flex-start;
}

.deliverability-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.deliverability-summary-grid,
.deliverability-layout,
.deliverability-board {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

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

.deliverability-summary-grid article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, white, #f8fbfa);
  box-shadow: 0 12px 34px rgba(23, 33, 31, 0.08);
}

.deliverability-summary-grid span,
.deliverability-scan-grid span,
.deliverability-metrics span,
.deliverability-warmup-plan span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.deliverability-summary-grid strong {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1;
}

.deliverability-summary-grid em,
.deliverability-scan-grid em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.deliverability-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 22px;
}

.deliverability-policy-card,
.deliverability-scan-card,
.deliverability-provider-card,
.deliverability-domain-card {
  box-shadow: 0 16px 46px rgba(23, 33, 31, 0.08);
}

.deliverability-policy-card {
  display: grid;
  gap: 16px;
}

.deliverability-policy-toggles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.deliverability-policy-card h2,
.deliverability-scan-card h2 {
  margin-bottom: 0;
}

.deliverability-scan-card {
  display: grid;
  gap: 14px;
}

.deliverability-policy-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.deliverability-policy-actions .button {
  min-width: 150px;
  justify-content: center;
}

.deliverability-scan-grid,
.deliverability-metrics,
.deliverability-provider-grid,
.deliverability-domain-grid,
.deliverability-warmup-plan {
  display: grid;
  gap: 12px;
}

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

.deliverability-scan-grid article,
.deliverability-metrics div,
.deliverability-warmup-plan div {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.deliverability-scan-grid article {
  align-content: start;
  min-height: 170px;
}

.deliverability-scan-grid form {
  margin: 0;
  align-self: end;
}

.deliverability-scan-grid .button {
  width: 100%;
  justify-content: center;
}

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

.deliverability-metrics strong,
.deliverability-warmup-plan strong {
  font-size: 22px;
  line-height: 1.1;
}

.deliverability-board {
  margin-bottom: 24px;
}

.deliverability-provider-grid {
  grid-template-columns: 1fr;
}

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

.deliverability-provider-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

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

.deliverability-provider-card .compact-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.deliverability-provider-card .compact-form-grid .button {
  width: 100%;
  justify-content: center;
}

.deliverability-provider-card .provider-action-row {
  align-items: end;
}

.deliverability-provider-card .provider-action-row label {
  flex: 1 1 220px;
  margin: 0;
}

.deliverability-provider-controls {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.deliverability-provider-controls summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.deliverability-provider-controls[open] summary {
  border-bottom: 1px solid var(--line);
}

.deliverability-provider-controls form {
  padding: 14px;
}

.deliverability-provider-controls form + form {
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .deliverability-hero-actions,
  .deliverability-hero-actions .button {
    width: 100%;
  }

  .deliverability-policy-toggles {
    grid-template-columns: 1fr;
  }
}

.deliverability-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.deliverability-domain-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 8px;
}

.deliverability-domain-card h3 {
  margin: 0;
}

.domains-hero {
  align-items: flex-start;
}

.domain-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.domain-summary-grid,
.domain-layout,
.domain-board {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

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

.domain-summary-grid article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, white, #f8fbfa);
  box-shadow: 0 12px 34px rgba(23, 33, 31, 0.08);
}

.domain-summary-grid span,
.domain-playbook-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.domain-summary-grid strong {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1;
}

.domain-summary-grid em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.domain-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 22px;
}

.domain-create-card,
.domain-playbook-card,
.domain-card {
  box-shadow: 0 16px 46px rgba(23, 33, 31, 0.08);
}

.domain-create-card,
.domain-playbook-card {
  display: grid;
  gap: 16px;
}

.domain-create-card h2,
.domain-playbook-card h2 {
  margin-bottom: 0;
}

.domain-create-card .section-help {
  margin-top: 0;
}

.domain-generate-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.domain-generate-actions .button {
  min-width: 210px;
  justify-content: center;
}

.domain-playbook-list,
.domain-card-grid,
.domain-list,
.domain-card,
.domain-edit-form {
  display: grid;
  gap: 12px;
}

.domain-playbook-list article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.domain-playbook-list span {
  text-transform: none;
  font-weight: 600;
  line-height: 1.45;
}

.domain-board {
  margin-bottom: 28px;
}

.domain-table-wrap {
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 46px rgba(23, 33, 31, 0.08);
}

.domain-data-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.domain-data-table th,
.domain-data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  vertical-align: middle;
}

.domain-data-table th {
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.domain-data-table tr:last-child td {
  border-bottom: 0;
}

.domain-data-table td:first-child {
  display: grid;
  gap: 4px;
}

.domain-data-table td:first-child strong {
  overflow-wrap: anywhere;
}

.domain-data-table td:first-child span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.domain-data-table code {
  display: block;
  max-width: 100%;
  padding: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--soft);
  color: #20312d;
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.domain-name-col { width: 18%; }
.domain-readiness-col { width: 10%; }
.domain-status-col { width: 8%; }
.domain-selector-col { width: 13%; }
.domain-record-col { width: 25%; }
.domain-actions-col { width: 10%; }

.domain-table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  white-space: nowrap;
}

.domain-table-actions form {
  margin: 0;
}

.domain-icon-button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
}

.domain-modal-panel {
  width: min(1120px, calc(100vw - 32px));
  max-height: min(94vh, 900px);
}

.domain-modal-panel textarea {
  min-height: 92px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.domain-modal-panel .domain-status-editor {
  align-items: end;
}

.domain-record-verification {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.domain-verification-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.domain-verification-card.status-active {
  border-color: color-mix(in srgb, var(--success) 38%, var(--line));
  background: color-mix(in srgb, var(--success) 7%, white);
}

.domain-verification-card.status-failed {
  border-color: color-mix(in srgb, var(--danger) 42%, var(--line));
  background: color-mix(in srgb, var(--danger) 6%, white);
}

.domain-verification-card.status-paused {
  background: var(--soft);
}

.domain-verification-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.domain-verification-head strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.domain-record-state {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-active .domain-record-state {
  border-color: color-mix(in srgb, var(--success) 40%, var(--line));
  color: var(--success);
}

.status-failed .domain-record-state {
  border-color: color-mix(in srgb, var(--danger) 42%, var(--line));
  color: var(--danger);
}

.domain-record-state .button-icon {
  width: 14px;
  height: 14px;
}

.domain-check-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.domain-check-message-success {
  color: var(--success);
}

.domain-check-message-error {
  color: var(--danger);
}

@media (max-width: 980px) {
  .domain-record-verification {
    grid-template-columns: 1fr;
  }
}

.domain-card-grid,
.domain-list {
  grid-template-columns: 1fr;
}

.domain-card {
  padding: 18px;
  border-radius: 8px;
}

.domain-list .domain-card {
  gap: 16px;
}

.domain-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.domain-card-head h3 {
  margin: 0;
  overflow-wrap: anywhere;
}

.domain-edit-form textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.domain-edit-form > .compact-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.domain-edit-form .provider-actions {
  justify-content: flex-end;
}

.domain-status-editor,
.domain-toggle-grid,
.domain-action-grid {
  display: grid;
  gap: 10px;
}

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

.domain-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.domain-action-grid {
  grid-template-columns: repeat(8, minmax(104px, 1fr));
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.domain-action-grid form {
  margin: 0;
}

.domain-action-grid .button {
  width: 100%;
}

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

.domain-record-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.domain-record-row div {
  display: grid;
  gap: 4px;
}

.domain-record-row code {
  align-self: center;
  padding: 10px;
  overflow-wrap: anywhere;
  border-radius: 8px;
  background: #fff;
  color: #20312d;
  font-size: 12px;
  line-height: 1.45;
}

.domain-advanced-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.domain-advanced-editor summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.domain-advanced-editor[open] summary {
  border-bottom: 1px solid var(--line);
}

.domain-advanced-editor > .compact-form-grid,
.domain-advanced-editor > .domain-status-editor,
.domain-advanced-editor > .provider-actions {
  padding: 14px;
}

.domain-advanced-editor > .domain-status-editor,
.domain-advanced-editor > .provider-actions {
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .domain-hero-actions,
  .domain-hero-actions .button {
    width: 100%;
  }

  .domain-table-wrap {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .domain-data-table,
  .domain-data-table thead,
  .domain-data-table tbody,
  .domain-data-table tr,
  .domain-data-table th,
  .domain-data-table td {
    display: block;
  }

  .domain-data-table thead {
    display: none;
  }

  .domain-data-table tr {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 34px rgba(23, 33, 31, 0.08);
  }

  .domain-data-table td,
  .domain-data-table td:first-child {
    display: grid;
    grid-template-columns: minmax(90px, 0.35fr) minmax(0, 1fr);
    gap: 10px;
    padding: 0;
    border-bottom: 0;
  }

  .domain-data-table td::before {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .domain-data-table td:nth-child(1)::before { content: "Domain"; }
  .domain-data-table td:nth-child(2)::before { content: "Readiness"; }
  .domain-data-table td:nth-child(3)::before { content: "SPF"; }
  .domain-data-table td:nth-child(4)::before { content: "DKIM"; }
  .domain-data-table td:nth-child(5)::before { content: "DMARC"; }
  .domain-data-table td:nth-child(6)::before { content: "Selector"; }
  .domain-data-table td:nth-child(7)::before { content: "DMARC"; }
  .domain-data-table td:nth-child(8)::before { content: "Actions"; }

  .domain-data-table td:first-child > strong,
  .domain-data-table td:first-child > span {
    grid-column: 2;
  }

  .domain-data-table code {
    white-space: normal;
  }

  .domain-table-actions {
    justify-content: flex-start;
  }

  .domain-record-row {
    grid-template-columns: 1fr;
  }
}

.sender-hero {
  align-items: flex-end;
}

.sender-summary-grid,
.sender-layout,
.sender-board {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

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

.sender-summary-grid article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, white, #f8fbfa);
  box-shadow: 0 12px 34px rgba(23, 33, 31, 0.08);
}

.sender-summary-grid span,
.sender-meta-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sender-summary-grid strong {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1;
}

.sender-summary-grid em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.sender-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 22px;
}

.sender-create-card,
.sender-domain-card,
.sender-card {
  box-shadow: 0 16px 46px rgba(23, 33, 31, 0.08);
}

.sender-create-card,
.sender-domain-card {
  display: grid;
  gap: 16px;
}

.sender-create-card h2,
.sender-domain-card h2 {
  margin-bottom: 0;
}

.sender-create-card .section-help,
.sender-domain-card .section-help {
  margin-top: 0;
}

.sender-domain-list,
.sender-card-grid,
.sender-card,
.sender-edit-form,
.sender-meta-grid {
  display: grid;
  gap: 12px;
}

.sender-domain-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.sender-shared-pool {
  position: relative;
}

.sender-shared-pool input {
  padding-right: 104px;
  background: #f8fbfa;
  color: #31413d;
  font-weight: 800;
}

.sender-pool-badge {
  position: absolute;
  right: 12px;
  bottom: 11px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #dcfce7;
  color: #14532d;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.sender-board {
  margin-bottom: 28px;
}

.sender-table {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(23, 33, 31, 0.06);
}

.sender-table-head,
.sender-table-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(260px, 1.15fr) minmax(110px, 0.45fr) minmax(170px, 0.6fr) minmax(240px, 0.95fr);
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
}

.sender-table-head {
  border-bottom: 1px solid var(--line);
  background: #f8fbfa;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.sender-table-row {
  border-bottom: 1px solid var(--line);
  background: white;
}

.sender-table-row:hover {
  background: #fbfdfc;
}

.sender-table-row:last-child {
  border-bottom: 0;
}

.sender-table-sender,
.sender-table-routing,
.sender-table-domain,
.sender-table-actions {
  display: grid;
  gap: 8px;
}

.sender-table-sender strong,
.sender-table-sender span,
.sender-table-domain em {
  overflow-wrap: anywhere;
}

.sender-table-sender strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
  line-height: 1.25;
}

.sender-table-sender span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.sender-table-routing {
  gap: 10px;
}

.sender-route {
  display: grid;
  gap: 3px;
}

.sender-route span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.sender-route strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.sender-table-default {
  display: grid;
  align-content: start;
}

.sender-table-domain {
  gap: 6px;
}

.sender-table-domain .status-pill {
  width: fit-content;
}

.sender-table-domain em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.sender-table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.sender-table-actions form {
  margin: 0;
}

.sender-table-actions .button-small {
  min-width: 94px;
  justify-content: center;
}

.sender-modal-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.sender-modal-note .muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.sender-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.sender-form-actions .button {
  min-width: 156px;
  justify-content: center;
}

.sender-form-modal-panel .sender-form-actions {
  grid-column: 1 / -1;
}

.sender-form-modal-panel {
  width: min(760px, calc(100% - 32px));
  overflow: visible;
}

.sender-form-modal-panel .field-help::after {
  z-index: 2300;
}

html[data-theme="dark"] .sender-table {
  border-color: var(--line);
  background: var(--surface);
}

html[data-theme="dark"] .sender-table-head {
  background: #13211d;
  color: #9fd6cc;
}

html[data-theme="dark"] .sender-table-row {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
    var(--surface);
}

html[data-theme="dark"] .sender-table-row:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    var(--surface);
}

html[data-theme="dark"] .sender-route span,
html[data-theme="dark"] .sender-table-sender span,
html[data-theme="dark"] .sender-table-domain em {
  color: var(--muted);
}

html[data-theme="dark"] .sender-shared-pool input {
  background: #0c1916;
  color: var(--ink);
}

html[data-theme="dark"] .sender-pool-badge {
  background: rgba(22, 163, 74, 0.2);
  color: #86efac;
}

@media (max-width: 920px) {
  .sender-table-head {
    display: none;
  }

  .sender-table-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .sender-table-actions {
    grid-auto-flow: column;
    justify-content: start;
    overflow-x: auto;
    padding-top: 4px;
  }
}

@media (max-width: 560px) {
  .sender-table-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .sender-table-actions form,
  .sender-table-actions .button-small {
    width: 100%;
  }
}

.campaign-hero {
  align-items: flex-start;
}

.campaign-summary-grid,
.campaign-layout,
.campaign-board {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

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

.campaign-summary-grid article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, white, #f8fbfa);
  box-shadow: 0 12px 34px rgba(23, 33, 31, 0.08);
}

.campaign-summary-grid span,
.campaign-check-grid span,
.campaign-metric-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.campaign-summary-grid strong {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1;
}

.campaign-summary-grid em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.campaign-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 22px;
}

.campaign-create-launch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 170px;
  padding: 22px;
  box-shadow: 0 16px 46px rgba(23, 33, 31, 0.08);
}

.campaign-create-card,
.campaign-readiness-card,
.campaign-card {
  box-shadow: 0 16px 46px rgba(23, 33, 31, 0.08);
}

.campaign-create-card {
  display: grid;
  gap: 16px;
}

.campaign-create-card h2,
.campaign-readiness-card h2 {
  margin-bottom: 0;
}

.campaign-modal-panel {
  width: min(980px, calc(100vw - 32px));
  height: 100dvh;
  max-height: 100dvh;
  padding: 18px;
  overflow-y: hidden;
  overflow-x: hidden;
}

.campaign-modal-panel .workspace-form-modal-head {
  margin-bottom: 4px;
}

.campaign-modal-panel .workspace-form-modal-head h2 {
  font-size: 24px;
}

.campaign-modal-panel .section-help {
  max-width: 720px;
  margin-top: 4px;
  line-height: 1.4;
}

.campaign-modal-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.campaign-modal-steps span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.campaign-modal-steps b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  line-height: 1;
}

.campaign-workflow-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "setup audience"
    "content schedule";
  gap: 10px;
  align-items: stretch;
}

.campaign-form-section {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(245, 248, 246, 0.72);
}

.campaign-form-setup { grid-area: setup; }
.campaign-form-audience { grid-area: audience; }
.campaign-form-content { grid-area: content; }
.campaign-form-schedule {
  grid-area: schedule;
  background:
    linear-gradient(180deg, rgba(236, 253, 249, 0.78), rgba(245, 248, 246, 0.86)),
    var(--soft);
}

.campaign-form-section-head {
  display: grid;
  gap: 1px;
}

.campaign-form-section-head .eyebrow,
.campaign-form-section-head h3 {
  margin: 0;
}

.campaign-form-section-head h3 {
  font-size: 14px;
}

.campaign-form-section .compact-form-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

.campaign-modal-panel label {
  gap: 5px;
  font-size: 13px;
}

.campaign-modal-panel input,
.campaign-modal-panel select {
  min-height: 38px;
  padding-block: 8px;
}

.campaign-modal-panel .toggle-row {
  min-height: 54px;
  padding: 9px 10px;
}

.campaign-form-schedule .compact-form-grid {
  grid-template-columns: 1fr;
}

.campaign-create-actions {
  position: sticky;
  bottom: -18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 -18px -18px;
  padding: 10px 18px 18px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), white);
}

.campaign-create-actions .button {
  min-width: 170px;
  justify-content: center;
}

.campaign-readiness-card,
.campaign-card,
.campaign-edit-form,
.campaign-check-grid,
.campaign-card-grid,
.campaign-list,
.campaign-metric-grid {
  display: grid;
  gap: 12px;
}

.campaign-check-grid,
.campaign-metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.campaign-check-grid article,
.campaign-metric-grid div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.campaign-check-grid strong,
.campaign-metric-grid strong {
  font-size: 24px;
  line-height: 1.1;
}

.campaign-board {
  margin-bottom: 28px;
}

.campaign-table-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 16px 42px rgba(23, 33, 31, 0.07);
}

.campaign-data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.campaign-name-col { width: 15%; }
.campaign-type-col { width: 9%; }
.campaign-status-col { width: 8%; }
.campaign-schedule-col { width: 12%; }
.campaign-content-col { width: 17%; }
.campaign-number-col { width: 7%; }
.campaign-actions-col { width: 24%; }

.campaign-data-table th,
.campaign-data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.campaign-data-table th {
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.campaign-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.campaign-data-table td strong,
.campaign-data-table td span:not(.button-icon) {
  display: block;
}

.campaign-data-table td span:not(.status-pill):not(.button-icon) {
  color: var(--muted);
}

.campaign-number-cell {
  text-align: center;
}

.campaign-table-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-start;
  white-space: nowrap;
}

.campaign-table-actions form {
  margin: 0;
}

.campaign-icon-button {
  display: inline-flex;
  align-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  gap: 0;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.campaign-icon-button .button-icon,
.campaign-icon-button .button-icon svg {
  width: 16px;
  height: 16px;
}

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

.campaign-list {
  grid-template-columns: 1fr;
}

.campaign-card {
  padding: 18px;
  border-radius: 8px;
}

.campaign-list .campaign-card {
  gap: 16px;
}

.campaign-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.campaign-card-head h3 {
  margin: 0 0 6px;
}

.campaign-card-head p {
  overflow-wrap: anywhere;
}

.campaign-list .campaign-edit-form > .compact-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.campaign-list .provider-actions {
  justify-content: flex-end;
}

.campaign-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.campaign-action-row form {
  margin: 0;
}

.campaign-action-row .button-small {
  min-width: 112px;
  justify-content: center;
}

@media (max-width: 980px) {
  .campaign-modal-panel {
    width: min(760px, calc(100vw - 24px));
    max-height: calc(100dvh - 28px);
    overflow-y: auto;
  }

  .campaign-workflow-sections {
    grid-template-columns: 1fr;
    grid-template-areas:
      "setup"
      "audience"
      "content"
      "schedule";
  }
}

@media (max-width: 620px) {
  .campaign-modal-panel {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    padding: 16px;
  }

  .campaign-modal-steps,
  .campaign-form-section .compact-form-grid,
  .campaign-form-schedule .compact-form-grid,
  .campaign-create-actions {
    grid-template-columns: 1fr;
  }

  .campaign-create-actions {
    display: grid;
  }

  .campaign-create-actions .button {
    width: 100%;
  }
}

.contacts-hero {
  align-items: flex-start;
}

.contacts-summary-grid,
.contacts-layout,
.contacts-board {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

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

.contacts-summary-grid article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, white, #f8fbfa);
  box-shadow: 0 12px 34px rgba(23, 33, 31, 0.08);
}

.contacts-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.contacts-summary-grid strong {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1;
}

.contacts-summary-grid em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.contacts-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 22px;
}

.contacts-create-card,
.contacts-import-card,
.contacts-list-card,
.contact-card {
  box-shadow: 0 16px 46px rgba(23, 33, 31, 0.08);
}

.contacts-create-card form,
.contacts-import-card form,
.contacts-list-card form,
.contact-card form {
  display: grid;
  gap: 14px;
}

.contacts-create-card {
  display: grid;
  gap: 18px;
}

.contacts-import-inline {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.contacts-form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.contacts-form-actions .button {
  min-width: 150px;
  justify-content: center;
}

.contacts-action-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 250, 0.9)),
    var(--surface);
  box-shadow: 0 16px 42px rgba(23, 33, 31, 0.07);
}

.contacts-section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.contacts-modal-panel {
  width: min(980px, calc(100% - 28px));
  max-height: min(820px, calc(100vh - 24px));
}

.contacts-group-edit-modal {
  width: min(1180px, calc(100vw - 48px));
  max-height: min(900px, calc(100dvh - 32px));
  padding: 20px;
  overflow-x: hidden;
}

.contacts-modal-panel .contacts-form-actions {
  gap: 10px;
}

.contacts-table-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 16px 42px rgba(23, 33, 31, 0.07);
}

.contacts-data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.contacts-data-table th,
.contacts-data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.contacts-data-table th {
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.contacts-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.contacts-data-table td strong {
  font-weight: 900;
}

.contacts-group-table th:nth-child(3),
.contacts-group-table td:nth-child(3),
.contacts-group-table th:nth-child(4),
.contacts-group-table td:nth-child(4),
.contacts-contact-table th:nth-child(4),
.contacts-contact-table td:nth-child(4),
.contacts-contact-table th:nth-child(6),
.contacts-contact-table td:nth-child(6) {
  text-align: center;
}

.contacts-contact-table th:nth-child(6),
.contacts-contact-table td:nth-child(6) {
  width: 104px;
  padding-inline: 8px;
}

.contacts-table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.contacts-table-actions form {
  margin: 0;
}

.contacts-table-actions .button-small {
  min-width: 72px;
  justify-content: center;
}

.contacts-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  gap: 0;
  line-height: 1;
}

.contacts-icon-button .button-icon,
.contacts-icon-button .button-icon svg {
  width: 15px;
  height: 15px;
  margin: 0;
}

.contacts-group-table .contacts-table-actions {
  gap: 6px;
}

.contacts-group-members-modal {
  width: min(1120px, calc(100% - 28px));
}

.contacts-group-edit-grid {
  grid-template-columns: minmax(240px, 0.45fr) minmax(320px, 1fr);
  gap: 12px;
}

.contacts-membership-select {
  min-height: 220px;
  max-height: 240px;
}

.contacts-group-editor {
  display: grid;
  gap: 14px;
}

.contacts-group-section {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.contacts-group-details-section {
  background: white;
}

.contacts-group-management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 14px;
  align-items: stretch;
}

.contacts-group-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.contacts-group-section h3,
.contacts-group-side-head h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.contacts-group-import-drop {
  margin: 0;
  background: white;
}

.contacts-group-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.contacts-group-members-wrap {
  max-height: 300px;
  overflow-y: auto;
  box-shadow: none;
}

.contacts-group-empty {
  box-shadow: none;
}

.contacts-download-menu {
  position: relative;
  display: inline-block;
}

.contacts-download-menu summary {
  list-style: none;
  cursor: pointer;
}

.contacts-download-menu summary::-webkit-details-marker {
  display: none;
}

.contacts-download-options {
  position: absolute;
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 136px;
  margin-top: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 16px 36px rgba(23, 33, 31, 0.14);
}

.contacts-download-options a {
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.contacts-download-options a:hover,
.contacts-download-options a:focus-visible {
  background: #ecfdf9;
  color: var(--accent);
}

@media (max-width: 920px) {
  .contacts-group-management-grid,
  .contacts-group-edit-grid {
    grid-template-columns: 1fr;
  }

  .contacts-group-side-head {
    align-items: flex-start;
    flex-direction: column;
    flex-wrap: wrap;
  }
}

.contacts-export-actions {
  justify-content: flex-start;
  margin-bottom: 14px;
}

.contacts-board {
  margin-bottom: 28px;
}

.contacts-list-grid,
.contacts-card-grid,
.contacts-list-view,
.contacts-list-card,
.contact-card,
.contact-edit-form,
.contacts-action-row {
  display: grid;
  gap: 12px;
}

.contacts-list-grid,
.contacts-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contacts-list-view {
  grid-template-columns: 1fr;
}

.contacts-list-card,
.contact-card {
  padding: 18px;
  border-radius: 8px;
}

.contacts-list-view .contacts-list-card,
.contacts-list-view .contact-card {
  gap: 16px;
}

.contacts-group-row > form {
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.2fr) auto;
  align-items: end;
}

.contacts-group-row .contacts-card-head {
  grid-column: 1 / -1;
}

.contacts-group-row .contacts-form-actions {
  align-self: end;
}

.contact-row .contact-edit-form > .compact-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.contact-row .contacts-form-actions {
  justify-content: flex-end;
}

.contacts-list-view .contacts-action-row {
  margin-top: 2px;
}

.contacts-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.contacts-card-head h3 {
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}

.contacts-action-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.contacts-list-view .contacts-action-row {
  justify-content: flex-end;
}

.contacts-action-row form {
  margin: 0;
}

.contacts-action-row .button {
  width: 100%;
}

.contacts-create-card select[multiple],
.contacts-import-card select[multiple],
.contact-card select[multiple] {
  min-height: 92px;
}

.contacts-action-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.1fr 0.85fr;
  gap: 18px;
  align-items: stretch;
}

.contacts-action-grid > article {
  min-height: 100%;
}

.contact-create-grid,
.contact-edit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-create-grid label:first-child,
.contact-edit-grid label:first-child,
.contact-import-options label:last-child {
  grid-column: 1 / -1;
}

.contact-import-options {
  grid-template-columns: minmax(180px, 0.55fr) minmax(260px, 1fr);
}

.contact-import-drop {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px dashed var(--accent-line);
  border-radius: 8px;
  background: rgba(241, 250, 247, 0.72);
}

.contact-import-drop span {
  font-weight: 900;
  color: var(--ink);
}

.contact-import-drop em,
.contact-import-status {
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.contacts-import-card textarea[name="import_rows"] {
  min-height: 116px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.contact-identity {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.contact-avatar {
  display: inline-grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 900;
}

.template-hero {
  align-items: flex-start;
}

.template-summary-grid,
.template-layout,
.template-board {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

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

.template-summary-grid article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, white, #f8fbfa);
  box-shadow: 0 12px 34px rgba(23, 33, 31, 0.08);
}

.template-summary-grid span,
.template-meta-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.template-summary-grid strong {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1;
}

.template-summary-grid em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.template-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 22px;
}

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

.template-create-card,
.template-guide-card,
.template-card {
  box-shadow: 0 16px 46px rgba(23, 33, 31, 0.08);
}

.template-create-card {
  display: grid;
  gap: 16px;
}

.template-create-launch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.template-create-tags {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin: 0;
}

.template-create-tags > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.template-create-tags .template-tag-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
}

.template-create-tags .template-tag-grid code {
  white-space: nowrap;
}

.template-create-launch .button {
  flex: 0 0 auto;
}

.template-create-launch-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.template-create-launch-actions .button span:not(.button-icon) {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.template-create-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.template-create-copy h2 {
  margin: 0;
}

.template-editor-card {
  gap: 18px;
}

.template-editor-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.template-create-card h2,
.template-guide-card h2 {
  margin-bottom: 0;
}

.template-create-actions {
  position: sticky;
  bottom: -18px;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  padding: 12px 0 0;
  gap: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), white 28%);
}

.template-create-actions .button {
  min-width: 168px;
  justify-content: center;
}

.template-guide-card,
.template-card,
.template-edit-form,
.template-card-grid,
.template-list,
.template-tag-grid,
.template-meta-grid {
  display: grid;
  gap: 12px;
}

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

.template-guide-card {
  align-self: start;
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  width: min(1520px, calc(100% - 72px));
  margin: 0 auto 22px;
  padding: 18px 20px;
  min-width: 0;
  overflow: hidden;
}

.template-guide-card .template-tag-grid {
  align-content: center;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  justify-content: stretch;
  gap: 8px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.template-guide-copy {
  display: grid;
  gap: 8px;
  align-content: start;
}

.template-tag-grid code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: #ecfdf9;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
  white-space: normal;
}

.template-modal-tags {
  display: grid;
  grid-template-columns: minmax(160px, 0.22fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.template-modal-tags > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.template-modal-tags .template-tag-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.template-help-modal-panel {
  width: min(1080px, calc(100% - 28px));
  max-height: min(860px, calc(100dvh - 24px));
}

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

.template-help-price-confirm {
  align-items: flex-start;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  background: #ecfdf9;
}

.template-board {
  margin-bottom: 28px;
}

.template-editor-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
  gap: 16px;
  align-items: stretch;
}

.template-builder-panel,
.template-html-panel,
.template-preview-panel {
  min-width: 0;
}

.template-builder-panel {
  display: grid;
  grid-template-columns: minmax(140px, 0.22fr) minmax(280px, 1fr) minmax(240px, 0.36fr);
  gap: 14px;
  align-items: start;
}

.template-builder-label {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.template-builder-toolbar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.template-builder-toolbar .button {
  width: 100%;
  justify-content: flex-start;
}

.template-builder-canvas,
.template-inspector-panel {
  min-width: 0;
}

.template-inspector-panel {
  position: sticky;
  top: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.template-inspector-panel[hidden] {
  display: none;
}

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

.template-inspector-grid label {
  display: grid;
  gap: 5px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.template-inspector-grid input,
.template-inspector-grid select {
  min-height: 34px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.template-drop-zone {
  display: grid;
  gap: 12px;
  min-height: 360px;
  padding: 16px;
  border: 1px dashed var(--accent-line);
  border-radius: 8px;
  background: #f8fbfa;
}

.template-block {
  position: relative;
  min-height: 52px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  outline: none;
}

.template-block-content {
  min-height: 32px;
  outline: none;
}

.template-block:focus-within {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.template-block-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.template-block-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.template-block-configure,
.template-block-remove {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  background: #fee2e2;
  color: #7f1d1d;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.template-block-configure {
  border-color: rgba(15, 118, 110, 0.22);
  background: #ecfdf9;
  color: var(--accent);
  font-size: 11px;
}

.template-block-configure:hover,
.template-block-configure:focus-visible {
  background: var(--accent);
  color: white;
}

.template-block-remove:hover,
.template-block-remove:focus-visible {
  background: #ef4444;
  color: white;
}

.template-html-panel textarea {
  min-height: 410px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.template-preview-panel {
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.template-preview-head h3 {
  margin: 0;
}

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

.template-table-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 16px 42px rgba(23, 33, 31, 0.07);
}

.template-data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.template-data-table th,
.template-data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.template-data-table th {
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.template-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.template-data-table th:nth-child(4),
.template-data-table td:nth-child(4),
.template-data-table th:nth-child(5),
.template-data-table td:nth-child(5) {
  text-align: center;
}

.template-table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.template-table-actions form {
  margin: 0;
}

.template-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  gap: 0;
  line-height: 1;
}

.template-icon-button .button-icon,
.template-icon-button .button-icon svg {
  width: 15px;
  height: 15px;
  margin: 0;
}

.workspace-form-modal-panel.template-modal-panel {
  width: min(1720px, calc(100vw - 48px));
  max-width: none;
  height: min(980px, calc(100dvh - 40px));
  max-height: calc(100dvh - 40px);
  padding: 18px;
  border-radius: 8px;
  overflow-x: hidden;
  overflow-y: auto;
}

.template-modal-panel .template-editor-workspace {
  grid-template-columns: 1fr;
}

.template-modal-panel .template-builder-panel {
  grid-template-columns: 1fr;
  gap: 12px;
}

.template-modal-panel .template-builder-toolbar {
  position: static;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.template-modal-panel .template-builder-toolbar .template-builder-label {
  grid-column: 1 / -1;
}

.template-modal-panel .template-inspector-panel {
  position: static;
}

.template-modal-panel .template-inspector-grid {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.template-modal-panel .template-drop-zone {
  min-height: 360px;
}

.template-modal-panel .template-preview-panel {
  grid-template-rows: auto minmax(320px, 1fr);
}

.template-modal-panel .template-preview-panel iframe {
  min-height: 320px;
}

.template-modal-panel .template-html-panel textarea {
  min-height: 620px;
}

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

.template-list {
  grid-template-columns: 1fr;
}

.template-card {
  padding: 18px;
  border-radius: 8px;
}

.template-list .template-card {
  gap: 16px;
}

.template-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.template-card-head h3 {
  margin: 0 0 6px;
}

.template-card-head p {
  overflow-wrap: anywhere;
}

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

.template-list .template-edit-form > .compact-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.template-list .provider-actions {
  justify-content: flex-end;
}

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

.template-preview-text {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  color: #31413d;
  line-height: 1.55;
}

.template-tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template-tag-line span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: #31413d;
  font-size: 12px;
  font-weight: 800;
}

.template-tag-line .template-tag-warning {
  border-color: #fca5a5;
  background: #fee2e2;
  color: var(--danger);
}

.template-edit-form textarea,
.template-create-card textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.template-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.template-action-row form {
  margin: 0;
}

.template-action-row .button-small {
  min-width: 116px;
  justify-content: center;
}

.automation-hero {
  align-items: flex-start;
}

.automation-summary-grid,
.automation-layout,
.automation-board {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

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

.automation-summary-grid article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, white, #f8fbfa);
  box-shadow: 0 12px 34px rgba(23, 33, 31, 0.08);
}

.automation-summary-grid span,
.automation-metric-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.automation-summary-grid strong {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1;
}

.automation-summary-grid em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.automation-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 22px;
}

.automation-create-launch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 170px;
  padding: 22px;
  box-shadow: 0 16px 46px rgba(23, 33, 31, 0.08);
}

.automation-create-launch h2 {
  margin-bottom: 6px;
}

.automation-create-launch .button {
  min-width: 168px;
  justify-content: center;
}

.automation-create-card,
.automation-map-card,
.automation-card {
  box-shadow: 0 16px 46px rgba(23, 33, 31, 0.08);
}

.automation-modal-panel {
  width: min(1180px, calc(100vw - 48px));
  height: auto;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}

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

.automation-modal-steps span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.automation-modal-steps b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  line-height: 1;
}

.automation-workflow-sections {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  grid-template-areas:
    "schedule delivery"
    "message delivery";
  gap: 16px;
  align-items: stretch;
}

.automation-form-section {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(245, 248, 246, 0.72);
}

.automation-form-section:nth-child(1) {
  grid-area: schedule;
}

.automation-form-section:nth-child(2) {
  grid-area: message;
}

.automation-form-section:nth-child(3) {
  grid-area: delivery;
  background:
    linear-gradient(180deg, rgba(236, 253, 249, 0.78), rgba(245, 248, 246, 0.86)),
    var(--soft);
}

.automation-form-section-head {
  display: grid;
  gap: 2px;
}

.automation-form-section-head .eyebrow,
.automation-form-section-head h3 {
  margin: 0;
}

.automation-form-section-head h3 {
  font-size: 15px;
}

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

.automation-form-section:nth-child(3) .compact-form-grid {
  grid-template-columns: 1fr;
}

.automation-create-card {
  display: grid;
  align-content: start;
  gap: 18px;
}

.automation-create-card h2,
.automation-map-card h2 {
  margin-bottom: 0;
}

.automation-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.automation-create-actions .button {
  min-width: 170px;
  justify-content: center;
}

@media (max-width: 980px) {
  .automation-modal-panel {
    width: min(760px, calc(100vw - 28px));
  }

  .automation-workflow-sections {
    grid-template-columns: 1fr;
    grid-template-areas:
      "schedule"
      "message"
      "delivery";
  }
}

@media (max-width: 620px) {
  .automation-modal-panel {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    padding: 16px;
  }

  .automation-form-section .compact-form-grid,
  .automation-form-section:nth-child(3) .compact-form-grid {
    grid-template-columns: 1fr;
  }

  .automation-create-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .automation-create-actions .button {
    width: 100%;
  }

  .automation-modal-steps {
    grid-template-columns: 1fr;
  }
}

.automation-map-card,
.automation-card,
.automation-edit-form,
.automation-type-grid,
.automation-card-grid,
.automation-list,
.automation-action-picker,
.automation-metric-grid {
  display: grid;
  gap: 12px;
}

.automation-action-picker {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.automation-type-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.automation-type-grid article,
.automation-metric-grid div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.automation-type-grid span {
  color: var(--muted);
  line-height: 1.45;
}

.automation-board {
  margin-bottom: 28px;
}

.automation-table-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 16px 42px rgba(23, 33, 31, 0.07);
}

.automation-data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.automation-name-col { width: 13%; }
.automation-type-col { width: 11%; }
.automation-schedule-col { width: 12%; }
.automation-status-col { width: 7%; }
.automation-delivery-col { width: 12%; }
.automation-steps-col { width: 14%; }
.automation-number-col { width: 5%; }
.automation-actions-col { width: 21%; }

.automation-data-table th,
.automation-data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.automation-data-table th {
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.automation-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.automation-data-table td strong,
.automation-data-table td span:not(.button-icon) {
  display: block;
}

.automation-data-table td .automation-icon-button .button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.automation-data-table td span:not(.status-pill):not(.button-icon) {
  color: var(--muted);
}

.automation-number-cell {
  text-align: center;
}

.automation-table-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-start;
  white-space: nowrap;
}

.automation-table-actions form {
  margin: 0;
}

.automation-icon-button {
  display: inline-flex;
  align-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  gap: 0;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.automation-icon-button .button-icon {
  width: 16px;
  height: 16px;
}

.automation-icon-button .button-icon svg {
  width: 16px;
  height: 16px;
}

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

.automation-list {
  grid-template-columns: 1fr;
}

.automation-card {
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, white, #f8fbfa);
}

.automation-list .automation-card {
  gap: 16px;
}

.automation-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.automation-card-head h3 {
  margin: 0 0 6px;
}

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

.automation-list .automation-edit-form > .compact-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.automation-list .provider-actions {
  justify-content: flex-end;
}

.automation-metric-grid strong {
  font-size: 22px;
  line-height: 1.1;
}

.automation-step-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.automation-step-line span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: #31413d;
  font-size: 12px;
  font-weight: 800;
}

.automation-step-line-compact {
  gap: 6px;
}

.automation-step-line-compact span {
  display: inline-flex;
  padding: 5px 8px;
  font-size: 11px;
  line-height: 1.2;
}

.automation-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.automation-action-row form {
  margin: 0;
}

.automation-action-row .button-small {
  min-width: 116px;
  justify-content: center;
}

.analytics-hero {
  align-items: flex-end;
}

.analytics-summary-grid,
.analytics-layout,
.analytics-board {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

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

.analytics-summary-grid article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, white, #f8fbfa);
  box-shadow: 0 12px 34px rgba(23, 33, 31, 0.08);
}

.analytics-summary-grid span,
.analytics-metric-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.analytics-summary-grid strong {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1;
}

.analytics-summary-grid em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.analytics-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.32fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 22px;
}

.analytics-filter-card,
.analytics-breakdown-card,
.analytics-card {
  box-shadow: 0 16px 46px rgba(23, 33, 31, 0.08);
}

.analytics-filter-card,
.analytics-breakdown-grid,
.analytics-breakdown-card,
.analytics-card-grid,
.analytics-card,
.analytics-metric-form {
  display: grid;
  gap: 12px;
}

.analytics-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.analytics-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analytics-control-actions .button {
  flex: 1 1 140px;
  justify-content: center;
}

.analytics-breakdown-grid,
.analytics-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analytics-breakdown-card {
  padding: 18px;
}

.analytics-bar-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.38fr) minmax(0, 1fr) minmax(58px, auto);
  gap: 10px;
  align-items: center;
}

.analytics-bar-row span {
  color: #31413d;
  font-weight: 800;
}

.analytics-bar-row div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7efeb;
}

.analytics-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.analytics-bar-row strong {
  text-align: right;
}

.analytics-board {
  margin-bottom: 28px;
}

.analytics-card {
  padding: 18px;
}

.analytics-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.analytics-card-head h3 {
  margin: 0 0 6px;
}

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

.analytics-metric-grid div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.analytics-metric-grid strong {
  font-size: 22px;
  line-height: 1.1;
}

.analytics-metric-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.analytics-metric-editor summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.analytics-metric-editor[open] summary {
  border-bottom: 1px solid var(--line);
}

.analytics-metric-editor .analytics-metric-form {
  padding: 14px;
}

@media (max-width: 720px) {
  .analytics-filter-grid {
    grid-template-columns: 1fr;
  }
}

.analytics-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.analytics-action-row form {
  margin: 0;
}

.workspace-users-panel {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto 24px;
}

.workspace-add-user-form {
  align-content: start;
}

.workspace-hero {
  padding-bottom: 14px;
}

.workspace-command-grid,
.workspace-admin-grid,
.workspace-users-panel {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

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

.workspace-command-card {
  display: grid;
  gap: 8px;
  min-height: 142px;
  padding: 20px;
  border: 1px solid rgba(217, 226, 222, 0.9);
  border-radius: 8px;
  background: linear-gradient(180deg, white, #f8fbfa);
  box-shadow: 0 12px 34px rgba(23, 33, 31, 0.08);
}

.workspace-command-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.workspace-command-card strong {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1;
}

.workspace-command-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.45;
}

.workspace-admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.workspace-settings-panel,
.workspace-users-panel {
  border-color: rgba(217, 226, 222, 0.92);
  box-shadow: 0 16px 46px rgba(23, 33, 31, 0.08);
}

.toggle-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 800;
}

.toggle-row input {
  grid-row: 1 / span 2;
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.toggle-row em {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.two-factor-demo-code,
.two-factor-secret-note {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.two-factor-demo-code span,
.two-factor-secret-note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.two-factor-demo-code strong {
  font-size: 30px;
  letter-spacing: 0;
}

.two-factor-demo-code code,
.two-factor-secret-note code {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #31413d;
  font-size: 13px;
  font-weight: 800;
}

.workspace-user-table {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.workspace-user-table-head,
.workspace-user-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(100px, 0.45fr) minmax(92px, 0.38fr) minmax(130px, 0.5fr) minmax(150px, 0.5fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.workspace-user-table-head {
  border-bottom: 1px solid var(--line);
  background: #f8fbfa;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.workspace-user-row {
  border-bottom: 1px solid var(--line);
}

.workspace-user-row:last-child {
  border-bottom: 0;
}

.workspace-user-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.workspace-user-identity strong,
.workspace-user-identity span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-user-identity strong {
  font-size: 13px;
  line-height: 1.1;
}

.workspace-user-identity span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
}

.workspace-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.workspace-row-actions form {
  margin: 0;
}

.workspace-row-actions .button-secondary {
  border-color: var(--line);
  color: var(--accent);
}

.workspace-row-meta {
  min-width: 0;
  font-size: 12px;
  line-height: 1.15;
}

.workspace-row-meta .muted {
  white-space: nowrap;
}

.workspace-row-meta .status-pill {
  min-height: 24px;
  padding: 5px 8px;
  font-size: 10px;
}

.workspace-user-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.workspace-user-card-head h3 {
  margin: 0 0 4px;
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 18px;
  font-weight: 900;
}

.workspace-user-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.workspace-form-modal[hidden] {
  display: none;
}

.workspace-form-modal {
  position: fixed;
  inset: 0;
  z-index: 2200;
}

.workspace-form-modal-open {
  overflow: hidden;
}

.workspace-form-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 33, 31, 0.48);
}

.workspace-form-modal-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(680px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  outline: none;
  overflow-y: auto;
  transform: translate(-50%, -50%);
}

.email-connection-modal-panel {
  width: min(1480px, calc(100% - 24px));
  max-height: min(900px, calc(100vh - 16px));
}

.email-connection-modal-panel .email-connection-sections {
  gap: 18px;
}

.email-connection-modal-panel .compact-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workspace-form-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.workspace-form-modal-head h2 {
  margin: 0;
}

.workspace-form-modal-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.button-danger {
  border-color: #fca5a5;
  background: #fee2e2;
  color: var(--danger);
}

.button-danger:hover {
  background: var(--danger);
  color: white;
}

.tag-line { flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag-line span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #31413d;
  background: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.check { display: flex; grid-template-columns: none; flex-direction: row; align-items: center; }
.check input { width: auto; min-height: auto; }

.automation-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; }
.automation-grid span { display: block; margin-top: 8px; color: var(--muted); }

.flash-stack {
  position: fixed;
  top: 88px;
  right: 18px;
  z-index: 1400;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 36px));
  pointer-events: none;
}

.flash {
  position: relative;
  display: grid;
  gap: 3px;
  min-height: 52px;
  padding: 14px 16px 14px 18px;
  border-radius: 8px;
  font-weight: 800;
  line-height: 1.45;
  pointer-events: auto;
  box-shadow: 0 18px 46px rgba(23, 33, 31, 0.18);
  animation: flashSlideIn 0.28s ease both;
}

.flash::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 4px;
  border-radius: 999px;
  background: currentColor;
}

.flash.flash-exit {
  animation: flashSlideOut 0.28s ease both;
}

.flash-success { color: #14532d; background: #dcfce7; border: 1px solid #86efac; }
.flash-error { color: #7f1d1d; background: #fee2e2; border: 1px solid #fca5a5; }

@media (max-width: 1180px) {
  .billing-plan-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .contacts-group-create {
    grid-column: 1 / -1;
  }

  .email-connection-modal-panel .compact-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 920px) {
  .hero, .home-hero, .login-shell, .two-column, .split-section, .split-section.reverse, .testimonial-section { grid-template-columns: 1fr; }
  .feature-grid, .home-feature-grid, .module-grid, .stats-grid, .report-grid, .automation-grid, .pricing-grid, .pricing-feature-strip, .billing-summary-grid, .billing-plan-board, .security-summary-grid, .security-safeguard-list, .security-posture-grid, .integration-summary-grid, .integration-event-grid, .advanced-summary-grid, .advanced-region-grid, .advanced-run-grid, .feature-catalog-summary, .deliverability-summary-grid, .deliverability-scan-grid, .deliverability-provider-grid, .deliverability-domain-grid, .domain-summary-grid, .domain-card-grid, .domain-status-editor, .domain-action-grid, .sender-summary-grid, .sender-card-grid, .campaign-summary-grid, .campaign-card-grid, .contacts-summary-grid, .contacts-list-grid, .contacts-card-grid, .template-summary-grid, .template-card-grid, .template-tag-grid, .automation-summary-grid, .automation-card-grid, .automation-type-grid, .automation-action-picker, .automation-metric-grid, .analytics-summary-grid, .analytics-breakdown-grid, .analytics-card-grid, .analytics-metric-grid, .launch-band, .use-case-grid, .ops-grid, .compliance-grid, .faq-grid, .module-launcher, .dashboard-kpis, .dashboard-usage, .infra-stats, .provider-grid, .workspace-command-grid, .workspace-user-grid, .guide-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .dashboard-grid-secondary, .infra-layout, .deliverability-layout, .domain-layout, .sender-layout, .campaign-layout, .contacts-layout, .template-layout, .automation-layout, .analytics-layout, .workspace-admin-grid, .billing-detail-grid, .security-grid, .integration-layout, .advanced-layout, .feature-catalog-layout, .guide-layout, .page-guide { grid-template-columns: 1fr; }
  .provider-list .provider-edit-form > .compact-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campaign-list .campaign-edit-form > .compact-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-list .template-edit-form > .compact-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-editor-layout,
  .template-editor-workspace { grid-template-columns: 1fr; }
  .template-create-launch,
  .template-create-tags {
    align-items: flex-start;
    flex-direction: column;
  }

  .template-create-tags .template-tag-grid {
    flex-wrap: wrap;
  }
  .template-guide-card {
    grid-template-columns: 1fr;
    width: min(1320px, calc(100% - 40px));
  }
  .template-guide-card .template-tag-grid { justify-content: start; }
  .template-builder-panel { grid-template-columns: 1fr; }
  .template-builder-toolbar,
  .template-inspector-panel { position: static; }
  .template-builder-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-form-modal-panel.template-modal-panel {
    width: calc(100vw - 20px);
    height: calc(100dvh - 20px);
  }
  .template-modal-panel .template-editor-workspace,
  .template-modal-panel .template-builder-panel {
    grid-template-columns: 1fr;
  }
  .template-modal-panel .template-inspector-grid {
    grid-template-columns: 1fr;
  }
  .template-editor-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .automation-list .automation-edit-form > .compact-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contacts-group-row > form,
  .contact-row .contact-edit-form > .compact-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contacts-action-grid { grid-template-columns: 1fr; }
  .contacts-action-toolbar,
  .contacts-section-actions { justify-content: flex-start; flex-wrap: wrap; }
  .contacts-group-create { grid-column: auto; }
  .deliverability-provider-grid { grid-template-columns: 1fr; }
  .guide-sidebar { position: static; }
  .integration-catalog-panel { position: static; }
  .feature-catalog-sidebar { position: static; }
  .dashboard-head { align-items: flex-start; }
  .dashboard-actions { justify-content: flex-start; }
  .dashboard-overview-panel .overview-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo-strip, .integration-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-hero { min-height: auto; }
  .hero-dashboard { max-width: 720px; }
  .topbar-auth { align-items: center; flex-direction: row; }
  .nav-shell { width: auto; margin-left: auto; }
  .account-card {
    max-width: min(540px, 58vw);
  }
  .guest-nav { justify-content: flex-end; }
  .final-cta { align-items: flex-start; flex-direction: column; }
  .workspace-user-table-head { display: none; }
  .workspace-user-row { grid-template-columns: 1fr; gap: 12px; }
  .feature-card-list { grid-template-columns: 1fr; }
  .security-audit-head { display: none; }
  .security-audit-row { grid-template-columns: 1fr; gap: 8px; }
  .workspace-row-meta,
  .workspace-row-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .workspace-row-meta::before,
  .workspace-row-actions::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
  }
}

@media (max-width: 560px) {
  .hero, .home-hero { min-height: auto; }
  .feature-grid, .home-feature-grid, .module-grid, .stats-grid, .report-grid, .automation-grid, .pricing-grid, .pricing-feature-strip, .billing-summary-grid, .billing-plan-board, .security-summary-grid, .security-safeguard-list, .security-posture-grid, .integration-summary-grid, .integration-meta-grid, .integration-event-grid, .advanced-summary-grid, .advanced-region-grid, .advanced-run-grid, .feature-catalog-summary, .deliverability-summary-grid, .deliverability-scan-grid, .deliverability-metrics, .deliverability-provider-grid, .deliverability-domain-grid, .deliverability-warmup-plan, .domain-summary-grid, .domain-card-grid, .domain-status-editor, .domain-toggle-grid, .domain-action-grid, .sender-summary-grid, .sender-card-grid, .sender-meta-grid, .campaign-summary-grid, .campaign-card-grid, .campaign-check-grid, .campaign-metric-grid, .contacts-summary-grid, .contacts-list-grid, .contacts-card-grid, .contacts-action-row, .template-summary-grid, .template-card-grid, .template-tag-grid, .template-meta-grid, .automation-summary-grid, .automation-card-grid, .automation-type-grid, .automation-action-picker, .automation-metric-grid, .analytics-summary-grid, .analytics-breakdown-grid, .analytics-card-grid, .analytics-metric-grid, .launch-band, .hero-proof, .dashboard-metrics, .dashboard-flow, .logo-strip, .credential-user-grid, .use-case-grid, .ops-grid, .mini-grid, .integration-grid, .compliance-grid, .faq-grid, .module-launcher, .dashboard-kpis, .dashboard-usage, .quick-action-grid, .mini-dashboard-columns, .infra-stats, .provider-grid, .provider-capacity, .provider-health-card, .workspace-command-grid, .workspace-user-grid, .guide-detail-grid { grid-template-columns: 1fr; }
  .home-hero h1 { font-size: 48px; }
  .home-section, .dark-section, .compliance-section, .faq-section { padding-block: 48px; }
  .hero-dashboard, .workflow-panel, .analytics-panel { padding: 18px; }
  .dashboard-metrics, .dashboard-flow, .workflow-row, .analytics-header { align-items: stretch; flex-direction: column; }
  .dashboard-flow span { width: 100%; }
  .workflow-row strong,
  .analytics-header strong { align-self: flex-start; }
  .step-list div { align-items: flex-start; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .billing-current-plan { width: 100%; }
  .security-score-card { width: 100%; max-width: 220px; }
  .security-audit-filter { grid-template-columns: 1fr; }
  .page-guide { align-items: flex-start; flex-direction: column; }
  .billing-plan-board .section-head { align-items: flex-start; flex-direction: column; }
  .billing-plan-board .section-head p:last-child { max-width: none; text-align: left; }
  .panel-title-row { flex-direction: column; }
  .dashboard-bars div { grid-template-columns: 1fr; gap: 7px; }
  .dashboard-bars strong { text-align: left; }
  .dashboard-overview-panel .overview-list { grid-template-columns: 1fr; }
  .compact-form-grid { grid-template-columns: 1fr; }
  .provider-list .provider-edit-form > .compact-form-grid { grid-template-columns: 1fr; }
  .campaign-list .campaign-edit-form > .compact-form-grid { grid-template-columns: 1fr; }
  .template-list .template-edit-form > .compact-form-grid { grid-template-columns: 1fr; }
  .template-editor-fields { grid-template-columns: 1fr; }
  .automation-list .automation-edit-form > .compact-form-grid { grid-template-columns: 1fr; }
  .contacts-group-row > form,
  .contact-row .contact-edit-form > .compact-form-grid { grid-template-columns: 1fr; }
  .contact-create-grid,
  .contact-edit-grid,
  .contact-import-options { grid-template-columns: 1fr; }
  .contacts-list-view { grid-template-columns: 1fr; }
  .contacts-action-toolbar,
  .contacts-section-actions,
  .contacts-action-toolbar .button { width: 100%; }
  .contacts-section-actions .button { width: 100%; }
  .provider-setup-actions .button,
  .campaign-create-actions .button,
  .campaign-action-row .button-small,
  .template-create-actions .button,
  .template-action-row .button-small,
  .automation-create-actions .button,
  .automation-action-row .button-small,
  .contacts-form-actions .button,
  .provider-list .provider-action-row .button-small { width: 100%; }
  .deliverability-policy-actions .button { width: 100%; }
  .domain-generate-actions .button { width: 100%; }
  .sender-form-actions .button { width: 100%; }
  .provider-card-head,
  .workspace-user-card-head,
  .workspace-user-actions,
  .workspace-row-actions,
  .provider-actions,
  .provider-action-row,
  .provider-delete-form { align-items: flex-start; flex-direction: column; }
  .account-actions { justify-content: space-between; }
  .account-card {
    grid-template-columns: 32px minmax(0, 1fr);
    max-width: min(100%, 54vw);
  }

  .account-meta-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .guide-icon-button { width: 38px; justify-content: center; padding: 0; }
  .guide-icon-button span:last-child { display: none; }
  .workspace-pill { max-width: none; }
  .row-item { align-items: flex-start; flex-direction: column; }
  .row-item em { text-align: left; }
  .guide-modal-panel { inset: 10px; }
  .guide-modal-head { align-items: flex-start; flex-wrap: wrap; }
  .guide-full-link { margin-left: 0; }
  .guide-modal-close { margin-left: auto; }
  .guide-modal-body { padding: 12px; }
  .billing-payment-actions { flex-direction: column; }
  .billing-payment-actions .button { width: 100%; }
  .integration-card-head,
  .integration-actions,
  .advanced-run-head,
  .integration-form-head,
  .feature-group-head,
  .deliverability-provider-card .provider-action-row,
  .domain-card-head,
  .sender-card-head,
  .sender-action-row,
  .campaign-card-head,
  .campaign-action-row,
  .contacts-card-head,
  .template-card-head,
  .template-action-row,
  .automation-card-head,
  .automation-action-row,
  .analytics-card-head,
  .analytics-action-row { align-items: flex-start; flex-direction: column; }
  .integration-actions .button,
  .integration-actions form { width: 100%; }
  .feature-filter-actions { grid-template-columns: 1fr; }
  .feature-card-title,
  .feature-card-actions { align-items: flex-start; flex-direction: column; }
  .feature-card-badges { justify-content: flex-start; }
  .feature-card-fields { grid-template-columns: 1fr; }
  .feature-card-actions .button { width: 100%; }
}

/* Application polish layer */
:root {
  --ink: #17211f;
  --muted: #65736f;
  --line: #dbe5e1;
  --surface: #ffffff;
  --soft: #f6f9f8;
  --canvas: #eef4f2;
  --accent-soft: color-mix(in srgb, var(--accent) 11%, white);
  --accent-line: color-mix(in srgb, var(--accent) 24%, var(--line));
  --focus-ring: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
  --shadow: 0 18px 42px rgba(23, 33, 31, 0.08);
  --shadow-soft: 0 10px 24px rgba(23, 33, 31, 0.06);
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0) 280px),
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 14%, transparent), transparent 320px),
    var(--canvas);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main {
  padding-bottom: 52px;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

:where(input, select, textarea) {
  min-width: 0;
  border-color: var(--line);
  background: #fff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

:where(input, select, textarea):hover {
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
}

:where(input, select, textarea):focus {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

:where(textarea) {
  resize: vertical;
}

.topbar {
  box-shadow: 0 8px 28px rgba(23, 33, 31, 0.06);
}

.brand {
  min-width: 0;
}

.brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark,
.user-avatar {
  box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.12), 0 8px 18px color-mix(in srgb, var(--accent) 22%, transparent);
}

.workspace-pill {
  box-shadow: var(--shadow-soft);
}

.menu-toggle,
.button,
.link-button,
.menu-close,
.billing-payment-close,
.integration-form-close,
.workspace-form-modal-close,
.guide-modal-close,
.page-guide-modal-close {
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.button {
  box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 18%, transparent);
}

.button-secondary {
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

.button:hover,
.link-button:hover,
.menu-toggle:hover,
.menu-close:hover,
.billing-payment-close:hover,
.integration-form-close:hover,
.workspace-form-modal-close:hover,
.guide-modal-close:hover,
.page-guide-modal-close:hover {
  transform: translateY(-1px);
}

.button:hover {
  border-color: color-mix(in srgb, var(--accent) 76%, #000);
  background: color-mix(in srgb, var(--accent) 88%, #0b1f1c);
}

.button-secondary:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.button-danger:hover {
  border-color: var(--danger);
  background: var(--danger);
}

.button:disabled,
.link-button:disabled,
button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.page-head {
  gap: 18px;
  margin-top: 30px;
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid rgba(217, 226, 222, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(246, 249, 248, 0.86)),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.page-head > div:first-child {
  min-width: 0;
}

.page-head h1 {
  overflow-wrap: anywhere;
}

.section-help {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.62;
}

.panel,
.auth-card,
.record-card,
.pricing-card,
.billing-plan-card,
.security-card,
.integration-card,
.feature-group-panel,
.advanced-run-card,
.provider-card,
.domain-card,
.sender-card,
.campaign-card,
.contacts-list-card,
.contact-card,
.template-card,
.automation-card,
.analytics-card,
.workspace-settings-panel,
.workspace-users-panel {
  border-color: rgba(217, 226, 222, 0.88);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.panel,
.auth-card,
.record-card,
.pricing-card,
.billing-plan-card,
.integration-card,
.feature-catalog-card,
.advanced-run-card,
.provider-card,
.domain-card,
.sender-card,
.campaign-card,
.contacts-list-card,
.contact-card,
.template-card,
.automation-card,
.analytics-card,
.module-launcher a,
.quick-action-grid a,
.usage-card,
.dashboard-kpi {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.pricing-card:hover,
.billing-plan-card:hover,
.integration-card:hover,
.feature-catalog-card:hover,
.advanced-run-card:hover,
.provider-card:hover,
.domain-card:hover,
.sender-card:hover,
.campaign-card:hover,
.contacts-list-card:hover,
.contact-card:hover,
.template-card:hover,
.automation-card:hover,
.analytics-card:hover,
.module-launcher a:hover,
.quick-action-grid a:hover,
.usage-card:hover,
.dashboard-kpi:hover {
  transform: translateY(-2px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow);
}

.section-head,
.panel-title-row,
.integration-card-head,
.feature-group-head,
.provider-card-head,
.domain-card-head,
.sender-card-head,
.campaign-card-head,
.contacts-card-head,
.template-card-head,
.automation-card-head,
.analytics-card-head,
.workspace-form-modal-head,
.billing-payment-head {
  min-width: 0;
}

.panel-title-row,
.integration-card-head,
.feature-group-head,
.provider-card-head,
.domain-card-head,
.sender-card-head,
.campaign-card-head,
.contacts-card-head,
.template-card-head,
.automation-card-head,
.analytics-card-head {
  align-items: flex-start;
}

.dashboard-actions,
.hero-actions,
.integration-actions,
.feature-card-actions,
.provider-action-row,
.domain-action-grid,
.sender-action-row,
.campaign-action-row,
.contacts-action-row,
.template-action-row,
.automation-action-row,
.analytics-action-row,
.billing-payment-actions,
.workspace-row-actions {
  align-items: center;
  gap: 10px;
}

.integration-actions,
.feature-card-actions,
.provider-action-row,
.sender-action-row,
.campaign-action-row,
.contacts-action-row,
.template-action-row,
.automation-action-row,
.analytics-action-row {
  flex-wrap: wrap;
}

.integration-actions form,
.provider-action-row form,
.sender-action-row form,
.campaign-action-row form,
.contacts-action-row form,
.template-action-row form,
.automation-action-row form,
.analytics-action-row form,
.domain-action-grid form,
.workspace-row-actions form {
  margin: 0;
}

.button,
.link-button {
  white-space: nowrap;
}

.button-icon {
  margin-top: -1px;
}

.status-pill,
.feature-priority-pill,
.tag-line span,
.billing-plan-radio,
.workspace-pill {
  letter-spacing: 0;
}

.status-pill,
.feature-priority-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  line-height: 1;
}

.form-grid,
.compact-form-grid,
.feature-card-fields,
.integration-meta-grid,
.sender-meta-grid,
.campaign-metric-grid,
.template-meta-grid,
.automation-metric-grid,
.analytics-metric-grid,
.domain-status-editor,
.domain-toggle-grid,
.contacts-action-row {
  align-items: end;
}

label {
  min-width: 0;
}

label > input,
label > select,
label > textarea {
  width: 100%;
}

.campaign-modal-panel label > input,
.campaign-modal-panel label > select {
  min-height: 38px;
  padding-block: 8px;
}

.check {
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
}

.check input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.row-item {
  min-width: 0;
}

.row-item span,
.row-item em,
.mini-dashboard-columns span,
.overview-list span,
.health-list span {
  overflow-wrap: anywhere;
}

.overview-list div,
.health-list div,
.health-list a,
.billing-flow-list div,
.advanced-tool-list article,
.feature-catalog-card,
.mini-dashboard-columns div {
  border-color: rgba(217, 226, 222, 0.86);
}

.app-menu {
  box-shadow: -24px 0 80px rgba(23, 33, 31, 0.18);
}

.menu-group {
  border-color: rgba(217, 226, 222, 0.9);
}

.menu-primary-link:hover,
.submenu a:hover {
  transform: translateX(-2px);
}

.billing-payment-backdrop,
.integration-form-backdrop,
.workspace-form-modal-backdrop,
.guide-modal-backdrop,
.page-guide-modal-backdrop {
  backdrop-filter: blur(4px);
}

.billing-payment-panel,
.integration-form-panel,
.workspace-form-modal-panel,
.page-guide-modal-panel {
  animation: modalIn 0.18s ease both;
}

.guide-modal-panel {
  animation: guideModalIn 0.18s ease both;
}

.flash {
  box-shadow: var(--shadow-soft);
}

.dashboard-bars em,
.usage-card em,
.analytics-progress,
.billing-due-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.home-hero {
  position: relative;
  isolation: isolate;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 140px;
  background: linear-gradient(180deg, transparent, rgba(238, 244, 242, 0.94));
}

.home-hero .button-secondary {
  border-color: rgba(255, 255, 255, 0.72);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 10px)) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes contentRise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dashboardFloat {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes panelDrift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-8px);
  }
}

@keyframes barGrow {
  from {
    transform: scaleY(0.18);
    opacity: 0.5;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes heroOrbit {
  from {
    transform: translate3d(0, 0, 0) rotate(12deg);
  }
  to {
    transform: translate3d(-18px, 16px, 0) rotate(24deg);
  }
}

@keyframes salesCardFloat {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-8px);
  }
}

@keyframes salesPathMove {
  to {
    stroke-dashoffset: -120;
  }
}

@keyframes contactPlanStripIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flashSlideIn {
  from {
    opacity: 0;
    transform: translateX(calc(100% + 24px));
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes flashSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(calc(100% + 24px));
  }
}

@keyframes guideModalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.page-head,
.dashboard-kpis,
.dashboard-grid,
.dashboard-usage,
.billing-summary-grid,
.security-summary-grid,
.security-audit-panel,
.integration-summary-grid,
.advanced-summary-grid,
.feature-catalog-summary,
.deliverability-summary-grid,
.domain-summary-grid,
.sender-summary-grid,
.campaign-summary-grid,
.contacts-summary-grid,
.template-summary-grid,
.automation-summary-grid,
.analytics-summary-grid,
.guide-layout {
  animation: contentRise 0.28s ease both;
}

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

@media (max-width: 920px) {
  .page-head {
    padding: 20px;
  }

  .dashboard-actions,
  .hero-actions {
    width: 100%;
  }

  .login-shell,
  .contact-sales-shell {
    grid-template-columns: 1fr;
  }

  .login-visual-panel {
    min-height: auto;
  }

  .sales-visual-panel {
    min-height: 340px;
  }

  .contact-plan-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  main {
    padding-bottom: 36px;
  }

  .topbar {
    min-height: 64px;
    padding-inline: 14px;
  }

  .flash-stack {
    top: 76px;
    right: 12px;
    width: min(420px, calc(100vw - 24px));
  }

  .brand span:last-child {
    max-width: 150px;
  }

  .account-actions {
    min-width: 0;
  }

  .workspace-pill {
    max-width: 42vw;
  }

  .button,
  .link-button {
    min-width: 0;
    white-space: normal;
  }

  .dashboard-actions .button,
  .hero-actions .button,
  .page-head .button,
  .guest-nav .button {
    width: 100%;
  }

  .guest-nav {
    width: 100%;
    justify-content: stretch;
  }

  .home-hero {
    padding-top: 42px;
  }

  .page-head {
    width: min(1180px, calc(100% - 24px));
    margin-top: 18px;
    padding: 18px;
  }

  .panel,
  .auth-card {
    padding: 18px;
  }

  .login-shell,
  .contact-sales-shell {
    width: min(1180px, calc(100% - 24px));
    padding-block: 28px;
  }

  .login-visual-panel,
  .sales-visual-panel {
    min-height: auto;
  }

  .login-icon-panel {
    gap: 14px;
    padding: 18px;
  }

  .sales-svg-panel {
    gap: 14px;
    padding: 18px;
  }

  .sales-illustration {
    min-height: 230px;
  }

  .sales-proof-grid,
  .sales-launch-flow {
    grid-template-columns: 1fr;
  }

  .contact-sales-field-row {
    grid-template-columns: 1fr;
  }

  .contact-plan-list {
    grid-template-columns: 1fr;
  }

  .contact-plan-floating-button {
    top: auto;
    right: 12px;
    bottom: 18px;
    min-width: 112px;
    border-right: 1px solid rgba(15, 118, 110, 0.2);
    border-radius: 8px;
    transform: none;
  }

  .contact-plan-floating-button:hover,
  .contact-plan-floating-button:focus-visible {
    transform: translateY(-2px);
  }

  .contact-plan-drawer-panel {
    width: 100%;
    max-height: min(68vh, 520px);
    padding: 16px;
  }

  .contact-plan-item ul {
    grid-template-columns: 1fr;
  }

  .contact-sales-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .contact-sales-actions .button {
    width: 100%;
    min-width: 0;
  }

  .contact-sales-actions .form-footnote {
    text-align: left;
  }

  .login-icon-orbit {
    width: min(260px, 100%);
  }

  .login-shield-icon {
    width: 92px;
    height: 92px;
    border-radius: 22px;
  }

  .login-shield-icon svg {
    width: 54px;
    height: 54px;
  }

  .login-orbit-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .login-visual-card {
    padding: 14px;
  }

  .login-visual-card strong {
    font-size: 38px;
  }

  .login-visual-steps {
    grid-template-columns: 1fr;
  }

  .billing-payment-panel,
  .integration-form-panel,
  .workspace-form-modal-panel {
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
    padding: 18px;
  }

  .email-connection-modal-panel .compact-form-grid {
    grid-template-columns: 1fr;
  }

  .billing-payment-panel,
  .integration-form-panel,
  .workspace-form-modal-panel,
  .page-guide-modal-panel {
    animation-name: modalInMobile;
  }
}

@keyframes modalInMobile {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 8px)) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf7f4;
  --muted: #a8bbb5;
  --line: #263a35;
  --surface: #101d1a;
  --soft: #162622;
  --canvas: #081310;
  --accent-2: #60a5fa;
  --warn: #fbbf24;
  --danger: #f87171;
  --accent-soft: color-mix(in srgb, var(--accent) 24%, #101d1a);
  --accent-line: color-mix(in srgb, var(--accent) 42%, #263a35);
  --focus-ring: 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent);
  --shadow: 0 22px 52px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] body {
  background:
    linear-gradient(180deg, rgba(11, 27, 23, 0.92), rgba(11, 27, 23, 0) 300px),
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 22%, transparent), transparent 340px),
    var(--canvas);
  color: var(--ink);
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .app-menu,
html[data-theme="dark"] .app-menu form,
html[data-theme="dark"] .guide-modal-head,
html[data-theme="dark"] .billing-payment-panel,
html[data-theme="dark"] .integration-form-panel,
html[data-theme="dark"] .workspace-form-modal-panel,
html[data-theme="dark"] .page-guide-modal-panel,
html[data-theme="dark"] .guide-modal-panel {
  background: rgba(16, 29, 26, 0.96);
}

html[data-theme="dark"] .app-menu {
  background:
    linear-gradient(180deg, rgba(16, 29, 26, 0.98), rgba(11, 24, 21, 0.98)),
    var(--surface);
}

html[data-theme="dark"] .app-menu-head {
  border-color: var(--line);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.14), rgba(96, 165, 250, 0.1)),
    var(--surface);
}

html[data-theme="dark"] .app-menu-title span {
  color: var(--muted);
}

html[data-theme="dark"] .app-menu form {
  background: rgba(16, 29, 26, 0.94);
}

html[data-theme="dark"] .page-head,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .record-card,
html[data-theme="dark"] .pricing-card,
html[data-theme="dark"] .billing-plan-card,
html[data-theme="dark"] .security-card,
html[data-theme="dark"] .integration-card,
html[data-theme="dark"] .feature-group-panel,
html[data-theme="dark"] .advanced-run-card,
html[data-theme="dark"] .provider-card,
html[data-theme="dark"] .domain-card,
html[data-theme="dark"] .sender-card,
html[data-theme="dark"] .campaign-card,
html[data-theme="dark"] .contacts-list-card,
html[data-theme="dark"] .contact-card,
html[data-theme="dark"] .template-card,
html[data-theme="dark"] .automation-card,
html[data-theme="dark"] .analytics-card,
html[data-theme="dark"] .workspace-settings-panel,
html[data-theme="dark"] .workspace-users-panel,
html[data-theme="dark"] .module-launcher a,
html[data-theme="dark"] .quick-action-grid a,
html[data-theme="dark"] .usage-card,
html[data-theme="dark"] .dashboard-kpi,
html[data-theme="dark"] .hero-dashboard,
html[data-theme="dark"] .workflow-panel,
html[data-theme="dark"] .analytics-panel {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    var(--surface);
  color: var(--ink);
}

html[data-theme="dark"] .workspace-command-card,
html[data-theme="dark"] .workspace-user-table,
html[data-theme="dark"] .workspace-user-table-head,
html[data-theme="dark"] .workspace-user-row,
html[data-theme="dark"] .workspace-user-card-head,
html[data-theme="dark"] .toggle-row,
html[data-theme="dark"] .two-factor-demo-code,
html[data-theme="dark"] .two-factor-secret-note,
html[data-theme="dark"] .brand-color-setting,
html[data-theme="dark"] .color-picker-row,
html[data-theme="dark"] .color-swatch-row {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    var(--surface);
  color: var(--ink);
}

html[data-theme="dark"] .workspace-command-card {
  box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .workspace-command-card span,
html[data-theme="dark"] .workspace-command-card em,
html[data-theme="dark"] .workspace-user-identity span,
html[data-theme="dark"] .workspace-row-meta,
html[data-theme="dark"] .workspace-user-card-head p,
html[data-theme="dark"] .toggle-row em {
  color: var(--muted);
}

html[data-theme="dark"] .workspace-command-card strong,
html[data-theme="dark"] .workspace-user-identity strong,
html[data-theme="dark"] .workspace-user-card-head h3,
html[data-theme="dark"] .two-factor-demo-code strong {
  color: #f8fffd;
}

html[data-theme="dark"] .workspace-user-table {
  overflow: hidden;
}

html[data-theme="dark"] .workspace-user-table-head {
  background: #13211d;
}

html[data-theme="dark"] .workspace-user-row {
  border-top: 1px solid var(--line);
}

html[data-theme="dark"] .workspace-row-actions .button-secondary {
  background: #12211d;
  color: #7dd3c7;
}

html[data-theme="dark"] .workspace-row-actions .button-secondary:hover {
  background: var(--accent-soft);
  color: #f8fffd;
}

html[data-theme="dark"] .toggle-row {
  background: #0c1916;
}

html[data-theme="dark"] .user-avatar {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #f8fffd;
}

html[data-theme="dark"] .color-value {
  color: #f8fffd;
}

html[data-theme="dark"] .color-value i {
  border-color: var(--line);
}

html[data-theme="dark"] .color-swatch {
  border-color: #0b1815;
}

html[data-theme="dark"] .color-swatch-row .color-swatch-selected,
html[data-theme="dark"] .color-swatch-row .color-swatch:hover,
html[data-theme="dark"] .color-swatch-row .color-swatch:focus {
  box-shadow: 0 0 0 2px #7dd3c7;
}

html[data-theme="dark"] .color-picker {
  background: #0b1815;
  color: var(--ink);
}

html[data-theme="dark"] .brand-color-setting .field-help,
html[data-theme="dark"] .workspace-users-panel .field-help,
html[data-theme="dark"] .workspace-settings-panel .field-help {
  color: var(--muted);
}

html[data-theme="dark"] .workspace-utility-grid {
  align-items: stretch;
}

html[data-theme="dark"] :where(
  .stats-grid article,
  .billing-summary-grid article,
  .security-summary-grid article,
  .integration-summary-grid article,
  .advanced-summary-grid article,
  .feature-catalog-summary article,
  .deliverability-summary-grid article,
  .domain-summary-grid article,
  .sender-summary-grid article,
  .campaign-summary-grid article,
  .contacts-summary-grid article,
  .template-summary-grid article,
  .automation-summary-grid article,
  .analytics-summary-grid article,
  .campaign-metric-grid div,
  .automation-metric-grid div,
  .analytics-metric-grid div,
  .deliverability-metrics div,
  .dashboard-metrics div
) {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] :where(
  .stats-grid article span,
  .billing-summary-grid span,
  .security-summary-grid span,
  .integration-summary-grid span,
  .advanced-summary-grid span,
  .feature-catalog-summary span,
  .deliverability-summary-grid span,
  .domain-summary-grid span,
  .sender-summary-grid span,
  .campaign-summary-grid span,
  .contacts-summary-grid span,
  .template-summary-grid span,
  .automation-summary-grid span,
  .analytics-summary-grid span,
  .campaign-metric-grid span,
  .automation-metric-grid span,
  .analytics-metric-grid span,
  .deliverability-metrics span,
  .dashboard-metrics span
) {
  color: #9fd6cc;
}

html[data-theme="dark"] :where(
  .stats-grid article strong,
  .billing-summary-grid strong,
  .security-summary-grid strong,
  .integration-summary-grid strong,
  .advanced-summary-grid strong,
  .feature-catalog-summary strong,
  .deliverability-summary-grid strong,
  .domain-summary-grid strong,
  .sender-summary-grid strong,
  .campaign-summary-grid strong,
  .contacts-summary-grid strong,
  .template-summary-grid strong,
  .automation-summary-grid strong,
  .analytics-summary-grid strong,
  .campaign-metric-grid strong,
  .automation-metric-grid strong,
  .analytics-metric-grid strong,
  .deliverability-metrics strong,
  .dashboard-metrics strong
) {
  color: #f8fffd;
}

html[data-theme="dark"] :where(
  .stats-grid article em,
  .billing-summary-grid em,
  .security-summary-grid em,
  .integration-summary-grid em,
  .advanced-summary-grid em,
  .feature-catalog-summary em,
  .deliverability-summary-grid em,
  .domain-summary-grid em,
  .sender-summary-grid em,
  .campaign-summary-grid em,
  .contacts-summary-grid em,
  .template-summary-grid em,
  .automation-summary-grid em,
  .analytics-summary-grid em
) {
  color: var(--muted);
}

html[data-theme="dark"] .stats-grid article,
html[data-theme="dark"] .billing-summary-grid article,
html[data-theme="dark"] .security-summary-grid article,
html[data-theme="dark"] .integration-summary-grid article,
html[data-theme="dark"] .advanced-summary-grid article,
html[data-theme="dark"] .feature-catalog-summary article,
html[data-theme="dark"] .deliverability-summary-grid article,
html[data-theme="dark"] .domain-summary-grid article,
html[data-theme="dark"] .sender-summary-grid article,
html[data-theme="dark"] .campaign-summary-grid article,
html[data-theme="dark"] .contacts-summary-grid article,
html[data-theme="dark"] .template-summary-grid article,
html[data-theme="dark"] .automation-summary-grid article,
html[data-theme="dark"] .analytics-summary-grid article,
html[data-theme="dark"] .campaign-metric-grid div,
html[data-theme="dark"] .automation-metric-grid div,
html[data-theme="dark"] .analytics-metric-grid div,
html[data-theme="dark"] .deliverability-metrics div,
html[data-theme="dark"] .dashboard-metrics div {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    var(--surface);
  color: var(--ink);
}

html[data-theme="dark"] .stats-grid article span,
html[data-theme="dark"] .billing-summary-grid span,
html[data-theme="dark"] .security-summary-grid span,
html[data-theme="dark"] .integration-summary-grid span,
html[data-theme="dark"] .advanced-summary-grid span,
html[data-theme="dark"] .feature-catalog-summary span,
html[data-theme="dark"] .deliverability-summary-grid span,
html[data-theme="dark"] .domain-summary-grid span,
html[data-theme="dark"] .sender-summary-grid span,
html[data-theme="dark"] .campaign-summary-grid span,
html[data-theme="dark"] .contacts-summary-grid span,
html[data-theme="dark"] .template-summary-grid span,
html[data-theme="dark"] .automation-summary-grid span,
html[data-theme="dark"] .analytics-summary-grid span,
html[data-theme="dark"] .campaign-metric-grid span,
html[data-theme="dark"] .automation-metric-grid span,
html[data-theme="dark"] .analytics-metric-grid span,
html[data-theme="dark"] .deliverability-metrics span,
html[data-theme="dark"] .dashboard-metrics span {
  color: #9fd6cc;
}

html[data-theme="dark"] .stats-grid article strong,
html[data-theme="dark"] .billing-summary-grid strong,
html[data-theme="dark"] .security-summary-grid strong,
html[data-theme="dark"] .integration-summary-grid strong,
html[data-theme="dark"] .advanced-summary-grid strong,
html[data-theme="dark"] .feature-catalog-summary strong,
html[data-theme="dark"] .deliverability-summary-grid strong,
html[data-theme="dark"] .domain-summary-grid strong,
html[data-theme="dark"] .sender-summary-grid strong,
html[data-theme="dark"] .campaign-summary-grid strong,
html[data-theme="dark"] .contacts-summary-grid strong,
html[data-theme="dark"] .template-summary-grid strong,
html[data-theme="dark"] .automation-summary-grid strong,
html[data-theme="dark"] .analytics-summary-grid strong,
html[data-theme="dark"] .campaign-metric-grid strong,
html[data-theme="dark"] .automation-metric-grid strong,
html[data-theme="dark"] .analytics-metric-grid strong,
html[data-theme="dark"] .deliverability-metrics strong,
html[data-theme="dark"] .dashboard-metrics strong {
  color: #f8fffd;
}

html[data-theme="dark"] .stats-grid article em,
html[data-theme="dark"] .billing-summary-grid em,
html[data-theme="dark"] .security-summary-grid em,
html[data-theme="dark"] .integration-summary-grid em,
html[data-theme="dark"] .advanced-summary-grid em,
html[data-theme="dark"] .feature-catalog-summary em,
html[data-theme="dark"] .deliverability-summary-grid em,
html[data-theme="dark"] .domain-summary-grid em,
html[data-theme="dark"] .sender-summary-grid em,
html[data-theme="dark"] .campaign-summary-grid em,
html[data-theme="dark"] .contacts-summary-grid em,
html[data-theme="dark"] .template-summary-grid em,
html[data-theme="dark"] .automation-summary-grid em,
html[data-theme="dark"] .analytics-summary-grid em {
  color: var(--muted);
}

html[data-theme="dark"] .menu-primary-link,
html[data-theme="dark"] .submenu a,
html[data-theme="dark"] .menu-group,
html[data-theme="dark"] .overview-list div,
html[data-theme="dark"] .health-list div,
html[data-theme="dark"] .health-list a,
html[data-theme="dark"] .mini-dashboard-columns div,
html[data-theme="dark"] .billing-flow-list div,
html[data-theme="dark"] .feature-catalog-card,
html[data-theme="dark"] .integration-catalog-list article,
html[data-theme="dark"] .advanced-tool-list article,
html[data-theme="dark"] .guide-detail-grid article {
  border-color: var(--line);
  background: var(--soft);
}

html[data-theme="dark"] .billing-current-plan,
html[data-theme="dark"] .billing-due-card,
html[data-theme="dark"] .billing-method-fields {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    var(--surface);
  color: var(--ink);
}

html[data-theme="dark"] .billing-current-plan span,
html[data-theme="dark"] .billing-current-plan em,
html[data-theme="dark"] .billing-due-card span,
html[data-theme="dark"] .billing-method-fields span,
html[data-theme="dark"] .billing-method-fields em,
html[data-theme="dark"] .billing-limit-list em {
  color: var(--muted);
}

html[data-theme="dark"] .billing-plan-enterprise {
  border-color: rgba(45, 212, 191, 0.34);
  background:
    linear-gradient(145deg, rgba(20, 184, 166, 0.14), rgba(255, 255, 255, 0.02)),
    var(--surface);
}

html[data-theme="dark"] .billing-current-plan strong,
html[data-theme="dark"] .billing-due-card strong {
  color: #f8fffd;
}

html[data-theme="dark"] .billing-due-card em {
  color: #7dd3c7;
}

html[data-theme="dark"] .security-score-card {
  border-color: var(--line);
  background:
    radial-gradient(circle at center, rgba(16, 29, 26, 0.96) 58%, transparent 60%),
    conic-gradient(var(--accent) calc(var(--score) * 1%), #233530 0);
  box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .security-score-card strong {
  color: #f8fffd;
}

html[data-theme="dark"] .security-score-card span {
  color: #9fd6cc;
}

html[data-theme="dark"] .security-policy-section {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    var(--surface);
}

html[data-theme="dark"] .menu-primary-link,
html[data-theme="dark"] .submenu a {
  border-color: transparent;
  background: transparent;
}

html[data-theme="dark"] .menu-group {
  border-color: transparent;
  background: transparent;
}

html[data-theme="dark"] .menu-group-open,
html[data-theme="dark"] .menu-group-current {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    var(--surface);
}

html[data-theme="dark"] .menu-link-active {
  border-color: rgba(125, 211, 199, 0.34);
  background: rgba(20, 184, 166, 0.12);
  color: #7dd3c7;
  box-shadow: none;
}

html[data-theme="dark"] .menu-link-active span {
  color: #a8bbb5;
}

html[data-theme="dark"] .menu-primary-link[data-icon] .button-icon {
  background: rgba(20, 184, 166, 0.14);
  color: #7dd3c7;
}

html[data-theme="dark"] .menu-group-icon {
  border-color: var(--line);
  background: #12211d;
  color: #7dd3c7;
}

html[data-theme="dark"] .menu-guide-card {
  border-color: rgba(125, 211, 199, 0.24);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(20, 184, 166, 0.1)),
    var(--surface);
}

html[data-theme="dark"] .menu-guide-card em {
  background: #12211d;
  color: #7dd3c7;
  box-shadow: none;
}

html[data-theme="dark"] .menu-preferences {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    var(--surface);
}

html[data-theme="dark"] .menu-preferences-head strong {
  color: #f8fffd;
}

html[data-theme="dark"] .menu-preference-control {
  background: #12211d;
  box-shadow: none;
}

html[data-theme="dark"] .security-policy-section-head p {
  color: var(--muted);
}

html[data-theme="dark"] .security-summary-grid article,
html[data-theme="dark"] .security-card,
html[data-theme="dark"] .security-audit-panel {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    var(--surface);
  color: var(--ink);
}

html[data-theme="dark"] .security-summary-grid span {
  color: #9fd6cc;
}

html[data-theme="dark"] .security-summary-grid strong {
  color: #f8fffd;
}

html[data-theme="dark"] .security-summary-grid em {
  color: var(--muted);
}

html[data-theme="dark"] .security-audit-head {
  background: #13211d;
  color: #9fd6cc;
}

html[data-theme="dark"] .security-audit-row {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
    var(--surface);
}

html[data-theme="dark"] .security-audit-row strong,
html[data-theme="dark"] .security-audit-row code,
html[data-theme="dark"] .security-audit-row span,
html[data-theme="dark"] .security-audit-row em {
  color: var(--ink);
}

html[data-theme="dark"] .security-audit-row code {
  color: #c5d7d1;
}

html[data-theme="dark"] .submenu a,
html[data-theme="dark"] .link-button,
html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .workspace-pill,
html[data-theme="dark"] .account-card,
html[data-theme="dark"] .preference-control,
html[data-theme="dark"] .menu-toggle,
html[data-theme="dark"] .menu-close,
html[data-theme="dark"] .billing-payment-close,
html[data-theme="dark"] .integration-form-close,
html[data-theme="dark"] .workspace-form-modal-close,
html[data-theme="dark"] .guide-modal-close,
html[data-theme="dark"] .page-guide-modal-close {
  border-color: var(--line);
  background: #12211d;
  color: var(--ink);
}

html[data-theme="dark"] .menu-toggle {
  background: #12211d;
  color: #f8fffd;
}

html[data-theme="dark"] .account-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    #12211d;
}

html[data-theme="dark"] .account-meta-table > span {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .account-meta-table > span:last-child {
  border-color: rgba(125, 211, 199, 0.32);
  background: rgba(20, 184, 166, 0.14);
}

html[data-theme="dark"] .account-meta-table em {
  color: var(--ink);
}

html[data-theme="dark"] .account-meta-table > span:last-child em {
  color: #7dd3c7;
}

html[data-theme="dark"] .button-secondary:hover,
html[data-theme="dark"] .link-button:hover,
html[data-theme="dark"] .menu-primary-link:hover,
html[data-theme="dark"] .submenu a:hover {
  background: var(--accent-soft);
  color: #dffdf5;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .preference-control select {
  border-color: var(--line);
  background: #0b1815;
  color: var(--ink);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #77918a;
}

html[data-theme="dark"] .section-help,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .menu-primary-link span,
html[data-theme="dark"] .submenu a span,
html[data-theme="dark"] .mini-dashboard-columns span,
html[data-theme="dark"] .guide-detail-grid span,
html[data-theme="dark"] .guide-steps span,
html[data-theme="dark"] .field-help,
html[data-theme="dark"] .preference-control span {
  color: var(--muted);
}

html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .menu-primary-link[data-icon] .button-icon,
html[data-theme="dark"] .menu-guide-link .menu-primary-icon,
html[data-theme="dark"] .credential-button .button-icon,
html[data-theme="dark"] .credential-button strong {
  color: #7dd3c7;
}

html[data-theme="dark"] .status-active,
html[data-theme="dark"] .status-available {
  background: rgba(20, 83, 45, 0.38);
  color: #bbf7d0;
}

html[data-theme="dark"] .status-paused,
html[data-theme="dark"] .status-planned,
html[data-theme="dark"] .status-in_progress {
  background: rgba(146, 64, 14, 0.34);
  color: #fde68a;
}

html[data-theme="dark"] .status-failed,
html[data-theme="dark"] .status-blocked,
html[data-theme="dark"] .status-disabled,
html[data-theme="dark"] .button-danger {
  background: rgba(127, 29, 29, 0.42);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.5);
}

html[data-theme="dark"] .flash-success {
  background: rgba(20, 83, 45, 0.42);
  border-color: rgba(134, 239, 172, 0.34);
  color: #dcfce7;
}

html[data-theme="dark"] .flash-error {
  background: rgba(127, 29, 29, 0.42);
  border-color: rgba(252, 165, 165, 0.34);
  color: #fee2e2;
}

html[data-theme="dark"] option {
  background: #0b1815;
  color: var(--ink);
}

html[data-theme="dark"] .email-connection-table th {
  background: #13231f;
  color: var(--muted);
}

html[data-theme="dark"] .campaign-data-table th,
html[data-theme="dark"] .template-data-table th,
html[data-theme="dark"] .automation-data-table th {
  background: #13231f;
  color: var(--muted);
}

html[data-theme="dark"] input[type="color"] {
  background: var(--soft);
}

html[data-theme="dark"] :where(
  .billing-method-fields,
  .integration-form-section,
  .advanced-score-row,
  .feature-filter-form,
  .feature-bulk-form,
  .deliverability-warmup-plan,
  .domain-status-editor,
  .domain-toggle-grid,
  .template-guide-card,
  .campaign-schedule-card,
  .contact-import-panel,
  .automation-trigger-panel,
  .analytics-filter-panel,
  .sender-profile-form,
  .smtp-key-form
) {
  background: #0b1815;
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] :where(
  .credential-button,
  .tag-line span,
  .color-text,
  .color-value,
  .billing-limit-list em,
  .integration-meta-grid div,
  .provider-capacity div,
  .email-connection-table-wrap,
  .contacts-table-wrap,
  .campaign-table-wrap,
  .template-table-wrap,
  .automation-table-wrap,
  .template-block,
  .template-preview-panel,
  .template-preview-panel iframe,
  .feature-card-fields label,
  .dashboard-topline strong,
  .dashboard-flow span,
  .mini-grid span,
  .integration-grid span,
  .step-list div,
  .workflow-row,
  .launch-note,
  .guide-notes span,
  .billing-due-card,
  .color-swatch,
  .report-grid div,
  .automation-grid div,
  .deliverability-score,
  .domain-record-row,
  .sender-identity-row,
  .contact-list-row,
  .template-preview-box,
  .metric-tile
) {
  background: var(--soft);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] :where(
  .field-help,
  .form-footnote,
  .credential-group span,
  .integration-summary-grid em,
  .tag-line span,
  .color-text,
  .billing-limit-list em,
  .feature-card-title span:not(.status-pill):not(.feature-priority-pill),
  .feature-card-fields span,
  .dashboard-flow span,
  .mini-grid span,
  .integration-grid span,
  .step-list span,
  .report-grid span,
  .automation-grid span,
  .domain-record-row span,
  .sender-identity-row span,
  .email-connection-table td span:not(.status-pill):not(.button-icon),
  .contact-list-row span,
  .template-preview-box span,
  .metric-tile span
) {
  color: var(--muted);
}

html[data-theme="dark"] .field-help {
  border-color: rgba(125, 211, 199, 0.34);
  background: #13231f;
  color: #7dd3c7;
}

html[data-theme="dark"] .field-help::after {
  border-color: rgba(125, 211, 199, 0.28);
  background: #0b1815;
  color: #edf7f4;
  box-shadow: var(--shadow);
}

html[data-theme="dark"] :where(.home-hero .button-secondary) {
  background: rgba(8, 19, 16, 0.74);
  border-color: rgba(255, 255, 255, 0.28);
  color: #f8fffd;
}

html[data-theme="dark"] .guest-login-button {
  border-color: rgba(125, 211, 199, 0.34);
  background: #12211d;
  color: #7dd3c7;
}

html[data-theme="dark"] .marketing-auth-shell::before,
html[data-theme="dark"] .sales-landing-shell::before {
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.16), transparent 36%),
    linear-gradient(315deg, rgba(96, 165, 250, 0.12), transparent 34%),
    var(--canvas);
}

html[data-theme="dark"] .login-visual-panel,
html[data-theme="dark"] .sales-visual-panel {
  border-color: var(--line);
  background: var(--surface);
}

html[data-theme="dark"] .login-visual-card {
  border-color: rgba(125, 211, 199, 0.18);
  background: rgba(16, 29, 26, 0.88);
  color: var(--ink);
}

html[data-theme="dark"] .sales-svg-panel {
  background:
    linear-gradient(145deg, rgba(20, 184, 166, 0.12), rgba(96, 165, 250, 0.1)),
    var(--surface);
}

html[data-theme="dark"] .sales-illustration {
  border-color: var(--line);
  background:
    radial-gradient(circle at 24% 22%, rgba(20, 184, 166, 0.13), transparent 34%),
    radial-gradient(circle at 80% 72%, rgba(96, 165, 250, 0.12), transparent 34%),
    rgba(8, 19, 16, 0.58);
}

html[data-theme="dark"] .sales-svg-card {
  fill: rgba(16, 29, 26, 0.94);
  stroke: rgba(125, 211, 199, 0.22);
}

html[data-theme="dark"] .sales-proof-grid span {
  border-color: var(--line);
  background: rgba(16, 29, 26, 0.76);
  color: var(--ink);
}

html[data-theme="dark"] .contact-plan-reference {
  border-color: var(--line);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(96, 165, 250, 0.08)),
    var(--soft);
}

html[data-theme="dark"] .contact-plan-floating-button {
  border-color: rgba(125, 211, 199, 0.34);
  background: #0f766e;
  color: white;
}

html[data-theme="dark"] .contact-plan-drawer-panel {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(16, 29, 26, 0.98), rgba(11, 24, 21, 0.98)),
    var(--surface);
}

html[data-theme="dark"] .contact-plan-drawer-close {
  border-color: var(--line);
  background: #12211d;
  color: var(--ink);
}

html[data-theme="dark"] .contact-plan-item {
  border-color: var(--line);
  background: rgba(16, 29, 26, 0.78);
}

html[data-theme="dark"] .contact-sales-captcha {
  border-color: var(--line);
  background: rgba(16, 29, 26, 0.78);
}

html[data-theme="dark"] :where(.priority-low, .feature-priority-low) {
  background: rgba(20, 83, 45, 0.38);
  border-color: rgba(134, 239, 172, 0.32);
  color: #bbf7d0;
}

html[data-theme="dark"] :where(.priority-medium, .feature-priority-medium) {
  background: rgba(146, 64, 14, 0.34);
  border-color: rgba(251, 191, 36, 0.36);
  color: #fde68a;
}

html[data-theme="dark"] :where(.priority-high, .feature-priority-high) {
  background: rgba(154, 52, 18, 0.4);
  border-color: rgba(251, 146, 60, 0.4);
  color: #fed7aa;
}

html[data-theme="dark"] :where(.priority-critical, .feature-priority-critical) {
  background: rgba(127, 29, 29, 0.42);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fecaca;
}

@media (max-width: 920px) {
  .preference-controls {
    order: 2;
    width: 100%;
    justify-content: flex-end;
  }

  .account-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .account-card {
    order: 1;
    max-width: min(540px, 58vw);
  }

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

  .workspace-utility-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .preference-controls {
    justify-content: stretch;
  }

  .preference-control {
    flex: 1 1 140px;
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .menu-preference-grid {
    grid-template-columns: 1fr;
  }

  .menu-guide-link {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .menu-guide-card em {
    grid-column: 2;
    grid-row: auto;
    justify-self: flex-start;
    margin-top: 4px;
  }

  .preference-control select {
    width: 100%;
  }

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

  .workspace-utility-grid {
    grid-template-columns: 1fr;
  }
}

/* Billing page final alignment overrides */
.billing-page {
  width: min(1520px, calc(100% - 72px));
  gap: 20px;
}

.billing-command-center {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
}

.billing-hero-copy {
  min-height: 196px;
  align-content: start;
  padding: 28px 34px 30px;
}

.billing-account-panel {
  min-height: 196px;
}

.billing-plan-board {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
}

.billing-plan-board-head {
  align-items: flex-end;
  margin-bottom: 2px;
}

.billing-plan-card {
  gap: 14px;
  padding: 18px;
}

.billing-plan-head {
  gap: 8px;
}

.billing-plan-head p {
  min-height: 42px;
}

.billing-limit-list li {
  grid-template-columns: minmax(86px, 1fr) max-content;
  gap: 12px;
}

.billing-limit-list em {
  max-width: 116px;
  text-align: right;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.billing-plan-card .button {
  margin-top: 4px;
}

@media (max-width: 1320px) {
  .billing-page {
    width: min(100% - 40px, 1320px);
  }

  .billing-command-center {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.38fr);
  }

  .billing-plan-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .billing-command-center,
  .billing-plan-board {
    grid-template-columns: 1fr;
  }

  .billing-plan-board-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .billing-page {
    width: min(100% - 28px, 1320px);
  }

  .billing-hero-copy,
  .billing-account-panel,
  .billing-plan-board,
  .billing-plan-card {
    padding: 16px;
  }

  .billing-account-meta,
  .billing-payment-basics,
  .billing-due-card {
    grid-template-columns: 1fr;
  }

  .billing-limit-list li {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* Application-wide card consistency, aligned with Billing & Limits */
:where(
  .panel,
  .record-card,
  .pricing-card,
  .security-card,
  .integration-card,
  .feature-catalog-card,
  .feature-group-panel,
  .advanced-run-card,
  .provider-card,
  .provider-setup-card,
  .provider-guide-card,
  .provider-health-card,
  .deliverability-policy-card,
  .deliverability-scan-card,
  .deliverability-provider-card,
  .deliverability-domain-card,
  .domain-create-card,
  .domain-playbook-card,
  .domain-card,
  .sender-create-card,
  .sender-domain-card,
  .sender-card,
  .campaign-create-card,
  .campaign-readiness-card,
  .campaign-card,
  .contacts-create-card,
  .contacts-import-card,
  .contacts-list-card,
  .contact-card,
  .template-create-card,
  .template-guide-card,
  .template-card,
  .automation-create-card,
  .automation-map-card,
  .automation-card,
  .analytics-filter-card,
  .analytics-breakdown-card,
  .analytics-card,
  .workspace-command-card,
  .workspace-settings-panel,
  .workspace-users-panel,
  .usage-card,
  .dashboard-kpi,
  .dashboard-main-card,
  .dashboard-health-card,
  .module-launcher a,
  .quick-action-grid a
) {
  min-width: 0;
  border: 1px solid rgba(217, 226, 222, 0.88);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 250, 0.9)),
    var(--surface);
  box-shadow: 0 18px 46px rgba(23, 33, 31, 0.08);
}

:where(
  .panel,
  .record-card,
  .pricing-card,
  .security-card,
  .integration-card,
  .feature-catalog-card,
  .feature-group-panel,
  .advanced-run-card,
  .provider-card,
  .provider-setup-card,
  .provider-guide-card,
  .deliverability-policy-card,
  .deliverability-scan-card,
  .deliverability-provider-card,
  .deliverability-domain-card,
  .domain-create-card,
  .domain-playbook-card,
  .domain-card,
  .sender-create-card,
  .sender-domain-card,
  .sender-card,
  .campaign-create-card,
  .campaign-readiness-card,
  .campaign-card,
  .contacts-create-card,
  .contacts-import-card,
  .contacts-list-card,
  .contact-card,
  .template-create-card,
  .template-guide-card,
  .template-card,
  .automation-create-card,
  .automation-map-card,
  .automation-card,
  .analytics-filter-card,
  .analytics-breakdown-card,
  .analytics-card,
  .workspace-settings-panel,
  .workspace-users-panel,
  .dashboard-main-card,
  .dashboard-health-card
) {
  padding: 20px;
}

:where(
  .domain-card,
  .sender-card,
  .campaign-card,
  .contacts-list-card,
  .contact-card,
  .template-card,
  .automation-card,
  .analytics-card,
  .provider-card,
  .deliverability-domain-card,
  .deliverability-provider-card,
  .analytics-breakdown-card
) {
  display: grid;
  gap: 14px;
}

:where(
  .pricing-card,
  .integration-card,
  .feature-catalog-card,
  .advanced-run-card,
  .provider-card,
  .domain-card,
  .sender-card,
  .campaign-card,
  .contacts-list-card,
  .contact-card,
  .template-card,
  .automation-card,
  .analytics-card,
  .workspace-command-card,
  .usage-card,
  .dashboard-kpi,
  .module-launcher a,
  .quick-action-grid a
) {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

:where(
  .pricing-card,
  .integration-card,
  .feature-catalog-card,
  .advanced-run-card,
  .provider-card,
  .domain-card,
  .sender-card,
  .campaign-card,
  .contacts-list-card,
  .contact-card,
  .template-card,
  .automation-card,
  .analytics-card,
  .workspace-command-card,
  .usage-card,
  .dashboard-kpi,
  .module-launcher a,
  .quick-action-grid a
):hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.36);
  box-shadow: 0 16px 38px rgba(23, 33, 31, 0.09);
}

:where(
  .panel-title-row,
  .integration-card-head,
  .provider-card-head,
  .domain-card-head,
  .sender-card-head,
  .campaign-card-head,
  .contacts-card-head,
  .template-card-head,
  .automation-card-head,
  .analytics-card-head,
  .workspace-user-card-head
) {
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

:where(
  .panel-title-row,
  .integration-card-head,
  .provider-card-head,
  .domain-card-head,
  .sender-card-head,
  .campaign-card-head,
  .contacts-card-head,
  .template-card-head,
  .automation-card-head,
  .analytics-card-head
) :where(h2, h3) {
  margin-top: 0;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

:where(
  .domain-card-head,
  .sender-card-head,
  .campaign-card-head,
  .contacts-card-head,
  .template-card-head,
  .automation-card-head,
  .analytics-card-head
) p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

:where(
  .domain-summary-grid,
  .sender-summary-grid,
  .campaign-summary-grid,
  .contacts-summary-grid,
  .template-summary-grid,
  .automation-summary-grid,
  .analytics-summary-grid,
  .security-summary-grid,
  .deliverability-summary-grid,
  .integration-summary-grid,
  .advanced-summary-grid,
  .feature-catalog-summary
) article,
:where(
  .campaign-check-grid,
  .campaign-metric-grid,
  .automation-type-grid,
  .automation-metric-grid,
  .analytics-metric-grid,
  .template-meta-grid,
  .deliverability-scan-grid,
  .deliverability-metrics,
  .deliverability-warmup-plan,
  .provider-health-card,
  .overview-list,
  .health-list
) :where(article, div) {
  border: 1px solid rgba(217, 226, 222, 0.88);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 250, 0.86)),
    var(--surface);
  box-shadow: 0 12px 30px rgba(23, 33, 31, 0.06);
}

:where(
  .domain-action-grid,
  .sender-action-row,
  .campaign-action-row,
  .contacts-action-row,
  .template-action-row,
  .automation-action-row,
  .analytics-action-row,
  .provider-action-row
) {
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

html[data-theme="dark"] :where(
  .panel,
  .record-card,
  .pricing-card,
  .security-card,
  .integration-card,
  .feature-catalog-card,
  .feature-group-panel,
  .advanced-run-card,
  .provider-card,
  .provider-setup-card,
  .provider-guide-card,
  .provider-health-card,
  .deliverability-policy-card,
  .deliverability-scan-card,
  .deliverability-provider-card,
  .deliverability-domain-card,
  .domain-create-card,
  .domain-playbook-card,
  .domain-card,
  .sender-create-card,
  .sender-domain-card,
  .sender-card,
  .campaign-create-card,
  .campaign-readiness-card,
  .campaign-card,
  .contacts-create-card,
  .contacts-import-card,
  .contacts-list-card,
  .contact-card,
  .template-create-card,
  .template-guide-card,
  .template-card,
  .automation-create-card,
  .automation-map-card,
  .automation-card,
  .analytics-filter-card,
  .analytics-breakdown-card,
  .analytics-card,
  .workspace-command-card,
  .workspace-settings-panel,
  .workspace-users-panel,
  .usage-card,
  .dashboard-kpi,
  .dashboard-main-card,
  .dashboard-health-card,
  .module-launcher a,
  .quick-action-grid a
) {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    var(--surface);
  color: var(--ink);
}

/* Strong final card layout system: widths, padding, gaps, and card rhythm */
.page-head,
.dashboard-kpis,
.dashboard-usage,
.dashboard-grid,
.dashboard-grid-secondary,
.infra-stats,
.infra-layout,
.provider-board,
.security-summary-grid,
.security-grid,
.security-audit-panel,
.integration-summary-grid,
.integration-layout,
.advanced-summary-grid,
.advanced-layout,
.feature-catalog-summary,
.feature-catalog-layout,
.deliverability-summary-grid,
.deliverability-layout,
.deliverability-board,
.domain-summary-grid,
.domain-layout,
.domain-board,
.sender-summary-grid,
.sender-layout,
.sender-board,
.campaign-summary-grid,
.campaign-layout,
.campaign-board,
.contacts-summary-grid,
.contacts-layout,
.contacts-board,
.template-summary-grid,
.template-layout,
.template-board,
.automation-summary-grid,
.automation-layout,
.automation-board,
.analytics-summary-grid,
.analytics-layout,
.analytics-board,
.workspace-admin-grid,
.workspace-command-grid,
.workspace-users-panel,
.workspace-user-grid {
  width: min(1520px, calc(100% - 72px));
  margin-inline: auto;
}

.dashboard-kpis,
.dashboard-usage,
.infra-stats,
.provider-grid,
.security-summary-grid,
.integration-summary-grid,
.advanced-summary-grid,
.feature-catalog-summary,
.deliverability-summary-grid,
.domain-summary-grid,
.sender-summary-grid,
.campaign-summary-grid,
.contacts-summary-grid,
.template-summary-grid,
.automation-summary-grid,
.analytics-summary-grid {
  gap: 20px;
}

.domain-layout,
.sender-layout,
.campaign-layout,
.contacts-layout,
.template-layout,
.automation-layout,
.analytics-layout,
.deliverability-layout,
.integration-layout,
.advanced-layout,
.feature-catalog-layout,
.security-grid,
.infra-layout,
.workspace-admin-grid {
  gap: 22px;
}

.domain-card-grid,
.sender-card-grid,
.campaign-card-grid,
.contacts-card-grid,
.contacts-list-grid,
.template-card-grid,
.automation-card-grid,
.analytics-card-grid,
.analytics-breakdown-grid,
.deliverability-provider-grid,
.deliverability-domain-grid,
.integration-card-grid,
.feature-card-list,
.provider-list,
.campaign-list,
.template-list,
.automation-list,
.contacts-list-view,
.domain-list {
  gap: 16px;
}

.panel,
.record-card,
.pricing-card,
.security-card,
.integration-card,
.feature-catalog-card,
.feature-group-panel,
.advanced-run-card,
.provider-card,
.provider-setup-card,
.provider-guide-card,
.provider-health-card,
.deliverability-policy-card,
.deliverability-scan-card,
.deliverability-provider-card,
.deliverability-domain-card,
.domain-create-card,
.domain-playbook-card,
.domain-card,
.sender-create-card,
.sender-domain-card,
.sender-card,
.campaign-create-card,
.campaign-readiness-card,
.campaign-card,
.contacts-create-card,
.contacts-import-card,
.contacts-list-card,
.contact-card,
.template-create-card,
.template-guide-card,
.template-card,
.automation-create-card,
.automation-map-card,
.automation-card,
.analytics-filter-card,
.analytics-breakdown-card,
.analytics-card,
.workspace-command-card,
.workspace-settings-panel,
.workspace-users-panel,
.usage-card,
.dashboard-kpi,
.dashboard-main-card,
.dashboard-health-card,
.module-launcher a,
.quick-action-grid a {
  min-width: 0;
  border: 1px solid rgba(217, 226, 222, 0.88);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 250, 0.9)),
    var(--surface);
  box-shadow: 0 18px 46px rgba(23, 33, 31, 0.08);
}

.panel,
.record-card,
.pricing-card,
.security-card,
.integration-card,
.feature-catalog-card,
.feature-group-panel,
.advanced-run-card,
.provider-card,
.provider-setup-card,
.provider-guide-card,
.provider-health-card,
.deliverability-policy-card,
.deliverability-scan-card,
.deliverability-provider-card,
.deliverability-domain-card,
.domain-create-card,
.domain-playbook-card,
.domain-card,
.sender-create-card,
.sender-domain-card,
.sender-card,
.campaign-create-card,
.campaign-readiness-card,
.campaign-card,
.contacts-create-card,
.contacts-import-card,
.contacts-list-card,
.contact-card,
.template-create-card,
.template-guide-card,
.template-card,
.automation-create-card,
.automation-map-card,
.automation-card,
.analytics-filter-card,
.analytics-breakdown-card,
.analytics-card,
.workspace-settings-panel,
.workspace-users-panel,
.dashboard-main-card,
.dashboard-health-card {
  padding: 20px;
}

.domain-card,
.sender-card,
.campaign-card,
.contacts-list-card,
.contact-card,
.template-card,
.automation-card,
.analytics-card,
.provider-card,
.deliverability-domain-card,
.deliverability-provider-card,
.analytics-breakdown-card {
  display: grid;
  gap: 16px;
}

.domain-summary-grid article,
.sender-summary-grid article,
.campaign-summary-grid article,
.contacts-summary-grid article,
.template-summary-grid article,
.automation-summary-grid article,
.analytics-summary-grid article,
.security-summary-grid article,
.deliverability-summary-grid article,
.integration-summary-grid article,
.advanced-summary-grid article,
.feature-catalog-summary article,
.provider-grid article,
.infra-stats article {
  min-height: 132px;
  padding: 20px;
}

.panel-title-row,
.integration-card-head,
.provider-card-head,
.domain-card-head,
.sender-card-head,
.campaign-card-head,
.contacts-card-head,
.template-card-head,
.automation-card-head,
.analytics-card-head,
.workspace-user-card-head {
  gap: 16px;
  min-width: 0;
}

.domain-action-grid,
.sender-action-row,
.campaign-action-row,
.contacts-action-row,
.template-action-row,
.automation-action-row,
.analytics-action-row,
.provider-action-row {
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1320px) {
  .page-head,
  .dashboard-kpis,
  .dashboard-usage,
  .dashboard-grid,
  .dashboard-grid-secondary,
  .infra-stats,
  .infra-layout,
  .provider-board,
  .security-summary-grid,
  .security-grid,
  .security-audit-panel,
  .integration-summary-grid,
  .integration-layout,
  .advanced-summary-grid,
  .advanced-layout,
  .feature-catalog-summary,
  .feature-catalog-layout,
  .deliverability-summary-grid,
  .deliverability-layout,
  .deliverability-board,
  .domain-summary-grid,
  .domain-layout,
  .domain-board,
  .sender-summary-grid,
  .sender-layout,
  .sender-board,
  .campaign-summary-grid,
  .campaign-layout,
  .campaign-board,
  .contacts-summary-grid,
  .contacts-layout,
  .contacts-board,
  .template-summary-grid,
  .template-layout,
  .template-board,
  .automation-summary-grid,
  .automation-layout,
  .automation-board,
  .analytics-summary-grid,
  .analytics-layout,
  .analytics-board,
  .workspace-admin-grid,
  .workspace-command-grid,
  .workspace-users-panel,
  .workspace-user-grid {
    width: min(1320px, calc(100% - 40px));
  }
}

@media (max-width: 560px) {
  .page-head,
  .dashboard-kpis,
  .dashboard-usage,
  .dashboard-grid,
  .dashboard-grid-secondary,
  .infra-stats,
  .infra-layout,
  .provider-board,
  .security-summary-grid,
  .security-grid,
  .security-audit-panel,
  .integration-summary-grid,
  .integration-layout,
  .advanced-summary-grid,
  .advanced-layout,
  .feature-catalog-summary,
  .feature-catalog-layout,
  .deliverability-summary-grid,
  .deliverability-layout,
  .deliverability-board,
  .domain-summary-grid,
  .domain-layout,
  .domain-board,
  .sender-summary-grid,
  .sender-layout,
  .sender-board,
  .campaign-summary-grid,
  .campaign-layout,
  .campaign-board,
  .contacts-summary-grid,
  .contacts-layout,
  .contacts-board,
  .template-summary-grid,
  .template-layout,
  .template-board,
  .automation-summary-grid,
  .automation-layout,
  .automation-board,
  .analytics-summary-grid,
  .analytics-layout,
  .analytics-board,
  .workspace-admin-grid,
  .workspace-command-grid,
  .workspace-users-panel,
  .workspace-user-grid {
    width: min(100% - 28px, 1320px);
  }

  .panel,
  .record-card,
  .pricing-card,
  .security-card,
  .integration-card,
  .feature-catalog-card,
  .feature-group-panel,
  .advanced-run-card,
  .provider-card,
  .provider-setup-card,
  .provider-guide-card,
  .provider-health-card,
  .deliverability-policy-card,
  .deliverability-scan-card,
  .deliverability-provider-card,
  .deliverability-domain-card,
  .domain-create-card,
  .domain-playbook-card,
  .domain-card,
  .sender-create-card,
  .sender-domain-card,
  .sender-card,
  .campaign-create-card,
  .campaign-readiness-card,
  .campaign-card,
  .contacts-create-card,
  .contacts-import-card,
  .contacts-list-card,
  .contact-card,
  .template-create-card,
  .template-guide-card,
  .template-card,
  .automation-create-card,
  .automation-map-card,
  .automation-card,
  .analytics-filter-card,
  .analytics-breakdown-card,
  .analytics-card,
  .workspace-settings-panel,
  .workspace-users-panel,
  .dashboard-main-card,
  .dashboard-health-card {
    padding: 16px;
  }
}

.floating-menu-dock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1200;
  display: grid;
  gap: 8px;
  width: min(280px, calc(100vw - 32px));
  pointer-events: none;
  transition: opacity 0.16s ease, visibility 0.16s ease;
}

.menu-open .floating-menu-dock,
.menu-open .contact-plan-floating-button {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.floating-menu-label {
  justify-self: end;
  max-width: 100%;
  overflow: hidden;
  padding: 7px 10px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: rgba(236, 253, 249, 0.94);
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(23, 33, 31, 0.1);
  pointer-events: auto;
}

.floating-menu-links {
  display: grid;
  gap: 8px;
}

.floating-menu-links a {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(217, 226, 222, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 250, 0.9)),
    var(--surface);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(23, 33, 31, 0.1);
  pointer-events: auto;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.floating-menu-links a:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.36);
  box-shadow: 0 18px 42px rgba(23, 33, 31, 0.14);
}

.floating-menu-links strong,
.floating-menu-links span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-menu-links strong {
  font-size: 13px;
  line-height: 1.2;
}

.floating-menu-links span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

html[data-theme="dark"] .floating-menu-label,
html[data-theme="dark"] .floating-menu-links a {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    var(--surface);
  color: var(--ink);
}

html[data-theme="dark"] .floating-menu-label {
  color: #7dd3c7;
}

@media (max-width: 760px) {
  .floating-menu-dock {
    right: 14px;
    bottom: 14px;
    width: min(240px, calc(100vw - 28px));
  }

  .floating-menu-links {
    grid-template-columns: 1fr;
  }

  .floating-menu-links a {
    padding: 10px;
  }
}
