/* ============================================================
   MyLearnify – Auth Pages Stylesheet
   File: student/assets/auth.css
   ============================================================ */

:root {
  --primary:      #1a3c8f;
  --primary-dark: #122a6b;
  --primary-light:#2d54c4;
  --accent:       #f97316;
  --success:      #22c55e;
  --danger:       #ef4444;
  --warning:      #eab308;
  --text-dark:    #111827;
  --text-body:    #374151;
  --text-muted:   #6b7280;
  --border:       #e2e8f0;
  --bg-light:     #f8fafc;
  --radius:       12px;
  --radius-lg:    20px;
  --radius-full:  9999px;
  --shadow:       0 4px 20px rgba(0,0,0,.10);
  --shadow-md:    0 8px 40px rgba(0,0,0,.14);
  --font:         'Poppins', sans-serif;
  --transition:   all .25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-light);
  color: var(--text-body);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Auth Wrapper ──────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 860px) {
  .auth-wrapper { grid-template-columns: 1fr; }
}

/* ── Left Panel (Branding) ─────────────────────────────── */
.auth-left {
  background: linear-gradient(150deg, #0f1f5c 0%, #1a3c8f 45%, #2d54c4 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 50px;
  overflow: hidden;
  color: #fff;
  text-align: center;
}
.auth-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(255,255,255,.07) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(249,115,22,.15) 0%, transparent 60%);
}
.auth-left .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .3;
}
.auth-left .blob-1 { width: 320px; height: 320px; background: #f97316; top: -80px; right: -80px; }
.auth-left .blob-2 { width: 240px; height: 240px; background: #06b6d4; bottom: -60px; left: -60px; }

.auth-left-inner { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 14px; justify-content: center; margin-bottom: 48px; }
.auth-brand-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  backdrop-filter: blur(10px);
}
.auth-brand-name { font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: -.5px; }
.auth-brand-name span { color: #f97316; }

.auth-left h2 { font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 16px; line-height: 1.2; }
.auth-left p  { color: rgba(255,255,255,.75); font-size: .95rem; max-width: 340px; margin: 0 auto 40px; }

.auth-features { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.auth-feature  { display: flex; align-items: center; gap: 14px; }
.auth-feature-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; color: #f97316; flex-shrink: 0;
}
.auth-feature-text strong { display: block; color: #fff; font-size: .88rem; }
.auth-feature-text span   { color: rgba(255,255,255,.6); font-size: .78rem; }

@media (max-width: 860px) { .auth-left { display: none; } }

/* ── Right Panel (Form) ────────────────────────────────── */
.auth-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 40px;
  overflow-y: auto;
}
@media (max-width: 480px) { .auth-right { padding: 32px 20px; } }

.auth-form-wrap { width: 100%; max-width: 440px; }

/* Mobile brand header (only visible on small screens) */
.auth-mobile-brand {
  display: none;
  text-align: center;
  margin-bottom: 32px;
}
@media (max-width: 860px) { .auth-mobile-brand { display: block; } }
.auth-mobile-brand a { display: inline-flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.auth-mobile-brand a i { font-size: 1.5rem; }

.auth-title    { font-size: 1.7rem; font-weight: 800; color: var(--text-dark); margin-bottom: 6px; }
.auth-subtitle { color: var(--text-muted); font-size: .88rem; margin-bottom: 32px; }

/* ── Form Elements ─────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .8rem; font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 7px;
}
.form-label .req { color: var(--danger); }

.input-wrap { position: relative; }
.input-wrap .input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: .9rem; pointer-events: none;
}
.input-wrap input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--text-dark);
  background: #fff;
  outline: none;
  transition: var(--transition);
}
.input-wrap input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,60,143,.1); }
.input-wrap input.is-error { border-color: var(--danger); }
.input-wrap .toggle-pass {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  cursor: pointer; color: var(--text-muted); font-size: .9rem;
  background: none; border: none; padding: 0;
}
.input-wrap .toggle-pass:hover { color: var(--primary); }

.field-error { color: var(--danger); font-size: .75rem; margin-top: 5px; }

/* OTP Input */
.otp-inputs { display: flex; gap: 10px; justify-content: center; margin: 12px 0; }
.otp-inputs input {
  width: 52px; height: 58px;
  text-align: center;
  font-size: 1.5rem; font-weight: 700;
  border: 2px solid var(--border);
  border-radius: 12px;
  outline: none;
  color: var(--primary);
  transition: var(--transition);
}
.otp-inputs input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,60,143,.12); }
@media (max-width: 400px) {
  .otp-inputs input { width: 42px; height: 50px; font-size: 1.2rem; }
}

/* ── Alert Messages ────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .84rem;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert i { flex-shrink: 0; margin-top: 2px; }
.alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.alert-danger  { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-info    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.alert-warning { background: #fefce8; color: #ca8a04; border: 1px solid #fde68a; }

/* Dev OTP box */
.dev-otp-box {
  background: #fefce8;
  border: 2px dashed #f97316;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: .84rem;
  color: #92400e;
}
.dev-otp-box strong { display: block; font-size: 1.6rem; letter-spacing: 8px; color: #ea580c; margin: 4px 0; }
.dev-otp-box .dev-label { font-size: .7rem; color: #b45309; }

/* ── Button ────────────────────────────────────────────── */
.btn-auth {
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}
.btn-auth:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,60,143,.35); }
.btn-auth:disabled { opacity: .65; cursor: not-allowed; transform: none; }

.btn-auth-outline {
  width: 100%;
  padding: 12px 20px;
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-full);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: var(--transition);
  text-align: center;
  display: block;
  margin-top: 10px;
}
.btn-auth-outline:hover { background: var(--primary); color: #fff; }

/* ── Divider ───────────────────────────────────────────── */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { color: var(--text-muted); font-size: .78rem; white-space: nowrap; }

/* ── Footer links ──────────────────────────────────────── */
.auth-footer-link { text-align: center; margin-top: 24px; font-size: .84rem; color: var(--text-muted); }
.auth-footer-link a { color: var(--primary); font-weight: 600; }
.auth-footer-link a:hover { text-decoration: underline; }

/* ── Password strength ─────────────────────────────────── */
.pwd-strength { margin-top: 6px; }
.pwd-strength-bar { height: 4px; border-radius: 4px; background: var(--border); overflow: hidden; margin-bottom: 4px; }
.pwd-strength-fill { height: 100%; border-radius: 4px; width: 0%; transition: width .35s ease, background .35s ease; }
.pwd-strength-text { font-size: .72rem; color: var(--text-muted); }

/* ── OTP page specifics ────────────────────────────────── */
.otp-email-badge {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: .84rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 20px;
  word-break: break-all;
}
.otp-email-badge i { margin-right: 6px; }

.otp-resend { text-align: center; margin-top: 16px; font-size: .82rem; color: var(--text-muted); }
.otp-resend a { color: var(--primary); font-weight: 600; cursor: pointer; }
.otp-timer  { color: var(--accent); font-weight: 700; }

/* ── Progress Steps ────────────────────────────────────── */
.auth-steps { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 32px; }
.auth-step { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.auth-step-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700;
  border: 2px solid var(--border);
  color: var(--text-muted);
  background: #fff;
  transition: var(--transition);
}
.auth-step.done .auth-step-circle  { background: var(--success); border-color: var(--success); color: #fff; }
.auth-step.active .auth-step-circle{ background: var(--primary); border-color: var(--primary); color: #fff; }
.auth-step-label { font-size: .65rem; color: var(--text-muted); }
.auth-step.active .auth-step-label { color: var(--primary); font-weight: 600; }
.auth-step-line { flex: 1; height: 2px; background: var(--border); min-width: 36px; }
.auth-step-line.done { background: var(--success); }
.auth-step-line.active { background: var(--primary); }

/* ── Back to site link ─────────────────────────────────── */
.back-to-site { text-align: center; margin-top: 28px; }
.back-to-site a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8rem; color: var(--text-muted);
}
.back-to-site a:hover { color: var(--primary); }
