/* ==========================================================================
   EduPeak Exact Android App Master Design System (1:1 Replica)
   Faithfully replicated from current_real_dashboard.png & real_dashboard_light_v4.html
   ========================================================================== */

:root {
  --bg: #F8FAFC;
  --card-bg: #FFFFFF;
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #38BDF8;
  --accent-cyan: #06B6D4;
  --accent-violet: #7C3AED;
  --accent-amber: #F59E0B;
  --accent-emerald: #10B981;
  --accent-orange: #EA580C;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-sub: #475569;
  --border: #E2E8F0;
  --border-light: rgba(226, 232, 240, 0.8);
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: #F1F5F9;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Google Material Symbols Rounded (1:1 with Flutter Icons) */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga';
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  user-select: none;
  width: 1em;
  height: 1em;
  overflow: hidden;
}

.material-symbols-rounded.filled {
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}

/* Master Phone / Mobile App Container */
#app-root {
  width: 100%;
  max-width: 430px;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  background: #F8FAFC;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 480px) {
  body {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding: 20px 0;
    align-items: center;
    overflow: hidden;
  }
  #app-root {
    border-radius: 40px;
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(226, 232, 240, 0.8);
    height: min(920px, calc(100dvh - 40px));
    min-height: 0;
  }
}

/* Scrollable Content Container */
.main-viewport {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: calc(14px + var(--safe-top)) 20px calc(80px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: none;
}
.main-viewport::-webkit-scrollbar { display: none; }

.main-viewport > * {
  flex-shrink: 0;
}

/* ── 1. Header Row (Avatar, Name, Verified Badge, 2027 Tag, Streak) ── */
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0 4px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-wrapper {
  position: relative;
  cursor: pointer;
}

.avatar-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB, #06B6D4);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.avatar-img {
  width: 100%;
  height: 100%;
  background: #EFF6FF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 19px;
  color: #2563EB;
  border: 2px solid #FFFFFF;
}

.avatar-badge-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 13px;
  height: 13px;
  background: #10B981;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
}

.header-info {
  display: flex;
  flex-direction: column;
}

.greeting-text {
  font-size: 12px;
  font-weight: 500;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 4px;
}

.student-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}

.student-name {
  font-size: 18.5px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.3px;
}

.verified-icon {
  width: 17px;
  height: 17px;
  background: #2563EB;
  border-radius: 50%;
  color: #FFFFFF;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.candidate-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #2563EB;
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  padding: 1px 7px;
  border-radius: 6px;
  margin-top: 2px;
  width: fit-content;
}

.streak-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #FFF7ED;
  border: 1px solid #FFEDD5;
  border-radius: 999px;
  color: #EA580C;
  font-size: 12.5px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.08);
}

/* ── 2. Hero Level & XP Card ── */
.hero-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 16px 20px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-pts {
  font-size: 13px;
  font-weight: 800;
  color: #2563EB;
}

.progress-bar-bg {
  height: 7px;
  background: #F1F5F9;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  width: 65%;
  height: 100%;
  background: linear-gradient(90deg, #2563EB, #38BDF8);
  border-radius: 999px;
}

.mission-checkboxes-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 4px;
}

.mission-check-pill {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}

.mission-check-pill.completed {
  background: #ECFDF5;
  border-color: #A7F3D0;
}

.mission-check-title {
  font-size: 10px;
  font-weight: 700;
  color: #0F172A;
}

.mission-check-xp {
  font-size: 9.5px;
  font-weight: 800;
  color: #2563EB;
}

.mission-check-pill.completed .mission-check-xp {
  color: #059669;
}

/* ── 3. Daily Inspiration Banner ── */
.inspiration-banner {
  flex-shrink: 0;
  min-height: 110px;
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 50%, #0284C7 100%);
  border-radius: 24px;
  padding: 20px 22px;
  color: white;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.banner-ambient-circle {
  position: absolute;
  right: -15px;
  bottom: -20px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.inspiration-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inspiration-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 20px;
}

.inspiration-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38BDF8;
  box-shadow: 0 0 6px #38BDF8;
}

.inspiration-badge-text {
  font-size: 10px;
  font-weight: 800;
  color: #E0F2FE;
  letter-spacing: 0.8px;
}

.quote-mark {
  font-size: 26px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.45);
  font-family: Georgia, serif;
}

.inspiration-quote {
  margin-top: 12px;
  font-size: 14.5px;
  font-style: italic;
  font-weight: 500;
  color: #FFFFFF;
  line-height: 1.5;
  display: block;
  opacity: 1;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* ── 4. Original 4-Digit Box Countdown (Clean White Theme) ── */
.cd-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 16px 18px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.02);
}

.cd-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.cd-target-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #FEF3C7;
  border-radius: 8px;
  color: #B45309;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.cd-exam-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #0F172A;
  margin-left: 8px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.cd-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 4px;
}

