/* ═══ App Layout ═════════════════════════════════════════════════════════════ */

.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.main-content {
  flex: 1;
  overflow: auto;
}

/* ═══ Header ═════════════════════════════════════════════════════════════════ */

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

.app-header-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.app-logo-icon {
  flex-shrink: 0;
  font-size: 18px;
  color: var(--primary-muted);
}

.app-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: var(--on-surface);
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── New Task Button (flat, no gradient) ──────────────────────────────────── */

.btn-new-task {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: var(--primary-muted);
  border: none;
  border-radius: var(--radius-lg);
  color: var(--on-primary-btn);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-new-task:hover  { background: var(--primary); color: var(--on-primary); }
.btn-new-task:active { transform: scale(0.97); }

.btn-new-task-plus {
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}

/* ── Header icon buttons ──────────────────────────────────────────────────── */

.header-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--outline-variant);
  background: none;
  color: var(--on-surface-muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.header-icon-btn:hover {
}

/* ── User menu ─────────────────────────────────────────────────────────────── */

.user-menu {
  position: relative;
}

.user-menu-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--outline-variant);
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, border-color 0.12s;
}

.user-menu-btn:hover {
  border-color: var(--primary);
  background: var(--secondary-container);
}

.user-menu-avatar {
  line-height: 1;
  letter-spacing: 0.5px;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--surface-container-high);
  border: 1px solid var(--outline-variant);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 4px 0;
  z-index: 200;
}

.user-menu-profile {
  padding: 12px 14px;
}

.user-menu-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface);
}

.user-menu-email {
  font-size: 12px;
  color: var(--on-surface-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-divider {
  height: 1px;
  background: var(--outline-variant);
  margin: 4px 0;
}

.user-menu-item {
  display: block;
  width: 100%;
  padding: 8px 14px;
  background: none;
  border: none;
  color: var(--on-surface-variant);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s;
}

.user-menu-item:hover {
  background: var(--surface-container-highest);
}

.user-menu-item--danger {
  color: var(--priority-high);
}

/* ═══ Sidebar ════════════════════════════════════════════════════════════════ */

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface-container-lowest);
  padding: 12px 8px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.sidebar-divider {
  border: none;
  border-top: 1px solid var(--outline-variant);
  margin: 8px 14px;
  opacity: 0.35;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--on-surface-muted);
  padding: 8px 10px 6px;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--on-surface-variant);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}
.sidebar-item:hover {
  background: var(--surface-container-low);
  color: var(--on-surface);
}
.sidebar-item--active {
  background: var(--surface-container);
  color: var(--on-surface);
  font-weight: 500;
}

/* ── Outline caret toggle ──────────────────────────────────────────────────── */

.sidebar-item-caret {
  margin-left: auto;
  font-size: 14px;
  line-height: 1;
  color: var(--on-surface-muted);
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.12s;
}
.sidebar-item:hover .sidebar-item-caret { opacity: 1; }

/* ── Project sublist ──────────────────────────────────────────────────────── */

.sidebar-sublist {
  list-style: none;
  margin: 0;
  padding: 2px 0 2px 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-subitem {
  display: block;
  width: 100%;
  padding: 5px 10px 5px 38px;
  border-radius: var(--radius-md);
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--on-surface-muted);
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.12s, color 0.12s;
}
.sidebar-subitem:hover {
  background: var(--surface-container-low);
  color: var(--on-surface);
}
.sidebar-subitem--active {
  color: var(--on-surface);
  font-weight: 500;
}

/* ── Item icon ─────────────────────────────────────────────────────────────── */

.sidebar-item-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
}
.sidebar-item--active .sidebar-item-icon { opacity: 1; }

/* ═══ List View ══════════════════════════════════════════════════════════════ */

.list-view {
  padding: 28px 28px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 640px;
  height: 100%;
  overflow-y: auto;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.list-count {
  font-size: 12px;
  color: var(--on-surface-muted);
}

.list-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.list-empty {
  padding: 16px 0;
  color: var(--on-surface-muted);
  font-size: 14px;
}

/* ═══ Tree View ══════════════════════════════════════════════════════════════ */

.tree-view {
  padding: 28px 28px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  overflow-y: auto;
}

/* ── View Heading ─────────────────────────────────────────────────────────── */

.tree-view-heading {
  margin-bottom: 2px;
  flex-shrink: 0;
}

.tree-heading-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--on-surface);
  letter-spacing: -0.5px;
  line-height: 1;
}

.tree-heading-wind {
  font-size: 0.5em;
  color: var(--primary-muted);
  margin-left: 4px;
  vertical-align: middle;
}

.tree-heading-bar {
  width: 32px;
  height: 2px;
  background: var(--primary-muted);
  border-radius: 2px;
  margin-top: 8px;
}

