/* ============================================================
   OTROTL AUTH — auth-sso-flow page styles
   Externalized from inline <style> blocks 2026-05-29 so the page
   renders under a strict CSP (style-src 'self', no 'unsafe-inline').
   header-embed.css sets no font-family on body/headings, and the main
   sheet below re-declares body font via --f-body, so consolidating the
   two former blocks into this single file changes no cascade outcome.
   ============================================================ */
  body, .auth-body { font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
  h1, h2, h3, .display-font { font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* ============================================================
   OTROTL AUTH — CUSTOM PROPERTIES
   ============================================================ */
:root {
  --bg-page: #0a0f1a;
  --bg-card: #111827;
  --bg-card-chrome: rgba(17, 24, 39, 0.85);
  --bg-card-hover: #1f2937;
  --bg-input: rgba(15, 23, 42, 0.6);
  --bg-input-focus: rgba(15, 23, 42, 0.9);
  --c-primary: #e2e8f0;
  --c-secondary: #94a3b8;
  --c-muted: #64748b;
  --c-border: rgba(30, 41, 59, 0.5);
  --c-border-accent: rgba(201, 168, 76, 0.22);
  --c-accent: #c9a84c;
  --c-accent-light: #e8c973;
  --c-accent-hover: #d4b65e;
  --c-accent-soft: rgba(201, 168, 76, 0.08);
  --c-accent-glow: rgba(201, 168, 76, 0.18);
  --c-success: #10b981;
  --c-success-glow: rgba(16, 185, 129, 0.15);
  --c-error: #ef4444;
  --c-error-bg: rgba(239, 68, 68, 0.08);
  --c-error-border: rgba(239, 68, 68, 0.2);
  --f-display: 'Manrope', system-ui, sans-serif;
  --f-body: 'Poppins', system-ui, sans-serif;
  --text-h1: 1.5rem;
  --text-h2: 1.125rem;
  --text-base: 1rem;
  --text-body: 0.875rem;
  --text-sm: 0.8125rem;
  --text-xs: 0.75rem;
  --text-xxs: 0.6875rem;
  --card-max-w: 52rem;


  --hdr-h: 3.25rem;
  --step-h: 2.5rem;
  --ftr-h: 3.25rem;
  --pad: 1.25rem;
  --r-sm: 0.375rem;
  --r-md: 0.625rem;
  --r-lg: 0.875rem;
  --r-xl: 1.5rem;
  --r-full: 9999rem;
  --shadow-card: 0 1.5rem 5rem -1rem rgba(0,0,0,0.5), 0 0 0 0.0625rem rgba(201,168,76,0.06), inset 0 0.0625rem 0 rgba(201,168,76,0.05);
  --shadow-input-focus: 0 0 0 0.1875rem rgba(201,168,76,0.25), 0 0 1rem rgba(201,168,76,0.08);
  --z-bg: 0;
  --z-page: 1;
  --z-card: 10;
  --z-header: 100;
}

html[data-theme="light"] {
  --bg-page: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-chrome: rgba(248, 250, 252, 0.92);
  --bg-card-hover: #f1f5f9;
  --bg-input: #f8fafc;
  --bg-input-focus: #ffffff;
  --c-primary: #1e293b;
  --c-secondary: #475569;
  --c-muted: #64748b;
  --c-border: rgba(148, 163, 184, 0.4);
  --c-border-accent: rgba(156, 125, 46, 0.25);
  --c-accent: #9c7d2e;
  --c-accent-light: #b8932e;
  --c-accent-hover: #846a28;
  --c-accent-soft: rgba(156, 125, 46, 0.06);
  --c-accent-glow: rgba(156, 125, 46, 0.12);
  --c-success: #059669;
  --c-success-glow: rgba(5, 150, 105, 0.12);
  --c-error: #dc2626;
  --c-error-bg: rgba(220, 38, 38, 0.06);
  --c-error-border: rgba(220, 38, 38, 0.25);
  --shadow-card: 0 0.25rem 1.5rem rgba(0,0,0,0.06), 0 0.75rem 2.5rem rgba(0,0,0,0.04), 0 0 0 0.0625rem rgba(148,163,184,0.35);
  --shadow-input-focus: 0 0 0 0.1875rem rgba(156,125,46,0.2), 0 0 1rem rgba(156,125,46,0.06);
}

/* ============================================================
   BASE / RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  font-size: var(--text-body);
  color: var(--c-primary);
  background: var(--bg-page);
  padding-top: 3.75rem;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

/* ============================================================
   BACKGROUND
   ============================================================ */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: var(--z-bg);
  pointer-events: none;
  overflow: hidden;
}
.auth-bg::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(201,168,76,0.04) 0%, transparent 70%);
  filter: blur(5rem);
}
.auth-bg::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(ellipse at center, rgba(16,185,129,0.02) 0%, transparent 70%);
  filter: blur(5rem);
}
.auth-grain {
  position: fixed;
  inset: 0;
  z-index: var(--z-bg);
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 12.5rem;
}

