/* CrackOn Dashboard — CRT Monitor Edition */

/* ─── Palette ─────────────────────────────────── */

:root {
  /* Core design tokens */
  --fg: #fafafa;
  --fg-secondary: #a3a3a3;
  --fg-muted: #737373;
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-elevated: #1a1a1a;
  --border: #262626;
  --border-subtle: #1f1f1f;
  --gold: #c9b896;
  --lavender: #a78bfa;
  --green: #33ff33;

  /* Phosphor — CRT chrome elements */
  --phosphor: #8bf0a4;
  --phosphor-bright: #b4f7c8;
  --phosphor-dim: #4a9e64;
  --phosphor-faint: #2d6b40;
  --phosphor-glow: rgba(139, 240, 164, 0.12);

  /* Screen */
  --screen-bg: #06120a;
  --screen-bg-alt: #0a1a0f;

  /* Monitor housing */
  --housing-light: #d4cfc4;
  --housing-mid: #bfb9ab;
  --housing-dark: #a8a295;
  --housing-shadow: #6b675e;

  /* Content text — white for readability, green stays on chrome */
  --text-content: #e8e8e8;

  /* Typography */
  --font-sans: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

/* ─── Reset ───────────────────────────────────── */

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

/* ─── Body ────────────────────────────────────── */

body {
  font-family: var(--font-sans);
  background: #b0a494;
  color: var(--fg);
  margin: 0;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Monitor ─────────────────────────────────── */

.monitor {
  --s: max(122vw, 148vh);
  position: fixed;
  width: calc(0.47 * var(--s));
  height: calc(0.33 * var(--s));
  left: 50%;
  top: calc(50vh - 0.016 * var(--s));
  transform: translate(-50%, -50%);
  overflow: hidden;
  z-index: 1;
  box-shadow:
    0 0 30px 10px rgba(5,5,3,0.7),
    0 0 60px 25px rgba(5,5,3,0.4),
    0 0 100px 50px rgba(5,5,3,0.15);
  border-radius: 28% / 8%;
}

.monitor::before { display: none; }
.monitor::after { display: none; }

/* ─── Bezel ───────────────────────────────────── */

.bezel {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

/* Inner bezel gradient */
.bezel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 28% / 8%;
  box-shadow:
    inset 0 0 40px 15px rgba(10, 8, 6, 0.6),
    inset 0 0 80px 30px rgba(10, 8, 6, 0.3);
  pointer-events: none;
  z-index: 11;
}

.bezel::after { display: none; }
.chin-glow { display: none; }
.badge { display: none; }

/* ─── Screen ──────────────────────────────────── */

.screen {
  position: relative;
  background: var(--screen-bg);
  border-radius: 28% / 8%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 6px 0;

  /* CRT vignette */
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.6),
    inset 0 0 120px rgba(0, 0, 0, 0.35),
    inset 0 0 200px rgba(0, 0, 0, 0.15);

  /* Responsive font */
  font-size: clamp(11px, 1.6vh, 20px);
  line-height: 1.6;

  /* Feathered edge mask */
  -webkit-mask-image: radial-gradient(ellipse 92% 88% at 50% 50%, black 80%, transparent 100%);
  mask-image: radial-gradient(ellipse 92% 88% at 50% 50%, black 80%, transparent 100%);
}

/* Scanlines */
.screen::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
}

/* Phosphor bloom */
.screen::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  background: radial-gradient(
    ellipse 90% 80% at 50% 45%,
    rgba(139, 240, 164, 0.07) 0%,
    rgba(139, 240, 164, 0.02) 50%,
    transparent 80%
  );
}

/* ─── CRT Overlay ─────────────────────────────── */

.crt-overlay {
  position: fixed;
  width: max(122vw, 148vh);
  height: max(122vw, 148vh);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -54%);
  object-fit: contain;
  z-index: 100;
  pointer-events: none;
  user-select: none;
}

/* ─── Top Bar ─────────────────────────────────── */

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 48px 10px;
  border-bottom: 1px solid var(--phosphor-faint);
  flex-shrink: 0;
}

.top-bar-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--phosphor-bright);
}

