/* focus.css — Focus page specific styles */

/* Two-column layout */
.focus-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}

.timer-column {
  grid-row: 1;
  grid-column: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.task-column {
  grid-row: 1;
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sessions-row {
  grid-row: 2;
  grid-column: 1 / -1;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(20px);
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

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

.main-nav {
  display: flex;
  flex-direction: row;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255,255,255,0.05);
  text-decoration: none;
}

.nav-item.active {
  color: var(--accent);
  background: rgba(155, 135, 255, 0.15);
}

.session-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stat-divider {
  opacity: 0.4;
}

/* Shared pane styles */
.pane-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.task-pane, .laps-pane {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(20px);
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 20px;
  opacity: 0.6;
}


/* Custom Dropdown */
.custom-dropdown {
  position: relative;
  margin-bottom: 16px;
}

.dropdown-trigger {
  width: 100%;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s;
}

.dropdown-trigger:hover {
  border-color: var(--accent);
}

.dropdown-trigger:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(155, 135, 255, 0.2);
}

.dropdown-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-text.placeholder {
  color: var(--text-muted);
}

.dropdown-arrow {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: transform 0.2s;
}

.custom-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(12, 14, 22, 0.98);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  max-height: 280px;
  overflow-y: auto;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.15s;
  backdrop-filter: blur(20px);
}

.custom-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: rgba(155, 135, 255, 0.12);
}

.dropdown-item.selected {
  background: rgba(155, 135, 255, 0.18);
}

.dropdown-item .item-text {
  display: block;
  font-size: 0.9rem;
}

.dropdown-item .item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Task Notes */
.task-notes-section {
  display: none;
}

.task-notes-section.visible {
  display: block;
}

.notes-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.task-notes {
  width: 100%;
  min-height: 140px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.15s;
}

.task-notes::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.task-notes:focus {
  outline: none;
  border-color: var(--accent);
}

.notes-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
  min-height: 18px;
}

.notes-status.saved {
  color: var(--ok);
}


/* Mode Tabs */
.timer-mode-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: var(--radius-md);
}

.mode-tab {
  padding: 12px 28px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.mode-tab:hover {
  color: var(--text-main);
}

.mode-tab.active {
  background: var(--accent);
  color: white;
}

/* Timer Ring */
.timer-display {
  position: relative;
}

.timer-ring {
  position: relative;
  width: 340px;
  height: 340px;
}

.timer-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 6;
}

.ring-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 565.48;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.5s ease;
}

.timer-ring.break .ring-progress {
  stroke: var(--ok);
}

.timer-ring.running .ring-progress {
  filter: drop-shadow(0 0 6px var(--accent));
}

.timer-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

