:root {
  color-scheme: dark;
  --auth-bg-top: #090d1b;
  --auth-bg-bottom: #050811;
  --auth-card: rgba(16, 23, 42, 0.88);
  --auth-input: #0b1322;
  --auth-soft: #0e1526;
  --auth-border: #1e2a44;
  --auth-border-soft: rgba(80, 120, 255, 0.18);
  --auth-primary: #4f7cff;
  --auth-primary-strong: #3e66f5;
  --auth-secondary: #8b5cf6;
  --auth-text: #f8fafc;
  --auth-muted: #98a2b3;
  --auth-dim: #64748b;
  --auth-success: #34d399;
  --auth-error: #f87171;
  --auth-warning: #fbbf24;
  --auth-radius: 18px;
  --auth-shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--auth-bg-bottom); }

body.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--auth-text);
  background:
    radial-gradient(circle at 50% 18%, rgba(79, 124, 255, 0.18), transparent 34%),
    radial-gradient(circle at 10% 70%, rgba(139, 92, 246, 0.08), transparent 30%),
    linear-gradient(180deg, var(--auth-bg-top), var(--auth-bg-bottom));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.auth-art {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-art::before,
.auth-art::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 24%;
  border: 1px solid rgba(79, 124, 255, 0.08);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.auth-art::before { width: min(72vw, 760px); aspect-ratio: 1; }
.auth-art::after { width: min(96vw, 1040px); aspect-ratio: 1; opacity: .7; }

.auth-grid {
  position: absolute;
  inset: auto -10% -34% -10%;
  height: 66%;
  opacity: .13;
  transform: perspective(520px) rotateX(62deg);
  transform-origin: center bottom;
  background-image:
    linear-gradient(rgba(79, 124, 255, .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 124, 255, .22) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to top, #000 20%, transparent 85%);
}

.auth-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 9% 12%, rgba(255,255,255,.7) 0 1px, transparent 1.5px),
    radial-gradient(circle at 23% 7%, rgba(255,255,255,.45) 0 1px, transparent 1.5px),
    radial-gradient(circle at 43% 13%, rgba(255,255,255,.5) 0 1px, transparent 1.5px),
    radial-gradient(circle at 64% 7%, rgba(255,255,255,.65) 0 1px, transparent 1.5px),
    radial-gradient(circle at 82% 14%, rgba(255,255,255,.5) 0 1px, transparent 1.5px),
    radial-gradient(circle at 92% 31%, rgba(255,255,255,.5) 0 1px, transparent 1.5px),
    radial-gradient(circle at 12% 36%, rgba(255,255,255,.35) 0 1px, transparent 1.5px);
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 24px 24px 42px;
  display: flex;
  flex-direction: column;
}

.auth-shell.auth-shell-wide { width: min(100%, 760px); }

.auth-topbar {
  min-height: 60px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.mini-brand {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--auth-text);
  text-decoration: none;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.25px;
}

.mini-brand [data-logo] { width: 42px; height: 50px; display: grid; place-items: center; }
.mini-brand svg { width: 50px; height: 50px; display: block; }
.brand-name { white-space: nowrap; }
.brand-accent { color: var(--auth-primary); }

.language-switch { position: relative; }

.language-button {
  min-width: 94px;
  height: 46px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--auth-border-soft);
  border-radius: 999px;
  background: rgba(16, 23, 42, .78);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.language-button:hover { border-color: rgba(79, 124, 255, .55); background: var(--auth-soft); }
.language-button:active { transform: scale(.97); }

[data-language-current] { display: inline-flex; align-items: center; gap: 7px; }

.auth-flag {
  flex: 0 0 auto;
  width: 26px;
  height: 19.5px;
  line-height: 19.5px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 2px 6px rgba(0, 0, 0, .22);
}

.auth-flag--current { width: 26px; height: 19.5px; line-height: 19.5px; border-radius: 3px; }
.auth-flag--menu { width: 24px; height: 18px; line-height: 18px; }
.auth-flag--language { width: 32px; height: 24px; line-height: 24px; }
.auth-flag--country { width: 28px; height: 21px; line-height: 21px; }

.language-menu {
  position: absolute;
  z-index: 40;
  top: 48px;
  right: 0;
  width: 210px;
  padding: 7px;
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  background: rgba(16, 23, 42, .98);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .42);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.96);
  transform-origin: top right;
  transition: .18s ease;
}

