:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #22263a;
  --border: #2e3348;
  --text: #e2e8f0;
  --muted: #7c85a2;
  --accent: #22c55e;
  --accent-dim: rgba(34,197,94,0.12);
  --green: #4ade80;
  --yellow: #fbbf24;
  --red: #f87171;
  --orange: #fb923c;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* NAV */
#nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
  min-height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-wrap: wrap;
}

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.nav-brand-name {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.5px;
  color: var(--accent);
}

.nav-brand-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.3px;
  transition: color 0.15s, background 0.15s;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: rgba(124,133,162,0.12);
}

/* MAIN */
#app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

/* PAGE HEADER */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
}

.page-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

/* CARDS */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.card-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

/* GRID LAYOUTS */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* WEATHER CARD */
.weather-card { display: flex; flex-direction: column; gap: 8px; }
.weather-main { display: flex; align-items: baseline; gap: 10px; margin-bottom: 2px; }
.weather-icon { font-size: 28px; line-height: 1; }
.weather-temp { font-size: 36px; font-weight: 700; color: var(--text); line-height: 1; }
.weather-condition { font-size: 13px; color: var(--muted); }
.weather-row {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text);
  padding-top: 8px; border-top: 1px solid var(--border);
}
.weather-meta {
  display: flex; gap: 16px;
  font-size: 11px; color: var(--muted);
}
.live-loading { font-size: 12px; color: var(--muted); padding: 6px 0; }
.live-unavail { font-size: 12px; color: var(--muted); padding: 6px 0; font-style: italic; }

/* NEWS CARD (WORTH KNOWING) */
.news-card { display: flex; flex-direction: column; }
.news-item {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-item:first-child { padding-top: 0; }
.news-headline { font-size: 13px; color: var(--text); line-height: 1.4; margin-bottom: 3px; }
.news-source {
  font-size: 10px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--accent);
}

/* STAT CARDS */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.4px;
}

/* TABLES */
.table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

thead th {
  background: var(--surface2);
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}

thead th:hover { color: var(--text); }

thead th .sort-arrow { margin-left: 4px; opacity: 0.4; }
thead th.sorted .sort-arrow { opacity: 1; color: var(--accent); }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }

tbody td {
  padding: 10px 14px;
  vertical-align: middle;
}

.td-title {
  font-weight: 500;
  max-width: 320px;
}

.td-id {
  color: var(--muted);
  font-size: 12px;
  font-family: monospace;
  white-space: nowrap;
}

/* BADGES */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-green  { background: rgba(74,222,128,0.15); color: var(--green); }
.badge-yellow { background: rgba(251,191,36,0.15); color: var(--yellow); }
.badge-red    { background: rgba(248,113,113,0.15); color: var(--red); }
.badge-orange { background: rgba(251,146,60,0.15); color: var(--orange); }
.badge-blue   { background: rgba(34,197,94,0.15);  color: var(--accent); }
.badge-gray   { background: rgba(124,133,162,0.15); color: var(--muted); }

/* PRIORITY DOTS */
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  flex-shrink: 0;
}

.dot-5 { background: var(--red); }
.dot-4 { background: var(--orange); }
.dot-3 { background: var(--yellow); }
.dot-2 { background: var(--green); }
.dot-1 { background: var(--muted); }

/* SCORE PILL */
.score {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.score-high   { border-color: var(--red);    color: var(--red); }
.score-med    { border-color: var(--yellow); color: var(--yellow); }
.score-low    { border-color: var(--green);  color: var(--green); }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

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

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0f1117;
  font-weight: 600;
}

.btn-primary:hover { background: #16a34a; border-color: #16a34a; }

.btn-danger {
  background: transparent;
  border-color: var(--red);
  color: var(--red);
}

.btn-danger:hover { background: rgba(248,113,113,0.1); }

.btn-sm { padding: 4px 10px; font-size: 12px; }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
  padding: 4px 8px;
  font-size: 12px;
}

.btn-ghost:hover { background: var(--accent-dim); border-color: var(--accent-dim); }

/* FILTERS */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 7px 12px;
  font-size: 13px;
  outline: none;
  min-width: 160px;
}

