:root {
  /* Color Palette - Deep Academic Teal & Crisp Paper White */
  --bg-canvas: #f8f9fa;
  --bg-card: #ffffff;
  --primary: #1a5f7a;
  --primary-light: #eef7f9;
  --accent: #ff7e67;
  --text-main: #2d3436;
  --text-muted: #636e72;
  --border: #dfe6e9;
  --success: #00b894;
  --important: #fab1a0;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;
  --space-2xl: 64px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 24px rgba(0,0,0,0.12);
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Layout */
.app-container {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  min-height: 100vh;
}

@media (max-width: 1200px) {
  .app-container {
    grid-template-columns: 80px 1fr 0px;
  }
  .right-sidebar { display: none; }
}

/* Navigation */
.sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
}

.nav-group {
  margin-bottom: var(--space-xl);
}

.nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  display: block;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  text-decoration: none;
  color: var(--text-main);
  border-radius: 12px;
  transition: all 0.2s;
  margin-bottom: var(--space-xs);
}

.nav-link:hover, .nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* Main Content */
main {
  padding: var(--space-xl);
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-xl);
}

.greeting h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.greeting p {
  margin: var(--space-xs) 0 0 0;
  color: var(--text-muted);
}

/* AI Planner Bar */
.ai-planner-card {
  background: linear-gradient(135deg, var(--primary), #2c3e50);
  color: white;
  padding: var(--space-lg);
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-lg);
}

.ai-input-wrapper {
  flex: 1;
  background: rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.2);
}

.ai-input-wrapper input {
  background: transparent;
  border: none;
  color: white;
  width: 100%;
  padding: var(--space-sm);
  font-size: 1rem;
  outline: none;
}

.ai-input-wrapper input::placeholder {
  color: rgba(255,255,255,0.6);
}

.btn-ai {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s;
}

.btn-ai:hover {
  transform: translateY(-2px);
}

/* Study Grid */
.study-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-xl);
}

/* Paper-style Checklist */
.paper-checklist {
  background: var(--bg-card);
  border-radius: 4px;
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  position: relative;
  border-left: 40px solid #f1f2f6;
}

.paper-checklist::before {
  content: '';
  position: absolute;
  top: 0;
  left: -2px;
  bottom: 0;
  width: 2px;
  background: rgba(255, 126, 103, 0.3);
}

.checklist-title {
  font-family: 'Kalam', cursive, sans-serif;
  font-size: 1.5rem;
  margin-bottom: var(--space-lg);
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: var(--space-sm);
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid #f1f2f6;
  position: relative;
}

.checkbox-custom {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checklist-item.done .checkbox-custom {
  background: var(--success);
  border-color: var(--success);
}

.checklist-item.done .task-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-content {
  flex: 1;
}

.task-text {
  font-weight: 500;
  display: block;
}

.task-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: var(--space-md);
  margin-top: 4px;
}

.priority-tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.tag-high { background: #ffeaa7; color: #d35400; }
.tag-exam { background: #fab1a0; color: #c0392b; }

/* Focus Sidebars */
.focus-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  border: 1px solid var(--border);
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.focus-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.stat-bar {
  height: 8px;
  background: var(--primary-light);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}

.stat-fill {
  height: 100%;
  background: var(--primary);
}

/* Exam Ready Panel */
.right-sidebar {
  background: var(--bg-canvas);
  border-left: 1px solid var(--border);
  padding: var(--space-lg);
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
}

.exam-prep-item {
  background: white;
  padding: var(--space-md);
  border-radius: 12px;
  margin-bottom: var(--space-md);
  border: 1px solid var(--border);
  transition: transform 0.2s;
  cursor: pointer;
}

.exam-prep-item:hover {
  transform: translateX(-4px);
  border-color: var(--primary);
}

.placeholder-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--primary);
}

/* Utility */
.badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-urgent { background: #ff7675; color: white; }

.placeholder-icon {
  width: 20px;
  height: 20px;
  background: currentColor;
  opacity: 0.2;
  border-radius: 4px;
}

/* Setup Page Specifics */
.setup-container {
    max-width: 600px;
    margin: 10vh auto;
    text-align: center;
    padding: var(--space-xl);
}
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}
.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
}
.step-dot.active {
    background: var(--primary);
    width: 32px;
    border-radius: 10px;
}
.syllabus-upload {
    border: 2px dashed var(--primary);
    padding: var(--space-2xl);
    border-radius: 24px;
    background: var(--primary-light);
    cursor: pointer;
    margin-bottom: 32px;
    transition: all 0.2s;
}
.syllabus-upload:hover {
    background: #e0f2f7;
    transform: scale(1.01);
}

/* Dashboard Specific Classes */
.user-avatar-text {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--primary);
}

.weekly-momentum-grid {
    display: flex; 
    gap: 12px; 
    height: 100px; 
    align-items: flex-end;
}

.momentum-bar {
    flex: 1; 
    background: var(--primary-light); 
    border-radius: 4px;
}

.momentum-bar.active {
    background: var(--primary);
}

.momentum-bar.empty {
    background: var(--border);
}

.tip-card {
    margin-top: 32px; 
    background: #fffceb; 
    border-color: #fce38a;
}

.tip-card h4 {
    margin: 0 0 8px 0; 
    color: #856404; 
    font-size: 0.9rem;
}

.tip-card p {
    margin: 0; 
    font-size: 0.8rem; 
    color: #856404;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}