/* ── Breadcrumbs (zoomed) ─────────────────────────────────────────────────── */

.tree-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  flex-shrink: 0;
}

.tree-back-btn {
  background: none;
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
  color: var(--on-surface-muted);
  font-size: 15px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.tree-back-btn:hover {
  background: var(--surface-container);
  color: var(--on-surface);
  border-color: var(--on-surface-muted);
}

.tree-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.tree-crumb {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--on-surface-muted);
  cursor: pointer;
  padding: 2px 5px;
  border-radius: var(--radius-md);
  transition: background 0.12s, color 0.12s;
}
.tree-crumb:hover { color: var(--on-surface); background: var(--surface-container); }
.tree-crumb--active { color: var(--on-surface); font-weight: 600; cursor: default; }
.tree-crumb--active:hover { background: none; }
.tree-crumb-sep { color: var(--on-surface-muted); font-size: 12px; opacity: 0.4; }

/* ── Toolbar (hint + filter) ──────────────────────────────────────────────── */

.tree-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  margin-bottom: 4px;
}

.tree-hint-wrapper {
  position: relative;
  flex-shrink: 0;
}

.tree-hint-btn {
  font-size: 11px;
  color: var(--on-surface-muted);
  opacity: 0.5;
  background: none;
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: opacity 0.12s, color 0.12s;
}

.tree-hint-btn:hover {
  opacity: 1;
  color: var(--on-surface);
}

.tree-hint-tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--surface-container-highest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-shadow: var(--shadow-md);
  z-index: 50;
  white-space: nowrap;
  min-width: 200px;
}

.tree-hint-wrapper:hover .tree-hint-tooltip,
.tree-hint-wrapper:focus-within .tree-hint-tooltip {
  display: block;
}

.tree-hint-tooltip-row {
  font-size: 12px;
  color: var(--on-surface-variant);
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tree-hint-tooltip-row kbd {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  background: var(--surface-container);
  border: 1px solid var(--outline-variant);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--on-surface);
  line-height: 1.4;
}

.tree-filter-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
  color: var(--on-surface-muted);
  font-family: var(--font-body);
  font-size: 11px;
  padding: 3px 10px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.tree-filter-btn:hover {
  background: var(--surface-container);
  color: var(--on-surface);
}
.tree-filter-btn--active {
  background: color-mix(in srgb, var(--priority-low) 15%, transparent);
  border-color: var(--priority-low);
  color: var(--priority-low);
}
.tree-filter-btn--active:hover {
  background: color-mix(in srgb, var(--priority-low) 25%, transparent);
}
.tree-filter-btn i {
  font-size: 9px;
}

/* ── Tree Nodes ───────────────────────────────────────────────────────────── */

.tree-nodes { display: flex; flex-direction: column; gap: 4px; }
.tree-node  { display: flex; flex-direction: column; }

/* ── Task Rows (all depths) ───────────────────────────────────────────────── */

.tree-node-outer {
  display: flex;
  align-items: center;
  gap: 2px;
}

.tree-node-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  flex: 1;
  min-width: 0;
  padding-right: 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  min-height: 32px;
  transition: background 0.1s;
}
.tree-node-row:hover { background: var(--surface-container-low); }
.tree-node-row--selected { background: var(--surface-container); }
.tree-nodes--creating .tree-node-row:hover { background: none; }
.tree-nodes--creating .tree-node-row--selected { background: none; }
.tree-nodes--creating .tree-node-row:hover .tree-collapse-btn { opacity: 0.6; }
.tree-nodes--creating .tree-node-row:hover .tree-check { width: 0; opacity: 0; }
.tree-node-row--drop-into {
  background: color-mix(in srgb, var(--primary-muted) 15%, transparent);
  outline: 2px dashed var(--primary-muted);
  outline-offset: -2px;
}
.tree-node-row--drop-above { box-shadow: 0 -2px 0 0 var(--primary-muted); }
.tree-node-row--drop-below { box-shadow: 0 2px 0 0 var(--primary-muted); }
.tree-node-row--inline-create { background: color-mix(in srgb, var(--primary-muted) 5%, transparent); }

/* Inline input */
.tree-inline-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font: inherit;
  font-size: 13px;
  color: var(--on-surface);
  min-width: 0;
}

/* Collapse arrow (left side, before checkbox) */
.tree-collapse-spacer {
  width: 16px;
  flex-shrink: 0;
}

.tree-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: left;
  width: 16px;
  background: none;
  border: none;
  font-size: 14px;
  color: var(--on-surface-muted);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.1s, color 0.1s;
}
.tree-node-row:hover .tree-collapse-btn { opacity: 1; }
.tree-collapse-btn:hover { color: var(--primary); }

/* ── Hover checkbox ──────────────────────────────────────────────────────── */