/* Interactive Timer */
.timer-editable {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.time-input {
  width: 88px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 4.25rem;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 0;
  letter-spacing: -0.02em;
}

.time-input:focus {
  outline: none;
}

.timer-ring.running .time-input {
  pointer-events: none;
}

.time-colon {
  font-size: 3.75rem;
  font-weight: 300;
  color: var(--text-main);
  margin: 0 -2px;
  padding-bottom: 6px;
}

/* Hover adjust buttons */
.time-adjust {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.time-up { top: -24px; }
.time-down { bottom: -24px; }

.time-unit:hover .time-adjust {
  opacity: 1;
}

.time-adjust:hover {
  color: var(--accent);
}

.timer-ring.running .time-adjust {
  display: none;
}

.timer-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 8px;
}

/* Timer Controls */
.timer-controls {
  display: flex;
  gap: 12px;
}

.btn-timer {
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-start {
  background: var(--accent);
  color: white;
}

.btn-start:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 16px rgba(107, 86, 196, 0.35);
}

.btn-pause {
  background: var(--warn);
  color: #1a1a1a;
}

.btn-pause:hover {
  filter: brightness(1.1);
}

.btn-reset, .btn-lap {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-reset:hover, .btn-lap:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Session dots */
.session-counter {
  display: flex;
  gap: 12px;
}

.session-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.3s;
}

.session-dot.completed {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.session-dot.current {
  background: var(--warn);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.8; }
}


/* Laps */
.laps-pane {
  max-height: 200px;
  overflow-y: auto;
}

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

.lap-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.lap-number {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.lap-time {
  font-variant-numeric: tabular-nums;
}

.lap-delta {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Sessions */
.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.session-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
}

.session-task {
  font-weight: 500;
  font-size: 0.9rem;
}

.session-time {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.session-duration {
  color: var(--accent);
  font-weight: 500;
}

/* Utility */
.hidden {
  display: none !important;
}

/* Scrollbars */
.laps-pane::-webkit-scrollbar,
.dropdown-menu::-webkit-scrollbar {
  width: 5px;
}

.laps-pane::-webkit-scrollbar-track,
.dropdown-menu::-webkit-scrollbar-track {
  background: transparent;
}

.laps-pane::-webkit-scrollbar-thumb,
.dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
  .focus-layout {
    grid-template-columns: 1fr;
  }
  
  .timer-column {
    grid-column: 1;
  }
  
  .task-column {
    grid-column: 1;
  }
  
  .sessions-row {
    grid-column: 1;
  }
  
  .timer-ring {
    width: 240px;
    height: 240px;
  }
  
  .time-input {
    font-size: 2.8rem;
    width: 56px;
  }
  
  .time-colon {
    font-size: 2.4rem;
  }
  
  .nav-label {
    display: none;
  }
  
  .nav-item {
    padding: 8px 10px;
  }
}


/* ─── Scroll Snap Two-Viewport ─────────────────────────────────── */

.snap-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.snap-section {
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}

#focus-view {
  padding: 0 24px 40px;
}

#tasks-view {
  background: linear-gradient(180deg, var(--bg-main) 0%, rgba(12, 14, 22, 1) 100%);
  padding: 40px 24px;
}

/* Scroll Hint */
.scroll-hint {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  z-index: 50;
}

.scroll-hint:hover {
  opacity: 1;
}

.scroll-arrow {
  font-size: 1.2rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Hide scroll hint when in task view */
#tasks-view:target ~ .scroll-hint,
.snap-container:has(#tasks-view:in-view) .scroll-hint {
  opacity: 0;
  pointer-events: none;
}


/* ─── Task Tree View ──────────────────────────────────────────── */

.tree-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.tree-header h2 {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-main);
}

.btn-add-task {
  padding: 10px 20px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-add-task:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(155, 135, 255, 0.3);
}

.task-tree {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Project Group */
.tree-project {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.tree-project-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.tree-project-header:hover {
  background: rgba(0, 0, 0, 0.3);
}

.tree-toggle {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.tree-project.collapsed .tree-toggle {
  transform: rotate(-90deg);
}

.tree-project-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tree-project-name {
  font-weight: 500;
  flex: 1;
}

.tree-project-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Task List */
.tree-tasks {
  display: flex;
  flex-direction: column;
}

.tree-project.collapsed .tree-tasks {
  display: none;
}

/* Task Item */
.tree-task {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px 14px 52px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.1s;
}

.tree-task:hover {
  background: rgba(255, 255, 255, 0.03);
}

.tree-task.completed {
  opacity: 0.5;
}

.tree-task.completed .tree-task-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Checkbox */
.tree-checkbox {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.tree-checkbox input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 1;
}

.tree-checkbox .checkmark {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-subtle);
  border-radius: 4px;
  transition: all 0.15s;
}

.tree-checkbox input:checked ~ .checkmark {
  background: var(--accent);
  border-color: var(--accent);
}

.tree-checkbox .checkmark::after {
  content: '';
  position: absolute;
  display: none;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.tree-checkbox input:checked ~ .checkmark::after {
  display: block;
}

/* Task Content */
.tree-task-content {
  flex: 1;
  min-width: 0;
}

.tree-task-title {
  font-size: 0.95rem;
  margin-bottom: 4px;
  word-wrap: break-word;
}

.tree-task-meta {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tree-task-meta .due {
  color: var(--warn);
}

.tree-task-meta .overdue {
  color: var(--bad);
}

/* Task Actions */
.tree-task-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}

.tree-task:hover .tree-task-actions {
  opacity: 1;
}

.tree-action-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.15s;
}

.tree-action-btn:hover {
  background: rgba(155, 135, 255, 0.2);
  color: var(--accent);
}

.tree-action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--bad);
}

