/* ═══════════════════════════════════════════════════════════════
   Mailantis · App Design System
   Aligned to brand book (mailantis-website/brand/BRANDBOOK.md, v1.0).
   Brand: Navy #0A1628 · Blue #1D4ED8 · Cyan #0EA5E9
   Fonts: DM Sans (UI) · DM Mono (mono, eyebrows, captions)
   Sidebar is always Navy in both themes (brand-chrome).
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@200;300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* ─── Brand · Neutrals · Status (theme-independent) ─── */
:root {
  /* Brand */
  --brand-navy:       #0A1628;
  --brand-navy-deep:  #060D18;
  --brand-blue:       #1D4ED8;
  --brand-blue-light: #3B82F6;
  --brand-cyan:       #0EA5E9;
  --brand-cyan-soft:  #38BDF8;
  --brand-blue-glow:  rgba(29,78,216,0.15);

  /* Neutrals (brand-book) */
  --off-white: #F5F7FB;
  --ink-50:    #F8FAFC;
  --ink-100:   #F1F5F9;
  --ink-200:   #E2E8F0;
  --ink-300:   #CBD5E1;
  --ink-400:   #94A3B8;
  --ink-500:   #64748B;
  --ink-600:   #475569;
  --ink-700:   #334155;
  --ink-800:   #1E293B;
  --ink-900:   #0F172A;

  /* Status */
  --green:        #16A34A;
  --green-soft:   #4ADE80;
  --yellow:       #CA8A04;
  --yellow-soft:  #FACC15;
  --orange:       #EA580C;
  --orange-soft:  #FB923C;
  --red:          #DC2626;
  --red-soft:     #F87171;
  --cyan:         #0EA5E9;
  --purple:       #7C3AED;
  --purple-soft:  #A78BFA;

  /* Radii (brand-book) */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-xl:   28px;
  --radius-full: 999px;

  /* Spacing scale (4-pt baseline) */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;

  /* Type scale (fixed for app — product register) */
  --text-display: 32px;
  --text-h1:      26px;
  --text-h2:      20px;
  --text-h3:      17px;
  --text-h4:      15px;
  --text-body:    14px;
  --text-small:   13px;
  --text-xs:      11.5px;
  --text-caption: 11px;

  /* Fonts */
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Motion */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast:    120ms;
  --dur-base:    200ms;
  --dur-slow:    360ms;

  /* Layout */
  --sidebar-width: 248px;
  --topbar-h:      56px;
  --content-max:   1400px;

  /* Z-index */
  --z-header: 100;
  --z-drawer: 200;
  --z-modal:  500;
  --z-toast:  9000;
  --z-impersonation: 9999;
}

