/* ==========================================================================
   Linear & Obsidian Design System — अभ्यास Placement Engineering Roadmap
   Typography: Inter, JetBrains Mono & Rozha One • High Craftsmanship
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400;1,500;1,600&family=Rozha+One&family=Yatra+One&display=swap');

/* Calligraphic Devanagari Typography */
.font-calligraphy, .quote-text-sanskrit {
  font-family: 'Rozha One', 'Yatra One', serif;
  letter-spacing: 0.02em;
}

/* Editorial Serif for English Quotes */
.quote-text-english {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-style: italic;
  letter-spacing: -0.01em;
}

/* Distinctive typography for Quote Authors */
.quote-author-style {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:root, html.dark, [data-theme="dark"] {
  /* Obsidian Dark Palette */
  --bg-canvas: #121316;
  --bg-surface: #1b1b1f;
  --bg-surface-elevated: #292a2d;
  --bg-surface-subtle: #1f1f23;
  --bg-hover: #292a2d;
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-accent: rgba(192, 193, 255, 0.35);
  
  --text-primary: #e3e2e6;
  --text-secondary: #c7c4d7;
  --text-muted: #908fa0;
  --text-faint: #464554;
  
  --accent-primary: #c0c1ff;
  --accent-hover: #e1e0ff;
  --accent-light: rgba(192, 193, 255, 0.12);
  --accent-ring: rgba(192, 193, 255, 0.25);
  
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.14);
  --success-border: rgba(16, 185, 129, 0.28);
  --streak-flame: #ea580c;
  
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.14);
  
  /* Track Badges (Dark) */
  --tag-dsa-bg: rgba(192, 193, 255, 0.14);
  --tag-dsa-text: #c0c1ff;
  --tag-aiml-bg: rgba(185, 200, 222, 0.14);
  --tag-aiml-text: #b9c8de;
  --tag-corecs-bg: rgba(193, 199, 207, 0.14);
  --tag-corecs-text: #c1c7cf;
  --tag-backend-bg: rgba(128, 131, 255, 0.14);
  --tag-backend-text: #c0c1ff;
  --tag-aptitude-bg: rgba(245, 158, 11, 0.14);
  --tag-aptitude-text: #fde68a;

  /* Heatmap Levels (Dark) */
  --heat-lvl-0: #1f1f23;
  --heat-lvl-1: rgba(192, 193, 255, 0.25);
  --heat-lvl-2: rgba(192, 193, 255, 0.6);
  --heat-lvl-3: #c0c1ff;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.6);
  
  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Tactile Glass & Micro Border utility */
.cockpit-glass {
  background: rgba(18, 19, 22, 0.75) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.35), inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.cockpit-subglass {
  background: rgba(27, 27, 31, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.03);
}

/* Spring-like checkbox animations */
.checkbox-spring {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s ease, border-color 0.15s ease;
}
.checkbox-spring:active {
  transform: scale(0.85);
}

/* Phase accordion smooth transition */
.accordion-content {
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  overflow: hidden;
}

/* Hide scrollbar utility */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

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

/* ==========================================================================
   Premium Silk Page Transitions (Cross-document View Transitions + Fallback)
   ========================================================================== */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 120ms cubic-bezier(0.4, 0, 1, 1) both pageFadeOut;
}
::view-transition-new(root) {
  animation: 200ms cubic-bezier(0, 0, 0.2, 1) both pageFadeIn;
}

@keyframes pageFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-4px); }
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

html {
  font-size: 14.5px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.55;
  min-height: 100vh;
  letter-spacing: -0.011em;
  transition: background-color 0.2s ease, color 0.2s ease;
  animation: pageEnter 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

body.page-leaving {
  opacity: 0 !important;
  transform: translateY(-4px) !important;
  transition: opacity 0.13s cubic-bezier(0.4, 0, 1, 1), transform 0.13s cubic-bezier(0.4, 0, 1, 1) !important;
}

@keyframes pageEnter {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

/* Container */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}



/* Authentication Badges */
.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.auth-badge.unlocked {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.auth-badge.locked {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.auth-entry {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 80;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.auth-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}



.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* ==========================================================================
   Dashboard Hero & Identity
   ========================================================================== */
.dashboard-hero {
  margin-bottom: 1.75rem;
}

.cockpit-identity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-primary);
  background: var(--accent-light);
  border: 1px solid var(--border-accent);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cockpit-identity-badge span.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.dashboard-title {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.dashboard-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 720px;
  line-height: 1.6;
}

/* ==========================================================================
   TODAY'S MISSION / ACTIVE COMMAND CENTER CARD (Zero Friction)
   ========================================================================== */
.today-focus-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.today-focus-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--success));
}

.today-focus-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.today-badge-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse-dot 1.8s infinite;
}

.today-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--accent-primary);
  color: #ffffff;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.today-day-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.today-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.today-day-picker {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}

.today-open-week-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary);
  background: var(--accent-light);
  border: 1px solid var(--border-accent);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
}

.today-open-week-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
}

