/* ── Variables - matching dentalnurse.training brand ─────────────────────── */
:root {
  --teal:       #00747A;
  --teal-dark:  #005A5F;
  --teal-mid:   #009099;
  --teal-light: #E6F4F5;
  --teal-pale:  #F0FAFB;
  --teal-acc:   #00B4BD;
  --ink:        #1A1A1A;
  --ink-mid:    #3D3D3D;
  --ink-light:  #6B6B6B;
  --border:     #D8EBEC;
  --white:      #FFFFFF;
  --off-white:  #F8FAFA;
  --warn:       #C0392B;
  --warn-light: #FEF0EE;
  --success:    #1A7F4B;
  --success-light: #E8F7EE;
  --locked:     #9B9B9B;
  --locked-bg:  #F0F0F0;

  --font: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
  --font-head: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;

  --radius:    10px;
  --radius-lg: 16px;
  --shadow:    0 2px 12px rgba(0,116,122,0.10);
  --shadow-lg: 0 6px 32px rgba(0,116,122,0.16);
  --nav-h:     68px;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--ink); background: var(--white); line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); }

h1,h2,h3,h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p  { color: var(--ink-mid); line-height: 1.75; }

.container { width: min(1100px, 92vw); margin: 0 auto; }

/* ── Utilities ───────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-teal { color: var(--teal); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.label-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  background: var(--teal-light);
  color: var(--teal-dark);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem 1.6rem; border-radius: 100px; font-size: 0.95rem; font-weight: 700;
  border: none; transition: all 0.18s; text-decoration: none; cursor: pointer;
}
.btn-primary   { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline   { background: transparent; color: var(--teal); border: 2px solid var(--teal); }
.btn-outline:hover { background: var(--teal-pale); }
.btn-white     { background: var(--white); color: var(--teal-dark); font-weight: 700; }
.btn-white:hover { background: var(--teal-light); }
.btn-danger    { background: var(--warn); color: var(--white); }
.btn-danger:hover { background: #A93226; }
.btn-success   { background: var(--success); color: var(--white); }
.btn-success:hover { background: #155F38; }
.btn-lg { padding: 0.9rem 2.2rem; font-size: 1.05rem; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: var(--white);
  border-bottom: 3px solid var(--teal);
  height: var(--nav-h);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h); width: min(1100px, 92vw); margin: 0 auto;
}
.nav-logo img  { height: 56px; width: auto; }
.nav-logo-text { font-size: 1.5rem; font-weight: 800; color: var(--teal); letter-spacing: -0.02em; }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-user  { font-size: 0.85rem; color: var(--ink-light); }
.nav-user strong { color: var(--teal-dark); }
.nav-menu-btn {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 0.4rem; border-radius: var(--radius);
  color: var(--teal-dark); flex-direction: column; gap: 5px;
}
.nav-menu-btn span {
  display: block; width: 22px; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: all 0.2s;
}

/* ── Sidebar backdrop (mobile) ──────────────────────────────────────────── */
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0; z-index: 149;
  background: rgba(0,0,0,0.4);
}

/* ── Hero (landing) ─────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 60%, var(--teal-mid) 100%);
  padding: 5rem 0 4rem;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: center; }
.hero h1   { color: var(--white); font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: 1rem; }
.hero p    { color: rgba(255,255,255,0.8); font-size: 1.1rem; max-width: 520px; margin-bottom: 2rem; }
.hero-badge { display: inline-block; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); color: rgba(255,255,255,0.9); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.3rem 1rem; border-radius: 100px; margin-bottom: 1.25rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-card {
  background: rgba(255,255,255,0.12); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius-lg);
  padding: 1.75rem; min-width: 240px; color: var(--white);
}
.hero-card h3 { color: var(--white); font-size: 1rem; margin-bottom: 1rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; }
.hero-stat { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 0.9rem; }
.hero-stat:last-child { border-bottom: none; }
.hero-stat-icon { font-size: 1.1rem; width: 1.5rem; text-align: center; }

/* ── Sections ────────────────────────────────────────────────────────────── */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--off-white); }
.section-teal { background: var(--teal-dark); color: var(--white); }
.section-teal h2 { color: var(--white); }
.section-teal p  { color: rgba(255,255,255,0.78); }
.section-label { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); margin-bottom: 0.6rem; }
.section-teal .section-label { color: rgba(255,255,255,0.6); }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card { background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 1.75rem; transition: all 0.2s; }
.card:hover { box-shadow: var(--shadow); border-color: var(--teal-light); }
.card-teal { background: var(--teal-pale); border-color: var(--teal-light); }
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }

/* ── Module cards (landing) ──────────────────────────────────────────────── */
.module-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.module-pill {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem 1rem; text-align: center; transition: all 0.2s;
}
.module-pill:hover { border-color: var(--teal); box-shadow: var(--shadow); }
.module-pill .mp-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.module-pill .mp-num  { font-size: 0.7rem; font-weight: 700; color: var(--teal); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.25rem; }
.module-pill .mp-title { font-size: 0.82rem; font-weight: 600; color: var(--ink); line-height: 1.3; }

/* ── Auth pages ──────────────────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--off-white); padding: 2rem 1rem; }
.auth-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 2.5rem; width: 100%; max-width: 440px; }
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo img { height: 48px; margin: 0 auto 0.75rem; }
.auth-logo h2  { font-size: 1.1rem; color: var(--ink-mid); font-weight: 400; }
.auth-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 2rem; }
.auth-tab { flex: 1; padding: 0.65rem; text-align: center; font-size: 0.9rem; font-weight: 600; color: var(--ink-light); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all 0.15s; }
.auth-tab.active { color: var(--teal); border-bottom-color: var(--teal); }
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--ink-mid); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.7rem 0.95rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: var(--font); font-size: 0.95rem; color: var(--ink);
  background: var(--white); transition: border-color 0.15s; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,116,122,0.1);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-error { font-size: 0.82rem; color: var(--warn); margin-top: 0.35rem; }
.form-submit { width: 100%; margin-top: 0.5rem; }
.auth-switch { text-align: center; margin-top: 1.25rem; font-size: 0.88rem; color: var(--ink-light); }
.auth-switch a { color: var(--teal); font-weight: 600; }

/* ── Dashboard ───────────────────────────────────────────────────────────── */
.dash-layout { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - var(--nav-h)); }
.dash-sidebar {
  background: var(--teal-dark); padding: 1.5rem 1rem;
  position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow-y: auto;
}
.sidebar-section-title { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.35); padding: 0 0.5rem; margin: 1.25rem 0 0.5rem; }
.sidebar-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 0.75rem; border-radius: var(--radius);
  font-size: 0.88rem; font-weight: 500; color: rgba(255,255,255,0.65);
  cursor: pointer; transition: all 0.15s; margin-bottom: 0.2rem;
  border: none; background: none; width: 100%; text-align: left;
}
.sidebar-item:hover  { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.9); }
.sidebar-item.active { background: rgba(255,255,255,0.14); color: var(--white); font-weight: 600; }
.sidebar-item.locked { color: rgba(255,255,255,0.3); cursor: not-allowed; }
.sidebar-item .si-icon { font-size: 1rem; width: 1.2rem; text-align: center; flex-shrink: 0; }
.sidebar-item .si-badge {
  margin-left: auto; font-size: 0.65rem; padding: 0.15rem 0.5rem;
  border-radius: 100px; font-weight: 700;
}
.badge-done  { background: var(--success); color: var(--white); }
.badge-pend  { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); }
.badge-lock  { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.3); }
.badge-new   { background: var(--teal-acc); color: var(--white); }

.dash-main { padding: 2rem 2.5rem; background: var(--off-white); }
.dash-header { margin-bottom: 2rem; }
.dash-header h1 { font-size: 1.7rem; margin-bottom: 0.3rem; }
.dash-header p  { color: var(--ink-light); font-size: 0.95rem; }

/* ── Progress bar ────────────────────────────────────────────────────────── */
.progress-bar-wrap { background: var(--border); border-radius: 100px; height: 8px; margin: 0.75rem 0; }
.progress-bar-fill { height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--teal), var(--teal-acc)); transition: width 0.4s ease; }

