/* ═══════════════════════════════════════════════════════════════
   SHEILA THE WRITER — LMS Stylesheet
   Brand: Blue #223dff · Dark #060811 · Paper #f4f5fa
   Fonts: Manrope + DM Mono (matching main site)
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');

/* ── DESIGN TOKENS ── */
:root {
  /* Brand — Sheila The Writer Blue */
  --emerald:        #223dff;
  --emerald-deep:   #0f28cc;
  --emerald-vivid:  #5570ff;
  --emerald-glow:   rgba(34,61,255,0.35);
  --emerald-glass:  rgba(34,61,255,0.12);
  --emerald-pale:   rgba(34,61,255,0.07);
  --gold:           #c9a227;
  --gold-light:     #f0c952;

  /* Light mode */
  --bg:             #f4f5fa;
  --bg-card:        #ffffff;
  --bg-raised:      #e9ecf5;
  --bg-nav:         rgba(255,255,255,0.92);
  --bg-secondary:   #e9ecf5;
  --text-primary:   #070914;
  --text-secondary: #303647;
  --text-muted:     #646b7d;
  --border:         rgba(14,22,47,0.12);
  --border-strong:  rgba(14,22,47,0.18);

  /* Shadows */
  --sh-xs: 0 1px 3px rgba(0,0,0,0.06);
  --sh-sm: 0 2px 8px rgba(0,0,0,0.08);
  --sh-md: 0 4px 24px rgba(0,0,0,0.10);
  --sh-lg: 0 8px 48px rgba(0,0,0,0.12);
  --sh-green: 0 8px 40px rgba(34,61,255,0.25);

  /* Fonts — matching Sheila The Writer */
  --f-display: Manrope, sans-serif;
  --f-heading: Manrope, sans-serif;
  --f-body:    Manrope, sans-serif;

  /* Radii */
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px;
  --r-lg: 22px; --r-xl: 32px; --r-pill: 100px;

  /* Sidebar */
  --sw: 270px;

  /* Ease */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --tr:   all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg:             #060811;
  --bg-card:        #0d101b;
  --bg-raised:      #141827;
  --bg-secondary:   #141827;
  --bg-nav:         rgba(10,12,22,0.95);
  --text-primary:   #f7f8ff;
  --text-secondary: #c7ccda;
  --text-muted:     #8f96aa;
  --border:         rgba(206,214,255,0.12);
  --border-strong:  rgba(206,214,255,0.18);
  --sh-md:          0 4px 24px rgba(0,0,0,0.5);
  --sh-lg:          0 8px 48px rgba(0,0,0,0.6);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--f-body); background: var(--bg); color: var(--text-primary); line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background 0.4s ease, color 0.4s ease; }
a { text-decoration: none; color: inherit; transition: var(--tr); }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--emerald), var(--emerald-deep)); border-radius: 10px; }
::selection { background: var(--emerald-glass); color: var(--emerald-deep); }

