:root {
  --app-ink: #17261a;
  --app-text: #425540;
  --app-muted: #82917f;
  --app-line: #e0e5d8;
  --app-canvas: #f6f4ee;
  --app-green: #0f766e;
  --app-lime: #8bc34a;
}

html, body, #root { min-height: 100%; }
body { margin: 0; background: var(--app-canvas); color: var(--app-ink); }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.student-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 46%) 1fr;
  background: #fff;
}
.auth-story {
  min-height: 100vh;
  padding: 40px clamp(34px, 5vw, 76px);
  color: #fff;
  background:
    radial-gradient(circle at 75% 18%, rgba(139, 195, 74, .28), transparent 34%),
    linear-gradient(145deg, #172b19, #0b160c 75%);
  display: flex;
  flex-direction: column;
}
.auth-logo { display: inline-flex; width: fit-content; }
.auth-logo img, .sidebar-logo img { width: 116px; height: auto; filter: brightness(0) invert(1); }
.auth-story-copy { margin: auto 0; max-width: 500px; }
.auth-story-label {
  display: inline-block;
  color: #bfe68a;
  font: 600 12px "Space Grotesk", sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.auth-story blockquote {
  margin: 0 0 30px;
  font: 600 clamp(29px, 3.2vw, 48px)/1.16 "Inter", sans-serif;
  letter-spacing: -.035em;
}
.auth-person { display: flex; align-items: center; gap: 12px; }
.auth-person > span, .user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #0f766e;
  color: #fff;
  font: 700 13px "Space Grotesk", sans-serif;
}
.auth-person strong, .auth-person small { display: block; }
.auth-person strong { font-size: 14px; }
.auth-person small { color: #aebcae; font-size: 12px; margin-top: 2px; }
.auth-stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(255,255,255,.13); padding-top: 22px; gap: 20px; }
.auth-stats div { display: flex; flex-direction: column; }
.auth-stats strong { font: 600 20px "Inter", sans-serif; }
.auth-stats span { color: #91a38f; font-size: 11px; margin-top: 4px; }
.auth-workspace {
  min-height: 100vh;
  padding: 34px clamp(28px, 7vw, 100px);
  display: flex;
  flex-direction: column;
  background: #fbfaf7;
}
.auth-step {
  align-self: flex-end;
  color: #778875;
  font: 600 12px "Space Grotesk", sans-serif;
  letter-spacing: .04em;
}
.auth-card { width: min(100%, 410px); margin: auto; }
.auth-kicker {
  color: var(--app-green);
  font: 700 12px "Space Grotesk", sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.auth-card h1 { margin: 10px 0 12px; font: 600 clamp(30px, 4vw, 40px)/1.15 "Inter", sans-serif; letter-spacing: -.035em; }
.auth-intro { color: #647362; font-size: 14px; line-height: 1.65; margin: 0 0 28px; }
.auth-form { display: flex; flex-direction: column; }
.auth-form label { font: 600 13px "Space Grotesk", sans-serif; margin-bottom: 8px; }
.app-phone-input, .app-text-input, .app-otp-input {
  width: 100%;
  border: 1.5px solid #d9dfd2;
  border-radius: 11px;
  background: #fff;
  color: var(--app-ink);
  transition: border-color .15s, box-shadow .15s;
}
.app-phone-input { display: flex; align-items: center; overflow: hidden; }
.app-phone-input span { padding: 0 14px; color: #536451; border-right: 1px solid #e3e7dd; font-weight: 600; }
.app-phone-input input { min-width: 0; width: 100%; border: 0; background: transparent; padding: 14px; outline: 0; }
.app-text-input, .app-otp-input { padding: 14px 15px; outline: 0; }
.app-otp-input { font: 600 25px "Space Grotesk", sans-serif; letter-spacing: .38em; text-align: center; }
.app-phone-input:focus-within, .app-text-input:focus, .app-otp-input:focus { border-color: var(--app-green); box-shadow: 0 0 0 3px rgba(15,118,110,.11); }
.app-primary-button {
  width: 100%;
  margin-top: 18px;
  padding: 14px 18px;
  border: 0;
  border-radius: 11px;
  background: var(--app-lime);
  color: #fff;
  font: 700 14px "Space Grotesk", sans-serif;
  cursor: pointer;
}
.app-primary-button:hover { background: #7db53e; }
.app-primary-button:disabled { opacity: .6; cursor: wait; }
.auth-back { align-self: center; margin-top: 17px; border: 0; background: none; color: #52634f; font: 600 13px "Space Grotesk", sans-serif; cursor: pointer; }
.dev-code { padding: 10px 12px; margin: 14px 0 0; border-radius: 8px; background: #edf4e7; color: #50634b; text-align: center; font-size: 12px; }
.field-error, .app-error { color: #a53832; font-size: 12.5px; }
.field-error { margin: 7px 0 0; }
.app-error, .app-notice { padding: 11px 13px; border-radius: 9px; margin: 0 0 16px; }
.app-error { background: #fff0ee; border: 1px solid #f0cbc6; }
.app-notice { color: #775b17; background: #fff6dc; border: 1px solid #ead9a4; font-size: 12.5px; }
.auth-legal { align-self: center; margin: auto auto 0; color: #9aa598; font-size: 11px; }
.app-loading { min-height: 100vh; display: grid; place-items: center; color: #667764; }

.student-app-shell { min-height: 100vh; display: flex; background: var(--app-canvas); }
.student-sidebar {
  width: 236px;
  min-height: 100vh;
  padding: 20px 14px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  color: #d7e2d4;
  background: #142218;
}
.sidebar-logo { display: inline-flex; padding: 6px 8px 23px; }
.sidebar-section-label {
  padding: 11px 10px 6px;
  color: #738573;
  font: 600 10px "Space Grotesk", sans-serif;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.account-label { margin-top: 8px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav button, .sidebar-logout {
  border: 0;
  border-radius: 9px;
  color: #aebdac;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  font-size: 13.5px;
  cursor: pointer;
}
.sidebar-nav button span { display: inline-block; width: 24px; color: #6f846f; }
.sidebar-nav button:hover, .sidebar-nav button.active { color: #fff; background: rgba(139,195,74,.13); }
.sidebar-nav button.active span { color: #9bd65a; }
.sidebar-account { margin-top: auto; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 11px; background: rgba(255,255,255,.055); }
.sidebar-user .user-avatar { width: 34px; height: 34px; border-radius: 9px; }
.sidebar-user strong, .sidebar-user small { display: block; }
.sidebar-user strong { color: #fff; font-size: 13px; max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { color: #778a77; font-size: 11px; margin-top: 2px; }
.sidebar-logout { width: 100%; margin-top: 5px; }
.student-main { flex: 1; min-width: 0; }
.student-topbar {
  min-height: 65px;
  padding: 0 28px;
  border-bottom: 1px solid var(--app-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(246,244,238,.92);
}
.student-topbar > div { display: flex; flex-direction: column; }
.student-topbar > div > span { font: 600 19px "Inter", sans-serif; }
.student-topbar small { color: var(--app-muted); font-size: 11.5px; margin-top: 3px; }
.verified-pill { padding: 6px 10px; border-radius: 100px; color: #4d772e; background: #e8f3dc; font: 600 11px "Space Grotesk", sans-serif; }
.dashboard-content { padding: 28px; }
.dashboard-welcome {
  padding: 24px 26px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #fff;
  background: linear-gradient(120deg, #173c31, #0f766e);
  box-shadow: 0 12px 30px rgba(26,64,47,.12);
  margin-bottom: 28px;
}
.dashboard-eyebrow { font: 700 10px "Space Grotesk", sans-serif; letter-spacing: .13em; text-transform: uppercase; color: #79c4b5; }
.dashboard-welcome h1 { margin: 7px 0 4px; color: #fff; font: 600 25px "Inter", sans-serif; }
.dashboard-welcome p { margin: 0; color: #b9d6ce; font-size: 13px; }
.dashboard-welcome button { border: 0; border-radius: 10px; padding: 12px 17px; color: #244116; background: #b8e878; font: 700 13px "Space Grotesk", sans-serif; cursor: pointer; white-space: nowrap; }
.dashboard-section-title { margin: 0 0 13px; font: 600 15px "Inter", sans-serif; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 30px; }
.metric-card, .subject-card, .account-card { border: 1px solid var(--app-line); border-radius: 13px; background: #fff; }
.metric-card { padding: 18px; }
.metric-card strong { display: block; font: 600 22px "Inter", sans-serif; }
.metric-card span { display: block; color: var(--app-muted); font-size: 11.5px; margin-top: 5px; }
.dashboard-lower-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; }
.subject-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.subject-card { padding: 16px; border-top: 3px solid var(--subject-color); }
.subject-card div { display: flex; justify-content: space-between; gap: 12px; }
.subject-card strong, .subject-card b { font-size: 13px; }
.subject-card b { color: var(--subject-color); }
.subject-card > span { display: block; height: 6px; margin-top: 13px; overflow: hidden; border-radius: 100px; background: #ecefe8; }
.subject-card i { display: block; height: 100%; border-radius: inherit; background: var(--subject-color); }
.account-card { padding: 20px; }
.account-card h2 { margin: 7px 0 15px; font: 600 17px/1.25 "Inter", sans-serif; }
.account-card dl { margin: 0; }
.account-card dl div { padding: 10px 0; border-top: 1px solid #edf0e9; }
.account-card dt { color: var(--app-muted); font-size: 10.5px; }
.account-card dd { margin: 3px 0 0; font: 600 12px "Space Grotesk", sans-serif; overflow-wrap: anywhere; }

@media (max-width: 980px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-lower-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .student-auth { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-workspace { min-height: 100vh; padding: 24px; }
  .student-app-shell { display: block; }
  .student-sidebar { width: auto; min-height: auto; padding: 13px 16px; flex-direction: row; align-items: center; }
  .sidebar-logo { padding: 0; }
  .sidebar-logo img { width: 96px; }
  .sidebar-section-label, .sidebar-nav, .sidebar-user { display: none; }
  .sidebar-account { margin: 0 0 0 auto; }
  .sidebar-logout { margin: 0; padding: 8px 10px; }
  .student-topbar { padding: 0 18px; }
  .student-topbar small, .verified-pill { display: none; }
  .dashboard-content { padding: 18px; }
  .dashboard-welcome { align-items: flex-start; flex-direction: column; }
  .subject-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .metric-grid { grid-template-columns: 1fr; }
  .auth-card h1 { font-size: 30px; }
  .dashboard-welcome { padding: 21px; }
}
.auth-switch { margin: 18px 0 0; text-align: center; color: #748271; font-size: 12.5px; }
.auth-switch a, .inline-auth-link { color: var(--app-green); font-weight: 700; }
.inline-auth-link { display: block; margin-top: 8px; }
.auth-secondary-actions { display: flex; justify-content: center; gap: 18px; margin-top: 15px; }
.auth-secondary-actions button {
  padding: 0; border: 0; background: none; color: #536451;
  font: 600 12.5px "Space Grotesk", sans-serif; cursor: pointer;
}
.auth-secondary-actions button:disabled { opacity: .55; cursor: wait; }
.inactive-tab {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  color: #fff; background: #122116; text-align: center;
}
.inactive-tab > div { max-width: 430px; }
.inactive-tab img { width: 125px; filter: brightness(0) invert(1); margin-bottom: 35px; }
.inactive-tab h1 { margin: 0 0 12px; font: 600 29px/1.2 "Inter", sans-serif; }
.inactive-tab p { margin: 0 0 24px; color: #9daf9c; line-height: 1.6; }
.inactive-tab button {
  border: 0; border-radius: 11px; padding: 13px 22px; color: #fff;
  background: var(--app-lime); font: 700 14px "Space Grotesk", sans-serif; cursor: pointer;
}
