:root {
  --auth-bg: #0b1220;
  --auth-surface: #151f32;
  --auth-surface-alt: #1c2940;
  --auth-border: rgba(148, 163, 184, 0.14);
  --auth-text: #f8fafc;
  --auth-muted: #94a3b8;
  --auth-accent: #38bdf8;
  --auth-accent-strong: #0ea5e9;
  --auth-danger: #ef4444;
  --auth-warning: #eab308;
  --auth-radius: 18px;
  --auth-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.auth-page {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Raleway", sans-serif;
  color: var(--auth-text);
  background: radial-gradient(circle at top, #172554 0%, var(--auth-bg) 42%, #020617 100%);
  -webkit-font-smoothing: antialiased;
}

.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 20%, transparent 80%);
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  width: min(100%, 420px);
  border-radius: 24px;
  border: 1px solid var(--auth-border);
  background: linear-gradient(180deg, rgba(28, 41, 64, 0.95) 0%, rgba(21, 31, 50, 0.98) 100%);
  box-shadow: var(--auth-shadow);
  padding: 32px 28px 28px;
  backdrop-filter: blur(12px);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
}

.auth-brand__logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 16px;
  filter: drop-shadow(0 8px 24px rgba(56, 189, 248, 0.25));
}

.auth-brand__eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--auth-accent);
  font-weight: 600;
}

.auth-brand__title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}

.auth-brand__subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--auth-muted);
  max-width: 28ch;
}

.auth-alerts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.auth-alert {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid transparent;
}

.auth-alert--warning {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.28);
  color: #fde68a;
}

.auth-alert--info {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.24);
  color: #bae6fd;
}

.auth-alert__close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.auth-alert__close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.14);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-muted);
}

.auth-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid var(--auth-border);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-input-wrap:focus-within {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.05);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.auth-input-wrap__icon {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  color: var(--auth-accent);
  font-size: 15px;
}

.auth-input-wrap input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--auth-text);
  font-family: inherit;
  font-size: 15px;
}

.auth-input-wrap input::placeholder {
  color: rgba(148, 163, 184, 0.75);
}

.auth-submit {
  margin-top: 6px;
  width: 100%;
  min-height: 50px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--auth-accent), var(--auth-accent-strong));
  color: #04111f;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 14px 32px rgba(14, 165, 233, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(14, 165, 233, 0.4);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--auth-border);
  text-align: center;
  font-size: 14px;
  color: var(--auth-muted);
}

.auth-footer a {
  color: var(--auth-accent);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-footer a:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

.auth-email-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--auth-border);
  background: rgba(56, 189, 248, 0.08);
  color: #bae6fd;
  font-size: 13px;
  font-weight: 500;
  max-width: 100%;
  word-break: break-all;
}

.auth-email-badge i {
  flex-shrink: 0;
  color: var(--auth-accent);
  font-size: 12px;
}

.auth-otp-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-otp-input {
  width: 100%;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.42em;
  padding: 16px 16px 16px calc(16px + 0.21em);
  border-radius: 14px;
  border: 1px solid var(--auth-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--auth-text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  -moz-appearance: textfield;
}

.auth-otp-input::-webkit-outer-spin-button,
.auth-otp-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.auth-otp-input:focus {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.05);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.auth-otp-input::placeholder {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: normal;
  color: rgba(148, 163, 184, 0.75);
}

.auth-otp-hint {
  margin: 0;
  font-size: 12px;
  text-align: center;
  color: var(--auth-muted);
}

@media (max-width: 480px) {
  .auth-card {
    padding: 26px 20px 22px;
    border-radius: 20px;
  }

  .auth-brand__title {
    font-size: 22px;
  }
}
