/* ==========================================================================
   CSS Variables & Design Tokens
   ========================================================================== */
:root {
  /* Dynamic Accent Color (Changed via JS) */
  --accent-h: 260; /* Default: Purple */
  --accent-s: 85%;
  --accent-l: 65%;
  --accent: HSL(var(--accent-h), var(--accent-s), var(--accent-l));
  --accent-rgb: 151, 91, 255;
  --accent-glow: HSLA(var(--accent-h), var(--accent-s), var(--accent-l), 0.35);
  --accent-hover: HSL(var(--accent-h), var(--accent-s), calc(var(--accent-l) - 8%));
  --accent-subtle: HSLA(var(--accent-h), var(--accent-s), var(--accent-l), 0.15);

  /* Colors */
  --bg-dark: #07060b;
  --panel-bg: rgba(16, 14, 26, 0.45);
  --panel-border: rgba(255, 255, 255, 0.06);
  --card-bg: rgba(26, 23, 41, 0.5);
  --card-border: rgba(255, 255, 255, 0.05);
  
  --text-primary: #f5f4f8;
  --text-secondary: #a39eb8;
  --text-muted: #6a6480;

  /* Priority Colors */
  --prio-low-h: 142;
  --prio-low: HSL(var(--prio-low-h), 76%, 50%);
  --prio-low-glow: HSLA(var(--prio-low-h), 76%, 50%, 0.25);
  --prio-low-bg: HSLA(var(--prio-low-h), 76%, 50%, 0.12);
  
  --prio-medium-h: 38;
  --prio-medium: HSL(var(--prio-medium-h), 92%, 52%);
  --prio-medium-glow: HSLA(var(--prio-medium-h), 92%, 52%, 0.25);
  --prio-medium-bg: HSLA(var(--prio-medium-h), 92%, 52%, 0.12);
  
  --prio-high-h: 354;
  --prio-high: HSL(var(--prio-high-h), 89%, 60%);
  --prio-high-glow: HSLA(var(--prio-high-h), 89%, 60%, 0.25);
  --prio-high-bg: HSLA(var(--prio-high-h), 89%, 60%, 0.12);

  /* Font Families */
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sub: 'Plus Jakarta Sans', sans-serif;

  /* Border Radii */
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --radius-full: 9999px;

  /* Shadow & Blur */
  --shadow-main: 0 20px 50px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 8px 32px var(--accent-glow);
  --blur-main: 24px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  padding: 24px;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  transition: var(--transition-smooth);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Confetti Canvas overlay */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* ==========================================================================
   Ambient Background Glow Spheres
   ========================================================================== */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.glow-sphere {
  position: absolute;
  border-radius: var(--radius-full);
  filter: blur(140px);
  opacity: 0.3;
  mix-blend-mode: screen;
  animation: floatGlow 25s infinite alternate ease-in-out;
}

.glow-1 {
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -10%;
  left: -10%;
}

.glow-2 {
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, HSL(calc(var(--accent-h) - 40), 90%, 60%) 0%, transparent 70%);
  bottom: -10%;
  right: -5%;
  animation-delay: -5s;
}

.glow-3 {
  width: 35vw;
  height: 35vw;
  background: radial-gradient(circle, HSL(calc(var(--accent-h) + 60), 90%, 55%) 0%, transparent 70%);
  top: 30%;
  left: 45%;
  animation-delay: -10s;
}

@keyframes floatGlow {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  50% {
    transform: translate(8%, 5%) scale(1.15) rotate(90deg);
  }
  100% {
    transform: translate(-5%, -8%) scale(0.9) rotate(180deg);
  }
}

/* ==========================================================================
   Main Grid Layout & Glassmorphism Container
   ========================================================================== */
.glass-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1300px;
  height: 85vh;
  min-height: 650px;
  background: var(--panel-bg);
  backdrop-filter: blur(var(--blur-main));
  -webkit-backdrop-filter: blur(var(--blur-main));
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-main), 0 0 30px rgba(0,0,0,0.15);
  display: grid;
  grid-template-columns: 280px 1fr;
  overflow: hidden;
}

/* ==========================================================================
   Sidebar Layout & Controls
   ========================================================================== */