.tree-check {
  width: 0;
  opacity: 0;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--on-surface-muted);
  cursor: pointer;
  transition: width 0.15s ease, opacity 0.15s ease;
}
.tree-node-row:hover .tree-check {
  width: 16px;
  opacity: 0.5;
}
.tree-node-row:hover .tree-check:hover {
  opacity: 1;
  color: var(--primary);
}

/* Done state — persistent green check, replaces the circle */
.tree-check--done {
  width: 16px;
  opacity: 1;
  color: var(--priority-low);
}
.tree-check--done:hover {
  color: var(--on-surface-muted);
}

/* Done row — muted + strikethrough */
.tree-node-row--done .tree-node-title-text {
  text-decoration: line-through;
  text-decoration-color: var(--on-surface-muted);
  opacity: 0.45;
}

/* Fade-out animation for recently completed items — applied to .tree-node wrapper */
.tree-node--fading {
  animation: fadeOutDone 1.5s ease forwards;
  overflow: hidden;
}
@keyframes fadeOutDone {
  0%   { opacity: 1; max-height: 60px; margin-bottom: 0; }
  60%  { opacity: 0; max-height: 60px; margin-bottom: 0; }
  100% { opacity: 0; max-height: 0; margin-bottom: -4px; }
}

/* Project gantt icon */
.tree-project-icon {
  font-size: 13px;
  color: var(--secondary);
  flex-shrink: 0;
  cursor: pointer;
  width: 16px;
  text-align: center;
}
.tree-project-icon.priority-high   { color: var(--priority-high); }
.tree-project-icon.priority-medium { color: var(--priority-medium); }
.tree-project-icon.priority-low    { color: var(--priority-low); }

/* Note sticky icon */
.tree-note-icon {
  font-size: 13px;
  color: var(--on-surface-muted);
  flex-shrink: 0;
  cursor: pointer;
  width: 16px;
  text-align: center;
}
.tree-note-icon.priority-high   { color: var(--priority-high); }
.tree-note-icon.priority-medium { color: var(--priority-medium); }
.tree-note-icon.priority-low    { color: var(--priority-low); }

/* Radio circle icon — double ring matching the reference design */
.tree-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--secondary);
  flex-shrink: 0;
  position: relative;
  box-sizing: border-box;
  cursor: pointer;
}
.tree-radio::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--secondary) 50%, transparent);
}
.tree-radio.priority-high   { border-color: var(--priority-high); }
.tree-radio.priority-high::after { border-color: color-mix(in srgb, var(--priority-high) 50%, transparent); }
.tree-radio.priority-medium { border-color: var(--priority-medium); }
.tree-radio.priority-medium::after { border-color: color-mix(in srgb, var(--priority-medium) 50%, transparent); }
.tree-radio.priority-low    { border-color: var(--priority-low); }
.tree-radio.priority-low::after { border-color: color-mix(in srgb, var(--priority-low) 50%, transparent); }

/* Compat for inline create row */
.tree-node-status { font-size: 12px; flex-shrink: 0; color: var(--on-surface-muted); }
.tree-node-status.priority-high   { color: var(--priority-high); }
.tree-node-status.priority-medium { color: var(--priority-medium); }
.tree-node-status.priority-low    { color: var(--priority-low); }

.tree-node-title {
  flex: 1;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
  pointer-events: none;
}
.tree-node-title-text {
  pointer-events: auto;
  cursor: pointer;
}
.tree-node-title-text:hover {
  text-decoration: underline;
  text-decoration-color: var(--outline-variant);
  text-underline-offset: 2px;
}


/* ── Notes outline (expanded below selected row) ─────────────────────────── */

.notes-outline {
  padding: 2px 0 10px;
}

.notes-outline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  font-size: 12.5px;
  color: var(--on-surface-variant);
  line-height: 1.5;
}

.notes-outline-bullet {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--outline-variant);
  flex-shrink: 0;
}

/* Nested bullets get smaller and more transparent */
.notes-outline-node .notes-outline-node .notes-outline-bullet {
  width: 4px;
  height: 4px;
  background: color-mix(in srgb, var(--outline-variant) 60%, transparent);
}

.notes-outline-node .notes-outline-node .notes-outline-node .notes-outline-bullet {
  width: 3px;
  height: 3px;
  background: color-mix(in srgb, var(--outline-variant) 40%, transparent);
}

.notes-outline-text {
  min-width: 0;
}

.notes-outline-text strong { color: var(--on-surface); font-weight: 600; }
.notes-outline-text em { color: var(--secondary); font-style: italic; }
.notes-outline-text del { color: var(--on-surface-muted); }

/* ── Tree date chips ──────────────────────────────────────────────────────── */

.tree-node-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
  padding-left: 8px;
}