/* ─── Light Theme (default) ─── */
:root,
[data-theme="light"] {
  --bg-root:           var(--off-white);
  --bg-surface:        #FFFFFF;
  --bg-surface-raised: #FFFFFF;
  --bg-surface-hover:  var(--ink-50);
  --bg-inset:          var(--ink-50);
  --bg-overlay:        rgba(10, 22, 40, 0.55);
  /* Page-shell background used by auth pages and standalone modals
     (.ed-modal in alerts.html/spf-analyzer.html, .alert-detail-panel, etc).
     Without this alias those elements render with a transparent background
     and the modal-overlay bleeds through. */
  --bg-canvas:         var(--bg-root);

  --border-subtle:  var(--ink-200);
  --border-default: var(--ink-300);
  --border-strong:  var(--ink-400);
  --border-brand:   rgba(29, 78, 216, 0.28);

  --tx-primary:   var(--ink-900);
  --tx-secondary: var(--ink-600);
  --tx-tertiary:  var(--ink-500);
  --tx-muted:     var(--ink-400);
  --tx-inverse:   #FFFFFF;
  --tx-brand:     var(--brand-blue);

  --link:       var(--brand-blue);
  --link-hover: var(--brand-blue-light);

  /* Status tints (light) */
  --green-bg:     rgba(22, 163, 74, 0.10);
  --green-border: rgba(22, 163, 74, 0.28);
  --yellow-bg:    rgba(202, 138, 4, 0.10);
  --yellow-border:rgba(202, 138, 4, 0.28);
  --orange-bg:    rgba(234, 88, 12, 0.10);
  --orange-border:rgba(234, 88, 12, 0.28);
  --red-bg:       rgba(220, 38, 38, 0.10);
  --red-border:   rgba(220, 38, 38, 0.28);
  --cyan-bg:      rgba(14, 165, 233, 0.10);
  --cyan-border:  rgba(14, 165, 233, 0.28);
  --purple-bg:    rgba(124, 58, 237, 0.10);
  --purple-border:rgba(124, 58, 237, 0.28);

  /* Shadows — bumped from brand spec so cards stay distinct on Off-White. */
  --shadow-sm:    0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md:    0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-lg:    0 18px 40px rgba(15, 23, 42, 0.12);
  --shadow-glow:  0 8px 24px rgba(29, 78, 216, 0.18),
                  0 0 0 1px rgba(14, 165, 233, 0.18);
  --shadow-card-hover: 0 10px 28px rgba(15, 23, 42, 0.10),
                       0 0 0 1px rgba(14, 165, 233, 0.18),
                       0 0 32px rgba(14, 165, 233, 0.10);

  /* Grid pattern (page-header decoration) */
  --grid-line: rgba(10, 22, 40, 0.04);
  --hero-glow: rgba(14, 165, 233, 0.18);
}

/* ─── Dark Theme ─── */
[data-theme="dark"] {
  --bg-root:           var(--brand-navy-deep);
  --bg-surface:        #0C1526;
  --bg-surface-raised: #111D33;
  --bg-surface-hover:  #15213A;
  --bg-inset:          #0A1221;
  --bg-overlay:        rgba(0, 0, 0, 0.65);
  --bg-canvas:         var(--bg-root);

  --border-subtle:  #1A2744;
  --border-default: #243352;
  --border-strong:  #334766;
  --border-brand:   rgba(59, 130, 246, 0.35);

  --tx-primary:   #E2E8F0;
  --tx-secondary: #94A3B8;
  --tx-tertiary:  #64748B;
  --tx-muted:     #475569;
  --tx-inverse:   var(--ink-900);
  --tx-brand:     var(--brand-blue-light);

  --link:       var(--brand-blue-light);
  --link-hover: var(--brand-cyan);

  --green-bg:     rgba(22, 163, 74, 0.15);
  --green-border: rgba(22, 163, 74, 0.32);
  --yellow-bg:    rgba(202, 138, 4, 0.15);
  --yellow-border:rgba(202, 138, 4, 0.32);
  --orange-bg:    rgba(234, 88, 12, 0.15);
  --orange-border:rgba(234, 88, 12, 0.32);
  --red-bg:       rgba(220, 38, 38, 0.15);
  --red-border:   rgba(220, 38, 38, 0.32);
  --cyan-bg:      rgba(14, 165, 233, 0.12);
  --cyan-border:  rgba(14, 165, 233, 0.30);
  --purple-bg:    rgba(124, 58, 237, 0.15);
  --purple-border:rgba(124, 58, 237, 0.32);

  --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow-md:    0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg:    0 24px 60px rgba(0, 0, 0, 0.45);
  --shadow-glow:  0 8px 28px rgba(29, 78, 216, 0.45),
                  0 0 0 1px rgba(14, 165, 233, 0.28);
  --shadow-card-hover: 0 12px 32px rgba(0, 0, 0, 0.45),
                       0 0 0 1px rgba(14, 165, 233, 0.32),
                       0 0 40px rgba(14, 165, 233, 0.18);

  --grid-line: rgba(255, 255, 255, 0.035);
  --hero-glow: rgba(14, 165, 233, 0.28);
}

