/* =============================================================
   style.css — PTD Prem Tutoring Database
   ============================================================= */


/* ── Reset & base styles ─────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --teal:        #0d9488;
  --teal-dk:     #0f766e;
  --teal-lt:     #2dd4bf;
  --teal-pale:   #ccfbf1;
  --teal-mist:   #f0fdfa;
  --ink:         #0f1f1e;
  --ink-2:       #1e3a38;
  --slate:       #5c7a78;
  --stone:       #d1e8e6;
  --cream:       #f7fffe;
  --white:       #ffffff;
  --border:      #cde8e5;
  --radius:      10px;
  --shadow:      0 2px 12px rgba(13, 148, 136, 0.10);
  --shadow-lg:   0 8px 40px rgba(13, 148, 136, 0.15);

  --math-bg:     #eff6ff;   --math-fg:     #2563eb;
  --english-bg:  #fdf4ff;   --english-fg:  #9333ea;
  --science-bg:  #f0fdf4;   --science-fg:  #16a34a;
  --history-bg:  #fff7ed;   --history-fg:  #ea580c;
  --french-bg:   #fff1f2;   --french-fg:   #e11d48;
  --geo-bg:      #fefce8;   --geo-fg:      #ca8a04;
  --general-bg:  #f1f5f9;   --general-fg:  #475569;
}

html, body {
  height: 100%;
  font-family: 'Sora', sans-serif;
  background: var(--cream);
  color: var(--ink);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--stone); border-radius: 10px; }


/* ── Pages ───────────────────────────────────────────────────── */

.page { display: none; }
.page.active { display: block; }


/* ── Login ───────────────────────────────────────────────────── */

#login-page.active {
  display: flex;
  min-height: 100vh;
}

.login-panel {
  width: 44%;
  background: var(--teal-dk);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
  position: relative;
  overflow: hidden;
}

.login-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at -10% 110%, rgba(45, 212, 191, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 110% 10%,  rgba(45, 212, 191, 0.12) 0%, transparent 60%);
}

.login-panel-top,
.login-panel-bottom {
  position: relative;
  z-index: 1;
}

.ptd-wordmark {
  font-family: 'Lora', serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -1px;
  margin-bottom: 4px;
}

.ptd-wordmark span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-lt);
  margin-left: 3px;
  vertical-align: middle;
  position: relative;
  top: -3px;
}

.ptd-sub {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 64px;
}

.login-panel h1 {
  font-family: 'Lora', serif;
  font-size: clamp(32px, 3.5vw, 52px);
  font-weight: 600;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 18px;
}

.login-panel h1 em {
  font-style: italic;
  color: var(--teal-lt);
}

.login-panel .tagline {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.75;
  max-width: 340px;
  margin-bottom: 48px;
}

.feature-chips {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.chip-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.login-testimonial {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.login-testimonial p {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.65;
  margin-bottom: 10px;
}

.login-testimonial cite {
  font-size: 12px;
  color: var(--teal-lt);
  font-style: normal;
  font-weight: 500;
}

.login-form-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: var(--cream);
  overflow-y: auto;
}

.login-form-inner {
  width: 100%;
  max-width: 380px;
}

.login-form-inner h2 {
  font-family: 'Lora', serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.form-desc {
  font-size: 14px;
  color: var(--slate);
  margin-bottom: 24px;
  line-height: 1.6;
}


/* ── Auth tabs ───────────────────────────────────────────────── */

.auth-tabs {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  background: var(--white);
  border: none;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate);
  cursor: pointer;
  transition: all 0.15s;
}

.auth-tab.active {
  background: var(--teal);
  color: var(--white);
  font-weight: 600;
}


/* ── Form fields ─────────────────────────────────────────────── */

label.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 7px;
}

.field-wrap {
  position: relative;
  margin-bottom: 16px;
}

.field-wrap input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.field-wrap input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.10);
}

.field-wrap input::placeholder {
  color: #aabfbd;
}

.error-bar {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #dc2626;
  margin-bottom: 14px;
  line-height: 1.5;
}

