/* ==========================================================================
   StudyBuddy Nexus — Modern Design System & Component Library
   Obsidian Dark / Editorial Warm Light Modes · Glassmorphism · Micro-interactions
   ========================================================================== */

:root {
  /* Color Palette — Dark Obsidian (Default) */
  --bg-main: #0c0e14;
  --bg-surface: #141824;
  --bg-surface-elevated: #1c2234;
  --bg-surface-glass: rgba(20, 24, 36, 0.75);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-prominent: rgba(255, 255, 255, 0.16);

  --text-primary: #f0f3fa;
  --text-secondary: #9aa5be;
  --text-muted: #5e6b88;

  --accent-primary: #6366f1; /* Indigo */
  --accent-primary-hover: #4f46e5;
  --accent-primary-light: rgba(99, 102, 241, 0.15);

  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-violet: #8b5cf6;

  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Fraunces', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 350ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Light Mode Overrides */
[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-glass: rgba(255, 255, 255, 0.85);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-prominent: rgba(0, 0, 0, 0.15);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent-primary: #4f46e5;
  --accent-primary-hover: #4338ca;
  --accent-primary-light: rgba(79, 70, 229, 0.1);

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 24px rgba(79, 70, 229, 0.18);
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

/* ==========================================
   HEADER & NAVBAR
   ========================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.75rem;
  background-color: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-normal);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-violet));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-primary));
  color: #ffffff;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--bg-surface-elevated);
  padding: 0.25rem 0.35rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}

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

.nav-item.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.nav-icon {
  font-size: 0.95rem;
}

/* Nav Actions */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.chip-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 500;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chip-btn:hover {
  border-color: var(--border-prominent);
  color: var(--text-primary);
}

.sound-btn.active {
  background-color: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.sound-btn.active .sound-wave-icon {
  animation: pulse-wave 1.2s infinite ease-in-out;
}

@keyframes pulse-wave {
  0%, 100% { opacity: 0.4; transform: scaleY(0.8); }
  50% { opacity: 1; transform: scaleY(1.4); }
}

.devtools-trigger-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.devtools-trigger-btn:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.25));
  border-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.3);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-emerald 2s infinite;
}

@keyframes pulse-emerald {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.icon-circle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface-elevated);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.icon-circle-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-prominent);
  background-color: rgba(255, 255, 255, 0.1);
}

.icon-circle-btn.small {
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
}

/* ==========================================
   MAIN CONTENT & ROUTE VIEWS
   ========================================== */
.main-content {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 4rem;
}

.app-view {
  display: none;
  animation: viewFadeIn 300ms ease-out forwards;
}

.app-view.active {
  display: block;
}

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

/* Reusable Panels & Badges */
.panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.panel:hover {
  border-color: var(--border-prominent);
}

.pill-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  background-color: var(--accent-primary-light);
  color: #a5b4fc;
  margin-bottom: 0.5rem;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
}

.badge-status.online {
  background-color: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
}

.badge-status.online .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
}

/* Buttons */
.btn-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary-action:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-primary-action.small-btn {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

.btn-secondary-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary-action:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--border-prominent);
}

.btn-secondary-action.small-btn {
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
}

.btn-danger-action {
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  background-color: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-danger-action:hover {
  background-color: rgba(244, 63, 94, 0.25);
}

.btn-micro {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-micro:hover {
  color: var(--text-primary);
  border-color: var(--border-prominent);
}

/* ==========================================
   VIEW 1: PLANNER & KANBAN STYLES
   ========================================== */
.hero-strip {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  align-items: center;
}

.hero-text h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.serif-highlight {
  font-style: italic;
  color: #a5b4fc;
  text-decoration: underline;
  text-decoration-color: rgba(99, 102, 241, 0.4);
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 540px;
}

.quote-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  position: relative;
}

.quote-symbol {
  position: absolute;
  top: 0.4rem;
  right: 1rem;
  font-family: var(--font-serif);
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.06);
  line-height: 1;
}

