/* ==========================================================================
   Biharheights School — Auth UI
   Palette:  navy #1B2A4A · gold #C9A227 · paper #F7F5F1 · ink #262523
             teal (success) #2F6F6D · coral (error) #C1443C · line #E5E1D6
   Type:     Fraunces (display) / Inter (body) / Roboto Mono (codes, data)
   ========================================================================== */

:root {
  --bh-navy: #1B2A4A;
  --bh-navy-deep: #101B32;
  --bh-gold: #C9A227;
  --bh-paper: #F7F5F1;
  --bh-ink: #262523;
  --bh-muted: #756F60;
  --bh-teal: #2F6F6D;
  --bh-coral: #C1443C;
  --bh-line: #E5E1D6;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Roboto Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body.auth-body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--bh-ink);
  background: var(--bh-paper);
}

a { color: var(--bh-navy); }

/* ---------- Layout shell ------------------------------------------------ */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(260px, 38%) 1fr;
}

.auth-shell--single {
  grid-template-columns: 1fr;
  place-items: center;
  padding: 40px 20px;
}

/* ---------- Left brand panel -------------------------------------------- */

.auth-brandpanel {
  background:
    radial-gradient(circle at 15% 15%, rgba(201,162,39,0.14), transparent 45%),
    linear-gradient(160deg, var(--bh-navy) 0%, var(--bh-navy-deep) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}

.auth-brandpanel__inner {
  max-width: 320px;
  animation: bh-fade-up 0.5s ease both;
}

.crest { margin-bottom: 22px; }

.auth-brandpanel__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.1rem;
  line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: 0.2px;
}

.auth-brandpanel__tagline {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.6;
  margin: 0 0 24px;
}

.auth-brandpanel__points {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(201,162,39,0.35);
  padding-top: 18px;
}

.auth-brandpanel__points li {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.82);
  padding-left: 18px;
  position: relative;
  margin-bottom: 10px;
  line-height: 1.4;
}

.auth-brandpanel__points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  background: var(--bh-gold);
  border-radius: 50%;
}

/* ---------- Right form panel --------------------------------------------- */

.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  animation: bh-fade-up 0.5s ease both;
  animation-delay: 0.08s;
}

.auth-card__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bh-gold);
  margin: 0 0 8px;
}

.auth-card__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--bh-navy);
  margin: 0 0 8px;
}

.auth-card__subtitle {
  color: var(--bh-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 28px;
}

/* ---------- Form elements ------------------------------------------------- */

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bh-ink);
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--bh-line);
  border-radius: 8px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--bh-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder { color: #B7B2A3; }

.field input:focus-visible,
.otp-box:focus-visible {
  outline: none;
  border-color: var(--bh-navy);
  box-shadow: 0 0 0 3px rgba(27,42,74,0.14);
}

.field-hint {
  font-size: 0.78rem;
  color: var(--bh-muted);
  margin-top: 6px;
}

.field-error {
  font-size: 0.8rem;
  color: var(--bh-coral);
  margin-top: 6px;
  font-weight: 500;
}

/* ---------- Buttons -------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background-color 0.15s ease;
}

.btn--primary {
  background: var(--bh-navy);
  color: #fff;
}
.btn--primary:hover { background: var(--bh-navy-deep); }
.btn--primary:active { transform: translateY(1px); }

.btn--ghost {
  background: transparent;
  color: var(--bh-navy);
  border: 1px solid var(--bh-line);
}
.btn--ghost:hover { border-color: var(--bh-navy); }

.btn--gold {
  background: var(--bh-gold);
  color: var(--bh-navy-deep);
}
.btn--gold:hover { filter: brightness(0.95); }

/* ---------- Alerts / flash messages ---------------------------------------- */

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.86rem;
  margin-bottom: 20px;
  line-height: 1.5;
  border: 1px solid transparent;
}
.alert--error   { background: #FBEAE8; color: var(--bh-coral); border-color: #F1C9C4; }
.alert--success { background: #EAF3F1; color: var(--bh-teal);  border-color: #C9E1DC; }
.alert--info    { background: #EEF1F6; color: var(--bh-navy);  border-color: #D8DEEA; }

/* ---------- OTP digit boxes (signature element) ---------------------------- */

.otp-group {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.otp-box {
  width: 46px;
  height: 54px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 500;
  border: 1px solid var(--bh-line);
  border-bottom: 3px solid var(--bh-gold);
  border-radius: 6px;
  background: #fff;
  color: var(--bh-navy);
}

/* ---------- Links / meta rows ----------------------------------------------- */

.auth-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-top: 4px;
  margin-bottom: 22px;
}

.auth-switch {
  text-align: center;
  font-size: 0.88rem;
  color: var(--bh-muted);
  margin-top: 22px;
}
.auth-switch a { font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ---------- Footer ----------------------------------------------------------- */

.auth-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 0.76rem;
  color: var(--bh-muted);
}
.auth-footer a { color: var(--bh-muted); text-decoration: underline; }
.auth-footer__dot { margin: 0 8px; }

/* ---------- Motion ------------------------------------------------------------ */

@keyframes bh-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-brandpanel__inner, .auth-card { animation: none; }
}

/* ---------- Responsive -------------------------------------------------------- */

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brandpanel { padding: 32px 24px; }
  .auth-brandpanel__inner { max-width: none; text-align: center; }
  .auth-brandpanel__points { text-align: left; max-width: 280px; margin: 0 auto; }
  .crest { display: flex; justify-content: center; }
}

@media (max-width: 400px) {
  .otp-box { width: 40px; height: 48px; font-size: 1.2rem; }
}