.error-bar.show { display: block; }

.success-bar {
  display: none;
  background: var(--teal-mist);
  border: 1px solid var(--stone);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--teal-dk);
  margin-bottom: 14px;
  line-height: 1.5;
}

.success-bar.show { display: block; }

.btn-enter {
  width: 100%;
  padding: 14px;
  background: var(--teal);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.btn-enter:hover { background: var(--teal-dk); box-shadow: var(--shadow-lg); }
.btn-enter:active { transform: scale(0.98); }
.btn-enter:disabled { background: var(--slate); cursor: not-allowed; }

.auth-link {
  font-size: 13px;
  color: var(--teal);
  cursor: pointer;
  text-align: center;
  margin-top: 4px;
}

.auth-link:hover { text-decoration: underline; }

.login-note {
  margin-top: 20px;
  font-size: 12px;
  color: var(--slate);
  text-align: center;
  line-height: 1.6;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}


/* ── App shell ───────────────────────────────────────────────── */

#app-page.active {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}


/* ── Sidebar ─────────────────────────────────────────────────── */

.sidebar {
  width: 240px;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: calc(100vh - 60px);
  position: sticky;
  top: 60px;
  overflow-y: auto;
}

.sidebar-section { padding: 20px 16px 8px; }

.sidebar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  padding: 0 8px;
  margin-bottom: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--slate);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: 'Sora', sans-serif;
}

.nav-item:hover { background: var(--teal-mist); color: var(--teal-dk); }
.nav-item.active { background: var(--teal-pale); color: var(--teal-dk); font-weight: 600; }
.nav-item .ni-icon { font-size: 15px; width: 20px; text-align: center; }

.nav-count {
  margin-left: auto;
  background: var(--stone);
  color: var(--teal-dk);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 100px;
}

.nav-item.active .nav-count { background: var(--teal); color: white; }

.sidebar-divider { height: 1px; background: var(--border); margin: 8px 16px; }

.subject-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.sidebar-bottom {
  margin-top: auto;
  padding: 12px 16px 20px;
  border-top: 1px solid var(--border);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: var(--teal-mist);
  margin-bottom: 8px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-info .user-email {
  font-size: 11px;
  font-weight: 600;
  color: var(--teal-dk);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}

.user-info .user-name { font-size: 12px; color: var(--slate); }

.btn-signout {
  width: 100%;
  padding: 8px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: none;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  color: var(--slate);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-signout:hover { background: #fff1f2; border-color: #fca5a5; color: #dc2626; }


/* ── Topbar ──────────────────────────────────────────────────── */

.topbar {
  height: 60px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 200;
}

.topbar-logo {
  font-family: 'Lora', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--teal-dk);
  letter-spacing: -0.5px;
  margin-right: 8px;
  white-space: nowrap;
}

.topbar-logo span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-lt);
  margin-left: 2px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

.topbar-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.topbar-search input {
  width: 100%;
  padding: 9px 16px 9px 38px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'Sora', sans-serif;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--cream);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.topbar-search input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.09);
  background: var(--white);
}

.topbar-search input::placeholder { color: #9bbab8; }

.search-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9bbab8;
  font-size: 14px;
  pointer-events: none;
}

.topbar-right { margin-left: auto; }

.topbar-user-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--teal-mist);
  border: 1px solid var(--stone);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal-dk);
}

.topbar-user-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}


/* ── Main content ────────────────────────────────────────────── */

.main-content {
  flex: 1;
  overflow-y: auto;
  height: calc(100vh - 60px);
}


/* ── Loading ─────────────────────────────────────────────────── */

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 16px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--stone);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-state p { font-size: 14px; color: var(--slate); }


/* ── Stats ───────────────────────────────────────────────────── */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 20px 28px 0;
}

.stat-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--teal-mist);
  border: 1px solid var(--stone);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.stat-text .stat-val { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1; margin-bottom: 2px; }
.stat-text .stat-label { font-size: 12px; color: var(--slate); }


