/*
 * voltaris.css — VoltarisCloud Design System
 * ============================================
 * Single source of truth for all colour tokens, typography,
 * spacing, components and utility classes used across the
 * marketing site, customer portal, and admin panel.
 *
 * Colour palette extracted from voltariscloud-logo.svg and index.html:
 *   Navy family  — #0f172a  #1e293b  #334155
 *   Teal family  — #0d9488  #2dd4bf  #0f766e
 *   Sky          — #0ea5e9
 *   Slate        — #94a3b8  #cbd5e1  #e2e8f0  #f8fafc
 *
 * Usage:
 *   <link rel="stylesheet" href="/css/voltaris.css">
 */

/* ═══════════════════════════════════════════════════════
   1. DESIGN TOKENS  (CSS custom properties)
   ═══════════════════════════════════════════════════════ */
:root {
  /* ── Core palette ──────────────────────────────────── */
  --navy:       #0f172a;   /* page background */
  --navy2:      #1e293b;   /* card / surface background */
  --navy3:      #334155;   /* subtle border / muted surface */
  --navy4:      #475569;   /* disabled / placeholder */

  --teal:       #0d9488;   /* primary action, links, accents */
  --teal-l:     #2dd4bf;   /* highlighted text, gradient end */
  --teal-d:     #0f766e;   /* hover state for teal */
  --teal-ghost: rgba(13,148,136,0.12);  /* icon backgrounds */
  --teal-glow:  rgba(13,148,136,0.18);  /* hero radial gradient */

  --sky:        #0ea5e9;   /* secondary accent (info states) */
  --sky-ghost:  rgba(14,165,233,0.12);

  /* ── Text ─────────────────────────────────────────── */
  --text:       #e2e8f0;   /* body text */
  --text-muted: #94a3b8;   /* secondary / caption text */
  --text-faint: #64748b;   /* placeholder text */
  --white:      #f8fafc;   /* headings on dark bg */

  /* ── Borders ──────────────────────────────────────── */
  --border:     #1e293b;   /* default border */
  --border-l:   #334155;   /* hovered / focus border */

  /* ── Status colours ───────────────────────────────── */
  --green:      #22c55e;
  --green-ghost:rgba(34,197,94,0.12);
  --amber:      #f59e0b;
  --amber-ghost:rgba(245,158,11,0.12);
  --red:        #ef4444;
  --red-ghost:  rgba(239,68,68,0.12);

  /* ── Typography ───────────────────────────────────── */
  --font:       'Inter', 'Helvetica Neue', Arial, sans-serif;
  --mono:       'Fira Code', 'Cascadia Code', 'Consolas', monospace;

  /* ── Spacing scale ────────────────────────────────── */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;

  /* ── Radius ───────────────────────────────────────── */
  --r-sm:  6px;
  --r:     10px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-full:9999px;

  /* ── Shadows ──────────────────────────────────────── */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow:    0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --glow-teal: 0 0 20px rgba(13,148,136,0.3);

  /* ── Transitions ──────────────────────────────────── */
  --ease: 0.2s ease;
  --ease-slow: 0.35s ease;

  /* ── Layout ───────────────────────────────────────── */
  --max-w:     1200px;
  --page-px:   5%;
  --nav-h:     64px;
  --sidebar-w: 240px;
}


/* ═══════════════════════════════════════════════════════
   2. RESET & BASE
   ═══════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--navy);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--teal-l); }

img, svg { display: block; max-width: 100%; }

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font);
  font-size: inherit;
}

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  color: var(--white);
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.15;
}


/* ═══════════════════════════════════════════════════════
   3. TYPOGRAPHY SCALE
   ═══════════════════════════════════════════════════════ */
.text-xs    { font-size: 11px; }
.text-sm    { font-size: 13px; }
.text-base  { font-size: 15px; }
.text-lg    { font-size: 17px; }
.text-xl    { font-size: 20px; }
.text-2xl   { font-size: 24px; }
.text-3xl   { font-size: 30px; }

.text-white  { color: var(--white); }
.text-muted  { color: var(--text-muted); }
.text-teal   { color: var(--teal); }
.text-teal-l { color: var(--teal-l); }
.text-sky    { color: var(--sky); }
.text-green  { color: var(--green); }
.text-amber  { color: var(--amber); }
.text-red    { color: var(--red); }

