/* ============================================================
   EduCore — Main Stylesheet
   File: css/main.css
   Purpose: Design tokens (CSS variables), reset, typography,
            layout scaffolding. Import this first.
   ============================================================ */

/* ── GOOGLE FONTS ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ── DESIGN TOKENS ────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:        #0f1117;
  --surface:   #161b27;
  --surface2:  #1e2638;
  --border:    #2a3448;

  /* Brand colors */
  --accent:    #4f8ef7;
  --accent2:   #7c5cbf;
  --accent3:   #2ec9a5;
  --danger:    #f25f5c;
  --warning:   #f7c948;

  /* Text */
  --text:      #e8edf5;
  --text2:     #8895b0;
  --text3:     #5c6b87;

  /* Layout */
  --sidebar-w: 260px;
  --header-h:  64px;
  --radius:    12px;
  --radius-sm: 8px;

  /* Font */
  --font: 'Plus Jakarta Sans', sans-serif;
}

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: inherit; }

/* ── LAYOUT ───────────────────────────────────────────────── */
.app-shell     { display: flex; width: 100%; height: 100vh; overflow: hidden; }
.main-wrapper  { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; height: 100vh; min-width: 0; }
.page-content  { flex: 1; overflow-y: auto; padding: 28px; }
.page-content::-webkit-scrollbar { width: 6px; }
.page-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
.page-title   { font-size: 22px; font-weight: 800; margin-bottom: 4px; letter-spacing: -.4px; }
.page-sub     { font-size: 13px; color: var(--text2); margin-bottom: 24px; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }

/* ── PAGE ANIMATION ───────────────────────────────────────── */
.page         { display: none; animation: fadeUp .3s ease; }
.page.active  { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── DIVIDER ──────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .main-wrapper { margin-left: 0; }
  body { overflow: auto; }
}