.cd-box {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 10px 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.cd-box-days { border: 1.2px solid rgba(2, 132, 199, 0.35); }
.cd-box-hours { border: 1.2px solid rgba(79, 70, 229, 0.35); }
.cd-box-mins { border: 1.2px solid rgba(147, 51, 234, 0.35); }
.cd-box-secs { border: 1.2px solid rgba(234, 88, 12, 0.35); }

.cd-num {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.cd-num-days { color: #0284C7; }
.cd-num-hours { color: #4F46E5; }
.cd-num-mins { color: #9333EA; }
.cd-num-secs { color: #EA580C; }

.cd-label {
  font-size: 9.5px;
  font-weight: 700;
  color: #64748B;
  margin-top: 4px;
  letter-spacing: 0.3px;
}

.cd-colon {
  font-weight: 800;
  color: #94A3B8;
  font-size: 15px;
}

/* ── 5. Quick Actions 4-Column Grid ── */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.action-card-item {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.action-card-item:hover {
  transform: translateY(-2px);
}

.action-card-item:active {
  transform: scale(0.96);
}

.action-box-mcq { box-shadow: 0 4px 12px rgba(234, 88, 12, 0.08); }
.action-box-tutor { box-shadow: 0 4px 12px rgba(124, 58, 237, 0.08); }
.action-box-hw { box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08); }
.action-box-ranks { box-shadow: 0 4px 12px rgba(245, 158, 11, 0.08); }

.action-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.icon-mcq { background: linear-gradient(135deg, #EA580C, #C2410C); box-shadow: 0 3px 8px rgba(234, 88, 12, 0.35); }
.icon-tutor { background: linear-gradient(135deg, #7C3AED, #6D28D9); box-shadow: 0 3px 8px rgba(124, 58, 237, 0.35); }
.icon-hw { background: linear-gradient(135deg, #2563EB, #1D4ED8); box-shadow: 0 3px 8px rgba(37, 99, 235, 0.35); }
.icon-ranks { background: linear-gradient(135deg, #F59E0B, #D97706); box-shadow: 0 3px 8px rgba(245, 158, 11, 0.35); }

.action-card-name {
  font-size: 12px;
  font-weight: 800;
  color: #0F172A;
  margin-top: 8px;
}

.action-card-sub {
  font-size: 9.5px;
  font-weight: 600;
  color: #64748B;
}

/* ── 6. Today's Sprint Card ── */
.sprint-box {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 18px 20px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sprint-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sprint-pill-tag {
  font-size: 10.5px;
  font-weight: 800;
  color: #EA580C;
  background: #FFF7ED;
  padding: 4px 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sprint-subtext {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
}

.sprint-topic {
  font-size: 15.5px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.2px;
}

.sprint-desc {
  font-size: 12px;
  color: #64748B;
  margin-top: -6px;
  line-height: 1.45;
}

.sprint-start-btn {
  background: #2563EB;
  color: #FFFFFF;
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.sprint-start-btn:hover {
  transform: translateY(-1px);
}

/* ── 7. Weekly Study Quests Card ── */
.quests-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 18px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quests-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quests-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 800;
  color: #0F172A;
}

.quests-badge {
  padding: 3px 8px;
  background: #EFF6FF;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: #2563EB;
}

.quest-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quest-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.quest-circle-mcq { background: #FFF7ED; }
.quest-circle-hw { background: #EFF6FF; }
.quest-circle-streak { background: #ECFDF5; }

.quest-info {
  flex: 1;
}

.quest-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #0F172A;
}

.quest-sub {
  font-size: 10.5px;
  color: #64748B;
  margin-top: 1px;
}

.quest-bar {
  height: 4px;
  border-radius: 999px;
  background: #F1F5F9;
  margin-top: 4px;
  overflow: hidden;
}

.quest-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.quest-status-badge {
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}

.quest-badge-orange { background: #FFF7ED; color: #EA580C; }
.quest-badge-blue { background: #EFF6FF; color: #2563EB; }
.quest-badge-green { background: #ECFDF5; color: #059669; }

.quests-footer-note {
  margin-top: 4px;
  padding: 7px 10px;
  background: #F8FAFC;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}

/* ── 8. Upcoming Evaluation Live Proctoring Banner ── */
.evaluation-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 18px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.02);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.evaluation-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.evaluation-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 8px;
}

.eval-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px #10B981;
}

.eval-badge-text {
  font-size: 9.5px;
  font-weight: 800;
  color: #047857;
  letter-spacing: 0.5px;
}

.evaluation-proctor-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
}

.evaluation-title {
  font-size: 15.5px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.2px;
}

.evaluation-sub {
  font-size: 11.5px;
  color: #64748B;
}

.evaluation-pills-row {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.eval-pill {
  flex: 1;
  padding: 6px 4px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  color: #334155;
  text-align: center;
}

.btn-view-exam-room {
  margin-top: 4px;
  width: 100%;
  padding: 12px;
  background: #0F172A;
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
  transition: transform 0.15s ease;
}

.btn-view-exam-room:hover {
  transform: translateY(-1px);
}

/* ── 9. High-Yield Physics Concept & Formula Vault (Bilingual) ── */
.insight-vault-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 18px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vault-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vault-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3.5px 8px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  font-size: 9.5px;
  font-weight: 800;
  color: #2563EB;
  letter-spacing: 0.6px;
}

.vault-tag-pill {
  font-size: 10px;
  font-weight: 700;
  color: #475569;
  background: #F1F5F9;
  padding: 2.5px 7px;
  border-radius: 6px;
}

.btn-vault-refresh {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 4px 6px;
  cursor: pointer;
  color: #2563EB;
  font-size: 12px;
}

.vault-topic-meta {
  font-size: 11px;
  font-weight: 700;
  color: #2563EB;
}

.vault-concept-name {
  font-size: 14.5px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.2px;
  line-height: 1.35;
}

.vault-formula-box {
  padding: 11px 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 800;
  color: #1D4ED8;
  letter-spacing: 0.6px;
  font-family: 'Fira Code', monospace;
}

.vault-exam-tip-box {
  padding: 11px;
  background: #FFFBEB;
  border: 1px solid #FEF3C7;
  border-radius: 12px;
}

.tip-header {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 800;
  color: #92400E;
}

.tip-sinhala {
  font-size: 11.5px;
  font-weight: 600;
  color: #78350F;
  margin-top: 5px;
  line-height: 1.45;
}

.tip-english {
  font-size: 10.5px;
  font-style: italic;
  color: #92400E;
  opacity: 0.85;
  margin-top: 4px;
  line-height: 1.35;
}

.btn-ask-ai-tutor {
  padding: 11px 14px;
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #2563EB;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ask-ai-tutor:hover {
  background: #DBEAFE;
}

/* ── 10. AI Tutor Quick Inquiries List ── */
.ai-inquiries-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 18px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.02);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inquiries-top-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 800;
  color: #0F172A;
}

.inquiries-desc {
  font-size: 11.5px;
  color: #64748B;
  line-height: 1.4;
}

.inquiry-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inquiry-item-btn:hover {
  background: #EFF6FF;
  border-color: #BFDBFE;
}

.inquiry-text {
  font-size: 12px;
  font-weight: 700;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 6px;
}

.inquiry-arrow {
  color: #2563EB;
  font-weight: 800;
  font-size: 13px;
}

/* ── Bottom Navigation Bar (1:1 Material 3 NavigationBar & student_shell.dart) ── */
.bottom-nav-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(72px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
  user-select: none;
  -webkit-user-select: none;
}

.nav-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  outline: none !important;
  box-shadow: none !important;
  color: #64748B;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  padding: 4px 6px;
  border-radius: 16px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
  flex: 1;
  max-width: 82px;
}

.nav-tab-btn:focus,
.nav-tab-btn:focus-visible,
.nav-tab-btn:focus-within {
  outline: none !important;
  box-shadow: none !important;
}

.nav-tab-btn:active {
  transform: scale(0.90);
}

.nav-pill-icon {
  width: 48px;
  height: 28px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #64748B;
  background: transparent;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.nav-tab-btn span {
  font-size: 10px;
  font-weight: 600;
  color: #64748B;
  letter-spacing: -0.1px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.2;
}

/* Material 3 Active Pill Indicator */
.nav-tab-btn.active {
  color: #2563EB;
}

.nav-tab-btn.active .nav-pill-icon {
  background: #EFF6FF;
  color: #2563EB;
  transform: scale(1.08);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.14);
}

.nav-tab-btn .material-symbols-rounded {
  font-size: 22px;
  color: #64748B;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-tab-btn.active .material-symbols-rounded {
  color: #2563EB;
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}

.nav-tab-btn.active span {
  color: #2563EB;
  font-weight: 800;
}

/* Page Transition: 1:1 with Flutter _buildSmoothPage (Fade + Slide) */
@keyframes tabSmoothEntrance {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-page-transition {
  animation: tabSmoothEntrance 0.26s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
}

/* Form & Modals */
.app-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(8px);
}

@media (min-width: 480px) {
  .app-modal {
    align-items: center;
    padding: 20px;
  }
}

.modal-sheet {
  width: 100%;
  max-width: 430px;
  background: #FFFFFF;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  padding: 24px 20px calc(var(--safe-bottom) + 24px);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
}

@media (min-width: 480px) {
  .modal-sheet {
    border-radius: 28px;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-title {
  font-size: 17px;
  font-weight: 800;
  color: #0F172A;
}

.modal-close-btn {
  background: #F1F5F9;
  border: none;
  color: #64748B;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  color: #0F172A;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: #2563EB;
  background: #FFFFFF;
}

.btn-primary {
  width: 100%;
  background: #2563EB;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 14px;
  padding: 13px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  transition: transform 0.15s ease;
}

.btn-primary:active {
  transform: scale(0.98);
}