.language-menu.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.language-option {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.language-option:hover,
.language-option.active { background: var(--auth-soft); }
.language-option .language-name { flex: 1; color: var(--auth-muted); }
.language-option.active .language-name { color: var(--auth-text); font-weight: 700; }
.language-check { color: var(--auth-primary); font-weight: 900; }

.auth-icon {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 auto;
}

.control-chevron { width: 15px; height: 15px; }
.language-check .auth-icon { width: 17px; height: 17px; }

.auth-screen {
  display: none;
  flex: 1;
  width: 100%;
  min-width: 0;
  animation: auth-enter .28s ease both;
}

.auth-screen.active { display: flex; flex-direction: column; }

@keyframes auth-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.welcome-screen { justify-content: space-between; padding: clamp(34px, 8vh, 92px) 0 20px; }

.welcome-top { text-align: center; }

.hero-logo-plate {
  width: 112px;
  height: 112px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(80, 120, 255, .18);
  border-radius: 29px;
  background: rgba(20, 30, 55, .58);
  box-shadow: 0 0 36px rgba(79, 124, 255, .38), inset 0 1px 0 rgba(255,255,255,.04);
  overflow: hidden;
  animation: logo-float 4.4s ease-in-out infinite;
}

.hero-logo-plate svg { width: 92px; height: 92px; display: block; }

.hero-logo-plate--compact {
  width: 88px;
  height: 88px;
  border-radius: 24px;
}

.hero-logo-plate--compact svg { width: 72px; height: 72px; }

@keyframes logo-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-9px) scale(1.035); }
}

.hero-brand {
  margin: 0;
  font-size: clamp(42px, 8vw, 54px);
  line-height: 1.05;
  letter-spacing: -1.3px;
  font-weight: 850;
}

.hero-tagline { margin: 10px 0 0; color: var(--auth-muted); font-size: 16px; }
.welcome-bottom { padding-top: 54px; }

