/* ===== Extodo PWA - Professional Redesign ===== */

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Dark Mode (Default) */
  --bg-deep: #0f172a;
  --bg-surface: #1e293b;
  --bg-glass: rgba(30, 41, 59, 0.7);
  --bg-glass-heavy: rgba(15, 23, 42, 0.85);
  
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-light: rgba(99, 102, 241, 0.15);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  
  /* Spacing & Radii */
  --sidebar-width: 260px;
  --header-height: 70px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  /* Shadows & Glass */
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --glass-blur: blur(12px);
}

body.light-mode {
  --bg-deep: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.7);
  --bg-glass-heavy: rgba(241, 245, 249, 0.85);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --border: rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --accent-light: rgba(99, 102, 241, 0.08);
}


html, body {
  height: 100%;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== Scrollbar ===== */
.scrollable::-webkit-scrollbar {
  width: 6px;
}
.scrollable::-webkit-scrollbar-track {
  background: transparent;
}
.scrollable::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}
.scrollable::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== Auth Screen ===== */
.auth-screen {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top left, #1e1b4b, var(--bg-deep));
  z-index: 1000;
  padding: 20px;
}

.auth-screen.visible {
  display: flex;
}

.auth-card {
  background: var(--bg-glass);
  backdrop-filter: var(--glass-blur);
  padding: 40px;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  text-align: center;
  animation: floatIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-logo {
  font-size: 56px;
  margin-bottom: 20px;
}

.auth-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 32px;
}

.btn-google-signin {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  background: white;
  color: #1e293b;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-google-signin:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.auth-footer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== Main App Layout ===== */
.main-app {
  display: none;
  height: 100vh;
  width: 100vw;
}

.main-app.visible {
  display: flex;
}

/* Sidebar (Desktop) */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-glass-heavy);
  backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px;
  z-index: 100;
}

.sidebar-header {
  margin-bottom: 40px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 12px;
}

.sidebar-sub-list {
  display: none;
  flex-direction: column;
  gap: 2px;
  margin: -4px 0 10px 0;
  padding-left: 44px;
  max-height: 300px;
  overflow-y: auto;
}

.sidebar-sub-list.visible {
  display: flex !important;
}


.sidebar-cat-item {
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  margin-right: 8px;
}

.sidebar-cat-item:hover {
  background: var(--bg-deep);
  color: var(--text-primary);
}

.sidebar-cat-item.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
}

.sidebar-cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}


.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
}

.nav-item:hover {
  background: var(--accent-light);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-icon {
  font-size: 18px;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
}

.link-signout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  padding: 0;
  transition: color 0.2s;
}

.link-signout:hover {
  color: var(--danger);
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.task-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.task-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-left: -2px;
  padding: 0;
}


