/* Tab Navigation */
.tab-navigation {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  padding-bottom: 0;
  border-bottom: 1px solid #e0e0e0;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.15s both;
  width: 100%;
  position: relative;
}

.tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem 0.75rem;
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 400;
  transition: all 0.2s ease;
  border-radius: 4px;
  position: relative;
  flex: 1;
  min-width: 0;
}

.tab-btn svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.tab-btn:hover {
  color: #666;
  background: rgba(0, 0, 0, 0.02);
}

.tab-btn.active {
  color: #1a1a1a;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.03);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c8b8a8, transparent);
  border-radius: 1px;
  z-index: 1;
}

/* Header */
.header {
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.header-btn {
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  font-size: 0.75rem;
  color: #999;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.header-btn:hover {
  color: #666;
  border-color: #ddd;
}

.header-btn:focus {
  outline: none;
  border-color: #999;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header h1 {
  font-size: 2rem;
  font-weight: 200;
  color: #1a1a1a;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.1;
  font-feature-settings: 'kern' 1, 'ss01' 1, 'ss02' 1;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  font-variant-ligatures: common-ligatures;
}

.author-hint {
  font-size: 0.7rem;
  font-weight: 300;
  color: #999;
  letter-spacing: 0.02em;
  margin-left: 0.5rem;
  opacity: 0.6;
  font-style: italic;
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  background-clip: initial;
  transition: opacity 0.3s ease;
  vertical-align: baseline;
  position: relative;
  top: 0.1rem;
  animation: fadeInAuthor 2.5s ease-out 1.5s both;
}

@keyframes fadeInAuthor {
  0% { opacity: 0; color: #999; }
  30% { opacity: 0.8; color: #666; }
  50% { opacity: 0.8; color: #666; }
  100% { opacity: 0.5; color: #999; }
}

.header:hover .author-hint {
  opacity: 0.7;
}

/* Controls */
.controls {
  margin-bottom: 2rem;
  text-align: left;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.25s both;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

/* Hide task and subtask IDs from display */
.task-badge.task-number,
.task-badge.subtask-number,
.subtask-id {
  display: none !important;
}

.view-menu-container {
  position: relative;
}

.view-menu-btn {
  background: transparent;
  color: #666;
  border: 1px solid #ddd;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  font-weight: 400;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-menu-icon {
  flex-shrink: 0;
}

.view-menu-btn:hover {
  background: #f8f9fa;
  color: #2a2a2a;
  border-color: #bbb;
}

.view-menu-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  min-width: 150px;
  padding: 0.5rem 0;
  overflow: hidden;
}

.view-menu-dropdown.mobile-modal {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  min-width: 80vw !important;
  max-width: 92vw !important;
  z-index: 100001 !important;
}

.view-menu-dropdown button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  border: none;
  background: transparent;
  color: #333;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
  border-radius: 0;
}

.view-menu-dropdown button .view-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.view-menu-dropdown button .view-icon svg {
  width: 100%;
  height: 100%;
}

.view-menu-dropdown button:hover {
  background: rgba(0, 0, 0, 0.05);
}

.view-menu-dropdown button:first-child {
  border-radius: 8px 8px 0 0;
}

.view-menu-dropdown button:last-child {
  border-radius: 0 0 8px 8px;
}

.view-menu-dropdown button:only-child {
  border-radius: 8px;
}

.view-menu-dropdown button.active {
  background: rgba(0, 0, 0, 0.08);
  font-weight: 500;
  position: relative;
}


.view-toggle-btn {
  background: transparent !important;
  color: #666;
  border: 1px solid #ddd !important;
  padding: 0.25rem 0.5rem !important;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-left: auto;
}

.view-toggle-btn:hover {
  background: #f8f9fa;
  color: #2a2a2a;
  border-color: #ddd;
  transform: translateY(-1px);
}

.view-toggle-icon {
  width: 40px;
  height: 40px;
  stroke-width: 1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-toggle-btn:hover .view-toggle-icon {
  transform: scale(1.1);
}

.view-toggle-btn:active .view-toggle-icon {
  transform: scale(0.95);
}

.plugin-controls {
  display: inline;
  margin-left: 1rem;
}

.plugin-controls .btn {
  background: transparent;
  color: #aaa;
  border: none;
  padding: 0.25rem 0.5rem;
  margin-right: 0.75rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  transition: color 0.15s;
  text-decoration: none;
}

.plugin-controls .btn:hover {
  color: #666;
}

.plugin-controls .btn.active {
  color: #2a2a2a;
}

/* Right Side Panel */
.right-panel-container {
  position: static;
  margin: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.right-panel-header {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 2px 4px;
}

.panel-btn {
  background: none;
  border: none;
  color: #666;
  font-size: 12px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.panel-btn:hover {
  color: #333;
}

.mobile-toggle-container {
  display: none;
}

.right-panel-toggle {
  background: none;
  border: none;
  color: #666;
  font-size: 12px;
  cursor: pointer;
  padding: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: all 0.2s;
}

.right-panel-toggle:hover {
  color: #333;
}

.right-panel-container.collapsed {
  min-width: auto;
  width: auto;
}

.right-panel-container.collapsed .backup-panel {
  display: none;
}

.right-panel-container.collapsed .right-panel-toggle {
  transform: rotate(90deg);
}

/* Panel separators */
.backup-panel::after {
  content: '';
  display: block;
  height: 1px;
  background: #e0e0e0;
  margin: 2px 8px;
  opacity: 0.6;
}

/* Backup Panel */
.backup-panel {
  font-family: monospace;
  font-size: 11px;
  color: #666;
  min-width: 120px;
}

.backup-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
}

.backup-panel-header h3 {
  margin: 0;
  font-size: 11px;
  font-weight: normal;
  color: #666;
}

.backup-panel-content {
  max-height: 150px;
  overflow-y: auto;
  padding: 2px 0;
}

.backup-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 8px;
  font-size: 10px;
  white-space: nowrap;
}

.backup-button {
  background: none;
  border: none;
  color: #28a745;
  font-size: 9px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.backup-button:hover {
  color: #218838;
}

.backup-button.recent {
  color: #28a745;
}

.backup-button.old {
  color: #f39c12;
}

.backup-button.very-old {
  color: #e74c3c;
}

.backup-time {
  color: #666;
  flex: 1;
  margin-right: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.download-button {
  background: none;
  border: none;
  color: #007bff;
  font-size: 9px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  margin-left: 4px;
}

.download-button:hover {
  color: #0056b3;
}

.main-add-button {
  background: #f5f7f9;
  color: #666;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0.45rem 0.75rem;
  height: 2rem;
  line-height: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.main-add-button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #28a745 50%, transparent 100%);
}

.main-add-button:hover {
  background: #eef2f5;
  color: #333;
  transform: translateY(-0.5px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Navigation */
.phases {
  padding: 1.25rem 0;
  position: relative;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.phases::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #e8e8e8 20%, #e8e8e8 80%, transparent 100%);
}


.phase-btn {
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(252, 252, 252, 0.6) 100%);
  color: #666;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0.4rem 1rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-block;
  border-radius: 8px;
  position: relative;
  backdrop-filter: blur(15px) saturate(1.2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-feature-settings: 'kern' 1, 'liga' 1, 'tnum' 1;
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.06),
    0 1px 3px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  min-height: 2.5rem;
  vertical-align: top;
}


.phase-btn.active {
  color: #1a1a1a;
  font-weight: 500;
  background: linear-gradient(135deg, rgba(245, 242, 238, 0.95) 0%, rgba(240, 237, 233, 0.85) 100%);
  border-color: rgba(200, 190, 180, 0.3);
  box-shadow: 0 3px 6px rgba(200, 190, 180, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
}

.phase-btn:focus {
  outline: none;
  border-color: rgba(200, 190, 180, 0.4);
  box-shadow: 0 0 0 2px rgba(200, 190, 180, 0.2), 0 2px 4px rgba(0, 0, 0, 0.05);
}

.phase-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c8b8a8, transparent);
  border-radius: 1px;
}

.phase-btn:hover {
  color: #1a1a1a;
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.1);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.filters {
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both;
}

.filter-btn {
  background: transparent;
  color: #aaa;
  border: none;
  padding: 0.05rem 0;
  margin-right: 1.25rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  transition: color 0.15s;
  text-decoration: none;
  display: inline;
}

.filter-btn.active {
  color: #666;
}

.filter-btn:hover {
  color: #666;
}

/* Todo Tree */
.todo-tree {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  font-family: inherit;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

/* Disable animations for calendar view container */
.todo-tree .calendar-view-container,
.todo-tree [data-sticky-primary="true"],
.todo-tree [data-sticky-secondary="true"] {
  animation: none !important;
  transform: none !important;
}

/* Stats */
.stats {
  margin-bottom: 2rem;
  color: #666;
  font-size: 0.9rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  line-height: 1.6;
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(252, 252, 252, 0.8) 50%, rgba(248, 248, 248, 0.7) 100%);
  backdrop-filter: blur(30px) saturate(1.3);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.06),
    0 1px 4px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.stats:hover {
  transform: translateY(-1px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.8) 50%, transparent 100%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

.stats-container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.stats-text {
  flex: 1;
}

.progress {
  color: #1a1a1a;
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  font-feature-settings: 'kern' 1, 'tnum' 1, 'ss01' 1;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.details {
  color: #888;
  font-size: 0.75rem;
  line-height: 1.4;
  font-style: normal;
  opacity: 0.8;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.pie-chart {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: conic-gradient(#27ae60 0deg, #f0f0f0 0deg);
  position: relative;
  flex-shrink: 0;
  opacity: 0.9;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(39, 174, 96, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.pie-chart:hover {
  transform: scale(1.08) rotate(8deg);
  box-shadow: 0 6px 12px rgba(39, 174, 96, 0.25), 0 3px 6px rgba(0, 0, 0, 0.12);
  animation: chart-bounce 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes chart-bounce {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.12) rotate(4deg); }
  100% { transform: scale(1.08) rotate(8deg); }
}

.pie-chart:hover {
  opacity: 1;
}

.pie-chart::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