/* ── Module cards (dashboard) ────────────────────────────────────────────── */
.module-card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 1.5rem;
  transition: all 0.2s; position: relative; overflow: hidden;
}
.module-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--teal-acc));
}
.module-card.locked::before { background: var(--locked); }
.module-card.locked { background: var(--off-white); border-color: var(--border); }
.module-card:not(.locked):hover { box-shadow: var(--shadow); border-color: var(--teal-light); }
.mc-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 0.75rem; }
.mc-icon  { font-size: 2rem; flex-shrink: 0; }
.mc-title { font-size: 1rem; font-weight: 700; color: var(--ink); }
.mc-mod   { font-size: 0.72rem; font-weight: 700; color: var(--teal); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.2rem; }
.module-card.locked .mc-title { color: var(--locked); }
.module-card.locked .mc-mod   { color: var(--locked); }
.mc-status { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-done  { background: var(--success); }
.dot-pend  { background: var(--teal); }
.dot-lock  { background: var(--locked); }

/* ── Lesson / content area ───────────────────────────────────────────────── */
.content-card { background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 2rem; margin-bottom: 1.5rem; }
.content-card h2 { font-size: 1.4rem; color: var(--teal-dark); margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--teal-light); }
.content-card h3 { font-size: 1rem; font-weight: 700; color: var(--ink); margin: 1.25rem 0 0.5rem; }
.content-card p  { margin-bottom: 0.85rem; font-size: 0.95rem; }
.content-card ul { margin: 0.75rem 0 1rem; padding-left: 0; }
.content-card ul li { position: relative; padding: 0.3rem 0 0.3rem 1.3rem; font-size: 0.93rem; color: var(--ink-mid); border-bottom: 1px solid rgba(0,116,122,0.06); }
.content-card ul li:last-child { border-bottom: none; }
.content-card ul li::before { content: '→'; position: absolute; left: 0; color: var(--teal); font-size: 0.82rem; }
.content-card ol { padding-left: 1.5rem; margin: 0.75rem 0 1rem; }
.content-card ol li { padding: 0.25rem 0; font-size: 0.93rem; color: var(--ink-mid); }
.callout {
  border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.25rem 0;
  border-left: 4px solid var(--teal-mid);
  background: var(--teal-pale);
}
.callout-warn { border-left-color: var(--warn); background: var(--warn-light); }
.callout-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-dark); margin-bottom: 0.35rem; }
.callout-warn .callout-label { color: var(--warn); }
.callout p { font-size: 0.9rem; color: var(--ink-mid); margin: 0; }

/* ── Quiz ─────────────────────────────────────────────────────────────────── */
.quiz-wrap { max-width: 720px; }
.quiz-progress { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; font-size: 0.85rem; color: var(--ink-light); }
.quiz-q { font-size: 1.05rem; font-weight: 600; color: var(--ink); margin-bottom: 1.25rem; line-height: 1.5; }
.quiz-options { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 1.5rem; }
.quiz-option {
  display: flex; align-items: flex-start; gap: 0.85rem;
  padding: 0.85rem 1rem; border-radius: var(--radius);
  border: 1.5px solid var(--border); cursor: pointer;
  transition: all 0.15s; font-size: 0.93rem; color: var(--ink-mid);
  background: var(--white);
}
.quiz-option:hover:not(.disabled) { border-color: var(--teal); background: var(--teal-pale); color: var(--ink); }
.quiz-option.selected { border-color: var(--teal); background: var(--teal-light); color: var(--teal-dark); }
.quiz-option.correct  { border-color: var(--success); background: var(--success-light); color: var(--success); }
.quiz-option.wrong    { border-color: var(--warn); background: var(--warn-light); color: var(--warn); }
.quiz-option.disabled { cursor: default; }
.quiz-option-key { width: 26px; height: 26px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; flex-shrink: 0; margin-top: 0.05rem; }
.quiz-option.selected .quiz-option-key { background: var(--teal); color: var(--white); }
.quiz-option.correct  .quiz-option-key { background: var(--success); color: var(--white); }
.quiz-option.wrong    .quiz-option-key { background: var(--warn); color: var(--white); }
.quiz-feedback { padding: 0.85rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9rem; font-weight: 600; }
.quiz-feedback.correct { background: var(--success-light); color: var(--success); }
.quiz-feedback.wrong   { background: var(--warn-light); color: var(--warn); }
.quiz-result { text-align: center; padding: 2.5rem; }
.quiz-score { font-size: 4rem; font-weight: 800; color: var(--teal); line-height: 1; margin-bottom: 0.5rem; }
.quiz-score-sub { font-size: 1rem; color: var(--ink-light); margin-bottom: 1.5rem; }
.quiz-pass { color: var(--success); }
.quiz-fail { color: var(--warn); }