/* ── LAYOUT ── */
.lms-shell { display: flex; min-height: 100vh; }
.lms-sidebar {
  width: var(--sw); flex-shrink: 0; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  background: var(--bg-card); border-right: 1px solid var(--border); display: flex; flex-direction: column;
  overflow-y: auto; transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.lms-main { margin-left: var(--sw); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.lms-content { flex: 1; padding: 32px 40px; }
@media(max-width:900px) {
  .lms-sidebar { transform: translateX(-100%); box-shadow: none; }
  .lms-sidebar.open { transform: translateX(0); box-shadow: 8px 0 40px rgba(0,0,0,0.2); }
  .lms-main { margin-left: 0; }
  .lms-content { padding: 24px 20px; }
}

/* ── TOPBAR ── */
.lms-topbar {
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; background: var(--bg-card); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50; box-shadow: var(--sh-xs);
}
@media(max-width:900px) { .lms-topbar { padding: 0 20px; } }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.sidebar-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text-primary); font-size: 1.3rem; padding: 6px; border-radius: var(--r-sm); }
@media(max-width:900px) { .sidebar-toggle { display: flex; align-items: center; justify-content: center; } }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-greeting { font-family: var(--f-heading); font-weight: 600; font-size: 0.9rem; color: var(--text-muted); }
.theme-btn { background: none; border: 1px solid var(--border); width: 36px; height: 36px; border-radius: var(--r-pill); cursor: pointer; color: var(--text-muted); font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: var(--tr); }
.theme-btn:hover { border-color: var(--emerald); color: var(--emerald); }
.back-btn { background: var(--emerald-glass); color: var(--emerald); border: 1px solid rgba(34,61,255,0.2); padding: 7px 16px; border-radius: var(--r-pill); font-size: 0.82rem; font-weight: 600; text-decoration: none; display: flex; align-items: center; gap: 6px; transition: var(--tr); }
.back-btn:hover { background: var(--emerald); color: #fff; }
/* ── Cross-Platform Navigation Button ── */
.topbar-platform-btn { padding: 7px 16px; border-radius: var(--r-pill); font-size: 0.82rem; font-weight: 700; text-decoration: none; display: flex; align-items: center; gap: 6px; transition: var(--tr); }
.topbar-platform-btn.tutoring-btn { background: linear-gradient(135deg, var(--emerald), var(--emerald-deep)); color: #fff; border: none; box-shadow: 0 2px 12px rgba(34,61,255,0.3); }
.topbar-platform-btn.tutoring-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(34,61,255,0.45); color: #fff; }
.topbar-platform-btn.lms-btn { background: var(--emerald-glass); color: var(--emerald); border: 1px solid rgba(34,61,255,0.25); }
.topbar-platform-btn.lms-btn:hover { background: var(--emerald); color: #fff; }
@media(max-width:600px) { .topbar-platform-btn span { display: none; } }

/* ── SIDEBAR BRAND ── */
.sidebar-brand {
  padding: 28px 24px 20px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border); text-decoration: none;
}
.sidebar-logo { height: 36px; width: auto; }
.sidebar-logo-dark { display: none; }
[data-theme="dark"] .sidebar-logo { display: none; }
[data-theme="dark"] .sidebar-logo-dark { display: block; }
.sidebar-brand-text { font-family: var(--f-display); font-weight: 700; font-size: 0.85rem; color: var(--emerald); letter-spacing: 0.02em; line-height: 1.2; }
.sidebar-badge { font-size: 0.65rem; background: var(--emerald-glass); color: var(--emerald); padding: 2px 7px; border-radius: var(--r-pill); font-weight: 700; letter-spacing: 0.05em; }

/* ── SIDEBAR NAV ── */
.sidebar-nav { padding: 20px 16px; flex: 1; }
.nav-section { margin-bottom: 24px; }
.nav-section-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); padding: 0 8px; margin-bottom: 6px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md);
  font-size: 0.88rem; font-weight: 500; color: var(--text-secondary); transition: var(--tr); position: relative; margin-bottom: 2px;
}
.nav-link i { width: 18px; font-size: 0.9rem; color: var(--text-muted); transition: var(--tr); }
.nav-link:hover { background: var(--emerald-pale); color: var(--emerald-deep); }
.nav-link:hover i { color: var(--emerald); }
.nav-link.active { background: var(--emerald-glass); color: var(--emerald); font-weight: 700; }
.nav-link.active i { color: var(--emerald); }
.nav-link.active::before { content: ''; position: absolute; left: 0; top: 25%; bottom: 25%; width: 3px; background: var(--emerald); border-radius: 0 3px 3px 0; }
.nav-badge { margin-left: auto; background: var(--emerald); color: #fff; font-size: 0.65rem; font-weight: 700; padding: 2px 7px; border-radius: var(--r-pill); }

.sidebar-user {
  padding: 16px 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-avatar {
  width: 36px; height: 36px; border-radius: var(--r-pill); background: linear-gradient(135deg, var(--emerald), var(--emerald-deep));
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 0.82rem; flex-shrink: 0;
}
.sidebar-user-info { flex: 1; overflow: hidden; }
.sidebar-user-name { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 0.68rem; color: var(--text-muted); text-transform: capitalize; }
.sidebar-logout { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 0.85rem; transition: var(--tr); padding: 4px; }
.sidebar-logout:hover { color: #dc2626; }

/* ── CARDS / GENERAL ── */
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm); transition: var(--tr);
}
.card:hover { box-shadow: var(--sh-md); }
.section-title { font-family: var(--f-heading); font-weight: 800; font-size: 1.5rem; color: var(--text-primary); margin-bottom: 4px; }
.section-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }

