/* ═══════════════════════════════════════════════════════════════
   NEUROAPRENDIZADO MED — SYNAPSE Theme
   Neural / AI / Synaptic inspired design system
   Dark void background · Neon synapse accents · Animated pulses
   Font: Quicksand (headers) + Plus Jakarta Sans (body) + Space Mono (data)
   ═══════════════════════════════════════════════════════════════ */

/* Self-hosted Quicksand */
@font-face {
  font-family: 'Quicksand';
  src: url('fonts/quicksand/static/Quicksand-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Quicksand';
  src: url('fonts/quicksand/static/Quicksand-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Quicksand';
  src: url('fonts/quicksand/static/Quicksand-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Quicksand';
  src: url('fonts/quicksand/static/Quicksand-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Quicksand';
  src: url('fonts/quicksand/static/Quicksand-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root {
  /* Neural void */
  --bg-void: #050510;
  --bg-cortex: #0a0b1a;
  --bg-neuron: rgba(12, 14, 35, 0.85);
  --bg-neuron-hover: rgba(20, 24, 55, 0.9);

  /* Synapse palette — electric cyan + neural magenta + dendrite green */
  --synapse-cyan: #00f0ff;
  --synapse-magenta: #e040fb;
  --synapse-green: #39ff8f;
  --synapse-amber: #ffb300;
  --synapse-red: #ff3d5a;
  --synapse-blue: #4d7cff;

  /* Text layers */
  --text-bright: #eaf0ff;
  --text-normal: #b0bcd8;
  --text-dim: #5e6a8a;

  /* Borders — soft neon glow */
  --border-synapse: rgba(0, 240, 255, 0.12);
  --border-synapse-hover: rgba(0, 240, 255, 0.35);
  --border-magenta: rgba(224, 64, 251, 0.2);

  /* Sizing */
  --sidebar-w: 240px;
  --radius: 14px;
  --radius-sm: 8px;

  /* Glows */
  --glow-cyan: 0 0 30px rgba(0, 240, 255, 0.12), 0 0 80px rgba(0, 240, 255, 0.05);
  --glow-magenta: 0 0 30px rgba(224, 64, 251, 0.12), 0 0 80px rgba(224, 64, 251, 0.05);
  --glow-green: 0 0 30px rgba(57, 255, 143, 0.1);

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg-void);
  color: var(--text-normal);
  min-height: 100vh;
  overflow-x: hidden;
  /* Subtle grid pattern */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 240, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(224, 64, 251, 0.04) 0%, transparent 50%),
    linear-gradient(rgba(20, 24, 60, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 24, 60, 0.15) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  background-attachment: fixed;
}

/* ─── LOADING ─── */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-void);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-brain {
  font-size: 56px;
  animation: synapsePulse 2s infinite;
  filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.4));
}

@keyframes synapsePulse {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.4));
  }

  50% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 40px rgba(224, 64, 251, 0.6));
  }
}

/* ═══ SIDEBAR ═══ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: linear-gradient(180deg, var(--bg-cortex) 0%, rgba(8, 9, 22, 0.98) 100%);
  border-right: 1px solid var(--border-synapse);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, var(--synapse-cyan), transparent 40%, var(--synapse-magenta), transparent 80%);
  opacity: 0.3;
}

.sidebar-header {
  padding: 20px 18px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-synapse);
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--synapse-cyan), var(--synapse-magenta));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.2);
}

.sidebar-title {
  font-family: 'Quicksand', sans-serif;
  font-weight: 800;
  font-size: 16px;
  background: linear-gradient(90deg, var(--synapse-cyan), var(--synapse-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  margin-left: auto;
}

.sidebar-user {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-synapse);
}

.sidebar-user .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user .user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--synapse-cyan);
}

.sidebar-user .user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-bright);
}

.sidebar-user .user-email {
  font-size: 11px;
  color: var(--text-dim);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
}

/* Scrollbar neural */
.sidebar-nav::-webkit-scrollbar {
  width: 3px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.2);
  border-radius: 4px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: none;
  background: none;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  font-family: 'Plus Jakarta Sans', sans-serif;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  position: relative;
}

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