/* Auto-theme when no data-theme is set */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg-root: var(--brand-navy-deep);
    --bg-surface: #0C1526;
    --bg-surface-raised: #111D33;
    --bg-surface-hover: #15213A;
    --bg-inset: #0A1221;
    --bg-overlay: rgba(0, 0, 0, 0.65);
    --bg-canvas: var(--bg-root);
    --border-subtle: #1A2744;
    --border-default: #243352;
    --border-strong: #334766;
    --tx-primary: #E2E8F0;
    --tx-secondary: #94A3B8;
    --tx-tertiary: #64748B;
    --tx-muted: #475569;
    --tx-brand: var(--brand-blue-light);
  }
}


/* ════════════════════════════════════════════════════════════════
   Reset
   ════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 4; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.55;
  color: var(--tx-primary);
  background: var(--bg-root);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: var(--link); text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--link-hover); }
:focus-visible {
  outline: 2px solid var(--brand-blue-light);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection { background: rgba(14, 165, 233, 0.25); color: inherit; }


/* ════════════════════════════════════════════════════════════════
   App shell
   ════════════════════════════════════════════════════════════════ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar (always Navy — brand chrome) ─── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--brand-navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: var(--z-header);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform var(--dur-slow) var(--ease-out);
  isolation: isolate;
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 30% at 50% 0%, rgba(14, 165, 233, 0.10), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.sidebar-brand {
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar-brand a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.sidebar-logo-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.sidebar-wordmark {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 300;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}
.sidebar-wordmark b {
  font-weight: 500;
  color: #FFFFFF;
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-3) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 3px; }

.nav-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  padding: var(--space-5) var(--space-3) var(--space-2);
}
.nav-section-label:first-child { padding-top: var(--space-3); }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px var(--space-3);
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.70);
  text-decoration: none;
  font-size: var(--text-small);
  font-weight: 400;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  position: relative;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
}
.nav-item.active {
  background: rgba(29, 78, 216, 0.20);
  color: #FFFFFF;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: linear-gradient(180deg, var(--brand-cyan), var(--brand-blue-light));
  border-radius: 0 3px 3px 0;
}
.nav-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.65;
  stroke-width: 1.75;
}
.nav-item:hover svg,
.nav-item.active svg { opacity: 1; }

.nav-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  background: var(--red);
  color: white;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
  letter-spacing: 0;
}

/* Sidebar footer (user) */
.sidebar-footer {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.sidebar-user:hover { background: rgba(255, 255, 255, 0.05); }
.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(14, 165, 233, 0.25));
  color: #BFDBFE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: var(--text-small);
  font-weight: 500;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

/* "Made in EU" anchor at the very bottom — brand persistence */
.sidebar-anchor {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: var(--radius-full);
  justify-content: center;
}
.sidebar-anchor .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-cyan);
  box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7);
  animation: pulseDot 2.4s var(--ease-out) infinite;
  flex-shrink: 0;
}


/* ─── Main content ─── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Topbar ─── */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
}
.topbar-left { display: flex; align-items: center; gap: var(--space-4); }
.topbar-right { display: flex; align-items: center; gap: var(--space-2); }

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-small);
  color: var(--tx-tertiary);
}
.topbar-breadcrumb a {
  color: var(--tx-tertiary);
  text-decoration: none;
  font-weight: 400;
  transition: color var(--dur-fast) var(--ease-out);
}
.topbar-breadcrumb a:hover { color: var(--tx-primary); }
.topbar-breadcrumb .sep { opacity: 0.4; }
.topbar-breadcrumb .current {
  color: var(--tx-primary);
  font-weight: 500;
}

