/* ==========================================================================
   TaskFlow Dashboard Styles (Vanilla CSS - No Tailwind, No CSS Variables)
   ========================================================================== */

/* Global Reset & Box Sizing */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #0f172a;
  color: #f8fafc;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* App Layout Grid */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ==========================================================================
   Sidebar Component
   ========================================================================== */
.sidebar {
  width: 280px;
  background-color: #0b0f19;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.25rem;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.brand-info h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.brand-info span {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

.mobile-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
}

.sidebar-action {
  margin-bottom: 1.5rem;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.nav-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin: 1.25rem 0 0.5rem 0.5rem;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.7rem 0.85rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.nav-link i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.nav-link span {
  flex: 1;
}

.nav-item:hover .nav-link {
  background-color: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
}

.nav-item.active .nav-link {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.05) 100%);
  color: #818cf8;
  border-left: 3px solid #6366f1;
  font-weight: 600;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  line-height: 1;
}

.badge-count {
  background-color: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.nav-item.active .badge-count {
  background-color: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}

/* Color Dot Indicators */
.dot-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.work-dot { background-color: #6366f1; box-shadow: 0 0 8px rgba(99, 102, 241, 0.5); }
.personal-dot { background-color: #ec4899; box-shadow: 0 0 8px rgba(236, 72, 153, 0.5); }
.health-dot { background-color: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }
.finance-dot { background-color: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, 0.5); }
.learning-dot { background-color: #06b6d4; box-shadow: 0 0 8px rgba(6, 182, 212, 0.5); }

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.storage-info {
  background-color: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.storage-label {
  font-size: 0.75rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.storage-bar {
  height: 5px;
  background-color: #1e293b;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.storage-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.storage-text {
  font-size: 0.7rem;
  color: #64748b;
  display: block;
  text-align: right;
}

.sidebar-footer-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-icon-label {
  flex: 1;
  background-color: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.btn-icon-label:hover {
  background-color: #334155;
  color: #f8fafc;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 90;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
}

/* Top Navbar */
.top-header {
  height: 70px;
  background-color: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  max-width: 500px;
}

.mobile-toggle-btn {
  display: none;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.4rem;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.9rem;
}

.search-box input {
  width: 100%;
  background-color: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 0.6rem 2.5rem 0.6rem 2.5rem;
  color: #f8fafc;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  background-color: #1e293b;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.clear-search-btn {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.2rem;
}

.clear-search-btn:hover {
  color: #f8fafc;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.time-widget {
  background-color: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  color: #818cf8;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.02em;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.9rem;
}

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

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.2;
}

.user-status {
  font-size: 0.7rem;
  color: #10b981;
}

/* Dashboard Body Container */
.dashboard-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ==========================================================================
   Hero Banner & Quick Add Bar
   ========================================================================== */
.hero-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

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

.hero-content h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.3rem;
  letter-spacing: -0.02em;
}

.hero-content p {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.quick-add-form {
  display: flex;
  gap: 0.75rem;
  background-color: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.quick-add-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-left: 0.75rem;
}

.quick-add-icon {
  color: #6366f1;
  font-size: 1.2rem;
}

.quick-add-input-wrap input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #f8fafc;
  font-size: 0.95rem;
}

.quick-add-input-wrap input::placeholder {
  color: #64748b;
}

.quick-add-select {
  background-color: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

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

/* ==========================================================================
   Stats Grid Component
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.stat-card {
  background-color: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.15);
}

.stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.icon-indigo { background-color: rgba(99, 102, 241, 0.15); color: #818cf8; }
.icon-amber { background-color: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.icon-emerald { background-color: rgba(16, 185, 129, 0.15); color: #34d399; }
.icon-cyan { background-color: rgba(6, 182, 212, 0.15); color: #22d3ee; }

.stat-data {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 500;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.stat-subtext {
  font-size: 0.725rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.progress-bar-sm {
  height: 6px;
  background-color: #1e293b;
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 0.4rem;
}

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

/* ==========================================================================
   Workspace Grid (Tasks + Widgets)
   ========================================================================== */
.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.75rem;
  align-items: start;
}

.task-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.task-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background-color: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
}

.controls-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.view-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
}

.view-count-pill {
  background-color: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

.select-sm {
  background-color: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
}

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

/* ==========================================================================
   Task Cards List
   ========================================================================== */
.task-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.task-card {
  background-color: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all 0.2s ease;
  position: relative;
}

.task-card:hover {
  background-color: rgba(30, 41, 59, 0.9);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.task-card.completed {
  opacity: 0.65;
  background-color: rgba(15, 23, 42, 0.5);
}

.task-checkbox-wrap {
  padding-top: 0.2rem;
}

.custom-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: transparent;
}

.task-card:hover .custom-checkbox {
  border-color: #818cf8;
}

.custom-checkbox.checked {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #10b981;
  color: #ffffff;
  font-size: 0.75rem;
}

.task-content {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.task-header-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.task-title {
  font-size: 0.975rem;
  font-weight: 600;
  color: #f8fafc;
  word-break: break-word;
}

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

/* Priority Badges */
.badge-priority {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.priority-high {
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.priority-medium {
  background-color: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.priority-low {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Category Badges */
.badge-category {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.task-description {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-footer-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.775rem;
  color: #64748b;
}

.task-due-date {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.task-due-date.overdue {
  color: #ef4444;
  font-weight: 600;
}

.task-subtasks-count {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.8;
}

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

.action-btn {
  background: transparent;
  border: none;
  color: #64748b;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

.action-btn.star-btn.starred {
  color: #f59e0b;
}

.action-btn.delete-btn:hover {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Empty State Styling */
.empty-state {
  background-color: rgba(30, 41, 59, 0.4);
  border: 2px dashed rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 3.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-icon {
  width: 64px;
  height: 64px;
  background-color: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #f8fafc;
  margin-bottom: 0.4rem;
}

.empty-state p {
  color: #94a3b8;
  font-size: 0.9rem;
  max-width: 400px;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Side Widgets Column
   ========================================================================== */
.side-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.widget-card {
  background-color: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem;
}

.widget-header h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.widget-header h4 i {
  color: #818cf8;
}

.priority-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.priority-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #cbd5e1;
}

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

.priority-high-dot { background-color: #ef4444; }
.priority-medium-dot { background-color: #f59e0b; }
.priority-low-dot { background-color: #10b981; }

.priority-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f8fafc;
}

.due-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.825rem;
}

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

.due-title {
  color: #cbd5e1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.due-date-pill {
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.tip-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(30, 41, 59, 0.6) 100%);
  border-color: rgba(99, 102, 241, 0.2);
}

.tip-card p {
  font-size: 0.825rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* ==========================================================================
   Buttons & General Components
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

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

.btn-secondary {
  background-color: #334155;
  color: #f8fafc;
}

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

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

.btn-danger {
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background-color: #ef4444;
  color: #ffffff;
}

/* ==========================================================================
   Modals & Dialogs (HTML Native <dialog>)
   ========================================================================== */
.modal-dialog {
  border: none;
  background: transparent;
  padding: 1rem;
  max-width: 580px;
  width: 100%;
  margin: auto;
}

.modal-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-content {
  background-color: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #f8fafc;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  color: #f8fafc;
  background-color: rgba(255, 255, 255, 0.1);
}

.modal-form {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
}

.required {
  color: #ef4444;
}

.form-group input,
.form-group textarea,
.form-group select {
  background-color: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: #f8fafc;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

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

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

.subtask-input-wrap {
  display: flex;
  gap: 0.5rem;
}

.subtask-input-wrap input {
  flex: 1;
}

.subtask-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
  max-height: 160px;
  overflow-y: auto;
}

.subtask-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
}

.subtask-item-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.subtask-item.done span {
  text-decoration: line-through;
  color: #64748b;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background-color: rgba(15, 23, 42, 0.4);
}

/* Detail Modal Specifics */
.detail-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-title-wrap {
  display: flex;
  gap: 0.5rem;
}

.detail-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.3;
}

.detail-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.825rem;
  color: #94a3b8;
}

.detail-section h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.4rem;
}

.detail-desc-text {
  font-size: 0.925rem;
  color: #cbd5e1;
  background-color: rgba(15, 23, 42, 0.5);
  border-radius: 8px;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  white-space: pre-wrap;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    transform: translateX(-100%);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-overlay.active {
    display: block;
  }

  .mobile-close-btn,
  .mobile-toggle-btn {
    display: block;
  }

  .top-header {
    padding: 0 1rem;
  }

  .dashboard-body {
    padding: 1rem;
  }

  .hero-banner {
    padding: 1.25rem;
  }

  .quick-add-form {
    flex-direction: column;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .task-controls-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .controls-right {
    width: 100%;
    justify-content: space-between;
  }
}
