/* ============================================================
   Rahein Education — NEET Portal
   Design tokens
   ============================================================ */
:root {
  --ink: #0B1F1B;
  --ink-soft: #14332B;
  --paper: #FFFFFF;
  --surface: #F1F5F2;
  --surface-line: #DCE6DF;
  --primary: #1F7A5C;
  --primary-dark: #14513D;
  --accent: #E4572E;
  --accent-dark: #B84420;
  --text: #16241F;
  --text-muted: #52625A;
  --border: #D9E2DC;

  --font-display: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0 0 0.5em;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Header ---------------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}
.brand .mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
}
.brand .name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
}
.brand .name small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  text-decoration: none;
  font-size: 14.5px;
  color: var(--text);
  font-weight: 500;
}
.main-nav a:hover { color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text); padding: 10px 14px; }
.btn-block { width: 100%; }

/* ---------------- Hero: admit-card motif ---------------- */
.hero {
  padding: 64px 0 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero .eyebrow {
  font-size: 14px;
  color: var(--primary-dark);
  font-weight: 600;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: 44px;
  color: var(--ink);
  max-width: 12ch;
}
.hero p.lead {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 46ch;
  margin: 16px 0 28px;
}
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Admit card panel */
.admit-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 0 var(--border);
}
.admit-card .ac-head {
  background: var(--ink);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.admit-card .ac-head strong { font-family: var(--font-display); font-size: 15px; }
.ac-body { padding: 20px; }
.ac-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}
.ac-row:last-child { border-bottom: none; }
.ac-row span:first-child { color: var(--text-muted); }
.ac-row span:last-child { font-weight: 600; }
.subject-codes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.subject-codes .code {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 8px;
  text-align: center;
}
.subject-codes .code .tag { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.subject-codes .code small { color: var(--text-muted); font-size: 11px; }
.subject-codes .phy { border-top: 3px solid #2B6CB0; }
.subject-codes .chem { border-top: 3px solid var(--accent); }
.subject-codes .bio { border-top: 3px solid var(--primary); }

/* ---------------- Stats ---------------- */
.stats {
  border-bottom: 1px solid var(--border);
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stats .stat {
  padding: 28px 20px;
  text-align: center;
  border-left: 1px solid var(--border);
}
.stats .stat:first-child { border-left: none; }
.stats .stat .num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--primary-dark);
}
.stats .stat .label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ---------------- Sections ---------------- */
section { padding: 72px 0; }
.section-head { max-width: 60ch; margin-bottom: 40px; }
.section-head h2 { font-size: 30px; color: var(--ink); }
.section-head p { color: var(--text-muted); font-size: 15.5px; }

/* Subjects grid */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.subject-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}
.subject-card .subj-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.subject-card.phy .subj-tag { background: #E7F0FA; color: #2B6CB0; }
.subject-card.chem .subj-tag { background: #FCE9E1; color: var(--accent-dark); }
.subject-card.bio .subj-tag { background: #E4F3EC; color: var(--primary-dark); }
.subject-card h3 { font-size: 20px; }
.subject-card p { color: var(--text-muted); font-size: 14.5px; margin: 8px 0 16px; }
.subject-card ul { margin: 0; padding: 0 0 0 18px; font-size: 14px; color: var(--text); }
.subject-card ul li { margin-bottom: 6px; }

/* Offerings list (notes / video / tests / daily 5) — syllabus style, not cards */
.offerings {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.offering-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  padding: 24px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.offering-row:last-child { border-bottom: none; }
.offering-row .idx {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--surface-line);
}
.offering-row h3 { font-size: 18px; margin-bottom: 4px; }
.offering-row p { color: var(--text-muted); font-size: 14.5px; margin: 0; }

/* How it works — legitimate sequence, numbered */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.step { position: relative; padding-top: 8px; }
.step .step-num {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 8px;
}
.step h4 { font-size: 16px; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--text-muted); margin: 0; }

/* Daily 5 band */
.daily5 {
  background: var(--ink);
  color: #EFF5F2;
}
.daily5 .container {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.daily5 h2 { color: #fff; font-size: 28px; }
.daily5 p { color: #B9CCC3; max-width: 48ch; }
.daily5 .channels { display: flex; gap: 12px; flex-wrap: wrap; }
.channel-link {
  border: 1px solid #2A463C;
  border-radius: 6px;
  padding: 10px 16px;
  text-decoration: none;
  color: #EFF5F2;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.channel-link:hover { border-color: var(--primary); color: #fff; }

/* CTA band */
.cta-band {
  background: var(--primary);
  color: #fff;
}
.cta-band .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.cta-band h2 { color: #fff; font-size: 26px; margin-bottom: 4px; }
.cta-band p { color: #D8ECE3; margin: 0; }
.cta-band .btn-outline { border-color: rgba(255,255,255,0.5); color: #fff; }
.cta-band .btn-outline:hover { background: #fff; color: var(--primary-dark); }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--ink);
  color: #B9CCC3;
  padding: 48px 0 24px;
}
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #22392F;
}
.site-footer h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.site-footer p { font-size: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer a { text-decoration: none; color: #B9CCC3; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #7E9488;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------------- Auth pages (login / register) ---------------- */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-side {
  background: var(--ink);
  color: #EFF5F2;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-side .subject-codes .code { background: rgba(255,255,255,0.03); border-color: #22392F; }
.auth-side .subject-codes .code small { color: #8FA79C; }
.auth-side h2 { color: #fff; font-size: 26px; max-width: 14ch; }
.auth-side p { color: #B9CCC3; max-width: 32ch; }
.auth-side .brand { color: #fff; }

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.auth-box { width: 100%; max-width: 380px; }
.auth-box h1 { font-size: 26px; color: var(--ink); }
.auth-box p.sub { color: var(--text-muted); font-size: 14.5px; margin-bottom: 28px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.field input, .field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14.5px;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--text);
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}

.alert {
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 20px;
}
.alert-error { background: #FCE9E1; color: var(--accent-dark); border: 1px solid #F3C6B3; }
.alert-success { background: #E4F3EC; color: var(--primary-dark); border: 1px solid #BFE3D2; }

.auth-foot { margin-top: 22px; font-size: 14px; color: var(--text-muted); text-align: center; }
.auth-foot a { color: var(--primary); font-weight: 600; text-decoration: none; }

.admin-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #B9CCC3;
  border: 1px solid #2A463C;
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 18px;
}

/* ---------------- Dashboard stub ---------------- */
.dash-shell { min-height: 100vh; background: var(--surface); }
.dash-top {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}
.dash-top .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.dash-wrap { max-width: 860px; margin: 0 auto; padding: 48px 24px; }
.dash-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
  margin-bottom: 20px;
}
.dash-card h2 { font-size: 20px; }
.dash-card p { color: var(--text-muted); font-size: 14.5px; }
.pill-list { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.pill {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .stats .container { grid-template-columns: repeat(2, 1fr); }
  .stats .stat:nth-child(3) { border-left: none; }
  .subjects-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .daily5 .container { grid-template-columns: 1fr; }
  .site-footer .footer-grid { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .cta-band .container { flex-direction: column; align-items: flex-start; }
}