/* Topbar live-pill (Made in EU · Hosted in EU) */
.topbar-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--brand-cyan);
  background: var(--cyan-bg);
  border: 1px solid var(--cyan-border);
  padding: 5px 12px 5px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.topbar-live .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-cyan);
  box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.65);
  animation: pulseDot 2.4s var(--ease-out) infinite;
  flex-shrink: 0;
}
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(14, 165, 233, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}
@media (max-width: 720px) {
  .topbar-live span:not(.status-dot) { display: none; }
  .topbar-live { padding: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .topbar-live .status-dot,
  .sidebar-anchor .status-dot,
  .badge .status-dot { animation: none; }
}

/* ─── Page content ─── */
.page-content {
  flex: 1;
  padding: var(--space-6) var(--space-6) var(--space-8);
  max-width: var(--content-max);
  width: 100%;
}


/* ════════════════════════════════════════════════════════════════
   Page header (editorial: eyebrow + h1 + lead)
   The grid + radial cyan glow carries the website's hero language
   into every app page automatically.
   ════════════════════════════════════════════════════════════════ */
.page-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-5) var(--space-5) var(--space-6);
  margin: calc(-1 * var(--space-6)) calc(-1 * var(--space-6)) var(--space-6);
  flex-wrap: wrap;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}
.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 50% 70% at 92% 50%, var(--hero-glow), transparent 65%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: -1;
}
.page-header-text {
  position: relative;
  min-width: 0;
  z-index: 1;
}
.page-header > .page-actions {
  position: relative;
  z-index: 1;
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-cyan);
  background: var(--cyan-bg);
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius-full);
  padding: 4px 12px 4px 9px;
  margin-bottom: 14px;
}
.page-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-cyan);
  box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.65);
  animation: pulseDot 2.4s var(--ease-out) infinite;
  flex-shrink: 0;
}
.page-eyebrow.plain {
  background: transparent;
  border-color: transparent;
  padding: 0;
  margin-bottom: 10px;
}
.page-eyebrow.plain::before { display: none; }