.filter-input:focus { border-color: var(--accent); }

select.filter-input option { background: var(--surface2); }

/* FORM */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.form-input, .form-select, .form-textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--font);
  outline: none;
}

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

.form-select option { background: var(--surface2); }
.form-textarea { min-height: 72px; resize: vertical; }

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* MODAL */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

#modal-overlay.hidden { display: none; }

#modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 580px;
  max-width: 96vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

#modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 15px;
}

#modal-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}

#modal-close:hover { background: var(--surface2); color: var(--text); }

#modal-body {
  padding: 20px;
  overflow-y: auto;
}

/* FOCUS VIEW */
.focus-date-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.focus-priorities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.priority-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  cursor: grab;
  transition: border-color 0.15s, opacity 0.15s;
  position: relative;
}

.priority-card:active { cursor: grabbing; }

.priority-card.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.priority-card.dragging-card { opacity: 0.4; }

/* FROG — #1 priority treatment */
.priority-card.frog-slot {
  border-color: rgba(34,197,94,0.35);
  background: rgba(34,197,94,0.05);
}

.priority-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.priority-num .drag-hint {
  font-size: 10px;
  color: var(--muted);
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.15s;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}

.priority-card:hover .drag-hint { opacity: 1; }

.priority-text {
  font-size: 14px;
  font-weight: 500;
  min-height: 36px;
  color: var(--text);
}

.priority-text.empty { color: var(--muted); font-style: italic; }

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

.meta-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}

.meta-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.meta-label.workout { color: var(--green); }
.meta-label.risk    { color: var(--red); }

.meta-text { font-size: 14px; font-weight: 500; }
.meta-text.empty { color: var(--muted); font-style: italic; }

/* DASHBOARD FOCUS CARD — drop zones */
.focus-slot-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  border-radius: 6px;
  transition: background 0.1s, border-color 0.1s;
  cursor: default;
}

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

.focus-slot-row.drop-zone-active {
  background: var(--accent-dim);
  border-color: var(--accent);
  border: 1px dashed var(--accent);
  border-radius: 6px;
}

.focus-slot-row.frog-row {
  background: rgba(34,197,94,0.04);
}

.focus-slot-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  width: 22px;
  padding-top: 2px;
  flex-shrink: 0;
}

.focus-slot-text {
  flex: 1;
  font-size: 14px;
}

.focus-slot-text.empty { color: var(--muted); font-style: italic; }

.focus-slot-hint {
  font-size: 11px;
  color: var(--muted);
  padding-top: 2px;
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.focus-slot-row:hover .focus-slot-hint { opacity: 1; }

.focus-slot-action {
  flex-shrink: 0;
  padding: 3px 8px;
  font-size: 12px;
}

.focus-picker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.focus-pick-btn {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.focus-pick-btn:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.focus-pick-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.focus-pick-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

/* DASHBOARD TOP TASKS */
.task-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.15s;
}

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

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

.task-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.task-row-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-row-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.task-row.dragging { opacity: 0.35; cursor: grabbing; }

.drag-handle {
  color: var(--muted);
  cursor: grab;
  font-size: 13px;
  padding-top: 2px;
  flex-shrink: 0;
  user-select: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.task-row:hover .drag-handle { opacity: 1; }

/* SUGGEST CHIPS */
.suggest-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--accent-dim);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.suggest-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--accent);
  text-transform: uppercase;
  white-space: nowrap;
}

.suggest-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.suggest-chip {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.15s, background 0.15s;
}

.suggest-chip:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

