/* ============================================
   JERRY OS - Components
   Cosmic Ocean / Illuminated Abyss Design System
   No-line rule, tonal layering, glow accents
   ============================================ */

/* ==========================================
   SECTIONS
   ========================================== */
.section {
  margin-bottom: var(--s8);
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s4);
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn-primary {
  background: linear-gradient(135deg, var(--bio-cyan), var(--bio-cyan-dim));
  color: #fff;
  border: none;
  padding: var(--s3) var(--s5);
  border-radius: var(--r8);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.12s;
  box-shadow: 0 0 8px var(--bio-cyan-glow);
}
.btn-primary:hover { background: linear-gradient(135deg, #6ee0f8, var(--bio-cyan)); box-shadow: 0 0 14px rgba(76, 215, 246, 0.35); }
.btn-sm { padding: var(--s2) var(--s4); font-size: 13px; }

.btn-sync {
  background: #14532d;
  color: #ffffff;
  border: 1px solid #ffffff;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-sync:hover {
  background: #166534;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.6);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  padding: var(--s3) var(--s5);
  border-radius: var(--r8);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.12s, border-color 0.12s;
}
.btn-secondary:hover {
  background: var(--bg-card-elevated);
  border-color: var(--text-tertiary);
}

.btn-ghost {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: var(--s2) var(--s3);
  border-radius: var(--r6);
  font-size: 13px;
  font-weight: 500;
}
.btn-ghost:hover { background: var(--bg-card-elevated); color: var(--text-primary); }

.btn-danger {
  background: linear-gradient(135deg, #be123c, #9f1239);
  color: #fff;
  border: none;
  padding: var(--s3) var(--s5);
  border-radius: var(--r8);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 0 8px rgba(190, 18, 60, 0.2);
}
.btn-danger:hover { background: linear-gradient(135deg, #e11d48, #be123c); box-shadow: 0 0 14px rgba(190, 18, 60, 0.3); }

/* Semantic button colours: positive (green), negative (red), neutral (amber) */
.btn-positive {
  background: linear-gradient(135deg, var(--green), var(--green-bright));
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.25);
  padding: var(--s3) var(--s5);
  border-radius: var(--r8);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
  box-shadow: 0 0 8px var(--green-glow);
}
.btn-positive:hover { background: linear-gradient(135deg, #6ee7b7, var(--green)); box-shadow: 0 0 14px rgba(16, 185, 129, 0.35); }

.btn-negative {
  background: linear-gradient(135deg, #be123c, #9f1239);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.2);
  padding: var(--s3) var(--s5);
  border-radius: var(--r8);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
  box-shadow: 0 0 8px rgba(190, 18, 60, 0.2);
}
.btn-negative:hover { background: linear-gradient(135deg, #e11d48, #be123c); box-shadow: 0 0 14px rgba(190, 18, 60, 0.3); }

.btn-neutral {
  background: linear-gradient(135deg, var(--amber), #d97706);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.2);
  padding: var(--s3) var(--s5);
  border-radius: var(--r8);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
  box-shadow: 0 0 8px var(--amber-glow);
}
.btn-neutral:hover { background: linear-gradient(135deg, #fbbf24, var(--amber)); box-shadow: 0 0 14px rgba(245, 158, 11, 0.35); }

/* ==========================================
   PROJECTS PAGE - Toolbar, Filters, Recent
   ========================================== */
.projects-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s4);
  flex-wrap: wrap;
}
.projects-toolbar-left {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
  flex: 1;
}
.projects-search {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: var(--s2) var(--s4);
  border-radius: var(--r6);
  font-size: 13px;
  min-width: 180px;
  max-width: 280px;
  flex: 1;
}
.projects-search::placeholder { color: var(--text-tertiary); }
.projects-search:focus { outline: none; border-color: var(--bio-cyan); }
.projects-filter {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: var(--s2) var(--s3);
  border-radius: var(--r6);
  font-size: 13px;
  cursor: pointer;
}
.projects-filter:focus { outline: none; border-color: var(--bio-cyan); }

/* Recent projects bar */
.recent-projects {
  margin-bottom: var(--s5);
}
.recent-projects-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: var(--s2);
}
.recent-projects-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
}
.recent-project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r8);
  padding: var(--s4);
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.recent-project-card:hover {
  border-color: var(--bio-cyan);
  box-shadow: 0 0 12px var(--bio-cyan-glow);
}
.recent-project-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--s2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-project-meta {
  display: flex;
  gap: var(--s2);
  align-items: center;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* List view grouped by area */
.project-list-group {
  margin-bottom: var(--s5);
}
.project-list-group-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: var(--s2);
  padding-bottom: var(--s1);
  border-bottom: 1px solid var(--border-light);
}
.project-list-group-count {
  font-weight: 400;
  color: var(--text-tertiary);
  font-size: 12px;
  margin-left: 4px;
}

/* ==========================================
   QUICK ACTIONS
   ========================================== */
/* ==========================================
   PILLAR TOGGLE
   ========================================== */
.pillar-toggle {
  display: flex;
  gap: var(--s1);
  background: var(--bg-input);
  border-radius: var(--r8);
  padding: 3px;
}
.pillar-tab {
  padding: var(--s2) var(--s4);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: var(--r6);
  cursor: pointer;
  transition: all 0.12s;
}
.pillar-tab:hover { color: var(--text-primary); }
.pillar-tab.active {
  background: var(--bg-card);
  color: var(--bio-cyan);
  box-shadow: var(--shadow-glow);
}

/* ==========================================
   TODAY SECTION (Daily execution checklist)
   ========================================== */
.today-section {
  background: var(--bg-card);
  border: none;
  border-radius: var(--r12);
  padding: var(--s4);
  max-width: 640px;
}
.today-checklist {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.today-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) var(--s3);
  border-radius: var(--r6);
  transition: background 0.1s;
}
.today-item:hover { background: var(--bg-card-elevated); }
.today-item .task-checkbox { flex-shrink: 0; }
.today-item-text {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}
.today-item-text.done {
  text-decoration: line-through;
  color: var(--text-tertiary);
}
.today-item-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: var(--r-full);
  font-weight: 700;
}
.today-item-badge.habit { background: rgba(139, 92, 246, 0.12); color: var(--nebula-purple); }
.today-item-badge.recurring { background: var(--bio-cyan-subtle); color: var(--bio-cyan); }
.today-item-badge.task { background: rgba(255, 185, 95, 0.1); color: var(--sphere-gold); }
.today-add-row {
  margin-top: var(--s3);
}
.today-add-row input {
  width: 100%;
  background: transparent;
  border: none;
  border-top: 1px solid var(--border);
  padding: var(--s3) var(--s3);
  font-size: 14px;
  color: var(--text-secondary);
  font-family: var(--font);
}
.today-add-row input:focus {
  outline: none;
  color: var(--text-primary);
}
.today-empty {
  text-align: center;
  padding: var(--s5);
  color: var(--text-tertiary);
  font-size: 13px;
}
.today-divider {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--s2) var(--s3);
  margin-top: var(--s2);
}

/* ==========================================
   HUB TWO-COLUMN LAYOUT
   ========================================== */
.hub-two-col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--s5);
}
@media (max-width: 768px) {
  .hub-two-col { grid-template-columns: 1fr; }
}
.hub-col {
  background: var(--bg-card);
  border: none;
  border-radius: var(--r12);
  padding: var(--s5);
  box-shadow: var(--shadow-sm);
}
.hub-col .section-header { margin-bottom: var(--s4); }

/* ==========================================
   CALENDAR (Production-grade, time-positioned)
   ========================================== */
.cal-section .section-header { flex-wrap: wrap; gap: 8px; }
.cal-controls {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
}
.cal-nav-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 140px;
  text-align: center;
}
.cal-nav-btn {
  background: var(--bg-card-elevated);
  border: none;
  border-radius: var(--r6);
  padding: var(--s2) var(--s3);
  font-size: 14px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.1s;
}
.cal-nav-btn:hover { background: var(--bg-input); color: var(--text-primary); }
.cal-today-btn {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r6);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--bio-cyan);
  transition: all 0.15s;
  font-family: var(--font-sans);
}
.cal-today-btn:hover { background: rgba(76, 215, 246, 0.1); border-color: var(--bio-cyan); }
.cal-container {
  background: #0f1524;
  border: none;
  border-radius: var(--r12);
  overflow: hidden;
}

/* ---- DAY VIEW (time-positioned, absolute) ---- */
.cal-scroll {
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(76, 215, 246, 0.2) transparent;
  position: relative;
}
.cal-scroll::-webkit-scrollbar { width: 6px; }
.cal-scroll::-webkit-scrollbar-track { background: transparent; }
.cal-scroll::-webkit-scrollbar-thumb { background: rgba(76, 215, 246, 0.2); border-radius: 3px; }
.cal-day-view {
  position: relative;
  margin-left: 52px;
}
/* Hour lines in day view */
.cal-hour-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(76, 215, 246, 0.07);
  pointer-events: none;
}
.cal-hour-text {
  position: absolute;
  left: -52px;
  top: -8px;
  width: 44px;
  text-align: right;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
}

/* Now marker (day view) */
.cal-now-marker {
  position: absolute;
  left: -8px;
  right: 0;
  z-index: 10;
  pointer-events: none;
}
.cal-now-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  position: absolute;
  left: 0;
  top: -4px;
}
.cal-now-line {
  position: absolute;
  left: 10px;
  right: 0;
  top: 0;
  height: 2px;
  background: #ef4444;
}

/* Event blocks (absolutely positioned in day view) */
.cal-ev {
  position: absolute;
  right: 4px;
  border-left: 3px solid;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  overflow: hidden;
  z-index: 3;
  display: flex;
  gap: 6px;
  align-items: flex-start;
  transition: filter 0.15s, opacity 0.2s;
}
.cal-ev:hover { filter: brightness(1.3); z-index: 5; }
.cal-ev-check {
  width: 14px;
  height: 14px;
  min-width: 14px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #fff;
  cursor: pointer;
  margin-top: 1px;
  transition: all 0.15s;
}
.cal-ev-check:hover { border-color: #fff; background: rgba(255,255,255,0.1); }
.cal-ev-content { flex: 1; overflow: hidden; }
.cal-ev-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.cal-ev-time {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 1px;
}

/* Fasting background overlay (day view) */
.cal-fasting-bg {
  position: absolute;
  left: 0;
  right: 0;
  background: rgba(16, 185, 129, 0.05);
  border-left: 2px solid rgba(16, 185, 129, 0.25);
  z-index: 1;
  cursor: pointer;
  transition: background 0.15s;
}
.cal-fasting-bg:hover { background: rgba(16, 185, 129, 0.09); }
.cal-fasting-label {
  position: sticky;
  top: 4px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(16, 185, 129, 0.5);
  padding: 4px 8px;
  pointer-events: none;
}

/* Drag states */
.cal-dragging {
  opacity: 0.7;
  z-index: 20 !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  cursor: grabbing;
  transition: none !important;
}
.cal-ev { cursor: grab; }
.cal-ev:active { cursor: grabbing; }

/* Drag-to-create ghost */
.cal-create-ghost {
  position: absolute;
  left: 0;
  right: 4px;
  background: rgba(76, 215, 246, 0.15);
  border: 2px dashed rgba(76, 215, 246, 0.5);
  border-radius: 4px;
  z-index: 15;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--bio-cyan);
}

/* View transitions */
.cal-container { transition: opacity 0.15s ease; }

/* Completed state (shared) */
.cal-item-done {
  opacity: 0.35;
  filter: grayscale(50%);
}
.cal-item-done .cal-ev-title,
.cal-item-done .cal-compact-name,
.cal-item-done .cal-agenda-name {
  text-decoration: line-through;
  color: var(--text-tertiary);
}

