/* 
  TaskPulse - Modern Dashboard Stylesheet
  Strict compliance: Vanilla CSS only, NO Tailwind, NO CSS Variables (--* / var(--*))
*/

/* Reset & Box Sizing */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: #f3f5f9;
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Typography Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* App Layout Grid */
.app-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
  width: 100%;
}

/* ==========================================================================
   SIDEBAR NAVIGATION
   ========================================================================== */
.sidebar {
  background-color: #ffffff;
  border-right: 1px solid #e2e8f0;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.brand-text h2 {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.brand-badge {
  font-size: 10px;
  font-weight: 700;
  background-color: #e0e7ff;
  color: #4338ca;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
  margin-top: 2px;
}

/* Sidebar Nav Lists */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.nav-item:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.nav-item.active {
  background-color: #e0e7ff;
  color: #4338ca;
  font-weight: 600;
}

.nav-counter {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background-color: #f1f5f9;
  color: #64748b;
}

.nav-item.active .nav-counter {
  background-color: #c7d2fe;
  color: #3730a3;
}

.nav-counter.count-today {
  background-color: #fef3c7;
  color: #d97706;
}

/* Category Colors */
.category-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Priority Dots */
.priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.priority-high-dot { background-color: #ef4444; }
.priority-medium-dot { background-color: #f59e0b; }
.priority-low-dot { background-color: #10b981; }

/* Sidebar Footer */
.sidebar-footer {
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.storage-info {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  border-radius: 10px;
}

.storage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.status-online-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.storage-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.data-actions {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   BUTTONS & FORM CONTROLS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #e0e7ff;
  color: #4338ca;
}

.btn-secondary:hover {
  background-color: #c7d2fe;
}

.btn-outline {
  background-color: transparent;
  border-color: #cbd5e1;
  color: #475569;
}

.btn-outline:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.btn-ghost {
  background-color: transparent;
  color: #64748b;
}

.btn-ghost:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  background-color: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

.icon-btn-sm {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background-color: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-btn-sm:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.main-content {
  display: flex;
  flex-direction: column;
  padding: 24px 32px;
  gap: 24px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* Header Top Bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 20px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  position: sticky;
  top: 16px;
  z-index: 40;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #f1f5f9;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 8px 14px;
  width: 360px;
  transition: all 0.15s ease;
}

.search-box:focus-within {
  background-color: #ffffff;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: #0f172a;
  width: 100%;
}

.search-icon { color: #94a3b8; flex-shrink: 0; }

.search-shortcut {
  font-size: 11px;
  font-weight: 600;
  background-color: #ffffff;
  color: #64748b;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* View Switcher Radio Tabs */
.view-switcher {
  display: flex;
  background-color: #f1f5f9;
  padding: 3px;
  border-radius: 10px;
  gap: 2px;
}

.view-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-btn.active {
  background-color: #ffffff;
  color: #4f46e5;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Sun/Moon Theme Icons */
.sun-icon { display: block; }
.moon-icon { display: none; }

body.dark-mode .sun-icon { display: none; }
body.dark-mode .moon-icon { display: block; }

/* ==========================================================================
   ANALYTICS BANNER & STAT CARDS
   ========================================================================== */
.dashboard-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
  border-radius: 20px;
  padding: 28px 32px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 0 10px 30px rgba(49, 46, 129, 0.25);
  position: relative;
  overflow: hidden;
}

.dashboard-banner::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.banner-welcome h1 {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.banner-welcome p {
  font-size: 14px;
  color: #c7d2fe;
}

.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  background-color: rgba(255, 255, 255, 0.12);
}

.stat-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-blue { background-color: rgba(99, 102, 241, 0.25); color: #818cf8; }
.stat-green { background-color: rgba(16, 185, 129, 0.25); color: #34d399; }
.stat-amber { background-color: rgba(245, 158, 11, 0.25); color: #fbbf24; }
.stat-coral { background-color: rgba(239, 68, 68, 0.25); color: #f87171; }

.stat-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: #a5b4fc;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
}

.stat-progress-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #34d399 0%, #10b981 100%);
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   TOOLBAR SECTION
   ========================================================================== */
.toolbar-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.view-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.view-subtitle {
  font-size: 13px;
  color: #64748b;
}

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

.sort-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
}

.custom-select {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.custom-select:focus {
  border-color: #6366f1;
}

/* ==========================================================================
   TASK VIEWS CONTAINER & KANBAN BOARD
   ========================================================================== */
.views-wrapper {
  position: relative;
  min-height: 400px;
}

.task-view-container {
  display: none;
}

.task-view-container.active-view {
  display: block;
}

/* KANBAN LAYOUT */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}

.kanban-column {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.column-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.column-title h3 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.indicator-todo { background-color: #6366f1; }
.indicator-in-progress { background-color: #f59e0b; }
.indicator-completed { background-color: #10b981; }

.column-count {
  font-size: 12px;
  font-weight: 700;
  background-color: #f1f5f9;
  color: #64748b;
  padding: 2px 8px;
  border-radius: 12px;
}

.quick-add-col-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  background-color: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.quick-add-col-btn:hover {
  background-color: #e0e7ff;
  color: #4338ca;
}

.kanban-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 400px;
  padding-bottom: 20px;
}

/* Dropzone dragover state */
.kanban-cards-list.drag-over {
  background-color: rgba(99, 102, 241, 0.05);
  border: 2px dashed #6366f1;
  border-radius: 12px;
}

/* ==========================================================================
   TASK CARDS (SHARED STYLES FOR KANBAN & GRID)
   ========================================================================== */
.task-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: grab;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.task-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.task-card.dragging {
  opacity: 0.5;
  transform: scale(0.98);
}

.task-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.task-category-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.task-priority-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.priority-high { background-color: #fee2e2; color: #dc2626; }
.priority-medium { background-color: #fef3c7; color: #d97706; }
.priority-low { background-color: #d1fae5; color: #059669; }

.task-title-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.task-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background-color: transparent;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.task-checkbox:hover {
  border-color: #6366f1;
}

.task-card.completed .task-checkbox {
  background-color: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.task-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.4;
  word-break: break-word;
}

.task-card.completed .task-title {
  text-decoration: line-through;
  color: #94a3b8;
}

.task-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Subtasks Progress inside Card */
.task-subtasks-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.subtasks-bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.mini-progress-bg {
  width: 100%;
  height: 4px;
  background-color: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}

.mini-progress-fill {
  height: 100%;
  background-color: #6366f1;
  border-radius: 2px;
}

/* Tag Chips */
.task-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag-chip {
  font-size: 10px;
  font-weight: 600;
  background-color: #f1f5f9;
  color: #475569;
  padding: 2px 6px;
  border-radius: 4px;
}

.task-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #64748b;
}

.due-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.due-date-badge.is-overdue {
  color: #dc2626;
  font-weight: 700;
}

.due-date-badge.is-today {
  color: #d97706;
  font-weight: 700;
}

.card-actions-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* GRID VIEW SPECIFICS */
.tasks-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* LIST VIEW COMPACT TABLE */
.tasks-list-table-wrapper {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.tasks-list-header {
  display: grid;
  grid-template-columns: 80px 1fr 140px 120px 130px 100px 100px;
  gap: 12px;
  padding: 12px 20px;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.tasks-list-body {
  display: flex;
  flex-direction: column;
}

.task-list-row {
  display: grid;
  grid-template-columns: 80px 1fr 140px 120px 130px 100px 100px;
  gap: 12px;
  padding: 14px 20px;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
  font-size: 13px;
}

.task-list-row:hover {
  background-color: #f8fafc;
}

.task-list-row:last-child {
  border-bottom: none;
}

/* Empty State Banner */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #94a3b8;
  width: 100%;
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  margin-bottom: 4px;
}

.empty-state h4 {
  font-size: 16px;
  font-weight: 700;
  color: #475569;
}

.empty-state p {
  font-size: 13px;
  max-width: 320px;
}

/* ==========================================================================
   MODALS (HTML5 DIALOG)
   ========================================================================== */
.custom-modal {
  border: none;
  border-radius: 20px;
  background: transparent;
  padding: 0;
  margin: auto;
  max-width: 560px;
  width: 90vw;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  outline: none;
}

.custom-modal::backdrop {
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-content {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: #0f172a;
}

.modal-content-sm {
  max-width: 440px;
}

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

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

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

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

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

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.required { color: #ef4444; }

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  color: #0f172a;
  font-size: 14px;
  outline: none;
  transition: all 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

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

.subtasks-form-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  max-height: 140px;
  overflow-y: auto;
}

.subtask-form-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-input {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  padding: 0;
  background: none;
}

.color-preset-label {
  font-size: 12px;
  color: #64748b;
}

.color-presets {
  display: flex;
  gap: 6px;
}

.preset-color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.preset-color-dot:hover {
  transform: scale(1.15);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

/* ==========================================================================
   TOAST NOTIFICATION BANNER
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  padding: 12px 18px;
  border-radius: 12px;
  background-color: #0f172a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.25s ease forwards;
}

.toast-success { background-color: #065f46; color: #ecfdf5; border: 1px solid #10b981; }
.toast-info { background-color: #1e3a8a; color: #eff6ff; border: 1px solid #3b82f6; }
.toast-warning { background-color: #78350f; color: #fffbeb; border: 1px solid #f59e0b; }

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

/* ==========================================================================
   DARK MODE OVERRIDES (EXPLICIT SCOPED SELECTORS — NO CSS VARIABLES)
   ========================================================================== */
body.dark-mode {
  background-color: #0b0f19;
  color: #f1f5f9;
}

body.dark-mode .sidebar {
  background-color: #111827;
  border-color: #1f2937;
}

body.dark-mode .brand-text h2 { color: #f8fafc; }
body.dark-mode .nav-item { color: #94a3b8; }
body.dark-mode .nav-item:hover { background-color: #1f2937; color: #f8fafc; }
body.dark-mode .nav-item.active { background-color: #312e81; color: #e0e7ff; }
body.dark-mode .nav-counter { background-color: #1f2937; color: #94a3b8; }
body.dark-mode .storage-info { background-color: #1f2937; border-color: #374151; }
body.dark-mode .storage-header { color: #e2e8f0; }

body.dark-mode .top-bar {
  background-color: rgba(17, 24, 39, 0.85);
  border-color: #1f2937;
}

body.dark-mode .search-box {
  background-color: #1f2937;
}
body.dark-mode .search-box input {
  color: #f8fafc;
}
body.dark-mode .search-shortcut {
  background-color: #111827;
  border-color: #374151;
  color: #94a3b8;
}

body.dark-mode .view-switcher { background-color: #1f2937; }
body.dark-mode .view-btn { color: #94a3b8; }
body.dark-mode .view-btn.active { background-color: #374151; color: #818cf8; }

body.dark-mode .icon-btn {
  background-color: #111827;
  border-color: #1f2937;
  color: #94a3b8;
}
body.dark-mode .icon-btn:hover {
  background-color: #1f2937;
  color: #f8fafc;
}

body.dark-mode .view-title { color: #f8fafc; }
body.dark-mode .view-subtitle { color: #94a3b8; }
body.dark-mode .custom-select {
  background-color: #111827;
  border-color: #374151;
  color: #f8fafc;
}

body.dark-mode .kanban-column {
  background-color: #111827;
  border-color: #1f2937;
}
body.dark-mode .column-title h3 { color: #f8fafc; }
body.dark-mode .column-count { background-color: #1f2937; color: #94a3b8; }
body.dark-mode .quick-add-col-btn { background-color: #1f2937; color: #94a3b8; }

body.dark-mode .task-card {
  background-color: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}
body.dark-mode .task-title { color: #f8fafc; }
body.dark-mode .task-desc { color: #94a3b8; }
body.dark-mode .tag-chip { background-color: #334155; color: #cbd5e1; }
body.dark-mode .task-card-footer { border-top-color: #334155; color: #94a3b8; }
body.dark-mode .task-checkbox { border-color: #475569; }

body.dark-mode .tasks-list-table-wrapper {
  background-color: #111827;
  border-color: #1f2937;
}
body.dark-mode .tasks-list-header {
  background-color: #1f2937;
  border-bottom-color: #374151;
  color: #94a3b8;
}
body.dark-mode .task-list-row {
  border-bottom-color: #1f2937;
}
body.dark-mode .task-list-row:hover {
  background-color: #1f2937;
}

body.dark-mode .modal-content {
  background-color: #111827;
  border-color: #1f2937;
  color: #f8fafc;
}
body.dark-mode .form-label { color: #cbd5e1; }
body.dark-mode .form-input, body.dark-mode .form-select, body.dark-mode .form-textarea {
  background-color: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}
body.dark-mode .subtask-form-item {
  background-color: #1e293b;
  border-color: #334155;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  .app-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  .stats-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .kanban-board {
    grid-template-columns: 1fr;
  }
  .tasks-list-header, .task-list-row {
    grid-template-columns: 60px 1fr 100px 80px;
  }
  .col-subtasks, .col-date {
    display: none;
  }
}

@media (max-width: 640px) {
  .main-content {
    padding: 16px;
  }
  .top-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box {
    width: 100%;
  }
  .stats-cards-grid {
    grid-template-columns: 1fr;
  }
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}
