/* EDU — Ultra premium login & auth */

.auth-ultra {
  position: relative;
  overflow-x: hidden;
}

.auth-ultra-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(139, 53, 255, 0.22), transparent 38%),
    radial-gradient(circle at 88% 8%, rgba(255, 179, 0, 0.14), transparent 32%),
    radial-gradient(circle at 70% 92%, rgba(11, 20, 38, 0.18), transparent 36%),
    linear-gradient(165deg, #faf7ff 0%, #f3ebff 38%, #ffffff 72%, #f8f4ff 100%);
}

.auth-ultra-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: authUltraFloat 18s ease-in-out infinite;
}

.auth-ultra-orb--1 {
  width: 280px;
  height: 280px;
  top: -80px;
  inset-inline-start: -60px;
  background: rgba(11, 20, 38, 0.35);
}

.auth-ultra-orb--2 {
  width: 220px;
  height: 220px;
  top: 42%;
  inset-inline-end: -70px;
  background: rgba(251, 191, 36, 0.28);
  animation-delay: -6s;
}

.auth-ultra-orb--3 {
  width: 180px;
  height: 180px;
  bottom: -40px;
  inset-inline-start: 28%;
  background: rgba(11, 20, 38, 0.3);
  animation-delay: -11s;
}

@keyframes authUltraFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(12px, -18px) scale(1.04); }
  66% { transform: translate(-10px, 14px) scale(0.96); }
}

.auth-ultra-screen {
  position: relative;
  z-index: 1;
}

@media (min-width: 860px) {
  .auth-ultra-screen {
    min-height: 100vh;
    align-items: center;
  }
}