/* ============================================================
   AUTH PAGE CONTAINER
   ============================================================ */
.auth-page {
  position: relative;
  z-index: var(--z-page);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 3.75rem);
  padding: clamp(1rem, 3vh, 3rem) 1rem;
}

/* ============================================================
   AUTH CARD
   ============================================================ */
.auth-card {
  position: relative;
  z-index: var(--z-card);
  width: 100%;
  max-width: var(--card-max-w);
  background: var(--bg-card);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(2rem) saturate(1.2);
  -webkit-backdrop-filter: blur(2rem) saturate(1.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  animation: panelIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
/* Gold-wire edge highlight */
.auth-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-xl);
  border: 0.0625rem solid var(--c-border-accent);
  pointer-events: none;
  z-index: 1;
}
/* Top-light reflection */
.auth-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 0.0625rem;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.12), transparent);
  pointer-events: none;
  z-index: 1;
}

/* Only one card visible at a time */
.auth-card[hidden], .auth-card.hidden { display: none !important; }

/* ============================================================
   CARD HEADER
   ============================================================ */
.auth-card-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--hdr-h);
  padding: 0.625rem var(--pad);
  border-bottom: 0.0625rem solid var(--c-border);
  transition: border-color 0.3s;
}

/* --- Tab Switcher --- */
.auth-tabs {
  display: flex;
  background: var(--c-accent-soft);
  border-radius: var(--r-full);
  padding: 0.1875rem;
  gap: 0.125rem;
}
.modal-tab {
  font-family: var(--f-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--c-muted);
  background: transparent;
  border: none;
  border-radius: var(--r-full);
  padding: 0.375rem 0.875rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.25s, background 0.25s;
  min-height: 2rem;
}
.modal-tab:hover {
  color: var(--c-primary);
}
.modal-tab.active {
  color: #1a1a2e;
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-light));
  box-shadow: 0 0.125rem 0.5rem rgba(201,168,76,0.25);
}

/* --- Title --- */
.auth-card-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--text-h1);
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Network Info Wrapper --- */
.net-info-wrap {
  position: relative;
  flex-shrink: 0;
}
.net-toggle {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 0.0625rem solid var(--c-border);
  background: transparent;
  color: var(--c-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: color 0.25s, border-color 0.25s, background 0.25s, box-shadow 0.25s;
  flex-shrink: 0;
}
.net-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.net-toggle:hover,
.net-toggle.active {
  color: var(--c-accent);
  border-color: var(--c-accent);
  background: var(--c-accent-soft);
  box-shadow: 0 0 0.75rem var(--c-accent-glow);
}

/* ============================================================
   STEPPER
   ============================================================ */
.auth-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: var(--step-h);
  padding: 0 var(--pad);
  position: relative;
}
.step-dot {
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 50%;
  border: 0.125rem solid var(--c-muted);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--text-xs);
  color: var(--c-muted);
  flex-shrink: 0;
  transition: border-color 0.35s, background 0.35s, color 0.35s, box-shadow 0.35s, transform 0.35s;
  position: relative;
  z-index: 2;
}
.step-dot.active {
  border-color: var(--c-accent);
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-light));
  color: #1a1a2e;
  box-shadow: 0 0 0 0.25rem var(--c-accent-glow);
  animation: stepPulse 2s ease-in-out infinite;
}
.step-dot.done {
  border-color: var(--c-success);
  background: var(--c-success);
  color: #fff;
}
.step-dot .dot-num { pointer-events: none; }
.step-dot .dot-check { display: none; font-size: var(--text-xxs); }
.step-dot.done .dot-num { display: none; }
.step-dot.done .dot-check { display: block; }