/* ---- WEEK VIEW (time-positioned columns) ---- */
.cal-week-header {
  display: flex;
  border-bottom: 1px solid rgba(76, 215, 246, 0.12);
}
.cal-wk-gutter { width: 52px; flex-shrink: 0; }
.cal-wk-hdr {
  flex: 1;
  text-align: center;
  padding: 8px 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.cal-wk-hdr.is-today { color: var(--bio-cyan); }
.cal-wk-hdr-num {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}
.cal-wk-hdr.is-today .cal-wk-hdr-num {
  background: var(--bio-cyan);
  color: var(--bg-app);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.cal-week-scroll {
  max-height: 560px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(76, 215, 246, 0.2) transparent;
}
.cal-week-scroll::-webkit-scrollbar { width: 6px; }
.cal-week-scroll::-webkit-scrollbar-track { background: transparent; }
.cal-week-scroll::-webkit-scrollbar-thumb { background: rgba(76, 215, 246, 0.2); border-radius: 3px; }
.cal-week-grid {
  position: relative;
}
.cal-wk-hour-line {
  position: absolute;
  left: 52px;
  right: 0;
  border-top: 1px solid rgba(76, 215, 246, 0.06);
  pointer-events: none;
}
.cal-wk-hour-text {
  position: absolute;
  left: -52px;
  top: -8px;
  width: 44px;
  text-align: right;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
}
.cal-wk-day-col {
  position: absolute;
  top: 0;
  bottom: 0;
  border-right: 1px solid rgba(76, 215, 246, 0.05);
}
.cal-wk-ev {
  position: absolute;
  left: 2px;
  right: 2px;
  border-left: 3px solid;
  border-radius: 3px;
  padding: 2px 5px;
  cursor: pointer;
  overflow: hidden;
  z-index: 3;
  transition: filter 0.15s;
}
.cal-wk-ev:hover { filter: brightness(1.3); z-index: 5; }
.cal-wk-ev-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.cal-wk-fasting {
  position: absolute;
  left: 0;
  right: 0;
  background: rgba(16, 185, 129, 0.04);
  border-left: 2px solid rgba(16, 185, 129, 0.15);
  z-index: 1;
  pointer-events: none;
}
.cal-wk-now {
  position: absolute;
  height: 2px;
  background: #ef4444;
  z-index: 10;
  pointer-events: none;
}

/* ---- AGENDA VIEW ---- */
.cal-agenda { padding: 8px 0; }
.cal-agenda-date {
  padding: 12px 16px 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border-light);
}
.cal-agenda-date.is-today { color: var(--bio-cyan); }
.cal-agenda-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid rgba(76, 215, 246, 0.04);
}
.cal-agenda-item:hover { background: rgba(76, 215, 246, 0.04); }
.cal-agenda-check {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--bio-cyan);
  cursor: pointer;
  transition: all 0.15s;
}
.cal-agenda-check:hover { border-color: var(--bio-cyan); background: rgba(76, 215, 246, 0.1); }
.cal-agenda-color {
  width: 4px;
  height: 28px;
  border-radius: 2px;
  flex-shrink: 0;
}
.cal-agenda-time {
  width: 56px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.cal-agenda-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-agenda-cat {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* ---- MONTH VIEW ---- */
.cal-month-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid rgba(76, 215, 246, 0.12);
}
.cal-month-header-cell {
  text-align: center;
  padding: var(--s2);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.cal-month-cell {
  min-height: 88px;
  padding: var(--s2);
  border-bottom: 1px solid rgba(76, 215, 246, 0.08);
  border-right: 1px solid rgba(76, 215, 246, 0.06);
  cursor: pointer;
  transition: background 0.1s;
}
.cal-month-cell:hover { background: rgba(76, 215, 246, 0.04); }
.cal-month-cell.today { background: rgba(76, 215, 246, 0.06); }
.cal-month-cell.other-month { opacity: 0.3; }
.cal-month-date {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.cal-month-cell.today .cal-month-date {
  background: var(--bio-cyan);
  color: var(--bg-app);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cal-month-task {
  padding: 2px 5px;
  border-radius: 3px;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s;
}
.cal-month-task:hover { filter: brightness(1.25); }

/* ---- FILTER TOGGLES ---- */
.cal-filters {
  display: flex;
  gap: var(--s2);
  padding: var(--s2) 0 var(--s3);
  flex-wrap: wrap;
}
.cal-filter-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  opacity: 0.4;
  font-family: var(--font-sans);
}
.cal-filter-btn.active {
  opacity: 1;
  background: rgba(76, 215, 246, 0.06);
  color: var(--text-primary);
  border-color: var(--border-glow);
}
.cal-filter-btn:hover { background: rgba(76, 215, 246, 0.08); }
.cal-filter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ---- DETAIL PANEL ---- */
.cal-detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  justify-content: flex-end;
}
.cal-detail-overlay.open { display: flex; }
.cal-detail-panel {
  width: 380px;
  max-width: 92vw;
  height: 100vh;
  background: rgba(26, 31, 45, 0.98);
  border-left: 1px solid var(--border);
  backdrop-filter: blur(20px);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
  overflow-y: auto;
  animation: calSlideIn 0.2s ease-out;
}
@keyframes calSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.cal-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-light);
}
.cal-detail-header h3 { font-size: 18px; font-weight: 700; color: var(--text-primary); margin: 0; }
.cal-detail-close {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r6);
  transition: all 0.15s;
}
.cal-detail-close:hover { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.cal-detail-body { padding: 24px; }
.cal-detail-color-bar { height: 4px; border-radius: 2px; margin-bottom: 20px; }
.cal-detail-info { display: flex; flex-direction: column; }
.cal-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-secondary);
}
.cal-detail-label { color: var(--text-tertiary); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.cal-detail-desc { padding: 16px 0; font-size: 13px; line-height: 1.6; color: var(--text-secondary); border-bottom: 1px solid var(--border-light); }
.cal-category-badge { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---- MOBILE RESPONSIVE ---- */
@media (max-width: 768px) {
  .cal-detail-overlay { align-items: flex-end; justify-content: center; }
  .cal-detail-panel { width: 100%; height: auto; max-height: 75vh; border-left: none; border-top: 1px solid var(--border); border-radius: 16px 16px 0 0; animation: calSlideUp 0.25s ease-out; }
  @keyframes calSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .cal-filters { gap: 6px; padding: 6px 0 10px; }
  .cal-filter-btn { padding: 3px 8px; font-size: 10px; }
  .cal-scroll { max-height: 65vh; }
  .cal-week-scroll { max-height: 55vh; }
  .cal-month-cell { min-height: 64px; padding: 4px; }
  .cal-month-date { font-size: 11px; }
  .cal-month-task { font-size: 8px; }
  .cal-agenda-item { padding: 8px 12px; gap: 8px; }
  .cal-agenda-name { font-size: 12px; }
}

/* ==========================================
   HABITS
   ========================================== */
.habit-pct {
  font-size: 20px;
  font-weight: 800;
  color: var(--bio-cyan);
}
.habit-progress-bar {
  height: 8px;
  background: var(--bg-card-elevated);
  border-radius: var(--r-full);
  margin-bottom: var(--s4);
  overflow: hidden;
}
.habit-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bio-cyan-dim), var(--bio-cyan));
  border-radius: var(--r-full);
  transition: width 0.3s ease;
  width: 0%;
  box-shadow: 0 0 8px var(--bio-cyan-glow);
}
.habit-list, .habit-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.habit-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) var(--s3);
  border-radius: var(--r6);
  cursor: pointer;
  transition: background 0.1s;
}
.habit-item:hover { background: var(--bg-card-elevated); }
.habit-check {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  font-size: 12px;
}
.habit-check.done {
  background: var(--sphere-gold);
  border-color: var(--sphere-gold);
  color: var(--bg-app);
  box-shadow: var(--shadow-glow-gold);
}
.habit-icon { font-size: 16px; }
.habit-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}
.habit-name.done { color: var(--text-tertiary); text-decoration: line-through; }
.habit-streak {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 600;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--s3);
}
.quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  background: var(--bg-card);
  border: 1.5px solid rgba(76, 215, 246, 0.12);
  border-radius: var(--r12);
  padding: var(--s4) var(--s3);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}
.quick-btn:hover {
  border-color: var(--bio-cyan);
  background: var(--bio-cyan-subtle);
  color: var(--bio-cyan);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

/* ==========================================
   MAKE TIME CARD
   ========================================== */
.make-time-card {
  background: var(--bg-card);
  border: none;
  border-radius: var(--r12);
  padding: var(--s5);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.make-time-row {
  display: flex;
  align-items: center;
  gap: var(--s4);
}
.make-time-row label {
  font-size: 14px;
  font-weight: 600;
  min-width: 110px;
  color: var(--text-secondary);
}
.make-time-row input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: var(--r8);
  padding: var(--s3) var(--s4);
  font-size: 14px;
  background: var(--bg-input);
  color: var(--text-primary);
  transition: border-color 0.12s;
}
.make-time-row input:focus {
  outline: none;
  border-color: var(--bio-cyan);
  background: var(--bg-input);
}

/* ==========================================
   AREA CARDS (Pillar Grid)
   ========================================== */
.area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--s4);
}
.area-card {
  background: var(--bg-card);
  border: none;
  border-radius: var(--r12);
  padding: var(--s5);
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.area-card:hover {
  background: var(--bg-card-elevated);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}
.area-card-icon {
  font-size: 24px;
  margin-bottom: var(--s2);
}
.area-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--s1);
}
.area-card-critical {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.area-card-status {
  position: absolute;
  top: var(--s3);
  right: var(--s3);
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
}
.area-card-status.green { background: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, 0.4); }
.area-card-status.amber { background: #fbbf24; box-shadow: 0 0 8px rgba(251, 191, 36, 0.4); }
.area-card-status.red { background: #fb7185; box-shadow: 0 0 8px rgba(251, 113, 133, 0.4); }

/* ==========================================
   TASK LIST
   ========================================== */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.task-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  background: var(--bg-card);
  border: none;
  border-radius: var(--r8);
  transition: all 0.1s;
}
.task-item:hover {
  background: var(--bg-card-elevated);
}
.task-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: var(--r4);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}
.task-checkbox:hover {
  border-color: var(--bio-cyan);
}
.task-checkbox.done {
  background: var(--sphere-gold);
  border-color: var(--sphere-gold);
  color: var(--bg-app);
  box-shadow: var(--shadow-glow-gold);
}
.habit-check.done {
  background: var(--sphere-gold);
  border-color: var(--sphere-gold);
  color: var(--bg-app);
  box-shadow: var(--shadow-glow-gold);
}
.task-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}
.task-name.done {
  text-decoration: line-through;
  color: var(--text-tertiary);
}
.task-meta {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-shrink: 0;
}
.task-due {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}
.task-due.overdue { color: #fb7185; font-weight: 600; }
.task-due.today { color: var(--bio-cyan); font-weight: 600; }
.task-project {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--bio-cyan-subtle);
  color: var(--bio-cyan);
  border-radius: var(--r-full);
  font-weight: 600;
}
/* ==========================================
   BREADCRUMBS
   ========================================== */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 13px;
  margin-bottom: var(--s2);
}
.breadcrumbs a {
  color: var(--text-tertiary);
  text-decoration: none;
  cursor: pointer;
}
.breadcrumbs a:hover { color: var(--bio-cyan); text-decoration: underline; }
.breadcrumbs .sep { color: rgba(188, 201, 205, 0.3); }

/* ==========================================
   PROJECT DETAIL PAGE (Jeff Su template)
   ========================================== */
.project-props {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s6);
}
.project-prop {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 13px;
}
.project-prop-label {
  color: var(--text-tertiary);
  font-weight: 600;
}
.project-prop-value {
  color: var(--text-primary);
  font-weight: 500;
}
.project-section {
  margin-bottom: var(--s8);
}
.project-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s4);
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--border);
}
.project-section-header h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.project-objective {
  background: var(--bg-card);
  border: none;
  border-radius: var(--r12);
  padding: var(--s5);
  margin-bottom: var(--s6);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.project-objective strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: var(--s2);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.project-ops {
  background: var(--bg-card);
  border: none;
  border-radius: var(--r12);
  padding: var(--s5);
  margin-bottom: var(--s6);
  min-height: 60px;
}
.project-ops-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--s3);
}

/* ==========================================
   PROJECTS MODULE v2 — Analytics, Health, Progress
   ========================================== */

/* --- Analytics Dashboard --- */
.proj-analytics {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  margin-bottom: var(--s5);
}
.proj-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s3);
}
@media (max-width: 768px) { .proj-stat-row { grid-template-columns: repeat(2, 1fr); } }
.proj-stat-card {
  background: var(--bg-card);
  border-radius: var(--r8);
  padding: var(--s4);
  text-align: center;
}
.proj-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.proj-stat-label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: var(--s2);
}