#app-sidebar {
  border-right: 1px solid var(--panel-border);
  background: rgba(8, 7, 14, 0.35);
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

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

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent) 0%, HSL(calc(var(--accent-h) + 30), var(--accent-s), 55%) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.logo-icon {
  width: 20px;
  height: 20px;
  color: #fff;
}

.sidebar-brand h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* User Profile Widget in Sidebar */
.user-profile-widget {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent) 0%, HSL(calc(var(--accent-h) + 20), var(--accent-s), 55%) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 4px 10px var(--accent-glow);
  flex-shrink: 0;
}

.user-meta-info {
  display: flex;
  flex-direction: column;
  min-width: 0; /* allows text truncation */
}

.user-email-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid HSLA(var(--accent-h), var(--accent-s), var(--accent-l), 0.15);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  align-self: flex-start;
  margin-top: 2px;
}

.streak-header-small {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 8px;
}

.btn-logout-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  transition: var(--transition-smooth);
  padding: 2px 0;
}

.btn-logout-link:hover {
  color: #ff7675;
}

.btn-logout-link i {
  width: 12px;
  height: 12px;
}

/* Section Titles */
.nav-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-left: 8px;
}

/* Navigation buttons */
.sidebar-nav {
  margin-bottom: 20px;
}

.sidebar-nav ul {
  list-style: none;
}

.nav-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: left;
  gap: 12px;
}

