/* ========================================
   NeuroUX — Styles
   ======================================== */

/* --- Variables --- */
:root {
  --bg: #fafafa;
  --bg-alt: #f0f0f0;
  --surface: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --primary-bg: #f0eeff;
  --accent: #00cec9;
  --accent-bg: #e0fffe;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --tag-sight: #3b82f6;
  --tag-touch: #f59e0b;
  --tag-emotion: #ef4444;
  --tag-move: #10b981;
  --tag-rest: #8b5cf6;
  --tag-method: #6b7280;
  --transition: 0.25s ease;
}

[data-theme="dark"] {
  --bg: #0f0f1a;
  --bg-alt: #1a1a2e;
  --surface: #16213e;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --primary: #a29bfe;
  --primary-light: #6c5ce7;
  --primary-bg: #1e1b4b;
  --accent: #00cec9;
  --accent-bg: #0a2e2d;
  --border: #2d3748;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- Layout --- */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.hidden {
  display: none !important;
}

/* --- Theme Toggle --- */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition);
  box-shadow: var(--shadow);
}

.theme-toggle:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0984e3 100%);
  color: #fff;
  padding: 80px 24px 60px;
  text-align: center;
}

.hero-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.85;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.hero-sub {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 24px;
}

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

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

.progress-bar-wrap {
  max-width: 400px;
  margin: 0 auto;
  height: 6px;
  background: rgba(255,255,255,0.25);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* --- Sections --- */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.section-desc {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
}

/* --- Brain Grid --- */
.brain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.brain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.brain-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.brain-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.brain-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.brain-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Session Phases --- */
.session-phases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.session-phase {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}

.session-time {
  display: inline-block;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.session-phase h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.session-phase p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Consolidation Cycle --- */
.cycle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cycle-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  min-width: 140px;
  transition: transform var(--transition);
}

.cycle-step:hover {
  transform: translateY(-3px);
}

.cycle-num {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  margin: 0 auto 10px;
}

.cycle-step h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.cycle-step p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cycle-arrow {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 700;
}

/* --- Spaced Repetition --- */
.spaced-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  padding: 20px 0;
}

.spaced-step {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color var(--transition), background var(--transition);
}

.spaced-step.active {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.spaced-step small {
  display: block;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 4px;
}

.spaced-line {
  width: 32px;
  height: 2px;
  background: var(--border);
}

/* --- Phase Navigation --- */
.phase-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
  box-shadow: var(--shadow);
}

.phase-nav .container {
  display: flex;
  gap: 0;
  overflow-x: auto;
}

.phase-btn {
  flex: 1;
  padding: 16px 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.phase-btn span {
  font-size: 0.75rem;
  font-weight: 400;
}

.phase-btn:hover {
  color: var(--text);
}

.phase-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* --- Phase Sections --- */
.phase-section {
  padding: 48px 0 64px;
}

.phase-header {
  margin-bottom: 36px;
}

.phase-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.phase-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Week Cards --- */
.week-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.week-card:hover {
  box-shadow: var(--shadow-lg);
}

.week-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  user-select: none;
}

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

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