.font-medium { font-weight: 500; }
.font-semi   { font-weight: 600; }
.font-mono   { font-family: var(--mono); }

.tracking-wide  { letter-spacing: 2px; }
.tracking-wider { letter-spacing: 3.5px; }
.uppercase      { text-transform: uppercase; }
.text-center    { text-align: center; }

/* Section label — e.g. "HOW IT WORKS" */
.label {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--teal);
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}

/* Hero eyebrow pill */
.eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--teal);
  border: 1px solid rgba(13,148,136,0.4);
  padding: 5px 14px;
  border-radius: var(--r-full);
  margin-bottom: var(--sp-6);
  text-transform: uppercase;
}


/* ═══════════════════════════════════════════════════════
   4. LAYOUT UTILITIES
   ═══════════════════════════════════════════════════════ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--page-px);
}

.section { padding: 100px var(--page-px); }
.section-sm { padding: 60px var(--page-px); }

.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-center{ justify-content: center; }
.justify-between{ justify-content: space-between; }
.flex-wrap     { flex-wrap: wrap; }
.flex-1        { flex: 1; }
.gap-1  { gap: var(--sp-1); }
.gap-2  { gap: var(--sp-2); }
.gap-3  { gap: var(--sp-3); }
.gap-4  { gap: var(--sp-4); }
.gap-6  { gap: var(--sp-6); }
.gap-8  { gap: var(--sp-8); }
.gap-10 { gap: var(--sp-10); }
.gap-12 { gap: var(--sp-12); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto-240 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-auto-280 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-auto-320 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.w-full  { width: 100%; }
.h-full  { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Spacing helpers */
.mt-1 { margin-top: var(--sp-1); }
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }
.p-4  { padding: var(--sp-4); }
.p-6  { padding: var(--sp-6); }
.p-8  { padding: var(--sp-8); }

.relative { position: relative; }
.absolute { position: absolute; }
.overflow-hidden { overflow: hidden; }


/* ═══════════════════════════════════════════════════════
   5. NAVIGATION
   ═══════════════════════════════════════════════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-px);
  height: var(--nav-h);
  background: rgba(15,23,42,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.logo-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1;
}

.logo-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.6px;
  line-height: 1;
}

.logo-bar {
  height: 2px;
  width: 142px;
  background: var(--teal);
  border-radius: 1px;
  margin-top: 3px;
}

.logo-sub {
  font-size: 7.5px;
  letter-spacing: 3.5px;
  color: var(--teal);
  margin-top: 2px;
  line-height: 1;
}

.nav-links {
  display: flex;
  gap: var(--sp-8);
  align-items: center;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color var(--ease);
}

.nav-links a:hover { color: var(--white); }

.nav-cta {
  background: var(--teal);
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--ease);
}

.nav-cta:hover { background: var(--teal-d) !important; }


/* ═══════════════════════════════════════════════════════
   6. BUTTONS
   ═══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--r-sm);
  transition: background var(--ease), opacity var(--ease), border-color var(--ease);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  font-family: var(--font);
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Primary — teal fill */
.btn-primary {
  background: var(--teal);
  color: var(--white);
}
.btn-primary:hover:not(:disabled) { background: var(--teal-d); }

/* Large primary (hero CTA) */
.btn-primary-lg {
  background: var(--teal);
  color: var(--white);
  font-size: 16px;
  padding: 16px 40px;
  border-radius: var(--r);
}
.btn-primary-lg:hover:not(:disabled) { background: var(--teal-d); }

/* Secondary — dark fill */
.btn-secondary {
  background: var(--navy3);
  color: var(--white);
}
.btn-secondary:hover:not(:disabled) { background: var(--navy4); }

/* Outline — teal border */
.btn-outline {
  border: 1px solid var(--teal);
  color: var(--teal);
  background: transparent;
  padding: 9px 19px;
}
.btn-outline:hover:not(:disabled) {
  background: var(--teal);
  color: var(--white);
}

/* Ghost — transparent */
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover:not(:disabled) { color: var(--white); background: var(--navy2); }

/* Danger */
.btn-danger {
  background: var(--red);
  color: var(--white);
}
.btn-danger:hover:not(:disabled) { opacity: 0.85; }

/* Icon button */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--r-sm);
}

/* Loading spinner inside button */
.btn .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}