.nav-item.active {
  background: rgba(0, 240, 255, 0.08);
  color: var(--synapse-cyan);
  border: 1px solid var(--border-synapse-hover);
  box-shadow: inset 0 0 12px rgba(0, 240, 255, 0.06);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--synapse-cyan), var(--synapse-magenta));
}

.nav-icon {
  font-size: 16px;
  min-width: 22px;
  text-align: center;
}

.nav-divider {
  height: 1px;
  background: var(--border-synapse);
  margin: 6px 12px;
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border-synapse);
}

.logout-btn {
  width: 100%;
  padding: 9px;
  background: rgba(255, 61, 90, 0.06);
  border: 1px solid rgba(255, 61, 90, 0.2);
  border-radius: var(--radius-sm);
  color: var(--synapse-red);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: all var(--transition);
}

.logout-btn:hover {
  background: rgba(255, 61, 90, 0.12);
}

/* Hamburger */
.hamburger {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 101;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--bg-neuron);
  border: 1px solid var(--border-synapse);
  backdrop-filter: blur(12px);
  color: var(--synapse-cyan);
  font-size: 20px;
  cursor: pointer;
  transition: all var(--transition);
}

/* ═══ MAIN CONTENT ═══ */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 28px 36px;
  max-width: 1180px;
}

/* ═══ SHARED ═══ */
.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  font-family: 'Quicksand', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 6px;
  text-shadow: 0 0 40px rgba(0, 240, 255, 0.15);
}

.page-subtitle {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
}

/* Glass Neuron Card */
.glass-card {
  background: var(--bg-neuron);
  border: 1px solid var(--border-synapse);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(16px);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.2), transparent);
}

.glass-card:hover {
  border-color: var(--border-synapse-hover);
  box-shadow: var(--glow-cyan);
}

.glass-card h3 {
  font-family: 'Quicksand', sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-bright);
  letter-spacing: -0.3px;
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  padding: 18px;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--border-synapse);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--synapse-cyan), transparent);
  opacity: 0.3;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glow-cyan);
}

.gradient-teal {
  background: linear-gradient(160deg, rgba(0, 240, 255, 0.08) 0%, rgba(0, 240, 255, 0.02) 100%);
  border-color: rgba(0, 240, 255, 0.2);
}

.gradient-blue {
  background: linear-gradient(160deg, rgba(77, 124, 255, 0.08) 0%, transparent 100%);
  border-color: rgba(77, 124, 255, 0.2);
}

.gradient-amber {
  background: linear-gradient(160deg, rgba(255, 179, 0, 0.08) 0%, transparent 100%);
  border-color: rgba(255, 179, 0, 0.2);
}

.gradient-emerald {
  background: linear-gradient(160deg, rgba(57, 255, 143, 0.08) 0%, transparent 100%);
  border-color: rgba(57, 255, 143, 0.2);
}

.stat-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.stat-value {
  font-family: 'Quicksand', sans-serif;
  font-size: 30px;
  font-weight: 800;
  color: var(--text-bright);
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}

.stat-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tabs */
.tab-panel {
  display: none;
  animation: neuralFadeIn 0.4s ease;
}

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

@keyframes neuralFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Badges */
.badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-high {
  background: rgba(57, 255, 143, 0.1);
  color: var(--synapse-green);
  border: 1px solid rgba(57, 255, 143, 0.25);
}

.badge-moderate {
  background: rgba(255, 179, 0, 0.1);
  color: var(--synapse-amber);
  border: 1px solid rgba(255, 179, 0, 0.25);
}

/* Citation */
.citation {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 10px;
  font-family: 'Space Mono', monospace;
  font-style: normal;
  opacity: 0.7;
}

/* Inputs */
.input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: rgba(8, 10, 30, 0.8);
  border: 1px solid var(--border-synapse);
  color: var(--text-bright);
  font-size: 13px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: border var(--transition), box-shadow var(--transition);
}

.input:focus {
  outline: none;
  border-color: var(--synapse-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.08);
}

.textarea {
  resize: vertical;
  min-height: 100px;
}