.step-line {
  width: 2.5rem;
  height: 0.125rem;
  background: var(--c-muted);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.step-line-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--c-accent), var(--c-success));
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.step-line.done .step-line-fill {
  width: 100%;
}

.step-label {
  position: absolute;
  right: var(--pad);
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--text-xxs);
  color: var(--c-muted);
  font-weight: 500;
  white-space: nowrap;
}

/* ============================================================
   CARD BODY
   ============================================================ */
.auth-card-body {
  flex: 1;
  overflow: hidden;
  padding: 0;
}
.auth-card-body-inner {
  display: flex;
  height: 100%;
}
.auth-form-col {
  flex: 1;
  overflow-y: auto;
  padding: var(--pad);
  min-width: 0;
}
.auth-form-col::-webkit-scrollbar { width: 0.25rem; }
.auth-form-col::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: var(--r-full); }

/* Step panes */
.step-pane {
  display: none;
  animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.step-pane.active { display: block; }
.step-pane.slide-back { animation-name: slideInBack; }

/* ============================================================
   NETWORK PANEL
   ============================================================ */
/* --- Network Popover --- */
.net-popover {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 20rem;
  background: var(--bg-card);
  border: 0.0625rem solid var(--c-border-accent);
  border-radius: var(--r-lg);
  box-shadow: 0 0.5rem 2rem rgba(0,0,0,0.35), 0 0 1rem var(--c-accent-glow);
  padding: 1.25rem;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.5rem);
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.net-popover.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.net-popover-arrow {
  position: absolute;
  top: -0.375rem;
  right: 0.875rem;
  width: 0.75rem;
  height: 0.75rem;
  background: var(--bg-card);
  border-top: 0.0625rem solid var(--c-border-accent);
  border-left: 0.0625rem solid var(--c-border-accent);
  transform: rotate(45deg);
}
.net-popover-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.net-popover-brand svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke: var(--c-accent);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}
.net-popover-brand-name {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: var(--text-base);
  color: var(--c-accent);
  letter-spacing: -0.02em;
}
.net-popover-desc {
  font-size: var(--text-sm);
  color: var(--c-secondary);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}
