/* SiteMatrix — modern professional design system */

:root {
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --bg: #f8fafc;
  --bg-white: #ffffff;
  --bg-subtle: #f1f5f9;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --success: #059669;
  --success-soft: #ecfdf5;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --sidebar: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-active: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); }

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo-img {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-links a:not(.btn) {
  color: var(--text-secondary);
  font-size: 0.925rem;
  font-weight: 500;
}

.nav-links a:not(.btn):hover { color: var(--text); }

.inline-form { display: inline; margin: 0; }

.page-control .site-header,
.page-control .site-footer { display: none; }

.main-public { flex: 1; padding: 0; }

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, minmax(120px, 1fr));
  gap: 2.5rem;
  padding: 3rem 0 2rem;
}

.footer-brand .footer-logo {
  color: #fff;
  margin-bottom: 0.85rem;
}

.footer-tagline {
  margin: 0;
  max-width: 320px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--sidebar-text);
}

.footer-links h3 {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li + li { margin-top: 0.5rem; }

.footer-links a {
  color: var(--sidebar-text);
  font-size: 0.9375rem;
}

.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0 1.75rem;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: var(--sidebar-text);
  font-size: 0.8125rem;
}

.footer-bottom .logged-in-user { margin-bottom: 0.5rem; }
.footer-bottom .logged-in-user-label,
.footer-bottom .logged-in-user-email { color: rgba(148, 163, 184, 0.85); }
.footer-bottom .logged-in-user-name { color: #e2e8f0; }

.footer-inner p {
  margin: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.logged-in-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

.logged-in-user-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.logged-in-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.logged-in-user-email {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.logged-in-user--sidebar {
  align-items: flex-start;
  text-align: left;
  margin-bottom: 1rem;
  padding: 0 0.75rem;
}

.logged-in-user--sidebar .logged-in-user-label {
  color: var(--sidebar-text);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.logged-in-user--sidebar .logged-in-user-name {
  color: #fff;
  font-size: 0.9375rem;
}

.logged-in-user--sidebar .logged-in-user-email {
  color: var(--sidebar-text);
  font-size: 0.8125rem;
}

.sidebar-logout {
  margin: 0.25rem 0 0;
  padding: 0;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-logout button {
  width: 100%;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  padding: 0.65rem 0.85rem;
}

/* Typography */
.eyebrow {
  display: inline-block;
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.page-header { margin-bottom: 2rem; }
.page-header.compact { margin-bottom: 1.5rem; }
.page-header h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.page-header p { margin: 0; color: var(--text-secondary); max-width: 540px; }
.page-header.row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}
.back-link:hover { color: var(--accent); }

.page-narrow { max-width: 560px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.925rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--bg-subtle);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-subtle); color: var(--text); }

.btn-danger {
  background: var(--bg-white);
  color: var(--danger);
  border-color: #fecaca;
}
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }

.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.8rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-group {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Hero */
.hero {
  text-align: center;
  padding: 2rem 0 3rem;
  position: relative;
}

.hero-marketing {
  text-align: left;
  padding: 3.5rem 0 4rem;
  background:
    radial-gradient(ellipse 70% 55% at 15% -5%, rgba(37, 99, 235, 0.1), transparent),
    radial-gradient(ellipse 50% 45% at 95% 10%, rgba(99, 102, 241, 0.07), transparent),
    linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.hero-copy .hero-lead {
  margin: 0 0 1.75rem;
  max-width: none;
  text-align: left;
}

.hero-copy .hero-actions {
  justify-content: flex-start;
}

.hero-copy h1 {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
  max-width: none;
  font-size: clamp(2.35rem, 4.5vw, 3.35rem);
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-trust li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
}

.hero-visual { position: relative; }

.hero-banner {
  width: 100%;
  height: auto;
  margin: 0;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -2rem 0 auto;
  height: 420px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(37, 99, 235, 0.08), transparent),
    radial-gradient(ellipse 50% 40% at 90% 20%, rgba(99, 102, 241, 0.05), transparent);
  pointer-events: none;
  z-index: -1;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.25rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0 0 1.25rem;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 3rem 0;
}

.feature-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.feature-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 800;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* CTA band */
.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 2rem 2.25rem;
  background: var(--sidebar);
  color: #fff;
  border-radius: var(--radius);
  margin-top: 1rem;
}

.cta-band h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.cta-band p {
  margin: 0;
  color: var(--sidebar-text);
  font-size: 0.9375rem;
}

.cta-band .btn-primary {
  background: #fff;
  color: var(--sidebar);
  box-shadow: none;
  flex-shrink: 0;
}

.cta-band .btn-primary:hover {
  background: var(--bg-subtle);
  color: var(--sidebar);
}

/* Marketing sections */
.section {
  padding: 4.5rem 0;
}

.section-muted {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-intro {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.65;
}

.section-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.section-copy h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-copy p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.section-copy p:last-child { margin-bottom: 0; }

.container-narrow { width: min(760px, 92%); margin: 0 auto; }

.trust-bar {
  background: var(--sidebar);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.trust-bar-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 1.35rem 0;
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.trust-item strong {
  font-size: 0.9375rem;
  font-weight: 700;
}

.trust-item span {
  font-size: 0.8125rem;
  color: var(--sidebar-text);
}

.problem-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.problem-list li {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm);
}

.problem-list strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.975rem;
}

.problem-list span {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.step-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 800;
}

.step-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.step-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.features-marketing {
  margin: 0;
}

.features-marketing .feature-icon {
  width: 2.75rem;
  height: 2.75rem;
  font-size: inherit;
}

.features-marketing .feature-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.audience-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.audience-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.faq-list { margin: 0; }

.faq-item {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child { padding-top: 0; }
.faq-item:last-child { border-bottom: none; padding-bottom: 0; }

.faq-item dt {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.faq-item dd {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 0.9375rem;
}

.cta-band-marketing {
  margin: 0;
  border-radius: 0;
  padding: 0;
  background: linear-gradient(135deg, #1e3a8a 0%, var(--sidebar) 55%, #1e293b 100%);
}

.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 3.5rem 0;
}

.cta-band-marketing h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.cta-band-marketing p {
  font-size: 1rem;
  max-width: 520px;
}

/* Contact page */
.contact-section {
  padding: 3.5rem 0 4.5rem;
  background:
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(37, 99, 235, 0.06), transparent),
    var(--bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-intro h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.contact-intro > p {
  margin: 0 0 1.5rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.contact-benefits {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.contact-benefits li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
}

.contact-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.contact-note { margin-top: 0.5rem; }

.contact-steps {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.contact-steps li + li { margin-top: 0.5rem; }

.contact-form-card .card-title { font-size: 1.15rem; }

.label-optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* Cards */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.card-elevated {
  box-shadow: var(--shadow);
  border-color: transparent;
}

.card-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
}

.card-desc {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.card-desc.preserve { white-space: pre-wrap; }

/* Forms */
.form-stack { display: grid; gap: 0.25rem; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group { margin-bottom: 1rem; }

.form-group label,
.field-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.field-hint {
  display: block;
  margin-top: 0.3rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.form-group input,
.form-group textarea,
.form-group select,
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-errors {
  color: var(--danger);
  font-size: 0.8125rem;
  margin-top: 0.35rem;
}

.form-errors ul { margin: 0; padding-left: 1.1rem; }

/* SweetAlert2 — site toasts */
.site-toast {
  font-family: var(--font) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 0.85rem 1rem !important;
  border: 1px solid var(--border) !important;
}

.site-toast-title {
  font-size: 0.9375rem !important;
  font-weight: 500 !important;
  color: var(--text) !important;
  margin: 0 !important;
}

.site-toast .swal2-icon {
  margin: 0 0.65rem 0 0 !important;
  transform: scale(0.75) !important;
}

.site-toast .swal2-html-container {
  margin: 0 !important;
}

.site-toast-progress {
  background: var(--accent) !important;
}

/* Auth */
.auth-layout {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.auth-logo {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.auth-card { width: min(440px, 100%); }
.auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Client dashboard */
.site-list { display: grid; gap: 0.85rem; }

.site-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.site-card h3 { margin: 0 0 0.15rem; font-size: 1.05rem; }
.site-meta { margin: 0; color: var(--text-muted); font-size: 0.875rem; }
.site-card-actions { display: flex; align-items: center; gap: 0.75rem; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-live, .badge-active { background: var(--success-soft); color: var(--success); }
.badge-off, .badge-cancelled, .badge-past_due, .badge-paused { background: var(--danger-soft); color: var(--danger); }
.badge-trial { background: var(--warning-soft); color: var(--warning); }

/* Detail layouts */
.detail-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.detail-list { margin: 0; }

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.detail-item:last-child { border-bottom: none; }
.detail-item dt { color: var(--text-muted); font-size: 0.875rem; font-weight: 500; }
.detail-item dd { margin: 0; text-align: right; font-weight: 500; word-break: break-word; }

.notice {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--warning-soft);
  border-radius: var(--radius-sm);
  color: #92400e;
  font-size: 0.875rem;
}

.code-box, .code-block {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.8125rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  word-break: break-all;
  color: var(--text-secondary);
}

.code-block { overflow-x: auto; line-height: 1.55; white-space: pre; }

.code-block-scroll {
  max-height: 28rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.empty-state { text-align: center; padding: 3rem 1.5rem; }
.empty-state h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.empty-state p { margin: 0 0 1.25rem; color: var(--text-secondary); }

/* Control panel layout */
.control-layout {
  display: flex;
  min-height: 100vh;
  flex: 1;
}

.control-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.75rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1rem;
}

.sidebar-logo {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.sidebar-brand strong {
  display: block;
  font-size: 0.9375rem;
}

.sidebar-brand span {
  display: block;
  font-size: 0.75rem;
  color: var(--sidebar-text);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.sidebar-link {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sidebar-link.active {
  background: rgba(37, 99, 235, 0.2);
  color: var(--sidebar-active);
}

.sidebar-link.muted { font-size: 0.8125rem; }

.sidebar-footer {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.control-main {
  flex: 1;
  background: var(--bg);
  overflow-x: auto;
}

.control-content {
  padding: 2rem 2.5rem 3rem;
  max-width: 1200px;
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat-value.stat-live { color: var(--success); }
.stat-value.stat-off { color: var(--danger); }
.stat-label { color: var(--text-muted); font-size: 0.8125rem; font-weight: 500; }

/* Tables */
.table-wrap {
  padding: 0;
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.data-table th,
.data-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #fafbfc; }

.table-meta { color: var(--text-muted); font-size: 0.8125rem; }
.table-link { color: var(--text); font-weight: 600; }
.table-link:hover { color: var(--accent); }
.table-actions { text-align: right; white-space: nowrap; }

/* Mini list */
.mini-list { display: grid; gap: 0.5rem; }

.mini-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0.85rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9375rem;
}

.mini-list-item:hover { background: var(--accent-soft); color: var(--accent); }

.pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.pagination-info {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Billing — payment method */
.payment-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.payment-card-visual {
  position: relative;
  padding: 1.35rem 1.5rem;
  min-height: 168px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 45%, #6366f1 100%);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.28);
  overflow: hidden;
}

.payment-card-visual--past-due {
  background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 45%, #ea580c 100%);
  box-shadow: 0 16px 40px rgba(220, 38, 38, 0.25);
}

.payment-card-visual::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.payment-card-visual::after {
  content: "";
  position: absolute;
  inset: -30% auto auto -10%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.payment-card-chip {
  width: 42px;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  margin-bottom: 1.75rem;
  position: relative;
  z-index: 1;
}

.payment-card-brand {
  position: absolute;
  top: 1.35rem;
  right: 1.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.95;
  z-index: 1;
}

.payment-card-number {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
}

.payment-card-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 1.25rem;
  font-size: 0.8rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.payment-card-meta span {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
  margin-bottom: 0.15rem;
}

.payment-card-meta strong {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.payment-secure-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.payment-secure-note svg {
  flex-shrink: 0;
  color: var(--success);
}

.payment-panel-empty {
  padding: 0.25rem 0;
}

.payment-plan-summary {
  padding: 1.25rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.payment-plan-summary .payment-plan-name {
  display: block;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.payment-plan-summary p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* SweetAlert2 — billing modals */
.billing-swal-popup {
  width: min(520px, 94vw) !important;
  padding: 1.75rem 1.75rem 1.5rem !important;
  border-radius: 16px !important;
  font-family: var(--font) !important;
  box-shadow: var(--shadow-lg) !important;
}

.billing-swal-title {
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  letter-spacing: -0.02em !important;
}

.billing-swal-body {
  margin: 0.75rem 0 0 !important;
  text-align: left !important;
  color: var(--text-secondary) !important;
}

.billing-swal-lead {
  margin: 0 0 1.15rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.billing-card-form {
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-subtle) 100%);
}

.billing-card-form-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.billing-card-form-header strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.billing-card-form-header span {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 400;
}

.billing-card-form-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.billing-swal-card-mount {
  min-height: 52px;
  padding: 0.15rem 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.billing-card-brands {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.billing-card-brands span {
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-white);
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.billing-swal-footnote {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.billing-swal-footnote svg {
  flex-shrink: 0;
  color: var(--success);
}

.billing-swal-actions {
  gap: 0.65rem !important;
  margin-top: 1.35rem !important;
}

.billing-swal-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 7rem;
  padding: 0.65rem 1.15rem !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font) !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.billing-swal-btn-primary {
  background: var(--accent) !important;
  color: #fff !important;
}

.billing-swal-btn-primary:hover {
  background: var(--accent-hover) !important;
}

.billing-swal-btn-secondary {
  background: var(--bg-subtle) !important;
  color: var(--text-secondary) !important;
}

.billing-swal-btn-secondary:hover {
  background: var(--border) !important;
  color: var(--text) !important;
}

.billing-swal-btn-danger {
  background: var(--danger) !important;
  color: #fff !important;
}

.billing-swal-btn-danger:hover {
  background: #b91c1c !important;
}

.billing-swal-popup .swal2-validation-message {
  margin-top: 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.875rem;
}

.billing-swal-popup .swal2-icon {
  margin: 0.5rem auto 0.75rem !important;
  transform: scale(0.9);
}

/* Site unavailable page */
.offline-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 90% 60% at 50% -20%, rgba(37, 99, 235, 0.18), transparent),
    linear-gradient(180deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
  color: #f8fafc;
}

.offline-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.offline-card {
  width: min(520px, 100%);
  padding: 2.5rem 2rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  text-align: center;
}

.offline-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
}

.offline-logo {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  object-fit: contain;
}

.offline-brand-text {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #e2e8f0;
}

.offline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
}

.offline-preview-badge {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.2);
  color: #fcd34d;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.offline-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.offline-title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}

.offline-message {
  margin: 0 auto 1.75rem;
  max-width: 38ch;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #cbd5e1;
}

.offline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.offline-page .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.offline-page .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.offline-owner-hint {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.5;
}

.offline-footer {
  margin-top: 2rem;
  text-align: center;
}

.offline-footer p {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748b;
}

.offline-footer strong {
  color: #94a3b8;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 900px) {
  .control-layout { flex-direction: column; }
  .control-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 1rem;
  }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .control-content { padding: 1.25rem; }
  .hero-grid,
  .section-split,
  .contact-grid,
  .steps,
  .trust-bar-inner,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-marketing { padding: 2.5rem 0 3rem; }
  .hero-copy h1,
  .hero-copy .hero-lead,
  .hero-copy .hero-actions { text-align: center; }
  .hero-copy .hero-actions { justify-content: center; }
  .hero-trust { justify-content: center; }
  .section { padding: 3rem 0; }
  .cta-band-inner { padding: 2.5rem 0; }
}

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 2.5rem 0 2rem; }
  .cta-band { padding: 1.5rem; }
  .trust-bar-inner { gap: 1rem; }
  .nav-links { gap: 0.85rem; }
}