/* ═══════════════════════════════════════════════════════
   7. FORM ELEMENTS
   ═══════════════════════════════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.form-label .required {
  color: var(--red);
  margin-left: 3px;
}

.form-input,
.form-select,
.form-textarea {
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--white);
  font-size: 15px;
  padding: 12px 16px;
  transition: border-color var(--ease);
  width: 100%;
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-faint); }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.15);
}

.form-input.error,
.form-select.error { border-color: var(--red); }

.form-error {
  font-size: 12px;
  color: var(--red);
  margin-top: var(--sp-1);
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: var(--sp-1);
}

.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 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-textarea { resize: vertical; min-height: 100px; }

/* Domain checker (hero) */
.domain-checker {
  display: flex;
  width: 100%;
  max-width: 560px;
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color var(--ease);
}

.domain-checker:focus-within { border-color: var(--teal); }

.domain-checker input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-size: 16px;
  padding: 16px 20px;
}

.domain-checker input::placeholder { color: var(--text-muted); }

.domain-checker button {
  background: var(--teal);
  color: var(--white);
  padding: 0 28px;
  font-size: 15px;
  font-weight: 500;
  transition: background var(--ease);
  white-space: nowrap;
  border-radius: 0;
}

.domain-checker button:hover { background: var(--teal-d); }

/* Checkbox */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}

.form-check-label { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.form-check-label a { color: var(--teal); }
.form-check-label a:hover { text-decoration: underline; }

/* Toggle switch */
.toggle-wrap { display: flex; align-items: center; gap: var(--sp-3); }

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--navy3);
  border-radius: var(--r-full);
  transition: background var(--ease);
  cursor: pointer;
}

.toggle input:checked + .toggle-track { background: var(--teal); }

.toggle-track::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--white);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform var(--ease);
}

.toggle input:checked + .toggle-track::after { transform: translateX(20px); }

.toggle-label { font-size: 14px; color: var(--text); }


/* ═══════════════════════════════════════════════════════
   8. CARDS & SURFACES
   ═══════════════════════════════════════════════════════ */
.card {
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--sp-6);
}

.card:hover { border-color: var(--border-l); }

.card-sm { padding: var(--sp-4); }
.card-lg { padding: var(--sp-8) var(--sp-10); }

.card-teal { border-color: var(--teal); }
.card-featured { border-color: var(--teal); position: relative; }

/* Plan cards */
.plan-card {
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--ease);
}

.plan-card:hover { border-color: var(--navy3); }
.plan-card.featured { border-color: var(--teal); position: relative; }

.plan-badge {
  position: absolute;
  top: -12px;
  left: 32px;
  background: var(--teal);
  color: var(--white);
  font-size: 10px;
  letter-spacing: 2px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  text-transform: uppercase;
}

/* Surface levels */
.surface   { background: var(--navy2); }
.surface-2 { background: var(--navy3); }
.surface-raised {
  background: var(--navy2);
  box-shadow: var(--shadow);
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--sp-6) 0;
}


/* ═══════════════════════════════════════════════════════
   9. BADGES & STATUS PILLS
   ═══════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--r-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-teal  { background: var(--teal-ghost); color: var(--teal-l); }
.badge-green { background: var(--green-ghost); color: var(--green); }
.badge-amber { background: var(--amber-ghost); color: var(--amber); }
.badge-red   { background: var(--red-ghost);   color: var(--red); }
.badge-sky   { background: var(--sky-ghost);   color: var(--sky); }
.badge-muted { background: var(--navy3);        color: var(--text-muted); }

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Status dot (standalone) */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-teal  { background: var(--teal); }
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.dot-red   { background: var(--red); }
.dot-muted { background: var(--navy3); }


/* ═══════════════════════════════════════════════════════
   10. ALERTS & NOTIFICATIONS
   ═══════════════════════════════════════════════════════ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-sm);
  font-size: 14px;
  line-height: 1.5;
}

.alert-teal  { background: var(--teal-ghost); border: 1px solid rgba(13,148,136,0.3); color: var(--teal-l); }
.alert-green { background: var(--green-ghost); border: 1px solid rgba(34,197,94,0.3); color: var(--green); }
.alert-amber { background: var(--amber-ghost); border: 1px solid rgba(245,158,11,0.3); color: var(--amber); }
.alert-red   { background: var(--red-ghost);   border: 1px solid rgba(239,68,68,0.3); color: var(--red); }

.alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.alert-body { flex: 1; }
.alert-title { font-weight: 600; margin-bottom: 2px; }


/* ═══════════════════════════════════════════════════════
   11. TABLES
   ═══════════════════════════════════════════════════════ */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  background: var(--navy2);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

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