/* Empty State */
.tree-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.tree-empty-icon {
  font-size: 3rem;
  opacity: 0.3;
  margin-bottom: 16px;
}

.tree-empty p {
  font-size: 0.95rem;
}


/* ─── Add/Edit Task Modal ─────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  margin: 20px;
  transform: translateY(20px);
  transition: transform 0.2s;
}

.modal-overlay.open .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 500;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
}

.btn-cancel {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

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

.btn-save {
  padding: 10px 24px;
  background: var(--accent);
  border: none;
  color: white;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-save:hover {
  filter: brightness(1.1);
}



/* ─── ENHANCED TREE VIEW (Hierarchical) ─────────────────────────── */

/* Tree Item Structure (replaces flat .tree-task) */
.tree-item {
  position: relative;
  display: flex;
  flex-direction: column;
}

.tree-row {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  margin: 1px 0;
  border-radius: var(--radius-sm);
  transition: background 0.1s;
  cursor: default;
  position: relative;
  z-index: 2;
  gap: 8px;
}

.tree-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.tree-row.completed .tree-text {
  text-decoration: line-through;
  opacity: 0.5;
}

/* Depth Lines & Indentation */
.tree-children {
  padding-left: 24px;
  position: relative;
}

.tree-item.collapsed > .tree-children {
  display: none;
}

/* Vertical guide line connecting parent to children */
.tree-children::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 12px;
  left: 11px;
  width: 1px;
  background: var(--border-subtle);
  opacity: 0.4;
}

/* Toggle Icon (chevron) */
.tree-item-toggle {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-muted);
  cursor: pointer;
  transition: transform 0.2s, color 0.15s;
  flex-shrink: 0;
}

.tree-item-toggle:hover {
  color: var(--accent);
}

.tree-item.collapsed > .tree-row .tree-item-toggle {
  transform: rotate(-90deg);
}

.tree-item-toggle.placeholder {
  visibility: hidden;
  pointer-events: none;
}

/* Tree Text */
.tree-text {
  flex: 1;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Tree Meta (due date, estimate, etc.) */
.tree-meta {
  display: flex;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.tree-meta .overdue {
  color: var(--bad);
}

.tree-meta .due-today {
  color: var(--warn);
}

/* Tree Row Actions */
.tree-row-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}

.tree-row:hover .tree-row-actions {
  opacity: 1;
}

/* Drag & Drop Visual Feedback */
.tree-item.dragging > .tree-row {
  opacity: 0.5;
  background: var(--bg-card);
}

.tree-row.drag-over {
  background: rgba(155, 135, 255, 0.15);
  outline: 1px dashed var(--accent);
  outline-offset: -1px;
}

.tree-row.drag-over-above::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.tree-row.drag-over-below::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Project Filter Bar */
.tree-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.tree-filter-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tree-filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.tree-filter-btn.active {
  background: rgba(155, 135, 255, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.tree-filter-btn .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Subtask Add Button */
.tree-add-subtask {
  padding: 4px 10px;
  font-size: 0.75rem;
  background: transparent;
  border: 1px dashed var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-left: 24px;
  margin-top: 4px;
  transition: all 0.15s;
  opacity: 0;
}

.tree-item:hover > .tree-add-subtask {
  opacity: 1;
}

.tree-add-subtask:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent);
  color: var(--accent);
}


/* Export Button */
.tree-header-actions {
  display: flex;
  gap: 10px;
}

.btn-export {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-export:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  border-color: var(--accent);
}
