/* =========================================================
   SMART STUDY PLANNER — MODERN GLASSMORPHIC DESIGN SYSTEM
   ========================================================= */

:root {
  --bg-dark: #070913;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(16, 185, 129, 0.25);
  
  --emerald: #10b981;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-glow: rgba(16, 185, 129, 0.35);

  --purple: #8b5cf6;
  --purple-dim: rgba(139, 92, 246, 0.12);
  --purple-glow: rgba(139, 92, 246, 0.35);

  --cyan: #06b6d4;
  --cyan-dim: rgba(6, 182, 212, 0.12);

  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.12);

  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.12);

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 9999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background Grids & Glows */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
  animation: floatPulse 14s infinite alternate ease-in-out;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: var(--emerald);
  top: -100px;
  left: 10%;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: var(--purple);
  bottom: 5%;
  right: 5%;
  animation-delay: -5s;
}

.glow-3 {
  width: 400px;
  height: 400px;
  background: var(--cyan);
  top: 40%;
  left: 60%;
  animation-delay: -8s;
}

@keyframes floatPulse {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.15) translate(40px, 30px); }
}

/* =========================================================
   TOP NAVIGATION BAR
   ========================================================= */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(7, 9, 19, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 0;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.brand-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--emerald), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 20px var(--emerald-glow);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--purple-dim);
  color: var(--purple);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-left: 6px;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.6);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  background: linear-gradient(135deg, var(--emerald), #059669);
  color: #041f16;
  box-shadow: 0 2px 14px var(--emerald-glow);
  font-weight: 700;
}

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

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost.active {
  background: var(--purple-dim);
  color: var(--purple);
  border-color: var(--purple);
  box-shadow: 0 0 15px var(--purple-glow);
}

.btn-reset {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset:hover {
  color: var(--text-main);
  transform: rotate(180deg);
}

/* =========================================================
   APP CONTAINER & STAT BANNER
   ========================================================= */
.app-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 60px;
  position: relative;
  z-index: 1;
}

.stat-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-icon-wrap.emerald { background: var(--emerald-dim); color: var(--emerald); border: 1px solid rgba(16, 185, 129, 0.2); }
.stat-icon-wrap.purple { background: var(--purple-dim); color: var(--purple); border: 1px solid rgba(139, 92, 246, 0.2); }
.stat-icon-wrap.cyan { background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(6, 182, 212, 0.2); }
.stat-icon-wrap.amber { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.2); }

.stat-meta {
  flex: 1;
  min-width: 0;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.stat-value-group {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.stat-sub, .stat-unit {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.stat-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.status-live {
  color: var(--emerald);
  font-weight: 600;
}

.stat-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  margin-top: 8px;
  overflow: hidden;
}

.stat-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

/* =========================================================
   TABS & DASHBOARD GRID
   ========================================================= */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

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

.dashboard-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

.card-header h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--emerald-dim);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.header-with-count {
  display: flex;
  align-items: center;
  gap: 8px;
}

.count-pill {
  background: var(--purple-dim);
  color: var(--purple);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* =========================================================
   FORMS & INPUTS
   ========================================================= */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-group input,
.input-group select,
.input-group textarea {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-dim);
  background: rgba(15, 23, 42, 0.95);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
  color: var(--text-muted);
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald), #059669);
  color: #041f16;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px var(--emerald-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--emerald-glow);
  filter: brightness(1.05);
}

.btn-ghost-sm {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ghost-sm:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.smart-suggestion-box {
  margin-top: 18px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.suggestion-icon {
  font-size: 1.2rem;
}

.suggestion-content strong {
  font-size: 0.8rem;
  color: var(--emerald);
  display: block;
  margin-bottom: 2px;
}

.suggestion-content p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* =========================================================
   TASK LIST & FILTERS
   ========================================================= */
.filter-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pill:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.pill.active {
  background: var(--purple-dim);
  border-color: var(--purple);
  color: var(--purple);
  box-shadow: 0 0 12px var(--purple-glow);
}

.task-list-wrapper {
  min-height: 380px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.task-list-wrapper::-webkit-scrollbar {
  width: 5px;
}

.task-list-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: var(--radius-pill);
}

.task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.2s ease;
}

.task-item:hover {
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(2px);
}

.task-item.completed {
  opacity: 0.55;
  background: rgba(15, 23, 42, 0.3);
}

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

.task-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.task-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.task-checkbox.checked {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #041f16;
  font-weight: 900;
  font-size: 0.8rem;
}

.task-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.task-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-subject {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--purple-dim);
  color: var(--purple);
}

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

.tag-priority.high { background: var(--red-dim); color: var(--red); }
.tag-priority.medium { background: var(--amber-dim); color: var(--amber); }
.tag-priority.low { background: var(--emerald-dim); color: var(--emerald); }

.tag-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.tag-duration {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
}

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

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

.btn-task-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.btn-task-action.delete:hover {
  background: var(--red-dim);
  color: var(--red);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.empty-state h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

/* =========================================================
   POMODORO FOCUS SUITE (TAB 2)
   ========================================================= */
.focus-suite-card {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 30px;
}

.focus-modes {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.8);
  padding: 5px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  margin-bottom: 36px;
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-btn.active {
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: #041f16;
  font-weight: 700;
  box-shadow: 0 0 16px var(--emerald-glow);
}

.timer-visual-container {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 12;
}

.progress-ring-circle {
  fill: none;
  stroke: var(--emerald);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 879.6;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.4s ease;
  filter: drop-shadow(0 0 12px var(--emerald-glow));
}

.timer-display-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timer-mode-tag {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--emerald);
  margin-bottom: 4px;
}