.page-title {
  font-family: var(--font-sans);
  font-size: 30px;
  font-weight: 600;
  color: var(--tx-primary);
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: balance;
}
.page-subtitle {
  font-size: 15px;
  color: var(--tx-secondary);
  margin-top: 8px;
  max-width: 60ch;
  line-height: 1.5;
  text-wrap: pretty;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* Compact variant — for nested sections / deep-dive pages */
.page-header.compact {
  padding: var(--space-4) 0 var(--space-5);
  margin: 0 0 var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
}
.page-header.compact::before { display: none; }
.page-header.compact .page-title { font-size: var(--text-h1); }
.page-header.compact .page-eyebrow { margin-bottom: 10px; }


/* ════════════════════════════════════════════════════════════════
   Typography utilities (eyebrow, headings inside cards)
   ════════════════════════════════════════════════════════════════ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tx-tertiary);
}
.eyebrow-cyan { color: var(--brand-cyan); }
.eyebrow-brand { color: var(--brand-blue); }

h1, .h1 { font-family: var(--font-sans); font-size: var(--text-h1); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; color: var(--tx-primary); }
h2, .h2 { font-family: var(--font-sans); font-size: var(--text-h2); font-weight: 600; letter-spacing: -0.018em; line-height: 1.25; color: var(--tx-primary); }
h3, .h3 { font-family: var(--font-sans); font-size: var(--text-h3); font-weight: 600; letter-spacing: -0.012em; line-height: 1.3; color: var(--tx-primary); }
h4, .h4 { font-family: var(--font-sans); font-size: var(--text-h4); font-weight: 600; letter-spacing: -0.008em; line-height: 1.35; color: var(--tx-primary); }


/* ════════════════════════════════════════════════════════════════
   Cards
   ════════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.card-title {
  font-family: var(--font-sans);
  font-size: var(--text-h4);
  font-weight: 600;
  color: var(--tx-primary);
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.card-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tx-tertiary);
  margin-bottom: 4px;
  display: block;
}
.card-value {
  font-family: var(--font-sans);
  font-size: var(--text-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--tx-primary);
}
.card-meta {
  font-size: var(--text-caption);
  color: var(--tx-tertiary);
  margin-top: 6px;
  line-height: 1.5;
}


/* ════════════════════════════════════════════════════════════════
   KPI grid (eyebrow + icon-square + display value)
   ════════════════════════════════════════════════════════════════ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.kpi-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cyan-bg);
  color: var(--brand-cyan);
}
.kpi-icon svg { width: 18px; height: 18px; stroke-width: 1.75; }

.kpi-card[data-accent="blue"]   .kpi-icon { background: rgba(29, 78, 216, 0.10); color: var(--brand-blue); }
.kpi-card[data-accent="green"]  .kpi-icon { background: var(--green-bg);  color: var(--green); }
.kpi-card[data-accent="yellow"] .kpi-icon { background: var(--yellow-bg); color: var(--yellow); }
.kpi-card[data-accent="orange"] .kpi-icon { background: var(--orange-bg); color: var(--orange); }
.kpi-card[data-accent="red"]    .kpi-icon { background: var(--red-bg);    color: var(--red); }
.kpi-card[data-accent="cyan"]   .kpi-icon { background: var(--cyan-bg);   color: var(--cyan); }
.kpi-card[data-accent="purple"] .kpi-icon { background: var(--purple-bg); color: var(--purple); }

.kpi-label {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--tx-tertiary);
  margin: 0;
}
.kpi-value {
  font-family: var(--font-sans);
  font-size: var(--text-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.0;
  color: var(--tx-primary);
}
.kpi-card[data-accent="blue"]   .kpi-value { color: var(--brand-blue); }
.kpi-card[data-accent="green"]  .kpi-value { color: var(--green); }
.kpi-card[data-accent="yellow"] .kpi-value { color: var(--yellow); }
.kpi-card[data-accent="orange"] .kpi-value { color: var(--orange); }
.kpi-card[data-accent="red"]    .kpi-value { color: var(--red); }
.kpi-card[data-accent="cyan"]   .kpi-value { color: var(--cyan); }
.kpi-card[data-accent="purple"] .kpi-value { color: var(--purple); }

.kpi-change {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.kpi-change.up   { background: var(--green-bg); color: var(--green); }
.kpi-change.down { background: var(--red-bg);   color: var(--red); }

/* Linked KPI card — used as <a> from JS */
.kpi-card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.kpi-card-link:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--brand-cyan) 50%, var(--border-subtle));
  box-shadow: var(--shadow-card-hover);
}
.kpi-card-link .kpi-goto {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--brand-cyan);
  margin-top: auto;
  opacity: 0;
  transform: translateX(-2px);
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.kpi-card-link:hover .kpi-goto {
  opacity: 1;
  transform: translateX(0);
}
@media (prefers-reduced-motion: reduce) {
  .kpi-card-link:hover { transform: none; }
  .kpi-card-link:hover .kpi-goto { transform: none; }
}


/* ════════════════════════════════════════════════════════════════
   Data table
   ════════════════════════════════════════════════════════════════ */
.table-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  flex-wrap: wrap;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-small);
}
table.data-table thead th {
  text-align: left;
  padding: 11px var(--space-5);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--tx-tertiary);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
table.data-table tbody td {
  padding: 13px var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--tx-secondary);
  vertical-align: middle;
}
table.data-table tbody tr:last-child td { border-bottom: none; }
table.data-table tbody tr {
  transition: background var(--dur-fast) var(--ease-out);
}
table.data-table tbody tr:hover {
  background: var(--bg-inset);
}
table.data-table tbody tr.clickable { cursor: pointer; }
table.data-table tbody tr.clickable:hover {
  background: color-mix(in oklab, var(--brand-cyan) 4%, var(--bg-inset));
}

.td-domain {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--tx-primary);
}
.td-ip {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--tx-secondary);
}