.net-popover-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.net-popover-feat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-xs);
  color: var(--c-secondary);
}
.net-popover-feat svg {
  width: 1rem;
  height: 1rem;
  stroke: var(--c-accent);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.net-divider {
  height: 0.0625rem;
  background: linear-gradient(90deg, var(--c-accent), transparent);
  border: none;
}
.net-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.net-badge {
  font-size: var(--text-xxs);
  font-weight: 600;
  color: var(--c-success);
  background: var(--c-success-glow);
  border: 0.0625rem solid rgba(16,185,129,0.2);
  border-radius: var(--r-full);
  padding: 0.25rem 0.625rem;
  white-space: nowrap;
}

/* ============================================================
   CARD FOOTER
   ============================================================ */
.auth-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--ftr-h);
  padding: 0.5rem var(--pad);
  border-top: 0.0625rem solid var(--c-border);
  transition: border-color 0.3s;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: var(--text-sm);
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.625rem 1.25rem;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s, opacity 0.25s, transform 0.15s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-ghost {
  background: transparent;
  color: var(--c-secondary);
}
.btn-ghost:hover {
  color: var(--c-primary);
  background: var(--c-accent-soft);
}
.btn-ghost.hidden-back {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.btn-primary {
  color: #1a1a2e;
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-light));
  background-size: 200% 100%;
  animation: goldShimmer 4s infinite;
  font-weight: 700;
  box-shadow: 0 0.25rem 1rem rgba(201,168,76,0.25);
}
.btn-primary:hover {
  box-shadow: 0 0.375rem 1.5rem rgba(201,168,76,0.35);
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
  margin-bottom: 1rem;
}
.form-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--c-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}
.form-input-wrap {
  position: relative;
}
.form-input-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-muted);
  font-size: var(--text-sm);
  pointer-events: none;
  transition: color 0.25s;
  z-index: 1;
}
.form-input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem 0.625rem 2.625rem;
  font-family: var(--f-body);
  font-size: var(--text-body);
  color: var(--c-primary);
  background: var(--bg-input);
  border: 0.09375rem solid rgba(148,163,184,0.2);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s, color 0.3s;
}
html[data-theme="light"] .form-input {
  border-color: rgba(100,116,139,0.25);
}
.form-input:focus {
  border-color: var(--c-accent);
  background: var(--bg-input-focus);
  box-shadow: var(--shadow-input-focus);
}
.form-input:focus + .form-input-icon,
.form-input:focus ~ .form-input-icon {
  color: var(--c-accent);
}
.form-input::placeholder {
  color: var(--c-muted);
  opacity: 0.7;
}
.form-input.no-icon {
  padding-left: 0.875rem;
}
.form-error {
  font-size: var(--text-xxs);
  color: var(--c-error);
  margin-top: 0.25rem;
  display: none;
}
.form-group.has-error .form-input {
  border-color: var(--c-error);
  background: var(--c-error-bg);
}
.form-group.has-error .form-error {
  display: block;
}

/* ============================================================
   CHECKBOXES
   ============================================================ */
.cb-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.5rem 0;
  min-height: 2.75rem;
}
.cb-box {
  width: 1.375rem;
  height: 1.375rem;
  min-width: 1.375rem;
  border-radius: var(--r-sm);
  border: 0.125rem solid var(--c-secondary);
  background: rgba(15,23,42,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
  flex-shrink: 0;
  margin-top: 0.0625rem;
}
html[data-theme="light"] .cb-box { background: #fff; }
.cb-box:hover,
.cb-row:hover .cb-box {
  border-color: var(--c-accent);
  background: rgba(201,168,76,0.06);
}
.cb-box .cb-check {
  display: none;
  font-size: var(--text-xxs);
  color: #1a1a2e;
}
.cb-row[aria-checked="true"] .cb-box {
  border-color: var(--c-accent);
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-light));
}
.cb-row[aria-checked="true"] .cb-box .cb-check {
  display: block;
}
.cb-text {
  font-size: var(--text-sm);
  color: var(--c-secondary);
  line-height: 1.5;
}

