/* ===== Lesson Tracker - Aligned with Lesson Planner Design System ===== */

:root {
  /* Primary Colors - Cyan/Teal (distinct from Planner's emerald) */
  --lt-primary: #0891b2;
  --lt-primary-dark: #0e7490;
  --lt-primary-light: #cffafe;
  --lt-primary-lighter: #ecfeff;
  
  /* Status Colors */
  --lt-behind: #f59e0b;
  --lt-behind-light: #fef3c7;
  --lt-on-track: #10b981;
  --lt-on-track-light: #d1fae5;
  --lt-ahead: #6366f1;
  --lt-ahead-light: #e0e7ff;
  
  /* Section Status */
  --lt-completed: #10b981;
  --lt-partial: #f59e0b;
  --lt-skipped: #ef4444;
  
  /* Text - Matching Lesson Planner */
  --lt-text: #1f2937;
  --lt-text-secondary: #6b7280;
  --lt-text-muted: #9ca3af;
  
  /* Backgrounds - Matching Lesson Planner */
  --lt-bg: #ffffff;
  --lt-bg-subtle: #f9fafb;
  --lt-border: #e5e7eb;
  --lt-border-light: #f3f4f6;
  
  /* Shadows - Matching Lesson Planner */
  --lt-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --lt-shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);
  
  /* Radius - Matching Lesson Planner */
  --lt-radius: 16px;
  --lt-radius-sm: 10px;
  --lt-radius-xs: 8px;
  --lt-radius-full: 100px;
  --lt-shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
  --lt-bg-page: var(--lt-bg-subtle);
  
  /* Typography - Matching Lesson Planner */
  --lt-font-display: 'Google Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --lt-font-body: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Transitions - Matching Lesson Planner */
  --lt-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Shared app chrome theming */
  --chrome-primary: var(--lt-primary);
  --chrome-text-secondary: var(--lt-text-secondary);
  --chrome-text-muted: var(--lt-text-muted);
  --chrome-bg: var(--lt-bg);
  --chrome-border: var(--lt-border);
  --chrome-font-display: var(--lt-font-display);
  --chrome-transition: var(--lt-transition);
  --chrome-shadow: var(--lt-shadow);
  --chrome-radius-full: var(--lt-radius-full);
}

/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--lt-font-body);
  background: var(--lt-bg-subtle);
  color: var(--lt-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow: hidden;
}

body.tracker-active {
  overflow: hidden;
}

.hidden { display: none !important; }

/* ===== WELCOME SCREEN ===== */
.welcome-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--lt-bg-subtle);
  padding: 24px;
  z-index: 1000;
}

.welcome-content {
  text-align: center;
  max-width: 440px;
  width: 100%;
}

.welcome-icon {
  width: 80px;
  height: 80px;
  background: var(--lt-primary-light);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--lt-primary);
}

.welcome-icon svg { width: 40px; height: 40px; }

.welcome-title {
  font-family: var(--lt-font-display);
  font-size: 32px;
  font-weight: 500;
  color: var(--lt-text);
  margin-bottom: 8px;
}

.welcome-subtitle {
  font-size: 17px;
  color: var(--lt-text-secondary);
  margin-bottom: 24px;
}

/* Next Up section */
.welcome-next-up {
  width: 100%;
  margin-top: 40px;
  margin-bottom: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--lt-border);
}

.welcome-next-up-title {
  font-family: var(--lt-font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--lt-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.welcome-next-up-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.welcome-next-up-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--lt-primary-lighter);
  border: 1px solid var(--lt-primary-light);
  border-radius: var(--lt-radius-sm);
  cursor: pointer;
  transition: all var(--lt-transition);
}

.welcome-next-up-item:hover {
  background: var(--lt-primary-light);
  border-color: var(--lt-primary);
}

.welcome-next-up-class {
  font-size: 12px;
  font-weight: 500;
  color: var(--lt-primary-dark);
  min-width: 60px;
}

.welcome-next-up-lesson {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--lt-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.welcome-next-up-arrow {
  color: var(--lt-primary);
  flex-shrink: 0;
}

.welcome-next-up-arrow svg { width: 18px; height: 18px; }

.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 8px;
}

.welcome-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 18px 28px;
  font-family: var(--lt-font-display);
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: var(--lt-radius);
  cursor: pointer;
  transition: all var(--lt-transition);
  text-decoration: none;
}

