/* ============================================================================
   xEllerator — shared component library.
   Builds on the design tokens + dashboard components already in styles.css
   (Leadership Plum #562244, Momentum Plum #944872, Poppins headings, Inter text).
   Load AFTER styles.css. Used by the landing, HR, mentee and mentor pages.
   ============================================================================ */

/* --- Auth / landing --------------------------------------------------------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}
.auth-hero {
  background: linear-gradient(155deg, var(--primary-900) 0%, var(--primary-700) 55%, var(--primary-500) 130%);
  color: #fff;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
}
.auth-hero-body { max-width: 460px; position: relative; z-index: 1; }
.auth-hero h1 { font-family: var(--font-display); font-size: 42px; line-height: 1.08; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 18px; }
.auth-hero h1 .accent { color: var(--primary-200); }
.auth-hero p { font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, 0.82); }
.auth-hero-stats { display: flex; gap: 32px; margin-top: 34px; position: relative; z-index: 1; }
.auth-hero-stats .n { font-family: var(--font-display); font-size: 30px; font-weight: 700; display: block; }
.auth-hero-stats .l { font-size: 12.5px; color: rgba(255, 255, 255, 0.7); }
.auth-hero-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  transition: color 0.18s ease, border-color 0.18s ease;
}
.auth-hero-more .arw { transition: transform 0.18s ease; }
.auth-hero-more:hover { color: #fff; border-bottom-color: rgba(255, 255, 255, 0.6); }
.auth-hero-more:hover .arw { transform: translateX(3px); }
.auth-hero-figure { position: absolute; right: -22px; bottom: 118px; width: 44%; max-width: 330px; opacity: 0.95; z-index: 0; }

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--bg-primary);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
}
.auth-card h2 { font-family: var(--font-display); font-size: 23px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.auth-card .sub { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }

/* --- Forms ------------------------------------------------------------------ */
.field { margin-bottom: 18px; }
.field > label { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 7px; }
.field .hint { font-size: 12px; color: var(--gray-500); margin-top: 6px; font-weight: 400; }
.field .req { color: var(--primary-500); }

