/* ══════════════════════════════════════════════════════════
   D365 Sales Hub Training Portal — CloudStrucc Branded
   Light / Dark Theme Support
   ══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=Space+Mono:wght@400;700&display=swap');

/* ── DARK THEME (default) ── */
:root,
[data-theme="dark"] {
  --bg-primary:    #0a1628;
  --bg-secondary:  #111d33;
  --bg-tertiary:   #162240;
  --bg-glass:      rgba(15,25,50,0.7);
  --bg-glass-2:    rgba(20,35,65,0.6);
  --bg-hover:      rgba(255,255,255,0.03);
  --bg-mesh-1:     rgba(37,99,235,0.08);
  --bg-mesh-2:     rgba(6,182,212,0.06);
  --bg-mesh-3:     rgba(37,99,235,0.04);
  --text-primary:  #f1f5f9;
  --text-dim:      #cbd5e1;
  --text-heading:  #f8fafc;
  --border-color:  rgba(255,255,255,0.08);
  --border-subtle: rgba(255,255,255,0.03);
  --glow:          rgba(37,99,235,0.15);
  --step-num-bg:   #162240;
  --step-num-border: rgba(255,255,255,0.08);
  --callout-tip-bg:    rgba(37,99,235,0.08);
  --callout-tip-text:  #93c5fd;
  --callout-imp-bg:    rgba(245,158,11,0.08);
  --callout-imp-text:  #fcd34d;
  --callout-try-bg:    rgba(34,197,94,0.08);
  --callout-try-text:  #86efac;
  --modal-bg:      #111d33;
  --cert-bg:       linear-gradient(165deg, #0f1a30, #0a1628 40%, #101e35);
  --cert-glow-1:   rgba(37,99,235,0.1);
  --cert-glow-2:   rgba(6,182,212,0.08);
  --cert-detail-bg: rgba(0,0,0,0.25);
  --scrollbar-thumb: #475569;
  --input-bg:      #111d33;
  --btn-secondary-bg: #162240;
  --btn-secondary-hover: #111d33;
  --toggle-bg:     #162240;
  --toggle-knob:   #f59e0b;
}

/* ── LIGHT THEME ── */
[data-theme="light"] {
  --bg-primary:    #f5f7fb;
  --bg-secondary:  #ffffff;
  --bg-tertiary:   #e8edf5;
  --bg-glass:      rgba(255,255,255,0.85);
  --bg-glass-2:    rgba(255,255,255,0.75);
  --bg-hover:      rgba(0,0,0,0.03);
  --bg-mesh-1:     rgba(37,99,235,0.04);
  --bg-mesh-2:     rgba(6,182,212,0.03);
  --bg-mesh-3:     rgba(37,99,235,0.02);
  --text-primary:  #0f172a;
  --text-dim:      #334155;
  --text-heading:  #020617;
  --border-color:  rgba(0,0,0,0.1);
  --border-subtle: rgba(0,0,0,0.04);
  --glow:          rgba(37,99,235,0.08);
  --step-num-bg:   #e8edf5;
  --step-num-border: rgba(0,0,0,0.08);
  --callout-tip-bg:    rgba(37,99,235,0.06);
  --callout-tip-text:  #1d4ed8;
  --callout-imp-bg:    rgba(245,158,11,0.08);
  --callout-imp-text:  #b45309;
  --callout-try-bg:    rgba(34,197,94,0.06);
  --callout-try-text:  #15803d;
  --modal-bg:      #ffffff;
  --cert-bg:       linear-gradient(165deg, #ffffff, #f0f4ff 40%, #f5f7fb);
  --cert-glow-1:   rgba(37,99,235,0.06);
  --cert-glow-2:   rgba(6,182,212,0.04);
  --cert-detail-bg: rgba(0,0,0,0.03);
  --scrollbar-thumb: #cbd5e1;
  --input-bg:      #f1f5f9;
  --btn-secondary-bg: #e8edf5;
  --btn-secondary-hover: #dde4f0;
  --toggle-bg:     #e8edf5;
  --toggle-knob:   #2563eb;
}

/* ── CONSTANTS (shared) ── */
:root {
  --cs-blue:       #2563eb;
  --cs-blue-light: #3b82f6;
  --cs-cyan:       #06b6d4;
  --cs-teal:       #0ea5e9;
  --cs-green:      #22c55e;
  --cs-amber:      #f59e0b;
  --cs-red:        #ef4444;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     16px;
  --transition:    0.3s cubic-bezier(0.4,0,0.2,1);
  --font-body:     'DM Sans', sans-serif;
  --font-mono:     'Space Mono', monospace;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.65;
  font-size: 15.5px;
  transition: background 0.4s ease, color 0.4s ease;
}

/* ── Background mesh ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, var(--bg-mesh-1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 80%, var(--bg-mesh-2) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 50% 50%, var(--bg-mesh-3) 0%, transparent 60%);
  transition: background 0.4s ease;
}


/* ── Typography ── */
h1,h2,h3,h4 { font-weight: 600; line-height: 1.25; color: var(--text-heading); }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.2rem; }
a { color: var(--cs-blue-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Utility ── */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.text-center { text-align: center; }

/* ══════════════════
   THEME TOGGLE
   ══════════════════ */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.82rem;
  color: var(--text-dim);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--toggle-bg);
  transition: var(--transition);
}
.theme-toggle:hover {
  border-color: var(--cs-blue-light);
}
.theme-toggle .toggle-track {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  position: relative;
  transition: var(--transition);
  flex-shrink: 0;
}
.theme-toggle .toggle-knob {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--toggle-knob);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
[data-theme="light"] .theme-toggle .toggle-knob {
  left: 20px;
}
.theme-toggle .toggle-label { font-weight: 500; }

/* ══════════════════
   GATE / LOGIN
   ══════════════════ */
#gate-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}
.gate-card {
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  animation: fadeUp 0.6s ease-out;
}
.gate-card .logo-area {
  margin-bottom: 2rem;
}
.gate-card .logo-text {
  font-size: 1.7rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--cs-blue-light), var(--cs-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gate-card .logo-sub {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
  letter-spacing: 0.03em;
}
.gate-card h1 {
  font-size: 1.55rem;
  margin-bottom: 0.5rem;
}
.gate-card p {
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}
.gate-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.gate-input-group input {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1rem;
  text-align: center;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  outline: none;
  transition: var(--transition);
}
.gate-input-group input::placeholder {
  color: var(--text-dim);
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
}
.gate-input-group input:focus {
  border-color: var(--cs-blue);
  box-shadow: 0 0 0 3px var(--glow);
}
.gate-error {
  color: var(--cs-red);
  font-size: 0.88rem;
  min-height: 1.25rem;
  margin-top: 0.25rem;
}
.gate-theme-toggle {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--cs-blue), var(--cs-blue-light));
  color: #fff;
  box-shadow: 0 2px 12px rgba(37,99,235,0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(37,99,235,0.4);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: var(--btn-secondary-hover);
  border-color: var(--cs-blue-light);
}
.btn-success {
  background: linear-gradient(135deg, #16a34a, var(--cs-green));
  color: #fff;
  box-shadow: 0 2px 12px rgba(34,197,94,0.3);
}
.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(34,197,94,0.4);
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.95rem 2rem; font-size: 1.05rem; }

/* ══════════════════
   MAIN APP LAYOUT
   ══════════════════ */
#app-screen {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: 320px;
  min-width: 320px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
  z-index: 10;
  transition: background 0.4s ease;
}
.sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}
.sidebar-header .brand {
  font-weight: 700;
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--cs-blue-light), var(--cs-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidebar-header .app-title {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 2px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Progress ring in sidebar */
.sidebar-progress {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.progress-ring {
  width: 48px; height: 48px;
  position: relative;
  flex-shrink: 0;
}
.progress-ring svg { transform: rotate(-90deg); }
.progress-ring .track {
  fill: none;
  stroke: var(--bg-tertiary);
  stroke-width: 4;
}
.progress-ring .fill {
  fill: none;
  stroke: var(--cs-blue-light);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}
.progress-ring .pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
}
.progress-info .progress-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}
.progress-info .progress-detail {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Module list */
.sidebar-modules {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}
.sidebar-modules::-webkit-scrollbar { width: 4px; }
.sidebar-modules::-webkit-scrollbar-track { background: transparent; }
.sidebar-modules::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }

.module-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
  position: relative;
}
.module-item:hover {
  background: var(--bg-hover);
}
.module-item.active {
  background: var(--glow);
  border-left-color: var(--cs-blue-light);
}
.module-item.completed .mod-icon {
  background: var(--cs-green);
  color: #fff;
  border-color: var(--cs-green);
}
.mod-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  flex-shrink: 0;
  transition: var(--transition);
}
.module-item.active .mod-icon {
  background: var(--cs-blue);
  color: #fff;
  border-color: var(--cs-blue);
  box-shadow: 0 0 10px rgba(37,99,235,0.4);
}
.mod-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.3;
  transition: var(--transition);
}
.module-item.active .mod-label,
.module-item.completed .mod-label {
  color: var(--text-primary);
}

