/* Educircle Website V2 — Auth pages (login / register / password reset)
   Clean V2 auth shell: minimal brand header, centred card, V2 tokens.
   No legacy chrome, no chat widget. Mobile-first. Depends on tokens.css +
   components.css (.btn, .container). */

.auth-v2 {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 520px at 50% -10%, rgba(0, 129, 250, 0.10), transparent 60%),
    linear-gradient(180deg, var(--c-surface-2) 0%, var(--c-surface-3) 100%);
  color: var(--c-ink);
  font-family: var(--font-sans);
}

/* ---- header ---- */
.auth-header { padding-block: var(--sp-5); }
.auth-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}
.auth-header__logo { display: inline-flex; }
.auth-header__logo img { height: 38px; width: auto; display: block; }
.auth-header__back {
  color: var(--c-muted);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.auth-header__back:hover { color: var(--c-primary); }

/* ---- main / card ---- */
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6) var(--gutter) var(--sp-10);
}
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.auth-card--wide { max-width: 520px; }

.auth-card__brand { text-align: center; margin-bottom: var(--sp-6); }
.auth-card__brand img { height: 40px; width: auto; margin: 0 auto var(--sp-4); display: block; }
.auth-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-extrabold);
  color: var(--c-navy);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-snug);
  margin: 0;
}
.auth-subtitle {
  margin: var(--sp-2) 0 0;
  color: var(--c-muted);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

/* ---- fields ---- */
.auth-field { margin-bottom: var(--sp-5); }
.auth-label {
  display: block;
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--c-ink);
  margin-bottom: var(--sp-2);
}
.auth-input {
  width: 100%;
  height: 50px;
  padding: 0 var(--sp-4);
  font-size: var(--fs-body);
  font-family: inherit;
  color: var(--c-ink);
  background: var(--c-surface);
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-md);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  appearance: none;
}
.auth-input::placeholder { color: #9AA8B6; }
.auth-input:focus {
  outline: none;
  border-color: var(--c-vibrant);
  box-shadow: var(--sh-focus);
}
.auth-input.is-invalid { border-color: #B3261E; }
.auth-input[readonly] { background: var(--c-surface-2); color: var(--c-muted); }

.auth-input-wrap { position: relative; }
.auth-input-wrap .auth-input { padding-right: 3rem; }
.auth-toggle {
  position: absolute;
  top: 50%;
  right: var(--sp-3);
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--c-muted);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  padding: var(--sp-2);
}
.auth-toggle:hover { color: var(--c-primary); }

.auth-error { display: block; margin-top: var(--sp-2); color: #B3261E; font-size: var(--fs-small); }

/* status / info alerts */
.auth-alert {
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-small);
  line-height: var(--lh-body);
  margin-bottom: var(--sp-5);
}
.auth-alert--success { background: #EAF6EC; color: #2C6B33; border: 1px solid #CDE8D2; }
.auth-alert--error { background: #FBEAE9; color: #8C1D17; border: 1px solid #F3CFCC; }

/* ---- buttons ---- */
.btn--block { width: 100%; justify-content: center; }
.auth-card .btn { margin-top: var(--sp-2); }

/* ---- meta row (remember / forgot) ---- */
.auth-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  font-size: var(--fs-small);
}
.auth-remember { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--c-muted); cursor: pointer; }
.auth-remember input { width: 16px; height: 16px; accent-color: var(--c-primary); }
.auth-link { color: var(--c-vibrant); text-decoration: none; font-weight: var(--fw-semibold); }
.auth-link:hover { text-decoration: underline; }

/* ---- alternate action / tertiary CTA ---- */
.auth-alt {
  margin: var(--sp-6) 0 0;
  text-align: center;
  color: var(--c-muted);
  font-size: var(--fs-small);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: var(--sp-6) 0;
  color: var(--c-muted);
  font-size: var(--fs-small);
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--c-line); }
.auth-tertiary {
  display: block;
  margin-top: var(--sp-4);
  text-align: center;
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--c-green-600);
  text-decoration: none;
}
.auth-tertiary:hover { text-decoration: underline; }

/* ---- register: benefits + OTP ---- */
.auth-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-3);
}
.auth-benefits li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  color: var(--c-ink);
  font-size: var(--fs-small);
  line-height: var(--lh-body);
}
.auth-benefits li::before {
  content: "✓";
  color: var(--c-green-btn);
  font-weight: var(--fw-bold);
  flex: 0 0 auto;
}
.auth-benefits-title {
  display: block;
  font-weight: var(--fw-bold);
  color: var(--c-navy);
  margin: var(--sp-6) 0 var(--sp-3);
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.auth-trust { display: block; margin-top: var(--sp-4); color: var(--c-muted); font-size: var(--fs-eyebrow); text-align: center; }

/* OTP modal */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  background: rgba(2, 20, 44, 0.55);
  backdrop-filter: blur(3px);
}
.auth-modal.is-open { display: flex; }
.auth-modal__panel {
  width: 100%;
  max-width: 460px;
  background: var(--c-surface);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  position: relative;
}
.auth-modal__close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  background: transparent;
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--c-muted);
  cursor: pointer;
}
.otp-row { display: flex; gap: var(--sp-2); justify-content: center; margin: var(--sp-6) 0; }
.otp-field {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: var(--fw-bold);
  color: var(--c-navy);
  background: var(--c-surface-2);
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-md);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.otp-field:focus { outline: none; border-color: var(--c-vibrant); background: #fff; box-shadow: var(--sh-focus); }
@media (max-width: 480px) {
  .otp-field { width: 42px; height: 50px; font-size: 1.25rem; }
}

/* ---- footer ---- */
.auth-footer {
  padding-block: var(--sp-6);
  color: var(--c-muted);
  font-size: var(--fs-small);
}
.auth-footer .container { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.auth-footer a { color: var(--c-muted); text-decoration: none; }
.auth-footer a:hover { color: var(--c-primary); }

@media (max-width: 480px) {
  .auth-footer .container { flex-direction: column; gap: var(--sp-2); text-align: center; }
}