/* QUOTE BAR */
.quote-bar {
  padding: 12px 16px;
  margin-bottom: 20px;
  border-left: 2px solid var(--accent);
  background: rgba(34,197,94,0.04);
  border-radius: 0 6px 6px 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.quote-text {
  font-size: 13px;
  color: var(--text);
  font-style: italic;
  opacity: 0.8;
}

.quote-attr {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

/* CALENDAR PLACEHOLDER */
.cal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.cal-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.cal-notice-icon { font-size: 14px; }

.focus-blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.focus-block {
  border-radius: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
}

.focus-block.deep {
  border-color: rgba(34,197,94,0.25);
  background: rgba(34,197,94,0.04);
}

.focus-block.shallow {
  border-color: rgba(251,191,36,0.2);
  background: rgba(251,191,36,0.03);
}

.block-time {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--muted);
  margin-bottom: 4px;
}

.block-label {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.focus-block.deep .block-label { color: var(--accent); }
.focus-block.shallow .block-label { color: var(--yellow); }

.block-task {
  font-size: 12px;
  color: var(--text);
  opacity: 0.8;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.block-placeholder {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

/* STATUS TOGGLE */
.status-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 11px;
  padding: 2px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.status-btn:hover { border-color: var(--accent); color: var(--accent); }

/* SECTION SPACING */
.section { margin-bottom: 28px; }

/* EMPTY STATE */
.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px;
  font-size: 13px;
}

/* TOOLBAR */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* BUSINESS COLOR CODING */
.biz-mp  { color: #818cf8; }
.biz-ia  { color: #4ade80; }
.biz-ut  { color: #fb923c; }
.biz-fam { color: #f472b6; }
.biz-home { color: #94a3b8; }
.biz-sys  { color: #60a5fa; }

/* CHECKBOX STYLE */
.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.checkbox-wrap input[type=checkbox] {
  accent-color: var(--accent);
  width: 14px; height: 14px;
}

/* TOGGLE COMPLETED */
.done-row td { opacity: 0.45; }
.done-row .td-title { text-decoration: line-through; }

/* HISTORY TABLE */
.history-row {
  cursor: pointer;
}

.history-row:hover td { background: var(--surface2); }

/* SUGGEST ROW IN FOCUS MODAL */
.suggest-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--accent-dim);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.suggest-row-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent);
  text-transform: uppercase;
  margin-right: 4px;
}

/* FOCUS COMPLETION STATES */
.focus-slot-done {
  opacity: 0.6;
}

.done-text {
  text-decoration: line-through;
  color: var(--muted);
}

.focus-done-stamp {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  padding-top: 2px;
  flex-shrink: 0;
}

.focus-done-btn {
  flex-shrink: 0;
  padding: 3px 8px;
  font-size: 12px;
  color: var(--accent);
}

/* CALENDAR EVENT ROWS */
.cal-event-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  border-radius: 4px;
}

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

.cal-event-row.cal-event-past {
  opacity: 0.45;
}

.cal-event-time {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  min-width: 140px;
  flex-shrink: 0;
}

.cal-event-title {
  font-size: 13px;
  flex: 1;
}

/* TASK ROW DONE STATE (dashboard top tasks) */
.task-row-done {
  opacity: 0.55;
}

.task-row-done:hover {
  opacity: 0.75;
}

/* ═══════════════════════════════════════════════════════════════════════════
   WORKOUT TRACKER
   ═══════════════════════════════════════════════════════════════════════════ */

/* Next Workout Banner */
.wo-next-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  background: var(--accent-dim);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 8px;
  margin-bottom: 20px;
}

.wo-next-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.wo-next-type {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.wo-next-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-left: 8px;
}

.wo-next-arrow {
  font-size: 13px;
  color: var(--muted);
  margin: 0 4px;
}

/* Bubbles — base */
.wo-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
  position: relative;
  user-select: none;
  flex-shrink: 0;
}

.wo-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.18);
}

/* Size variants */
.wo-bubble-lg { width: 54px; height: 54px; }
.wo-bubble-md { width: 40px; height: 40px; }

/* State: future */
.wo-future {
  border: 2px solid var(--border);
  background: transparent;
  color: var(--muted);
}

/* State: today (unfilled) */
.wo-today-ring {
  border-color: rgba(34,197,94,0.5);
  color: var(--accent);
}

/* State: missed */
.wo-missed {
  background: rgba(124,133,162,0.12);
  border: 2px solid #3a3f52;
  color: var(--muted);
}

/* State: completed — color by workout type */
.wo-done-ct {
  background: rgba(34,197,94,0.15);
  border: 2px solid var(--accent);
  color: var(--accent);
}

.wo-done-bb {
  background: rgba(96,165,250,0.15);
  border: 2px solid #60a5fa;
  color: #60a5fa;
}

.wo-done-sh {
  background: rgba(251,146,60,0.15);
  border: 2px solid var(--orange);
  color: var(--orange);
}

/* Bubble inner text elements */
.wo-icon {
  font-size: 15px;
  line-height: 1;
}

.wo-icon-sm {
  font-size: 12px;
  line-height: 1;
}

.wo-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.4px;
  line-height: 1;
  margin-top: 2px;
}