/* Brand panel */
.auth-ultra-brand {
  min-height: 320px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.28), transparent 34%),
    radial-gradient(circle at 85% 75%, rgba(255, 179, 0, 0.12), transparent 30%),
    linear-gradient(145deg, #070D18 0%, #0B1426 45%, #152238 78%, #152238 100%);
  box-shadow:
    0 32px 80px rgba(11, 20, 38, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.auth-ultra-brand::before {
  width: 260px;
  height: 260px;
  top: -100px;
  inset-inline-start: -80px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-ultra-brand::after {
  width: 180px;
  height: 180px;
  bottom: -60px;
  inset-inline-end: -40px;
  background: rgba(255, 255, 255, 0.06);
}

.auth-ultra-logo-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
}

.auth-ultra-logo-wrap .ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.auth-ultra-logo-wrap .ring-a {
  width: 120px;
  height: 120px;
  animation: authUltraSpin 16s linear infinite;
}

.auth-ultra-logo-wrap .ring-b {
  width: 92px;
  height: 92px;
  animation: authUltraSpin 11s linear reverse infinite;
  border-color: rgba(255, 255, 255, 0.14);
}

@keyframes authUltraSpin {
  to { transform: rotate(360deg); }
}

.auth-ultra-brand .auth-logo-pro {
  position: relative;
  z-index: 2;
  width: 76px;
  height: 76px;
  margin: 0;
  border-radius: 22px;
  font-size: 26px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
}

.auth-ultra-brand h1 {
  font-size: clamp(28px, 5vw, 38px);
  letter-spacing: -0.5px;
}

.auth-ultra-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 340px;
  margin-top: 22px;
}

.auth-ultra-metric {
  padding: 12px 8px;
  border-radius: 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.auth-ultra-metric strong {
  display: block;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
}

.auth-ultra-metric span {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 800;
  opacity: 0.88;
  line-height: 1.3;
}

.auth-trust-row {
  margin-top: 16px;
}

.auth-trust-pill {
  backdrop-filter: blur(8px);
}

/* Form card — glass */
.auth-ultra-card {
  position: relative;
  border-radius: 32px;
  padding: 24px 22px 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 28px 70px rgba(31, 18, 51, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.auth-ultra-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(139, 53, 255, 0.35), rgba(255, 255, 255, 0.2), rgba(11, 20, 38, 0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.auth-ultra-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-ultra-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(11, 20, 38, 0.1);
  color: #0B1426;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(11, 20, 38, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-ultra-back:active {
  transform: scale(0.98);
}

.auth-ultra-back svg {
  width: 16px;
  height: 16px;
}

.auth-ultra-lang-switch {
  display: flex;
  align-items: center;
}

.auth-ultra-lang-switch .edu-lang-switch {
  padding: 0;
  margin: 0;
  max-width: none;
  gap: 5px;
}

.auth-ultra-lang-switch .edu-lang-dropdown__trigger {
  min-height: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 12px;
}

.auth-switch-pro {
  height: auto;
  padding: 5px;
  border-radius: 20px;
  background: rgba(245, 239, 255, 0.95);
  border: 1px solid rgba(11, 20, 38, 0.1);
  margin-bottom: 20px;
}

.auth-switch-pro a {
  min-height: 50px;
  border-radius: 15px;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.auth-switch-pro a.active {
  background: linear-gradient(135deg, #0B1426 0%, #152238 55%, #152238 100%);
  box-shadow: 0 12px 28px rgba(11, 20, 38, 0.28);
}

.auth-ultra-form-head {
  margin-bottom: 20px;
  padding-bottom: 0;
  border-bottom: 0;
  text-align: center;
}

.auth-ultra-form-head .auth-form-head__title {
  font-size: 22px;
  background: linear-gradient(135deg, #191919, #0B1426);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-ultra-form-head .auth-form-head__sub {
  font-size: 13px;
  max-width: 32ch;
  margin-inline: auto;
}

.auth-ultra-card .auth-field input:not([type="checkbox"]) {
  height: 56px;
  border-radius: 18px;
  border-color: rgba(11, 20, 38, 0.14);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.auth-ultra-card .auth-field input:focus {
  border-color: #152238;
  box-shadow:
    0 0 0 4px rgba(11, 20, 38, 0.12),
    0 12px 28px rgba(11, 20, 38, 0.08);
  transform: translateY(-1px);
}

.auth-ultra-card .auth-field__icon {
  color: #152238;
}

.auth-submit-pro {
  position: relative;
  overflow: hidden;
  min-height: 58px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.auth-ultra-card .auth-submit-pro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-ultra-card .auth-submit-pro::after {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  animation: authUltraShine 4s ease-in-out infinite;
}

@keyframes authUltraShine {
  0%, 100% { inset-inline-start: -120%; }
  50% { inset-inline-start: 140%; }
}

.auth-submit-pro svg {
  width: 18px;
  height: 18px;
}

.auth-ultra-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 4px;
  color: #9b8db8;
  font-size: 11px;
  font-weight: 800;
}

.auth-ultra-divider::before,
.auth-ultra-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(11, 20, 38, 0.15), transparent);
}

.auth-footer-pro {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(11, 20, 38, 0.08);
}

.auth-footer-pro a {
  padding: 8px 12px;
  border-radius: 12px;
  transition: background 0.15s;
}

.auth-footer-pro a:hover {
  background: rgba(245, 240, 255, 0.9);
}

.auth-alert-pro.error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 18px;
  animation: authUltraShake 0.45s ease;
}

@keyframes authUltraShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.auth-ultra-invite {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

/* Role dropdown */
.auth-form-grid--basic {
  grid-template-columns: 1fr;
}

.auth-role-select-wrap {
  position: relative;
}

.auth-role-select-wrap .auth-role-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-inline-end: 52px;
  font-weight: 700;
  color: #191919;
  background: #fff;
}

.auth-role-select-wrap .auth-role-select:focus {
  border-color: #000000;
  box-shadow: 0 0 0 4px rgba(13, 27, 62, 0.1);
}

.auth-role-select-wrap .auth-role-select__icon {
  inset-inline-end: 38px;
  color: #64748b;
  pointer-events: none;
}

.auth-role-select-wrap::after {
  content: "";
  position: absolute;
  inset-inline-end: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -5px;
  border-right: 2px solid #8b7aa3;
  border-bottom: 2px solid #8b7aa3;
  transform: rotate(45deg);
  pointer-events: none;
}

@media (min-width: 640px) {
  .auth-form-grid--basic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-input--role {
    grid-column: 1 / -1;
  }
}

.auth-role-extras[hidden] {
  display: none !important;
}

.auth-role-panel[hidden] {
  display: none !important;
}

@media (max-width: 859px) {
  .auth-ultra-screen {
    justify-content: flex-start;
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .auth-ultra-brand {
    min-height: auto;
    padding: 28px 20px 24px;
    border-radius: 28px;
  }

  .auth-ultra-metrics {
    max-width: none;
  }

  .auth-ultra-card {
    border-radius: 28px;
    padding: 20px 18px 18px;
  }

  .auth-trust-row {
    display: none;
  }
}

.auth-brand-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-brand-kicker svg {
  width: 14px;
  height: 14px;
  opacity: 0.95;
}

[dir="rtl"] .auth-ultra-back svg,
[dir="rtl"] .auth-submit-pro svg {
  transform: scaleX(-1);
}

@media (prefers-reduced-motion: reduce) {
  .auth-ultra-orb,
  .auth-ultra-logo-wrap .ring-a,
  .auth-ultra-logo-wrap .ring-b,
  .auth-ultra-card .auth-submit-pro::after {
    animation: none;
  }
}