.tree-node-chips {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tree-row-actions {
  display: flex;
  align-items: center;
  gap: 1px;
  opacity: 0;
  transition: opacity 0.12s;
}
.tree-node-row:hover .tree-row-actions,
.tree-node-row--selected .tree-row-actions {
  opacity: 1;
}

.tree-row-action {
  background: none;
  border: none;
  color: var(--on-surface-muted);
  font-size: 10px;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.1s, color 0.1s;
}
.tree-row-action:hover {
  background: var(--surface-container-high);
  color: var(--on-surface);
}

.tree-alerts-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 10px;
  color: var(--on-surface-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.1s;
}

.tree-alerts-btn--off {
  opacity: 0.5;
}

.tree-node-row:hover .tree-alerts-btn {
  opacity: 0.5;
}

.tree-alerts-btn:hover {
  opacity: 1 !important;
  color: var(--on-surface);
}

.tree-tag-pill {
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  color: var(--on-surface-muted);
  background: var(--surface-container-high);
}
.tree-tag-pill--clickable {
  cursor: pointer;
}
.tree-tag-pill--clickable:hover {
  background: var(--surface-container-highest);
  color: var(--on-surface);
}

.tree-tag-pill--overflow {
  background: none;
  color: var(--on-surface-muted);
  padding-left: 2px;
  opacity: 0.6;
}

.tree-toolbar-buttons {
  display: flex;
  gap: 6px;
}

.tree-date-chip {
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}

/* Scheduled: gray until the date arrives, then green (now actionable) */
.tree-date-chip--scheduled {
  color: var(--on-surface-muted);
  background: var(--surface-container-high);
}
.tree-date-chip--scheduled.tree-date-chip--today {
  color: var(--priority-low);
  background: color-mix(in srgb, var(--priority-low) 12%, transparent);
}

/* Due: gray (future) → orange (today) → red (overdue) */
.tree-date-chip--due {
  color: var(--on-surface-muted);
  background: var(--surface-container-high);
}
.tree-date-chip--due.tree-date-chip--today {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary-muted) 12%, transparent);
}
.tree-date-chip--due.tree-date-chip--overdue {
  color: var(--priority-high);
  background: color-mix(in srgb, var(--priority-high) 12%, transparent);
}

/* ═══ Weekly View ════════════════════════════════════════════════════════════ */

.weekly-view {
  padding: 28px 28px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 680px;
  height: 100%;
  overflow-y: auto;
}

.weekly-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 4px;
}

.weekly-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.weekly-nav-btn {
  background: var(--surface-container);
  border: none;
  border-radius: var(--radius-md);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  color: var(--on-surface-variant);
  line-height: 1;
  transition: background 0.12s, color 0.12s;
}
.weekly-nav-btn:hover:not(:disabled) {
  background: var(--surface-container-high);
  color: var(--on-surface);
}
.weekly-nav-btn:disabled { opacity: 0.3; cursor: default; }

.weekly-range {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}

.weekly-range-dates {
  font-weight: 400;
  color: var(--on-surface-muted);
  font-size: 12px;
}

.weekly-day {
  border-radius: var(--radius-lg);
  background: var(--surface-container-low);
  overflow: hidden;
}

.weekly-day--today {
  background: var(--surface-container);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary-muted) 35%, transparent);
}

.weekly-day-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}

.weekly-day--today .weekly-day-header {
  background: color-mix(in srgb, var(--primary-muted) 6%, transparent);
}

.weekly-day-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--on-surface-variant);
  min-width: 72px;
}
.weekly-day--today .weekly-day-name { color: var(--primary); }

.weekly-day-date {
  font-size: 12px;
  color: var(--on-surface-muted);
}

.weekly-day-count {
  margin-left: auto;
  background: var(--primary-muted);
  color: var(--on-primary);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 0 7px;
  min-width: 20px;
  text-align: center;
}

.weekly-day-cards {
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.weekly-day-empty {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--on-surface-muted);
  opacity: 0.35;
}

.weekly-day--drag-over {
  outline: 2px dashed var(--primary-muted);
  outline-offset: -2px;
  background: color-mix(in srgb, var(--primary-muted) 6%, var(--surface-container-low));
}

/* ═══ Sidebar Mode Badges ════════════════════════════════════════════════════ */

.sidebar-modes {
  display: flex;
  gap: 6px;
  padding: 8px 12px 12px;
  margin-top: auto;
}

.sidebar-mode-badge {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--surface-container-high);
  color: var(--on-surface-muted);
}

.sidebar-mode-badge[data-mode="firestore"] {
  background: color-mix(in srgb, #f9a825 15%, var(--surface-container-high));
  color: #f9a825;
}

.sidebar-mode-badge[data-mode="firebase"] {
  background: color-mix(in srgb, #66bb6a 15%, var(--surface-container-high));
  color: #66bb6a;
}