/* --- Health Distribution Bar --- */
.proj-health-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-card);
  margin-bottom: var(--s2);
}
.proj-health-bar > div { transition: width 0.4s ease; }
.proj-health-legend {
  display: flex;
  gap: var(--s4);
  font-size: 11px;
  color: var(--text-tertiary);
}
.proj-health-legend span::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.proj-health-legend .h-green::before { background: #22c55e; }
.proj-health-legend .h-yellow::before { background: #eab308; }
.proj-health-legend .h-orange::before { background: #f97316; }
.proj-health-legend .h-red::before { background: #ef4444; }

/* --- Progress Bars (horizontal list) --- */
.proj-progress-list {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.proj-progress-row {
  display: grid;
  grid-template-columns: 1fr 160px 40px;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) var(--s3);
  border-radius: var(--r4);
  cursor: pointer;
  transition: background 0.12s;
}
.proj-progress-row:hover { background: var(--bg-card); }
.proj-progress-row-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proj-progress-row-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

/* --- Progress Bar Component --- */
.progress-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
}
.progress-bar-lg { height: 10px; border-radius: 5px; }
.progress-bar-lg .progress-bar-fill { border-radius: 5px; }

/* Progress bar colors by health band */
.progress-green .progress-bar-fill { background: linear-gradient(90deg, #22c55e, #4ade80); }
.progress-yellow .progress-bar-fill { background: linear-gradient(90deg, #eab308, #facc15); }
.progress-orange .progress-bar-fill { background: linear-gradient(90deg, #f97316, #fb923c); }
.progress-red .progress-bar-fill { background: linear-gradient(90deg, #ef4444, #f87171); }
.progress-cyan .progress-bar-fill { background: linear-gradient(90deg, var(--bio-cyan), #67e8f9); }

/* --- Health Badge --- */
.health-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r4);
  line-height: 1.4;
}
.health-badge.healthy { background: rgba(34,197,94,0.15); color: #4ade80; }
.health-badge.watch { background: rgba(234,179,8,0.15); color: #facc15; }
.health-badge.at-risk { background: rgba(249,115,22,0.15); color: #fb923c; }
.health-badge.critical { background: rgba(239,68,68,0.15); color: #f87171; }

/* --- Project Type Badge --- */
.type-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: var(--r4);
  background: rgba(255,255,255,0.06);
  color: var(--text-tertiary);
}
.type-badge.build { color: var(--bio-cyan); background: rgba(76,215,246,0.1); }
.type-badge.ops { color: #a78bfa; background: rgba(167,139,250,0.1); }
.type-badge.marketing { color: #f472b6; background: rgba(244,114,182,0.1); }
.type-badge.admin { color: #94a3b8; background: rgba(148,163,184,0.1); }
.type-badge.research { color: #fbbf24; background: rgba(251,191,36,0.1); }
.type-badge.system { color: #34d399; background: rgba(52,211,153,0.1); }

/* --- Flag Badges (STALLED, OVERDUE, etc.) --- */
.flag-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: var(--r4);
  background: rgba(239,68,68,0.15);
  color: #f87171;
  animation: flag-pulse 2s ease-in-out infinite;
}
@keyframes flag-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* --- Activity Feed --- */
.proj-activity-feed {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.proj-activity-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) var(--s3);
  font-size: 12px;
  color: var(--text-secondary);
  border-radius: var(--r4);
}
.proj-activity-item:hover { background: var(--bg-card); }
.proj-activity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.proj-activity-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* --- Project Cards Grid (v2 redesigned) --- */
.proj-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--s4);
}
@media (max-width: 768px) { .proj-cards-grid { grid-template-columns: 1fr; } }

.proj-card {
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: var(--r12);
  padding: var(--s5);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.proj-card:hover {
  border-color: rgba(76,215,246,0.2);
  box-shadow: 0 0 20px rgba(76,215,246,0.05);
}
.proj-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s3);
}
.proj-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.proj-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  align-items: center;
}
.proj-card-progress {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.proj-card-progress .progress-bar { flex: 1; }
.proj-card-progress-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 32px;
  text-align: right;
}
.proj-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-tertiary);
}
.proj-card-tasks {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-secondary);
}
.proj-card-date {
  font-size: 11px;
}
.proj-card-date.overdue { color: #ef4444; }
.proj-card-date.soon { color: #eab308; }

/* --- Project Detail v2 --- */
.proj-detail-header {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.proj-detail-progress {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s4) 0;
}
.proj-detail-progress .progress-bar { flex: 1; }
.proj-detail-progress-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  min-width: 60px;
  text-align: right;
}
.proj-detail-props {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s4);
}
.proj-detail-prop {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 13px;
}
.proj-detail-prop-label {
  color: var(--text-tertiary);
  font-weight: 600;
}

/* --- Project Tabs --- */
.proj-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s5);
  overflow-x: auto;
}
.proj-tab {
  padding: var(--s3) var(--s5);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.12s;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.proj-tab:hover { color: var(--text-secondary); }
.proj-tab.active {
  color: var(--bio-cyan);
  border-bottom-color: var(--bio-cyan);
}

/* --- Milestone Timeline --- */
.milestone-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 20px;
}
.milestone-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}
.milestone-item {
  position: relative;
  padding: var(--s3) 0 var(--s3) var(--s4);
}
.milestone-dot {
  position: absolute;
  left: -20px;
  top: 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--text-tertiary);
  background: var(--bg-app);
  z-index: 1;
}
.milestone-dot.done {
  background: var(--sphere-gold);
  border-color: var(--sphere-gold);
}
.milestone-dot.done::after {
  content: '\2713';
  position: absolute;
  top: -1px;
  left: 1px;
  font-size: 9px;
  color: #000;
  font-weight: 700;
}
.milestone-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.milestone-title.done {
  color: var(--text-tertiary);
  text-decoration: line-through;
}
.milestone-meta {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
  display: flex;
  gap: var(--s3);
  align-items: center;
}
.milestone-mini-bar {
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.milestone-mini-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--bio-cyan);
  transition: width 0.4s ease;
}

/* --- Task List v2 (with priority + subtasks) --- */
.task-item-v2 {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s3) var(--s3);
  border-radius: var(--r4);
  transition: background 0.12s;
}
.task-item-v2:hover { background: rgba(255,255,255,0.02); }
.task-checkbox-v2 {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--text-tertiary);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: transparent;
  transition: all 0.12s;
  margin-top: 1px;
}
.task-checkbox-v2.done {
  background: var(--sphere-gold);
  border-color: var(--sphere-gold);
  color: #000;
}
.task-checkbox-v2:hover { border-color: var(--bio-cyan); }
.task-item-v2-body { flex: 1; min-width: 0; }
.task-item-v2-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}
.task-item-v2-name.done {
  color: var(--text-tertiary);
  text-decoration: line-through;
}
.task-item-v2-meta {
  display: flex;
  gap: var(--s2);
  align-items: center;
  margin-top: 2px;
}
.task-priority {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.03em;
}
.task-priority.critical { background: rgba(239,68,68,0.15); color: #f87171; }
.task-priority.high { background: rgba(249,115,22,0.15); color: #fb923c; }
.task-priority.medium { background: rgba(234,179,8,0.15); color: #facc15; }
.task-priority.low { background: rgba(148,163,184,0.15); color: #94a3b8; }
.subtask-list {
  margin-left: 26px;
  margin-top: var(--s2);
  padding-left: var(--s3);
  border-left: 1px solid var(--border);
}
.subtask-count {
  font-size: 10px;
  color: var(--text-tertiary);
  font-family: 'JetBrains Mono', monospace;
}

/* --- Note Type Badges (for project notes) --- */
.note-subtype {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--r4);
}
.note-subtype.decision { background: rgba(76,215,246,0.12); color: var(--bio-cyan); }
.note-subtype.log { background: rgba(148,163,184,0.12); color: #94a3b8; }
.note-subtype.question { background: rgba(251,191,36,0.12); color: #fbbf24; }
.note-subtype.idea { background: rgba(167,139,250,0.12); color: #a78bfa; }
.note-subtype.blocker { background: rgba(239,68,68,0.15); color: #f87171; }

/* --- Asset Cards --- */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--s3);
}
.asset-card {
  background: var(--bg-card);
  border-radius: var(--r8);
  padding: var(--s4);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: all 0.12s;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.asset-card:hover { background: var(--bg-card-elevated); }

/* Bulk action bar (Tasks page) */
.bulk-action-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--bg-card);
  border: 1px solid rgba(76, 215, 246, 0.35);
  border-radius: 8px;
  flex-wrap: wrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.bulk-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 6px;
}
.bulk-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
}
.bulk-btn:hover {
  background: rgba(76, 215, 246, 0.1);
  color: var(--text-primary);
}
.bulk-btn-danger {
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}
.bulk-btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}
.task-select-cb {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  cursor: pointer;
  accent-color: #4cd7f6;
  flex-shrink: 0;
}
.task-item.selected {
  background: rgba(76, 215, 246, 0.06);
  box-shadow: inset 3px 0 0 #4cd7f6;
}
.asset-card-icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border-radius: var(--r8);
}
.asset-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.asset-card-meta {
  font-size: 11px;
  color: var(--text-tertiary);
  display: flex;
  gap: var(--s2);
  align-items: center;
}
.source-badge {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  color: var(--text-tertiary);
}

/* --- Systems Registry --- */
.systems-area-section {
  margin-bottom: var(--s6);
}
.systems-area-header {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  padding: var(--s3) 0;
  margin-bottom: var(--s3);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.system-card {
  background: var(--bg-card);
  border-radius: var(--r8);
  padding: var(--s4) var(--s5);
  margin-bottom: var(--s3);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.system-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.system-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.system-card-meta {
  display: flex;
  gap: var(--s4);
  font-size: 11px;
  color: var(--text-tertiary);
}

/* --- Upcoming Milestones Panel --- */
.proj-milestones-upcoming {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.proj-milestone-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) var(--s3);
  border-radius: var(--r4);
  font-size: 12px;
}
.proj-milestone-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  flex-shrink: 0;
  min-width: 70px;
}
.proj-milestone-date.overdue { color: #ef4444; font-weight: 600; }
.proj-milestone-date.thisweek { color: #f97316; font-weight: 600; }
.proj-milestone-name {
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proj-milestone-project {
  color: var(--text-tertiary);
  font-size: 11px;
  flex-shrink: 0;
}

/* --- Section headers (analytics panels) --- */
.proj-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--s3);
}

/* --- Health Score Breakdown (detail page) --- */
.health-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
}
@media (max-width: 768px) { .health-breakdown { grid-template-columns: repeat(2, 1fr); } }
.health-signal {
  background: var(--bg-card);
  border-radius: var(--r8);
  padding: var(--s3) var(--s4);
  text-align: center;
}
.health-signal-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
}
.health-signal-label {
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-top: 2px;
}
.health-signal-max {
  font-size: 10px;
  color: var(--text-tertiary);
}

/* --- Close & Promote Tab --- */
.promote-section {
  background: var(--bg-card);
  border-radius: var(--r12);
  padding: var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.promote-section textarea {
  background: var(--bg-input, rgba(255,255,255,0.04));
  border: 1px solid var(--border);
  border-radius: var(--r8);
  color: var(--text-primary);
  padding: var(--s4);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
}
.promote-section textarea:focus { outline: none; border-color: var(--bio-cyan); }

/* ==========================================
   DATABASES PAGE (Jeff Su Backend)
   ========================================== */
.db-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
}
@media (max-width: 768px) { .db-grid { grid-template-columns: 1fr; } }
.db-group {
  background: var(--bg-card);
  border: none;
  border-radius: var(--r12);
  padding: var(--s5);
}
.db-group-header {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--s4);
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.db-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-radius: var(--r8);
  cursor: pointer;
  transition: all 0.12s;
}
.db-item:hover {
  background: var(--bio-cyan-subtle);
}
.db-item-icon { font-size: 16px; width: 24px; text-align: center; }
.db-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--bio-cyan);
}
.db-item-name:hover { text-decoration: underline; }

