/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --navy: #1a2340;
  --navy-light: #2d3a5a;
  --teal: #2a9d8f;
  --teal-hover: #21867a;
  --teal-light: #e8f7f5;
  --white: #ffffff;
  --bg: #f5f7fa;
  --border: #e2e8f0;
  --border-light: #edf2f7;
  --text: #1a2340;
  --text-muted: #718096;
  --red: #e53e3e;
  --red-light: #fff5f5;
  --green: #38a169;
  --green-light: #f0fff4;
  --yellow: #dd6b20;
  --yellow-light: #fffaf0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.10);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: var(--font); cursor: pointer; }

/* ── Navbar ────────────────────────────────────────────────────────────────── */
.navbar {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-logo:hover { text-decoration: none; color: var(--white); opacity: 0.9; }
.logo-icon {
  background: var(--teal);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}
.nav-links { display: flex; align-items: center; gap: 1rem; }
.nav-link { color: rgba(255,255,255,0.75); font-size: 0.9rem; text-decoration: none; }
.nav-link:hover { color: white; text-decoration: none; }

/* ── Main Content ──────────────────────────────────────────────────────────── */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Flash Messages ────────────────────────────────────────────────────────── */
.flash-messages { margin-bottom: 1.5rem; }
.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.flash-success { background: var(--green-light); color: var(--green); border: 1px solid #9ae6b4; }
.flash-error { background: var(--red-light); color: var(--red); border: 1px solid #feb2b2; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--teal); color: white; }
.btn-primary:hover { background: var(--teal-hover); color: white; }

.btn-secondary { background: var(--navy); color: white; }
.btn-secondary:hover { background: var(--navy-light); color: white; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--border-light); color: var(--text); }

.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: #c53030; color: white; }

.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.8rem; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  line-height: 1;
}
.btn-icon:hover { color: var(--red); background: var(--red-light); }

/* ── Page Header ───────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.page-header-actions { display: flex; gap: 0.5rem; align-items: center; }
.back-link {
  color: var(--text-muted);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.back-link:hover { color: var(--teal); text-decoration: none; }

/* ── Stats Row ─────────────────────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; margin-bottom: 0.35rem; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--navy); }
.stat-value--green { color: var(--green); }
.stat-value--red { color: var(--red); }

/* ── Section ───────────────────────────────────────────────────────────────── */
.section { margin-bottom: 2.5rem; }
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ── Student Cards ─────────────────────────────────────────────────────────── */
.students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.student-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: var(--text);
}
.student-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
}
.student-card--unpaid { border-left: 3px solid var(--red); }

.student-card-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.student-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.student-avatar--lg {
  width: 52px;
  height: 52px;
  font-size: 1.3rem;
}
.student-name { font-weight: 600; font-size: 1rem; color: var(--navy); }
.student-meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.1rem; }
.student-card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
}

/* ── Student Header (profile page) ────────────────────────────────────────── */
.student-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.student-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.student-header-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.student-header-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}
.student-header-actions { display: flex; gap: 0.5rem; align-items: center; }