.top-bar-voice {
  background: none;
  border: 1px solid var(--phosphor-faint);
  border-radius: 3px;
  color: var(--phosphor-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  margin-left: auto;
  margin-right: 8px;
}

.top-bar-voice:hover {
  border-color: var(--phosphor);
  color: var(--phosphor-bright);
}

.top-bar-voice.active {
  background: var(--phosphor-faint);
  border-color: var(--phosphor);
  color: var(--phosphor-bright);
}

.top-bar-status {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--phosphor-dim);
}

/* ─── Screen Body ─────────────────────────────── */

.screen-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.screen-body::-webkit-scrollbar { width: 4px; }
.screen-body::-webkit-scrollbar-track { background: transparent; }
.screen-body::-webkit-scrollbar-thumb { background: var(--phosphor-faint); border-radius: 2px; }

.view-panel {
  height: 100%;
  overflow-y: auto;
}

.view-panel::-webkit-scrollbar { width: 4px; }
.view-panel::-webkit-scrollbar-track { background: transparent; }
.view-panel::-webkit-scrollbar-thumb { background: var(--phosphor-faint); border-radius: 2px; }

/* ─── F-Key Bar ───────────────────────────────── */

.f-bar {
  display: flex;
  border-top: 1px solid var(--phosphor-faint);
  flex-shrink: 0;
  padding: 0 32px 4px;
}

.f-key {
  flex: 1;
  padding: 8px 4px;
  background: none;
  border: none;
  border-right: 1px solid var(--phosphor-faint);
  color: var(--phosphor-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  text-align: center;
}

.f-key:last-child { border-right: none; }

.f-key:hover {
  background: rgba(139, 240, 164, 0.06);
  color: var(--phosphor);
}

.f-key.active {
  background: rgba(139, 240, 164, 0.1);
  color: var(--phosphor-bright);
}

.f-label {
  font-weight: 500;
  color: var(--phosphor);
  margin-right: 3px;
}

.f-key.active .f-label {
  color: var(--phosphor-bright);
}

.badge-count {
  font-size: 9px;
  font-weight: 600;
  background: var(--lavender);
  color: var(--bg);
  border-radius: 8px;
  padding: 0 5px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ─── Loading State ───────────────────────────── */

.loading {
  padding: 32px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--phosphor-dim);
  text-align: center;
}

/* ─── Two-Column Layout (Today view) ──────────── */

.two-col-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  height: 100%;
}

.col-today, .col-all {
  overflow-y: auto;
  padding-bottom: 8px;
}

.col-today {
  border-right: 1px solid var(--phosphor-faint);
}

.col-today::-webkit-scrollbar,
.col-all::-webkit-scrollbar { width: 3px; }
.col-today::-webkit-scrollbar-track,
.col-all::-webkit-scrollbar-track { background: transparent; }
.col-today::-webkit-scrollbar-thumb,
.col-all::-webkit-scrollbar-thumb { background: var(--phosphor-faint); border-radius: 2px; }

.col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 6px;
  border-bottom: 1px solid rgba(139, 240, 164, 0.08);
}

.col-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--phosphor-dim);
}

.pulse-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--phosphor-faint);
  letter-spacing: 0.02em;
}

/* ─── Section Labels ──────────────────────────── */

.section-label {
  padding: 8px 16px 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--phosphor-faint);
}

/* ─── Task Items ──────────────────────────────── */

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 16px;
  cursor: default;
  transition: background 0.15s;
  position: relative;
}

.task-item:hover {
  background: rgba(139, 240, 164, 0.04);
}

.task-check {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 1.5px solid var(--phosphor-dim);
  border-radius: 3px;
  background: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}

.task-check:hover {
  border-color: var(--phosphor);
}

.task-check.done {
  border-color: var(--phosphor-faint);
}

.task-check.done::after {
  content: '\2713';
  position: absolute;
  top: -2px;
  left: 2px;
  font-size: 12px;
  color: var(--phosphor-faint);
}

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

.task-title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-content);
  line-height: 1.4;
}

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

.task-meta {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.task-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--phosphor-dim);
}

.task-tag.overdue { color: var(--text-content); }
.task-tag.today { color: var(--phosphor-bright); }
.task-tag.priority-high { color: var(--lavender); }

/* ─── Today Column Items ──────────────────────── */

.today-item {
  padding: 6px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-content);
  cursor: pointer;
  transition: background 0.1s;
  line-height: 1.4;
}

.today-item:hover {
  background: rgba(139, 240, 164, 0.06);
}

.today-item.done {
  color: var(--phosphor-dim);
  text-decoration: line-through;
  cursor: default;
}