/* Sidebar footer */
.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.content-header {
  padding: 1.25rem 2.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-glass-2);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 5;
  transition: background 0.4s ease;
}
.content-header h2 {
  font-size: 1.25rem;
}
.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.content-body {
  flex: 1;
  padding: 2.5rem;
  overflow-y: auto;
  max-width: 920px;
}

/* ── Module Content Styling ── */
.module-section {
  margin-bottom: 2.5rem;
  animation: fadeUp 0.4s ease-out;
}
.module-section h2 {
  color: var(--text-heading);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.35rem;
}
.module-section h3 {
  color: var(--cs-cyan);
  margin: 1.25rem 0 0.5rem;
  font-size: 1.1rem;
}
[data-theme="light"] .module-section h3 {
  color: #0e7490;
}
.module-section p {
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  line-height: 1.75;
  font-size: 1rem;
}

/* Numbered steps */
.step-list {
  list-style: none;
  counter-reset: steps;
  margin: 0.75rem 0;
}
.step-list li {
  counter-increment: steps;
  display: flex;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border-subtle);
  line-height: 1.7;
  color: var(--text-dim);
  font-size: 0.98rem;
}
.step-list li::before {
  content: counter(steps);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--step-num-bg);
  border: 1px solid var(--step-num-border);
  color: var(--cs-blue-light);
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-list li > span {
  flex: 1;
  min-width: 0;
}
.step-list li > span strong,
.step-list li strong {
  color: var(--text-primary);
  display: inline;
  font-weight: 600;
}