.table tbody tr { transition: background var(--ease); }
.table tbody tr:hover { background: rgba(30,41,59,0.5); }

.table .col-action { text-align: right; width: 1%; white-space: nowrap; }


/* ═══════════════════════════════════════════════════════
   12. SIDEBAR PORTAL LAYOUT
   ═══════════════════════════════════════════════════════ */
.portal-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--nav-h) 1fr;
  min-height: 100vh;
}

.portal-layout .nav {
  grid-column: 1 / -1;
}

.sidebar {
  background: var(--navy2);
  border-right: 1px solid var(--border);
  padding: var(--sp-6) 0;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}

.sidebar-section {
  padding: 0 var(--sp-4);
  margin-bottom: var(--sp-6);
}

.sidebar-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-faint);
  text-transform: uppercase;
  padding: 0 var(--sp-2);
  margin-bottom: var(--sp-2);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px var(--sp-2);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--text-muted);
  transition: background var(--ease), color var(--ease);
  margin-bottom: 2px;
}

.sidebar-link:hover {
  background: var(--navy3);
  color: var(--white);
}

.sidebar-link.active {
  background: var(--teal-ghost);
  color: var(--teal-l);
  font-weight: 500;
}

.sidebar-link .icon { font-size: 16px; flex-shrink: 0; }

.portal-main {
  padding: var(--sp-8) var(--sp-10);
  overflow-y: auto;
}

.portal-header {
  margin-bottom: var(--sp-8);
}

.portal-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--sp-1);
}

.portal-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}


/* ═══════════════════════════════════════════════════════
   13. STATS / KPI CARDS
   ═══════════════════════════════════════════════════════ */
.stat-card {
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--sp-5) var(--sp-6);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--sp-2);
}

.stat-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -1px;
  line-height: 1;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: var(--sp-2);
}

.stat-trend-up   { color: var(--green); }
.stat-trend-down { color: var(--red); }


/* ═══════════════════════════════════════════════════════
   14. MODAL
   ═══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.75);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  animation: fadeIn 0.15s ease;
}

.modal {
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
}

.modal-sm { max-width: 380px; }
.modal-lg { max-width: 720px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
}

.modal-close {
  color: var(--text-muted);
  transition: color var(--ease);
  font-size: 20px;
  line-height: 1;
}

.modal-close:hover { color: var(--white); }

.modal-footer {
  display: flex;
  gap: var(--sp-3);
  justify-content: flex-end;
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}


/* ═══════════════════════════════════════════════════════
   15. PROGRESS & LOADERS
   ═══════════════════════════════════════════════════════ */
.progress-bar {
  height: 4px;
  background: var(--navy3);
  border-radius: var(--r-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--teal);
  border-radius: var(--r-full);
  transition: width var(--ease-slow);
}

.progress-fill.danger { background: var(--red); }
.progress-fill.warning { background: var(--amber); }

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--navy3);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm { width: 16px; height: 16px; }
.spinner-lg { width: 40px; height: 40px; border-width: 3px; }

@keyframes spin { to { transform: rotate(360deg); } }


/* ═══════════════════════════════════════════════════════
   16. TRUST BAR (marketing)
   ═══════════════════════════════════════════════════════ */
.trust-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px var(--page-px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-12);
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.trust-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════
   17. STEPS (how it works)
   ═══════════════════════════════════════════════════════ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2px;
}

.step {
  background: var(--navy2);
  padding: 36px 32px;
}

.step:first-child { border-radius: var(--r) 0 0 var(--r); }
.step:last-child  { border-radius: 0 var(--r) var(--r) 0; }

.step-num {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--teal);
  margin-bottom: var(--sp-5);
}

.step h3 {
  font-size: 17px;
  color: var(--white);
  margin-bottom: var(--sp-2);
}

.step p { font-size: 14px; color: var(--text-muted); line-height: 1.65; }


/* ═══════════════════════════════════════════════════════
   18. INCLUDED GRID (features)
   ═══════════════════════════════════════════════════════ */
.included-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.included-item {
  background: var(--navy2);
  padding: 32px 28px;
}