.timer-digits {
  font-family: var(--font-mono);
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1;
}

.timer-focus-subject {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 10px;
}

.timer-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
}

.btn-timer-primary {
  background: linear-gradient(135deg, var(--emerald), #059669);
  color: #041f16;
  border: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  padding: 14px 38px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 6px 24px var(--emerald-glow);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.btn-timer-primary:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 30px var(--emerald-glow);
}

.btn-timer-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-timer-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.soundscape-toolbar {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.soundscape-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.sound-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.sound-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sound-pill:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.sound-pill.active {
  background: var(--purple-dim);
  border-color: var(--purple);
  color: var(--purple);
  box-shadow: 0 0 14px var(--purple-glow);
}

/* =========================================================
   AI SCHEDULE GENERATOR (TAB 3)
   ========================================================= */
.roadmap-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}

.roadmap-day {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  position: relative;
  border-left: 4px solid var(--emerald);
  transition: all 0.2s ease;
}

.roadmap-day:hover {
  background: rgba(30, 41, 59, 0.6);
  transform: translateX(4px);
}

.roadmap-day.review-day {
  border-left-color: var(--purple);
}

.roadmap-day.mock-day {
  border-left-color: var(--amber);
}

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

.roadmap-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--emerald);
  text-transform: uppercase;
}

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

.roadmap-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.roadmap-subtasks {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* =========================================================
   FLASHCARDS ACTIVE RECALL VAULT (TAB 4)
   ========================================================= */
.flashcards-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}

.form-inline-stack {
  display: grid;
  grid-template-columns: 1fr 1fr 160px auto;
  gap: 10px;
}

.flashcard-stage {
  padding: 32px;
  text-align: center;
}

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

.stage-subject {
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--purple-dim);
  color: var(--purple);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.stage-index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.interactive-flip-card {
  perspective: 1000px;
  width: 100%;
  height: 280px;
  cursor: pointer;
  margin-bottom: 28px;
}

.card-face {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1), border-color 0.3s;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.card-face-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(15, 23, 42, 0.95));
  border-color: rgba(16, 185, 129, 0.3);
}

.interactive-flip-card.flipped .card-face-front {
  transform: rotateY(-180deg);
}

.interactive-flip-card.flipped .card-face-back {
  transform: rotateY(0deg);
}

.face-tag {
  position: absolute;
  top: 18px;
  left: 20px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--purple);
}

.answer-tag {
  color: var(--emerald);
}

.card-question-text, .card-answer-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.4;
  max-width: 580px;
  color: var(--text-main);
}

.flip-prompt {
  position: absolute;
  bottom: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stage-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.recall-ratings {
  display: flex;
  gap: 8px;
}

.rating-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.rating-btn.red:hover { background: var(--red-dim); color: var(--red); border-color: var(--red); }
.rating-btn.yellow:hover { background: var(--amber-dim); color: var(--amber); border-color: var(--amber); }
.rating-btn.green:hover { background: var(--emerald-dim); color: var(--emerald); border-color: var(--emerald); }

/* =========================================================
   ANALYTICS & GPA (TAB 5)
   ========================================================= */
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.heatmap-cell.lvl-1 { background: rgba(16, 185, 129, 0.2); border-color: rgba(16, 185, 129, 0.3); color: var(--emerald); }
.heatmap-cell.lvl-2 { background: rgba(16, 185, 129, 0.4); border-color: rgba(16, 185, 129, 0.5); color: #fff; }
.heatmap-cell.lvl-3 { background: rgba(16, 185, 129, 0.7); border-color: rgba(16, 185, 129, 0.8); color: #000; font-weight: 700; }
.heatmap-cell.lvl-4 { background: var(--emerald); border-color: var(--emerald); color: #000; font-weight: 800; box-shadow: 0 0 10px var(--emerald-glow); }

.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.legend-cell {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

.legend-cell.lvl-0 { background: rgba(255, 255, 255, 0.03); }
.legend-cell.lvl-1 { background: rgba(16, 185, 129, 0.2); }
.legend-cell.lvl-2 { background: rgba(16, 185, 129, 0.4); }
.legend-cell.lvl-3 { background: rgba(16, 185, 129, 0.7); }
.legend-cell.lvl-4 { background: var(--emerald); }

.gpa-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.gpa-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.gpa-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.gpa-table input, .gpa-table select {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  outline: none;
  width: 100%;
}

.gpa-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
}

.gpa-result-tag {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.gpa-result-tag strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--amber);
}

/* =========================================================
   FOOTER
   ========================================================= */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 28px 0;
  margin-top: 60px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-container a {
  color: var(--emerald);
  text-decoration: none;
}

.footer-links {
  display: flex;
  gap: 18px;
}

/* =========================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================================= */
@media (max-width: 1024px) {
  .stat-banner {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .form-inline-stack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none;
  }
  .nav-links {
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .stat-banner {
    grid-template-columns: 1fr;
  }
  .input-row {
    grid-template-columns: 1fr;
  }
  .timer-digits {
    font-size: 3.2rem;
  }
  .interactive-flip-card {
    height: 240px;
  }
  .card-question-text, .card-answer-text {
    font-size: 1.15rem;
  }
}