.welcome-btn svg { width: 22px; height: 22px; }

.welcome-btn-primary {
  background: var(--lt-primary);
  color: white;
  box-shadow: 0 4px 16px rgba(8, 145, 178, 0.3);
}

.welcome-btn-primary:hover {
  background: var(--lt-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(8, 145, 178, 0.4);
}

/* Classes Preview */
.welcome-classes {
  margin-top: 48px;
  text-align: left;
}

.welcome-classes-title {
  font-family: var(--lt-font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--lt-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  padding-left: 4px;
}

.welcome-classes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.welcome-class-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--lt-bg);
  border: 1px solid var(--lt-border);
  border-radius: var(--lt-radius-sm);
  cursor: pointer;
  transition: all var(--lt-transition);
}

.welcome-class-item:hover {
  border-color: var(--lt-primary);
  background: var(--lt-primary-lighter);
}

.welcome-class-icon {
  width: 44px;
  height: 44px;
  background: var(--lt-primary-lighter);
  color: var(--lt-primary);
  border-radius: var(--lt-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.welcome-class-icon svg { width: 22px; height: 22px; }

.welcome-class-info { flex: 1; min-width: 0; }

.welcome-class-name {
  font-family: var(--lt-font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--lt-text);
}

.welcome-class-meta {
  font-size: 13px;
  color: var(--lt-text-muted);
  margin-top: 2px;
}

.welcome-class-arrow {
  color: var(--lt-text-muted);
  transition: all var(--lt-transition);
}

.welcome-class-item:hover .welcome-class-arrow {
  color: var(--lt-primary);
  transform: translateX(4px);
}

.welcome-class-arrow svg { width: 20px; height: 20px; }

.welcome-empty {
  padding: 32px;
  text-align: center;
  color: var(--lt-text-muted);
  font-size: 14px;
  background: var(--lt-bg);
  border-radius: var(--lt-radius-sm);
  border: 2px dashed var(--lt-border);
}

.welcome-backup-row {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.welcome-backup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--lt-font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--lt-text-secondary);
  background: var(--lt-bg);
  border: 1px solid var(--lt-border);
  border-radius: var(--lt-radius-sm);
  cursor: pointer;
  transition: all var(--lt-transition);
}

.welcome-backup-btn:hover {
  color: var(--lt-primary);
  border-color: var(--lt-primary);
  background: var(--lt-primary-lighter);
}

.welcome-backup-btn svg {
  width: 18px;
  height: 18px;
}

/* .welcome-storage-note, .welcome-back: from shared-app-chrome.css */

/* ===== TRACKER SCREEN - 3 CARD COLUMNS ===== */
.tracker-screen {
  position: fixed;
  inset: 0;
  display: flex;
  gap: 16px;
  height: 100vh;
  padding: 16px;
  background: var(--lt-bg-subtle);
  overflow: hidden;
  /* Prevent body scroll */
  touch-action: none;
}

/* Card Panel Base */
.panel {
  display: flex;
  flex-direction: column;
  background: var(--lt-bg);
  border-radius: var(--lt-radius);
  box-shadow: var(--lt-shadow);
  overflow: hidden;
  height: 100%;
  max-height: calc(100vh - 32px);
  /* Prevent panel itself from scrolling - only content areas scroll */
}

/* Panel Header */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--lt-bg);
  border-bottom: 1px solid var(--lt-border-light);
  flex-shrink: 0;
}

.panel-title {
  font-family: var(--lt-font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--lt-text);
  letter-spacing: -0.2px;
}

.panel-action-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lt-bg-subtle);
  border: none;
  border-radius: var(--lt-radius-xs);
  cursor: pointer;
  color: var(--lt-text-secondary);
  transition: all var(--lt-transition);
}

.panel-action-btn:hover {
  background: var(--lt-primary-lighter);
  color: var(--lt-primary);
  transform: scale(1.05);
}

.panel-action-btn svg { width: 18px; height: 18px; }

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

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-lesson-plan-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lt-bg-subtle);
  border: none;
  border-radius: var(--lt-radius-xs);
  cursor: pointer;
  color: var(--lt-text-secondary);
  transition: all var(--lt-transition);
}

.view-lesson-plan-btn:hover {
  background: var(--lt-primary-lighter);
  color: var(--lt-primary);
  transform: scale(1.05);
}