.btn-action {
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(224, 64, 251, 0.15));
  border: 1px solid var(--border-synapse-hover);
  color: var(--synapse-cyan);
  font-weight: 700;
  font-size: 13px;
  font-family: 'Quicksand', sans-serif;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-action:hover {
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(224, 64, 251, 0.2));
}

.form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.form-row .input {
  flex: 1;
  min-width: 180px;
}

.empty-state {
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
  padding: 22px;
}

/* ═══ DASHBOARD ═══ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

.upcoming-list {
  max-height: 200px;
  overflow-y: auto;
}

.upcoming-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 240, 255, 0.06);
}

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

.upcoming-name {
  font-weight: 500;
  font-size: 13px;
  color: var(--text-normal);
}

.upcoming-date {
  font-size: 11px;
  color: var(--synapse-amber);
  font-family: 'Space Mono', monospace;
}

.neuro-tip {
  border-left: 2px solid transparent;
  border-image: linear-gradient(180deg, var(--synapse-cyan), var(--synapse-magenta)) 1;
}

.neuro-tip p {
  line-height: 1.7;
}

/* ═══ TECHNIQUES ═══ */
.technique-grid {
  display: grid;
  gap: 14px;
}

.technique-card {
  background: var(--bg-neuron);
  border: 1px solid var(--border-synapse);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.technique-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--synapse-cyan), var(--synapse-magenta), var(--synapse-green));
  opacity: 0;
  transition: opacity var(--transition);
}

.technique-card:hover::before {
  opacity: 1;
}

.technique-card:hover {
  border-color: var(--border-synapse-hover);
  box-shadow: var(--glow-cyan);
}

.tc-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.tc-number {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(224, 64, 251, 0.15));
  border: 1px solid var(--border-synapse-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Quicksand', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--synapse-cyan);
  flex-shrink: 0;
}

.tc-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  font-family: 'Space Mono', monospace;
}

.tc-description {
  color: var(--text-normal);
  line-height: 1.6;
  font-size: 14px;
}

.tc-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  padding-top: 0;
}

.technique-card.expanded .tc-details,
.habit-card.expanded .tc-details,
.supp-card.expanded .tc-details {
  max-height: 2000px;
  padding-top: 18px;
}

.tc-details h4 {
  font-family: 'Quicksand', sans-serif;
  font-size: 13px;
  font-weight: 700;
  margin: 14px 0 6px;
  color: var(--synapse-cyan);
}

.tc-details ul {
  padding-left: 18px;
}

.tc-details li {
  margin-bottom: 5px;
  color: var(--text-normal);
  line-height: 1.5;
  font-size: 13px;
}

.tc-details li::marker {
  color: var(--synapse-cyan);
}

.tc-details p {
  color: var(--text-normal);
  line-height: 1.6;
  font-size: 13px;
}

/* ═══ PROTOCOLS ═══ */
.protocol-timeline {
  position: relative;
  padding-left: 68px;
}

.protocol-day {
  position: relative;
  margin-bottom: 14px;
}

.day-badge {
  position: absolute;
  left: -68px;
  top: 22px;
  width: 50px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(224, 64, 251, 0.15));
  border: 1px solid var(--border-synapse-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Quicksand', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: var(--synapse-cyan);
}

.day-rest {
  background: linear-gradient(135deg, rgba(57, 255, 143, 0.15), rgba(57, 255, 143, 0.05)) !important;
  color: var(--synapse-green) !important;
}

.card-rest {
  border-color: rgba(57, 255, 143, 0.2) !important;
}

.protocol-block {
  margin-bottom: 10px;
}

.protocol-block strong {
  color: var(--synapse-cyan);
  font-size: 12px;
  font-family: 'Space Mono', monospace;
}

.protocol-block p {
  color: var(--text-normal);
  line-height: 1.6;
  font-size: 13px;
}

.golden-rules {
  padding-left: 18px;
}

.golden-rules li {
  margin-bottom: 6px;
  color: var(--text-normal);
  line-height: 1.5;
}

.golden-rules li::marker {
  color: var(--synapse-green);
}

/* ═══ TIMER ═══ */
.timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timer-ring {
  position: relative;
  width: 220px;
  height: 220px;
}

.timer-ring svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.timer-bg {
  fill: none;
  stroke: rgba(0, 240, 255, 0.06);
  stroke-width: 5;
}