.nav-btn i {
  width: 18px;
  height: 18px;
  transition: var(--transition-smooth);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.nav-btn.active {
  background: var(--accent-subtle);
  color: var(--accent);
  font-weight: 600;
}

.nav-btn.active i {
  color: var(--accent);
}

.nav-btn .badge {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

.nav-btn.active .badge {
  background: var(--accent);
  color: #fff;
}

.badge-warning { color: #ffd200 !important; }
.badge-danger { color: #ff5252 !important; }
.badge-overdue { color: #ff7675 !important; }

/* Categories section */
.sidebar-projects {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 16px;
  padding-right: 4px;
}

.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.projects-header button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.projects-header button:hover {
  color: var(--accent);
}

#categories-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: transparent;
  border: none;
  font-family: var(--font-main);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  gap: 10px;
  text-align: left;
}

/* Sub-category list item indentation styling */
.category-item.sub-category-item {
  padding-left: 28px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.category-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.category-item.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-weight: 600;
}

.category-color-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: HSL(var(--color-hue, 260), 85%, 60%);
  box-shadow: 0 0 8px HSLA(var(--color-hue, 260), 85%, 60%, 0.4);
}

/* Small dot for subcategories */
.category-item.sub-category-item .category-color-dot {
  width: 6px;
  height: 6px;
}

.category-count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Theme Switcher */
.theme-customizer {
  border-top: 1px solid var(--panel-border);
  padding-top: 16px;
  margin-top: auto;
  margin-bottom: 16px;
}

.theme-dots {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.theme-dot {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

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

.theme-dot.active {
  border-color: #fff;
  transform: scale(1.15);
}

.dot-purple { background: #975bff; }
.dot-cyan { background: #00d2ff; }
.dot-emerald { background: #10ac84; }
.dot-sunset { background: #ff5252; }
.dot-amber { background: #ff9f43; }

/* Settings Bar */
.settings-bar {
  border-top: 1px solid var(--panel-border);
  padding-top: 16px;
}

.icon-toggle-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: var(--transition-smooth);
}

.icon-toggle-btn:hover {
  color: var(--text-primary);
}

.icon-toggle-btn i {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   Main Content Panel Layout
   ========================================================================== */
#main-panel {
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  height: 100%;
}

/* Header */
#main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.header-date {
  font-size: 0.85rem;
  font-family: var(--font-sub);
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#main-header h2 {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

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

/* Search Input */
.search-wrapper {
  position: relative;
  width: 250px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

#search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  padding: 10px 16px 10px 40px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-smooth);
}

#search-input:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-subtle);
  box-shadow: 0 0 15px var(--accent-glow);
  width: 280px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
}

.btn i {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, HSL(calc(var(--accent-h) + 15), var(--accent-s), 55%) 100%);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px HSLA(var(--accent-h), var(--accent-s), var(--accent-l), 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* ==========================================================================
   Dashboard Statistics Panel
   ========================================================================== */
.dashboard-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.glass-panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Radial Progress Bar */
.stat-chart-container {
  position: relative;
  width: 75px;
  height: 75px;
}

.radial-progress {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.radial-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.03);
  stroke-width: 3.5;
}

.radial-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.radial-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-details h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-details p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Mini Stats Grid card */
.mini-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mini-stat-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-stat-icon i {
  width: 18px;
  height: 18px;
}

.icon-high {
  background: var(--prio-high-bg);
  color: var(--prio-high);
}

.icon-today {
  background: rgba(255, 210, 0, 0.1);
  color: #ffd200;
}

.mini-stat-info span {
  font-size: 1.1rem;
  font-weight: 700;
  display: block;
}

.mini-stat-info p {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   Filter & Sorting Bar
   ========================================================================== */
.controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 12px;
}

.filter-tabs {
  display: flex;
  gap: 8px;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.03);
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* Custom Select Dropdowns */
.sort-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-wrapper label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.custom-select {
  position: relative;
  display: flex;
  align-items: center;
}

.custom-select select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  padding: 6px 36px 6px 16px;
  font-family: var(--font-main);
  font-size: 0.8rem;
  color: var(--text-secondary);
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.custom-select select:focus {
  border-color: var(--accent);
  color: var(--text-primary);
}

.select-chevron {
  position: absolute;
  right: 12px;
  pointer-events: none;
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

/* ==========================================================================
   Tasks List & Task Card Styling
   ========================================================================== */
.tasks-container {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  gap: 16px;
}

.empty-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseIcon 2.5s infinite alternate ease-in-out;
}

.empty-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

@keyframes pulseIcon {
  0% { transform: scale(1); box-shadow: 0 0 0 0 var(--accent-glow); }
  100% { transform: scale(1.08); box-shadow: 0 0 20px 8px var(--accent-glow); }
}

.empty-state h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 320px;
}

/* Task Card Main */
.task-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: var(--transition-smooth);
  animation: slideIn 0.35s ease-out;
}

.task-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(30, 27, 47, 0.55);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

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

.task-card-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

/* Custom Checkbox Design */
.checkbox-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.checkbox-wrapper input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-checkbox {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  border: 2px solid var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.custom-checkbox i {
  width: 12px;
  height: 12px;
  color: #fff;
  opacity: 0;
  transform: scale(0.6);
  transition: var(--transition-smooth);
}

.checkbox-wrapper:hover .custom-checkbox {
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.checkbox-wrapper input:checked ~ .custom-checkbox {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.checkbox-wrapper input:checked ~ .custom-checkbox i {
  opacity: 1;
  transform: scale(1);
}

/* Task Text & Details */
.task-content-details {
  flex: 1;
}

.task-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.task-title-row h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  transition: var(--transition-smooth);
}

/* Task Completed Strikethrough style */
.task-card.completed h4 {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 6px;
}

.task-card.completed .task-desc {
  color: var(--text-muted);
}

/* Task Tags / Badges Row */
.task-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.tag-category {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid HSLA(var(--accent-h), var(--accent-s), var(--accent-l), 0.15);
}

/* Dynamic category colors can be styled locally in html using style attribute */
.tag-category-custom {
  background: HSLA(var(--color-hue, 260), 85%, 60%, 0.12);
  color: HSL(var(--color-hue, 260), 85%, 60%);
  border: 1px solid HSLA(var(--color-hue, 260), 85%, 60%, 0.2);
}

.tag-prio {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-prio-low {
  background: var(--prio-low-bg);
  color: var(--prio-low);
}

.tag-prio-medium {
  background: var(--prio-medium-bg);
  color: var(--prio-medium);
}

.tag-prio-high {
  background: var(--prio-high-bg);
  color: var(--prio-high);
}

.tag-date {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.tag-date.tag-date-today {
  background: rgba(255, 210, 0, 0.08);
  border-color: rgba(255, 210, 0, 0.15);
  color: #ffd200;
}

.tag-date.tag-date-overdue {
  background: rgba(255, 118, 117, 0.08);
  border-color: rgba(255, 118, 117, 0.15);
  color: #ff7675;
}

/* User Assignee Badges in Task Card */
.tag-assignee {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.tag-assignee-self {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: HSLA(var(--accent-h), var(--accent-s), var(--accent-l), 0.2);
}

.tag-creator {
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

/* Claim Task button style */
.btn-claim-task {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
  font-family: var(--font-main);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-claim-task:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

/* Action buttons on hover card */
.task-actions {
  display: flex;
  gap: 4px;
  opacity: 0.15;
  transition: var(--transition-smooth);
}

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

.card-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.card-action-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-edit:hover {
  color: var(--accent);
}

.btn-delete:hover {
  color: #ff7675;
}

/* ==========================================================================
   Subtasks List & Progress Bar Inside Card
   ========================================================================== */
.task-subtasks-section {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 12px;
  margin-top: 4px;
}

/* Small subtask progress bar */
.subtasks-progress-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.subtasks-prog-track {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-full);
  margin-left: 12px;
  overflow: hidden;
  position: relative;
}

.subtasks-prog-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease-out;
}

/* Subtasks Checklist container */
.subtasks-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 8px;
}

.subtask-checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.subtask-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--text-muted);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition-smooth);
}

.subtask-checkbox::after {
  content: '';
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 1px;
  opacity: 0;
  transform: scale(0);
  transition: var(--transition-smooth);
}

.subtask-checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.subtask-checkbox:checked::after {
  opacity: 1;
  transform: scale(1);
}

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

/* ==========================================================================
   Modals & Dialogs (Glassmorphic Modal overlay)
   ========================================================================== */
.glass-dialog {
  border: 1px solid var(--panel-border);
  background: rgba(14, 12, 23, 0.7);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  width: 90%;
  max-width: 540px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  margin: auto;
  outline: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  transform: scale(0.9);
  opacity: 0;
  max-height: 90vh;
  overflow-y: auto;
}

.glass-dialog[open] {
  transform: scale(1);
  opacity: 1;
}

.glass-dialog::backdrop {
  background: rgba(3, 2, 7, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeInBackdrop 0.3s ease;
}

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

.dialog-content {
  padding: 28px;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.dialog-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* Auth Dialog specific styles */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--panel-border);
  margin-bottom: 20px;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition-smooth);
}

.auth-tab-btn.active {
  color: var(--accent);
  border-color: var(--accent);
}

.auth-error-msg {
  background: rgba(255, 118, 117, 0.1);
  border: 1px solid rgba(255, 118, 117, 0.2);
  color: #ff7675;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
  font-weight: 500;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* Form Styling */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group input[type="date"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group textarea:focus,
.form-group input[type="date"]:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 10px var(--accent-glow);
}

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

.form-select select {
  width: 100%;
  font-size: 0.95rem;
  padding: 12px 36px 12px 12px;
  border-radius: var(--radius-sm);
}

/* Priority Option buttons selector */
.priority-selector {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.priority-selector input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.prio-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.prio-indicator {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
}

.prio-low-btn .prio-indicator { background: var(--prio-low); box-shadow: 0 0 6px var(--prio-low-glow); }
.prio-medium-btn .prio-indicator { background: var(--prio-medium); box-shadow: 0 0 6px var(--prio-medium-glow); }
.prio-high-btn .prio-indicator { background: var(--prio-high); box-shadow: 0 0 6px var(--prio-high-glow); }

.priority-selector input[type="radio"]:checked + .prio-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-primary);
  color: var(--text-primary);
}

#prio-low:checked + .prio-low-btn { border-color: var(--prio-low); background: var(--prio-low-bg); }
#prio-medium:checked + .prio-medium-btn { border-color: var(--prio-medium); background: var(--prio-medium-bg); }
#prio-high:checked + .prio-high-btn { border-color: var(--prio-high); background: var(--prio-high-bg); }

/* Subtask Builder inside dialog */
.subtask-input-wrapper {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.btn-sub-add {
  background: var(--accent);
  border: none;
  color: #fff;
  border-radius: var(--radius-sm);
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-sub-add:hover {
  background: var(--accent-hover);
}

.dialog-subtasks-list {
  list-style: none;
  max-height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dialog-subtask-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.dialog-subtask-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.dialog-subtask-remove:hover {
  color: #ff7675;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  border-top: 1px solid var(--panel-border);
  padding-top: 18px;
}

/* Category Dialog Special Mini size */
.mini-dialog {
  max-width: 450px;
}

.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.color-picker-grid input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.color-pick-label {
  height: 32px;
  border-radius: var(--radius-sm);
  background: HSL(var(--color-hue), 85%, 60%);
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 2px solid transparent;
  box-shadow: 0 4px 10px HSLA(var(--color-hue), 85%, 60%, 0.2);
}

.color-picker-grid input[type="radio"]:checked + .color-pick-label {
  border-color: #fff;
  transform: scale(1.08);
  box-shadow: 0 0 12px HSLA(var(--color-hue), 85%, 60%, 0.4);
}

/* ==========================================================================
   Admin Panel User Management Layout
   ========================================================================== */
.admin-users-list-wrapper {
  margin-bottom: 20px;
}

.admin-users-list-wrapper label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.admin-table-container {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.15);
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-users-table th, 
.admin-users-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--panel-border);
}

.admin-users-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-users-table tr:last-child td {
  border-bottom: none;
}

.admin-users-table td button {
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.admin-users-action-block {
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 16px;
}

.admin-users-action-block h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

/* ==========================================================================
   File Drag & Drop Upload Zone
   ========================================================================== */
.file-upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: rgba(255, 255, 255, 0.01);
}

.file-upload-zone:hover, 
.file-upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-subtle);
  box-shadow: 0 0 15px var(--accent-glow);
}

.upload-zone-icon {
  width: 32px;
  height: 32px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.file-upload-zone p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.form-file-list {
  list-style: none;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.form-file-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-file-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.form-file-remove:hover {
  color: #ff7675;
}

/* Task Card Attachments Layout */
.task-attachments-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 8px;
}

.attachment-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.attachment-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.attachment-item img {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 4px;
}

/* Lightbox overlay for full previews */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.25s ease;
}

.lightbox-image {
  max-width: 90%;
  max-height: 90%;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

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

/* ==========================================================================
   AI Voice Assistant Float UI Styles
   ========================================================================== */
.voice-assistant-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 999;
}

.voice-assistant-btn {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent) 0%, HSL(calc(var(--accent-h) + 20), var(--accent-s), 55%) 100%);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 25px var(--accent-glow);
  transition: var(--transition-smooth);
  position: relative;
}

.voice-assistant-btn::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  border: 2px solid var(--accent);
  opacity: 0.5;
  top: 0;
  left: 0;
  z-index: -1;
  transition: var(--transition-smooth);
}

.voice-assistant-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 30px HSLA(var(--accent-h), var(--accent-s), var(--accent-l), 0.5);
}

/* Listening Mode Styles (Red Glow Pulse) */
.voice-assistant-btn.listening {
  background: linear-gradient(135deg, #ff7675 0%, #ff5252 100%);
  box-shadow: 0 8px 25px rgba(255, 82, 82, 0.45);
}

.voice-assistant-btn.listening::before {
  border-color: #ff5252;
  animation: pulseRing 1.4s infinite ease-in-out;
}

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.85; }
  100% { transform: scale(1.65); opacity: 0; }
}