/* Database detail table */
.db-table-wrap {
  overflow-x: auto;
  border: none;
  border-radius: var(--r8);
  background: var(--bg-card);
}
.db-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.db-table thead th {
  padding: var(--s3) var(--s4);
  background: var(--bg-app);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}
.db-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.db-table tbody tr:hover {
  background: var(--bio-cyan-subtle);
}
.db-table tbody td {
  padding: var(--s2) var(--s4);
  color: var(--text-primary);
  white-space: nowrap;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================
   CONNECTIONS CARDS
   ========================================== */
.connections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--s4);
}
.connection-card {
  background: var(--bg-card);
  border: none;
  border-radius: var(--r12);
  padding: var(--s5);
  transition: all 0.12s;
}
.connection-card:hover { box-shadow: var(--shadow-glow); background: var(--bg-card-elevated); }
.connection-card.planned { opacity: 0.6; }
.connection-header {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s3);
}
.connection-icon { font-size: 24px; flex-shrink: 0; }
.connection-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.connection-type { font-size: 11px; color: var(--text-tertiary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.connection-status {
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  margin-left: auto;
  flex-shrink: 0;
}
.connection-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.task-action-btn {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  padding: 2px 4px;
  border-radius: var(--r4);
  color: var(--text-tertiary);
}
.task-item:hover .task-action-btn { opacity: 0.6; }
.task-action-btn:hover { opacity: 1 !important; color: #fb7185; background: rgba(190, 18, 60, 0.12); }
.task-list-footer {
  padding: var(--s3) var(--s4);
  text-align: center;
}
.task-list-footer a {
  font-size: 13px;
  font-weight: 600;
  color: var(--bio-cyan);
  cursor: pointer;
  text-decoration: none;
}
.task-list-footer a:hover { text-decoration: underline; }
.task-recurring {
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--cosmic-purple);
  border-radius: var(--r-full);
  font-weight: 600;
}

/* ==========================================
   VIEW TABS
   ========================================== */
.view-tabs {
  display: flex;
  gap: var(--s2);
  margin-bottom: var(--s5);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--s2);
}
.vtab {
  padding: var(--s2) var(--s4);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.12s;
}
.vtab:hover { color: var(--text-primary); }
.vtab.active {
  color: var(--bio-cyan);
  border-bottom-color: var(--bio-cyan);
}

/* ==========================================
   STATUS PILLS
   ========================================== */
.status-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
}
.status-pill.not_started { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }
.status-pill.wip { background: var(--bio-cyan-subtle); color: var(--bio-cyan); }
.status-pill.completed { background: rgba(255, 185, 95, 0.12); color: var(--sphere-gold); }
.status-pill.on_hold { background: rgba(139, 92, 246, 0.12); color: var(--cosmic-purple); }
.status-pill.archived { background: rgba(100, 116, 139, 0.12); color: #64748b; }

/* ==========================================
   FORM FIELDS
   ========================================== */
.form-group {
  margin-bottom: var(--s5);
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--s2);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--r8);
  padding: var(--s3) var(--s4);
  font-size: 14px;
  background: var(--bg-input);
  color: var(--text-primary);
  color-scheme: dark;
  transition: border-color 0.12s;
  -webkit-appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23869397' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.form-group select option {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 8px;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--bio-cyan);
  background: var(--bg-input);
}
.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* ==========================================
   EMPTY STATES
   ========================================== */
.empty-state {
  text-align: center;
  padding: var(--s10) var(--s6);
  color: var(--text-tertiary);
  font-size: 14px;
}
.empty-state-icon {
  font-size: 40px;
  margin-bottom: var(--s3);
  opacity: 0.5;
}

/* ==========================================
   PROJECT BOARD (Kanban)
   ========================================== */
.kanban-board {
  display: flex;
  gap: var(--s4);
  overflow-x: auto;
  padding-bottom: var(--s4);
}
.kanban-column {
  min-width: 260px;
  flex: 1;
  background: var(--bg-input);
  border-radius: var(--r12);
  padding: var(--s4);
}
.kanban-column-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: var(--s3);
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.kanban-column-count {
  background: var(--bg-card);
  padding: 1px 7px;
  border-radius: var(--r-full);
  font-size: 11px;
}
.kanban-card {
  background: var(--bg-card);
  border: none;
  border-radius: var(--r8);
  padding: var(--s3) var(--s4);
  margin-bottom: var(--s2);
  cursor: pointer;
  transition: box-shadow 0.12s, background 0.12s;
}
.kanban-card:hover {
  box-shadow: var(--shadow-glow);
  background: var(--bg-card-elevated);
}
.kanban-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--s1);
}
.kanban-card-meta {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ==========================================
   NOTE CARDS
   ========================================== */
.note-list {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.note-card {
  background: var(--bg-card);
  border: none;
  border-radius: var(--r8);
  padding: var(--s4) var(--s5);
  cursor: pointer;
  transition: all 0.12s;
}
.note-card:hover {
  background: var(--bg-card-elevated);
  box-shadow: var(--shadow-glow);
}
.note-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--s1);
}
.note-card-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  gap: var(--s3);
}
.note-type-badge {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: var(--r-full);
  font-weight: 600;
}
.note-type-badge.idea { background: rgba(255, 185, 95, 0.12); color: var(--sphere-gold); }
.note-type-badge.meeting { background: rgba(76, 215, 246, 0.1); color: var(--bio-cyan); }
.note-type-badge.reference { background: rgba(52, 211, 153, 0.12); color: #34d399; }
.note-type-badge.fleeting { background: rgba(148, 163, 184, 0.12); color: #94a3b8; }
.note-type-badge.literature { background: rgba(208, 188, 255, 0.12); color: var(--cosmic-purple); }
.note-type-badge.permanent { background: rgba(139, 92, 246, 0.12); color: var(--nebula-purple); }

/* ==========================================
   APPROVAL ITEMS
   ========================================== */
.approval-item {
  background: var(--bg-card);
  border: none;
  border-radius: var(--r12);
  padding: var(--s5);
  margin-bottom: var(--s4);
  box-shadow: var(--shadow-sm);
}
.approval-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s3);
}
.approval-item-type {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}
.approval-item-body {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  padding: var(--s3);
  background: var(--bg-input);
  border-radius: var(--r8);
  margin-bottom: var(--s4);
  white-space: pre-wrap;
}
.approval-actions {
  display: flex;
  gap: var(--s3);
}

/* ==========================================
   EMAIL CLIENT
   ========================================== */
.email-toolbar {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s4);
  padding: var(--s2) 0;
}
.email-toolbar .btn-primary,
.email-toolbar .btn-secondary {
  padding: var(--s2) var(--s4);
  font-size: 13px;
  height: 36px;
  display: inline-flex;
  align-items: center;
}
.email-account-select {
  background: var(--bio-cyan-subtle);
  color: var(--bio-cyan);
  border: 1.5px solid rgba(76, 215, 246, 0.2);
  border-radius: var(--r8);
  padding: var(--s2) var(--s4);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  min-width: 220px;
  height: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234cd7f6' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  -webkit-appearance: none;
  appearance: none;
}
.email-account-select:hover {
  border-color: var(--bio-cyan);
  background: rgba(76, 215, 246, 0.1);
}
.email-account-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}
.email-search-wrap {
  display: flex;
  flex: 1;
  min-width: 0;
}
.email-search {
  flex: 1;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: var(--r8) 0 0 var(--r8);
  padding: var(--s2) var(--s4);
  font-size: 13px;
  font-family: var(--font);
  height: 36px;
}
.email-search:focus {
  outline: none;
  border-color: var(--bio-cyan);
}
.email-search-btn {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-left: none;
  border-radius: 0 var(--r8) var(--r8) 0;
  padding: 0 var(--s3);
  height: 36px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.1s;
}
.email-search-btn:hover {
  color: var(--bio-cyan);
}
.email-list-wrap {
  background: var(--bg-card);
  border: none;
  border-radius: var(--r12);
  overflow: hidden;
}
.email-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 10px var(--s4);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
  min-height: 44px;
}
.email-item:last-child { border-bottom: none; }
.email-item:hover {
  background: var(--bio-cyan-subtle);
}
.email-item.unread {
  background: rgba(76, 215, 246, 0.04);
}
.email-item.unread .email-from {
  color: #fff;
}
.email-item.unread .email-subject {
  font-weight: 700;
  color: #fff;
}
.email-star {
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.3;
  transition: opacity 0.1s;
  width: 20px;
  text-align: center;
}
.email-star:hover, .email-star.starred { opacity: 1; color: var(--sphere-gold); }
.email-from {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 160px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
}
.email-content-preview {
  flex: 1;
  display: flex;
  gap: var(--s2);
  overflow: hidden;
  min-width: 0;
  align-items: baseline;
}
.email-subject {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  max-width: 40%;
}
.email-snippet {
  font-size: 13px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.email-date {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 65px;
  text-align: right;
}
.email-row-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.12s;
}
.email-item:hover .email-row-actions {
  opacity: 1;
}
.email-row-btn {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--r4);
  color: var(--text-tertiary);
  transition: all 0.1s;
  font-family: var(--font);
  position: relative;
}
.email-row-btn:hover {
  background: var(--bg-input);
  color: var(--text-primary);
}
.email-row-btn[title="Spam"]:hover {
  color: #fbbf24;
}
.email-row-btn[title="Trash"]:hover {
  color: #fb7185;
}
.email-row-btn[title="Archive"]:hover {
  color: #34d399;
}
/* Mobile: always show actions */
@media (max-width: 768px) {
  .email-row-actions { opacity: 1; }
  .email-row-btn { font-size: 13px; padding: 3px 4px; }
}
.email-actions-bar {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s4);
  overflow-x: auto;
  flex-wrap: nowrap;
}
.email-action-btn {
  border: none;
  border-radius: var(--r6);
  padding: var(--s2) var(--s4);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
  font-family: var(--font);
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.email-action-btn.act-back {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-primary);
}
.email-action-btn.act-back:hover {
  background: rgba(148, 163, 184, 0.22);
}
.email-action-btn.act-archive {
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
}
.email-action-btn.act-archive:hover {
  background: rgba(52, 211, 153, 0.2);
  color: #6ee7b7;
}
.email-action-btn.act-trash {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
}
.email-action-btn.act-trash:hover {
  background: rgba(251, 191, 36, 0.2);
  color: #fcd34d;
}
.email-action-btn.act-delete {
  background: rgba(190, 18, 60, 0.1);
  color: #fb7185;
}
.email-action-btn.act-delete:hover {
  background: rgba(190, 18, 60, 0.2);
  color: #fda4af;
}
.email-action-btn.act-unread {
  background: rgba(76, 215, 246, 0.1);
  color: var(--bio-cyan);
}
.email-action-btn.act-unread:hover {
  background: rgba(76, 215, 246, 0.2);
  color: #6ee0f8;
}
.email-action-btn.act-spam {
  background: rgba(208, 188, 255, 0.1);
  color: var(--cosmic-purple);
}
.email-action-btn.act-spam:hover {
  background: rgba(208, 188, 255, 0.2);
  color: #e0d0ff;
}
.email-action-btn:first-child {
  margin-right: var(--s2);
}
.email-reader-header {
  margin-bottom: var(--s5);
}
.email-reader-subject {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--s3);
}
.email-reader-meta {
  display: flex;
  align-items: center;
  gap: var(--s4);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--s2);
}
.email-reader-from {
  font-weight: 600;
  color: var(--text-primary);
}
.email-reader-body {
  background: #ffffff;
  border: none;
  border-radius: var(--r12);
  padding: var(--s6);
  font-size: 14px;
  line-height: 1.7;
  color: #222222;
  overflow-x: auto;
  min-height: 200px;
}
.email-reply-box {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-width);
  right: 0;
  background: var(--bg-card);
  border: none;
  border-top: 2px solid var(--bio-cyan);
  border-radius: var(--r12) var(--r12) 0 0;
  padding: var(--s4) var(--s6);
  box-shadow: 0 -8px 30px rgba(0,0,0,0.5), 0 0 20px var(--bio-cyan-glow);
  z-index: 50;
  max-width: 1400px;
  max-height: 60vh;
  overflow-y: auto;
}
@media (max-width: 768px) {
  .email-reply-box { left: 0; padding: var(--s3) var(--s4); }
}
.email-reply-box textarea {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--r8);
  padding: var(--s4);
  font-size: 14px;
  font-family: var(--font);
  resize: vertical;
  min-height: 80px;
  position: relative;
  z-index: 51;
  -webkit-user-select: text;
  user-select: text;
}
.email-reply-box textarea:focus {
  outline: none;
  border-color: var(--bio-cyan);
}
.email-reply-box input {
  position: relative;
  z-index: 51;
  -webkit-user-select: text;
  user-select: text;
}
.email-thread-msg {
  border-left: 3px solid var(--border);
  padding-left: var(--s3);
}
.email-thread-msg.sent {
  border-left-color: var(--bio-cyan);
}
.email-thread-msg.received {
  border-left-color: var(--cosmic-purple);
}
.email-thread-msg .email-reader-body {
  margin-bottom: 0;
}
/* Extra padding at bottom of email reader so content isn't hidden behind fixed reply box */
#emailReader {
  padding-bottom: 350px;
}
.email-compose-fields {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  margin-bottom: var(--s4);
}
.email-compose-field {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.email-compose-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  min-width: 60px;
}
.email-compose-field input {
  flex: 1;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--r6);
  padding: var(--s2) var(--s3);
  font-size: 14px;
  font-family: var(--font);
}
.email-compose-field input:focus {
  outline: none;
  border-color: var(--bio-cyan);
}
@media (max-width: 768px) {
  .email-from { min-width: 90px; max-width: 90px; font-size: 12px; }
  .email-subject { font-size: 12px; max-width: 50%; }
  .email-snippet { display: none; }
  .email-date { font-size: 11px; min-width: 45px; }
  .email-item { padding: 8px var(--s3); gap: var(--s2); }
  .email-toolbar { flex-wrap: wrap; gap: var(--s2); }
  .email-toolbar .btn-primary,
  .email-toolbar .btn-secondary { flex: 1; justify-content: center; }
  .email-account-select { width: 100%; min-width: unset; }
  .email-reader-subject { font-size: 17px; }
  .email-reader-body { padding: var(--s4); font-size: 13px; }
  .email-actions-bar { flex-wrap: wrap; gap: var(--s1); }
  .email-action-btn { font-size: 11px; padding: var(--s1) var(--s3); height: 28px; }
  .email-reply-box { padding: var(--s4); }
  .email-compose-field { flex-direction: column; align-items: stretch; gap: var(--s1); }
  .email-compose-field label { min-width: unset; }
}