.included-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--teal-ghost);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-4);
  font-size: 18px;
}

.included-item h3 {
  font-size: 16px;
  margin-bottom: var(--sp-2);
}

.included-item p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }


/* ═══════════════════════════════════════════════════════
   19. DOMAIN ALTERNATIVES (signup)
   ═══════════════════════════════════════════════════════ */
.tld-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: var(--sp-2);
  cursor: pointer;
  transition: border-color var(--ease);
}

.tld-option:hover { border-color: var(--teal); }
.tld-option.selected { border-color: var(--teal); background: var(--teal-ghost); }
.tld-option.unavailable { opacity: 0.4; cursor: not-allowed; }

.tld-option-name { font-weight: 500; color: var(--white); }
.tld-option-cost { font-size: 13px; color: var(--text-muted); }
.tld-option-avail { font-size: 12px; }
.tld-option-avail.yes { color: var(--green); }
.tld-option-avail.no  { color: var(--red); }


/* ═══════════════════════════════════════════════════════
   20. THEME PICKER (10 website themes)
   ═══════════════════════════════════════════════════════ */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-4);
}

.theme-card {
  border: 2px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--ease), transform var(--ease);
}

.theme-card:hover { border-color: var(--teal); transform: translateY(-2px); }
.theme-card.selected { border-color: var(--teal); box-shadow: var(--glow-teal); }

.theme-preview {
  height: 120px;
  width: 100%;
  display: block;
  border: none;
  pointer-events: none;
}

.theme-footer {
  padding: var(--sp-3) var(--sp-4);
  background: var(--navy2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-name { font-size: 13px; color: var(--white); font-weight: 500; }
.theme-colours { display: flex; gap: 4px; }

.theme-swatch {
  width: 14px;
  height: 14px;
  border-radius: var(--r-full);
  border: 1px solid rgba(255,255,255,0.1);
}


/* ═══════════════════════════════════════════════════════
   21. FILE UPLOAD ZONE
   ═══════════════════════════════════════════════════════ */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--r);
  padding: var(--sp-10) var(--sp-8);
  text-align: center;
  transition: border-color var(--ease), background var(--ease);
  cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--teal);
  background: var(--teal-ghost);
}

.upload-icon { font-size: 32px; margin-bottom: var(--sp-3); opacity: 0.6; }
.upload-text { font-size: 14px; color: var(--text-muted); }
.upload-text strong { color: var(--teal); }
.upload-hint { font-size: 12px; color: var(--text-faint); margin-top: var(--sp-2); }


/* ═══════════════════════════════════════════════════════
   22. FOOTER (marketing)
   ═══════════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px var(--page-px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-5);
}

.footer-note { font-size: 12px; color: var(--text-muted); }

.footer-links { display: flex; gap: var(--sp-6); }
.footer-links a { font-size: 12px; color: var(--text-muted); transition: color var(--ease); }
.footer-links a:hover { color: var(--white); }


/* ═══════════════════════════════════════════════════════
   23. HERO GLOW EFFECTS
   ═══════════════════════════════════════════════════════ */
.hero-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, var(--teal-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 100%, rgba(13,148,136,0.12) 0%, transparent 70%);
  pointer-events: none;
}


/* ═══════════════════════════════════════════════════════
   24. ANIMATIONS
   ═══════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.animate-fade   { animation: fadeIn 0.3s ease; }
.animate-slide-up { animation: slideUp 0.3s ease; }
.animate-pulse  { animation: pulse 2s ease infinite; }


/* ═══════════════════════════════════════════════════════
   25. RESPONSIVE OVERRIDES
   ═══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .portal-layout.sidebar-open .sidebar {
    display: block;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    height: calc(100vh - var(--nav-h));
    width: var(--sidebar-w);
    z-index: 150;
    animation: slideIn 0.2s ease;
  }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .domain-checker { flex-direction: column; }
  .domain-checker button { padding: 14px; border-radius: 0; }
  .steps-grid .step:first-child { border-radius: var(--r) var(--r) 0 0; }
  .steps-grid .step:last-child  { border-radius: 0 0 var(--r) var(--r); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .modal { padding: var(--sp-6); }
  .portal-main { padding: var(--sp-4) var(--sp-5); }
  .footer { flex-direction: column; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; gap: var(--sp-4); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