.quote-box p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.quote-box cite {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* NLP Smart Input */
.nlp-input-card {
  background: linear-gradient(135deg, rgba(20, 24, 36, 0.95), rgba(28, 34, 52, 0.95));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

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

.nlp-header-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.sparkle-icon {
  color: var(--accent-amber);
}

.nlp-form-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.input-with-icon {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon input {
  width: 100%;
  padding: 0.75rem 6.5rem 0.75rem 1rem;
  background-color: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.input-with-icon input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-light);
}

.voice-mic-btn {
  position: absolute;
  right: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.voice-mic-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.voice-mic-btn.listening {
  background-color: rgba(244, 63, 94, 0.2);
  border-color: var(--accent-rose);
  color: var(--accent-rose);
}

.mic-dot {
  font-size: 0.65rem;
  color: var(--accent-rose);
}

.nlp-helper-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Dashboard Metrics Grid */
.dashboard-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.metric-card {
  padding: 1.25rem 1.5rem;
}

.metric-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.live-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
  background-color: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
}

.metric-body-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.circle-progress {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: conic-gradient(var(--accent-primary) var(--progress, 0deg), var(--border-subtle) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition-normal);
}

.circle-inside {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.circle-inside strong {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}

.circle-inside small {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.metric-copy {
  flex: 1;
}

.metric-copy h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.track-bar {
  height: 6px;
  width: 100%;
  background-color: var(--border-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 0.45rem;
}

.fill-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
  border-radius: var(--radius-pill);
  transition: width var(--transition-normal);
}

.metric-tip {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Consistency Cadence */
.cadence-body {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.streak-badge-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  background-color: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.streak-flame {
  font-size: 1.8rem;
}

.streak-digit {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-amber);
  line-height: 1;
  display: block;
}

.streak-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.habits-checklist-box {
  flex: 1;
}

.habits-title {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  font-weight: 500;
}

.habits-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.habit-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.habit-pill.checked {
  background-color: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

/* Planner Toolbar & Views */
.planner-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.view-switch-tabs {
  display: flex;
  background-color: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  padding: 0.2rem;
  border: 1px solid var(--border-subtle);
}

.view-tab {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.view-tab.active {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.tasks-counter-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
}

.search-field {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  min-width: 180px;
}

.search-field:focus {
  border-color: var(--accent-primary);
}

.dropdown-filter {
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  outline: none;
  cursor: pointer;
}

/* Kanban Grid */
.kanban-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  min-height: 480px;
}

.kanban-col {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-fast);
}

.kanban-col.drag-over {
  background-color: rgba(99, 102, 241, 0.08);
  border-color: var(--accent-primary);
}

.kanban-col-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);
}

.col-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.45rem;
}

.col-indicator.todo { background-color: var(--accent-amber); }
.col-indicator.in-progress { background-color: var(--accent-cyan); }
.col-indicator.done { background-color: var(--accent-emerald); }

.kanban-col-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.col-count {
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  background-color: var(--bg-surface-elevated);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
}

.kanban-cards-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  max-height: 600px;
  padding-right: 0.25rem;
}

/* Task Item Card */
.task-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  cursor: grab;
  position: relative;
  transition: all var(--transition-fast);
}

.task-card:hover {
  border-color: var(--border-prominent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.task-card.dragging {
  opacity: 0.5;
  transform: scale(0.98);
}

.task-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.task-check-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.task-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.task-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

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

.task-time-chip {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

.task-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.tag-pill {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.task-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border-subtle);
}

/* Angular Priority Badge Pipe Styles */
.badge-priority {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
}

.badge-high {
  background-color: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

.badge-medium {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.badge-low {
  background-color: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
}

.badge-normal {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.task-actions-group {
  display: flex;
  gap: 0.25rem;
}

.task-icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

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

.task-icon-btn.delete:hover {
  color: var(--accent-rose);
}

/* Linear Schedule View */
.linear-schedule-list {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.schedule-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-fast);
}

.schedule-row-item:last-child {
  border-bottom: none;
}

.schedule-row-item:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* ========================================================
   VIEW 2: FLASHCARDS (SUPERMEMO SM-2 SPACED REPETITION)
   ======================================================== */
.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  gap: 1rem;
}

.section-header-row h2 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.section-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 620px;
}

.flashcards-deck-container {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.75rem;
}

.study-card-arena {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.deck-progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.sm2-indicator {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* 3D Flip Card Container */
.flashcard-3d-wrap {
  perspective: 1000px;
  height: 320px;
  cursor: pointer;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flashcard-inner.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border-prominent);
  box-shadow: var(--shadow-md);
}

.card-front {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-surface-elevated));
}

.card-back {
  background: linear-gradient(135deg, #161c2d, #1e263d);
  transform: rotateY(180deg);
  border-color: rgba(99, 102, 241, 0.4);
}

.card-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-cyan);
  align-self: flex-start;
}

.card-badge.success {
  color: var(--accent-emerald);
}

.card-question-text, .card-answer-text {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--text-primary);
  font-weight: 500;
}

.card-answer-text {
  font-size: 1.1rem;
  color: #e2e8f0;
}

.flip-prompt {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* SM-2 Buttons */
.sm2-evaluation-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.eval-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.sm2-buttons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.btn-sm2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface-elevated);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-primary);
}