/* ── File upload ──────────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--teal-mid); border-radius: var(--radius-lg);
  padding: 2.5rem; text-align: center; cursor: pointer; transition: all 0.2s;
  background: var(--teal-pale);
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--teal-dark); background: var(--teal-light); }
.upload-zone .uz-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.upload-zone h4 { color: var(--teal-dark); margin-bottom: 0.35rem; }
.upload-zone p  { font-size: 0.85rem; color: var(--ink-light); margin: 0; }
.upload-file-list { margin-top: 1rem; }
.upload-file-item {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.65rem 1rem; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 0.5rem; font-size: 0.88rem;
}
.ufi-name { flex: 1; color: var(--ink-mid); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ufi-size { color: var(--ink-light); font-size: 0.8rem; flex-shrink: 0; }
.ufi-remove { color: var(--warn); cursor: pointer; font-size: 1.1rem; flex-shrink: 0; }

/* ── Submission status ────────────────────────────────────────────────────── */
.submission-status {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.25rem; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 600; margin-top: 1rem;
}
.status-submitted { background: var(--success-light); color: var(--success); border: 1px solid rgba(26,127,75,0.2); }
.status-pending   { background: var(--teal-pale); color: var(--teal-dark); border: 1px solid var(--border); }
.status-graded    { background: #EEF2FF; color: #3730A3; border: 1px solid #C7D2FE; }

/* ── Logbook ──────────────────────────────────────────────────────────────── */
.logbook-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem; margin-bottom: 1.5rem; }
.log-chip {
  border-radius: var(--radius); padding: 0.85rem 0.75rem; text-align: center;
  cursor: pointer; transition: all 0.15s; border: 2px solid transparent;
  position: relative;
}
.log-chip .lc-n   { font-size: 1.6rem; font-weight: 800; display: block; line-height: 1; }
.log-chip .lc-lbl { font-size: 0.72rem; font-weight: 600; margin-top: 0.2rem; display: block; }
.log-chip.empty   { background: var(--off-white); border-color: var(--border); color: var(--ink-light); }
.log-chip.filled  { background: var(--teal-pale); border-color: var(--teal-mid); color: var(--teal-dark); }
.log-chip.filled .lc-n { color: var(--teal); }
.log-chip:hover:not(.empty) { box-shadow: var(--shadow); }
.log-chip .lc-tick { position: absolute; top: 4px; right: 6px; font-size: 0.75rem; color: var(--success); }