/* ── Badges ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge-unpaid { background: var(--red-light); color: var(--red); }
.badge-paid { background: var(--green-light); color: var(--green); }
.badge-online { background: #ebf8ff; color: #2b6cb0; }
.badge-inperson { background: #faf5ff; color: #6b46c1; }
.badge-class { background: var(--teal-light); color: var(--teal); }
.badge-lang { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.badge-report { background: var(--navy); color: white; }

/* ── Tags ──────────────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  background: var(--teal-light);
  color: var(--teal);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}
.session-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* ── Pinned Notes ──────────────────────────────────────────────────────────── */
.pinned-notes-card {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.pinned-notes-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.pinned-icon { font-size: 1rem; }
.pinned-text { font-size: 0.9rem; color: #78350f; line-height: 1.6; white-space: pre-wrap; }

/* ── Tabs ──────────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
}
.tab-btn {
  padding: 0.65rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.tab-btn:hover { color: var(--teal); }
.tab-btn--active { color: var(--teal); border-bottom-color: var(--teal); }
.tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

/* ── Session List ──────────────────────────────────────────────────────────── */
.session-list { display: flex; flex-direction: column; gap: 0.75rem; }
.session-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  transition: box-shadow 0.2s;
}
.session-item:hover { box-shadow: var(--shadow-sm); }
.session-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.session-item-left { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.session-item-right { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.session-date-link { text-decoration: none; color: inherit; }
.session-date-link:hover { text-decoration: none; color: inherit; }
.session-date { font-weight: 600; font-size: 0.95rem; color: var(--navy); }
.session-time { font-size: 0.8rem; }
.session-duration { font-size: 0.8rem; color: var(--text-muted); }

/* ── Stars ─────────────────────────────────────────────────────────────────── */
.stars-display { display: flex; gap: 0.1rem; }
.star { color: #e2e8f0; font-size: 1rem; }
.star--filled { color: #f6ad55; }
.star--interactive { cursor: pointer; font-size: 1.5rem; transition: color 0.1s; }
.star-rating { display: flex; gap: 0.15rem; margin-bottom: 0.25rem; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  max-width: 780px;
}
.form-card-title { font-size: 1rem; font-weight: 600; color: var(--navy); margin-bottom: 1rem; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.form-row--3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.form-label { font-size: 0.85rem; font-weight: 500; color: var(--navy); }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: -0.2rem; }
.required { color: var(--red); }

.form-input {
  width: 100%;
  padding: 0.6rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42,157,143,0.15);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-textarea--lg { min-height: 160px; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Mode toggle */
.toggle-group { display: flex; gap: 0.5rem; }
.toggle-option { cursor: pointer; }
.toggle-radio { display: none; }
.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.toggle-radio:checked + .toggle-label {
  border-color: var(--teal);
  background: var(--teal-light);
  color: var(--teal);
  font-weight: 500;
}

/* HW check */
.hw-check-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.hw-option input { display: none; }
.hw-label {
  display: inline-flex;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--border);
  transition: all 0.15s;
}
.hw-option input:checked + .hw-label { border-color: currentColor; }
.hw-label--done { color: var(--green); }
.hw-label--partial { color: var(--yellow); }
.hw-label--not_done { color: var(--red); }
.hw-label--na { color: var(--text-muted); }
.hw-option input:checked + .hw-label--done { background: var(--green-light); }
.hw-option input:checked + .hw-label--partial { background: var(--yellow-light); }
.hw-option input:checked + .hw-label--not_done { background: var(--red-light); }
.hw-option input:checked + .hw-label--na { background: var(--border-light); }

/* Tag checkboxes */
.tags-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-checkbox input { display: none; }
.tag--selectable {
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
}
.tag-checkbox input:checked + .tag--selectable {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
}
.checkbox-label input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--teal); }

/* ── Payments Table ────────────────────────────────────────────────────────── */
.payments-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  font-size: 0.875rem;
}
.payments-table th {
  background: var(--bg);
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.payments-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
}
.payments-table tr:last-child td { border-bottom: none; }
.row-unpaid { background: #fff5f5; }

/* ── Exam Timeline ─────────────────────────────────────────────────────────── */
.exam-timeline { display: flex; flex-direction: column; gap: 0; padding-left: 1rem; }
.exam-item {
  display: flex;
  gap: 1rem;
  position: relative;
  padding-bottom: 1.25rem;
}
.exam-item::before {
  content: '';
  position: absolute;
  left: -0.6rem;
  top: 0.5rem;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.exam-item:last-child::before { display: none; }
.exam-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
  margin-top: 0.3rem;
  margin-left: -1.55rem;
  position: relative;
  z-index: 1;
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--teal);
}
.exam-content { flex: 1; }
.exam-header { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.exam-title { font-size: 0.95rem; color: var(--navy); }
.exam-date { font-size: 0.82rem; color: var(--text-muted); background: var(--bg); padding: 0.15rem 0.5rem; border-radius: 4px; }
.exam-notes { font-size: 0.82rem; margin-top: 0.25rem; }

/* ── Reports ───────────────────────────────────────────────────────────────── */
.report-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.report-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
}
.report-body { font-size: 0.88rem; line-height: 1.7; white-space: pre-wrap; }

/* ── Session Summary Card ──────────────────────────────────────────────────── */
.session-summary-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.session-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.session-summary-date {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
}
.session-summary-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}
.sep { color: var(--border); }
.session-payment-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}
.payment-amount { font-size: 1.5rem; font-weight: 700; color: var(--navy); }
.session-meta-grid {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}
.meta-item { display: flex; flex-direction: column; gap: 0.2rem; }
.meta-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 500; }