/* Today's Tasks Rows */
.today-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.today-task-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.today-task-row:hover {
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

.today-task-row.completed {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.today-task-row.completed .today-task-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.today-task-row.deferred {
  border-style: dashed;
  opacity: 0.85;
}

.today-task-content {
  flex: 1;
  min-width: 0;
}

.today-task-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}

.today-task-text {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-primary);
}

/* Today Card Footer */
.today-focus-footer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.today-progress-bar-wrap {
  height: 6px;
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border-subtle);
}

.today-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--success));
  border-radius: var(--radius-full);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.today-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.today-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ==========================================================================
   STREAK ENGINE & ACTIVITY HEATMAP SECTION
   ========================================================================== */
.streak-heatmap-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.streak-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.streak-stat-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.streak-stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.streak-stat-val {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.streak-stat-val.flame {
  color: var(--streak-flame);
}

.status-badge-done {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.status-badge-pending {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--warning);
  background: var(--warning-bg);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

/* Heatmap Grid */
.heatmap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.heatmap-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.legend-cell {
  width: 11px;
  height: 11px;
  border-radius: 2px;
}

.activity-heatmap-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 12px);
  gap: 3.5px;
  overflow-x: auto;
  padding-bottom: 0.4rem;
}

/* LeetCode Contribution Heatmap - Strict 7-Row Calendar Columns */
.leetcode-month-grid {
  display: grid !important;
  grid-auto-flow: column !important;
  grid-template-rows: repeat(7, 11px) !important;
  gap: 2.5px !important;
}

.leetcode-cell-placeholder {
  width: 11px !important;
  height: 11px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.leetcode-cell {
  width: 11px !important;
  height: 11px !important;
  border-radius: 2px !important;
  cursor: default !important;
  user-select: none !important;
}

@media (max-width: 640px) {
  .leetcode-month-grid {
    grid-template-rows: repeat(7, 10px) !important;
    gap: 2px !important;
  }
  .leetcode-cell-placeholder {
    width: 10px !important;
    height: 10px !important;
  }
  .leetcode-cell {
    width: 10px !important;
    height: 10px !important;
  }
}

.heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 2.5px;
  background: var(--heat-lvl-0);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.heatmap-cell:hover {
  transform: scale(1.3);
  z-index: 5;
}

.heatmap-cell.lvl-1 { background: var(--heat-lvl-1); }
.heatmap-cell.lvl-2 { background: var(--heat-lvl-2); }
.heatmap-cell.lvl-3 { background: var(--heat-lvl-3); }

.heatmap-cell.is-today {
  outline: 1.5px solid var(--accent-primary);
  outline-offset: 1px;
}

/* ==========================================================================
   SCHEDULE BANNER CARD
   ========================================================================== */
.schedule-banner-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.schedule-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.schedule-banner-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.schedule-total-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-light);
  color: var(--accent-primary);
  border: 1px solid var(--border-accent);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.schedule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.schedule-item {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.schedule-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  margin-bottom: 0.35rem;
}

.schedule-badge.weekday {
  background: var(--tag-corecs-bg);
  color: var(--tag-corecs-text);
}

.schedule-badge.weekend {
  background: var(--tag-aiml-bg);
  color: var(--tag-aiml-text);
}

.schedule-hours {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
  font-variant-numeric: tabular-nums;
}

.schedule-breakdown {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.schedule-breakdown li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.time-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   GLOBAL STATS GRID & PROGRESS
   ========================================================================== */
.global-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.stat-val {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
  font-variant-numeric: tabular-nums;
}

.stat-val.accent {
  color: var(--accent-primary);
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.progress-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.progress-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.progress-stats {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.progress-bar-bg {
  height: 8px;
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--success));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* ==========================================================================
   PHASE CARDS & WEEK TILES
   ========================================================================== */
.phases-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.phase-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
}

.phase-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
}

.phase-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.phase-progress-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}

.weeks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.75rem;
}

.week-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.85rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  min-height: 105px;
  transition: all 0.15s ease;
}

.week-tile:hover {
  background: var(--bg-hover);
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.week-tile.completed {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.week-tile-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.week-tile.completed .week-tile-num {
  color: var(--success);
}

.week-tile-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.week-tile-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.4rem;
}

/* ==========================================================================
   WEEK DETAIL CHECKLIST PAGE
   ========================================================================== */
.week-header {
  margin-bottom: 1.5rem;
}

.phase-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-primary);
  background: var(--accent-light);
  border: 1px solid var(--border-accent);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.week-title {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

.week-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.filter-pill.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  font-weight: 600;
}

.btn-subtle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

/* Day Cards */
.days-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.day-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.35rem;
  box-shadow: var(--shadow-sm);
}

.day-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
}

.day-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.day-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.day-budget-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-sm);
}