.view-lesson-plan-btn svg {
  width: 18px;
  height: 18px;
}

/* ===== LEFT PANEL - Classes/Lessons ===== */
.panel-left {
  width: 300px;
  flex-shrink: 0;
  height: 100%;
  max-height: calc(100vh - 32px);
}

.panel-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--lt-border-light);
  margin-top: auto;
  background: var(--lt-bg-subtle);
  flex-shrink: 0;
}

.back-to-home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  font-family: var(--lt-font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--lt-text-secondary);
  background: var(--lt-bg);
  border: 1px solid var(--lt-border);
  border-radius: var(--lt-radius-sm);
  cursor: pointer;
  transition: all var(--lt-transition);
}

.back-to-home-btn:hover {
  background: var(--lt-bg);
  border-color: var(--lt-primary);
  color: var(--lt-primary);
}

.back-to-home-btn svg { width: 16px; height: 16px; }

/* Class Tree */
.class-tree {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  min-height: 0;
  /* Prevent scrolling the entire screen */
  overscroll-behavior: contain;
}

.class-tree::-webkit-scrollbar { width: 6px; }
.class-tree::-webkit-scrollbar-track { background: transparent; }
.class-tree::-webkit-scrollbar-thumb { background: var(--lt-border); border-radius: 3px; }

.class-group {
  margin-bottom: 12px;
}

.class-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--lt-bg-subtle);
  border: 1px solid var(--lt-border-light);
  border-radius: var(--lt-radius-sm);
  cursor: pointer;
  transition: all var(--lt-transition);
}

.class-header:hover {
  background: var(--lt-bg);
  border-color: var(--lt-border);
  box-shadow: var(--lt-shadow-card);
}

.class-header.active {
  background: var(--lt-primary-lighter);
  border-color: var(--lt-primary-light);
}

.class-header.expanded {
  border-radius: var(--lt-radius-sm) var(--lt-radius-sm) 0 0;
  border-bottom-color: transparent;
}

.class-expand {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lt-text-muted);
  transition: transform var(--lt-transition);
  flex-shrink: 0;
}

.class-expand svg { width: 14px; height: 14px; }

.class-header.expanded .class-expand {
  transform: rotate(90deg);
  color: var(--lt-primary);
}

.class-icon {
  width: 32px;
  height: 32px;
  background: var(--lt-primary-light);
  color: var(--lt-primary);
  border-radius: var(--lt-radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.class-header.active .class-icon {
  background: var(--lt-primary);
  color: white;
}

.class-icon svg { width: 16px; height: 16px; }

.class-name {
  flex: 1;
  font-family: var(--lt-font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--lt-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.class-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--lt-text-muted);
  background: var(--lt-bg);
  padding: 3px 10px;
  border-radius: var(--lt-radius-full);
}

.class-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--lt-transition);
}

.class-header:hover .class-actions { opacity: 1; }

.class-action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--lt-radius-xs);
  cursor: pointer;
  color: var(--lt-text-muted);
  transition: all var(--lt-transition);
}

.class-action-btn:hover {
  background: var(--lt-bg);
  color: var(--lt-text);
}

.class-action-btn.delete:hover {
  background: #fee2e2;
  color: #ef4444;
}

.class-action-btn svg { width: 14px; height: 14px; }

/* Lesson List */
.lesson-list {
  background: var(--lt-bg);
  border: 1px solid var(--lt-border-light);
  border-top: none;
  border-radius: 0 0 var(--lt-radius-sm) var(--lt-radius-sm);
  padding: 8px;
  display: none;
}

.class-header.expanded + .lesson-list {
  display: block;
  animation: slideDown 0.2s ease;
}

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

.lesson-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--lt-radius-xs);
  cursor: pointer;
  transition: all var(--lt-transition);
  border-left: 3px solid transparent;
  margin: 4px 0;
}

.lesson-item:hover {
  background: var(--lt-bg-subtle);
}

.lesson-item.active {
  background: var(--lt-primary-lighter);
  border-left-color: var(--lt-primary);
}

.lesson-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lesson-icon svg { width: 14px; height: 14px; }

.lesson-icon.behind { background: var(--lt-behind-light); color: var(--lt-behind); }
.lesson-icon.on-track { background: var(--lt-on-track-light); color: var(--lt-on-track); }
.lesson-icon.ahead { background: var(--lt-ahead-light); color: var(--lt-ahead); }