.wo-tag-sm {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1;
  margin-top: 1px;
}

.wo-x {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: #4a5068;
}

.wo-x-sm {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #4a5068;
}

.wo-day-num {
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.wo-day-num-sm {
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

/* Weekly strip */
.wo-week-strip {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
}

.wo-week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.wo-week-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.wo-week-date {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.wo-week-label.wo-label-today { color: var(--accent); }

/* Next indicator on a day slot */
.wo-next-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 2px;
  animation: wo-pulse 2s ease-in-out infinite;
}

@keyframes wo-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}

/* Monthly grid */
.wo-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.wo-month-title {
  font-size: 14px;
  font-weight: 700;
}

.wo-month-nav {
  display: flex;
  gap: 6px;
}

.wo-month-nav-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--muted);
  padding: 3px 10px;
  cursor: pointer;
  font-size: 13px;
  transition: color 0.12s, background 0.12s;
}

.wo-month-nav-btn:hover { color: var(--text); background: var(--border); }

.wo-grid-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}

.wo-dow-label {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 0;
}

.wo-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.wo-month-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 52px;
}

.wo-month-date-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.wo-month-date-label.wo-label-today { color: var(--accent); }

.wo-empty-cell { min-height: 52px; }

/* Quick-pick popover (inside modal) */
.wo-picker-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.wo-picker-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.wo-pick-btn {
  padding: 12px 14px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.12s, background 0.12s;
  text-align: left;
}

.wo-pick-btn:hover { background: var(--border); }

