.v2-dashboard,
.v2-daily-review,
.v2-date-detail { color: var(--text-primary, #f2f1f7); }
.v2-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.v2-eyebrow { color: var(--text-muted, #8d8999); font-size: 12px; margin: 0 0 6px; }
.v2-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.v2-metric, .v2-panel { border: 1px solid var(--border, #2b2933); background: var(--surface, #17161c); border-radius: 8px; }
.v2-metric { min-height: 92px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; }
.v2-metric span, .v2-muted { color: var(--text-muted, #8d8999); font-size: 13px; }
.v2-metric strong { color: var(--accent-yellow, #f4c95d); font-size: 24px; }
.v2-panel { padding: 16px; margin-bottom: 12px; }
.v2-panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.v2-panel-heading h3 { margin: 0; font-size: 15px; }
.v2-progress-track { height: 8px; background: #292731; border-radius: 99px; overflow: hidden; margin-top: 14px; }
.v2-progress-track span { display: block; height: 100%; background: var(--accent-yellow, #f4c95d); }
.v2-trend-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.v2-focus-bars { display: grid; height: 96px; grid-template-columns: repeat(var(--trend-days, 30), minmax(0, 1fr)); gap: 3px; align-items: end; margin-top: 14px; }
.v2-trend-day, .v2-focus-bars span { display: block; min-width: 0; aspect-ratio: 1; border-radius: 4px; background: #3a3744; }
.v2-trend-day { height: 6px; aspect-ratio: auto; border-radius: 3px; }
.v2-focus-bars span { height: 96px; align-self: end; aspect-ratio: auto; background: linear-gradient(to top, var(--accent-purple, #8e63d5) var(--focus), #302d38 var(--focus)); }
.v2-line-chart { display: block; width: 100%; height: 140px; margin-top: 12px; }
.v2-line-chart polyline { fill: none; stroke: var(--accent-yellow, #f4c95d); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.v2-year-heatmap, .v2-month-heatmap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; }
.v2-year-heatmap-panel .v2-year-heatmap { width: 50%; margin-inline: auto; }
.v2-mobile-heatmap-panel { display: none; }
.v2-year-heatmap button, .v2-month-heatmap button { border: 0; min-width: 0; aspect-ratio: 1; border-radius: 2px; background: #302d38; }
.v2-trend-day.heat-2, .v2-year-heatmap .heat-2, .v2-month-heatmap .heat-2 { background: #574b37; }
.v2-trend-day.heat-3, .v2-year-heatmap .heat-3, .v2-month-heatmap .heat-3 { background: #8f7535; }
.v2-trend-day.heat-4, .v2-year-heatmap .heat-4, .v2-month-heatmap .heat-4 { background: #c39a3b; }
.v2-trend-day.heat-5, .v2-year-heatmap .heat-5, .v2-month-heatmap .heat-5 { background: var(--accent-yellow, #f4c95d); }
.v2-review-metrics, .v2-detail-summary { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; margin-bottom: 16px; }
.v2-review-metrics strong, .v2-detail-summary strong { color: var(--accent-yellow, #f4c95d); font-size: 20px; }
.v2-review-metrics span, .v2-detail-summary span { color: var(--text-muted, #8d8999); font-size: 12px; }
.v2-review-field { display: block; margin-top: 14px; }
.v2-review-field span { display: block; color: var(--text-muted, #8d8999); font-size: 13px; margin-bottom: 6px; }
.v2-review-field textarea { width: 100%; min-height: 72px; resize: vertical; box-sizing: border-box; }
.v2-daily-review-incomplete { margin-top: 28px; }
.v2-date-detail { padding: 18px; background: var(--surface, #17161c); border-left: 1px solid var(--border, #2b2933); }
.v2-date-detail header { display: flex; align-items: center; justify-content: space-between; }
.v2-date-detail header button { color: inherit; background: transparent; border: 0; font-size: 22px; cursor: pointer; }
.v2-date-detail ul { padding-left: 18px; }
.v2-date-detail section + section { margin-top: 28px; }
.v2-calendar-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; color: var(--text-muted, #8d8999); font-size: 12px; text-align: center; }
.v2-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.v2-calendar-day { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; width: 100%; min-width: 0; min-height: 76px; padding: 9px; border: 1px solid var(--border, #2b2933); border-radius: 7px; background: #211f28; color: var(--text-primary, #f2f1f7); text-align: left; cursor: pointer; }
.v2-calendar-day:hover, .v2-calendar-day:focus-visible { border-color: var(--accent-purple, #8e63d5); outline: none; }
.v2-calendar-day span { font-size: 14px; font-weight: 600; }
.v2-calendar-day small { color: var(--text-muted, #8d8999); font-size: 11px; font-variant-numeric: tabular-nums; }
.v2-calendar-day.outside { opacity: .45; }
.v2-calendar-day.heat-2 { background: #574b37; }
.v2-calendar-day.heat-3 { background: #8f7535; }
.v2-calendar-day.heat-4 { background: #c39a3b; color: #17161c; }
.v2-calendar-day.heat-5 { background: var(--accent-yellow, #f4c95d); color: #17161c; }
.v2-calendar-controls, .v2-detail-focus-entry, .v2-comparison { display: flex; align-items: center; gap: 8px; }
.v2-calendar-controls button, .v2-detail-focus-entry button { min-height: 36px; border: 1px solid var(--border, #2b2933); border-radius: 6px; background: #211f28; color: var(--text-primary, #f2f1f7); cursor: pointer; }
.v2-calendar-controls button { min-width: 38px; padding: 6px 10px; }
.v2-calendar-controls svg { width: 18px; height: 18px; }
.v2-comparison { flex-wrap: wrap; padding: 12px 14px; margin-bottom: 12px; border-left: 3px solid var(--accent-purple, #8e63d5); background: #1d1b23; }
.v2-comparison strong { color: var(--accent-yellow, #f4c95d); }
.v2-comparison span { color: var(--text-muted, #8d8999); font-size: 13px; }
.v2-detail-focus-entry label { display: flex; align-items: center; gap: 6px; color: var(--text-muted, #8d8999); font-size: 12px; }
.v2-detail-focus-entry input { width: 72px; min-height: 36px; box-sizing: border-box; }
.v2-focus-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.v2-focus-phase { color: var(--accent-yellow, #f4c95d); font-size: 13px; }
.v2-focus-actions { display: flex; flex-wrap: wrap; margin-top: 32px; gap: 36px; }
.v2-mini-timer { position: fixed; right: 24px; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: stretch; width: min(440px, calc(100vw - 48px)); min-height: 58px; border: 1px solid var(--accent-purple, #8e63d5); border-radius: 8px; background: #18161e; box-shadow: 0 12px 36px rgba(0, 0, 0, .38); overflow: hidden; }
.v2-mini-timer[hidden] { display: none; }
.v2-mini-main { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 9px; flex: 1; min-width: 0; padding: 10px 12px; border: 0; background: transparent; color: var(--text-primary, #f2f1f7); text-align: left; cursor: pointer; }
.v2-mini-main svg { width: 18px; color: var(--accent-purple, #8e63d5); }
.v2-mini-main span { color: var(--accent-yellow, #f4c95d); font-size: 12px; }
.v2-mini-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.v2-mini-main time { font-variant-numeric: tabular-nums; }
.v2-mini-timer > .icon-button { align-self: center; margin-right: 8px; }
.v2-timer-active .workspace { padding-bottom: 96px; }
.v2-dashboard-task-list { display: grid; gap: 6px; margin-top: 14px; }
.v2-dashboard-task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 42px; border-top: 1px solid var(--border, #2b2933); }
.v2-dashboard-task button, .v2-dashboard-knowledge-line, .v2-dashboard-focus button { min-height: 34px; border: 1px solid var(--border, #2b2933); border-radius: 6px; background: #211f28; color: var(--text-primary, #f2f1f7); cursor: pointer; }
.v2-dashboard-task button { padding: 5px 9px; }
.v2-dashboard-task button[aria-pressed="true"] { border-color: var(--accent-yellow, #f4c95d); color: var(--accent-yellow, #f4c95d); }
.v2-dashboard-task strong { overflow-wrap: anywhere; font-size: 14px; }
.v2-dashboard-focus { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-color: var(--accent-purple, #8e63d5); }
.v2-dashboard-focus div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.v2-dashboard-focus span { color: var(--accent-yellow, #f4c95d); font-size: 12px; }
.v2-dashboard-focus strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-dashboard-focus button { padding: 7px 11px; flex: 0 0 auto; }
.v2-dashboard-knowledge { display: grid; gap: 6px; margin-top: 12px; }
.v2-dashboard-knowledge-line { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 10px; text-align: left; }
.v2-dashboard-knowledge-line span { color: var(--text-muted, #8d8999); font-size: 12px; }
.v2-dashboard-knowledge-line strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) {
  .v2-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-year-heatmap-panel { display: none; }
  .v2-mobile-heatmap-panel { display: block; }
  .v2-month-heatmap { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
  .v2-section-heading { align-items: flex-start; flex-wrap: wrap; }
  .v2-range-control { width: 100%; }
  .v2-range-control button { flex: 1; }
  .v2-focus-bars { gap: 1px; }
  .v2-mini-timer { right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
  .v2-mini-main { grid-template-columns: auto auto minmax(0, 1fr) auto; padding: 9px 10px; }
  .v2-focus-settings { grid-template-columns: 1fr 1fr; }
  .v2-dashboard-task { grid-template-columns: auto minmax(0, 1fr) auto; }
  .v2-calendar-grid, .v2-calendar-weekdays { gap: 4px; }
  .v2-calendar-day { min-height: 62px; padding: 7px 6px; }
}

/* Task lifecycle controls stay compact while keeping the title flexible. */
.task-type-panel { min-width: 0; }
.task-active-list, .task-inactive-list { display: grid; gap: 7px; min-width: 0; }
.task-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  padding: 8px 4px;
  border-top: 1px solid var(--border, #2b2933);
}
.task-row:first-child { border-top: 0; }
.task-row[data-task-active="false"] { opacity: .7; }
.task-check.completed { border-color: var(--accent-yellow, #f4c95d); background: var(--accent-yellow, #f4c95d); color: #17161c; }
.task-content { min-width: 0; }
.task-content h3, .task-content p { overflow-wrap: anywhere; word-break: break-word; }
.task-content h3 { margin: 0; font-size: 14px; line-height: 1.4; }
.task-content p { margin: 4px 0 0; color: var(--text-muted, #8d8999); font-size: 12px; line-height: 1.45; }
.task-actions { position: relative; display: flex; align-items: center; justify-content: flex-end; min-width: 40px; }
.task-actions .icon-button { width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; }
.task-menu-trigger { color: var(--text-muted, #8d8999); }
.task-action-menu {
  position: absolute;
  z-index: 3;
  top: calc(100% + 4px);
  right: 0;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border, #2b2933);
  border-radius: 6px;
  background: var(--surface, #17161c);
  box-shadow: 0 10px 24px rgb(0 0 0 / 32%);
}
.task-action-menu[hidden] { display: none; }
.task-action-menu button:disabled { cursor: not-allowed; opacity: .35; }
.task-delete-button { color: #f28b82; }
.task-inactive { margin-top: 10px; border-top: 1px solid var(--border, #2b2933); }
.task-inactive summary { padding: 11px 2px 7px; color: var(--text-muted, #8d8999); cursor: pointer; font-size: 12px; list-style-position: inside; }
.task-inactive-list { padding-top: 2px; }
.task-form-error { margin: 12px 0 0; color: #f28b82; font-size: 12px; line-height: 1.5; }
.sidebar { overflow: hidden; }

@media (max-width: 720px) {
  .sidebar { transition: none; }
  .nav-list { gap: 2px; overflow-y: auto; padding-block: 4px; }
  .brand-row { min-height: 64px; padding: 10px 14px; }
  .nav-item { min-height: 30px; }
  .nav-label { margin: 6px 8px 2px; }
  .sidebar-footer { padding: 6px 10px 8px; }
  body.sidebar-open .v2-mini-timer { z-index: 15; }
  .task-row { grid-template-columns: 28px minmax(0, 1fr) 40px; gap: 8px; padding-inline: 0; }
  .task-action-menu { right: 0; max-width: calc(100vw - 48px); flex-wrap: wrap; justify-content: flex-end; }
  .task-action-menu .icon-button { flex: 0 0 36px; }
}