.lesson-info { flex: 1; min-width: 0; }

.lesson-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--lt-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lesson-date {
  font-size: 11px;
  color: var(--lt-text-muted);
  margin-top: 2px;
}

.lesson-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--lt-transition);
}

.lesson-item:hover .lesson-actions { opacity: 1; }

/* Next lesson badge & styling */
.lesson-item.next-lesson {
  border-left-color: var(--lt-primary);
  background: var(--lt-primary-lighter);
}

.lesson-item.next-lesson .lesson-name { font-weight: 600; }

.next-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--lt-primary);
  color: white;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}

.class-action-btn.set-next {
  color: var(--lt-primary);
}

.lesson-item.next-lesson .class-action-btn.set-next {
  color: var(--lt-primary-dark);
}

/* Add Lesson Button */
.add-lesson-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  margin: 8px 0 4px;
  width: 100%;
  background: transparent;
  border: 2px dashed var(--lt-border);
  border-radius: var(--lt-radius-xs);
  font-family: var(--lt-font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--lt-text-muted);
  cursor: pointer;
  transition: all var(--lt-transition);
}

.add-lesson-btn:hover {
  background: var(--lt-primary-lighter);
  border-color: var(--lt-primary);
  color: var(--lt-primary);
}

.add-lesson-btn svg { width: 16px; height: 16px; }

/* Empty Tree */
.tree-empty {
  padding: 48px 24px;
  text-align: center;
}

.tree-empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: var(--lt-bg-subtle);
  border-radius: var(--lt-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lt-text-muted);
}

.tree-empty-icon svg { width: 32px; height: 32px; }

.tree-empty-title {
  font-family: var(--lt-font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--lt-text);
  margin-bottom: 6px;
}

.tree-empty-text {
  font-size: 13px;
  color: var(--lt-text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.tree-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--lt-font-display);
  font-size: 14px;
  font-weight: 500;
  color: white;
  background: var(--lt-primary);
  border: none;
  border-radius: var(--lt-radius-full);
  cursor: pointer;
  transition: all var(--lt-transition);
}

.tree-empty-btn:hover {
  background: var(--lt-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.tree-empty-btn svg { width: 16px; height: 16px; }

/* ===== MIDDLE PANEL - Sections ===== */
.panel-middle {
  width: 340px;
  flex-shrink: 0;
  height: 100%;
  max-height: calc(100vh - 32px);
}

.panel-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  min-height: 0;
  overflow: hidden;
}

.panel-empty-icon {
  width: 72px;
  height: 72px;
  background: var(--lt-bg-subtle);
  border-radius: var(--lt-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--lt-text-muted);
}

.panel-empty-icon svg { width: 32px; height: 32px; }

.panel-empty-text {
  font-size: 14px;
  color: var(--lt-text-muted);
  line-height: 1.5;
}

/* Section List */
.section-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  min-height: 0;
  /* Prevent scrolling the entire screen */
  overscroll-behavior: contain;
}

.section-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--lt-bg-subtle);
  border: 1px solid transparent;
  border-radius: var(--lt-radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all var(--lt-transition);
}

.section-item:hover {
  background: var(--lt-bg);
  border-color: var(--lt-border);
  box-shadow: var(--lt-shadow-card);
  transform: translateY(-1px);
}

.section-status-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--lt-transition-bounce);
}

.section-item:hover .section-status-icon {
  transform: scale(1.1);
}

.section-status-icon svg { width: 16px; height: 16px; }

.section-status-icon.completed { background: var(--lt-on-track-light); color: var(--lt-completed); }
.section-status-icon.partial { background: var(--lt-behind-light); color: var(--lt-partial); }
.section-status-icon.skipped { background: #fee2e2; color: var(--lt-skipped); }
.section-status-icon.pending { background: var(--lt-bg); border: 2px solid var(--lt-border); color: var(--lt-text-muted); }

.section-info { flex: 1; min-width: 0; }

.section-name {
  font-family: var(--lt-font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--lt-text);
  margin-bottom: 4px;
}

.section-content {
  font-size: 12px;
  color: var(--lt-text-muted);
  line-height: 1.4;
}

/* Status Dropdown */
.lesson-status-dropdown {
  position: relative;
}

.status-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--lt-bg);
  border: 2px solid var(--lt-border);
  border-radius: var(--lt-radius-full);
  font-family: var(--lt-font-display);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--lt-transition);
}