/* ==========================================
   HEALTH - Equipment Cards
   ========================================== */
.kb-weight-card {
  background: var(--bg-input);
  border-radius: var(--r8);
  padding: var(--s2) var(--s4);
  font-size: 14px;
  font-weight: 700;
  color: var(--bio-cyan);
  text-align: center;
  min-width: 60px;
  cursor: pointer;
  transition: all 0.12s;
  border: 1px solid transparent;
}
.kb-weight-card:hover {
  border-color: var(--bio-cyan);
  background: var(--bio-cyan-subtle);
  transform: translateY(-1px);
}
.equip-card {
  padding: var(--s2) var(--s3);
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: var(--r6);
  transition: background 0.1s;
}
.equip-card:hover {
  background: var(--bg-card-elevated);
}

/* Fleet cards (separate from Apex equip-card to avoid click conflicts) */
.fleet-card {
  padding: var(--s2) var(--s3);
  font-size: 13px;
  color: var(--text-primary);
  cursor: default;
  border-radius: var(--r6);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  user-select: none;
  -webkit-user-select: none;
}
.fleet-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.fleet-card-detail {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================
   SMS / MESSAGES
   ========================================== */
.sms-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 10px var(--s4);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
  min-height: 44px;
}
.sms-item:last-child { border-bottom: none; }
.sms-item:hover { background: var(--bio-cyan-subtle); }
.sms-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.sms-content {
  flex: 1;
  min-width: 0;
}
.sms-from {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.sms-preview {
  font-size: 13px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sms-date {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}
.sms-direction {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: var(--r-full);
  font-weight: 700;
  flex-shrink: 0;
}
.sms-direction.inbound { background: rgba(52, 211, 153, 0.12); color: #34d399; }
.sms-direction.outbound { background: rgba(76, 215, 246, 0.1); color: var(--bio-cyan); }

/* Notification toast */
.notification-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--bio-cyan);
  border-radius: var(--r12);
  padding: var(--s4) var(--s5);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), var(--shadow-glow);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: var(--s3);
  max-width: 380px;
  animation: slideInRight 0.3s ease;
  cursor: pointer;
}
.notification-toast .notif-icon { font-size: 20px; flex-shrink: 0; }
.notification-toast .notif-text { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.notification-toast .notif-sub { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.notification-toast .notif-close {
  background: none; border: none; color: var(--text-tertiary); font-size: 16px; cursor: pointer; margin-left: auto; padding: 0 4px;
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================
   LOADING / SKELETON
   ========================================== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-input) 25%, var(--bg-card-elevated) 50%, var(--bg-input) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r8);
  height: 40px;
  margin-bottom: var(--s2);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================
   MASTER DASHBOARD
   ========================================== */
.dash-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s4);
  width: 100%;
}
.dash-metric-card {
  background: var(--bg-card);
  border-radius: var(--r12);
  padding: var(--s4);
  position: relative;
  transition: background 0.15s;
  min-width: 0;
  overflow: hidden;
}
.dash-metric-card:hover {
  background: var(--bg-card-elevated);
}
.dash-clickable {
  cursor: pointer;
}
.dash-clickable:hover {
  box-shadow: 0 0 16px rgba(76, 215, 246, 0.12);
}
.dash-metric-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bio-cyan);
  margin-bottom: var(--s1);
}
.dash-metric-name {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--s2);
}
.dash-metric-value {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  word-break: break-word;
}
.dash-metric-value small {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}
.dash-metric-target {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: var(--s1);
}
.dash-metric-status {
  position: absolute;
  top: var(--s5);
  right: var(--s5);
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-green {
  background: var(--green-bright);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}
.status-yellow {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
  animation: pulse-amber 2s infinite;
}
.status-red {
  background: var(--red);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
  animation: pulse-red 2s infinite;
}
@keyframes pulse-amber {
  0%, 100% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 16px rgba(245, 158, 11, 0.6); }
}
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 16px rgba(239, 68, 68, 0.6); }
}

.dash-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
  width: 100%;
}

.dash-items-list {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.dash-item {
  background: var(--bg-card);
  border-radius: var(--r8);
  padding: var(--s3) var(--s4);
  transition: background 0.15s;
}
.dash-item:hover {
  background: var(--bg-card-elevated);
}
.dash-item-red {
  border-left: 3px solid var(--red);
}
.dash-item-amber {
  border-left: 3px solid var(--amber);
}
.dash-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.dash-item-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.dash-item-red-text {
  color: var(--red) !important;
  font-weight: 600;
}
.dash-item-amber-text {
  color: var(--amber) !important;
  font-weight: 600;
}

.dash-q-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.q-urgent {
  background: var(--red);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}
.q-important {
  background: var(--bio-cyan);
  box-shadow: 0 0 8px rgba(76, 215, 246, 0.5);
}

@media (max-width: 768px) {
  .dash-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s3);
  }
  .dash-two-col {
    grid-template-columns: 1fr;
    gap: var(--s4);
  }
  .dash-metric-value {
    font-size: 22px;
  }
}
@media (max-width: 480px) {
  .dash-metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   HEALTH & PERFORMANCE
   ========================================== */

/* Hero override for health */
.hero-health {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(139, 92, 246, 0.1), rgba(255, 185, 95, 0.08));
}

/* Training Category Cards - Horizontal Scroll */
.health-categories-scroll {
  display: flex;
  gap: var(--s3);
  overflow-x: auto;
  padding-bottom: var(--s3);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  -webkit-overflow-scrolling: touch;
}
.health-categories-scroll::-webkit-scrollbar {
  height: 4px;
}
.health-categories-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.health-categories-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.health-cat-card {
  flex: 0 0 160px;
  background: var(--bg-card);
  border-radius: var(--r12);
  padding: var(--s5) var(--s4);
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  position: relative;
  overflow: hidden;
}
.health-cat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cat-color, var(--bio-cyan));
  opacity: 0.6;
  transition: opacity 0.15s;
}
.health-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 12px rgba(76, 215, 246, 0.1);
  background: var(--bg-card-elevated);
}
.health-cat-card:hover::before {
  opacity: 1;
}
.health-cat-icon {
  font-size: 32px;
  margin-bottom: var(--s2);
}
.health-cat-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.health-cat-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Today's Plan Grid */
.health-today-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
}

/* Session List */
.health-session-list {
  background: var(--bg-card);
  border-radius: var(--r12);
  overflow: hidden;
}
.health-session-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}
.health-session-item:last-child {
  border-bottom: none;
}
.health-session-item:hover {
  background: var(--bg-hover);
}
.health-session-cat {
  width: 40px;
  height: 40px;
  border-radius: var(--r8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.health-session-info {
  flex: 1;
  min-width: 0;
}
.health-session-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.health-session-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 1px;
}

/* Recovery Checklist */
.health-recovery-list {
  background: var(--bg-card);
  border-radius: var(--r12);
  overflow: hidden;
}
.health-recovery-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.1s;
}
.health-recovery-item:last-child {
  border-bottom: none;
}
.health-recovery-item:hover {
  background: var(--bg-hover);
}
.health-recovery-item.done .health-recovery-name {
  text-decoration: line-through;
  color: var(--text-tertiary);
}
.health-recovery-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  cursor: pointer;
  flex-shrink: 0;
}
.health-recovery-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.health-recovery-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Stats Row */
.health-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s4);
}
.health-stat-card {
  background: var(--bg-card);
  border-radius: var(--r12);
  padding: var(--s5) var(--s4);
  text-align: center;
  position: relative;
  transition: background 0.15s, box-shadow 0.15s;
}
.health-stat-card[onclick]:hover {
  background: var(--bg-card-elevated);
  box-shadow: 0 0 12px rgba(76, 215, 246, 0.1);
}
.health-stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--bio-cyan);
  letter-spacing: -0.02em;
}
.health-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.health-stat-icon {
  position: absolute;
  top: var(--s3);
  right: var(--s3);
  font-size: 16px;
  opacity: 0.5;
}

/* Recent Workouts */
.health-recent-list {
  background: var(--bg-card);
  border-radius: var(--r12);
  overflow: hidden;
}
.health-recent-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}
.health-recent-item:last-child {
  border-bottom: none;
}
.health-recent-item:hover {
  background: var(--bg-hover);
}
.health-recent-emoji {
  font-size: 20px;
  flex-shrink: 0;
}
.health-recent-info {
  flex: 1;
  min-width: 0;
}
.health-recent-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.health-recent-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 1px;
}
.health-recent-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* Fasting Timeline Bar (future use) */
.health-fasting-bar {
  background: var(--bg-card-elevated);
  border-radius: var(--r8);
  height: 28px;
  overflow: hidden;
  position: relative;
}
.health-fasting-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--bio-cyan));
  border-radius: var(--r8);
  transition: width 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: var(--s2);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
  .health-today-grid {
    grid-template-columns: 1fr;
    gap: var(--s4);
  }
  .health-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s3);
  }
  .health-cat-card {
    flex: 0 0 140px;
  }
  .health-stat-value {
    font-size: 22px;
  }
}
@media (max-width: 480px) {
  .health-stats-row {
    grid-template-columns: 1fr 1fr;
  }
  .health-categories-scroll {
    gap: var(--s2);
  }
  .health-cat-card {
    flex: 0 0 120px;
    padding: var(--s4) var(--s3);
  }
}

/* ============================================
   ACTIVE WORKOUT SESSION
   ============================================ */

.aws-container {
  max-width: 720px;
  margin: 0 auto;
}