.timer-progress {
  fill: none;
  stroke: url(#timerGrad);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 565.5;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.3));
}

.timer-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.timer-display {
  font-family: 'Quicksand', sans-serif;
  font-size: 44px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-bright);
  text-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
}

.timer-mode {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--synapse-cyan);
  letter-spacing: 3px;
  margin-top: 4px;
}

.timer-config {
  display: flex;
  gap: 20px;
  margin: 20px 0;
}

.config-group {
  text-align: center;
}

.config-group label {
  font-size: 11px;
  color: var(--text-dim);
  display: block;
  margin-bottom: 5px;
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.config-group input {
  width: 72px;
  text-align: center;
  padding: 7px;
  background: rgba(8, 10, 30, 0.8);
  border: 1px solid var(--border-synapse);
  border-radius: 6px;
  color: var(--synapse-cyan);
  font-size: 16px;
  font-weight: 700;
  font-family: 'Quicksand', sans-serif;
}

.config-group input:focus {
  outline: none;
  border-color: var(--synapse-cyan);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.1);
}

.timer-controls {
  display: flex;
  gap: 10px;
}

.timer-btn {
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Quicksand', sans-serif;
}

.timer-btn.primary {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(224, 64, 251, 0.15));
  border: 1px solid var(--border-synapse-hover);
  color: var(--synapse-cyan);
}

.timer-btn.primary:hover {
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.timer-btn.secondary {
  background: rgba(12, 14, 35, 0.8);
  color: var(--text-dim);
  border: 1px solid var(--border-synapse);
}

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

/* ═══ SPACED REPETITION ═══ */
.spaced-alerts {
  margin-top: 14px;
}

.spaced-alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 179, 0, 0.06);
  border: 1px solid rgba(255, 179, 0, 0.2);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.spaced-alert-text {
  font-size: 13px;
}

.spaced-topic-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 240, 255, 0.06);
}

.spaced-topic-item:last-child {
  border-bottom: none;
}

.topic-info h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-bright);
}

.topic-meta {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
  font-family: 'Space Mono', monospace;
}

.topic-stage {
  display: flex;
  gap: 3px;
  align-items: center;
}

.stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.2);
  transition: all var(--transition);
}

.stage-dot.filled {
  background: var(--synapse-cyan);
  border-color: var(--synapse-cyan);
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
}

.topic-actions {
  display: flex;
  gap: 6px;
}

.btn-review,
.btn-delete {
  padding: 5px 12px;
  border-radius: 6px;
  border: none;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Quicksand', sans-serif;
}

.btn-review {
  background: rgba(0, 240, 255, 0.08);
  color: var(--synapse-cyan);
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.btn-review:hover {
  background: rgba(0, 240, 255, 0.15);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.1);
}

.btn-delete {
  background: rgba(255, 61, 90, 0.06);
  color: rgba(255, 61, 90, 0.6);
  border: 1px solid rgba(255, 61, 90, 0.15);
}

.btn-delete:hover {
  background: rgba(255, 61, 90, 0.12);
  color: var(--synapse-red);
}

.intervals-visual {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.interval-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-normal);
}

.interval-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--c);
}

/* ═══ DIARY ═══ */
.diary-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mood-selector {
  display: flex;
  gap: 6px;
}

.mood-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border-synapse);
  background: none;
  font-size: 20px;
  cursor: pointer;
  transition: all var(--transition);
}

.mood-btn.active {
  border-color: var(--synapse-cyan);
  background: rgba(0, 240, 255, 0.08);
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.1);
}

.mood-btn:hover {
  border-color: var(--border-synapse-hover);
}

.diary-entry-card {
  padding: 14px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.06);
}

.diary-entry-card:last-child {
  border-bottom: none;
}

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

.diary-date {
  font-weight: 600;
  color: var(--synapse-cyan);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
}

.diary-mood {
  font-size: 18px;
}

.diary-content {
  color: var(--text-normal);
  line-height: 1.6;
  font-size: 13px;
}

.diary-meta {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
  font-family: 'Space Mono', monospace;
}