.status-btn:hover { transform: scale(1.02); }

.status-btn.behind { border-color: var(--lt-behind); color: var(--lt-behind); background: var(--lt-behind-light); }
.status-btn.on-track { border-color: var(--lt-on-track); color: var(--lt-on-track); background: var(--lt-on-track-light); }
.status-btn.ahead { border-color: var(--lt-ahead); color: var(--lt-ahead); background: var(--lt-ahead-light); }
.status-btn.next { border-color: var(--lt-primary); color: var(--lt-primary); background: var(--lt-primary-lighter); }

.status-btn svg { width: 16px; height: 16px; }
.status-btn .chevron { width: 14px; height: 14px; opacity: 0.7; }

.status-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--lt-bg);
  border: 1px solid var(--lt-border-light);
  border-radius: var(--lt-radius-sm);
  box-shadow: var(--lt-shadow-lg);
  min-width: 150px;
  z-index: 200;
  animation: fadeIn 0.15s ease;
  overflow: hidden;
}

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

.status-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--lt-transition);
  font-size: 14px;
}

.status-option:hover { background: var(--lt-bg-subtle); }
.status-option.active { font-weight: 500; }
.status-option svg { width: 18px; height: 18px; }

.status-option.behind { color: var(--lt-behind); }
.status-option.on-track { color: var(--lt-on-track); }
.status-option.ahead { color: var(--lt-ahead); }
.status-option.next { color: var(--lt-primary); }

/* Pre-Lesson Banner */
.pre-lesson-banner {
  margin: 16px;
  padding: 18px;
  background: linear-gradient(135deg, var(--lt-primary-lighter) 0%, #e0f7fa 100%);
  border: 1px solid var(--lt-primary-light);
  border-left: 4px solid var(--lt-primary);
  border-radius: var(--lt-radius-sm);
}

.pre-lesson-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pre-lesson-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--lt-font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--lt-primary-dark);
}

.pre-lesson-title svg { width: 16px; height: 16px; }

.pre-lesson-date {
  font-size: 12px;
  color: var(--lt-primary);
  font-weight: 500;
}

.pre-lesson-content {
  font-size: 14px;
  color: var(--lt-text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.pre-lesson-suggestion {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--lt-primary-dark);
  padding-top: 12px;
  border-top: 1px solid var(--lt-primary-light);
}

.pre-lesson-suggestion svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ===== RIGHT PANEL - Notes ===== */
.panel-right {
  flex: 1;
  min-width: 0;
  position: relative;
  height: 100%;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
}

.notes-timeline {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  padding-bottom: 20px;
  min-height: 0;
  /* Ensure it scrolls within its container */
  /* Prevent scrolling the entire screen */
  overscroll-behavior: contain;
  /* Scroll above the quick-add section */
}

.notes-timeline::-webkit-scrollbar { width: 6px; }
.notes-timeline::-webkit-scrollbar-track { background: transparent; }
.notes-timeline::-webkit-scrollbar-thumb { background: var(--lt-border); border-radius: 3px; }

/* Note Cards */
.note-card {
  background: var(--lt-bg-subtle);
  border: 1px solid var(--lt-border-light);
  border-radius: var(--lt-radius-sm);
  padding: 18px;
  margin-bottom: 12px;
  transition: all var(--lt-transition);
  animation: noteSlide 0.25s ease;
}

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

.note-card:hover {
  background: var(--lt-bg);
  border-color: var(--lt-border);
  box-shadow: var(--lt-shadow-card);
  transform: translateY(-2px);
}

.note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.note-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--lt-text-muted);
}

.note-time svg { width: 14px; height: 14px; }

.note-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: var(--lt-primary-lighter);
  color: var(--lt-primary-dark);
  border-radius: var(--lt-radius-full);
  font-size: 11px;
  font-weight: 600;
}

.note-tag svg { width: 12px; height: 12px; }

.note-text {
  font-size: 15px;
  color: var(--lt-text);
  line-height: 1.6;
}

.note-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  opacity: 0;
  transition: opacity var(--lt-transition);
}

.note-card:hover .note-actions { opacity: 1; }

.note-action-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--lt-radius-xs);
  cursor: pointer;
  color: var(--lt-text-muted);
  transition: all var(--lt-transition);
}