.grade-score {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.6;
}

.btn-sm2 strong {
  font-size: 0.95rem;
  margin: 0.15rem 0;
}

.btn-sm2 small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.btn-sm2.grade-0:hover {
  border-color: var(--accent-rose);
  background-color: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

.btn-sm2.grade-3:hover {
  border-color: var(--accent-amber);
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.btn-sm2.grade-4:hover {
  border-color: var(--accent-cyan);
  background-color: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
}

.btn-sm2.grade-5:hover {
  border-color: var(--accent-emerald);
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

/* Deck Library Table */
.deck-library-panel {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

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

.panel-header-simple h3 {
  font-size: 1rem;
  font-weight: 600;
}

.panel-header-simple span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.deck-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  max-height: 480px;
}

.deck-item-row {
  padding: 0.8rem 0.9rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.deck-item-row:hover {
  border-color: var(--border-prominent);
}

.deck-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.deck-badge {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.deck-due-tag {
  font-size: 0.7rem;
  color: var(--accent-amber);
  font-family: var(--font-mono);
}

.deck-q-preview {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================
   VIEW 3: ZEN POMODORO STUDIO & WEB AUDIO
   ========================================== */
.pomodoro-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.75rem;
}

.pomodoro-center-card {
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.timer-mode-pills {
  display: flex;
  gap: 0.5rem;
  background-color: var(--bg-surface-elevated);
  padding: 0.3rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  margin-bottom: 2rem;
}

.mode-pill {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mode-pill.active {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.big-timer-circle {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: conic-gradient(var(--accent-primary) var(--ring-pct, 100%), var(--border-subtle) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-glow);
  transition: background var(--transition-normal);
}

.timer-digits-container {
  width: 216px;
  height: 216px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-digits {
  font-family: var(--font-mono);
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.timer-phase {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.timer-action-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.btn-timer-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
  transition: all var(--transition-fast);
}

.btn-timer-primary:hover {
  transform: scale(1.03);
}

.btn-timer-secondary {
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-timer-secondary:hover {
  color: var(--text-primary);
  border-color: var(--border-prominent);
}

.timer-sound-switch {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background-color: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  text-align: left;
}

.sound-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sound-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  max-width: 320px;
}

/* Pomodoro History */
.pomodoro-history-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.pomo-session-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stat-mini {
  padding: 0.85rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-align: center;
}

.stat-mini strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.stat-mini span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.session-log-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow-y: auto;
  max-height: 360px;
}

.session-log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background-color: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.empty-log-item {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding: 2rem 1rem;
}

/* ==========================================
   VIEW 4: MARKDOWN STUDY NOTES SCRATCHPAD
   ========================================== */
.notes-workspace-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  min-height: 580px;
}

.notes-sidebar {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

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

.notes-sidebar-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.notes-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  max-height: 500px;
}

.note-item-card {
  padding: 0.75rem 0.85rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.note-item-card:hover {
  border-color: var(--border-prominent);
}

.note-item-card.active {
  border-color: var(--accent-primary);
  background-color: rgba(99, 102, 241, 0.12);
}

.note-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.note-item-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.notes-editor-panel {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
}

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

.note-title-field {
  flex: 1;
  font-size: 1.2rem;
  font-weight: 700;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
}

.notes-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.save-status-text {
  font-size: 0.75rem;
  color: var(--accent-emerald);
}

.notes-dual-pane {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  flex: 1;
}

.pane-column {
  display: flex;
  flex-direction: column;
}

.pane-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.markdown-textarea {
  flex: 1;
  width: 100%;
  min-height: 440px;
  padding: 1rem;
  background-color: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

.markdown-textarea:focus {
  border-color: var(--accent-primary);
}

.markdown-preview-box {
  flex: 1;
  min-height: 440px;
  padding: 1rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}

.markdown-preview-box h1 { font-size: 1.4rem; margin-bottom: 0.75rem; }
.markdown-preview-box h2 { font-size: 1.2rem; margin-top: 1rem; margin-bottom: 0.5rem; }
.markdown-preview-box p { margin-bottom: 0.75rem; }
.markdown-preview-box ul { padding-left: 1.25rem; margin-bottom: 0.75rem; }
.markdown-preview-box code { font-family: var(--font-mono); font-size: 0.8em; background-color: rgba(0,0,0,0.3); padding: 0.15rem 0.35rem; border-radius: 4px; }

/* ==========================================
   VIEW 5: DEEP ANALYTICS & STREAK HEATMAP
   ========================================== */
.analytics-heatmap-card {
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

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

.heatmap-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

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

.legend-cell, .heatmap-cell {
  width: 15px;
  height: 15px;
  border-radius: 3px;
  background-color: var(--bg-surface-elevated);
  transition: transform var(--transition-fast);
}

.legend-cell.level-0, .heatmap-cell.level-0 { background-color: var(--bg-surface-elevated); }
.legend-cell.level-1, .heatmap-cell.level-1 { background-color: #064e3b; }
.legend-cell.level-2, .heatmap-cell.level-2 { background-color: #047857; }
.legend-cell.level-3, .heatmap-cell.level-3 { background-color: #10b981; }
.legend-cell.level-4, .heatmap-cell.level-4 { background-color: #34d399; }

.heatmap-cells-grid {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.heatmap-cell {
  width: 100%;
  aspect-ratio: 1;
  cursor: pointer;
  position: relative;
}

.heatmap-cell:hover {
  transform: scale(1.15);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
  z-index: 5;
}

.heatmap-footer-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.analytics-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.stat-card {
  padding: 1.25rem;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
  margin-bottom: 0.35rem;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.35rem;
}

.stat-subtext {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* ========================================================
   JUDGES ARCHITECTURE & DEVTOOLS DRAWER
   ======================================================== */
.devtools-drawer {
  position: fixed;
  top: 0;
  right: -560px;
  width: 540px;
  height: 100vh;
  background-color: #0b0f19;
  border-left: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.7);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: right 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

.devtools-drawer.open {
  right: 0;
}

.devtools-header {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background-color: #101524;
}

.devtools-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-amber);
  display: block;
  letter-spacing: 0.05em;
}

.devtools-title-group h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
}

.devtools-tabs {
  display: flex;
  background-color: #0d121f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
}

.dtab {
  padding: 0.65rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: transparent;
  color: #7d8da8;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.dtab:hover {
  color: #c5d1e8;
}

.dtab.active {
  color: #ffffff;
  border-bottom-color: var(--accent-primary);
  background-color: rgba(99, 102, 241, 0.1);
}

.devtools-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.dpanel {
  display: none;
}

.dpanel.active {
  display: block;
  animation: viewFadeIn 200ms ease;
}

.dpanel-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-primary);
  margin-bottom: 1rem;
  line-height: 1.45;
}

.network-stream-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 0.6rem;
}

.network-log-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.net-log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  background-color: #141a29;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.net-method {
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

.net-method.GET { background-color: rgba(16, 185, 129, 0.2); color: #34d399; }
.net-method.POST { background-color: rgba(99, 102, 241, 0.2); color: #818cf8; }
.net-method.PATCH { background-color: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.net-method.DELETE { background-color: rgba(244, 63, 94, 0.2); color: #fb7185; }

.net-path {
  flex: 1;
  margin: 0 0.65rem;
  color: #e2e8f0;
}

.net-status {
  color: #34d399;
  font-weight: 600;
}

.net-dur {
  color: #64748b;
  margin-left: 0.45rem;
}

/* Nest Graph */
.nest-graph-box {
  background-color: #141a29;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
}

.code-log-box {
  background-color: #0a0d14;
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #38bdf8;
  max-height: 220px;
  overflow-y: auto;
  line-height: 1.5;
}

/* Signals Grid */
.signals-grid, .telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.signal-card, .telemetry-card {
  background-color: #141a29;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.sig-name, .tel-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.sig-value, .tel-val {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: #a5b4fc;
}

/* Remix Pipeline */
.remix-pipeline-visualizer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem;
  background-color: #141a29;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.pipe-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.7rem;
  text-align: center;
}

.pipe-step.highlight {
  color: var(--accent-emerald);
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.pipe-step.highlight .step-num {
  background-color: var(--accent-emerald);
  color: #ffffff;
}

.pipe-arrow {
  color: #64748b;
  font-size: 0.8rem;
}

/* ==========================================
   MODALS
   ========================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 1.5rem;
}

.modal-box {
  width: 100%;
  max-width: 480px;
  padding: 1.75rem;
  animation: modalPop 250ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

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

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

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

.form-group input, .form-group select, .form-group textarea {
  padding: 0.65rem 0.85rem;
  background-color: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent-primary);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

/* ==========================================
   FOOTER
   ========================================== */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1.75rem 1.5rem;
  background-color: var(--bg-surface);
  text-align: center;
  margin-top: auto;
}

.footer-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.footer-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
/* ========================================================
   PARTICLE CANVAS & COMMAND PALETTE
   ======================================================== */
.particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  transition: opacity var(--transition-normal);
}

.palette-trigger-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.palette-trigger-btn:hover {
  border-color: var(--border-prominent);
  color: var(--text-primary);
}

.palette-icon {
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

.palette-label {
  font-weight: 500;
}

.kbd-shortcut {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
}

/* Command Palette Modal */
.palette-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  z-index: 400;
}

.palette-box {
  width: 100%;
  max-width: 580px;
  background-color: var(--bg-surface);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), var(--shadow-glow);
  overflow: hidden;
  animation: paletteDrop 180ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.palette-input-wrap {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  gap: 0.75rem;
}

.palette-search-icon {
  font-size: 1.1rem;
  opacity: 0.6;
}

.palette-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--text-primary);
}

.kbd-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.palette-results-list {
  max-height: 340px;
  overflow-y: auto;
  padding: 0.5rem;
}

.palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-primary);
}

.palette-item:hover, .palette-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.15));
  color: #ffffff;
}

.palette-item-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.palette-item-icon {
  font-size: 1.1rem;
}

.palette-item-action {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.palette-footer {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.65rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-surface-elevated);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.palette-footer kbd {
  font-family: var(--font-mono);
  padding: 0.1rem 0.35rem;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
}

/* ========================================================
   MULTI-TRACK SOUNDSCAPE MIXER (Pomodoro Studio)
   ======================================================== */
.soundscape-mixer-panel {
  width: 100%;
  padding: 1.25rem;
  background-color: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  text-align: left;
  margin-top: 1rem;
}

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

.mixer-header h4 {
  font-size: 0.95rem;
  font-weight: 600;
}

.mixer-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
  background-color: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  font-weight: 600;
}

.mixer-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.mixer-tracks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.mixer-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.85rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast);
}

.mixer-track:hover {
  border-color: var(--border-prominent);
}

.track-info {
  display: flex;
  flex-direction: column;
}

.track-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.track-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.track-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.track-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-prominent);
}

.track-btn.active {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-primary));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.chime-btn:hover {
  background-color: rgba(245, 158, 11, 0.2);
  color: var(--accent-amber);
}

/* ========================================================
   REST API SANDBOX (DevTools Drawer)
   ======================================================== */
.sandbox-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sandbox-row {
  display: flex;
  gap: 0.5rem;
}

.sandbox-select {
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  background-color: #141a29;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: #e2e8f0;
  outline: none;
}

.sandbox-select.flex-1 {
  flex: 1;
}

.sandbox-body-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sandbox-body-group label {
  font-size: 0.72rem;
  color: #94a3b8;
  font-family: var(--font-mono);
}

.code-editor-area {
  width: 100%;
  padding: 0.75rem;
  background-color: #080b12;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

.code-editor-area:focus {
  border-color: var(--accent-primary);
}

.sandbox-response-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sb-resp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #94a3b8;
  font-family: var(--font-mono);
}

/* ========================================================
   FRAMEWORK BENCHMARK PROFILER
   ======================================================== */
.bench-card {
  padding: 1.25rem;
  background-color: #141a29;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  text-align: center;
}

.bench-results-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.25rem;
  text-align: left;
}

