:root {
  --orange: #F26319;
  --orange-dark: #d4511a;
  --black: #0f0f0f;
  --dark: #1a1a1a;
  --dark-card: #222;
  --border: #2e2e2e;
  --text: #e8e8e8;
  --text-muted: #888;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --blue: #3b82f6;
  --radius: 8px;
  --sidebar-w: 220px;
  --sidebar-collapsed-w: 56px;
  --sidebar-transition: width 0.22s cubic-bezier(.4,0,.2,1);
}

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

body {
  background: var(--black);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── LAYOUT ── */
.app-layout { display: flex; min-height: 100vh; }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--dark);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  transition: var(--sidebar-transition);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.sidebar.collapsed { width: var(--sidebar-collapsed-w); }

.sidebar-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; height: 56px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-brand { display: flex; align-items: baseline; gap: 6px; overflow: hidden; white-space: nowrap; }
.brand-mark { font-weight: 800; font-size: 1rem; color: var(--orange); letter-spacing: 0.05em; }
.brand-sub { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; transition: opacity 0.15s; }
.sidebar.collapsed .brand-sub { opacity: 0; pointer-events: none; }
.sidebar.collapsed .sidebar-brand { justify-content: center; width: 100%; }
.sidebar.collapsed .brand-mark { text-align: center; width: 100%; }
.sidebar.collapsed [style*="flex-direction: column"] { align-items: center; }

.sidebar-toggle {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  color: var(--text-muted); cursor: pointer; padding: 3px 7px;
  font-size: 16px; line-height: 1; flex-shrink: 0;
  transition: transform 0.22s, color 0.15s;
}
.sidebar-toggle:hover { color: var(--text); border-color: #444; }
.sidebar.collapsed .sidebar-toggle { transform: rotate(180deg); }

/* ── NAV ITEMS ── */
.sidebar-nav { flex: 1; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overflow-x: hidden; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius);
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text); text-decoration: none; }
.nav-item.active { background: rgba(242,99,25,0.13); color: var(--orange); border-left: 3px solid rgba(255,255,255,0.3); padding-left: 7px; }
.nav-icon {
  font-size: 15px; width: 22px; text-align: center;
  flex-shrink: 0; line-height: 1;
}
.nav-label { transition: opacity 0.15s; }
.sidebar.collapsed .nav-label { opacity: 0; pointer-events: none; width: 0; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 9px 0; }

/* ── SIDEBAR FOOTER ── */
.sidebar-footer { padding: 8px; border-top: 1px solid var(--border); flex-shrink: 0; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 2px; overflow: hidden; }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--orange); color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.user-info { overflow: hidden; transition: opacity 0.15s; }
.user-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.sidebar.collapsed .user-info { opacity: 0; width: 0; }
.sidebar.collapsed .sidebar-user { justify-content: center; padding: 8px 0; }
.nav-logout { color: var(--text-muted); }
.nav-logout:hover { color: var(--red); background: rgba(239,68,68,0.08); }

/* ── MAIN CONTENT ── */
.main-content {
  margin-left: var(--sidebar-w);
  padding: 2rem;
  min-height: 100vh;
  transition: margin-left var(--sidebar-transition);
  max-width: calc(1280px + var(--sidebar-w));
  width: 100%;
}
.sidebar.collapsed ~ .main-content,
body.sidebar-collapsed .main-content { margin-left: var(--sidebar-collapsed-w); }

