/* DDay Planner - Custom Styles */

/* ========== BASE ========== */
:root {
  --accent: #3B82F6;
  --accent-light: #93C5FD;
  --sidebar-width: 16rem;
}

[data-accent="purple"] { --accent: #8B5CF6; --accent-light: #C4B5FD; }
[data-accent="green"] { --accent: #10B981; --accent-light: #6EE7B7; }
[data-accent="pink"] { --accent: #EC4899; --accent-light: #F9A8D4; }
[data-accent="amber"] { --accent: #F59E0B; --accent-light: #FCD34D; }

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
.dark ::-webkit-scrollbar-thumb { background: #475569; }

/* ========== SIDEBAR ========== */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6B7280;
  transition: all 0.2s;
  text-decoration: none;
}

.nav-item:hover {
  background: #F3F4F6;
  color: #374151;
}

.dark .nav-item {
  color: #9CA3AF;
}

.dark .nav-item:hover {
  background: #374151;
  color: #E5E7EB;
}

.nav-item.active {
  background: #EFF6FF;
  color: #2563EB;
}

.dark .nav-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
}

/* ========== FILTER BUTTONS ========== */
.filter-btn {
  padding: 0.375rem 0.875rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  background: transparent;
  color: #6B7280;
  transition: all 0.2s;
  border: 1px solid transparent;
  cursor: pointer;
}

.filter-btn:hover {
  background: #F3F4F6;
  color: #374151;
}

.dark .filter-btn:hover {
  background: #374151;
  color: #E5E7EB;
}

.filter-btn.active {
  background: #EFF6FF;
  color: #2563EB;
  border-color: #93C5FD;
}

.dark .filter-btn.active {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border-color: rgba(59, 130, 246, 0.3);
}

/* ========== CALENDAR VIEW BUTTONS ========== */
.cal-view-btn {
  padding: 0.375rem 1rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 500;
  background: transparent;
  color: #6B7280;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.cal-view-btn:hover {
  background: #F3F4F6;
}

.dark .cal-view-btn:hover {
  background: #374151;
}

.cal-view-btn.active {
  background: #8B5CF6;
  color: white;
}

.dark .cal-view-btn.active {
  background: #7C3AED;
}

/* ========== TRACKER TABS ========== */
.tracker-tab {
  padding: 0.5rem 1rem;
  border-radius: 0.75rem 0.75rem 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6B7280;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.tracker-tab:hover {
  color: #374151;
  background: #F9FAFB;
}

.dark .tracker-tab:hover {
  color: #E5E7EB;
  background: #1F2937;
}

.tracker-tab.active {
  color: #2563EB;
  border-bottom-color: #2563EB;
}

.dark .tracker-tab.active {
  color: #60A5FA;
  border-bottom-color: #60A5FA;
}

/* ========== TIMER MODE BUTTONS ========== */
.timer-mode-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: #F3F4F6;
  color: #6B7280;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.timer-mode-btn:hover {
  background: #E5E7EB;
}

.dark .timer-mode-btn {
  background: #374151;
  color: #9CA3AF;
}

.dark .timer-mode-btn:hover {
  background: #4B5563;
}

.timer-mode-btn.active {
  background: #8B5CF6;
  color: white;
}

.dark .timer-mode-btn.active {
  background: #7C3AED;
}

/* ========== TOGGLE SWITCH ========== */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #D1D5DB;
  transition: 0.3s;
  border-radius: 26px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #3B82F6;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.dark .slider {
  background-color: #4B5563;
}

.dark input:checked + .slider {
  background-color: #60A5FA;
}

/* ========== ANIMATIONS ========== */
@keyframes fillUp {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.fill-animation {
  animation: fillUp 0.3s ease-out;
  transform-origin: bottom;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1023px) {
  #sidebar {
    z-index: 40;
  }
  
  .section-content {
    padding: 1rem;
  }
}

/* ========== AUTH OVERLAY ========== */
#auth-overlay {
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#auth-overlay > div {
  animation: slideUp 0.3s ease-out;
}

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

/* ========== TASK ITEM ========== */
.task-item {
  transition: all 0.2s ease;
}

.task-item:hover {
  transform: translateX(2px);
}

/* ========== STAT CARDS ========== */
.stat-card {
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
}

/* ========== QUICK ACTIONS ========== */
.quick-action {
  transition: all 0.2s ease;
}

.quick-action:hover {
  transform: scale(1.02);
}

/* ========== PROFILE CARDS (Landing) ========== */
.profile-card {
  transition: all 0.3s ease;
}

.profile-card:hover {
  transform: translateY(-4px);
}

/* ========== CHART CONTAINERS ========== */
#productivity-chart,
#tasks-chart,
#mood-productivity-chart,
#focus-chart {
  max-height: 200px;
  width: 100% !important;
}