/* ── STATS ROW ── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { padding: 20px 24px; }
.stat-icon { width: 42px; height: 42px; border-radius: var(--r-md); background: var(--emerald-glass); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; margin-bottom: 12px; }
.stat-value { font-family: var(--f-display); font-weight: 700; font-size: 2rem; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ── COURSE GRID ── */
.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.course-card { display: flex; flex-direction: column; overflow: hidden; }
.course-card-header { padding: 24px 24px 16px; display: flex; align-items: flex-start; gap: 14px; }
.course-icon { font-size: 2rem; width: 54px; height: 54px; background: var(--emerald-glass); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.course-meta { flex: 1; }
.course-category { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--emerald); margin-bottom: 4px; }
.course-title { font-family: var(--f-heading); font-weight: 700; font-size: 1rem; color: var(--text-primary); line-height: 1.3; }
.course-desc { padding: 0 24px 16px; font-size: 0.85rem; color: var(--text-secondary); flex: 1; }
.course-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.course-badge { font-size: 0.72rem; background: var(--bg-raised); color: var(--text-muted); padding: 4px 10px; border-radius: var(--r-pill); font-weight: 600; }
.course-enrolled-badge { background: var(--emerald-glass); color: var(--emerald); }
.btn-enroll { background: linear-gradient(135deg, var(--emerald), var(--emerald-deep)); color: #fff; border: none; padding: 8px 18px; border-radius: var(--r-pill); font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: var(--tr); white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn-enroll:hover { box-shadow: var(--sh-green); transform: translateY(-1px); }
.btn-enroll.enrolled { background: var(--emerald-glass); color: var(--emerald); box-shadow: none; }
.progress-bar-wrap { height: 5px; background: var(--bg-raised); border-radius: var(--r-pill); overflow: hidden; margin: 8px 0 4px; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--emerald), var(--emerald-vivid)); border-radius: var(--r-pill); transition: width 0.6s var(--ease); }
.progress-pct { font-size: 0.7rem; color: var(--text-muted); }

