:root {
  --bg: #0b0f19;
  --surface: #151d2f;
  --surface-hover: #1e293b;
  --border: #2a374d;
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.4);
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --radius: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 30px;
}

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-badge {
  background: var(--primary);
  color: white;
  font-weight: 800;
  font-size: 13px;
  padding: 5px 8px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
}

.class-selector-wrapper select {
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

.hamburger-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  margin-right: 4px;
}

.hamburger-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}

.hamburger-btn:active {
  transform: scale(0.95);
}

/* Navigation Drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 290px;
  max-width: 82vw;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 1001;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
}

.drawer-overlay.active .drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.drawer-close-btn {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.drawer-close-btn:hover {
  color: var(--text);
  background: var(--border);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 14px 10px;
  gap: 6px;
  flex: 1;
}

.drawer-item {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
}

.drawer-item:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.drawer-item.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}

.drawer-icon {
  font-size: 18px;
}

.drawer-label {
  flex: 1;
}

.drawer-footer {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
}

.drawer-info-text {
  font-size: 12px;
  color: var(--text-muted);
}

.history-count-badge {
  background: var(--primary);
  color: white;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
}

main {
  flex: 1;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tab-content {
  display: none;
  width: 100%;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Current Lesson Card */
.lesson-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.lesson-card:hover {
  background: var(--surface-hover);
  border-color: #3b82f6;
}

.lesson-card:active {
  transform: scale(0.98);
}

.lesson-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lesson-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--success);
}

.lesson-time {
  font-size: 13px;
  color: #93c5fd;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.lesson-select-pill {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
}


/* Voice Mic Hero Section */
.voice-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0 10px 0;
  position: relative;
}

.mic-button {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 4px solid rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  box-shadow: 0 10px 25px var(--primary-glow);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mic-button:active {
  transform: scale(0.95);
}

.mic-button.listening {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  animation: pulse-ring 1.5s infinite;
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.6);
}

@keyframes pulse-ring {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.voice-status {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  min-height: 22px;
}

.transcript-pill {
  margin-top: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  color: #cbd5e1;
  max-width: 90%;
  text-align: center;
  display: none;
}

.transcript-pill.active {
  display: block;
}

/* Reminder Button for Next Class */
.reminder-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: #f8fafc;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.reminder-btn:hover {
  background: var(--surface-hover);
  border-color: #3b82f6;
  color: #60a5fa;
  box-shadow: 0 6px 18px var(--primary-glow);
}

.reminder-btn:active {
  transform: scale(0.96);
}


/* Response Banner */
.response-banner {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  display: none;
  animation: fadeIn 0.3s ease;
}

.response-banner.error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Class Reminders Box (just above student roster) */
.class-reminders-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeIn 0.25s ease;
}

.reminders-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reminders-title-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reminders-icon {
  font-size: 16px;
}

.reminders-title {
  font-size: 13px;
  font-weight: 700;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reminders-count-badge {
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.reminders-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reminder-item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid #3b82f6;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.reminder-bullet {
  font-size: 14px;
  margin-top: 1px;
}

.reminder-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.reminder-text {
  font-size: 14px;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.35;
}

.reminder-timestamp {
  font-size: 11px;
  color: var(--text-muted);
}

/* Roster Section */
.roster-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.roster-header h2 {
  font-size: 17px;
  font-weight: 700;
}

.roster-search {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
}

.roster-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pupil-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pupil-name {
  font-size: 15px;
}

.pupil-first {
  font-weight: 700;
  color: #ffffff;
}

.pupil-last {
  color: var(--text-muted);
  font-size: 13px;
}

.pupil-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.status-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
}

.status-green {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-red {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.status-yellow {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.action-btn {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.action-btn.danger {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

.action-btn.danger:hover {
  background: #ef4444;
  color: white;
}

.action-btn.primary {
  background: var(--primary);
  border-color: var(--primary);
}

/* History Section */
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.history-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.history-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.history-header-actions {
  display: flex;
  gap: 8px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 10px;
  font-size: 14px;
}

.history-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: opacity 0.2s ease;
}

.history-card.is-undone {
  opacity: 0.55;
  border-style: dashed;
}

.history-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.history-meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.class-tag {
  background: var(--surface-hover);
  color: #38bdf8;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.source-tag {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 6px;
}

.history-card-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.history-student-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-student-name {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.history-details {
  font-size: 13px;
  color: var(--text-muted);
}

.history-action-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

.pill-afwezig {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.pill-telaat {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.pill-aanwezig {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.pill-reminder {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.pill-attitude {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.history-card-bottom {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-undo {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: #f8fafc;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-undo:hover {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #0b0f19;
}

.undone-badge {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Modal Dialog */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 400px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
}

.modal-input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  width: 100%;
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Schedule / Lesson Picker Modal */
.modal-schedule {
  max-width: 520px;
  max-height: 85vh;
  padding: 18px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.modal-close-btn {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  color: var(--text);
  background: var(--border);
}

.schedule-slots-container {
  overflow-y: auto;
  max-height: calc(85vh - 90px);
  padding: 12px 2px 4px 2px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-group-header {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-top: 6px;
  padding-left: 4px;
}

.timeline-now-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  padding: 4px 0;
}

.timeline-now-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.4), transparent);
}

.timeline-now-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.slot-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.slot-card:hover {
  background: var(--surface-hover);
  border-color: #3b82f6;
}

.slot-card:active {
  transform: scale(0.99);
}

.slot-card.active-slot {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.slot-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slot-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slot-class {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.slot-course {
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  color: #94a3b8;
}

.slot-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.slot-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.slot-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.slot-status-live {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.slot-status-past {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.slot-status-upcoming {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.slot-selected-check {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
}

.slots-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 24px 0;
  font-size: 14px;
}


/* Explicitly hide any quick preset buttons */
.quick-presets, .preset-chip {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