.diary-delete {
  background: none;
  border: none;
  color: var(--synapse-red);
  cursor: pointer;
  font-size: 11px;
  opacity: 0.5;
  font-family: 'Space Mono', monospace;
}

.diary-delete:hover {
  opacity: 1;
}

/* ═══ HABITS ═══ */
.habit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.habit-card {
  cursor: pointer;
}

.habit-icon {
  font-size: 32px;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.2));
}

/* ═══ SUPPLEMENTS ═══ */
.supplement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.supp-card {
  cursor: pointer;
}

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

.supp-header h3 {
  font-size: 15px;
}

.warning-card {
  border-color: rgba(255, 179, 0, 0.2) !important;
  border-left: 2px solid transparent;
  border-image: linear-gradient(180deg, var(--synapse-amber), var(--synapse-red)) 1;
}

.warning-card ul {
  padding-left: 18px;
}

.warning-card li {
  margin-bottom: 6px;
  color: var(--text-normal);
  line-height: 1.5;
}

/* ═══ MYTHS ═══ */
.myths-container {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.myth-section h3 {
  font-family: 'Quicksand', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-bright);
}

.myth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.myth-card,
.fact-card {
  padding: 18px;
  border-radius: var(--radius);
  line-height: 1.6;
  font-size: 13px;
}

.myth-card {
  background: rgba(255, 61, 90, 0.04);
  border: 1px solid rgba(255, 61, 90, 0.15);
  color: var(--text-normal);
}

.fact-card {
  background: rgba(57, 255, 143, 0.04);
  border: 1px solid rgba(57, 255, 143, 0.15);
  color: var(--text-normal);
}

.myth-label {
  font-family: 'Space Mono', monospace;
  font-weight: 800;
  color: var(--synapse-red);
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 1px;
}

.fact-label {
  font-family: 'Space Mono', monospace;
  font-weight: 800;
  color: var(--synapse-green);
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 1px;
}

/* ═══ SCIENCE ═══ */
.ref-list {
  list-style: none;
  padding: 0;
}

.ref-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 240, 255, 0.06);
  color: var(--text-normal);
  font-size: 13px;
  line-height: 1.5;
}

.ref-list li:last-child {
  border-bottom: none;
}

.ref-list strong {
  color: var(--text-bright);
}

.ref-list em {
  color: var(--synapse-cyan);
  font-style: normal;
}

.mech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.mech-card {
  padding: 18px;
  border-radius: var(--radius-sm);
  background: rgba(12, 14, 35, 0.6);
  border: 1px solid var(--border-synapse);
  position: relative;
}

.mech-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--synapse-cyan), transparent);
  opacity: 0.3;
}

.mech-card h4 {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--synapse-cyan);
  font-size: 13px;
}

.mech-card ul {
  padding-left: 14px;
}

.mech-card li {
  margin-bottom: 3px;
  color: var(--text-normal);
  font-size: 12px;
}

.mech-card li::marker {
  color: var(--synapse-cyan);
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.link-card {
  display: block;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: rgba(12, 14, 35, 0.6);
  border: 1px solid var(--border-synapse);
  color: var(--synapse-cyan);
  font-weight: 700;
  font-size: 13px;
  font-family: 'Quicksand', sans-serif;
  text-decoration: none;
  text-align: center;
  transition: all var(--transition);
}

.link-card:hover {
  border-color: var(--border-synapse-hover);
  transform: translateY(-2px);
  box-shadow: var(--glow-cyan);
}

/* ═══ RESPONSIVE ═══ */
@media(max-width:768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: block;
  }

  .hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .main-content {
    margin-left: 0;
    padding: 72px 16px 28px;
  }

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

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

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

  .protocol-timeline {
    padding-left: 0;
  }

  .day-badge {
    position: static;
    margin-bottom: 6px;
    display: inline-flex;
  }

  .timer-display {
    font-size: 34px;
  }

  .timer-ring {
    width: 180px;
    height: 180px;
  }

  .habit-grid,
  .supplement-grid {
    grid-template-columns: 1fr;
  }

  .page-header h1 {
    font-size: 20px;
  }
}

@media(max-width:480px) {
  .stats-row {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
  }

  .form-row .input {
    min-width: auto;
  }
}