/* Session Header */
.aws-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s4) var(--s5);
  background: var(--bg-card);
  border-radius: var(--r12);
  margin-bottom: var(--s5);
  position: sticky;
  top: 0;
  z-index: 10;
}
.aws-header-left {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.aws-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green-glow);
  animation: aws-pulse 1.5s ease-in-out infinite;
}
@keyframes aws-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.aws-session-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.aws-session-cat {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  text-transform: capitalize;
}
.aws-timer {
  font-family: var(--font-mono, monospace);
  font-size: 24px;
  font-weight: 700;
  color: var(--bio-cyan);
  letter-spacing: 0.02em;
}

/* Exercise Block */
.aws-exercise {
  background: var(--bg-card);
  border-radius: var(--r12);
  margin-bottom: var(--s4);
  overflow: hidden;
}
.aws-exercise-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border-light);
}
.aws-exercise-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: color 0.15s;
}
.aws-exercise-name:hover {
  color: var(--bio-cyan);
}
.aws-exercise-remove {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r6);
  transition: color 0.15s, background 0.15s;
}
.aws-exercise-remove:hover {
  color: var(--red);
  background: var(--red-bg);
}

/* Logged Sets */
.aws-sets-list {
  padding: 0 var(--s4);
}
.aws-set-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}
.aws-set-row:last-child {
  border-bottom: none;
}
.aws-set-num {
  color: var(--text-tertiary);
  font-weight: 600;
  min-width: 44px;
  font-size: 12px;
}
.aws-set-detail {
  color: var(--text-primary);
  flex: 1;
}
.aws-set-rpe {
  color: var(--text-tertiary);
  font-size: 12px;
}
.aws-set-check {
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
}
.aws-set-pr {
  color: var(--sphere-gold);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  animation: aws-pr-glow 0.6s ease-out;
}
@keyframes aws-pr-glow {
  0% { text-shadow: 0 0 12px var(--sphere-gold-glow); transform: scale(1.3); }
  100% { text-shadow: none; transform: scale(1); }
}

/* Input Row (current set) */
.aws-input-row {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s3) var(--s4);
  background: var(--bg-card-elevated);
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}
.aws-input-row input,
.aws-input-row select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r6);
  color: var(--text-primary);
  font-size: 13px;
  padding: 6px 8px;
  width: 70px;
  outline: none;
  transition: border-color 0.15s;
}
.aws-input-row input:focus,
.aws-input-row select:focus {
  border-color: var(--bio-cyan);
}
.aws-input-row input::placeholder {
  color: var(--text-tertiary);
}
.aws-input-row select {
  width: auto;
  min-width: 56px;
}
.aws-input-row .aws-input-label {
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.aws-input-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.aws-failure-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-tertiary);
  cursor: pointer;
}
.aws-failure-toggle input {
  width: auto;
  accent-color: var(--red);
}

/* Log Set Button */
.aws-log-btn {
  background: linear-gradient(135deg, var(--bio-cyan-dim), var(--bio-cyan));
  color: var(--space-void);
  border: none;
  border-radius: var(--r6);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
  white-space: nowrap;
}
.aws-log-btn:hover {
  box-shadow: 0 0 14px rgba(76, 215, 246, 0.35);
  transform: translateY(-1px);
}

/* Add Set Link */
.aws-add-set {
  padding: var(--s2) var(--s4) var(--s3);
}
.aws-add-set button {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s;
}
.aws-add-set button:hover {
  color: var(--bio-cyan);
}

/* Add Exercise Button */
.aws-add-exercise {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--r12);
  padding: var(--s4);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: var(--s4);
}
.aws-add-exercise:hover {
  border-color: var(--bio-cyan);
  background: var(--bg-card-elevated);
}
.aws-add-exercise span {
  color: var(--bio-cyan);
  font-weight: 600;
  font-size: 14px;
}

/* Rest Timer */
.aws-rest-timer {
  background: var(--bg-card);
  border-radius: var(--r12);
  padding: var(--s4) var(--s5);
  text-align: center;
  margin-bottom: var(--s4);
  display: none;
}
.aws-rest-timer.visible {
  display: block;
}
.aws-rest-timer-label {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: var(--s2);
}
.aws-rest-timer-value {
  font-family: var(--font-mono, monospace);
  font-size: 36px;
  font-weight: 700;
  color: var(--amber);
}
.aws-rest-timer-bar {
  height: 4px;
  background: var(--bg-card-elevated);
  border-radius: 2px;
  margin-top: var(--s3);
  overflow: hidden;
}
.aws-rest-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amber), var(--sphere-gold));
  border-radius: 2px;
  transition: width 1s linear;
}
.aws-rest-skip {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 12px;
  cursor: pointer;
  margin-top: var(--s2);
  padding: 4px 12px;
}
.aws-rest-skip:hover {
  color: var(--bio-cyan);
}

/* Finish Button */
.aws-finish-btn {
  background: linear-gradient(135deg, var(--green-bright), var(--green));
  color: var(--space-void);
  border: none;
  border-radius: var(--r12);
  padding: var(--s4) var(--s5);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: box-shadow 0.15s, transform 0.15s;
  margin-top: var(--s4);
}
.aws-finish-btn:hover {
  box-shadow: 0 0 20px var(--green-glow);
  transform: translateY(-2px);
}

/* PR Notification */
.aws-pr-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: linear-gradient(135deg, var(--sphere-gold-dark), var(--sphere-gold));
  color: var(--space-void);
  padding: var(--s3) var(--s5);
  border-radius: var(--r12);
  font-weight: 700;
  font-size: 16px;
  z-index: 9999;
  box-shadow: 0 0 30px var(--sphere-gold-glow);
  opacity: 0;
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
  pointer-events: none;
}
.aws-pr-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Completion Summary */
.aws-summary {
  text-align: center;
  padding: var(--s6) var(--s5);
}
.aws-summary-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--sphere-gold);
  margin-bottom: var(--s2);
}
.aws-summary-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--s6);
}
.aws-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s3);
  margin-bottom: var(--s5);
}
.aws-summary-stat {
  background: var(--bg-card);
  border-radius: var(--r12);
  padding: var(--s4);
}
.aws-summary-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}
.aws-summary-stat-label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 4px;
}
.aws-summary-prs {
  margin-top: var(--s4);
  padding: var(--s3) var(--s4);
  background: rgba(255, 185, 95, 0.08);
  border-radius: var(--r8);
  border-left: 3px solid var(--sphere-gold);
}
.aws-summary-prs-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--sphere-gold);
  text-transform: uppercase;
  margin-bottom: var(--s2);
}

/* Exercise Search Modal */
.aws-search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r8);
  color: var(--text-primary);
  font-size: 14px;
  padding: var(--s3);
  outline: none;
  margin-bottom: var(--s3);
  transition: border-color 0.15s;
}
.aws-search-input:focus {
  border-color: var(--bio-cyan);
}
.aws-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: var(--s3);
}
.aws-filter-pill {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-full, 9999px);
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.aws-filter-pill:hover,
.aws-filter-pill.active {
  background: var(--bio-cyan-subtle);
  border-color: var(--bio-cyan);
  color: var(--bio-cyan);
}
.aws-exercise-results {
  max-height: 300px;
  overflow-y: auto;
}
.aws-exercise-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s3);
  border-radius: var(--r8);
  cursor: pointer;
  transition: background 0.1s;
}
.aws-exercise-result:hover {
  background: var(--bg-hover);
}
.aws-exercise-result-name {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
}
.aws-exercise-result-cat {
  font-size: 11px;
  color: var(--text-tertiary);
}

@media (max-width: 640px) {
  .aws-header {
    flex-direction: column;
    gap: var(--s2);
    text-align: center;
  }
  .aws-timer {
    font-size: 20px;
  }
  .aws-input-row {
    gap: 4px;
  }
  .aws-input-row input {
    width: 56px;
  }
  .aws-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   WORKOUT SESSION FLOW (Circuit/Round UI)
   ============================================ */

.ws-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--r12);
  padding: var(--s4) var(--s5);
  margin-bottom: var(--s5);
}
.ws-header-info { display: flex; flex-direction: column; }
.ws-session-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}
.ws-round-indicator {
  font-size: 14px;
  color: var(--bio-cyan);
  font-weight: 600;
  margin-top: 2px;
}
.ws-session-timer {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--text-secondary);
}
.ws-setup {
  margin-bottom: var(--s6);
}
.ws-rounds-setting {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s5);
  flex-wrap: wrap;
}
.ws-rounds-setting label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
}
.ws-rounds-setting button {
  width: 32px;
  height: 32px;
  border-radius: var(--r6);
  border: none;
  background: var(--bg-card-elevated);
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.ws-rounds-setting span {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  min-width: 30px;
  text-align: center;
}
.ws-exercise-list {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-bottom: var(--s4);
}
.ws-exercise {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--r8);
  padding: var(--s3) var(--s4);
  transition: background 0.15s, box-shadow 0.2s;
}
.ws-ex-active {
  background: var(--bg-card-elevated);
  box-shadow: 0 0 12px rgba(76, 215, 246, 0.15);
  border-left: 3px solid var(--bio-cyan);
}
.ws-ex-done {
  opacity: 0.5;
}
.ws-ex-left {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.ws-ex-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.ws-ex-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.ws-ex-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  cursor: pointer;
}
.ws-ex-name:hover { color: var(--bio-cyan); }
.ws-ex-target {
  font-size: 13px;
  color: var(--text-tertiary);
}
.ws-ex-action {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.ws-rep-input {
  width: 50px;
  padding: var(--s2);
  border-radius: var(--r6);
  border: 1px solid var(--border);
  background: var(--bg-card-elevated);
  color: var(--text-primary);
  text-align: center;
  font-size: 16px;
  font-weight: 700;
}
.ws-done-btn {
  padding: var(--s2) var(--s5);
  border: none;
  border-radius: var(--r8);
  background: linear-gradient(135deg, var(--green), #059669);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.ws-done-btn:hover { box-shadow: 0 0 12px rgba(16, 185, 129, 0.3); }
.ws-ex-timer {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.ws-ex-timer span {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--bio-cyan);
}
.ws-ex-start-timer {
  padding: var(--s2) var(--s4);
  border: none;
  border-radius: var(--r8);
  background: linear-gradient(135deg, var(--bio-cyan), var(--bio-cyan-dim));
  color: #003640;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.ws-ex-logged {
  font-size: 13px;
  color: var(--text-tertiary);
}
.ws-rest-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--s8);
  margin: var(--s4) 0;
  background: var(--bg-card);
  border-radius: var(--r12);
  border-left: 3px solid var(--sphere-gold);
}
.ws-rest-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--sphere-gold);
  letter-spacing: 0.1em;
  margin-bottom: var(--s2);
}
.ws-rest-countdown {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  color: var(--text-primary);
}
.ws-rest-skip {
  margin-top: var(--s3);
  padding: var(--s2) var(--s5);
  border: none;
  border-radius: var(--r6);
  background: var(--bg-card-elevated);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
}
.ws-add-exercise {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s4);
  margin: var(--s3) 0;
  border-radius: var(--r8);
  border: 2px dashed var(--border);
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.15s, color 0.15s;
}
.ws-add-exercise:hover {
  border-color: var(--bio-cyan);
  color: var(--bio-cyan);
}
.ws-finish-btn {
  display: block;
  width: 100%;
  padding: var(--s4);
  margin-top: var(--s4);
  border: none;
  border-radius: var(--r8);
  background: linear-gradient(135deg, var(--bio-cyan), var(--bio-cyan-dim));
  color: #003640;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.ws-finish-btn:hover { box-shadow: 0 0 16px rgba(76, 215, 246, 0.3); }

/* Add Exercise Step 2 (type/target selector in modal) */
.ws-add-step2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
  padding: var(--s4);
}
.ws-add-step2-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--s2);
}
.ws-add-step2-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.ws-add-step2-row label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 50px;
}
.ws-add-step2-row input {
  width: 70px;
  padding: var(--s2);
  border-radius: var(--r6);
  border: 1px solid var(--border);
  background: var(--bg-card-elevated);
  color: var(--text-primary);
  text-align: center;
  font-size: 16px;
  font-weight: 700;
}
.ws-type-btn {
  padding: var(--s2) var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--r6);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ws-type-btn.ws-type-active {
  background: var(--bio-cyan);
  color: #003640;
  border-color: var(--bio-cyan);
}