.bench-metric {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.bm-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #94a3b8;
}

.bm-val {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: #ffffff;
}

.bm-bar-track {
  height: 8px;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.bm-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.bm-bar-fill.fast {
  background: linear-gradient(90deg, #10b981, #06b6d4);
  width: 15%;
}

.bm-bar-fill.slow {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  width: 85%;
}

.bench-summary {
  padding: 0.75rem;
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: #34d399;
  text-align: center;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 1024px) {
  .hero-strip {
    grid-template-columns: 1fr;
  }
  .dashboard-metrics-grid {
    grid-template-columns: 1fr;
  }
  .kanban-grid {
    grid-template-columns: 1fr;
  }
  .flashcards-deck-container {
    grid-template-columns: 1fr;
  }
  .pomodoro-layout {
    grid-template-columns: 1fr;
  }
  .notes-workspace-grid {
    grid-template-columns: 1fr;
  }
  .notes-dual-pane {
    grid-template-columns: 1fr;
  }
  .analytics-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .devtools-drawer {
    width: 100%;
    right: -100%;
  }
}

@media (max-width: 680px) {
  .navbar {
    padding: 0.6rem 1rem;
    flex-direction: column;
    gap: 0.75rem;
  }
  .nav-tabs {
    overflow-x: auto;
    max-width: 100%;
  }
  .sm2-buttons-grid {
    grid-template-columns: 1fr 1fr;
  }
  .analytics-stats-grid {
    grid-template-columns: 1fr;
  }
}