/* ════════════════════════════════════════════════════════════════
   Badges
   ════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: var(--text-caption);
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-active     { background: var(--green-bg);  color: var(--green);  border-color: var(--green-border); }
.badge-pending    { background: var(--yellow-bg); color: var(--yellow); border-color: var(--yellow-border); }
.badge-error      { background: var(--red-bg);    color: var(--red);    border-color: var(--red-border); }
.badge-reject     { background: var(--green-bg);  color: var(--green);  border-color: var(--green-border); }
.badge-quarantine { background: var(--yellow-bg); color: var(--yellow); border-color: var(--yellow-border); }
.badge-none       { background: var(--orange-bg); color: var(--orange); border-color: var(--orange-border); }
.badge-info       { background: var(--cyan-bg);   color: var(--brand-cyan); border-color: var(--cyan-border); }
.badge-purple     { background: var(--purple-bg); color: var(--purple); border-color: var(--purple-border); }
.badge-neutral    { background: var(--bg-inset);  color: var(--tx-tertiary); border-color: var(--border-subtle); }

.badge-role-superadmin { background: var(--purple-bg); color: var(--purple); border-color: var(--purple-border); }
.badge-role-owner      { background: rgba(29, 78, 216, 0.10); color: var(--brand-blue); border-color: var(--border-brand); }
.badge-role-admin      { background: var(--green-bg);  color: var(--green); border-color: var(--green-border); }
.badge-role-viewer     { background: var(--bg-inset); color: var(--tx-tertiary); border-color: var(--border-subtle); }

[data-theme="dark"] .badge-role-superadmin { color: var(--purple-soft); }
[data-theme="dark"] .badge-role-owner      { color: var(--brand-blue-light); }
[data-theme="dark"] .badge-role-admin      { color: var(--green-soft); }


/* ════════════════════════════════════════════════════════════════
   Buttons
   ════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 500;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.3;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
.btn svg { width: 15px; height: 15px; stroke-width: 1.75; flex-shrink: 0; }

.btn-primary {
  background: var(--brand-blue);
  color: #FFFFFF;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.20),
              inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn-primary:hover {
  background: var(--brand-blue-light);
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.30),
              inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--tx-primary);
  border-color: var(--border-default);
}
.btn-secondary:hover {
  background: var(--bg-inset);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--tx-secondary);
  padding: 8px 12px;
}
.btn-ghost:hover {
  background: var(--bg-inset);
  color: var(--tx-primary);
}

.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: var(--red-border);
}
.btn-danger:hover {
  background: var(--red);
  color: white;
  border-color: var(--red);
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--tx-tertiary);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover {
  background: var(--bg-inset);
  color: var(--tx-primary);
  border-color: var(--border-default);
}


/* ════════════════════════════════════════════════════════════════
   Forms
   ════════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: var(--space-4); }
.form-label {
  display: block;
  font-size: var(--text-caption);
  font-weight: 500;
  color: var(--tx-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.form-hint {
  font-size: var(--text-caption);
  color: var(--tx-muted);
  margin-top: 6px;
  line-height: 1.5;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: var(--text-small);
  color: var(--tx-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}
.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: var(--border-strong);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px var(--brand-blue-glow);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--tx-muted); }
.form-input-mono {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.02em;
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}


/* ════════════════════════════════════════════════════════════════
   Toast
   ════════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.toast {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: var(--text-small);
  font-weight: 500;
  color: #FFFFFF;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.35s var(--ease-out);
  max-width: 380px;
}
.toast-success { background: var(--green); }
.toast-error   { background: var(--red); }
.toast-info    { background: var(--brand-blue); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}


/* ════════════════════════════════════════════════════════════════
   Modal
   ════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.18s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: var(--space-4);
}
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.28s var(--ease-out);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-5) 0;
}
.modal-title {
  font-family: var(--font-sans);
  font-size: var(--text-h3);
  font-weight: 600;
  color: var(--tx-primary);
  letter-spacing: -0.015em;
}
.modal-body { padding: var(--space-5); }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border-subtle);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}


/* ════════════════════════════════════════════════════════════════
   Stepper (wizard)
   ════════════════════════════════════════════════════════════════ */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: var(--space-6);
}
.step { display: flex; align-items: center; gap: 10px; }
.step-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  border: 1.5px solid var(--border-default);
  color: var(--tx-muted);
  background: var(--bg-surface);
  flex-shrink: 0;
  transition: all var(--dur-slow) var(--ease-out);
}
.step.active .step-circle {
  border-color: var(--brand-blue);
  background: var(--brand-blue);
  color: #FFFFFF;
}
.step.done .step-circle {
  border-color: var(--green);
  background: var(--green);
  color: #FFFFFF;
}
.step-label {
  font-size: var(--text-caption);
  font-weight: 500;
  color: var(--tx-muted);
}
.step.active .step-label { color: var(--tx-primary); }
.step.done .step-label   { color: var(--green); }
.step-line {
  flex: 1;
  height: 1.5px;
  background: var(--border-default);
  margin: 0 12px;
  transition: background var(--dur-slow) var(--ease-out);
}
.step-line.done { background: var(--green); }