/* Terms checkbox — slightly smaller, green checked */
.terms-box {
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  border-radius: var(--r-sm);
  border: 0.125rem solid var(--c-secondary);
  background: rgba(15,23,42,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
  flex-shrink: 0;
  margin-top: 0.0625rem;
}
html[data-theme="light"] .terms-box { background: #fff; }
.terms-box:hover,
.cb-row:hover .terms-box {
  border-color: var(--c-accent);
  background: rgba(201,168,76,0.06);
}
.terms-box .cb-check {
  display: none;
  font-size: var(--text-xxs);
  color: #fff;
}
.cb-row[aria-checked="true"] .terms-box {
  border-color: var(--c-success);
  background: var(--c-success);
}
.cb-row[aria-checked="true"] .terms-box .cb-check {
  display: block;
}

/* ============================================================
   PASSWORD STRENGTH BAR
   ============================================================ */
.pw-strength {
  margin-top: 0.5rem;
}
.pw-strength-track {
  height: 0.375rem;
  border-radius: var(--r-full);
  background: rgba(148,163,184,0.15);
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--r-full);
  transition: width 0.4s, background-color 0.4s;
}
.pw-strength-fill.weak   { background: #dc2626; }
.pw-strength-fill.fair   { background: #f59e0b; }
.pw-strength-fill.good   { background: var(--c-accent); }
.pw-strength-fill.strong { background: #059669; }
.pw-strength-text {
  font-size: var(--text-xxs);
  color: var(--c-muted);
  margin-top: 0.25rem;
}

/* ============================================================
   FORGOT PASSWORD LINK
   ============================================================ */
.forgot-link {
  display: inline-block;
  font-size: var(--text-xs);
  color: var(--c-accent);
  text-decoration: none;
  margin-top: 0.25rem;
  transition: color 0.2s;
}
.forgot-link:hover { color: var(--c-accent-hover); text-decoration: underline; }
.forgot-link.inline { margin-top: 0; }

/* ============================================================
   ROLE SELECT
   ============================================================ */
.role-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.role-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--r-md);
  border: 0.09375rem solid var(--c-border);
  background: var(--bg-input);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
  min-height: 2.75rem;
}
.role-card:hover {
  border-color: var(--c-border-accent);
  background: var(--bg-card-hover);
}
.role-card.selected {
  border-color: var(--c-accent);
  background: var(--c-accent-soft);
  box-shadow: 0 0 0 0.1875rem var(--c-accent-glow);
}
.role-card-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--r-md);
  background: var(--c-accent-soft);
  color: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}
.role-card-text { flex: 1; }
.role-card-name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--c-primary);
}
.role-card-desc {
  font-size: var(--text-xxs);
  color: var(--c-muted);
  margin-top: 0.125rem;
}
.role-card-check {
  color: var(--c-accent);
  font-size: 0.875rem;
  opacity: 0;
  transition: opacity 0.2s;
}
.role-card.selected .role-card-check { opacity: 1; }

/* ============================================================
   MFA TABS & OTP
   ============================================================ */
.mfa-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 0.0625rem solid var(--c-border);
  margin-bottom: 1rem;
}
.mfa-tab {
  font-family: var(--f-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--c-muted);
  background: transparent;
  border: none;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-bottom: 0.125rem solid transparent;
  margin-bottom: -0.0625rem;
  transition: color 0.2s, border-color 0.2s;
  min-height: 2.75rem;
}
.mfa-tab:hover { color: var(--c-primary); }
.mfa-tab.active {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
}

.mfa-pane { display: none; }
.mfa-pane.active { display: block; }

.otp-group {
  border: 0;
  padding: 0;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0;
}
.otp-input {
  width: 3rem;
  height: 3.5rem;
  text-align: center;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--c-primary);
  background: var(--bg-input);
  border: 0.125rem solid rgba(148,163,184,0.3);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s, color 0.3s;
}
.otp-input:focus {
  border-color: var(--c-accent);
  box-shadow: var(--shadow-input-focus);
  background: var(--bg-input-focus);
}

.mfa-resend-wrap {
  text-align: center;
  margin-top: 0.75rem;
}
.mfa-resend {
  font-family: var(--f-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--c-accent);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.375rem 0.75rem;
  border-radius: var(--r-sm);
  min-height: 2.75rem;
  transition: color 0.2s, background 0.2s;
}
.mfa-resend:hover {
  background: var(--c-accent-soft);
  color: var(--c-accent-hover);
}
.mfa-resend:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.backup-input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: var(--text-body);
  color: var(--c-primary);
  background: var(--bg-input);
  border: 0.125rem solid rgba(148,163,184,0.3);
  border-radius: var(--r-md);
  outline: none;
  text-align: center;
  letter-spacing: 0.15em;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s, color 0.3s;
}
.backup-input:focus {
  border-color: var(--c-accent);
  box-shadow: var(--shadow-input-focus);
  background: var(--bg-input-focus);
}

