/* =========================================
   Auth — Premium Login & Register
   Ayurveda Library Theme
   ========================================= */

#auth-page {
  background: #f0f4f2;
  min-height: 100vh;
}

/* ── Main Layout ── */
.auth-main {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
}

.auth-wrap {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(12,62,49,0.14), 0 8px 24px rgba(0,0,0,0.06);
  min-height: 620px;
  align-self: flex-start;
  margin-top: 1rem;
}

/* ── Left Branding Panel ── */
.auth-brand {
  background: linear-gradient(155deg, #0c3e31 0%, #0d5c43 55%, #1a7a5e 100%);
  padding: 3.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  color: #fff;
  text-align: left;
}

.auth-brand::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(195,141,78,0.12);
  pointer-events: none;
}

.auth-brand::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.auth-brand-top img {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  display: block;
}

.auth-brand-top h1 {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.auth-brand-top p {
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.auth-brand-tagline {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.6;
  margin-top: 2rem;
  font-style: italic;
  border-left: 3px solid var(--accent-gold, #d4a35a);
  padding-left: 1rem;
}

.auth-brand-stats {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: auto;
  padding-top: 2.5rem;
}

.auth-brand-stat {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
}

.auth-brand-stat i {
  color: var(--accent-gold, #d4a35a);
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* ── Right Form Panel ── */
.auth-card {
  background: #fff;
  padding: 3rem 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-gold, #d4a35a), var(--primary-teal, #0d9488));
}

/* ── Toggle Tabs ── */
.auth-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: #f3f7f5;
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 2rem;
}

.auth-toggle-btn {
  border: none;
  background: transparent;
  padding: 0.75rem 1rem;
  border-radius: 11px;
  font-weight: 700;
  font-size: 0.92rem;
  color: #6b7c74;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.25s ease;
}

.auth-toggle-btn.is-active {
  background: #fff;
  color: var(--primary-teal, #0d5c43);
  box-shadow: 0 2px 10px rgba(12,62,49,0.12);
}

/* ── Panel ── */
.auth-panel { display: none; }
.auth-panel.is-active { display: block; }

.auth-heading {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  color: var(--primary-teal, #0d5c43);
  margin-bottom: 0.3rem;
}

.auth-sub {
  color: #6b7c74;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* ── Alerts ── */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 1rem;
  line-height: 1.45;
}
.auth-alert-error   { background: rgba(220,53,69,0.08); border: 1px solid rgba(220,53,69,0.18); color: #b02a37; }
.auth-alert-success { background: rgba(27,138,90,0.1); border: 1px solid rgba(27,138,90,0.2); color: #0c5c3a; }
.auth-alert-info    { background: rgba(12,62,49,0.06); border: 1px solid rgba(12,62,49,0.1); color: var(--primary-teal,#0d5c43); }

/* ── Fields ── */
.auth-field { margin-bottom: 1.1rem; }

.auth-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  color: #2d3a35;
}
.auth-label .req { color: #c0392b; }

.auth-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #f7faf9;
  border: 1.5px solid #dde8e3;
  border-radius: 12px;
  padding: 0 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-input-wrap:focus-within {
  border-color: var(--primary-teal, #0d5c43);
  box-shadow: 0 0 0 3px rgba(13,92,67,0.1);
  background: #fff;
}
.auth-input-wrap i {
  color: #8ba89c;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.auth-input,
.auth-select {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.82rem 0;
  font: inherit;
  font-size: 0.95rem;
  color: #1a2b25;
  min-width: 0;
}
.auth-input:focus, .auth-select:focus { outline: none; }
.auth-input::placeholder { color: #a8bdb6; }
.auth-select { cursor: pointer; }

.auth-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.auth-otp-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: end;
}

/* ── Buttons ── */
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0.75rem 1.2rem;
  white-space: nowrap;
}
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-btn-primary {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.95rem 1.25rem;
  background: linear-gradient(135deg, #0c3e31, #1a7a5e);
  color: #fff;
  box-shadow: 0 4px 16px rgba(12,62,49,0.22);
  font-size: 1rem;
  border-radius: 12px;
}
.auth-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(12,62,49,0.3);
}

.auth-btn-outline {
  background: transparent;
  color: var(--primary-teal,#0d5c43);
  border: 2px solid var(--primary-teal,#0d5c43);
  border-radius: 12px;
}
.auth-btn-outline:hover:not(:disabled) { background: var(--primary-teal,#0d5c43); color: #fff; }

.auth-btn-gold {
  background: linear-gradient(135deg, #d4a35a, #e5ab64);
  color: #fff;
  border-radius: 12px;
  font-size: 0.88rem;
}
.auth-btn-gold:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(195,141,78,0.35); }

/* ── Other elements ── */
.auth-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0c5c3a;
  background: rgba(27,138,90,0.12);
  border: 1px solid rgba(27,138,90,0.2);
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}

.auth-forgot { text-align: right; margin: -0.35rem 0 0.9rem; }
.auth-forgot a { color: var(--accent-gold,#d4a35a); font-weight: 600; font-size: 0.88rem; text-decoration: none; }
.auth-forgot a:hover { text-decoration: underline; }

.auth-eye-btn { border: none; background: transparent; color: #8ba89c; cursor: pointer; padding: 0.25rem; }

.auth-divider {
  text-align: center;
  color: #a8bdb6;
  font-size: 0.82rem;
  margin: 1.25rem 0 1rem;
  position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: #dde8e3;
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.nav-login-link { font-weight: 700 !important; color: var(--accent-gold,#d4a35a) !important; }

/* ── Gate Card ── */
.auth-gate-card {
  max-width: 520px; margin: 0 auto; text-align: center;
  padding: 2.5rem 2rem;
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.78);
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(12,62,49,0.08);
}
.auth-gate-icon {
  width: 72px; height: 72px; margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-teal,#0d5c43), #1a7a5e);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem;
}
.auth-gate-title { font-family: var(--font-serif); color: var(--primary-teal,#0d5c43); font-size: 1.5rem; margin-bottom: 0.5rem; }
.auth-gate-text { color: #6b7c74; line-height: 1.55; margin-bottom: 1.5rem; }
.auth-gate-actions { display: flex; flex-direction: column; gap: 0.75rem; max-width: 280px; margin: 0 auto; }
.auth-gate-note { margin-top: 1.25rem; font-size: 0.82rem; color: #6b7c74; }

/* ── Dashboard ── */
.nav-user-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-weight: 600; font-size: 0.88rem; color: var(--primary-teal,#0d5c43);
  padding: 0.35rem 0.75rem;
  background: rgba(12,62,49,0.06); border-radius: 50px;
}
.student-dashboard { max-width: 1100px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.dash-loading { text-align: center; padding: 4rem 1rem; color: #6b7c74; }
.dash-loading i { font-size: 2.5rem; color: var(--accent-gold,#d4a35a); margin-bottom: 1rem; }
.dash-hero {
  background: linear-gradient(135deg, rgba(12,62,49,0.95), rgba(16,86,67,0.9));
  color: #fff; border-radius: 24px; padding: 2rem; margin-bottom: 1.5rem;
  box-shadow: 0 16px 40px rgba(12,62,49,0.15);
}
.dash-hero h1 { font-family: var(--font-serif); font-size: clamp(1.5rem,4vw,2rem); margin: 0 0 0.35rem; }
.dash-hero p { margin: 0; opacity: 0.9; font-size: 0.95rem; }
.dash-hero-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.dash-pill { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.15); border-radius: 999px; padding: 0.35rem 0.85rem; font-size: 0.82rem; }
.dash-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.5rem; }
.dash-stat-card { background: var(--light-card,#fff); border: 1px solid #dde8e3; border-radius: 18px; padding: 1.25rem; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,0.04); }
.dash-stat-num { display: block; font-size: 1.8rem; font-weight: 800; color: var(--primary-teal,#0d5c43); line-height: 1.1; }
.dash-stat-label { font-size: 0.8rem; color: #6b7c74; margin-top: 0.35rem; }
.dash-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }
.dash-section { background: var(--light-card,#fff); border: 1px solid #dde8e3; border-radius: 20px; padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 8px 24px rgba(0,0,0,0.04); }
.dash-section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.dash-section-head h2 { font-family: var(--font-serif); color: var(--primary-teal,#0d5c43); font-size: 1.25rem; margin: 0; }
.dash-table-wrap { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.dash-table th, .dash-table td { padding: 0.75rem 0.85rem; text-align: left; border-bottom: 1px solid #dde8e3; }
.dash-table th { color: #6b7c74; font-weight: 600; font-size: 0.8rem; }
.dash-badge { display: inline-block; padding: 0.2rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.dash-badge-good { background: rgba(46,204,113,0.15); color: #1e8449; }
.dash-badge-mid { background: rgba(195,141,78,0.15); color: #9a6b2f; }
.dash-badge-low { background: rgba(231,76,60,0.12); color: #c0392b; }
.dash-empty { text-align: center; padding: 2rem 1rem; color: #6b7c74; }
.dash-empty i { font-size: 2rem; color: var(--accent-gold,#d4a35a); margin-bottom: 0.75rem; }

/* Quiz intro */
.quiz-intro-card { max-width: 640px; margin: 0 auto; text-align: center; padding: 2.5rem 2rem; background: rgba(255,255,255,0.62); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.78); border-radius: 24px; box-shadow: 0 12px 40px rgba(12,62,49,0.08); }
.quiz-intro-card h2 { font-family: var(--font-serif); color: var(--primary-teal,#0d5c43); margin-bottom: 0.75rem; }
.quiz-intro-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; margin: 1.25rem 0 1.75rem; color: #6b7c74; font-size: 0.9rem; }
.quiz-intro-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }

/* ── Responsive ── */
@media (max-width: 860px) {
  .auth-wrap {
    grid-template-columns: 1fr;
    max-width: 480px;
    border-radius: 20px;
  }
  .auth-brand {
    padding: 2.5rem 2rem;
    min-height: unset;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
  }
  .auth-brand-top { display: flex; align-items: center; gap: 1rem; }
  .auth-brand-top img { width: 52px; height: 52px; margin-bottom: 0; }
  .auth-brand-tagline { display: none; }
  .auth-brand-stats { flex-direction: row; flex-wrap: wrap; padding-top: 0; margin-top: 0; gap: 0.65rem; }
  .auth-brand-stat { font-size: 0.8rem; }
  .auth-card { padding: 2rem 1.5rem 2rem; }
}

@media (max-width: 540px) {
  .auth-main { padding: 1rem 0.75rem 2rem; }
  .auth-brand { padding: 1.5rem 1.25rem; }
  .auth-brand-stats { display: none; }
  .auth-row-2 { grid-template-columns: 1fr; }
  .auth-otp-row { grid-template-columns: 1fr; }
  .auth-card { padding: 1.5rem 1.25rem; }
}

@media (max-width: 900px) {
  .dash-stats { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .student-dashboard { padding: 1.25rem 1rem 3rem; }
  .dash-hero { padding: 1.5rem; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
}