.auth-kicker {
  margin: 0 0 8px;
  color: var(--auth-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.welcome-title,
.auth-title {
  margin: 0;
  color: var(--auth-text);
  font-size: clamp(28px, 5.5vw, 34px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -.55px;
}

.welcome-title { text-align: center; }
.welcome-title--with-icon,
.auth-title--with-icon {
  display: flex;
  align-items: center;
  gap: 11px;
}
.welcome-title--with-icon { justify-content: center; }
.title-icon { display: inline-grid; place-items: center; flex: 0 0 auto; }
.title-icon .auth-icon { width: 31px; height: 31px; stroke-width: 1.9; }
.title-icon--trophy { color: #f8bd2b; filter: drop-shadow(0 5px 10px rgba(248, 189, 43, .2)); }
.title-icon--sparkles { color: #6f96ff; filter: drop-shadow(0 5px 10px rgba(79, 124, 255, .24)); }
.welcome-subtitle,
.auth-subtitle {
  color: var(--auth-muted);
  font-size: 15px;
  line-height: 1.55;
}

.welcome-subtitle { max-width: 430px; margin: 10px auto 28px; text-align: center; }
.auth-subtitle { margin: 9px 0 26px; }

.auth-card {
  width: 100%;
  min-width: 0;
  margin: auto 0;
  padding: 28px;
  border: 1px solid rgba(80, 120, 255, .14);
  border-radius: 24px;
  background: var(--auth-card);
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(22px);
}

.profile-card { margin: 10px 0 auto; }

.role-card-shell { margin: 8px 0 auto; }
.role-heading-icon {
  width: 54px;
  height: 54px;
  margin: -2px 0 16px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(79, 124, 255, .28);
  border-radius: 16px;
  color: #8cafff;
  background: linear-gradient(145deg, rgba(79,124,255,.18), rgba(124,92,255,.1));
  box-shadow: 0 12px 28px rgba(23, 50, 125, .22);
}
.role-heading-icon .auth-icon { width: 27px; height: 27px; }
.role-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin: 4px 0 17px; }
.role-choice {
  position: relative;
  min-height: 224px;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  border: 1.5px solid var(--auth-border);
  border-radius: 18px;
  outline: 0;
  color: var(--auth-text);
  background: linear-gradient(155deg, rgba(19,28,52,.94), rgba(12,19,37,.94));
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color .18s ease, transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.role-choice:hover { transform: translateY(-2px); border-color: rgba(112,151,255,.52); background: linear-gradient(155deg, rgba(25,37,70,.96), rgba(14,22,43,.96)); }
.role-choice.selected { border-color: var(--auth-primary); background: linear-gradient(155deg, rgba(55,89,190,.22), rgba(20,29,55,.98)); box-shadow: 0 0 0 3px rgba(79,124,255,.1), 0 16px 34px rgba(0,0,0,.2); }
.role-choice-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; }
.role-choice-icon .auth-icon { width: 25px; height: 25px; }
.role-choice-icon.student { color:#84a9ff; background:rgba(79,124,255,.14); }
.role-choice-icon.teacher { color:#c4a5ff; background:rgba(139,92,246,.14); }
.role-choice-icon.parent { color:#66dfb4; background:rgba(52,211,153,.13); }
.role-choice-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.role-choice-copy strong { font-size: 17px; line-height: 1.25; }
.role-choice-copy small { margin-top: 8px; color: var(--auth-muted); font-size: 12px; line-height: 1.5; }
.role-feature { margin-top: auto; padding: 5px 8px; border-radius: 8px; color: #9eb9ff; background: rgba(79,124,255,.09); font-size: 10px; font-weight: 750; line-height: 1.2; }
.role-radio { position:absolute; top:18px; right:16px; width:21px; height:21px; display:grid; place-items:center; border:1.5px solid var(--auth-border-soft); border-radius:50%; background:var(--auth-input); }
.role-choice.selected .role-radio { border-color:var(--auth-primary); background:var(--auth-primary); }
.role-choice.selected .role-radio span { width:7px; height:7px; border-radius:50%; background:#fff; }
.role-security-note { margin: 0 0 16px; padding: 11px 13px; display:flex; align-items:flex-start; gap:9px; border:1px solid rgba(79,124,255,.15); border-radius:12px; color:var(--auth-dim); background:rgba(79,124,255,.045); font-size:11.5px; line-height:1.45; }
.role-security-note .auth-icon { width:17px; height:17px; color:#7ea3ff; }

.selected-role-banner { margin: -2px 0 22px; padding: 10px 12px; display:flex; align-items:center; gap:11px; border:1px solid rgba(79,124,255,.2); border-radius:14px; background:rgba(79,124,255,.07); }
.selected-role-icon { width:36px; height:36px; display:grid; place-items:center; border-radius:10px; color:#9cb8ff; background:rgba(79,124,255,.14); }
.selected-role-icon .auth-icon { width:19px; height:19px; }
.selected-role-banner > span:nth-child(2) { min-width:0; flex:1; display:grid; gap:2px; }
.selected-role-banner small { color:var(--auth-dim); font-size:10px; }
.selected-role-banner strong { font-size:13px; }
.selected-role-banner button { padding:7px 9px; border:0; border-radius:8px; color:#9eb9ff; background:rgba(79,124,255,.09); cursor:pointer; font:700 11px inherit; }
#profileLocationFields { display:grid; gap:17px; }

.screen-header { margin-bottom: 8px; }
.compact-brand { margin: 0 0 30px; text-align: center; font-size: 28px; font-weight: 850; }

.back-button {
  align-self: flex-start;
  margin: 0 0 22px;
  padding: 6px 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: var(--auth-muted);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}

.back-button:hover { color: var(--auth-text); }
.back-button .auth-icon { width: 18px; height: 18px; transition: transform .16s ease; }
.back-button:hover .auth-icon { transform: translateX(-2px); }

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 56px;
  border-radius: var(--auth-radius);
  cursor: pointer;
  font-size: 16px;
  font-weight: 750;
  transition: transform .16s ease, opacity .16s ease, border-color .16s ease;
}

.primary-button {
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, #5f88ff, var(--auth-primary-strong));
  box-shadow: 0 10px 28px rgba(79, 124, 255, .3);
}

.secondary-button {
  border: 1.5px solid var(--auth-border-soft);
  color: var(--auth-text);
  background: transparent;
}

.primary-button:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.secondary-button:hover:not(:disabled) { border-color: rgba(79, 124, 255, .55); background: rgba(79, 124, 255, .06); }
.primary-button:active:not(:disabled), .secondary-button:active:not(:disabled) { transform: scale(.985); }
.primary-button:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; }
.button-stack { display: grid; gap: 12px; }
.button-arrow { margin-left: 8px; font-size: 19px; }

.auth-form { display: grid; gap: 17px; }
.field { display: grid; align-content: start; gap: 8px; min-width: 0; }
.field label { color: var(--auth-muted); font-size: 13px; font-weight: 650; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.character-count { color: var(--auth-dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.text-input,
.select-input,
.phone-control {
  width: 100%;
  min-height: 54px;
  border: 1.5px solid var(--auth-border);
  border-radius: 14px;
  color: var(--auth-text);
  background: var(--auth-input);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.text-input,
.select-input { padding: 0 15px; outline: none; }
.text-input::placeholder { color: var(--auth-dim); }
.text-input:focus, .select-input:focus, .phone-control:focus-within {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(79, 124, 255, .13);
}
.text-input.invalid, .select-input.invalid { border-color: var(--auth-error); }
.select-control { position: relative; min-width: 0; }
.select-input { appearance: none; cursor: pointer; padding-right: 48px; }
.select-input:disabled { opacity: .5; cursor: not-allowed; }
.select-chevron {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: var(--auth-muted);
  pointer-events: none;
  transform: translateY(-50%) rotate(0deg);
  transition: transform .18s ease, color .18s ease, opacity .18s ease;
}
.select-chevron .auth-icon { width: 18px; height: 18px; }
.select-control.open .select-chevron { color: var(--auth-primary); transform: translateY(-50%) rotate(180deg); }
.select-control:has(.select-input:focus) .select-chevron { color: var(--auth-primary); }
.select-control:has(.select-input:disabled) .select-chevron { opacity: .42; }

.phone-control { display: flex; align-items: stretch; overflow: hidden; }
.country-trigger {
  flex: 0 0 auto;
  min-width: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--auth-border);
  background: var(--auth-soft);
  cursor: pointer;
  color: var(--auth-text);
  font-weight: 700;
}
.phone-number {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: none;
  padding: 0 14px;
  color: var(--auth-text);
  background: transparent;
}
.phone-number::placeholder { color: var(--auth-dim); }

.password-control { position: relative; height: 54px; }
.password-control .text-input { height: 54px; padding-right: 52px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--auth-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.password-toggle:hover { background: var(--auth-soft); color: var(--auth-text); }
.password-toggle .auth-icon { width: 20px; height: 20px; }

.field-hint { min-height: 18px; margin: 0; color: var(--auth-dim); font-size: 12px; line-height: 1.45; }
.field-hint.success { color: var(--auth-success); }
.field-hint.error { color: var(--auth-error); }
.field-hint.warning { color: var(--auth-warning); }

.strength-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 8px; }
.strength-bars span { height: 4px; border-radius: 99px; background: var(--auth-border); }
.strength-bars[data-strength="weak"] span:nth-child(1) { background: var(--auth-error); }
.strength-bars[data-strength="medium"] span:nth-child(-n+2) { background: var(--auth-warning); }
.strength-bars[data-strength="strong"] span { background: var(--auth-success); }

.inline-link,
.text-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--auth-primary);
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
}
.inline-link:hover, .text-link:hover { text-decoration: underline; }
.center-link { text-align: center; margin-top: 18px; }
.auth-footer-copy { margin: 24px 0 0; color: var(--auth-muted); text-align: center; font-size: 14px; }
.privacy-hint { margin: 18px 0 0; color: var(--auth-dim); text-align: center; font-size: 12px; line-height: 1.5; }

.otp-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; margin: 6px 0 4px; }
.otp-input {
  width: 100%;
  min-width: 0;
  height: 58px;
  padding: 0;
  border: 1.5px solid var(--auth-border);
  border-radius: 14px;
  outline: 0;
  background: var(--auth-input);
  color: var(--auth-text);
  text-align: center;
  font-size: 22px;
  font-weight: 800;
}
.otp-input:focus, .otp-input.filled { border-color: var(--auth-primary); background: var(--auth-soft); }
.otp-phone { color: var(--auth-text); font-weight: 700; }
.resend-row { margin-top: 18px; text-align: center; color: var(--auth-dim); font-size: 14px; }

.progress {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px 0 26px;
}
.progress-step { display: grid; place-items: center; gap: 5px; color: var(--auth-dim); font-size: 10px; }
.progress-dot {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--auth-border);
  border-radius: 50%;
  background: var(--auth-input);
  font-size: 12px;
  font-weight: 800;
}
.progress-step.active, .progress-step.done { color: var(--auth-text); }
.progress-step.active .progress-dot { border-color: var(--auth-primary); background: var(--auth-primary); }
.progress-step.done .progress-dot { border-color: var(--auth-success); color: var(--auth-success); }
.progress-check { width: 15px; height: 15px; stroke-width: 2.6; }
.progress-line { width: 52px; height: 1px; margin: 0 8px 17px; background: var(--auth-border); }
.progress-line.done { background: var(--auth-success); }

.language-choice-list { display: grid; gap: 12px; margin: 30px 0; }
.language-card {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 17px;
  border: 2px solid var(--auth-border);
  border-radius: 16px;
  background: rgba(16, 23, 42, .82);
  cursor: pointer;
}
.language-card:hover, .language-card.active { border-color: var(--auth-primary); background: var(--auth-soft); }
.language-card .name { flex: 1; font-weight: 700; }
.language-card .radio { width: 22px; height: 22px; border: 2px solid var(--auth-border); border-radius: 50%; }
.language-card.active .radio { border: 6px solid var(--auth-primary); }

.country-dialog {
  width: min(calc(100% - 28px), 460px);
  max-height: min(720px, calc(100dvh - 42px));
  padding: 0;
  border: 1px solid var(--auth-border);
  border-radius: 22px;
  color: var(--auth-text);
  background: #0d1425;
  box-shadow: var(--auth-shadow);
}
.country-dialog::backdrop { background: rgba(2, 5, 13, .78); backdrop-filter: blur(4px); }
.dialog-head { padding: 20px 20px 12px; display: flex; align-items: center; justify-content: space-between; }
.dialog-head h2 { margin: 0; font-size: 20px; }
.dialog-close { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--auth-soft); color: var(--auth-muted); cursor: pointer; }
.dialog-close:hover { color: var(--auth-text); background: rgba(79, 124, 255, .16); }
.dialog-close .auth-icon { width: 19px; height: 19px; }
.country-search { width: calc(100% - 40px); margin: 0 20px 12px; }
.country-list { max-height: 520px; overflow: auto; padding: 0 10px 12px; }
.country-item { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 8px 11px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; }
.country-item:hover, .country-item.active { background: var(--auth-soft); }
.country-item .name { flex: 1; color: var(--auth-text); }
.country-item .dial { color: var(--auth-muted); }

.toast-region { position: fixed; z-index: 100; left: 50%; bottom: 24px; width: min(calc(100% - 32px), 470px); transform: translateX(-50%); pointer-events: none; }
.toast {
  display: none;
  padding: 14px 16px;
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  color: var(--auth-text);
  background: rgba(16, 23, 42, .98);
  box-shadow: 0 16px 45px rgba(0,0,0,.4);
  font-size: 14px;
  line-height: 1.45;
}
.toast.show { display: block; animation: toast-in .2s ease both; }
.toast.error { border-color: rgba(248, 113, 113, .48); }
.toast.success { border-color: rgba(52, 211, 153, .48); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.spinner {
  width: 18px;
  height: 18px;
  display: inline-block;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
[hidden] { display: none !important; }

@media (min-width: 900px) {
  .auth-shell { padding-top: 30px; padding-bottom: 50px; }
  .auth-card { padding: 34px 38px; }
  .welcome-screen { padding-top: 7vh; }
}

@media (max-width: 560px) {
  .auth-shell { padding: 18px 18px 30px; }
  .auth-topbar { min-height: 44px; margin-bottom: 10px; }
  .mini-brand { gap: 3px; font-size: 18px; }
  .mini-brand [data-logo], .mini-brand svg { width: 34px; height: 34px; }
  .language-button { min-width: 78px; height: 40px; padding: 0 13px; font-size: 13px; }
  .language-switch { flex: 0 0 auto; }
  .auth-flag--current { width: 22px; height: 16.5px; line-height: 16.5px; }
  .auth-card { margin: 8px 0 auto; padding: 24px 19px; border-radius: 21px; }
  .welcome-screen { padding-top: 32px; }
  .welcome-bottom { padding-top: 46px; }
  .field-row { grid-template-columns: 1fr; }
  .otp-row { gap: 6px; }
  .otp-input { height: 54px; border-radius: 12px; font-size: 20px; }
  .profile-card { padding-bottom: 28px; }
  .progress-step { min-width: 0; font-size: 9px; }
  .progress-line { width: auto; min-width: 8px; max-width: 32px; flex: 1 1 20px; margin-left: 4px; margin-right: 4px; }
  .role-choice-grid { grid-template-columns: 1fr; }
  .role-choice { min-height: 0; padding: 15px; display:grid; grid-template-columns:46px 1fr 22px; align-items:start; gap:12px; }
  .role-choice-icon { width:46px; height:46px; grid-row:1; }
  .role-choice-copy { grid-column:2; }
  .role-radio { position:static; grid-column:3; grid-row:1; margin-top:2px; }
  .role-feature { margin-top:10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