/* ── View header ─────────────────────────────────────────────── */

.view-header {
  padding: 28px 28px 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.view-header-left h2 {
  font-family: 'Lora', serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}

.view-header-left p { font-size: 13px; color: var(--slate); }

.view-header-right { display: flex; gap: 8px; align-items: center; }

.view-toggle {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}

.vt-btn {
  padding: 7px 12px;
  font-size: 14px;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--slate);
  transition: all 0.15s;
  font-family: 'Sora', sans-serif;
}

.vt-btn.active { background: var(--teal); color: white; }

.sort-select {
  padding: 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
  outline: none;
}


/* ── Filter bar ──────────────────────────────────────────────── */

.filter-bar {
  padding: 16px 28px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.filter-bar-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin-right: 4px;
}

.pill {
  padding: 6px 14px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--slate);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Sora', sans-serif;
}

.pill:hover { border-color: var(--teal); color: var(--teal-dk); }
.pill.active { background: var(--teal); border-color: var(--teal); color: var(--white); }

.grade-select {
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-family: 'Sora', sans-serif;
  font-size: 12.5px;
  color: var(--slate);
  background: var(--white);
  cursor: pointer;
  outline: none;
}

.result-info { margin-left: auto; font-size: 12px; color: var(--slate); white-space: nowrap; }
.result-info strong { color: var(--ink); }


/* ── Grid ────────────────────────────────────────────────────── */

.worksheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
  padding: 20px 28px 48px;
}


/* ── List ────────────────────────────────────────────────────── */

.worksheet-list { display: flex; flex-direction: column; padding: 20px 28px 48px; }

.list-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 120px;
  gap: 12px;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--slate);
  border-bottom: 2px solid var(--border);
  margin-bottom: 4px;
}

.list-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 120px;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.13s;
  border-bottom: 1px solid var(--border);
}

.list-row:hover { background: var(--teal-mist); }
.list-row:last-child { border-bottom: none; }

.list-title-cell { display: flex; align-items: center; gap: 10px; }

.list-emoji {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.list-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.list-topic { font-size: 12px; color: var(--slate); }

.list-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}

.list-grade, .list-pages { font-size: 13px; color: var(--slate); }
.list-actions { display: flex; gap: 6px; }


/* ── Cards ───────────────────────────────────────────────────── */

.ws-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
  cursor: pointer;
}

.ws-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--teal-lt); }

.card-accent { height: 4px; width: 100%; }

.card-subject-tag {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; }

.card-title {
  font-family: 'Lora', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 6px;
}

.card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; flex: 1; }

.meta-tag {
  font-size: 11px;
  color: var(--slate);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
}

.card-actions { display: flex; gap: 7px; }


/* ── Buttons ─────────────────────────────────────────────────── */

.btn-sm {
  flex: 1;
  padding: 8px 10px;
  border-radius: 7px;
  font-family: 'Sora', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
}

.btn-ghost { background: var(--cream); color: var(--slate); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--teal-mist); color: var(--teal-dk); }
.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-dk); }


/* ── Empty state ─────────────────────────────────────────────── */

.empty-state { grid-column: 1 / -1; text-align: center; padding: 80px 20px; }
.empty-state .es-icon { font-size: 52px; margin-bottom: 16px; }
.empty-state h3 { font-family: 'Lora', serif; font-size: 24px; color: var(--ink-2); margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: var(--slate); }


/* ── Modal ───────────────────────────────────────────────────── */

.modal-bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 30, 0.55);
  backdrop-filter: blur(5px);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-bg.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: 14px;
  width: 100%;
  max-width: 660px;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.22);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.modal-banner { height: 6px; width: 100%; }

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--slate);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.modal-close-btn:hover { background: var(--cream); color: var(--ink); }

.modal-header-info {
  padding: 18px 24px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.modal-subject-tag {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}

.modal-title { font-family: 'Lora', serif; font-size: 24px; font-weight: 600; color: var(--ink); line-height: 1.25; }

.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }

.modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.info-box { background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }

.info-box label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 4px;
}