.today-item.done:hover {
  background: transparent;
}

/* ─── Triage Items ────────────────────────────── */

.triage-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px;
  gap: 8px;
}

.triage-item .item-title {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-content);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.triage-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.triage-btn {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 2px;
  border: 1px solid var(--phosphor-faint);
  background: none;
  cursor: pointer;
  transition: all 0.15s;
}

.triage-btn-yes {
  color: var(--phosphor);
}

.triage-btn-yes:hover {
  background: rgba(139, 240, 164, 0.15);
  border-color: var(--phosphor);
}

.triage-btn-no {
  color: var(--fg-muted);
}

.triage-btn-no:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ─── Empty States ────────────────────────────── */

.today-empty-state,
.extractions-empty {
  padding: 24px 16px;
  text-align: center;
}

.today-empty-state p,
.extractions-empty p {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--phosphor-dim);
  margin-bottom: 4px;
}

.empty-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--phosphor-faint);
}

/* ─── All Tasks View ──────────────────────────── */

.task-group-header {
  padding: 10px 16px 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--phosphor-dim);
  border-bottom: 1px solid rgba(139, 240, 164, 0.06);
}

.task-group-count {
  font-size: 10px;
  font-weight: 400;
  color: var(--phosphor-faint);
  margin-left: 6px;
}

/* ─── Provisional Task States (S1/S2) ─────────── */

.task-provisional {
  font-style: italic;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.task-provisional-new {
  font-style: italic;
  opacity: 0.7;
  border-left: 2px dashed var(--lavender);
}

.task-provisional-done {
  font-style: italic;
  text-decoration: line-through;
  opacity: 0.5;
}

.task-reorder-pending {
  border-left: 2px solid var(--lavender);
}

.task-reorder-pending::after {
  content: '\2195';
  position: absolute;
  right: 8px;
  color: var(--lavender);
  font-size: 0.9em;
}

.task-highlighted {
  border-left: 2px solid rgba(167, 139, 250, 0.5);
  transition: border-color 0.2s ease;
}

/* Confirmation flash */
@keyframes confirm-flash {
  0% { background-color: rgba(201, 184, 150, 0.15); }
  100% { background-color: transparent; }
}

.task-just-confirmed {
  animation: confirm-flash 0.6s ease-out;
}

/* ─── Knowledge / Entity Approval (F3) ────────── */

.knowledge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 8px;
  border-bottom: 1px solid rgba(139, 240, 164, 0.08);
}

.knowledge-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--phosphor-dim);
}

.confirm-all-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid var(--phosphor-faint);
  border-radius: 3px;
  background: none;
  color: var(--phosphor);
  cursor: pointer;
  transition: all 0.15s;
}

.confirm-all-btn:hover {
  background: rgba(139, 240, 164, 0.12);
  border-color: var(--phosphor);
  color: var(--phosphor-bright);
}

.confirm-all-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Extraction cards */
.extraction-card {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.15s;
}

.extraction-card:hover {
  background: rgba(139, 240, 164, 0.03);
}

.extraction-card.relationship {
  border-left: 2px solid rgba(167, 139, 250, 0.3);
}

.extraction-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.extraction-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--phosphor-dim);
  border-radius: 3px;
  background: none;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.extraction-check input[type="checkbox"]:checked {
  border-color: var(--phosphor);
  background: rgba(139, 240, 164, 0.15);
}

.extraction-check input[type="checkbox"]:checked::after {
  content: '\2713';
  position: absolute;
  top: -1px;
  left: 2px;
  font-size: 12px;
  color: var(--phosphor-bright);
}

.entity-type {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--phosphor);
  background: rgba(139, 240, 164, 0.1);
  border: 1px solid var(--phosphor-faint);
  border-radius: 2px;
  padding: 1px 5px;
}

.entity-name {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-content);
}

.rel-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-content);
}

.rel-type {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lavender);
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 2px;
  padding: 1px 5px;
  margin-left: 8px;
}

.extraction-detail {
  padding: 4px 0 2px 26px;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.5;
  color: var(--fg-secondary);
}

/* ─── Settings View (F4) ──────────────────────── */

.settings-content {
  padding: 16px;
}

.settings-section {
  padding: 10px 0;
  border-bottom: 1px solid rgba(139, 240, 164, 0.06);
}

.settings-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--phosphor-dim);
  margin-bottom: 4px;
}