/* ── Modal ─────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  padding: 1rem; backdrop-filter: blur(3px);
}
.modal {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 2rem; width: 100%; max-width: 600px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.modal-header h3 { font-size: 1.15rem; }
.modal-close { background: none; border: none; font-size: 1.5rem; color: var(--ink-light); cursor: pointer; padding: 0.25rem; line-height: 1; }
.modal-close:hover { color: var(--ink); }
.modal-footer { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }

/* ── Admin ─────────────────────────────────────────────────────────────────── */
.admin-header { background: var(--teal-dark); color: var(--white); padding: 1rem 2rem; display: flex; align-items: center; justify-content: space-between; }
.admin-header h1 { color: var(--white); font-size: 1.25rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.admin-table th { background: var(--teal-dark); color: var(--white); padding: 0.75rem 1rem; text-align: left; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; }
.admin-table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-table tr:hover td { background: var(--teal-pale); }
.admin-table .td-name { font-weight: 600; color: var(--ink); }
.admin-table .td-email { color: var(--ink-light); font-size: 0.82rem; }
.pill {
  display: inline-flex; align-items: center; padding: 0.2rem 0.65rem;
  border-radius: 100px; font-size: 0.72rem; font-weight: 700; white-space: nowrap;
}
.pill-green  { background: var(--success-light); color: var(--success); }
.pill-teal   { background: var(--teal-light); color: var(--teal-dark); }
.pill-orange { background: #FFF3E0; color: #E65100; }
.pill-grey   { background: var(--locked-bg); color: var(--locked); }
.pill-red    { background: var(--warn-light); color: var(--warn); }

.admin-panel { padding: 1.5rem 2rem; }
.admin-tabs  { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.admin-tab   { padding: 0.5rem 1.1rem; border-radius: 100px; font-size: 0.88rem; font-weight: 600; cursor: pointer; border: 2px solid var(--border); background: var(--white); color: var(--ink-mid); transition: all 0.15s; }
.admin-tab.active { background: var(--teal); color: var(--white); border-color: var(--teal); }
.admin-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.admin-stat { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; }
.admin-stat .as-n  { font-size: 2rem; font-weight: 800; color: var(--teal); line-height: 1; }
.admin-stat .as-lbl { font-size: 0.8rem; color: var(--ink-light); margin-top: 0.25rem; }
.admin-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.submission-link { color: var(--teal); font-weight: 600; text-decoration: underline; cursor: pointer; font-size: 0.85rem; }

/* ── Toast notification ───────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999;
  background: var(--ink); color: var(--white);
  padding: 0.85rem 1.25rem; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  transform: translateY(100px); opacity: 0;
  transition: all 0.3s ease;
  max-width: 360px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--success); }
.toast.error   { background: var(--warn); }

/* ── Locked overlay ───────────────────────────────────────────────────────── */
.locked-overlay { text-align: center; padding: 4rem 2rem; }
.locked-overlay .lock-icon { font-size: 3.5rem; margin-bottom: 1rem; opacity: 0.4; }
.locked-overlay h3 { color: var(--locked); margin-bottom: 0.5rem; }
.locked-overlay p  { color: var(--ink-light); font-size: 0.9rem; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar {
    display: none;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .dash-sidebar.mobile-open {
    display: block;
    position: fixed; left: 0; top: var(--nav-h); bottom: 0;
    width: 280px; z-index: 150;
    transform: translateX(0);
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0,0,0,0.25);
  }
  .sidebar-backdrop.visible { display: block; }
  .nav-menu-btn { display: flex; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card  { display: none; }
  .module-row { grid-template-columns: repeat(3, 1fr); }
  .card-grid-3 { grid-template-columns: 1fr; }
  .card-grid-2 { grid-template-columns: 1fr; }
  .logbook-grid { grid-template-columns: repeat(4, 1fr); }
  .admin-stat-row { grid-template-columns: repeat(2, 1fr); }
  .dash-main { padding: 1.25rem; }
}
@media (max-width: 600px) {
  .nav-logo img { height: 42px; }
  .nav-user { display: none; }
  .module-row   { grid-template-columns: repeat(2, 1fr); }
  .logbook-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-stat-row { grid-template-columns: 1fr 1fr; }
  .dash-main { padding: 1rem; }
  .content-card { padding: 1.25rem; }
  .dash-header h1 { font-size: 1.3rem; }
  .quiz-option { padding: 0.85rem 1rem; }
}

/* ── Logbook entry form (modal) ──────────────────────────────────────────── */
.lb-form-wrap {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.lb-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.lb-grid-2 .span-2 { grid-column: 1 / -1; }
@media (max-width: 500px) {
  .lb-form-wrap { padding: 1.25rem 1rem; }
  .lb-grid-2 { grid-template-columns: 1fr; }
  .lb-grid-2 .span-2 { grid-column: 1; }
  .lb-checkbox label,
  .lb-form-wrap label[style*="display:flex"],
  .lb-form-wrap label[style*="display:inline-flex"] {
    font-size: 0.9rem;
  }
  .lb-form-wrap input[type="checkbox"],
  .lb-form-wrap input[type="radio"] {
    width: 20px !important;
    height: 20px !important;
  }
}

/* ── Stripe button ────────────────────────────────────────────────────────── */
.stripe-btn {
  display: inline-flex; align-items: center; gap: 0.75rem;
  background: #635BFF; color: var(--white);
  padding: 0.85rem 2rem; border-radius: 100px;
  font-size: 1rem; font-weight: 700; border: none;
  cursor: pointer; transition: all 0.2s;
  text-decoration: none;
}
.stripe-btn:hover { background: #4F45E4; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,91,255,0.35); }
.stripe-btn .sb-icon { font-size: 1.2rem; }