.wo-pick-btn.wo-pick-ct:hover  { border-color: var(--accent);  background: rgba(34,197,94,0.1); color: var(--accent); }
.wo-pick-btn.wo-pick-bb:hover  { border-color: #60a5fa;         background: rgba(96,165,250,0.1); color: #60a5fa; }
.wo-pick-btn.wo-pick-sh:hover  { border-color: var(--orange);   background: rgba(251,146,60,0.1); color: var(--orange); }
.wo-pick-btn.wo-pick-miss:hover{ border-color: var(--muted);    background: rgba(124,133,162,0.1); color: var(--muted); }
.wo-pick-btn.wo-pick-clear     { grid-column: 1 / -1; justify-content: center; color: var(--muted); font-size: 12px; }
.wo-pick-btn.wo-pick-clear:hover { color: var(--red); border-color: var(--red); background: rgba(248,113,113,0.05); }

.wo-pick-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Workout type color swatches */
.wo-swatch-ct   { background: var(--accent); }
.wo-swatch-bb   { background: #60a5fa; }
.wo-swatch-sh   { background: var(--orange); }
.wo-swatch-miss { background: var(--muted); }

/* PRIORITY CARD DONE STATE */
.priority-done {
  opacity: 0.6;
  cursor: default;
}

.priority-done-stamp {
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
  margin-left: auto;
  white-space: nowrap;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}

.focus-done-card-btn {
  margin-top: 10px;
  width: 100%;
  justify-content: center;
  font-size: 12px;
}

/* MOBILE RESPONSIVE PASS */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  #nav {
    align-items: flex-start;
    padding: 10px 14px 12px;
    gap: 10px;
  }

  .nav-brand {
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .nav-brand-sub {
    font-size: 10px;
    letter-spacing: 0.9px;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    font-size: 13px;
    padding: 9px 12px;
    background: rgba(124,133,162,0.08);
    border: 1px solid transparent;
  }

  .nav-links a.active {
    border-color: rgba(34,197,94,0.28);
    background: rgba(34,197,94,0.12);
    color: var(--text);
  }

  #app {
    padding: 18px 14px 40px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
  }

  .page-title {
    font-size: 22px;
  }

  .page-subtitle {
    font-size: 13px;
  }

  .card,
  .stat-card,
  .cal-card {
    padding: 16px;
    border-radius: 10px;
  }

  .section {
    margin-bottom: 20px;
  }

  .grid-4,
  .grid-3,
  .grid-2,
  .focus-priorities,
  .focus-meta,
  .focus-blocks,
  .form-grid,
  .wo-picker-actions {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .filters,
  .form-actions,
  .focus-date-header {
    flex-direction: column;
    align-items: stretch;
  }

  .filters {
    gap: 8px;
  }

  .filter-input,
  .btn,
  .btn-sm,
  .btn-primary,
  .btn-danger,
  .btn-ghost {
    min-height: 42px;
  }

  .filter-input,
  .form-input,
  .form-select,
  .form-textarea {
    width: 100%;
    min-width: 0;
    font-size: 16px;
  }

  .form-actions {
    gap: 8px;
  }

  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .quote-bar {
    padding: 12px 14px;
    gap: 6px;
  }

  .quote-text,
  .quote-attr {
    white-space: normal;
  }

  .table-wrap {
    border: none;
    overflow: visible;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  tbody tr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 8px 10px;
  }

  tbody td {
    padding: 2px 0;
    border: none;
    font-size: 13px;
    line-height: 1.35;
  }

  tbody td .badge,
  tbody td .score,
  tbody td .btn {
    margin-top: 2px;
  }

  .td-title {
    max-width: none;
    white-space: normal;
    font-size: 14px;
    line-height: 1.3;
  }

  .td-id {
    font-size: 11px;
  }

  .task-row {
    gap: 10px;
  }

  .task-row-actions {
    flex-direction: column;
    align-items: stretch;
    width: 88px;
  }

  .task-row-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 34px;
  }

  .task-row-title,
  .block-task {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .focus-slot-row {
    padding: 12px 10px;
    gap: 8px;
  }

  .focus-slot-hint,
  .drag-handle,
  .priority-num .drag-hint {
    opacity: 1;
  }

  #modal {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: 88vh;
    border-radius: 12px;
  }

  #modal-header,
  #modal-body {
    padding-left: 14px;
    padding-right: 14px;
  }

  .wo-next-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 16px;
  }

  .wo-next-type {
    font-size: 16px;
    line-height: 1.35;
  }

  .wo-week-strip {
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .wo-week-strip::-webkit-scrollbar {
    display: none;
  }

  .wo-week-day {
    min-width: 58px;
  }

  .wo-bubble-lg {
    width: 58px;
    height: 58px;
  }

  .wo-bubble-md {
    width: 42px;
    height: 42px;
  }

  .wo-month-header {
    gap: 10px;
    flex-wrap: wrap;
  }

  .wo-month-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .wo-month-nav-btn {
    min-height: 38px;
    padding: 6px 12px;
  }

  .wo-grid-dow {
    gap: 2px;
  }

  .wo-month-grid {
    gap: 4px;
  }

  .wo-month-cell,
  .wo-empty-cell {
    min-height: 58px;
  }

  .wo-pick-btn {
    min-height: 48px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  #app {
    padding: 16px 12px 34px;
  }

  .page-title {
    font-size: 20px;
  }

  .stat-value {
    font-size: 28px;
  }

  .card,
  .stat-card,
  .cal-card {
    padding: 14px;
  }

  tbody tr {
    padding: 7px 9px;
    margin-bottom: 8px;
  }

  tbody td {
    padding: 1px 0;
    font-size: 12.5px;
  }

  .td-title {
    font-size: 13.5px;
  }

  .nav-brand-name {
    font-size: 16px;
  }

  .nav-links a {
    font-size: 12px;
    padding: 8px 10px;
  }

  .wo-bubble-lg {
    width: 54px;
    height: 54px;
  }

  .wo-bubble-md {
    width: 38px;
    height: 38px;
  }

  .wo-month-date-label {
    font-size: 8px;
  }

  .wo-day-num-sm {
    font-size: 10px;
  }
}

.mobile-task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-task-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.mobile-task-row-done {
  opacity: 0.66;
}

.mobile-task-main {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.mobile-task-topline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.mobile-task-id {
  font-size: 11px;
  color: var(--muted);
  font-family: monospace;
}

.mobile-task-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
}