/* Bullet list */
.bullet-list {
  list-style: none;
  margin: 0.75rem 0;
}
.bullet-list li {
  padding: 0.45rem 0 0.45rem 1.25rem;
  position: relative;
  color: var(--text-dim);
  font-size: 0.98rem;
  line-height: 1.7;
}
.bullet-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cs-blue-light);
}
.bullet-list li > span strong,
.bullet-list li strong {
  color: var(--text-primary);
  display: inline;
  font-weight: 600;
}

/* Callout boxes */
.callout {
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: 0.95rem;
  line-height: 1.65;
  display: flex;
  gap: 0.75rem;
}
.callout .callout-icon {
  flex-shrink: 0;
  font-size: 1.15rem;
  margin-top: 1px;
}
.callout-tip {
  background: var(--callout-tip-bg);
  border-left: 3px solid var(--cs-blue-light);
  color: var(--callout-tip-text);
}
.callout-important {
  background: var(--callout-imp-bg);
  border-left: 3px solid var(--cs-amber);
  color: var(--callout-imp-text);
}
.callout-try {
  background: var(--callout-try-bg);
  border-left: 3px solid var(--cs-green);
  color: var(--callout-try-text);
}

/* Module complete checkbox area */
.module-complete-area {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-glass-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.module-complete-area .check-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  user-select: none;
}
.module-complete-area input[type="checkbox"] {
  appearance: none;
  width: 24px; height: 24px;
  border: 2px solid var(--text-dim);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  flex-shrink: 0;
}
.module-complete-area input[type="checkbox"]:checked {
  background: var(--cs-green);
  border-color: var(--cs-green);
}
.module-complete-area input[type="checkbox"]:checked::after {
  content: '\2713';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ── Navigation Footer ── */
.content-footer {
  padding: 1.25rem 2.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-glass-2);
  transition: background 0.4s ease;
}