.note-action-btn:hover {
  background: var(--lt-bg-subtle);
  color: var(--lt-text);
}

.note-action-btn.delete:hover {
  background: #fee2e2;
  color: #ef4444;
}

.note-action-btn svg { width: 16px; height: 16px; }

/* Quick Add - stays fixed at bottom */
.quick-add {
  background: var(--lt-bg);
  border-top: 1px solid var(--lt-border-light);
  padding: 20px;
  border-radius: 0 0 var(--lt-radius-lg) var(--lt-radius-lg);
  flex-shrink: 0;
  /* Keep it at the bottom of the panel - doesn't scroll */
  margin-top: 0;
}

.quick-add-input-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
}

.quick-add-input {
  flex: 1;
  padding: 16px 20px;
  font-family: var(--lt-font-body);
  font-size: 15px;
  color: var(--lt-text);
  background: var(--lt-bg-subtle);
  border: 2px solid transparent;
  border-radius: var(--lt-radius-sm);
  transition: all var(--lt-transition);
}

.quick-add-input:focus {
  outline: none;
  background: var(--lt-bg);
  border-color: var(--lt-primary);
  box-shadow: 0 0 0 4px var(--lt-primary-light);
}

.quick-add-input::placeholder { color: var(--lt-text-muted); }

.quick-add-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lt-primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--lt-transition);
  flex-shrink: 0;
}

.quick-add-btn:hover {
  background: var(--lt-primary-dark);
  transform: scale(1.05);
}

.quick-add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.quick-add-btn svg { width: 24px; height: 24px; }

.tag-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-suggestion {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--lt-text-secondary);
  background: var(--lt-bg-subtle);
  border: 1px solid var(--lt-border-light);
  border-radius: var(--lt-radius-full);
  cursor: pointer;
  transition: all var(--lt-transition);
}

.tag-suggestion:hover {
  border-color: var(--lt-primary);
  color: var(--lt-primary);
  background: var(--lt-primary-lighter);
}

.tag-suggestion.active {
  background: var(--lt-primary);
  border-color: var(--lt-primary);
  color: white;
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background: var(--lt-bg);
  border-radius: var(--lt-radius);
  box-shadow: var(--lt-shadow-lg);
  width: 100%;
  max-width: 420px;
  animation: scaleIn 0.25s ease;
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid var(--lt-border-light);
}

.modal-title {
  font-family: var(--lt-font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--lt-text);
  flex: 1;
}

.modal-subtitle {
  font-size: 14px;
  color: var(--lt-text-secondary);
  margin-left: 12px;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lt-bg-subtle);
  border: none;
  border-radius: var(--lt-radius-xs);
  cursor: pointer;
  color: var(--lt-text-muted);
  transition: all var(--lt-transition);
}

.modal-close:hover {
  background: var(--lt-bg-page);
  color: var(--lt-text);
}

.modal-close svg { width: 20px; height: 20px; }

.modal-card form {
  padding: 28px;
}

/* Form Elements */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-family: var(--lt-font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--lt-text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 16px 20px;
  font-family: var(--lt-font-body);
  font-size: 16px;
  color: var(--lt-text);
  background: var(--lt-bg-subtle);
  border: 2px solid transparent;
  border-radius: var(--lt-radius-sm);
  transition: all var(--lt-transition);
}

.form-input:focus {
  outline: none;
  background: var(--lt-bg);
  border-color: var(--lt-primary);
  box-shadow: 0 0 0 4px var(--lt-primary-light);
}

.form-input::placeholder { color: var(--lt-text-muted); }

/* Import Toggle */
.import-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: var(--lt-bg-subtle);
  border: 2px solid var(--lt-border-light);
  border-radius: var(--lt-radius-sm);
  cursor: pointer;
  transition: all var(--lt-transition);
  margin-bottom: 20px;
}

.import-toggle:hover { border-color: var(--lt-primary-light); }

.import-toggle.active {
  background: var(--lt-primary-lighter);
  border-color: var(--lt-primary);
}

.import-toggle input { display: none; }

.import-toggle-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid var(--lt-border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--lt-transition);
}

.import-toggle.active .import-toggle-checkbox {
  background: var(--lt-primary);
  border-color: var(--lt-primary);
  color: white;
}