/* ============================================================
   SUCCESS SCREEN
   ============================================================ */
.success-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  padding: 2rem 0;
}
.success-icon-ring {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-success), #34d399);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: successReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  position: relative;
}
.success-icon-ring::after {
  content: '';
  position: absolute;
  inset: -0.5rem;
  border-radius: 50%;
  border: 0.125rem solid rgba(16,185,129,0.3);
  animation: ringBurst 0.8s 0.3s ease-out both;
}
.success-icon-ring i {
  font-size: 2rem;
  color: #fff;
}
.success-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--text-h1);
  color: var(--c-primary);
}
.success-desc {
  font-size: var(--text-sm);
  color: var(--c-secondary);
  max-width: 22rem;
}

/* Access table */
.access-table {
  width: 100%;
  max-width: 28rem;
  border-collapse: collapse;
  margin: 0.5rem auto;
}
.access-table th,
.access-table td {
  font-size: var(--text-xs);
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 0.0625rem solid var(--c-border);
}
.access-table th {
  font-weight: 600;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.access-table td { color: var(--c-secondary); }

.redirect-text {
  font-size: var(--text-xs);
  color: var(--c-muted);
}

/* ============================================================
   SITE SELECTION GRID
   ============================================================ */
.site-search {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem 0.625rem 2.625rem;
  font-family: var(--f-body);
  font-size: var(--text-body);
  color: var(--c-primary);
  background: var(--bg-input);
  border: 0.09375rem solid rgba(148,163,184,0.2);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s, color 0.3s;
  margin-bottom: 0.75rem;
}
html[data-theme="light"] .site-search { border-color: rgba(100,116,139,0.25); }
.site-search:focus {
  border-color: var(--c-accent);
  background: var(--bg-input-focus);
  box-shadow: var(--shadow-input-focus);
}
.sel-count {
  font-size: var(--text-xs);
  color: var(--c-muted);
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.site-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.site-card {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--r-md);
  border: 0.09375rem solid var(--c-border);
  background: var(--bg-input);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  min-height: 2.75rem;
}
.site-card:hover {
  border-color: var(--c-border-accent);
  background: var(--bg-card-hover);
}
.site-card.selected {
  border-color: var(--c-accent);
  background: var(--c-accent-soft);
  box-shadow: 0 0 0 0.125rem var(--c-accent-glow);
}
.site-card-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--r-sm);
  background: var(--c-accent-soft);
  color: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  flex-shrink: 0;
}
.site-card-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--c-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-card-check {
  font-size: var(--text-xs);
  color: var(--c-accent);
  opacity: 0;
  transition: opacity 0.2s;
}
.site-card.selected .site-card-check { opacity: 1; }

/* ============================================================
   ONBOARDING CHECKLIST
   ============================================================ */
.onboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.onboard-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--r-md);
  border: 0.09375rem solid var(--c-border);
  background: var(--bg-input);
  min-height: 2.75rem;
  transition: border-color 0.25s, background 0.25s;
}
.onboard-item.checked {
  border-color: rgba(16,185,129,0.3);
  background: var(--c-success-glow);
}
.onboard-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 0.125rem solid var(--c-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xxs);
  color: var(--c-muted);
  flex-shrink: 0;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.onboard-item.checked .onboard-icon {
  border-color: var(--c-success);
  background: var(--c-success);
  color: #fff;
}
.onboard-text {
  font-size: var(--text-sm);
  color: var(--c-secondary);
}

/* ============================================================
   STEP DESCRIPTION
   ============================================================ */
.step-desc {
  font-size: var(--text-sm);
  color: var(--c-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}
.step-heading {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--text-h2);
  color: var(--c-primary);
  margin-bottom: 0.25rem;
}