.week-topic {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

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

.week-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.week-toggle {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.week-card.collapsed .week-toggle {
  transform: rotate(-90deg);
}

.week-body {
  border-top: 1px solid var(--border);
  max-height: 2000px;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.week-card.collapsed .week-body {
  max-height: 0;
  border-top-color: transparent;
}

/* --- Day Rows --- */
.day-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

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

.day-row:hover {
  background: var(--bg-alt);
}

.day-row.completed {
  opacity: 0.6;
}

.day-row.completed .day-title {
  text-decoration: line-through;
}

/* --- Checkbox --- */
.day-check {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.day-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkmark {
  display: block;
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  transition: background var(--transition), border-color var(--transition);
}

.day-check input:checked + .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.day-check input:checked + .checkmark::after {
  content: '';
  display: block;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin: 2px auto 0;
}

/* --- Day Info --- */
.day-info {
  flex: 1;
  min-width: 0;
}

.day-num {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 2px;
}

.day-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.day-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

.day-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-sight { background: #dbeafe; color: var(--tag-sight); }
.tag-touch { background: #fef3c7; color: #b45309; }
.tag-emotion { background: #fee2e2; color: var(--tag-emotion); }
.tag-move { background: #d1fae5; color: #059669; }
.tag-rest { background: #ede9fe; color: var(--tag-rest); }
.tag-method { background: #f3f4f6; color: var(--tag-method); }

[data-theme="dark"] .tag-sight { background: #1e3a5f; }
[data-theme="dark"] .tag-touch { background: #3d2e0a; }
[data-theme="dark"] .tag-emotion { background: #3b1111; }
[data-theme="dark"] .tag-move { background: #0a2e1a; }
[data-theme="dark"] .tag-rest { background: #1e1640; }
[data-theme="dark"] .tag-method { background: #1f2937; color: #9ca3af; }

/* --- Game Grid --- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}

.game-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.game-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.game-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.game-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

/* --- Resource Grid --- */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.resource-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: block;
  text-decoration: none;
}

.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  text-decoration: none;
}

.resource-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.resource-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 48px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

.footer p {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.footer-sub {
  font-size: 0.8rem;
  color: var(--text-muted) !important;
  font-weight: 400 !important;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .hero {
    padding: 60px 16px 40px;
  }

  .hero-stats {
    gap: 24px;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .container {
    padding: 0 16px;
  }

  .section {
    padding: 48px 0;
  }

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

  .cycle-arrow {
    transform: rotate(90deg);
  }

  .spaced-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .spaced-line {
    width: 16px;
  }

  .week-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .day-row {
    padding: 14px 16px;
  }

  .phase-btn {
    padding: 12px 14px;
    font-size: 0.8rem;
  }

  .brain-grid,
  .session-phases,
  .game-grid,
  .resource-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 400px) {
  .brain-grid,
  .session-phases,
  .game-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Workspace Panel
   ======================================== */

.workspace-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.workspace-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.workspace {
  position: fixed;
  top: 0;
  right: 0;
  width: 520px;
  max-width: 100%;
  height: 100vh;
  background: var(--bg);
  z-index: 210;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.15);
}

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

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.workspace-week {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
  font-weight: 700;
}

.workspace-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2px;
}

.workspace-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-alt);
  border-radius: 8px;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.workspace-close:hover {
  background: var(--border);
  color: var(--text);
}

.workspace-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.workspace-task {
  background: var(--primary-bg);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 24px;
}

.workspace-task h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 8px;
}

.workspace-task p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.workspace-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* Learn Section */
.workspace-learn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}

.learn-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  background: var(--accent-bg);
  border-bottom: 1px solid var(--border);
}

.learn-header h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.learn-toggle-icon {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.workspace-learn.collapsed .learn-toggle-icon {
  transform: rotate(-90deg);
}

.learn-body {
  padding: 20px;
  font-size: 0.88rem;
  line-height: 1.7;
  max-height: 2000px;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.workspace-learn.collapsed .learn-body {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.learn-body h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 20px 0 8px 0;
  color: var(--text);
}

.learn-body h4:first-child {
  margin-top: 0;
}

.learn-body p {
  margin-bottom: 10px;
  color: var(--text);
}

.learn-body ul, .learn-body ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.learn-body li {
  margin-bottom: 6px;
  color: var(--text);
}

.learn-body strong {
  color: var(--text);
}

.learn-body a {
  color: var(--primary);
}

.learn-resources {
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.workspace-learn.collapsed .learn-resources {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top-color: transparent;
}

.learn-resources-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.learn-resource-link {
  display: block;
  font-size: 0.82rem;
  color: var(--primary);
  padding: 4px 0;
}

.workspace-section {
  margin-bottom: 24px;
}

.workspace-section h3 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.workspace-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Textarea */
.workspace-textarea {
  width: 100%;
  min-height: 160px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
  transition: border-color var(--transition);
}

.workspace-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Takeaways */
.takeaway-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.takeaway-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.85rem;
}

.takeaway-item span {
  flex: 1;
}

.takeaway-remove {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  flex-shrink: 0;
}

.takeaway-remove:hover {
  background: #fee2e2;
  color: #ef4444;
}

[data-theme="dark"] .takeaway-remove:hover {
  background: #3b1111;
}

.takeaway-input-row {
  display: flex;
  gap: 8px;
}

.takeaway-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
}

.takeaway-input:focus {
  outline: none;
  border-color: var(--primary);
}

.takeaway-add {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
}

.takeaway-add:hover {
  background: var(--primary-bg);
  border-color: var(--primary);
}

/* Rating */
.rating-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.rating-btn {
  width: 44px;
  height: 44px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.rating-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.rating-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.rating-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0 4px;
}

/* Links */
.links-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.85rem;
}

.link-item a {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--primary);
}

/* Action Buttons */
.workspace-actions {
  display: flex;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.ws-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform 0.15s ease;
}

.ws-btn:active {
  transform: scale(0.97);
}

.ws-btn-save {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
}

.ws-btn-save:hover {
  background: var(--border);
}

.ws-btn-complete {
  background: var(--primary);
  color: #fff;
}

.ws-btn-complete:hover {
  background: var(--primary-light);
}

.ws-btn-complete.done {
  background: #10b981;
}

.ws-btn-complete.done:hover {
  background: #059669;
}

/* Day row click hint */
.day-row {
  cursor: pointer;
}

/* Saved toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text);
  color: var(--bg);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 300;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Workspace responsive */
@media (max-width: 540px) {
  .workspace {
    width: 100%;
  }
}