@media (max-width: 768px) {
  .ws-session-timer { font-size: 24px; }
  .ws-rest-countdown { font-size: 42px; }
  .ws-rounds-setting { flex-direction: column; align-items: flex-start; }
}

/* ============================================
   WORKOUT CALENDAR
   ============================================ */

/* Week View - 7 column grid */
.workout-cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: var(--bg-card);
  border-radius: var(--r12);
  overflow: hidden;
}
.workout-cal-week-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 2px;
}
.workout-cal-week-header span {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 0;
}

/* Month View - 7 column grid */
.workout-cal-month {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: var(--bg-card);
  border-radius: var(--r12);
  overflow: hidden;
}
.workout-cal-month-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 2px;
}
.workout-cal-month-header span {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 0;
}

/* Day cell (used in both week and month) */
.workout-cal-day-cell {
  background: var(--bg-card-elevated);
  padding: 8px;
  min-height: 80px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  position: relative;
}
.workout-cal-day-cell:hover {
  background: rgba(76, 215, 246, 0.06);
}
.workout-cal-day-cell.workout-cal-today {
  box-shadow: inset 0 0 0 2px var(--bio-cyan), 0 0 12px rgba(76, 215, 246, 0.15);
}
.workout-cal-day-cell.workout-cal-other-month {
  opacity: 0.35;
}
.workout-cal-day-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.workout-cal-today .workout-cal-day-num {
  color: var(--bio-cyan);
}
.workout-cal-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 4px;
}

/* Small colored dot for activity type */
.workout-cal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.workout-cal-session-text {
  font-size: 10px;
  color: var(--text-tertiary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Day detail view */
.workout-cal-day-detail {
  background: var(--bg-card);
  border-radius: var(--r12);
  padding: var(--s5);
}
.workout-cal-day-detail-date {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--s4);
}
.workout-cal-day-detail-sub {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: var(--s5);
}
.workout-cal-day-session {
  background: var(--bg-card-elevated);
  border-radius: var(--r8);
  padding: var(--s4);
  margin-bottom: var(--s3);
}
.workout-cal-day-session-header {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s3);
}
.workout-cal-day-session-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
}
.workout-cal-day-session-meta {
  font-size: 12px;
  color: var(--text-tertiary);
}
.workout-cal-day-set {
  display: flex;
  gap: var(--s3);
  padding: 4px 0;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}
.workout-cal-day-set:last-child {
  border-bottom: none;
}
.workout-cal-day-set-name {
  flex: 1;
  font-weight: 600;
  color: var(--text-primary);
}
.workout-cal-day-set-detail {
  color: var(--text-tertiary);
  font-size: 12px;
}
.workout-cal-day-recovery {
  background: var(--bg-card-elevated);
  border-radius: var(--r8);
  padding: var(--s4);
  margin-bottom: var(--s3);
}
.workout-cal-day-recovery-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: var(--s2);
}
.workout-cal-day-recovery-item {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 3px 0;
}

/* This Day Last Year box */
.workout-cal-last-year {
  background: rgba(208, 188, 255, 0.06);
  border: 1px solid rgba(208, 188, 255, 0.15);
  border-radius: var(--r8);
  padding: var(--s4);
  margin-top: var(--s5);
}
.workout-cal-last-year-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--nebula-pink);
  margin-bottom: var(--s2);
}
.workout-cal-last-year-content {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* Empty day */
.workout-cal-empty {
  text-align: center;
  padding: var(--s6);
  color: var(--text-tertiary);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .workout-cal-day-cell {
    min-height: 60px;
    padding: 6px;
  }
  .workout-cal-day-num {
    font-size: 12px;
  }
  .workout-cal-session-text {
    display: none;
  }
}
@media (max-width: 480px) {
  .workout-cal-day-cell {
    min-height: 48px;
    padding: 4px;
  }
  .workout-cal-dot {
    width: 6px;
    height: 6px;
  }
}

/* ==========================================
   BODY / MUSCLE MAP
   ========================================== */
.body-map-container {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.body-map-container .body-map-exercises {
  max-height: 300px;
  overflow-y: auto;
}
.body-map-views {
  display: flex;
  gap: var(--s4);
}
.body-map-svg {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.body-map-view-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: rgba(76, 215, 246, 0.5);
  text-transform: uppercase;
  margin-bottom: var(--s2);
}
.body-map-svg svg {
  width: 180px;
  height: auto;
}
.body-map-muscle {
  cursor: pointer;
  transition: fill 0.2s, filter 0.2s;
  fill: rgba(76, 215, 246, 0.12);
  stroke: rgba(76, 215, 246, 0.25);
  stroke-width: 0.3;
}
.body-map-muscle:hover {
  fill: rgba(76, 215, 246, 0.6);
  filter: drop-shadow(0 0 8px rgba(76, 215, 246, 0.4));
}
.body-map-muscle.active {
  fill: rgba(76, 215, 246, 0.8);
  filter: drop-shadow(0 0 12px rgba(76, 215, 246, 0.6));
}
.body-map-static {
  fill: rgba(76, 215, 246, 0.06);
  stroke: rgba(76, 215, 246, 0.15);
  stroke-width: 0.3;
  pointer-events: none;
}
.body-map-exercises {
  padding: var(--s4);
}
.body-map-results {
  max-height: 500px;
  overflow-y: auto;
}
.body-map-exercise-item {
  background: var(--bg-card);
  border-radius: var(--r8);
  padding: var(--s3) var(--s4);
  margin-bottom: var(--s2);
  cursor: pointer;
  transition: background 0.15s;
}
.body-map-exercise-item:hover {
  background: var(--bg-card-elevated);
  box-shadow: 0 0 12px rgba(76, 215, 246, 0.1);
}
@media (max-width: 768px) {
  .body-map-views {
    justify-content: center;
  }
  .body-map-svg svg {
    width: 140px;
  }
}

/* Category Page */
.cat-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--s5);
  font-size: 13px;
  padding-left: 0;
}
@media (max-width: 768px) {
  .cat-breadcrumbs {
    padding-left: 48px;
    padding-top: var(--s2);
  }
}
.cat-breadcrumbs a {
  color: var(--bio-cyan);
  cursor: pointer;
}
.cat-breadcrumb-sep { color: var(--text-tertiary); }
.cat-breadcrumb-current { color: var(--text-secondary); }

.cat-hero {
  display: flex;
  align-items: center;
  gap: var(--s5);
  margin-bottom: var(--s8);
}
.cat-hero-icon { font-size: 48px; }
.cat-hero-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.cat-hero-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

.cat-session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s4);
}
.cat-protocol-card {
  background: var(--bg-card);
  border-radius: var(--r12);
  padding: var(--s5);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.2s;
}
.cat-protocol-card:hover {
  background: var(--bg-card-elevated);
  box-shadow: 0 0 16px rgba(76, 215, 246, 0.1);
}
.cat-free-session { border-left: 3px solid var(--bio-cyan); }
.cat-custom-workout { border-left: 3px solid var(--sphere-gold); }
.cat-protocol-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.cat-protocol-expert {
  font-size: 12px;
  color: var(--bio-cyan);
  font-weight: 600;
  margin-bottom: 4px;
}
.cat-protocol-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}
.cat-protocol-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cat-exercises-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s3);
}
.cat-exercise-card {
  background: var(--bg-card);
  border-radius: var(--r8);
  padding: var(--s3) var(--s4);
  cursor: pointer;
  transition: background 0.15s;
}
.cat-exercise-card:hover {
  background: var(--bg-card-elevated);
}
.cat-exercise-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}
.cat-exercise-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.cat-experts-list {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.cat-expert-group {
  background: var(--bg-card);
  border-radius: var(--r12);
  padding: var(--s4);
}
.cat-expert-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--bio-cyan);
  margin-bottom: var(--s3);
}
.cat-expert-protocol {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s2) var(--s3);
  border-radius: var(--r6);
  cursor: pointer;
  transition: background 0.15s;
  color: var(--text-primary);
  font-size: 14px;
}
.cat-expert-protocol:hover {
  background: var(--bg-card-elevated);
}
.cat-expert-duration {
  font-size: 12px;
  color: var(--text-tertiary);
}

.cat-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s4);
}

.cat-about-toc {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-bottom: var(--s4);
}
.cat-toc-item {
  background: var(--bg-card);
  padding: var(--s2) var(--s4);
  border-radius: var(--r-full);
  font-size: 13px;
  color: var(--bio-cyan);
  cursor: pointer;
  transition: background 0.15s;
}
.cat-toc-item:hover {
  background: var(--bg-card-elevated);
}
.cat-about-section {
  background: var(--bg-card);
  border-radius: var(--r12);
  padding: var(--s5);
  margin-bottom: var(--s4);
}

.cat-recent-list {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

@media (max-width: 768px) {
  .cat-hero-title { font-size: 24px; }
  .cat-hero-icon { font-size: 36px; }
  .cat-session-grid { grid-template-columns: 1fr; }
  .cat-exercises-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-stats-row { grid-template-columns: 1fr; }
}

/* ==========================================
   CIRCULAR WORKOUT TIMER
   ========================================== */
.timer-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.timer-circle-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  margin-bottom: var(--s4);
}
.timer-circle {
  width: 100%;
  height: 100%;
}
.timer-track {
  stroke: rgba(76, 215, 246, 0.1);
}
.timer-progress {
  stroke: var(--bio-cyan);
  transition: stroke-dashoffset 0.5s ease;
}
.timer-progress.rest-phase {
  stroke: var(--sphere-gold);
}
.timer-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.timer-phase {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.timer-phase.work { color: var(--bio-cyan); }
.timer-phase.rest { color: var(--sphere-gold); }
.timer-time {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.timer-round {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.timer-controls-row {
  display: flex;
  gap: var(--s5);
  margin-bottom: var(--s4);
}
.timer-setting { text-align: center; }
.timer-setting label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}
.timer-adjust {
  display: flex;
  align-items: center;
  gap: var(--s1);
}
.timer-adjust button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg-card-elevated);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.timer-adjust button:hover { background: var(--bio-cyan-subtle); color: var(--bio-cyan); }
.timer-adjust span {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  min-width: 28px;
  text-align: center;
}
.timer-adjust small { font-size: 11px; color: var(--text-tertiary); margin-left: -2px; }
.timer-actions {
  display: flex;
  gap: var(--s3);
  margin-bottom: var(--s5);
}
.timer-btn-start {
  padding: var(--s3) var(--s8);
  border: none;
  border-radius: var(--r-full, 9999px);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  background: linear-gradient(135deg, var(--green), #059669);
  color: #fff;
  transition: box-shadow 0.2s;
}
.timer-btn-start:hover { box-shadow: 0 0 16px rgba(16, 185, 129, 0.3); }
.timer-btn-start.running {
  background: linear-gradient(135deg, var(--amber), #d97706);
  color: #1a1a1a;
}
.timer-btn-reset {
  padding: var(--s3) var(--s6);
  border: none;
  border-radius: var(--r-full, 9999px);
  background: linear-gradient(135deg, var(--bio-cyan), var(--bio-cyan-dim));
  color: #003640;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.timer-btn-reset:hover { box-shadow: 0 0 12px rgba(76, 215, 246, 0.2); }
.timer-exercises {
  width: 100%;
  margin-top: var(--s3);
}
.timer-save-row {
  display: flex;
  gap: var(--s2);
  margin-top: var(--s3);
}

/* Muscle Map + Timer side by side layout */
.health-map-timer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
  align-items: start;
}

/* Exercise Picker Dropdown */
.exercise-picker-wrap {
  position: relative;
  width: 100%;
  margin-top: var(--s2);
}
.exercise-picker-search {
  width: 100%;
  padding: var(--s2) var(--s3);
  border-radius: var(--r6);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13px;
}
.exercise-picker-search:focus {
  outline: none;
  border-color: var(--bio-cyan);
  box-shadow: 0 0 0 2px rgba(76, 215, 246, 0.15);
}
.exercise-picker-list {
  max-height: 200px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r8);
  margin-top: 4px;
}
.exercise-picker-item {
  padding: var(--s2) var(--s3);
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
}
.exercise-picker-item:last-child { border-bottom: none; }
.exercise-picker-item:hover {
  background: var(--bg-card-elevated);
}
.exercise-picker-item .ep-cat {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
}
.exercise-picker-create {
  padding: var(--s2) var(--s3);
  font-size: 13px;
  color: var(--bio-cyan);
  cursor: pointer;
  font-weight: 600;
  border-top: 1px solid var(--border);
}
.exercise-picker-create:hover {
  background: var(--bio-cyan-subtle);
}

/* ============================================
   GOALS
   ============================================ */
.goals-tabs {
  display: flex;
  gap: var(--s1);
  margin-bottom: var(--s4);
}
.goals-list {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.goal-card {
  background: var(--bg-card);
  border-radius: var(--r8);
  padding: var(--s4);
}
.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s2);
}
.goal-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}
.goal-pct {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
}
.goal-progress-bar {
  height: 6px;
  background: var(--bg-card-elevated);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: var(--s2);
}
.goal-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}
.goal-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-tertiary);
}