.mobile-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}

.mobile-task-meta-item {
  min-width: 0;
}

.mobile-task-meta-sep {
  color: var(--border);
}

.mobile-task-bottomline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  font-size: 12px;
}

.mobile-task-priority {
  color: var(--muted);
}

.mobile-task-due {
  color: var(--muted);
  white-space: nowrap;
}

.mobile-task-due-overdue {
  color: var(--red);
  font-weight: 700;
}

.mobile-task-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.mobile-task-actions .btn {
  min-height: 36px;
  padding: 6px 10px;
  justify-content: center;
}

.mobile-task-list-empty {
  padding: 18px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}

.brief-card {
  border-color: rgba(34,197,94,0.2);
  background: linear-gradient(180deg, rgba(34,197,94,0.06), rgba(26,29,39,0.96));
}

.brief-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.brief-date {
  font-size: 12px;
  color: var(--muted);
}

.brief-sections {
  display: grid;
  gap: 10px;
}

.brief-section-line {
  padding: 10px 12px;
  border: 1px solid rgba(124,133,162,0.16);
  border-radius: 8px;
  background: rgba(15,17,23,0.28);
}

.brief-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.brief-section-text {
  font-size: 14px;
  line-height: 1.45;
}

.brief-bottom-line {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(124,133,162,0.16);
  font-size: 14px;
  font-weight: 600;
}

.briefs-archive {
  display: grid;
  gap: 16px;
}

.brief-card-compact .brief-section-line {
  padding: 9px 11px;
}

@media (max-width: 480px) {
  .mobile-task-row {
    padding: 9px 10px;
    gap: 8px;
  }

  .mobile-task-title {
    font-size: 13.5px;
  }

  .mobile-task-meta,
  .mobile-task-bottomline {
    font-size: 11.5px;
  }

  .mobile-task-bottomline {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .mobile-task-actions .btn {
    min-height: 34px;
    padding: 5px 9px;
  }
}

/* ─── PODCAST SYSTEM ─────────────────────────────────────────────────────── */

.badge-purple { background: rgba(167,139,250,0.15); color: #a78bfa; }

/* Dashboard podcast card */
.podcast-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

/* Generating spinner */
@keyframes podcast-spin { to { transform: rotate(360deg); } }

.podcast-spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: podcast-spin 0.7s linear infinite;
  flex-shrink: 0;
}
.podcast-spinner-sm {
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: podcast-spin 0.7s linear infinite;
  flex-shrink: 0;
}

.podcast-generating {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 4px;
}
.podcast-gen-text { font-size: 13px; color: var(--text); line-height: 1.6; }

.podcast-gen-banner {
  background: rgba(34,197,94,0.05);
  border-color: rgba(34,197,94,0.2);
  margin-bottom: 16px;
}
.podcast-gen-banner > div {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--text);
}

/* Episode display */
.podcast-ep-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.podcast-ep-title-lg {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 5px;
}

.podcast-ep-book {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.podcast-ep-summary {
  font-size: 13px;
  color: var(--text);
  line-height: 1.65;
}

.podcast-duration {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.podcast-ep-date {
  font-size: 12px;
  color: var(--muted);
}

/* Audio player */
.podcast-player-wrap { margin-top: 14px; }

.podcast-audio {
  width: 100%;
  height: 36px;
  border-radius: 6px;
  outline: none;
  accent-color: var(--accent);
}

.podcast-no-audio {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

/* Empty state */
.podcast-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 0 12px;
  text-align: center;
}
.podcast-empty-icon { font-size: 32px; }
.podcast-empty-text { color: var(--muted); font-size: 14px; }
.podcast-empty-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

/* Error state */
.podcast-error { padding: 12px 0; }

/* Library */
.podcast-library-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.podcast-ep-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.podcast-ep-card-header > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.podcast-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.podcast-tag {
  background: var(--surface2);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Book picker button */
.podcast-book-pick-btn {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  margin-bottom: 6px;
  transition: border-color 0.15s, background 0.15s;
}
.podcast-book-pick-btn:hover {
  border-color: var(--accent);
  background: rgba(34,197,94,0.05);
}