/* ════════════════════════════════════════════════════════════════
   Loading / skeleton / spinner
   ════════════════════════════════════════════════════════════════ */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--brand-cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--bg-inset) 25%, var(--bg-surface-hover) 50%, var(--bg-inset) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ════════════════════════════════════════════════════════════════
   Theme toggle
   ════════════════════════════════════════════════════════════════ */
.theme-toggle {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--tx-tertiary);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.theme-toggle:hover {
  background: var(--bg-inset);
  color: var(--tx-primary);
  border-color: var(--border-default);
}


/* ════════════════════════════════════════════════════════════════
   Empty state
   ════════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: var(--space-8) var(--space-5);
}
.empty-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--cyan-bg);
  color: var(--brand-cyan);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.empty-state-icon svg { width: 24px; height: 24px; stroke-width: 1.5; }
.empty-state-title {
  font-family: var(--font-sans);
  font-size: var(--text-h4);
  font-weight: 600;
  color: var(--tx-primary);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.empty-state-desc {
  font-size: var(--text-small);
  color: var(--tx-secondary);
  max-width: 380px;
  margin: 0 auto var(--space-5);
  line-height: 1.55;
  text-wrap: pretty;
}


/* ════════════════════════════════════════════════════════════════
   DNS record display
   ════════════════════════════════════════════════════════════════ */
.dns-record {
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--tx-secondary);
  line-height: 1.7;
  overflow-x: auto;
  position: relative;
}
.dns-record .highlight { color: var(--brand-blue); font-weight: 500; }
[data-theme="dark"] .dns-record .highlight { color: var(--brand-blue-light); }
.dns-record-copy {
  position: absolute;
  top: 8px;
  right: 8px;
}


/* ════════════════════════════════════════════════════════════════
   Status dots (used in tables, headers)
   ════════════════════════════════════════════════════════════════ */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.dot-green  { background: var(--green);  box-shadow: 0 0 6px rgba(22, 163, 74, 0.35); }
.dot-yellow { background: var(--yellow); box-shadow: 0 0 6px rgba(202, 138, 4, 0.35); }
.dot-red    { background: var(--red);    box-shadow: 0 0 6px rgba(220, 38, 38, 0.35); }
.dot-blue   { background: var(--brand-blue); }
.dot-cyan   { background: var(--brand-cyan); box-shadow: 0 0 6px rgba(14, 165, 233, 0.40); }
.dot-pulse  { animation: dotPulse 2s infinite; }
@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}


/* ════════════════════════════════════════════════════════════════
   Provider chip (mail-server icons)
   ════════════════════════════════════════════════════════════════ */