/* ── LOGIN ── */
.main-content.no-sidebar { margin-left: 0; }
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-container { width: 100%; max-width: 400px; padding: 2rem; }
.login-brand { text-align: center; margin-bottom: 2rem; }
.login-logo { font-size: 3rem; font-weight: 900; color: var(--orange); letter-spacing: 0.1em; }
.login-system { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.2em; margin-top: 4px; }
.login-tagline { font-size: 0.7rem; color: #555; margin-top: 8px; }
.login-form { background: var(--dark-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.login-footer { text-align: center; margin-top: 1.5rem; font-size: 11px; color: #444; }

/* ── PAGE HEADER ── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 1.5rem; gap: 1rem;
}
.page-header h1 { font-size: 1.4rem; font-weight: 700; color: var(--text); border-left: 3px solid rgba(255,255,255,0.2); padding-left: 12px; }
.page-sub { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.header-actions { display: flex; gap: 0.5rem; align-items: center; flex-shrink: 0; }
.back-link { font-size: 12px; color: var(--text-muted); display: block; margin-bottom: 4px; }
.back-link:hover { color: var(--text); text-decoration: none; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500; cursor: pointer;
  border: none; white-space: nowrap; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,0.2) inset; }
.btn-primary:hover { background: var(--orange-dark); box-shadow: 0 0 0 1px rgba(255,255,255,0.4) inset; }
.btn-secondary { background: var(--dark-card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #2a2a2a; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); }
.btn-full { width: 100%; justify-content: center; }

/* ── FLASH ── */
.flash {
  padding: 10px 14px; border-radius: var(--radius);
  margin-bottom: 1rem; font-size: 13px;
}
.flash-success { background: rgba(34,197,94,0.12); color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
.flash-error { background: rgba(239,68,68,0.12); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }

/* ── CARDS ── */
.card {
  background: var(--dark-card); border: 1px solid var(--border); border-top: 2px solid rgba(255,255,255,0.15);
  border-radius: var(--radius); overflow: hidden;
}
.card-body { padding: 1.25rem; }

/* Auto-pad common bare children inside any card */
.card > .form-group,
.card > .form-row,
.card > .card-section-title,
.card > .form-section-label,
.card > .profile-grid,
.card > .detail-list { padding-left: 1.25rem; padding-right: 1.25rem; }
.card > .card-section-title { padding-top: 1.25rem; }
.card > .form-group:last-child,
.card > .form-row:last-child,
.card > .profile-grid:last-child { padding-bottom: 1.25rem; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
}
.card-header h2 { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.card-footer { padding: 0.75rem 1.25rem; border-top: 1px solid var(--border); }
.link-action { font-size: 12px; color: var(--orange); }

/* ── STAT GRID ── */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
  background: var(--dark-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}
.stat-number { font-size: 2rem; font-weight: 800; color: var(--orange); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── LAYOUTS ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.two-col > *, .three-col > *, .card-grid > * { min-width: 0; }
.table-scroll { overflow-x: auto; }

/* ── TABLES ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 10px 1.25rem;
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.data-table td { padding: 10px 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.04); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
code { background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 4px; font-size: 12px; }

/* ── BADGES ── */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-lg { padding: 4px 12px; font-size: 12px; }
.badge-active, .badge-present, .badge-completed { background: rgba(34,197,94,0.15); color: var(--green); }
.badge-upcoming, .badge-scheduled { background: rgba(59,130,246,0.15); color: var(--blue); }
.badge-absent { background: rgba(239,68,68,0.15); color: var(--red); }
.badge-late { background: rgba(234,179,8,0.15); color: var(--yellow); }
.badge-excused { background: rgba(148,163,184,0.15); color: #94a3b8; }
.badge-enrolled { background: rgba(34,197,94,0.1); color: var(--green); }
.badge-withdrawn { background: rgba(239,68,68,0.1); color: var(--red); }

/* ── FORMS ── */
.form-card { padding: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 1rem; }
.form-group label { font-size: 12px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
input[type="text"], input[type="password"], input[type="date"],
input[type="time"], input[type="email"], select, textarea {
  background: var(--dark); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius);
  padding: 8px 12px; font-size: 14px; width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--orange);
}
.form-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.form-desc { color: var(--text-muted); font-size: 13px; margin-bottom: 1.25rem; }

/* ── PROGRAM ROWS / CARDS ── */
.program-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border);
  color: var(--text); cursor: pointer;
}
.program-row:hover { background: rgba(255,255,255,0.02); text-decoration: none; }
.program-name { font-weight: 500; flex: 1; }
.program-meta { font-size: 12px; color: var(--text-muted); }

.program-card {
  background: var(--dark-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  display: block; color: var(--text);
}
.program-card:hover { border-color: var(--orange); text-decoration: none; }
.program-card-top { margin-bottom: 0.75rem; }
.program-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.program-card p { font-size: 12px; color: var(--text-muted); margin-bottom: 0.75rem; }
.program-dates { font-size: 11px; color: #555; margin-top: 0.5rem; }
.program-description { color: var(--text-muted); font-size: 13px; margin-bottom: 1.5rem; }

/* ── SESSIONS ── */
.session-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border);
  color: var(--text); cursor: pointer;
}
.session-row:hover { background: rgba(255,255,255,0.02); text-decoration: none; }
.session-date { font-size: 12px; color: var(--text-muted); min-width: 90px; }
.session-info { flex: 1; }
.session-program { font-weight: 500; font-size: 13px; }
.session-topic { font-size: 12px; color: var(--text-muted); }
.session-time { font-size: 11px; color: #555; }

/* ── MODULE ── */
.module-banner {
  background: rgba(242,99,25,0.08); border: 1px solid rgba(242,99,25,0.2);
  border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.5rem; font-size: 13px;
}
.module-banner p { margin-top: 6px; color: var(--text-muted); }
.module-row { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border); }
.module-num { font-size: 20px; font-weight: 800; color: var(--orange); min-width: 28px; line-height: 1; }
.module-title { font-weight: 500; font-size: 13px; }
.module-meta { font-size: 11px; color: var(--text-muted); }
.module-list { display: grid; gap: 1rem; }
.module-card { background: var(--dark-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.module-number { font-size: 11px; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
.module-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.module-card p { font-size: 13px; color: var(--text-muted); }
.objectives { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); font-size: 12px; }
.objectives strong { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.module-hours { margin-top: 0.75rem; font-size: 11px; color: #555; }

/* ── ATTENDANCE TABLE ── */
.attendance-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.attendance-table th { text-align: left; padding: 8px 12px; font-size: 11px; color: var(--text-muted); border-bottom: 1px solid var(--border); text-transform: uppercase; }
.attendance-table td { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.attendance-table input[type="text"], .attendance-table input[type="time"] { padding: 4px 8px; font-size: 12px; }
.status-select { padding: 4px 8px; font-size: 12px; }

/* ── LIST ROWS ── */
.list-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 1.25rem; border-bottom: 1px solid var(--border); font-size: 13px; }
.list-row:last-child { border-bottom: none; }
.list-row span:first-child { flex: 1; }

/* ── LOGS ── */
.log-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border); }
.log-date { font-size: 12px; color: var(--text-muted); min-width: 90px; }
.log-info { flex: 1; font-size: 13px; }
.log-topic { font-size: 12px; color: var(--text-muted); }

/* ── REPORTS ── */
.report-card { padding: 1.25rem; }
.report-card h3 { font-weight: 600; margin-bottom: 0.5rem; }
.report-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 1rem; }
.report-card select { margin-bottom: 0.75rem; }
.attendance-rate { font-weight: 700; }
.rate-good { color: var(--green); }
.rate-warn { color: var(--yellow); }
.rate-low { color: var(--red); }

/* ── EXPORT NOTE ── */
.export-note { margin-top: 1rem; padding: 0.75rem 1rem; background: rgba(255,255,255,0.04); border-radius: var(--radius); font-size: 12px; color: var(--text-muted); }

/* ── FILTER ── */
.filter-form { display: flex; gap: 0.5rem; align-items: center; }
.filter-form select { padding: 6px 10px; font-size: 13px; }

/* ── EMPTY STATE ── */
.empty-state { padding: 1.5rem; text-align: center; color: #555; font-size: 13px; }

/* ── CLOCK BAR ── */
.clock-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--dark-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.875rem 1.25rem; margin-bottom: 1rem;
}
.clock-status { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.clock-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-in { background: var(--green); box-shadow: 0 0 6px rgba(34,197,94,0.6); }
.dot-out { background: #444; }
.btn-danger { background: rgba(239,68,68,0.15); color: var(--red); border: 1px solid rgba(239,68,68,0.25); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.badge-clock-in { background: rgba(34,197,94,0.15); color: var(--green); }
.badge-clock-out { background: rgba(239,68,68,0.12); color: var(--red); }

/* ── GRADE ENTRY TABLE ── */
.grade-entry-table { width: 100%; border-collapse: collapse; }
.grade-entry-table th {
  text-align: left; padding: 8px 10px;
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  border-bottom: 1px solid var(--border); text-transform: uppercase;
}
.grade-entry-table td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.rubric-col { font-size: 10px; max-width: 90px; white-space: normal; line-height: 1.3; }
.grade-select { padding: 4px 6px; font-size: 13px; width: 52px; }

/* ── REPORT PAGE ── */
.report-page {
  background: var(--dark-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem; max-width: 900px;
}
.report-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.report-program { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--orange); margin-bottom: 4px; }
.report-session-title { font-size: 1.25rem; font-weight: 700; }
.report-meta-block { font-size: 13px; color: var(--text-muted); text-align: right; line-height: 1.8; }
.report-objectives { font-size: 13px; color: var(--text-muted); margin-bottom: 1.25rem; padding: 0.75rem 1rem; background: rgba(255,255,255,0.03); border-radius: var(--radius); }
.report-narrative { background: rgba(242,99,25,0.07); border-left: 3px solid var(--orange); padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 1.5rem; }
.narrative-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--orange); margin-bottom: 6px; font-weight: 700; }
.report-narrative p { font-size: 14px; line-height: 1.7; color: var(--text); }
.report-section { margin-bottom: 1.75rem; }
.report-section h3 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.75rem; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.report-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.report-table th { text-align: left; padding: 7px 10px; font-size: 11px; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.report-table td { padding: 7px 10px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.report-table tfoot td { border-top: 1px solid var(--border); border-bottom: none; }
.grade-cell { text-align: center; font-weight: 600; }
.grade-avg { text-align: center; font-weight: 800; color: var(--orange); }
.class-avg-row { background: rgba(255,255,255,0.03); }
.rubric-key { margin-top: 0.5rem; font-size: 11px; color: #555; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.att-summary-row { display: flex; gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.att-pill { padding: 4px 12px; border-radius: 20px; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.att-present { background: rgba(34,197,94,0.1); color: var(--green); }
.att-late { background: rgba(234,179,8,0.1); color: var(--yellow); }
.att-excused { background: rgba(148,163,184,0.1); color: #94a3b8; }
.att-absent { background: rgba(239,68,68,0.1); color: var(--red); }
.att-total { background: rgba(255,255,255,0.05); color: var(--text-muted); }
.report-footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 11px; color: #444; text-align: center; }

/* ── INACTIVE ROWS ── */
.row-inactive { opacity: 0.45; }
.tag-inactive { font-size: 10px; background: rgba(239,68,68,0.1); color: var(--red); padding: 1px 6px; border-radius: 10px; margin-left: 6px; }
.row-actions { white-space: nowrap; }
.link-btn { background: none; border: none; cursor: pointer; font-size: 13px; padding: 0; }
.link-danger { color: var(--red); }
.link-danger:hover { text-decoration: underline; }
.link-restore { color: var(--green); }
.link-restore:hover { text-decoration: underline; }

/* ── LOG DETAIL ── */
.log-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1.25rem; }
.log-detail-grid label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 4px; font-weight: 600; }
.log-detail-grid p { font-size: 13px; color: var(--text); }
.text-muted { color: var(--text-muted); }
.time-cell { font-size: 12px; color: var(--text-muted); }

/* ── SESSION LESSON PLAN (inline) ── */
.session-lesson-plan {
  background: var(--dark-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 1.25rem; overflow: hidden;
}
.slp-header {
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(242,99,25,0.05);
}
.slp-module-tag { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); margin-bottom: 4px; }
.slp-header h2 { font-size: 1.1rem; font-weight: 700; }
.slp-body { padding: 0 1.5rem 1.5rem; }
.slp-section { padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.slp-section:last-child { border-bottom: none; }
.slp-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.6rem; }
.slp-section p { font-size: 13px; color: var(--text); margin: 0; line-height: 1.7; }

/* ── SESSION FORMS ── */
.session-forms {
  background: var(--dark-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.session-forms-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.session-forms-header h2 { font-size: 0.95rem; font-weight: 700; }
.session-forms-actions { display: flex; gap: 0.5rem; }
.student-form { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.student-form:last-child { border-bottom: none; }
.form-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--orange);
  margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem;
}
.form-section-sub { font-weight: 400; color: var(--text-muted); text-transform: none; letter-spacing: 0; font-size: 11px; }

/* ── MODULE CARDS (clickable) ── */
.module-card-link {
  display: flex; align-items: center; justify-content: space-between;
  text-decoration: none; color: var(--text); cursor: pointer;
  transition: border-color 0.15s;
}
.module-card-link:hover { border-color: var(--orange); text-decoration: none; }
.module-card-left { flex: 1; }
.module-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding-left: 1rem; }
.module-hours { font-size: 12px; color: var(--text-muted); }
.module-arrow { font-size: 1.1rem; color: var(--orange); }

/* ── LESSON PLAN DOC ── */
.lesson-plan-doc { display: flex; flex-direction: column; gap: 1rem; max-width: 860px; }
.lesson-section {
  background: var(--dark-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.lesson-section-label {
  padding: 10px 1.25rem;
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--orange);
  background: rgba(242,99,25,0.07); border-bottom: 1px solid var(--border);
}
.lesson-section-body { padding: 1.25rem; font-size: 14px; line-height: 1.7; color: var(--text); }
.lesson-section-body p { margin: 0; }

.objectives-list { margin: 0; padding-left: 1.25rem; }
.objectives-list li { margin-bottom: 6px; }

/* ── LESSON STRUCTURE ── */
.lesson-structure { display: flex; flex-direction: column; gap: 0; }
.structure-block {
  display: flex; gap: 1.25rem; padding: 0.875rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.structure-block:last-child { border-bottom: none; }
.structure-time {
  font-size: 11px; font-weight: 600; color: var(--orange);
  min-width: 110px; padding-top: 2px; white-space: nowrap;
}
.structure-activity strong { display: block; font-size: 13px; margin-bottom: 3px; }
.structure-activity p { font-size: 13px; color: var(--text-muted); margin: 0; }
.structure-note { margin-top: 1rem; font-size: 11px; color: #555; font-style: italic; }

/* ── RUBRIC PREVIEW ── */
.rubric-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 0.75rem; }
.rubric-preview-item {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.75rem 1rem;
}
.rubric-preview-name { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.rubric-preview-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ── PRIOR SESSIONS ── */
.prior-sessions { margin-top: 1rem; }
.prior-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 6px; }
.prior-row { display: flex; gap: 1rem; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 13px; }

/* ── MODULE NAV BAR ── */
.module-nav-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border);
  max-width: 860px;
}

/* ── HOURS BADGE ── */
.hours-badge {
  background: rgba(242,99,25,0.12); color: var(--orange);
  border: 1px solid rgba(242,99,25,0.2); border-radius: var(--radius);
  padding: 6px 14px; font-size: 13px; font-weight: 600; white-space: nowrap;
}

/* ── PRINT ── */
@media print {
  .topnav, .page-header .btn, .back-link { display: none; }
  body { background: white; color: black; }
  .report-page { border: none; padding: 0; }
  .report-narrative { border-left-color: #F26319; }
  .report-narrative p, .report-section h3 { color: #333; }
}

/* ── CALENDAR ── */
.calendar-wrap {
  background: var(--dark-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.cal-header-row {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
}
.cal-dow {
  text-align: center; padding: 10px 0;
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-muted);
}
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
}
.cal-cell {
  min-height: 110px; padding: 8px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.1s;
  vertical-align: top;
}
.cal-cell:hover { background: rgba(255,255,255,0.02); }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-blank { cursor: default; background: rgba(0,0,0,0.15); }
.cal-blank:hover { background: rgba(0,0,0,0.15); }
.cal-today { background: rgba(242,99,25,0.06); }
.cal-today .cal-day-num {
  background: var(--orange); color: #fff;
  border-radius: 50%; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
}
.cal-day-num {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 4px; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
}
.cal-pill {
  font-size: 11px; padding: 3px 6px; margin-bottom: 3px;
  border-radius: 4px; border-left: 3px solid var(--orange);
  background: rgba(255,255,255,0.04);
  display: flex; justify-content: space-between; align-items: center;
  gap: 4px; overflow: hidden;
}
.pill-school { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.pill-time { color: var(--text-muted); font-size: 10px; flex-shrink: 0; }
.cal-more { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* ── CALENDAR POPOVER ── */
.cal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200;
}
.cal-popover {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--dark-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  width: 380px; max-width: 90vw; z-index: 201;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.popover-close {
  position: absolute; top: 12px; right: 14px;
  font-size: 13px; color: var(--text-muted); cursor: pointer;
}
.popover-close:hover { color: var(--text); }
.popover-date {
  font-size: 13px; font-weight: 700; color: var(--orange);
  margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.popover-session-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.popover-session-row:last-child { border-bottom: none; }
.popover-session-title { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.popover-session-meta { font-size: 11px; color: var(--text-muted); }

/* ── SIDEBAR TOOLTIP (collapsed mode) ── */
.nav-tooltip {
  position: fixed; z-index: 999;
  background: #333; color: var(--text);
  padding: 5px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 500;
  pointer-events: none; white-space: nowrap;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col, .three-col, .card-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .sidebar { width: var(--sidebar-collapsed-w); }
  .main-content { margin-left: var(--sidebar-collapsed-w); }
  .live-cards { flex-direction: column; }
}

/* Tablets and smaller tablets */
@media (max-width: 768px) {
  .stat-grid { grid-template-columns: 1fr; }
  .main-content { margin-left: var(--sidebar-collapsed-w); }
  .sidebar-toggle { display: none; }
}

/* Mobile: hamburger menu takes over */
@media (max-width: 640px) {
  .mobile-menu-btn { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; width: 80vw; max-width: 280px; height: 100vh; transform: translateX(-100%); transition: transform 0.3s ease; z-index: 999; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 120px; }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-overlay.active { display: block; }
  .sidebar-nav { overflow-y: visible; flex: unset; }
  .sidebar-footer { flex-shrink: unset; margin-top: unset; padding: 1rem 0.5rem; }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: none; }
}

@media (max-width: 640px) {
  .main-content { padding: 1rem; }
  .stat-grid { grid-template-columns: 1fr; }
  .clock-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 20px;
  }
  .clock-hero-form { width: 100%; }
  .clock-hero-btn { width: 100%; padding: 18px; font-size: 16px; min-height: 48px; }
  .clock-hero-time { font-size: 1.5rem; }
  .page-header { flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }
  .page-header h1 { font-size: 1.2rem; }
  .header-actions { flex-wrap: wrap; gap: 0.5rem; }

  /* Button sizes for touch */
  .btn { padding: 12px 16px; min-height: 44px; font-size: 14px; }
  .btn-primary, .btn-secondary, .btn-ghost { min-height: 48px; padding: 14px 20px; }

  /* Form improvements */
  .form-group { margin-bottom: 1.25rem; }
  .form-group label { font-size: 13px; margin-bottom: 0.5rem; }
  input[type="text"], input[type="email"], input[type="password"],
  input[type="date"], input[type="number"], select, textarea {
    font-size: 16px;
    padding: 12px;
    min-height: 44px;
  }
  textarea { min-height: 100px; }

  /* Table responsiveness - horizontal scroll */
  .card > .table-scroll, .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1.25rem;
    padding: 0 2rem 0 1.25rem;
  }
  .data-table {
    font-size: 13px;
    min-width: 500px;
  }
  .data-table th, .data-table td {
    padding: 10px 12px;
    white-space: nowrap;
  }
  .data-table .row-actions {
    padding-right: 1.5rem;
  }

  /* Modal improvements */
  .modal { padding: 0.5rem; }
  .modal > div {
    width: 95vw;
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
  }
  .modal > div > form {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
  }
  .modal > div > form > .form-actions {
    margin-top: auto;
    flex-shrink: 0;
  }

  /* Compact modal buttons */
  .modal .btn {
    padding: 10px 14px;
    min-height: 40px;
    font-size: 12px;
  }
  .modal .form-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  .modal .form-actions .btn {
    flex: 1;
    min-width: 80px;
  }

  /* Card spacing */
  .card { margin-bottom: 1.25rem; }
  .card-header { padding: 1rem; }

  /* Navigation */
  .nav-item { padding: 12px; font-size: 12px; }

  /* Sidebar footer for mobile */
  .sidebar-footer { padding: 1rem; }

  /* Link actions */
  .link-action { padding: 8px; min-height: 44px; display: inline-flex; align-items: center; }

  /* Pagination footer compact */
  .card > div[style*="display:flex"][style*="justify-content:space-between"] {
    flex-direction: column !important;
    gap: 0.75rem !important;
    padding: 1rem !important;
  }
  .card > div[style*="display:flex"][style*="justify-content:space-between"] > div {
    width: 100%;
  }
  .card > div[style*="display:flex"][style*="justify-content:space-between"] > div:last-child {
    display: flex !important;
    gap: 0.25rem !important;
    justify-content: space-between;
    align-items: center;
  }
  .card .btn-sm {
    padding: 8px 10px !important;
    font-size: 12px !important;
    min-height: 36px !important;
    flex: 1;
  }
  .card span[style*="Page"] {
    padding: 0.4rem 0.5rem !important;
    font-size: 12px !important;
  }

  /* Input validation */
  input:focus, select:focus, textarea:focus { font-size: 16px; }

  /* Calendar mobile */
  .cal-cell {
    min-height: 100px;
    max-height: 100px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .cal-cell > div {
    overflow: hidden;
    flex-shrink: 0;
  }
  .cal-pill {
    font-size: 10px;
    padding: 2px 4px;
    margin-bottom: 2px;
  }
  .cal-day-num {
    font-size: 11px;
  }
  .pill-school {
    font-size: 10px;
  }
  .pill-type {
    display: none;
  }
}

/* ── PROFILE SETTINGS ── */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 860px) {
  .profile-grid { grid-template-columns: 1fr; }
}

/* Extra small screens */
@media (max-width: 380px) {
  .main-content { padding: 0.75rem; }
  .page-header { margin-bottom: 0.75rem; }
  .page-header h1 { font-size: 1rem; border-left-width: 2px; padding-left: 8px; }
  .stat-grid { gap: 0.75rem; }
  .stat-card { padding: 0.75rem; }
  .stat-number { font-size: 1.5rem; }
  .stat-label { font-size: 11px; }
  .card { margin-bottom: 1rem; }
  .card-header { padding: 0.75rem; }
  .card-header h2 { font-size: 14px; }
  .btn { padding: 10px 14px; font-size: 12px; }
  .form-row { gap: 0.5rem; }
}
.card-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.input-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(255,255,255,0.03);
}
.field-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* Clickable sidebar user block */
.sidebar-user-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
}
.sidebar-user-link:hover {
  background: rgba(242, 99, 25, 0.1);
  color: var(--orange);
}
.sidebar-user-link:hover .user-name,
.sidebar-user-link:hover .user-role { color: inherit; }

/* ── LIVE NOW PANEL ── */
.live-panel {
  background: var(--dark-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.live-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.live-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
}
.live-count {
  font-size: 11px;
  font-weight: 600;
  background: rgba(34,197,94,0.15);
  color: var(--green);
  padding: 2px 8px;
  border-radius: 20px;
}
.live-dot-pulse {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
  animation: pulse-dot 2s infinite;
}
.live-dot-idle {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #444;
  display: inline-block;
}
.live-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.live-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  flex: 1;
  min-width: 260px;
}
.live-card:last-child { border-bottom: none; }
.live-card-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(34,197,94,0.15);
  border: 2px solid var(--green);
  color: var(--green);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.live-card-info { flex: 1; }
.live-card-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.live-card-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 1px; }
.live-card-time { font-size: 11px; color: var(--green); }
.live-card-loc {
  font-size: 18px;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.live-card-loc:hover { opacity: 1; }

/* ── CLOCK HERO ── */
.clock-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}
.clock-hero-out {
  background: var(--dark-card);
}
.clock-hero-in {
  background: rgba(34, 197, 94, 0.07);
  border-color: rgba(34, 197, 94, 0.25);
}
.clock-hero-left { flex: 1; }
.clock-hero-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.clock-hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-dot 2s infinite;
}
.clock-hero-in .clock-hero-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
}
.clock-hero-out .clock-hero-dot {
  background: #555;
  animation: none;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,0.2); }
  50% { box-shadow: 0 0 0 6px rgba(34,197,94,0.08); }
}
.clock-hero-state {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.clock-hero-in .clock-hero-state { color: var(--green); }
.clock-hero-time {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.clock-hero-meta { font-size: 12px; color: var(--text-muted); }
.clock-hero-location-tag { color: var(--text-muted); }
.clock-hero-prompt {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.clock-hero-form { flex-shrink: 0; }
.clock-hero-btn {
  padding: 16px 40px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: transform 0.1s, opacity 0.15s;
}
.clock-hero-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.clock-hero-btn:active { transform: translateY(0); }
.clock-hero-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.clock-btn-in {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 4px 14px rgba(242,99,25,0.35);
}
.clock-btn-out {
  background: rgba(239,68,68,0.12);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.3);
}
.clock-btn-out:hover { background: rgba(239,68,68,0.18); }

/* ── PROGRAM BUILDER ── */
.program-list-item {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: background 0.12s;
  border-bottom: 1px solid var(--border);
}
.program-list-item:last-child { border-bottom: none; }
.program-list-item:hover { background: rgba(255,255,255,0.04); text-decoration: none; }
.program-list-active { background: rgba(242,99,25,0.1) !important; color: var(--orange); }
.program-list-active div { color: var(--orange) !important; }

.module-library {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.module-pick-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}
.module-pick-item:hover { border-color: #444; background: rgba(255,255,255,0.02); }
.module-pick-selected { border-color: var(--orange) !important; background: rgba(242,99,25,0.07) !important; }
.module-pick-item input[type=checkbox] { display: none; }
.module-pick-body { flex: 1; }
.module-pick-num { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.module-pick-title { font-weight: 600; font-size: 13px; }
.module-pick-desc { font-size: 12px; color: var(--text-muted); margin-top: 3px; line-height: 1.4; }
.module-pick-meta { font-size: 11px; color: var(--orange); margin-top: 4px; }
.module-pick-check {
  width: 20px; height: 20px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: transparent;
  flex-shrink: 0; margin-top: 1px;
  transition: all 0.15s;
}
.module-pick-selected .module-pick-check {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* Location link in clock tracker */
.location-link { font-size: 11px; white-space: nowrap; }
.location-link:hover { text-decoration: underline; }

/* ── MOBILE MENU (hamburger + overlay) — hidden on desktop ── */
.mobile-menu-btn { display: none; }
.sidebar-overlay { display: none; }

/* ── MOBILE BREAKPOINT ── */
@media (max-width: 640px) {
  /* Sidebar slides off-screen; hamburger + overlay bring it back */
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-w) !important;
    transition: transform 0.25s ease, var(--sidebar-transition);
    z-index: 200;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
  }
  .sidebar.mobile-open { transform: translateX(0); }

  /* Prevent scroll on body when sidebar is open */
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open .main-content { overflow: hidden; }

  .main-content { margin-left: 0 !important; }

  /* Hamburger button */
  .mobile-menu-btn {
    display: flex;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 151;
    background: var(--dark-card);
    border: 1px solid var(--border);
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    touch-action: manipulation;
  }
  .mobile-menu-btn:active { background: rgba(242,99,25,0.2); }

  /* Semi-transparent overlay when sidebar is open */
  .sidebar-overlay.active {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 150;
  }

  /* Hide desktop collapse button on mobile */
  .sidebar-toggle { display: none !important; }
}

  /* Push page content down so hamburger doesn't overlap headings */
  .page-header { padding-top: 52px; }

  /* ── ATTENDANCE TABLE → STUDENT CARDS ── */
  .attendance-table thead,
  .grade-entry-table thead { display: none; }

  .attendance-table,
  .grade-entry-table,
  .attendance-table tbody,
  .grade-entry-table tbody { display: block; }

  .attendance-table tr,
  .grade-entry-table tr {
    display: block;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 10px;
  }

  .attendance-table td,
  .grade-entry-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    gap: 10px;
  }
  .attendance-table td:last-child,
  .grade-entry-table td:last-child { border-bottom: none; }

  /* Student name row — acts as card header */
  .attendance-table td.cell-name,
  .grade-entry-table td.cell-name {
    font-weight: 600;
    font-size: 14px;
    justify-content: flex-start;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    color: var(--text);
  }

  /* Data-label as inline prefix */
  .attendance-table td::before,
  .grade-entry-table td::before {
    content: attr(data-label);
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .attendance-table td.cell-name::before,
  .grade-entry-table td.cell-name::before { display: none; }

  /* Inputs/selects fill available space on right */
  .attendance-table select,
  .attendance-table input[type="time"],
  .attendance-table input[type="text"],
  .grade-entry-table select,
  .grade-entry-table input[type="text"] {
    flex: 1;
    min-width: 0;
    max-width: 180px;
    text-align: right;
  }

  /* table-scroll wrapper: no horizontal scroll needed now that tables are cards */
  .attendance-table,
  .grade-entry-table { overflow-x: visible; }
}

/* ── HNG COMMAND — NEW COMPONENTS ── */

/* Nav section labels */
.nav-section-label {
  padding: 12px 10px 4px;
  overflow: visible;
  display: block;
  margin-top: 8px;
}
.nav-section-text {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  white-space: nowrap;
  display: block;
}
.sidebar.collapsed .nav-section-label { padding: 10px 0 2px; }
.sidebar.collapsed .nav-section-text { opacity: 0; }

/* Live card variants */
.live-card-avatar-event { background: #7c3aed; }
.live-tag-school { color: var(--orange); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.live-tag-event { color: #7c3aed; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.live-card-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

/* Stat pills (used on master dashboard) */
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 1.25rem; padding: 1.25rem 1.25rem 0; }
.stat-pill { background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; min-width: 80px; text-align: center; }
.stat-pill-num { font-size: 1.6rem; font-weight: 700; color: var(--orange); line-height: 1; }
.stat-pill-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }

/* Today list */
.today-list { display: flex; flex-direction: column; gap: 0; padding: 0 1.25rem; margin-bottom: 1.25rem; }
.today-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.today-item:last-child { border-bottom: none; }
.today-item-left { flex: 1; min-width: 0; }
.today-item-time { font-size: 11px; color: var(--text-muted); }
.today-item-name { font-weight: 600; font-size: 13px; }
.today-item-meta { font-size: 11px; color: var(--text-muted); }

/* Event info strip */
.event-info-strip { background: var(--dark-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 1.5rem; display: flex; flex-wrap: wrap; gap: 1.5rem; }
.event-info-item { flex: 1; min-width: 150px; }
.event-info-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 3px; }
.event-info-value { font-size: 13px; color: var(--text); }

/* Chef assignment rows */
.chef-assignment-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 1rem; padding: 0 1.25rem; }
.chef-assignment-row { display: flex; align-items: center; gap: 12px; padding: 10px; background: rgba(255,255,255,0.03); border-radius: var(--radius); border: 1px solid var(--border); }
.chef-assign-avatar { width: 32px; height: 32px; border-radius: 50%; background: #7c3aed; color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chef-assign-info { flex: 1; min-width: 0; }
.chef-assign-name { font-weight: 600; font-size: 13px; }
.chef-assign-meta { font-size: 11px; color: var(--text-muted); text-transform: capitalize; }
.chef-assign-clock { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.assign-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 1.25rem 1rem; border-top: 1px solid var(--border); margin-top: 4px; }
.input-sm { padding: 6px 10px; background: var(--dark); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 12px; }

/* Event cards (chef dashboard) */
.event-card-list { display: flex; flex-direction: column; gap: 10px; padding: 1.25rem; }
.event-card-link { text-decoration: none; color: inherit; }
.event-card-link:hover { text-decoration: none; }
.event-card { display: flex; align-items: center; gap: 16px; padding: 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color 0.12s, background 0.12s; }
.event-card:hover { border-color: var(--orange); background: rgba(242,99,25,0.05); }
.event-card-date { text-align: center; min-width: 42px; flex-shrink: 0; }
.event-card-day { font-size: 1.6rem; font-weight: 800; color: var(--orange); line-height: 1; }
.event-card-month { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.event-card-body { flex: 1; min-width: 0; }
.event-card-name { font-weight: 600; font-size: 14px; }
.event-card-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.event-card-details { font-size: 11px; color: #666; margin-top: 2px; }

/* Event log entries (admin detail) */
.event-log-entry { padding: 14px 0; border-bottom: 1px solid var(--border); }
.event-log-entry:last-child { border-bottom: none; }
.event-log-chef { font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.event-log-field { margin-bottom: 8px; }
.event-log-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); display: block; margin-bottom: 2px; }
.event-log-field p { font-size: 13px; color: var(--text); margin: 0; }

/* Detail rows (chef event page) */
.detail-list { display: flex; flex-direction: column; gap: 0; padding: 0 1.25rem; }
.detail-row { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.detail-row:last-child { border-bottom: none; padding-bottom: 1.25rem; }
.detail-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); min-width: 90px; flex-shrink: 0; padding-top: 2px; }
.detail-value { font-size: 13px; color: var(--text); flex: 1; }

/* Team rows (chef event page) */
.team-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); margin: 0 1.25rem; }
.team-row:last-child { border-bottom: none; padding-bottom: 1.25rem; }
.team-avatar { width: 28px; height: 28px; border-radius: 50%; background: #7c3aed; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.team-name { font-size: 13px; font-weight: 600; }
.team-role { font-size: 11px; color: var(--text-muted); text-transform: capitalize; }

/* tag-active inline badge */
.tag-active { display: inline-block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--green); background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.2); border-radius: 4px; padding: 1px 6px; margin-left: 4px; }


/* ── FORM IMPROVEMENTS ── */
fieldset {
  border: none;
  padding: 0;
  margin: 0 0 2rem 0;
}

legend {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1.25rem 0;
  padding: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-help {
  margin: 0 0 1rem 0;
  font-size: 13px;
  color: var(--text-muted);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
}

.radio-label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-label:hover {
  border-color: var(--orange);
  background: rgba(242, 99, 31, 0.05);
}

.radio-label input[type="radio"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  margin: 0;
}

.radio-label input[type="radio"]:checked + .radio-text {
  color: var(--orange);
  font-weight: 600;
}

.radio-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin: 0;
}

.radio-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