.voice-status-tooltip {
  background: rgba(14, 12, 23, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--panel-border);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  white-space: nowrap;
  pointer-events: none;
  transition: var(--transition-smooth);
  animation: tooltipFadeIn 0.35s ease;
}

.voice-status-tooltip.listening {
  border-color: rgba(255, 82, 82, 0.3);
  color: #ff7675;
}

.voice-status-tooltip.processing {
  border-color: var(--accent);
  color: var(--accent);
}

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

/* ==========================================================================
   Responsive Adaptations & Layout Collapses (Mobile Drawer)
   ========================================================================== */
.mobile-only {
  display: none !important;
}

@media (max-width: 1024px) {
  .glass-container {
    grid-template-columns: 240px 1fr;
    height: 90vh;
  }
  #main-panel {
    padding: 24px 30px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 8px;
  }
  
  .mobile-only {
    display: inline-flex !important;
  }
  
  .glass-container {
    grid-template-columns: 1fr;
    height: 96vh;
    border-radius: var(--radius-md);
  }
  
  /* Mobile Sidebar as Drawer */
  #app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(10, 8, 18, 0.96);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border-right: 1px solid var(--panel-border);
    box-shadow: none;
  }
  
  #app-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 15px 0 45px rgba(0, 0, 0, 0.55);
  }
  
  /* Close mobile menu drawer button */
  .close-sidebar-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
  }
  
  .close-sidebar-btn:hover {
    color: var(--text-primary);
  }
  
  /* Sidebar backdrop overlay perdesi */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
  }
  
  #main-panel {
    padding: 20px 16px;
  }
  
  /* Mobile header adjustments */
  #main-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-wrapper {
    width: 100%;
  }
  
  .dashboard-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .priority-selector {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .glass-dialog {
    width: 95%;
    max-height: 95vh;
  }
}