.import-toggle-checkbox svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  transition: opacity var(--lt-transition);
}

.import-toggle.active .import-toggle-checkbox svg { opacity: 1; }

.import-toggle-content { flex: 1; }

.import-toggle-label {
  font-family: var(--lt-font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--lt-text);
}

.import-toggle-desc {
  font-size: 12px;
  color: var(--lt-text-muted);
  margin-top: 2px;
}

/* Planner Lessons */
.planner-lessons {
  border: 1px solid var(--lt-border-light);
  border-radius: var(--lt-radius-sm);
  margin-bottom: 24px;
}

.planner-lessons-actions {
  padding: 10px 14px;
  border-bottom: 1px solid var(--lt-border-light);
}

.planner-lessons-list {
  max-height: 180px;
  overflow-y: auto;
}

.link-btn {
  background: none;
  border: none;
  font-family: var(--lt-font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--lt-primary);
  cursor: pointer;
  padding: 4px 0;
}

.link-btn:hover {
  text-decoration: underline;
}

.planner-lesson-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--lt-border-light);
  cursor: pointer;
  transition: background var(--lt-transition);
}

.planner-lesson-item:last-child { border-bottom: none; }
.planner-lesson-item:hover { background: var(--lt-bg-subtle); }
.planner-lesson-item.selected { background: var(--lt-primary-lighter); }

.planner-lesson-radio {
  width: 18px;
  height: 18px;
  border: 2px solid var(--lt-border);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--lt-transition);
}

.planner-lesson-item.selected .planner-lesson-radio {
  border-color: var(--lt-primary);
  background: var(--lt-primary);
}

.planner-lesson-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  opacity: 0;
  transition: opacity var(--lt-transition);
}

.planner-lesson-item.selected .planner-lesson-radio::after { opacity: 1; }

.planner-lesson-title {
  font-size: 14px;
  color: var(--lt-text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planner-empty {
  padding: 28px;
  text-align: center;
  color: var(--lt-text-muted);
  font-size: 14px;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  padding: 14px 24px;
  font-family: var(--lt-font-display);
  font-size: 15px;
  font-weight: 500;
  color: white;
  background: var(--lt-primary);
  border: none;
  border-radius: var(--lt-radius-full);
  cursor: pointer;
  transition: all var(--lt-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit:hover {
  background: var(--lt-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-submit svg { width: 20px; height: 20px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .panel-left { width: 260px; }
  .panel-middle { width: 300px; }
}

@media (max-width: 1024px) {
  .tracker-screen {
    flex-direction: column;
    padding: 16px;
    gap: 16px;
    height: 100vh;
    overflow-y: auto;
  }
  
  .panel-left,
  .panel-middle {
    width: 100%;
    max-height: none;
  }
  
  .panel-left {
    max-height: 280px;
  }
  
  .panel-right {
    min-height: 400px;
    max-height: none;
  }
  
  .quick-add {
    border-radius: 0 0 var(--lt-radius-lg) var(--lt-radius-lg);
  }
}

@media (max-width: 640px) {
  .welcome-screen { padding: 20px; }
  .welcome-title { font-size: 28px; }
  .welcome-icon { width: 72px; height: 72px; border-radius: 22px; }
  .welcome-icon svg { width: 36px; height: 36px; }
  
  .tracker-screen { padding: 12px; gap: 12px; }
  
  .panel { border-radius: var(--lt-radius); }
  .panel-header { padding: 16px 18px; }
  .panel-title { font-size: 16px; }
  
  .class-tree,
  .section-list,
  .notes-timeline { padding: 12px; }
  
  .quick-add { padding: 16px; }
  .quick-add-input { padding: 14px 16px; }
  .quick-add-btn { width: 48px; height: 48px; }
  
  .class-actions,
  .lesson-actions,
  .note-actions { opacity: 1; }
  
  .modal-card { border-radius: var(--lt-radius); }
  .modal-card form { padding: 20px; }
}

/* ===== PRINT ===== */
@media print {
  .welcome-screen,
  .panel-left,
  .panel-header,
  .quick-add,
  .note-actions,
  .lesson-status-dropdown { display: none !important; }
  
  body { background: white; }
  .tracker-screen { display: block; padding: 0; }
  .panel-middle, .panel-right { width: 100%; box-shadow: none; }
  .note-card { break-inside: avoid; border: 1px solid #ddd; }
}