.provider-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: 0;
}
.provider-microsoft { background: rgba(0, 120, 215, 0.12); color: #0078D7; }
.provider-google    { background: rgba(66, 133, 244, 0.12); color: #4285F4; }
.provider-cloudflare{ background: rgba(245, 130, 32, 0.12); color: #F58220; }


/* ════════════════════════════════════════════════════════════════
   Onboarding wizard
   ════════════════════════════════════════════════════════════════ */
.wizard-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 680px;
  margin: 0 auto;
  overflow: hidden;
}
.wizard-header { padding: var(--space-5) var(--space-6) 0; }
.wizard-body   { padding: var(--space-5) var(--space-6); }
.wizard-footer {
  display: flex;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-inset);
}

/* Provider selection grid */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.provider-card {
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  cursor: pointer;
  background: var(--bg-surface);
  transition: border-color var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.provider-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-inset);
}
.provider-card.selected {
  border-color: var(--brand-blue);
  background: rgba(29, 78, 216, 0.04);
  box-shadow: 0 0 0 3px var(--brand-blue-glow);
}
[data-theme="dark"] .provider-card.selected { background: rgba(29, 78, 216, 0.10); }

.provider-card-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
}
.provider-card-name {
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--tx-primary);
}

/* Check result row (SPF/DKIM/DMARC check output) */
.check-result {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  border: 1px solid transparent;
}
.check-result.pass { background: var(--green-bg);  border-color: var(--green-border); }
.check-result.fail { background: var(--red-bg);    border-color: var(--red-border); }
.check-result.warn { background: var(--yellow-bg); border-color: var(--yellow-border); }
.check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  color: #FFFFFF;
}
.check-result.pass .check-icon { background: var(--green); }
.check-result.fail .check-icon { background: var(--red); }
.check-result.warn .check-icon { background: var(--yellow); }
.check-label {
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--tx-primary);
}
.check-detail {
  font-size: var(--text-caption);
  color: var(--tx-tertiary);
  margin-top: 2px;
  line-height: 1.55;
}


/* ════════════════════════════════════════════════════════════════
   Utilities
   ════════════════════════════════════════════════════════════════ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: var(--text-caption); }
.text-xs { font-size: 10.5px; }
.text-muted { color: var(--tx-muted); }
.text-secondary { color: var(--tx-secondary); }
.text-brand { color: var(--brand-blue); }
.text-cyan { color: var(--brand-cyan); }
.font-mono { font-family: var(--font-mono); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }

/* Click-to-copy feedback (used inline by JS for DNS records etc.) */
.copyable {
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              outline-color var(--dur-fast) var(--ease-out);
}
.copyable:hover { background: var(--bg-surface-hover) !important; }
.copyable.copy-flash {
  background: var(--green-bg) !important;
  outline: 1px solid var(--green-border);
}


/* ════════════════════════════════════════════════════════════════
   Chart container
   ════════════════════════════════════════════════════════════════ */
.chart-container {
  position: relative;
  width: 100%;
  height: 280px;
  padding: var(--space-4) 0;
}


/* ════════════════════════════════════════════════════════════════
   Responsive
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
  .topbar { padding: 0 var(--space-4); }
  .page-content { padding: var(--space-5) var(--space-4) var(--space-7); }
  .page-header {
    margin: calc(-1 * var(--space-5)) calc(-1 * var(--space-4)) var(--space-5);
    padding: var(--space-4) var(--space-4) var(--space-5);
  }
  .page-title { font-size: 26px; }
}
@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .page-content { padding: var(--space-4) var(--space-4) var(--space-6); }
  .grid-2 { grid-template-columns: 1fr; }
  .provider-grid { grid-template-columns: 1fr; }
  .page-header {
    flex-direction: column;
    margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) var(--space-4);
    padding: var(--space-4);
  }
  .page-title { font-size: 24px; }
  .page-actions { width: 100%; }
}