/* ══════════════════
   CERTIFICATE SCREEN
   ══════════════════ */
#certificate-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}
.certificate-wrapper {
  max-width: 760px;
  width: 100%;
  animation: fadeUp 0.6s ease-out;
}
.cert-card {
  background: var(--cert-bg);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cert-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, var(--cert-glow-1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, var(--cert-glow-2) 0%, transparent 50%);
  pointer-events: none;
}
.cert-card > * { position: relative; z-index: 1; }
.cert-badge {
  width: 80px; height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--cs-blue), var(--cs-cyan));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 0 40px rgba(37,99,235,0.3);
}
.cert-card h1 {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}
.cert-card .cert-subtitle {
  color: var(--cs-cyan);
  font-size: 1rem;
  margin-bottom: 2rem;
  font-weight: 500;
}
[data-theme="light"] .cert-card .cert-subtitle { color: #0e7490; }
.cert-details {
  background: var(--cert-detail-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: left;
}
.cert-row {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.95rem;
}
.cert-row:last-child { border-bottom: none; }
.cert-row .label { color: var(--text-dim); }
.cert-row .value { color: var(--text-primary); font-weight: 600; }
.cert-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ══════════════════
   ANIMATIONS
   ══════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ══════════════════
   PDF PRINT STYLES
   ══════════════════ */
@media print {
  body { background: #fff !important; color: #111 !important; }
  body::before, body::after { display: none; }
  .sidebar, .content-header, .content-footer, .module-complete-area,
  .header-actions, .sidebar-footer, .btn, .no-print, .theme-toggle { display: none !important; }
  .main-content { width: 100%; }
  .content-body { max-width: 100%; padding: 1rem; }
  .callout { break-inside: avoid; }
  .module-section { break-inside: avoid; }
}

/* ══════════════════
   MOBILE SIDEBAR
   ══════════════════ */
.mobile-menu-btn {
  display: none;
  background: var(--btn-secondary-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9;
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: -320px;
    top: 0;
    height: 100vh;
    z-index: 20;
    transition: left 0.3s ease, background 0.4s ease;
  }
  .sidebar.open { left: 0; }
  .sidebar-overlay.open { display: block; }
  .mobile-menu-btn { display: flex; }
  .content-body { padding: 1.5rem; }
  .content-header { padding: 1rem 1.5rem; }
  .content-footer { padding: 1rem 1.5rem; }
}

/* ── Loading spinner ── */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Confirmation modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeUp 0.2s ease-out;
}
.modal-card {
  background: var(--modal-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 440px;
  width: 90%;
  text-align: center;
}
.modal-card h3 { margin-bottom: 0.75rem; }
.modal-card p { color: var(--text-dim); margin-bottom: 1.5rem; font-size: 0.95rem; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: center; }

/* Name/email form in modal */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  text-align: left;
}
.modal-form label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.modal-form input {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}
.modal-form input:focus {
  border-color: var(--cs-blue);
  box-shadow: 0 0 0 3px var(--glow);
}