.meta-item {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-item.priority-high { color: #ef4444 !important; }
.meta-item.priority-medium { color: #f59e0b !important; }
.meta-item.priority-low { color: #10b981 !important; }


/* Subtask Progress */
.subtask-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.subtask-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-deep);
  border-radius: 3px;
  overflow: hidden;
  max-width: 120px;
}

.subtask-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.subtask-progress-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.sync-dot.synced { background: var(--success); }
.sync-dot.syncing { background: var(--warning); animation: pulse 1s infinite; }
.sync-dot.disconnected { background: var(--text-muted); }

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

/* Main Content Area */
.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at bottom right, #1e293b55, transparent);
  min-width: 0;
  height: 100vh;
}

.content-header {
  height: var(--header-height);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.date-display {
  display: flex;
  flex-direction: column;
}

.solar-date {
  font-size: 16px;
  font-weight: 600;
}

.lunar-date {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}

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

.task-count-pill {
  background: var(--bg-surface);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-icon, .btn-delete, .btn-priority, .btn-subtask-toggle, .subtask-delete {

  background: var(--bg-surface);
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  flex-shrink: 0;
}

.btn-icon:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.btn-delete:hover {
  color: var(--danger) !important;
  border-color: var(--danger) !important;
  background: rgba(239, 68, 68, 0.08) !important;
  transform: translateY(-2px);
}

.btn-priority:hover, .btn-subtask-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}



/* Tab Container */
.tab-container {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}


.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
  display: block;
}

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

.content-section {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}


/* Inputs */
.add-task-form, .add-note-form, .add-event-form {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.add-note-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.note-textarea {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.2s;
}

.note-textarea:focus {
  border-color: var(--accent);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}


.input-group {
  display: flex;
  gap: 12px;
}

.main-input {
  flex: 1;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.main-input:focus {
  border-color: var(--accent);
}

.btn-primary-add {
  min-width: 48px;
  height: 48px;
  padding: 0 20px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}


.btn-primary-add:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.add-task-options {
  display: none;
  margin-top: 16px;
  animation: slideDown 0.3s ease-out;
}

.sub-input-trigger {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  min-height: 40px;
}

.sub-input-trigger:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.sub-input-trigger.compact {
  width: auto;
  min-width: 120px;
  padding: 6px 12px;
  font-size: 13px;
  min-height: 32px;
}



.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.option-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.option-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sub-input, .sub-input-sm {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.recurring-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-time-row {
  display: flex;
  gap: 8px;
}

/* List Controls */
.list-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.filter-group {
  display: flex;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.filter-btn {
  padding: 6px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn.active {
  background: var(--bg-deep);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.category-pill-select {
  background: var(--accent-light);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

/* Task List */
.task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 8px;
}

/* Task Card View */
.task-list.view-card {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.task-list.view-card .task-item {
  height: 100%;
}



.task-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s;
}

.task-item:hover {
  border-color: var(--accent);
  transform: translateX(4px);
  background: var(--accent-light);
}


.task-main-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.task-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.task-checkbox:checked {
  background: var(--accent);
}

.task-checkbox:checked::after {
  content: "✓";
  color: white;
  font-weight: 800;
  font-size: 14px;
}

.task-text {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
}

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

.task-actions {
  display: flex;
  gap: 4px;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-left: 36px;
}

.meta-item {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
}

.cat-badge {
  padding: 2px 10px;
  border-radius: 20px;
  color: white !important;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}


/* Subtasks */
.subtask-section {
  margin-left: 36px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.subtask-section-collapsed {
  display: none;
}

.subtask-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.subtask-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.subtask-text {
  font-size: 13px;
  flex: 1;
}

.subtask-text.completed {
  text-decoration: line-through;
  opacity: 0.6;
}

.subtask-add-form {
  display: flex;
  gap: 8px;
}

.subtask-input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}


.subtask-add-btn {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--accent);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}


/* Notes Grid */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Note List View */
.notes-grid.view-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notes-grid.view-list .note-card {
  min-height: auto;
  padding: 16px 24px;
}

.notes-grid.view-list .note-excerpt {
  -webkit-line-clamp: 2;
}


.note-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
  position: relative;
  min-height: 180px;
}

.note-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.note-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  padding-right: 60px;
  line-height: 1.3;
}

.note-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.note-actions {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s;
}

.note-card:hover .note-actions {
  opacity: 1;
}

.note-card-date {
  margin-top: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


/* Events Grid */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.event-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.event-countdown {
  display: flex;
  gap: 8px;
  justify-content: center;
  background: var(--bg-deep);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 45px;
}

.countdown-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.countdown-label {
  font-size: 9px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
}

/* Modal Redesign */
.modal-overlay {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-overlay.visible { display: flex; }

.modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

.modal-header h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.setting-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.setting-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.setting-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.setting-action {
  display: flex;
  align-items: center;
  gap: 12px;
}

.setting-divider {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: -16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

/* Category Manager Refined */
.category-manager {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bg-deep);
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.category-list-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.category-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.category-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

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

.cat-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: color 0.2s;
}

.cat-delete-btn:hover {
  color: var(--danger);
}

.category-add-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
}

.category-add-row .sub-input {
  flex: 1;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  background: var(--bg-deep);
}


/* Mobile Adjustments */
.mobile-tab-nav {
  display: none;
  background: var(--bg-glass-heavy);
  backdrop-filter: var(--glass-blur);
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  height: 64px;
  border-radius: 32px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  z-index: 500;
  padding: 8px;
  gap: 8px;
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  
  .mobile-tab-nav {
    display: flex;
  }
  
  .content-header {
    padding: 0 20px;
  }
  
  .tab-container {
    padding: 20px;
    padding-bottom: 100px;
  }
  
  .options-grid {
    grid-template-columns: 1fr;
  }
  
  .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .header-left::before {
    content: "📋";
    font-size: 24px;
  }
}

/* Empty State */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state.visible {
  display: flex;
}


.empty-illustration {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.btn-add-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.btn-add-circle:hover {
  background: var(--accent-hover);
  transform: scale(1.1);
}


/* Install Banner */
.install-banner {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--bg-surface);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: calc(100% - 40px);
  max-width: 600px;
}

.install-banner.visible {
  transform: translateX(-50%) translateY(0);
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.banner-icon { font-size: 32px; }

.banner-text {
  display: flex;
  flex-direction: column;
}

.banner-text strong { font-size: 15px; }
.banner-text span { font-size: 13px; color: var(--text-muted); }

.banner-actions {
  display: flex;
  gap: 12px;
}

/* Utils */
.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-text-danger {
  background: transparent;
  border: none;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.btn-text-danger:hover { opacity: 1; }

.number-input, .sub-input {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
}

.number-input:focus, .sub-input:focus {
  border-color: var(--accent);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.number-input {
  width: 70px;
  text-align: center;
}

/* Priority Popup */
.priority-popup {
  background: var(--bg-glass-heavy);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 260px;
  z-index: 3000;
  overflow: hidden;
  animation: fadeIn 0.2s ease;
}

.priority-popup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 1px solid var(--border);
}

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

.priority-popup-item:hover {
  background: var(--bg-deep);
}

.priority-popup-item.selected {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
}

.priority-popup-icon {
  font-size: 20px;
}

.priority-popup-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.priority-popup-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}

.priority-popup-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.priority-popup-check {
  color: var(--accent);
  font-weight: 800;
}

.clickable-cat {
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.clickable-cat:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.category-popup .priority-popup-item .cat-color-dot {
  width: 12px;
  height: 12px;
}

/* Label Styles */
.label-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.label-pill {
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.label-pill:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.label-pill.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.label-manager {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.label-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Label Popup */
.label-popup {
  width: 220px;
}

.label-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.label-item:hover {
  background: var(--bg-deep);
}

.label-item.selected {
  background: var(--accent-light);
}

.label-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* Labels in Task List */
.label-badge {
  padding: 2px 10px;
  border-radius: 12px;
  color: white !important;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}

.btn-edit-labels {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-edit-labels:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.btn-edit-labels.no-labels {
  opacity: 0.6;
}

.btn-edit-labels.no-labels:hover {
  opacity: 1;
}

.label-check {
  margin-left: auto;
  color: var(--accent);
  font-weight: 800;
}


.label-filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 4px 0;
}

.label-filter-group .filter-btn {
  padding: 4px 12px;
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-deep);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  font-weight: 600;
}

.label-filter-group .filter-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

.label-filter-group .filter-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.list-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-group-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.btn-add-label-tag {
  background: var(--bg-deep);
  border: 1px dashed var(--border);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-label-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}


/* Subtask Popup */
.subtask-popup {

  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  width: 300px;
  z-index: 3000;
  animation: fadeIn 0.2s ease;
}

.subtask-popup .subtask-add-form {
  display: flex;
  gap: 8px;
}

.subtask-popup .subtask-input {
  flex: 1;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.subtask-popup .subtask-input:focus {
  border-color: var(--accent);
}

.subtask-popup .subtask-add-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}