.input, .select, .textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary-300);
  box-shadow: 0 0 0 3px var(--primary-100);
}
.textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.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='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Pill checkboxes / radios (chips you click) */
.choice-group { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border: 1px solid var(--border-color); border-radius: var(--radius-full);
  font-size: 13px; font-weight: 500; color: var(--text-secondary); cursor: pointer;
  background: #fff; transition: all var(--transition); user-select: none;
}
.choice:hover { border-color: var(--primary-300); color: var(--primary-700); }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice.selected { background: var(--primary-500); border-color: var(--primary-500); color: #fff; }
.choice.selected.deep { background: var(--primary-700); border-color: var(--primary-700); } /* second chip colour: Leadership Plum */

/* Scale (1–5 likert) */
.scale { display: flex; gap: 8px; }
.scale .choice { flex: 1; justify-content: center; }

/* --- Buttons (extends styles.css) ------------------------------------------ */
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: none; }
.btn-ghost:hover { background: var(--gray-100); color: var(--text-primary); }
.btn-danger { background: #fef2f2; color: var(--red-500); border: 1px solid #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* --- Chips / badges / avatars ---------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; padding: 4px 11px; border-radius: var(--radius-full);
  background: var(--primary-50); color: var(--primary-700);
}
.chip.blue { background: #dbeafe; color: var(--blue-600); }
.chip.green { background: #d1fae5; color: var(--green-600); }
.chip.gray { background: var(--gray-100); color: var(--gray-600); }
.chip.amber { background: #fef3c7; color: var(--orange-600); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--radius-full); text-transform: capitalize;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.green { background: #d1fae5; color: var(--green-600); }
.pill.yellow { background: #fef3c7; color: var(--orange-600); }
.pill.red { background: #fee2e2; color: var(--red-500); }
.pill.gray { background: var(--gray-100); color: var(--gray-500); }
.pill.blue { background: #dbeafe; color: var(--blue-600); }
.pill.plum { background: var(--primary-100); color: var(--primary-700); }

.avatar-initials {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  color: #fff; font-weight: 600; flex-shrink: 0;
}

/* --- Tables ----------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: var(--bg-card); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
table.data th {
  text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-muted); padding: 13px 16px; border-bottom: 1px solid var(--border-color); background: var(--gray-50);
  position: sticky; top: 0;
}
table.data td { padding: 13px 16px; border-bottom: 1px solid var(--gray-100); color: var(--text-primary); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background var(--transition); }
table.data tbody tr:hover { background: var(--primary-50); }
.cell-user { display: flex; align-items: center; gap: 11px; }
.cell-user .avatar-initials { width: 34px; height: 34px; font-size: 12.5px; }
.cell-user .nm { font-weight: 600; }
.cell-user .em { font-size: 12px; color: var(--text-muted); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* --- Progress (mini, for tables) ------------------------------------------- */
.mini-progress { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.mini-progress .bar { flex: 1; height: 6px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; }
.mini-progress .bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary-500), var(--primary-400)); border-radius: inherit; }
.mini-progress .n { font-size: 12px; font-weight: 600; color: var(--text-secondary); width: 34px; text-align: right; }

/* --- Modal ------------------------------------------------------------------ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(17, 24, 39, 0.5); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--bg-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  transform: translateY(12px) scale(0.98); transition: transform var(--transition);
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--border-color); }
.modal-header h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.modal-body { padding: 24px; }
.modal-footer { padding: 18px 24px; border-top: 1px solid var(--border-color); display: flex; gap: 10px; justify-content: flex-end; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); width: 32px; height: 32px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--gray-100); color: var(--text-primary); }
.modal-close svg { width: 20px; height: 20px; }

/* --- Wizard / stepper ------------------------------------------------------- */
.wizard { max-width: 760px; margin: 0 auto; }
.stepper { display: flex; align-items: center; gap: 0; margin-bottom: 32px; }
.step { display: flex; align-items: center; gap: 10px; flex: 1; }
.step .dot {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; background: var(--gray-200); color: var(--text-muted); flex-shrink: 0;
  transition: all var(--transition);
}
.step .lbl { font-size: 12.5px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.step .line { flex: 1; height: 2px; background: var(--gray-200); margin: 0 10px; }
.step.active .dot { background: var(--primary-500); color: #fff; box-shadow: 0 0 0 4px var(--primary-100); }
.step.active .lbl { color: var(--primary-700); }
.step.done .dot { background: var(--green-500); color: #fff; }
.step.done .lbl { color: var(--text-secondary); }
.step:last-child .line { display: none; }
@media (max-width: 720px) { .step .lbl { display: none; } }

.wizard-step { display: none; animation: fadeIn 0.35s ease; }
.wizard-step.active { display: block; }
.wizard-step h2 { font-family: var(--font-display); font-size: 23px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 6px; }
.wizard-step .step-sub { color: var(--text-secondary); font-size: 14px; margin-bottom: 26px; }
.wizard-actions { display: flex; justify-content: space-between; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--border-color); }

/* --- Empty states / notices ------------------------------------------------- */
.empty {
  text-align: center; padding: 46px 24px; color: var(--text-secondary);
  border: 1.5px dashed var(--border-color); border-radius: var(--radius-lg); background: var(--gray-50);
}
.empty .ic { width: 52px; height: 52px; border-radius: 50%; background: var(--primary-100); color: var(--primary-500); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.empty .ic svg { width: 26px; height: 26px; }
.empty h3 { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.empty p { font-size: 13.5px; max-width: 380px; margin: 0 auto 16px; }

.notice { padding: 13px 16px; border-radius: var(--radius); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.notice.info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.notice.warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.notice.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.notice svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.notice code { background: rgba(0, 0, 0, 0.06); padding: 2px 6px; border-radius: 5px; font-size: 12px; word-break: break-all; }

/* --- Match / score visuals -------------------------------------------------- */
.score-ring { position: relative; width: 92px; height: 92px; flex-shrink: 0; }
.score-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.score-ring .track { fill: none; stroke: var(--gray-200); stroke-width: 8; }
.score-ring .val { fill: none; stroke: url(#scoreGrad); stroke-width: 8; stroke-linecap: round; transition: stroke-dasharray 0.8s ease; }
.score-ring .num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-ring .num b { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.score-ring .num span { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.factor-bars { display: flex; flex-direction: column; gap: 11px; }
.factor { display: grid; grid-template-columns: 120px 1fr 38px; align-items: center; gap: 12px; }
.factor .fl { font-size: 12.5px; color: var(--text-secondary); font-weight: 500; }
.factor .fb { height: 7px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; }
.factor .fb > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary-500), var(--primary-300)); /* progress in Momentum Plum */ border-radius: inherit; }
.factor .fn { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-align: right; }

/* --- Layout helpers --------------------------------------------------------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--font-display); font-size: 27px; font-weight: 700; letter-spacing: -0.01em; } /* overline: see styles.css */
.page-head p { color: var(--text-secondary); font-size: 14.5px; margin-top: 4px; }
.section-block { margin-bottom: 28px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-color); margin-bottom: 22px; }
.tab { padding: 11px 16px; font-size: 14px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; border-top: none; border-left: none; border-right: none; }
.tab:hover { color: var(--text-secondary); }
.tab.active { color: var(--primary-600); border-bottom-color: var(--primary-500); }
.tab .count { margin-left: 7px; font-size: 11px; background: var(--gray-100); color: var(--gray-600); padding: 1px 7px; border-radius: var(--radius-full); }
.tab.active .count { background: var(--primary-100); color: var(--primary-700); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
@media (max-width: 900px) { .grid-2, .field-row, .field-row-3 { grid-template-columns: 1fr; } }

.muted { color: var(--gray-500); }

/* Display face for the page-scoped banner/section titles each page defines. */
.welcome-banner h1, .match-hero h1, .metric-card .metric-value { font-family: var(--font-display); font-weight: 700; }
.section-title { font-family: var(--font-display); font-weight: 600; }

/* Match pair rendered as the thread: dot — curve — dot. */
.pair-thread { display: inline-flex; align-items: center; gap: 0; }
.pair-thread svg { width: 34px; height: 12px; display: block; }

/* Role choice cards (Add person) */
.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  padding: 14px; border: 1.5px solid var(--border-color); border-radius: var(--radius);
  background: #fff; cursor: pointer; text-align: left; font-family: inherit;
  color: var(--text-primary); transition: all var(--transition);
}
.role-card:hover { border-color: var(--primary-300); }
.role-card.selected { border-color: var(--primary-500); background: var(--primary-50); box-shadow: 0 0 0 3px var(--primary-100); }
.role-card .rc-ic { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.role-card .rc-ic svg { width: 18px; height: 18px; }
.role-card .rc-ic.plum { background: var(--primary-50); color: var(--primary-500); }
.role-card .rc-ic.deep { background: var(--primary-100); color: var(--primary-700); }
.role-card b { font-size: 14px; font-weight: 600; }
.role-card .d { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
@media (max-width: 480px) { .role-cards { grid-template-columns: 1fr; } }

/* Respect users who prefer reduced motion (WCAG) — keep indicators, drop motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .spinner { animation: none !important; border-top-color: var(--primary-500); }
}
.hidden { display: none !important; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--gray-200); border-top-color: var(--primary-500); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast (shared) */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  color: #fff; padding: 12px 22px; border-radius: 10px; font-size: 14px; font-weight: 500;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); z-index: 2000; opacity: 0; transition: all 0.3s ease; background: #1f2937;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--green-600); }
.toast.error { background: var(--red-500); }

/* --- Responsive ------------------------------------------------------------- */
@media (max-width: 880px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { padding: 40px 32px; min-height: 300px; }
  .auth-hero-figure { display: none; }
}

/* --- Admin console: org scope + drill-down ---------------------------------- */
.org-scope {
  width: auto; min-width: 190px; max-width: 280px;
  padding: 8px 34px 8px 12px; font-size: 13.5px; font-weight: 500;
}
.header-left .org-scope { margin-left: 6px; }
@media (max-width: 640px) { .org-scope { min-width: 0; max-width: 180px; } }

.stat-sub { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.sub-muted { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

td.row-go { width: 34px; color: var(--gray-400); }
td.row-go svg { width: 16px; height: 16px; display: block; }
tr:hover td.row-go { color: var(--primary-500); }

.empty-state {
  border: 1px dashed var(--border-color); border-radius: var(--radius-lg);
  background: var(--bg-card); padding: 40px 28px; text-align: center;
}
.empty-state h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.empty-state p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; max-width: 520px; margin: 0 auto 4px; }

/* --- Landing: role orientation + admin door --------------------------------- */
.role-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 8px; }
.role-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--primary-700);
  background: var(--primary-50); border: 1px solid var(--primary-100);
  border-radius: var(--radius-full); padding: 5px 12px;
}
.role-chip svg { width: 13px; height: 13px; }
.role-caption { font-size: 12px; color: var(--text-muted); margin: 0 0 20px; }
.admin-door {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 22px; padding: 14px 16px;
  border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: var(--gray-50);
}
.admin-door strong { display: block; font-size: 13px; }
.admin-door span { font-size: 12px; color: var(--text-muted); }
.admin-door .btn { white-space: nowrap; }

/* Switch-view menu (multi-account testing) */
.view-switch { width: auto; min-width: 150px; max-width: 240px; padding: 8px 34px 8px 12px; font-size: 13px; font-weight: 600; margin-right: 12px; }
@media (max-width: 640px) { .view-switch { max-width: 150px; margin-right: 6px; } }
.view-switch-float { position: fixed; top: 14px; right: 16px; z-index: 1500; }
.view-switch-float .view-switch { margin-right: 0; box-shadow: 0 4px 14px rgba(0,0,0,0.12); background-color: #fff; }

/* --- Landing constellation: one star accelerates up out of the mesh --------- */
/* The draw easing is ease-in on purpose: the line gains speed as it climbs. */
.auth-hero-figure .fig-arc,
.auth-hero-figure .fig-arc-glow {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: figDraw 1.8s cubic-bezier(0.6, 0.04, 0.9, 0.4) 0.5s forwards;
}
.auth-hero-figure .fig-arc-glow { animation-delay: 0.55s; }
.auth-hero-figure .fig-star { opacity: 0; animation: figFade 0.5s ease-out 2.1s forwards; }
.auth-hero-figure .fig-pulse {
  transform-box: fill-box; transform-origin: center;
  animation: figPulse 3.4s ease-out 2.8s infinite;
}
.auth-hero-figure .fig-p2 { animation-delay: 4.5s; }
.auth-hero-figure .fig-twinkle { animation: figTwinkle 5.5s ease-in-out infinite alternate; }
.auth-hero-figure .fig-t2 { animation-duration: 7s; animation-delay: 1.2s; }
.auth-hero-figure .fig-t3 { animation-duration: 6.2s; animation-delay: 2.4s; }
@keyframes figDraw { to { stroke-dashoffset: 0; } }
@keyframes figFade { to { opacity: 1; } }
@keyframes figPulse {
  0% { transform: scale(1); opacity: 0.55; }
  70%, 100% { transform: scale(2.3); opacity: 0; }
}
@keyframes figTwinkle { from { fill-opacity: 0.16; } to { fill-opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) {
  .auth-hero-figure .fig-arc, .auth-hero-figure .fig-arc-glow { animation: none; stroke-dashoffset: 0; }
  .auth-hero-figure .fig-star { animation: none; opacity: 1; }
  .auth-hero-figure .fig-pulse, .auth-hero-figure .fig-twinkle { animation: none; }
}

/* --- Small screens: header controls wrap instead of forcing overflow -------- */
@media (max-width: 640px) {
  .top-header { flex-wrap: wrap; height: auto; min-height: var(--header-height); padding: 10px 12px; row-gap: 8px; }
  .header-left, .header-right { flex: 1 1 auto; min-width: 0; gap: 10px; }
  .header-right { justify-content: flex-end; }
  .org-scope, .view-switch { flex: 1 1 130px; min-width: 0; max-width: none; width: auto; }
  .admin-door { flex-direction: column; align-items: stretch; text-align: left; }
  .admin-door .btn { justify-content: center; }
}