.settings-value {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-content);
}

/* ─── Voice Sidebar ───────────────────────────── */

.voice-sidebar {
  position: absolute;
  top: 0;
  right: 0;
  width: 42%;
  height: 100%;
  background: var(--screen-bg);
  border-left: 1px solid var(--phosphor-faint);
  display: flex;
  flex-direction: column;
  z-index: 8;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

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

.voice-sidebar.ptt-active {
  border-left-color: var(--phosphor-dim);
  box-shadow: inset 2px 0 12px rgba(139, 240, 164, 0.15);
}

.voice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px 10px 12px;
  border-bottom: 1px solid var(--phosphor-faint);
  flex-shrink: 0;
}

.voice-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--phosphor-bright);
  margin-right: 8px;
}

.voice-mode-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--phosphor);
  background: rgba(139, 240, 164, 0.12);
  border: 1px solid var(--phosphor-faint);
  border-radius: 2px;
  padding: 1px 6px;
}

.voice-close {
  background: none;
  border: none;
  color: var(--phosphor-dim);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  font-family: var(--font-mono);
  margin-left: auto;
}

.voice-close:hover {
  color: var(--phosphor-bright);
}

.voice-waveform-label {
  padding: 6px 12px 0;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--phosphor-faint);
  text-align: center;
  flex-shrink: 0;
}

.voice-waveform {
  padding: 8px 12px;
  text-align: center;
  flex-shrink: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.waveform-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 32px;
}

.waveform-bar {
  width: 3px;
  height: 4px;
  border-radius: 1px;
  background: var(--phosphor-faint);
  transition: height 0.06s ease;
}

/* Agent waveform — green */
#agent-bars .waveform-bar { background: var(--phosphor-dim); }
#agent-bars .waveform-bar.active { background: var(--phosphor-bright); }

/* User mic waveform — white/silver */
#mic-bars .waveform-bar { background: #3a3a3a; }
#mic-bars .waveform-bar.active { background: var(--text-content); }

.voice-status {
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--phosphor-dim);
  text-align: center;
  flex-shrink: 0;
}

.voice-status.recording {
  color: var(--phosphor-bright);
}

.voice-status.processing {
  color: var(--gold);
}

.voice-status.speaking {
  color: var(--phosphor);
}

.voice-transcript {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.voice-transcript::-webkit-scrollbar { width: 3px; }
.voice-transcript::-webkit-scrollbar-track { background: transparent; }
.voice-transcript::-webkit-scrollbar-thumb { background: var(--phosphor-faint); border-radius: 2px; }

.transcript-entry {
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  line-height: 1.5;
  word-wrap: break-word;
}

.transcript-entry.user {
  align-self: flex-end;
  background: rgba(139, 240, 164, 0.08);
  border: 1px solid var(--phosphor-faint);
  color: var(--text-content);
  max-width: 85%;
}

.transcript-entry.agent {
  align-self: flex-start;
  background: var(--screen-bg-alt);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-content);
  max-width: 85%;
}

.transcript-entry.system {
  align-self: center;
  color: var(--phosphor-faint);
  font-style: italic;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.voice-hint {
  padding: 6px 12px 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--phosphor-faint);
  text-align: center;
  flex-shrink: 0;
  border-top: 1px solid var(--phosphor-faint);
}

/* ─── Project Groups (All Tasks column) ───────── */

.project-group {
  border-bottom: 1px solid rgba(139, 240, 164, 0.04);
}

.project-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.project-section-header:hover {
  background: rgba(139, 240, 164, 0.04);
}

.project-name {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-content);
}

.project-task-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--phosphor-faint);
}

.health-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.health-red { background: var(--text-content); box-shadow: 0 0 4px rgba(232, 232, 232, 0.4); }
.health-amber { background: #f0d08b; box-shadow: 0 0 4px rgba(240, 208, 139, 0.4); }
.health-green { background: #4ade80; box-shadow: 0 0 4px rgba(74, 222, 128, 0.4); }
.health-grey { background: #555; }

.project-tasks {
  display: none;
  padding-bottom: 4px;
}

.project-group.expanded .project-tasks {
  display: block;
}

.project-group.expanded > .project-section-header {
  background: rgba(139, 240, 164, 0.04);
}

/* ─── Spinner ─────────────────────────────────── */

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--phosphor-faint);
  border-top-color: var(--phosphor);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