@media (max-width: 768px) {
  .health-map-timer-grid {
    grid-template-columns: 1fr;
  }
  .timer-circle-wrap {
    width: 180px;
    height: 180px;
  }
  .timer-time { font-size: 36px; }
}

/* ============================================
   WEATHER WIDGET
   ============================================ */
.weather-widget {
  margin-top: var(--s2);
}
.weather-current {
  display: flex;
  align-items: center;
  gap: var(--s3);
  cursor: pointer;
  padding: var(--s2) 0;
  flex-wrap: wrap;
}
.weather-icon {
  font-size: 24px;
}
.weather-temp {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}
.weather-desc {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}
.weather-detail {
  font-size: 12px;
  color: var(--text-tertiary);
}
.weather-forecast {
  display: flex;
  gap: var(--s3);
  margin-top: var(--s3);
  padding: var(--s3);
  background: var(--bg-card);
  border-radius: var(--r12);
  overflow-x: auto;
  flex-wrap: nowrap;
}
.weather-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 70px;
  padding: var(--s2);
}
.weather-day-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.weather-day-icon {
  font-size: 20px;
}
.weather-day-temps {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 600;
}
.weather-day-precip {
  font-size: 11px;
  color: var(--bio-cyan);
}
@media (max-width: 768px) {
  .weather-current { gap: var(--s2); }
  .weather-temp { font-size: 18px; }
  .weather-forecast { gap: var(--s2); }
  .weather-day { min-width: 60px; }
}

/* ==========================================
   FLEET ALERT BANNERS
   ========================================== */
.fleet-alert-banner {
  margin-bottom: 16px;
}

.fleet-alert {
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 10px;
}

.fleet-alert.critical {
  background: var(--red-bg);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.fleet-alert.warning {
  background: var(--amber-bg);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.fleet-alert.info {
  background: var(--bio-cyan-subtle);
  border: 1px solid rgba(76, 215, 246, 0.2);
}

.fleet-alert-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 14px;
}

.fleet-alert-header strong {
  color: var(--text-primary);
}

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

.fleet-alert-dot.critical-pulse {
  background: #ef4444;
  animation: alertPulse 1.5s infinite;
}

.fleet-alert-dot.warning-dot {
  background: #f59e0b;
}

.fleet-alert-dot.info-dot {
  background: var(--bio-cyan);
}

@keyframes alertPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.fleet-alert-item {
  padding: 8px 0 8px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fleet-alert-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.fleet-alert-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.fleet-alert-desc {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
}

.fleet-alert-actions {
  margin-top: 6px;
}

.fleet-alert-items.collapsed {
  display: none;
}

.btn-xs {
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 4px;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  transition: all 0.15s;
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--bio-cyan);
  border-color: var(--bio-cyan);
}

/* ============================================
   PROJECT MANAGEMENT V2
   ============================================ */

/* --- Progress Bar --- */
.project-progress-wrap { padding: 0 0 var(--s4); }
.project-progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--r-full);
  overflow: hidden;
}
.project-progress-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--bio-cyan-dim), var(--bio-cyan));
  transition: width 0.4s ease;
}
.project-progress-fill.complete {
  background: linear-gradient(90deg, var(--sphere-gold), #ffd280);
}
.project-progress-label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.project-progress-pct {
  font-weight: 700;
  color: var(--bio-cyan);
  font-size: 13px;
}
.project-progress-pct.complete { color: var(--sphere-gold); }

/* --- Milestone Timeline --- */
.milestone-section { margin: var(--s6) 0; }
.milestone-timeline {
  display: flex;
  align-items: flex-start;
  padding: var(--s5) var(--s3);
  position: relative;
  overflow-x: auto;
}
.milestone-track {
  position: absolute;
  top: 23px;
  left: var(--s3);
  right: var(--s3);
  height: 2px;
  background: rgba(255,255,255,0.08);
}
.milestone-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 90px;
  position: relative;
  z-index: 1;
  cursor: pointer;
}
.milestone-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  background: var(--bg-card);
  transition: all 0.2s;
}
.milestone-dot.completed {
  border-color: var(--sphere-gold);
  background: var(--sphere-gold);
}
.milestone-dot.next {
  border-color: var(--bio-cyan);
  box-shadow: 0 0 8px rgba(76, 215, 246, 0.3);
}
.milestone-label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 8px;
  text-align: center;
  max-width: 100px;
  line-height: 1.3;
}
.milestone-label.completed { color: var(--sphere-gold); }
.milestone-date {
  font-size: 10px;
  color: var(--text-tertiary);
  opacity: 0.6;
  margin-top: 2px;
}
.milestone-empty {
  text-align: center;
  padding: var(--s5);
  color: var(--text-tertiary);
  font-size: 13px;
}

/* --- Note Type Badges --- */
.note-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}
.note-type-badge.general { background: rgba(100,116,139,0.15); color: #94a3b8; }
.note-type-badge.decision { background: rgba(255,185,95,0.12); color: var(--sphere-gold); }
.note-type-badge.blocker { background: rgba(239,68,68,0.12); color: var(--red); }
.note-type-badge.update { background: rgba(76,215,246,0.1); color: var(--bio-cyan); }
.note-type-badge.meeting { background: rgba(139,92,246,0.12); color: #a78bfa; }
.note-type-badge.research { background: rgba(52,211,153,0.12); color: var(--green); }
.note-type-badge.question { background: rgba(245,158,11,0.12); color: var(--amber); }
.note-type-badge.idea { background: rgba(139,92,246,0.12); color: #c084fc; }
.note-type-badge.log { background: rgba(100,116,139,0.12); color: #94a3b8; }

/* --- Task Status Badges --- */
.task-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: var(--r-full);
  text-transform: capitalize;
}
.task-status-badge.todo { background: rgba(100,116,139,0.15); color: #94a3b8; }
.task-status-badge.in_progress { background: rgba(76,215,246,0.1); color: var(--bio-cyan); }
.task-status-badge.blocked { background: rgba(239,68,68,0.12); color: var(--red); }
.task-status-badge.done { background: rgba(255,185,95,0.12); color: var(--sphere-gold); }

/* --- Subtask Progress Indicator --- */
.subtask-progress {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-tertiary);
}
.subtask-progress-bar {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.subtask-progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  transition: width 0.3s;
}

/* --- Asset Grid --- */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--s3);
}
.asset-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r12);
  padding: var(--s4);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: border-color 0.15s;
  text-decoration: none;
  display: block;
}
.asset-card:hover { border-color: rgba(76,215,246,0.3); }
.asset-card-icon { font-size: 24px; margin-bottom: var(--s2); }
.asset-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--s1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asset-card-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: var(--s2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.asset-card-meta { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.source-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--r-full);
  font-size: 10px;
  font-weight: 600;
  background: rgba(76,215,246,0.1);
  color: var(--bio-cyan);
  text-transform: capitalize;
}
.type-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--r-full);
  font-size: 10px;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
  color: var(--text-tertiary);
  text-transform: capitalize;
}

/* --- Systems Registry --- */
.registry-area-section { margin-bottom: var(--s8); }
.registry-area-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--s3);
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.registry-area-count {
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
  color: var(--text-tertiary);
  padding: 1px 8px;
  border-radius: var(--r-full);
}
.registry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s4);
}
.registry-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r12);
  padding: var(--s5);
  cursor: pointer;
  transition: border-color 0.15s;
}
.registry-card:hover { border-color: rgba(255,185,95,0.3); }
.registry-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--s3);
}
.registry-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.system-promoted-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,185,95,0.12);
  color: var(--sphere-gold);
}
.registry-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--s3);
}
.registry-card-meta {
  font-size: 11px;
  color: var(--text-tertiary);
  display: flex;
  gap: var(--s4);
}

/* --- Project Detail V2 Tabs --- */
.project-tab-content { min-height: 200px; }
.project-section-v2 {
  background: var(--bg-card);
  border-radius: var(--r12);
  padding: var(--s5);
  margin-bottom: var(--s4);
}
.project-section-v2-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s4);
}
.project-section-v2-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- Task List V2 --- */
.task-list-v2 { display: flex; flex-direction: column; gap: 2px; }
.task-item-v2 {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-radius: var(--r8);
  transition: background 0.1s;
}
.task-item-v2:hover { background: rgba(255,255,255,0.03); }
.task-item-v2 input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--sphere-gold);
  cursor: pointer;
  flex-shrink: 0;
}
.task-item-v2-name {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}
.task-item-v2-name.done {
  text-decoration: line-through;
  color: var(--text-tertiary);
}
.task-item-v2-meta {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 12px;
  color: var(--text-tertiary);
}
.task-item-v2-due {
  font-size: 11px;
  color: var(--text-tertiary);
}
.task-item-v2-due.overdue { color: var(--red); }
.subtask-list {
  margin-left: 36px;
  border-left: 1px solid rgba(255,255,255,0.06);
  padding-left: var(--s3);
}
.task-expand-btn {
  width: 20px;
  height: 20px;
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.task-expand-btn.expanded { transform: rotate(90deg); }

/* --- Note Card V2 --- */
.note-list-v2 { display: flex; flex-direction: column; gap: var(--s3); }
.note-card-v2 {
  background: rgba(255,255,255,0.02);
  border-radius: var(--r8);
  padding: var(--s4);
  transition: background 0.1s;
}
.note-card-v2:hover { background: rgba(255,255,255,0.04); }
.note-card-v2-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s2);
}
.note-card-v2-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.note-card-v2-date {
  font-size: 11px;
  color: var(--text-tertiary);
}
.note-card-v2-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* --- Prompt Generator --- */
.prompt-output {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r8);
  padding: var(--s4);
  font-family: 'SF Mono', 'Cascadia Code', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
}

/* --- Archive Tab --- */
.archive-summary {
  background: var(--bg-card);
  border-radius: var(--r12);
  padding: var(--s6);
}
.archive-summary-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--s4);
}
.archive-promote-section {
  margin-top: var(--s6);
  padding-top: var(--s5);
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* --- Inline Add Forms --- */
.inline-add {
  display: flex;
  gap: var(--s2);
  margin-top: var(--s3);
}
.inline-add input, .inline-add select {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r6);
  padding: var(--s2) var(--s3);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font);
}
.inline-add input:focus, .inline-add select:focus {
  outline: none;
  border-color: var(--bio-cyan);
}
.inline-add input::placeholder { color: var(--text-tertiary); }

/* --- Empty State --- */
.empty-state-v2 {
  text-align: center;
  padding: var(--s8) var(--s4);
  color: var(--text-tertiary);
  font-size: 13px;
}
.empty-state-v2-icon {
  font-size: 32px;
  margin-bottom: var(--s3);
  opacity: 0.5;
}

/* --- Note Filter Pills --- */
.note-filter-pills {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
  margin-bottom: var(--s4);
}
.note-filter-pill {
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,0.04);
  color: var(--text-tertiary);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: capitalize;
}
.note-filter-pill:hover { background: rgba(255,255,255,0.08); }
.note-filter-pill.active {
  background: rgba(76,215,246,0.1);
  color: var(--bio-cyan);
  border-color: rgba(76,215,246,0.2);
}

/* --- Mobile --- */
@media (max-width: 768px) {
  .asset-grid { grid-template-columns: 1fr; }
  .registry-grid { grid-template-columns: 1fr; }
  .milestone-timeline { overflow-x: auto; }
  .milestone-node { min-width: 70px; }
}