.info-box span { font-size: 14px; font-weight: 600; color: var(--ink); }

.modal-desc { font-size: 13.5px; line-height: 1.75; color: var(--slate); margin-bottom: 18px; }

.tutor-notes {
  background: var(--teal-mist);
  border: 1.5px solid var(--stone);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.tutor-notes-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dk);
  margin-bottom: 8px;
}

.tutor-notes p { font-size: 13px; color: var(--teal-dk); line-height: 1.6; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

.modal-footer .btn-sm { flex: 1; padding: 12px; font-size: 13px; }


/* ── Subject colours ─────────────────────────────────────────── */

.sc-math    { background: var(--math-bg);    color: var(--math-fg);    }
.sc-english { background: var(--english-bg); color: var(--english-fg); }
.sc-science { background: var(--science-bg); color: var(--science-fg); }
.sc-history { background: var(--history-bg); color: var(--history-fg); }
.sc-french  { background: var(--french-bg);  color: var(--french-fg);  }
.sc-geo     { background: var(--geo-bg);      color: var(--geo-fg);     }
.sc-general { background: var(--general-bg); color: var(--general-fg); }


/* ── Upload panel ────────────────────────────────────────────── */

.upload-panel { padding: 28px; }
.upload-form { max-width: 680px; }

.up-section {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.up-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-dk);
  margin-bottom: 16px;
}

.up-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.up-field { display: flex; flex-direction: column; gap: 6px; }
.up-field.full { grid-column: 1 / -1; }

.up-field label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--slate);
}

.up-field input,
.up-field select,
.up-field textarea {
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'Sora', sans-serif;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--cream);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.up-field input:focus,
.up-field select:focus,
.up-field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.09);
  background: var(--white);
}

.up-field textarea { resize: vertical; min-height: 80px; }

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s;
  background: var(--cream);
  position: relative;
}

.drop-zone:hover,
.drop-zone.dragover { border-color: var(--teal); background: var(--teal-mist); }

.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.drop-icon { font-size: 36px; margin-bottom: 10px; }
.drop-label { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.drop-sub { font-size: 12px; color: var(--slate); }
.drop-chosen { font-size: 13px; color: var(--teal-dk); font-weight: 600; margin-top: 10px; display: none; }

.up-actions { display: flex; gap: 10px; margin-top: 4px; }

.btn-upload {
  padding: 13px 28px;
  background: var(--teal);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-upload:hover { background: var(--teal-dk); box-shadow: var(--shadow-lg); }
.btn-upload:disabled { background: var(--slate); cursor: not-allowed; box-shadow: none; }

.btn-upload-ghost {
  padding: 13px 20px;
  background: none;
  color: var(--slate);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
}

.btn-upload-ghost:hover { border-color: var(--teal); color: var(--teal-dk); }

.upload-success {
  display: none;
  background: var(--teal-mist);
  border: 1.5px solid var(--stone);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--teal-dk);
  font-weight: 500;
  align-items: center;
  gap: 10px;
}

.upload-success.show { display: flex; }

.upload-error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #dc2626;
}

.upload-error.show { display: block; }

.progress-bar-wrap {
  display: none;
  margin-top: 12px;
  background: var(--stone);
  border-radius: 100px;
  height: 6px;
  overflow: hidden;
}

.progress-bar-wrap.show { display: block; }

.progress-bar {
  height: 100%;
  background: var(--teal);
  border-radius: 100px;
  transition: width 0.3s ease;
  width: 0%;
}


/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 900px) {
  .login-panel { display: none; }
  .sidebar     { display: none; }
  .stats-row   { grid-template-columns: 1fr 1fr; }
  .modal-grid  { grid-template-columns: 1fr 1fr; }
  .up-grid     { grid-template-columns: 1fr; }

  .list-header,
  .list-row    { grid-template-columns: 2fr 1fr 90px; }

  .list-header .lh-grade,
  .list-header .lh-pages,
  .list-row .lr-grade,
  .list-row .lr-pages { display: none; }
}