/* ── Reveal Sections ───────────────────────────────────────────────────────── */
.reveal-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}
.reveal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.reveal-header:hover { background: var(--bg); }
.reveal-indicator {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.2rem 0.6rem;
  background: var(--bg);
  border-radius: 999px;
  transition: all 0.15s;
}
.reveal-indicator--private { color: var(--red); background: var(--red-light); }
.reveal-content { padding: 0.5rem 1.25rem 1.25rem; }
.reveal-text { font-size: 0.9rem; line-height: 1.7; white-space: pre-wrap; }

/* ── AI Reports Section ────────────────────────────────────────────────────── */
.ai-reports-section { margin-bottom: 2rem; }
.ai-reports-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.generate-status {
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.generate-status--loading { background: #ebf8ff; color: #2b6cb0; }
.generate-status--success { background: var(--green-light); color: var(--green); }
.generate-status--error { background: var(--red-light); color: var(--red); }

.report-text { font-size: 0.9rem; line-height: 1.75; white-space: pre-wrap; }
.internal-notes-text { background: #fffbeb; padding: 0.75rem; border-radius: var(--radius-sm); border-left: 3px solid #f6ad55; }
.copy-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

/* ── Danger Zone ───────────────────────────────────────────────────────────── */
.danger-zone {
  border: 1px solid #fed7d7;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 2rem;
  background: #fff5f5;
  max-width: 780px;
}
.danger-title { font-size: 0.9rem; font-weight: 600; color: var(--red); margin-bottom: 0.4rem; }
.danger-text { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; }

/* ── Calendar ──────────────────────────────────────────────────────────────── */
.calendar-container {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}
#cal-month-label { min-width: 120px; text-align: center; }
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.calendar-weekdays > div {
  padding: 0.6rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.cal-day {
  min-height: 80px;
  padding: 0.4rem;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.8rem;
}
.cal-day:nth-child(7n) { border-right: none; }
.cal-day--empty { background: var(--bg); }
.cal-day--today { background: #ebf8ff; }
.cal-day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.cal-day--today .cal-day-num {
  background: var(--teal);
  color: white;
  font-weight: 700;
}
.cal-event {
  background: var(--teal-light);
  color: var(--teal);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-size: 0.7rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.cal-event:hover { background: var(--teal); color: white; text-decoration: none; }
.cal-event--online { background: #ebf8ff; color: #2b6cb0; }
.cal-event--online:hover { background: #2b6cb0; color: white; }
.cal-event--exam { background: #fff5f5; color: #c53030; font-weight: 600; cursor: default; }
.cal-event--exam:hover { background: #c53030; color: white; }

/* ── Section Header ────────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}
.search-input {
  max-width: 260px;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
}

/* ── Contact Card ──────────────────────────────────────────────────────────── */
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.contact-icon { font-size: 1.1rem; }
.contact-item {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}
.contact-item:hover { color: var(--teal); }
.contact-owner {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}
.badge-noreports {
  background: #fff5f5;
  color: #c53030;
  border: 1px solid #fed7d7;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ── Login ─────────────────────────────────────────────────────────────────── */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.login-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.login-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}

/* ── Empty State ───────────────────────────────────────────────────────────── */
.empty-state {
  padding: 2.5rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
}

/* ── Toast ─────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: white;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  font-size: 0.875rem;
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
  z-index: 999;
}
.toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Utilities ─────────────────────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .form-row, .form-row--3 { grid-template-columns: 1fr; }
  .students-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .session-item-header { flex-direction: column; align-items: flex-start; }
  .session-summary-header { flex-direction: column; }
  .session-payment-block { align-items: flex-start; }
  .student-header { flex-direction: column; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .form-card { padding: 1.25rem; }
  .cal-day { min-height: 55px; }
}