/* ============================================================
   FORM ROW (2-col)
   ============================================================ */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes panelIn {
  from { opacity: 0; transform: translateY(1.5rem) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(2rem); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInBack {
  from { opacity: 0; transform: translateX(-2rem); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes stepPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0.25rem var(--c-accent-glow); }
  50%      { transform: scale(1.08); box-shadow: 0 0 0 0.375rem var(--c-accent-glow); }
}
@keyframes successReveal {
  from { opacity: 0; transform: scale(0.3) rotate(-30deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes ringBurst {
  from { transform: scale(0.8); opacity: 1; }
  to   { transform: scale(1.6); opacity: 0; }
}
@keyframes goldShimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* ============================================================
   THEME TRANSITION LAYER
   ============================================================ */
.auth-card,
.auth-card-header,
.auth-card-footer,
.form-input,
.site-search,
.otp-input,
.backup-input,
.role-card,
.site-card,
.onboard-item,
.step-dot,
.net-popover,
.mfa-tab,
.cb-box,
.terms-box {
  transition: background-color 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s;
}

/* ============================================================
   RESPONSIVE — Mobile (max-width: 30rem)
   ============================================================ */
@media (max-width: 30rem) {
  .auth-page {
    align-items: flex-start;
    padding-top: 0.75rem;
  }
  .auth-card {
    border-radius: var(--r-md);
  }
  .auth-card::before { border-radius: var(--r-md); }
  .auth-card-header {
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
  }
  .auth-card-title { display: none; }
  .auth-tabs { order: 0; }
  .net-toggle { order: 1; }
  .net-popover { width: 16rem; right: -0.5rem; }
  .auth-form-col { padding: 0.75rem; }
  .form-row { grid-template-columns: 1fr; }
  .site-grid { grid-template-columns: 1fr; }
  .otp-input {
    width: 2.5rem;
    height: 3rem;
    font-size: 1.125rem;
  }
  .step-dot .dot-num { display: none; }
  .step-dot { width: 1.5rem; height: 1.5rem; }
  .step-line { width: 1.5rem; }
  .step-label { position: absolute; width: 0.0625rem; height: 0.0625rem; padding: 0; margin: -0.0625rem; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
  .auth-card-footer { padding: 0.5rem 0.75rem; }
}

/* ============================================================
   RESPONSIVE — Tablet (max-width: 48rem)
   ============================================================ */
@media (max-width: 48rem) and (min-width: 30.0625rem) {
  .auth-page { align-items: flex-start; }
  .auth-card { max-width: 40rem; border-radius: var(--r-lg); }
  .auth-card::before { border-radius: var(--r-lg); }
  .net-popover { width: 18rem; }
  .site-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   RESPONSIVE — Large tablet (max-width: 64rem)
   ============================================================ */
@media (max-width: 64rem) and (min-width: 48.0625rem) {
  .net-popover { width: 19rem; }
  .site-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   RESPONSIVE — Desktop (above 64rem)
   ============================================================ */
@media (min-width: 64.0625rem) {
  .site-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   UTILITY CLASSES (theme-aware replacements for Tailwind)
   ============================================================ */
.req-asterisk { color: var(--c-error); font-weight: 700; margin-left: 0.25rem; }
.optional-tag { font-size: var(--text-xs); font-weight: 400; color: var(--c-muted); margin-left: 0.25rem; }
.icon-spacer { margin-right: 0.25rem; }

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.sr-only {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  padding: 0;
  margin: -0.0625rem;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Focus visible for keyboard nav */
:focus-visible {
  outline: 0.125rem solid var(--c-accent);
  outline-offset: 0.125rem;
}

/* ============================================================
   REDUCED MOTION
   Respect prefers-reduced-motion: reduce.
   Neutralises panelIn, slideIn, slideInBack, stepPulse,
   successReveal, ringBurst, goldShimmer and all CSS transitions.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   UTILITIES — extracted from the page's former inline style=
   attribute so the page is fully CSP-clean (style-src 'self',
   no 'unsafe-inline'). 2026-05-29
   ============================================================ */
.mb-075 { margin-bottom: 0.75rem; }