/* ── LESSON PLAYER ── */
.lesson-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
@media(max-width:1100px) { .lesson-layout { grid-template-columns: 1fr; } }
.lesson-player { padding: 28px 32px; }
.lesson-title { font-family: var(--f-heading); font-weight: 800; font-size: 1.4rem; margin-bottom: 20px; }
.lesson-video-wrap { background: #000; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16/9; margin-bottom: 24px; display: flex; align-items: center; justify-content: center; }
.lesson-video-wrap iframe { width: 100%; height: 100%; border: none; }
.lesson-content { font-size: 0.95rem; line-height: 1.8; color: var(--text-secondary); }
.lesson-content h3 { font-family: var(--f-heading); font-weight: 700; color: var(--text-primary); margin: 20px 0 8px; }
.lesson-content p { margin-bottom: 12px; }
.lesson-content ul { padding-left: 20px; list-style: disc; margin-bottom: 12px; }
.lesson-sidebar { display: flex; flex-direction: column; gap: 16px; }
.lessons-list-card { padding: 20px; max-height: 70vh; overflow-y: auto; }
.lessons-list-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 12px; color: var(--text-primary); }
.lesson-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm);
  cursor: pointer; transition: var(--tr); font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 2px;
}
.lesson-item:hover { background: var(--emerald-pale); color: var(--emerald-deep); }
.lesson-item.active { background: var(--emerald-glass); color: var(--emerald); font-weight: 700; }
.lesson-item.done .li-check { color: var(--emerald); }
.li-check { width: 18px; color: var(--border-strong); }
.li-num { width: 22px; height: 22px; background: var(--bg-raised); border-radius: var(--r-pill); font-size: 0.68rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.li-time { margin-left: auto; font-size: 0.7rem; color: var(--text-muted); }

/* ── CERTIFICATE ── */
.cert-card { padding: 32px; text-align: center; border: 2px solid var(--emerald-glass); }
.cert-icon { font-size: 3rem; margin-bottom: 12px; }
.cert-title { font-family: var(--f-heading); font-weight: 800; font-size: 1.2rem; margin-bottom: 6px; }
.cert-sub { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }
.cert-no { font-size: 0.75rem; color: var(--emerald); font-weight: 700; background: var(--emerald-glass); padding: 4px 12px; border-radius: var(--r-pill); display: inline-block; margin-bottom: 16px; }

/* ── TUTORING / SESSIONS ── */
.sessions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.session-card { padding: 22px 24px; }
.session-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.tutor-avatar { width: 44px; height: 44px; border-radius: var(--r-pill); background: linear-gradient(135deg, var(--emerald), var(--emerald-deep)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.session-meta { flex: 1; }
.session-title { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); margin-bottom: 2px; }
.session-subject { font-size: 0.78rem; color: var(--text-muted); }
.session-details { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.session-detail { display: flex; align-items: center; gap: 8px; font-size: 0.83rem; color: var(--text-secondary); }
.session-detail i { color: var(--emerald); width: 14px; }
.session-status { padding: 3px 10px; border-radius: var(--r-pill); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.status-available { background: var(--emerald-glass); color: var(--emerald); }
.status-booked    { background: rgba(201,162,39,0.12); color: var(--gold); }
.status-completed { background: rgba(100,100,100,0.1); color: var(--text-muted); }

/* ── AUTH PAGES ── */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media(max-width:800px) { .auth-wrap { grid-template-columns: 1fr; } .auth-left { display: none; } }
.auth-left {
  background: linear-gradient(145deg, #060811 0%, #0d1028 40%, #111b7a 100%);
  display: flex; align-items: center; justify-content: center; padding: 60px;
  position: relative; overflow: hidden;
}
.auth-left::before {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(34,61,255,0.20) 0%, transparent 65%);
  pointer-events: none;
}
.auth-left::after {
  content: ''; position: absolute; width: 420px; height: 420px; top: 70px; left: -100px;
  border: 1px solid rgba(255,255,255,0.15); border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(255,255,255,0.03), 0 0 80px rgba(255,255,255,0.10);
  pointer-events: none;
}
.auth-left-content { position: relative; z-index: 1; max-width: 420px; }
.auth-left-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 48px; text-decoration: none; }
.auth-left-logo img { height: 40px; width: auto; }
.auth-left-logo span { font-family: var(--f-display); font-weight: 700; font-size: 1rem; color: #eef2ee; }
.auth-left h2 { font-family: var(--f-heading); font-weight: 800; font-size: 2.4rem; color: #eef2ee; line-height: 1.15; margin-bottom: 16px; letter-spacing: -0.02em; }
.auth-left h2 em { color: var(--emerald); font-style: normal; }
.auth-left p { color: #8f96aa; font-size: 0.92rem; line-height: 1.7; margin-bottom: 32px; }
.auth-features { display: flex; flex-direction: column; gap: 12px; }
.auth-feature { display: flex; align-items: center; gap: 10px; color: #c7ccda; font-size: 0.88rem; }
.auth-feature i { width: 28px; height: 28px; background: var(--emerald-glass); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--emerald); font-size: 0.75rem; flex-shrink: 0; }
.auth-right { display: flex; align-items: center; justify-content: center; padding: 60px 48px; background: var(--bg); }
.auth-form-box { width: 100%; max-width: 440px; }
.auth-form-header { margin-bottom: 32px; }
.auth-back { color: var(--text-muted); font-size: 0.82rem; display: flex; align-items: center; gap: 6px; margin-bottom: 20px; }
.auth-back:hover { color: var(--emerald); }
.auth-form-header h1 { font-family: var(--f-heading); font-weight: 800; font-size: 2rem; margin-bottom: 6px; }
.auth-form-header p { color: var(--text-muted); font-size: 0.88rem; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 12px 14px; background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--r-md); font-size: 0.9rem; color: var(--text-primary); transition: var(--tr);
}
.form-input:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-glass); }
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { width: 100%; padding: 12px 14px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--r-md); font-size: 0.9rem; color: var(--text-primary); transition: var(--tr); resize: vertical; min-height: 100px; }
.form-textarea:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-glass); }
.form-select { width: 100%; padding: 12px 14px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--r-md); font-size: 0.9rem; color: var(--text-primary); transition: var(--tr); cursor: pointer; }
.form-select:focus { outline: none; border-color: var(--emerald); }
.btn-primary {
  width: 100%; padding: 13px; background: linear-gradient(135deg, var(--emerald), var(--emerald-deep));
  color: #fff; border: none; border-radius: var(--r-md); font-size: 0.92rem; font-weight: 700;
  cursor: pointer; transition: var(--tr); display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover { box-shadow: var(--sh-green); transform: translateY(-1px); }
.btn-secondary {
  padding: 10px 20px; background: var(--bg-raised); color: var(--text-primary); border: 1px solid var(--border);
  border-radius: var(--r-md); font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: var(--tr);
}
.btn-secondary:hover { border-color: var(--emerald); color: var(--emerald); }
.auth-switch { text-align: center; margin-top: 20px; font-size: 0.85rem; color: var(--text-muted); }
.auth-switch a { color: var(--emerald); font-weight: 600; }
.alert { padding: 12px 16px; border-radius: var(--r-sm); font-size: 0.85rem; margin-bottom: 16px; }
.alert-error { background: rgba(220,38,38,0.1); color: #dc2626; border: 1px solid rgba(220,38,38,0.2); }
.alert-success { background: var(--emerald-glass); color: var(--emerald-deep); border: 1px solid rgba(34,61,255,0.2); }

/* ── ADMIN FORMS ── */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media(max-width:900px) { .admin-grid { grid-template-columns: 1fr; } }
.form-card { padding: 28px 32px; }
.form-card-title { font-family: var(--f-heading); font-weight: 700; font-size: 1.1rem; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.form-card-title i { color: var(--emerald); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media(max-width:600px) { .form-row { grid-template-columns: 1fr; } }
.form-hint { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
tbody td { padding: 12px 14px; font-size: 0.85rem; color: var(--text-secondary); border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:hover td { background: var(--emerald-pale); }
.pill { padding: 3px 10px; border-radius: var(--r-pill); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; }
.pill-active    { background: var(--emerald-glass); color: var(--emerald); }
.pill-student   { background: rgba(33,113,229,0.10); color: #2171E5; }
.pill-instructor{ background: rgba(201,162,39,0.12); color: var(--gold); }
.pill-admin     { background: rgba(124,58,237,0.10); color: #7c3aed; }
.pill-completed { background: rgba(100,100,100,0.1); color: var(--text-muted); }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.empty-title { font-family: var(--f-heading); font-weight: 700; font-size: 1.1rem; color: var(--text-primary); margin-bottom: 6px; }
.empty-sub { font-size: 0.88rem; color: var(--text-muted); }

/* ── MODAL ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--bg-card); border-radius: var(--r-xl); box-shadow: var(--sh-lg); width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 24px 28px 0; display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-family: var(--f-heading); font-weight: 800; font-size: 1.2rem; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1.2rem; padding: 4px; }
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 20px 28px 28px; }

/* ── SETUP / INSTALL PAGE ── */
.setup-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: var(--bg); }
.setup-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 48px; max-width: 600px; width: 100%; box-shadow: var(--sh-lg); }
.setup-eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--emerald); margin-bottom: 8px; }
.setup-title { font-family: var(--f-heading); font-weight: 800; font-size: 2rem; margin-bottom: 8px; }
.setup-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }
.setup-check-list { display: flex; flex-direction: column; gap: 10px; }
.setup-check { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-md); font-size: 0.88rem; }
.setup-check.ok    { background: var(--emerald-glass); color: var(--emerald-deep); }
.setup-check.error { background: rgba(220,38,38,0.08); color: #dc2626; }
.setup-check i { flex-shrink: 0; }

/* ── RESPONSIVE TWEAKS ── */
@media(max-width:600px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .courses-grid, .sessions-grid { grid-template-columns: 1fr; }
  .lesson-layout { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
}