/* ==========================================================================
   Manufacturing Enterprise Enhancements (Badges, Analytics & Workloads)
   ========================================================================== */
.tag-machine {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tag-escalated {
  background: rgba(255, 118, 117, 0.15);
  color: #ff7675;
  border: 1px solid rgba(255, 118, 117, 0.3);
  animation: pulseEscalated 1.8s infinite ease-in-out;
}

@keyframes pulseEscalated {
  0% { box-shadow: 0 0 0px rgba(255, 118, 117, 0); }
  50% { box-shadow: 0 0 8px rgba(255, 118, 117, 0.35); }
  100% { box-shadow: 0 0 0px rgba(255, 118, 117, 0); }
}

/* Analytics Group Load Card */
.analytics-group-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition-smooth);
}

.analytics-group-card:hover {
  background: rgba(255, 255, 255, 0.02);
  transform: translateY(-2px);
}

.analytics-group-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.analytics-group-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.analytics-group-load-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 4px;
}

.analytics-group-load-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.load-fill-low { background: #55efc4; }
.load-fill-medium { background: #ffeaa7; }
.load-fill-high { background: #ff7675; }

/* Workload Heatmap Severity Badge */
.workload-level {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.workload-low {
  background: rgba(85, 239, 196, 0.1);
  color: #55efc4;
}

.workload-medium {
  background: rgba(255, 234, 167, 0.1);
  color: #ffeaa7;
}

.workload-high {
  background: rgba(255, 118, 117, 0.1);
  color: #ff7675;
}

/* Card AI Assignment Action Button */
.btn-ai-assign-task {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-subtle);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-ai-assign-task:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* Admin Tabs Layout */
.admin-tab-panel {
  animation: tabFadeIn 0.3s ease;
}

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

/* Time & Effort Tracking Styles */
.btn-start-task {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.25);
  color: #2ecc71;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-family: var(--font-main);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-start-task:hover {
  background: #2ecc71;
  color: #fff;
}

.btn-complete-effort {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(230, 126, 34, 0.12);
  border: 1px solid rgba(230, 126, 34, 0.25);
  color: #e67e22;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-family: var(--font-main);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-complete-effort:hover {
  background: #e67e22;
  color: #fff;
}

.tag-effort {
  background: rgba(230, 126, 34, 0.08);
  border: 1px solid rgba(230, 126, 34, 0.15);
  color: #e67e22;
}

.tag-time-range {
  background: rgba(52, 152, 219, 0.08);
  border: 1px solid rgba(52, 152, 219, 0.15);
  color: #3498db;
}

.tag-started-status {
  background: rgba(46, 204, 113, 0.08);
  border: 1px solid rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}

/* Pulse animation for running task */
.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #2ecc71;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  animation: pulse-tracking 1.6s infinite;
}

@keyframes pulse-tracking {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(46, 204, 113, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}

/* Sidebar category hover action buttons */
.sidebar-category-row {
  position: relative;
}
.sidebar-category-row:hover .category-actions-wrapper {
  display: flex !important;
}