.day-budget-pill.weekday {
  background: var(--tag-corecs-bg);
  color: var(--tag-corecs-text);
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.day-budget-pill.weekend {
  background: var(--tag-aiml-bg);
  color: var(--tag-aiml-text);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.day-progress {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Task Items */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.task-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.task-item.completed {
  border-color: var(--success-border);
  background: var(--success-bg);
}

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

.task-item.deferred {
  border-style: dashed;
  opacity: 0.85;
}

.task-content {
  flex: 1;
  min-width: 0;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}

.track-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
}

.track-tag.dsa { background: var(--tag-dsa-bg); color: var(--tag-dsa-text); }
.track-tag.aiml { background: var(--tag-aiml-bg); color: var(--tag-aiml-text); }
.track-tag.corecs { background: var(--tag-corecs-bg); color: var(--tag-corecs-text); }
.track-tag.backend { background: var(--tag-backend-bg); color: var(--tag-backend-text); }
.track-tag.aptitude { background: var(--tag-aptitude-bg); color: var(--tag-aptitude-text); }

.time-estimate-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-xs);
  font-variant-numeric: tabular-nums;
}

.task-text {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-primary);
}

.task-text strong {
  font-weight: 600;
}

.task-text code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  padding: 0.15em 0.35em;
  border-radius: var(--radius-xs);
}

.task-link {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.task-link:hover {
  color: var(--accent-hover);
}

/* Defer Button */
.btn-defer {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-defer:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-defer.active {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.4);
}

/* Weekend Deferred Queue */
.weekend-deferred-container {
  display: none;
  background: var(--bg-surface-subtle);
  border: 1px dashed var(--warning);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
}

.deferred-backlog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.deferred-backlog-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--warning);
}

.deferred-backlog-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.deferred-backlog-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.deferred-backlog-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
}

.deferred-backlog-text {
  flex: 1;
  color: var(--text-primary);
}

.btn-undefer {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.15rem 0.4rem;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-undefer:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* Custom Checkbox (Tactile & Clean) */
.custom-checkbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-visual {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-visual svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: scale(0);
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-checkbox:hover .checkbox-visual {
  border-color: var(--accent-primary);
  background: var(--bg-hover);
}

.custom-checkbox input:checked + .checkbox-visual {
  background: var(--success);
  border-color: var(--success);
}

.custom-checkbox input:checked + .checkbox-visual svg {
  transform: scale(1);
}

/* Deliverables Section */
.deliverables-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.deliverables-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.deliverables-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.deliverables-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--accent-light);
  color: var(--accent-primary);
  border: 1px solid var(--border-accent);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.deliverables-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.deliverable-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.deliverable-item.completed {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.deliverable-item.completed .deliverable-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.deliverable-text {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-primary);
}

/* Notes Section */
.notes-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.notes-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.notes-save-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.notes-textarea {
  width: 100%;
  min-height: 130px;
  padding: 0.85rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.6;
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  outline: none;
  resize: vertical;
  transition: border-color 0.15s ease;
}

.notes-textarea:focus {
  border-color: var(--accent-primary);
  background: var(--bg-surface);
}

/* Bottom Nav */
.bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   AUTHENTICATION OVERLAY & MODAL
   ========================================================================== */
.auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(9, 11, 16, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  overflow-y: auto;
}

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

.auth-card {
  width: 100%;
  max-width: 440px;
  max-height: calc(100dvh - 2.5rem);
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow-y: auto;
}

@media (max-height: 620px) {
  .auth-overlay {
    align-items: flex-start;
  }

  .auth-card {
    margin-block: 0;
  }
}

.auth-card-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.auth-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.auth-title {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 1.25rem;
}

.auth-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  text-align: center;
  margin-bottom: 1.5rem;
}



.auth-status-msg {
  min-height: 1.25rem;
  font-size: 0.82rem;
  margin-bottom: 1rem;
  text-align: center;
}

.auth-status-msg.error {
  color: #ef4444;
}

.auth-status-msg.info {
  color: var(--accent-primary);
}



/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  background: var(--text-primary);
  color: var(--bg-canvas);
  padding: 0.65rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  transform: translateY(150%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 1rem 0.85rem 3rem;
  }

  .top-nav {
    padding: 0.5rem 0.85rem;
  }

  .streak-strip-grid {
    grid-template-columns: 1fr 1fr;
  }

  .schedule-grid {
    grid-template-columns: 1fr;
  }

  .global-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .weeks-grid {
    grid-template-columns: 1fr 1fr;
  }

  .today-focus-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .today-nav-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* Spaced Repetition Memory Deck */
.recall-btn {
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.recall-btn:hover {
  transform: translateY(-1px);
}

.recall-btn:active {
  transform: translateY(0) scale(0.97);
}

.task-sr-badge {
  letter-spacing: -0.01em;
}

/* Global Search Match Highlight */
#global-search-bar {
  z-index: 9999 !important;
  background-color: #1c1c1f !important;
}

.task-search-highlight {
  outline: 2px solid var(--color-primary, #8083ff) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 25px rgba(128, 131, 255, 0.4) !important;
  border-radius: 8px !important;
  animation: search-highlight-pulse 2s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

@keyframes search-highlight-pulse {
  0% {
    box-shadow: 0 0 15px rgba(128, 131, 255, 0.25);
  }
  100% {
    box-shadow: 0 0 32px rgba(128, 131, 255, 0.55);
  }
}
