/* ==========================================
   Rankstaks Task Tracker
   Modern Green & White SaaS UI Design System
   Curated for Project, Blogging & Content Management
   Colors: Emerald Green (#059669) → Vibrant Mint (#10B981) + Crisp White (#FFFFFF)
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* ── CSS Design Tokens ── */
:root {
  /* Brand Core - Emerald Green & Crisp White */
  --green-primary: #059669;
  --green-dark: #047857;
  --green-deep: #064E3B;
  --green-light: #10B981;
  --green-mint: #34D399;
  --green-soft: #ECFDF5;
  --green-bg: #E6FBF2;
  --green-border: #A7F3D0;

  /* Aliases for Design System Compatibility */
  --purple: #059669;
  --purple-dark: #047857;
  --purple-light: #10B981;
  --purple-soft: #ECFDF5;
  --purple-bg: #E6FBF2;
  
  --pink: #10B981;
  --pink-light: #34D399;
  --pink-soft: #D1FAE5;
  
  --gradient-primary: linear-gradient(135deg, #059669 0%, #10B981 100%);
  --gradient-primary-hover: linear-gradient(135deg, #047857 0%, #059669 50%, #10B981 100%);
  --gradient-accent: linear-gradient(135deg, #065F46 0%, #059669 50%, #34D399 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(5, 150, 105, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
  
  /* Canvas & Surfaces (Crisp White & Fresh Canvas) */
  --bg-app: #F8FAF9;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  --bg-input: #F3F7F5;
  --bg-input-focus: #FFFFFF;
  
  /* Pastel Metric Card Backgrounds */
  --card-mint: #ECFDF5;
  --card-mint-text: #047857;
  --card-mint-border: #A7F3D0;
  
  --card-peach: #FFFBEB;
  --card-peach-text: #B45309;
  --card-peach-border: #FDE68A;
  
  --card-lavender: #F0FDF4;
  --card-lavender-text: #059669;
  --card-lavender-border: #BBF7D0;
  
  --card-sky: #F0F9FF;
  --card-sky-text: #0369A1;
  --card-sky-border: #BAE6FD;
  
  --card-rose: #FFF1F2;
  --card-rose-text: #BE123C;
  --card-rose-border: #FECDD3;

  /* Typography */
  --text-main: #1E1B4B;
  --text-heading: #0F172A;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --text-white: #FFFFFF;

  /* Borders & Shadows */
  --border-light: #EEF2F6;
  --border-medium: #E2E8F0;
  --border-focus: #059669;
  
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.03), 0 1px 3px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.04), 0 4px 10px rgba(15, 23, 42, 0.02);
  --shadow-lg: 0 20px 35px rgba(15, 23, 42, 0.06), 0 8px 16px rgba(15, 23, 42, 0.03);
  --shadow-glow: 0 10px 25px rgba(5, 150, 105, 0.22);
  --shadow-glow-pink: 0 10px 25px rgba(16, 185, 129, 0.20);

  /* Status Tokens */
  --status-pending: #F59E0B;
  --status-pending-bg: #FEF3C7;
  --status-progress: #3B82F6;
  --status-progress-bg: #DBEAFE;
  --status-completed: #10B981;
  --status-completed-bg: #D1FAE5;
  --status-overdue: #EF4444;
  --status-overdue-bg: #FEE2E2;

  /* Priority Tokens */
  --priority-low: #10B981;
  --priority-low-bg: #E6FBF2;
  --priority-medium: #F59E0B;
  --priority-medium-bg: #FEF8E8;
  --priority-high: #F43F5E;
  --priority-high-bg: #FFF1F2;
  --priority-critical: #E11D48;
  --priority-critical-bg: #FFE4E6;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Mobile Safe Area & Dimensions */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --mobile-nav-height: 62px;
}

/* ── Reset & Baseline ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
  background: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, select, textarea {
  font-family: inherit;
}

/* ══════════════════════════════════════════
   MOBILE APP COMPONENTS (DESKTOP HIDDEN)
   ══════════════════════════════════════════ */
.mobile-header-left,
.sidebar-close-btn,
.mobile-bottom-nav,
.mobile-fab,
.sidebar-overlay {
  display: none;
}

/* ══════════════════════════════════════════
   APP LAYOUT (Sidebar + Main Area)
   ══════════════════════════════════════════ */

.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg-app);
}

/* ── Modern White Sidebar ── */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.sidebar-brand {
  padding: 24px 20px;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-logo-img {
  height: 54px;
  max-height: 58px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
  transition: var(--transition-fast);
}

.sidebar-nav {
  flex: 1;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.nav-section-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 12px 14px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  position: relative;
}

.nav-item:hover {
  background: var(--bg-app);
  color: var(--purple);
  transform: translateX(3px);
}

.nav-item.active {
  background: var(--purple-soft);
  color: var(--purple);
  font-weight: 700;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background: var(--gradient-primary);
  border-radius: 0 4px 4px 0;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* Sidebar User Widget */
.sidebar-user {
  padding: 16px;
  margin: 12px 16px 20px;
  background: var(--bg-app);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-normal);
}

.sidebar-user:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border-medium);
}

.sidebar-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-white);
  box-shadow: 0 3px 8px rgba(90, 24, 154, 0.25);
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--purple);
  font-weight: 600;
  text-transform: capitalize;
}

.btn-logout {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition-fast);
  font-size: 15px;
}

.btn-logout:hover {
  background: #FEE2E2;
  color: #EF4444;
}

/* ══════════════════════════════════════════
   MAIN CONTENT AREA
   ══════════════════════════════════════════ */

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 24px 36px 48px;
  min-height: 100vh;
  background: var(--bg-app);
}

/* ── Modern Top Header Bar ── */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  background: var(--bg-surface);
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.header-search-box {
  flex: 1;
  max-width: 440px;
  position: relative;
}

.header-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
  pointer-events: none;
}

.header-search-input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  color: var(--text-main);
  outline: none;
  transition: var(--transition-normal);
}

.header-search-input:focus {
  background: var(--bg-input-focus);
  border-color: var(--purple-light);
  box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.12);
}

.header-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 50%;
  line-height: 1;
  transition: var(--transition-fast);
  z-index: 2;
}

.header-search-clear:hover {
  color: var(--text-heading);
  background: var(--bg-surface-hover);
}

.header-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(90, 24, 154, 0.06);
  z-index: 1000;
  overflow: hidden;
  max-height: 480px;
  display: flex;
  flex-direction: column;
  animation: searchDropdownFade 0.15s ease-out;
}

@keyframes searchDropdownFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.header-search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  background: var(--bg-app);
  border-bottom: 1px solid var(--border-light);
}

.header-search-badge {
  background: var(--purple-bg);
  color: var(--purple);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
}

.header-search-list {
  overflow-y: auto;
  max-height: 340px;
  padding: 6px;
}

.header-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}

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

.header-search-item:hover,
.header-search-item.selected {
  background: var(--bg-surface-hover);
}

.header-search-item-main {
  flex: 1;
  min-width: 0;
}

.header-search-item-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-search-item-title mark {
  background: rgba(233, 30, 144, 0.15);
  color: var(--magenta);
  font-weight: 800;
  padding: 0 3px;
  border-radius: 3px;
}

.header-search-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.header-search-item-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.header-search-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-search-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-secondary);
}

.header-search-footer {
  padding: 8px 12px;
  background: var(--bg-app);
  border-top: 1px solid var(--border-light);
}

.header-search-view-all-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--purple);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.header-search-view-all-btn:hover {
  background: var(--purple);
  color: #FFFFFF;
  border-color: var(--purple);
}

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

.header-filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.header-filter-btn:hover {
  background: var(--bg-app);
  color: var(--text-heading);
}

.header-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 16px;
  position: relative;
  transition: var(--transition-fast);
}

.header-icon-btn:hover {
  background: var(--purple-soft);
  color: var(--purple);
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 9px;
  height: 9px;
  background: var(--pink);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 8px rgba(233, 30, 144, 0.6);
  animation: pulseDot 2s infinite;
}

.notification-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #DC2626;
  color: #FFFFFF;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.45);
  line-height: 1;
  pointer-events: none;
  animation: pulseDot 2.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.9; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.9; }
}

/* ══════════════════════════════════════════
   IN-APP NOTIFICATIONS DROPDOWN
   ══════════════════════════════════════════ */
.notification-wrap {
  position: relative;
  display: inline-flex;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: -10px;
  width: 370px;
  max-width: 90vw;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px rgba(90, 24, 154, 0.16), 0 4px 12px rgba(0, 0, 0, 0.06);
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideDownFade 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.notification-dropdown.active {
  display: flex;
}

@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-light);
  background: #FAF8FD;
}

.notification-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-heading);
}

.notification-badge {
  background: var(--pink);
  color: #FFF;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.notification-mark-all {
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--purple);
  cursor: pointer;
  padding: 0;
  transition: var(--transition-fast);
}

.notification-mark-all:hover {
  text-decoration: underline;
  color: var(--pink);
}

.notification-list {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  position: relative;
}

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

.notification-item:hover {
  background: #FDFBFE;
}

.notification-item.unread {
  background: #FAF5FF;
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
}

.notif-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.notif-icon-circle.task,
.notif-icon-circle.assigned { background: #F4EEFB; color: var(--purple); }
.notif-icon-circle.overdue { background: #FEE2E2; color: #EF4444; }
.notif-icon-circle.due_today { background: #FEF3C7; color: #D97706; }
.notif-icon-circle.completed { background: #EBFBF6; color: #10B981; }

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-text {
  font-size: 12.5px;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 4px;
}

.notif-text b {
  color: var(--text-heading);
}

.notif-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.notif-client-tag {
  background: #F1F5F9;
  color: #475569;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.notification-empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.notification-footer {
  padding: 10px;
  text-align: center;
  border-top: 1px solid var(--border-light);
  background: #FAF8FD;
}

.notification-footer a {
  font-size: 12px;
  font-weight: 700;
  color: var(--purple);
  text-decoration: none;
  cursor: pointer;
}
.notification-footer a:hover {
  text-decoration: underline;
}

.header-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
}

.header-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: var(--text-white);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-heading);
}

/* ── Section Title & Top Actions ── */
.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title-group h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.3px;
}

.page-title-group p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.btn-primary-gradient {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--gradient-primary);
  color: var(--text-white);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
  transition: var(--transition-normal);
}

.btn-primary-gradient:hover {
  background: var(--gradient-primary-hover);
  box-shadow: 0 12px 28px rgba(90, 24, 154, 0.35);
  transform: translateY(-2px);
}

.btn-primary-gradient:active {
  transform: translateY(0);
}

/* ══════════════════════════════════════════
   MODERN PASTEL METRIC CARDS
   ══════════════════════════════════════════ */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.metric-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  position: relative;
  transition: var(--transition-normal);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.metric-card.mint {
  background: var(--card-mint);
  border-color: var(--card-mint-border);
}

.metric-card.peach {
  background: var(--card-peach);
  border-color: var(--card-peach-border);
}

.metric-card.lavender {
  background: var(--card-lavender);
  border-color: var(--card-lavender-border);
}

.metric-card.sky {
  background: var(--card-sky);
  border-color: var(--card-sky-border);
}

.metric-card.rose {
  background: var(--card-rose);
  border-color: var(--card-rose-border);
}

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

.metric-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.metric-card.mint .metric-tag { color: var(--card-mint-text); }
.metric-card.peach .metric-tag { color: var(--card-peach-text); }
.metric-card.lavender .metric-tag { color: var(--card-lavender-text); }
.metric-card.sky .metric-tag { color: var(--card-sky-text); }
.metric-card.rose .metric-tag { color: var(--card-rose-text); }

.metric-icon-bubble {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.metric-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.metric-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
}

.trend-badge.positive {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.trend-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #D97706;
}

/* ══════════════════════════════════════════
   HERO EFFICIENCY & ANALYTICS OVERVIEW CARD
   ══════════════════════════════════════════ */

.analytics-hero-card {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.analytics-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.hero-title-group h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-heading);
}

.hero-title-group p {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.hero-content-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  align-items: center;
}

/* Circular Efficiency Gauge */
.gauge-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gauge-svg-wrap {
  position: relative;
  width: 170px;
  height: 170px;
}

.gauge-svg {
  transform: rotate(-90deg);
  width: 170px;
  height: 170px;
}

.gauge-circle-bg {
  fill: none;
  stroke: var(--border-light);
  stroke-width: 12;
}

.gauge-circle-progress {
  fill: none;
  stroke: url(#efficiencyGradient);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.gauge-inner-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.gauge-percent {
  font-size: 32px;
  font-weight: 800;
  color: var(--purple-dark);
  line-height: 1;
}

.gauge-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.gauge-status-tag {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

/* Secondary Stats Grid inside Hero */
.hero-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.breakdown-stat-box {
  background: var(--bg-app);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: var(--transition-fast);
}

.breakdown-stat-box:hover {
  border-color: var(--purple-soft);
  background: #FAF8FE;
}

.breakdown-title {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 6px;
}

.breakdown-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-heading);
}

.breakdown-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ══════════════════════════════════════════
   TASK LIST & MODERN CARDS
   ══════════════════════════════════════════ */

.section-container {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: 26px 28px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}

.section-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-heading-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-heading);
}

.filter-pills-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.custom-select-pill {
  padding: 8px 16px 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  outline: none;
  transition: var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.custom-select-pill:focus {
  border-color: var(--purple);
  background-color: #FFFFFF;
}

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

.modern-task-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  transition: var(--transition-normal);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modern-task-item:hover {
  border-color: var(--purple-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

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

.task-info-block {
  flex: 1;
}

.task-title-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.task-desc-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-badges-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: capitalize;
}

.status-pill.pending { background: var(--status-pending-bg); color: #B45309; }
.status-pill.in_progress { background: var(--status-progress-bg); color: #1D4ED8; }
.status-pill.completed { background: var(--status-completed-bg); color: #047857; }

/* Interactive Status Select Pill */
.status-select-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 22px 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  border: 1px solid transparent;
  appearance: none;
  -webkit-appearance: none;
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  transition: var(--transition-fast);
  font-family: inherit;
}

.status-select-pill:hover {
  filter: brightness(0.96);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.status-select-pill.pending,
.status-select-pill.status-pending {
  background-color: var(--status-pending-bg);
  color: #B45309;
  border-color: rgba(180, 83, 9, 0.25);
}

.status-select-pill.in_progress,
.status-select-pill.status-in_progress {
  background-color: var(--status-progress-bg);
  color: #1D4ED8;
  border-color: rgba(29, 78, 216, 0.25);
}

.status-select-pill.completed,
.status-select-pill.status-completed {
  background-color: var(--status-completed-bg);
  color: #047857;
  border-color: rgba(4, 120, 87, 0.25);
}

.status-select-pill option {
  background-color: var(--bg-card, #FFFFFF);
  color: var(--text-main, #1E293B);
  font-weight: 600;
}

.priority-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.priority-pill.low { background: var(--priority-low-bg); color: var(--priority-low); }
.priority-pill.medium { background: var(--priority-medium-bg); color: var(--priority-medium); }
.priority-pill.high { background: var(--priority-high-bg); color: var(--priority-high); }
.priority-pill.critical { background: var(--priority-critical-bg); color: var(--priority-critical); }

.task-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 12px;
}

.task-meta-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.task-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-user-circle {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
}

.task-user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-heading);
}

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

.efficiency-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 800;
}

.efficiency-tag-badge.excellent { background: #D1FAE5; color: #047857; }
.efficiency-tag-badge.good { background: #DBEAFE; color: #1D4ED8; }
.efficiency-tag-badge.low { background: #FEE2E2; color: #B91C1C; }

.task-action-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-action-start {
  padding: 6px 14px;
  background: var(--purple-soft);
  color: var(--purple);
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 700;
  transition: var(--transition-fast);
}

.btn-action-start:hover {
  background: var(--purple);
  color: #FFFFFF;
}

.btn-action-pause {
  padding: 6px 14px;
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FCD34D;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 700;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-action-pause:hover {
  background: #FDE68A;
  color: #92400E;
}

.btn-action-resume {
  padding: 6px 14px;
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 700;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-action-resume:hover {
  background: #10B981;
  color: #FFFFFF;
}

.live-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(220, 38, 38, 0.1);
  color: #DC2626;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-family: 'Courier New', monospace;
}

.live-timer-badge .timer-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #DC2626;
  animation: pulseDot 1s infinite;
}

.assign-upload-box {
  border: 1.5px dashed var(--purple-soft);
  background: var(--bg-app);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.assign-upload-box:hover {
  border-color: var(--purple);
  background: rgba(90, 24, 154, 0.04);
}

.selected-file-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
}

.selected-file-chip .file-remove-btn {
  background: none;
  border: none;
  color: #EF4444;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}

.selected-file-chip .file-remove-btn:hover {
  background: #FEE2E2;
}

.btn-action-complete {
  padding: 6px 14px;
  background: #D1FAE5;
  color: #047857;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 700;
  transition: var(--transition-fast);
}

.btn-action-complete:hover {
  background: #10B981;
  color: #FFFFFF;
}

.btn-action-reopen {
  padding: 6px 14px;
  background: var(--status-progress-bg);
  color: var(--blue-primary, #2563EB);
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 700;
  transition: var(--transition-fast);
  cursor: pointer;
  border: none;
}

.btn-action-reopen:hover {
  background: var(--blue-primary, #2563EB);
  color: #FFFFFF;
}

.btn-action-delete {
  padding: 6px 12px;
  background: #FFF1F2;
  color: #E11D48;
  border: 1px solid #FECDD3;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-fast);
}

.btn-action-delete:hover {
  background: #FFE4E6;
  border-color: #FDA4AF;
  color: #BE123C;
}

/* ══════════════════════════════════════════
   TEAM MEMBERS GRID (Lead View)
   ══════════════════════════════════════════ */

.team-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.team-member-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.team-member-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--purple-soft);
}

.team-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.team-avatar-lg {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.team-info-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-heading);
}

.team-info-email {
  font-size: 12px;
  color: var(--text-muted);
}

.team-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 4px;
}

.team-mini-stat {
  background: var(--bg-app);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
}

.team-mini-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-heading);
}

.team-mini-lbl {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.team-bar-track {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.team-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--gradient-primary);
  transition: width 0.8s ease;
}

/* ══════════════════════════════════════════
   MODALS (Clean Glass/Card Aesthetic)
   ══════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  transform: translateY(20px) scale(0.96);
  transition: var(--transition-bounce);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

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

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-heading);
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-app);
  color: var(--text-heading);
}

.modal-body {
  padding: 24px 28px;
}

.modal-footer {
  padding: 16px 28px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border-top: 1px solid var(--border-light);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 11px 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  color: var(--text-main);
  outline: none;
  transition: var(--transition-normal);
}

.form-input:focus {
  background: #FFFFFF;
  border-color: var(--purple-light);
  box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.12);
}

/* Password Input with Visibility Toggle */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrapper .form-input {
  width: 100%;
  padding-right: 44px !important;
}

.password-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--text-muted, #64748b);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color var(--transition-fast), background-color var(--transition-fast);
  z-index: 2;
  user-select: none;
}

.password-toggle-btn:hover {
  color: var(--purple, #5a189a);
  background: rgba(90, 24, 154, 0.08);
}

.password-toggle-btn:focus-visible {
  outline: 2px solid var(--purple, #5a189a);
  outline-offset: 1px;
}

.password-toggle-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.password-toggle-btn .eye-show {
  display: block;
}

.password-toggle-btn .eye-hide {
  display: none;
}

.password-toggle-btn.is-revealed .eye-show {
  display: none;
}

.password-toggle-btn.is-revealed .eye-hide {
  display: block;
}

.password-toggle-btn.is-revealed {
  color: var(--purple, #5a189a);
}

[data-theme="dark"] .password-toggle-btn:hover {
  color: var(--purple-light, #9d4edd);
  background: rgba(157, 78, 221, 0.15);
}

[data-theme="dark"] .password-toggle-btn.is-revealed {
  color: var(--purple-light, #9d4edd);
}


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

.btn-secondary {
  padding: 10px 20px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--bg-app);
  color: var(--text-heading);
}

/* ══════════════════════════════════════════
   LOGIN PAGE (Elevated SaaS Theme)
   ══════════════════════════════════════════ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F4F7FD;
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(90, 24, 154, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.login-page::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(233, 30, 144, 0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo img {
  height: 58px;
  max-width: 260px;
  width: auto;
  object-fit: contain;
}

.login-title {
  text-align: center;
  margin-bottom: 28px;
}

.login-title h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.3px;
}

.login-title p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ══════════════════════════════════════════
   TOASTS & HELPERS
   ══════════════════════════════════════════ */

.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  color: #FFFFFF;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 3s forwards;
  max-width: 380px;
}

.toast-success { background: #10B981; }
.toast-error { background: #EF4444; }
.toast-info { background: var(--purple); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateX(100%); }
}

.view { display: none; }
.view.active { display: block; }

/* Responsive adjustments */
@media (max-width: 1200px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-content-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 860px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .hero-breakdown-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══ CLIENT DIRECTORY & BADGES ═══ */
.task-client-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #F4EEFB;
  color: var(--purple);
  border: 1px solid #E9D5FF;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.1px;
}

/* ═══ TASK SEGREGATION (Clients vs Personal Projects) ═══ */
.task-type-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.task-type-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-medium);
  background: var(--bg-card);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-fast);
  color: var(--text-main);
  user-select: none;
}

.task-type-option:hover {
  border-color: var(--purple);
  background: var(--purple-soft);
}

.task-type-option.active {
  border-color: var(--purple);
  background: #F4EEFB;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

.task-type-option.active .type-title {
  color: var(--purple);
  font-weight: 700;
}

.task-type-option .type-icon {
  font-size: 20px;
  line-height: 1;
}

.task-type-option .type-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.task-type-option .type-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
}

.task-type-option .type-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badges for cards, kanban & tables */
.task-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.1px;
  white-space: nowrap;
}

.task-type-badge.client {
  background: #EDE9FE;
  color: #6D28D9;
  border: 1px solid #DDD6FE;
}

.task-type-badge.personal {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

[data-theme="dark"] .task-type-option {
  background: #1E1B2E;
  border-color: #332D52;
}

[data-theme="dark"] .task-type-option.active {
  background: #2D2254;
  border-color: #8B5CF6;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25);
}

[data-theme="dark"] .task-type-badge.client {
  background: #3B2A68;
  color: #DDD6FE;
  border-color: #5B3FA0;
}

[data-theme="dark"] .task-type-badge.personal {
  background: #064E3B;
  color: #A7F3D0;
  border-color: #047857;
}


.client-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.client-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-medium);
}

.client-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.client-avatar-lg {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #5A189A, #E91E90);
  color: #FFF;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(90, 24, 154, 0.2);
}

.client-info-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.3;
}

.client-info-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.client-action-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--purple);
  text-decoration: none;
  cursor: pointer;
  margin-top: auto;
  transition: var(--transition-fast);
}

.client-action-link:hover {
  text-decoration: underline;
  color: var(--pink);
}

/* ══════════════════════════════════════════
   INDIVIDUAL EFFICIENCY TABLE (DASHBOARD)
   ══════════════════════════════════════════ */
.efficiency-table-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.efficiency-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.efficiency-table th {
  background: #FAF8FD;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 750;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.efficiency-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
}

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

.efficiency-table tr:hover td {
  background: #FDFBFE;
}

.member-eff-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.member-eff-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #FFF;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* ══════════════════════════════════════════
   TIMEFRAME SELECTOR PILLS
   ══════════════════════════════════════════ */
.timeframe-pill-group {
  display: inline-flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.timeframe-btn {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.timeframe-btn:hover {
  color: var(--purple);
}

.timeframe-btn.active {
  background: var(--gradient-primary);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(90, 24, 154, 0.25);
}

/* ══════════════════════════════════════════
   INDUSTRY-GRADE DARK MODE DESIGN SYSTEM
   (Linear, Raycast & Vercel Inspired Obsidian Architecture)
   ══════════════════════════════════════════ */
[data-theme="dark"] {
  /* Brand Core - Elevated Emerald & Mint for Obsidian Dark Canvas */
  --green-primary: #10B981;
  --green-dark: #059669;
  --green-light: #34D399;
  --green-soft: rgba(16, 185, 129, 0.14);
  --green-bg: rgba(16, 185, 129, 0.12);

  --purple: #10B981;
  --purple-dark: #34D399;
  --purple-light: #34D399;
  --purple-soft: rgba(16, 185, 129, 0.14);
  --purple-bg: rgba(16, 185, 129, 0.12);

  --pink: #34D399;
  --pink-light: #6EE7B7;
  --pink-soft: rgba(52, 211, 153, 0.14);

  --gradient-primary: linear-gradient(135deg, #059669 0%, #10B981 100%);
  --gradient-primary-hover: linear-gradient(135deg, #10B981 0%, #34D399 100%);
  --gradient-accent: linear-gradient(135deg, #047857 0%, #10B981 50%, #34D399 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(5, 150, 105, 0.14) 0%, rgba(16, 185, 129, 0.10) 100%);

  /* Canvas & Surface Architecture (Obsidian & Deep Jade Tiers) */
  --bg-app: #060B08;             /* Deepest obsidian background */
  --bg-surface: #0C1510;         /* Tier 1: Elevated cards & containers */
  --bg-card: #101C15;            /* Tier 2: Interactive elements */
  --bg-sidebar: #08100C;         /* Docked sidebar */
  --bg-input: #122018;           /* Glare-free recessed inputs */
  --bg-input-focus: #16281E;
  --bg-surface-hover: #14241B;

  /* Typography Scale */
  --text-main: #E2ECE6;          /* High-legibility body text */
  --text-heading: #FFFFFF;       /* Pure crisp white titles */
  --text-secondary: #92AA9E;     /* Clean secondary labels */
  --text-muted: #627A6E;         /* Subtle hints & timestamps */
  --text-white: #FFFFFF;

  /* Delicate Translucent Micro-Borders */
  --border-light: rgba(52, 211, 153, 0.08);
  --border-medium: rgba(52, 211, 153, 0.15);
  --border-focus: #10B981;

  /* Refined Translucent Metric Cards */
  --card-mint: rgba(16, 185, 129, 0.10);
  --card-mint-text: #34D399;
  --card-mint-border: rgba(16, 185, 129, 0.25);

  --card-peach: rgba(245, 158, 11, 0.10);
  --card-peach-text: #FBBF24;
  --card-peach-border: rgba(245, 158, 11, 0.24);

  --card-lavender: rgba(16, 185, 129, 0.12);
  --card-lavender-text: #6EE7B7;
  --card-lavender-border: rgba(16, 185, 129, 0.26);

  --card-sky: rgba(59, 130, 246, 0.10);
  --card-sky-text: #60A5FA;
  --card-sky-border: rgba(59, 130, 246, 0.24);

  --card-rose: rgba(244, 63, 94, 0.10);
  --card-rose-text: #FB7185;
  --card-rose-border: rgba(244, 63, 94, 0.24);

  /* Elevation Shadows & Atmospheric Glows */
  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-glow: 0 0 28px rgba(168, 85, 247, 0.35);
}

/* ── Top Header Bar ── */
[data-theme="dark"] .top-header {
  background: rgba(14, 17, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .header-search-input {
  background: #141724;
  border-color: rgba(255, 255, 255, 0.09);
  color: #FFFFFF;
}

[data-theme="dark"] .header-search-input:focus {
  background: #171B2B;
  border-color: #A855F7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

[data-theme="dark"] .header-filter-btn,
[data-theme="dark"] .header-icon-btn,
[data-theme="dark"] .header-user-pill {
  background: #151926;
  border-color: rgba(255, 255, 255, 0.08);
  color: #94A3B8;
}

[data-theme="dark"] .header-filter-btn:hover,
[data-theme="dark"] .header-icon-btn:hover {
  background: rgba(168, 85, 247, 0.15);
  color: #C084FC;
  border-color: rgba(168, 85, 247, 0.3);
}

/* ── Sidebar Navigation ── */
[data-theme="dark"] .sidebar {
  background: #0B0D14;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #C084FC;
}

[data-theme="dark"] .nav-item.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18) 0%, rgba(236, 72, 153, 0.12) 100%);
  border: 1px solid rgba(168, 85, 247, 0.28);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.15);
}

[data-theme="dark"] .sidebar-user-card {
  background: #11141E;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Hero Analytics Banner & Gauge ── */
[data-theme="dark"] .hero-efficiency-card {
  background: linear-gradient(135deg, #121522 0%, #181328 100%);
  border: 1px solid rgba(168, 85, 247, 0.22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .hero-breakdown-card {
  background: rgba(19, 23, 35, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .gauge-percent {
  color: #FFFFFF;
  text-shadow: 0 0 24px rgba(168, 85, 247, 0.4);
}

[data-theme="dark"] .gauge-circle-bg {
  stroke: rgba(255, 255, 255, 0.08);
}

/* ── Modern Metric Cards ── */
[data-theme="dark"] .metric-card {
  background: #131724;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .metric-card.mint { background: var(--card-mint); border-color: var(--card-mint-border); }
[data-theme="dark"] .metric-card.peach { background: var(--card-peach); border-color: var(--card-peach-border); }
[data-theme="dark"] .metric-card.lavender { background: var(--card-lavender); border-color: var(--card-lavender-border); }
[data-theme="dark"] .metric-card.sky { background: var(--card-sky); border-color: var(--card-sky-border); }
[data-theme="dark"] .metric-card.rose { background: var(--card-rose); border-color: var(--card-rose-border); }

/* ── Tasks List & Kanban Items ── */
[data-theme="dark"] .modern-task-item,
[data-theme="dark"] .task-card {
  background: #131724;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .modern-task-item:hover,
[data-theme="dark"] .task-card:hover {
  background: #161B2B;
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 18px rgba(168, 85, 247, 0.12);
}

[data-theme="dark"] .task-client-badge {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.24);
  color: #C084FC;
}

[data-theme="dark"] .status-pill.pending,
[data-theme="dark"] .status-badge.pending {
  background: rgba(245, 158, 11, 0.12);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

[data-theme="dark"] .status-pill.in_progress,
[data-theme="dark"] .status-badge.in_progress {
  background: rgba(59, 130, 246, 0.12);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

[data-theme="dark"] .status-pill.completed,
[data-theme="dark"] .status-badge.completed {
  background: rgba(16, 185, 129, 0.12);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

[data-theme="dark"] .priority-pill.critical,
[data-theme="dark"] .priority-badge.critical {
  background: rgba(225, 29, 72, 0.14);
  color: #FB7185;
  border: 1px solid rgba(225, 29, 72, 0.28);
}

[data-theme="dark"] .priority-pill.high,
[data-theme="dark"] .priority-badge.high {
  background: rgba(244, 63, 94, 0.14);
  color: #FDA4AF;
  border: 1px solid rgba(244, 63, 94, 0.28);
}

[data-theme="dark"] .priority-pill.medium,
[data-theme="dark"] .priority-badge.medium {
  background: rgba(245, 158, 11, 0.14);
  color: #FCD34D;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

[data-theme="dark"] .priority-pill.low,
[data-theme="dark"] .priority-badge.low {
  background: rgba(16, 185, 129, 0.14);
  color: #6EE7B7;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

[data-theme="dark"] .efficiency-tag-badge.excellent {
  background: rgba(16, 185, 129, 0.14);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

[data-theme="dark"] .efficiency-tag-badge.good {
  background: rgba(59, 130, 246, 0.14);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

[data-theme="dark"] .efficiency-tag-badge.low {
  background: rgba(244, 63, 94, 0.14);
  color: #FB7185;
  border: 1px solid rgba(244, 63, 94, 0.25);
}

[data-theme="dark"] .btn-action-start {
  background: rgba(168, 85, 247, 0.15);
  color: #C084FC;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

[data-theme="dark"] .btn-action-start:hover {
  background: #A855F7;
  color: #FFFFFF;
}

/* ── Charts & Summary Containers ── */
[data-theme="dark"] .summary-card,
[data-theme="dark"] .chart-card {
  background: #121520;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* ── Tables (Efficiency & Audit) ── */
[data-theme="dark"] .efficiency-table th,
[data-theme="dark"] .audit-table th {
  background: #0D0F17;
  color: #94A3B8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .efficiency-table td,
[data-theme="dark"] .audit-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #E2E8F0;
}

[data-theme="dark"] .efficiency-table tr:hover td,
[data-theme="dark"] .audit-table tr:hover td {
  background: rgba(255, 255, 255, 0.035) !important;
}

/* ── Modals & Overlays ── */
[data-theme="dark"] .modal-overlay {
  background: rgba(4, 5, 8, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] .modal {
  background: #121520;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Forms, Inputs & Selects ── */
[data-theme="dark"] .form-input,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: #151926;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  color: #F8FAFC;
}

[data-theme="dark"] .form-input:focus,
[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
  background: #181D2D;
  border-color: #A855F7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.22);
}

[data-theme="dark"] select option {
  background: #151926;
  color: #F8FAFC;
}

/* ── Search Dropdown ── */
[data-theme="dark"] .header-search-dropdown {
  background: #11141E;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.75);
}

[data-theme="dark"] .header-search-header {
  background: #0D0F17;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .header-search-footer {
  background: #0D0F17;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .header-search-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .header-search-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .header-search-view-all-btn {
  background: #161A28;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #C084FC;
}

[data-theme="dark"] .header-search-view-all-btn:hover {
  background: var(--gradient-primary);
  color: #FFFFFF;
  border-color: transparent;
}

/* ── Notification Dropdown ── */
[data-theme="dark"] .notification-dropdown {
  background: #11141E;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.75);
}

[data-theme="dark"] .notification-header {
  background: #0D0F17;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .notification-footer {
  background: #0D0F17;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .notification-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .notification-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .notification-item.unread {
  background: rgba(168, 85, 247, 0.12);
  border-left: 3px solid #A855F7;
}

/* ── Calendar View ── */
[data-theme="dark"] .calendar-grid {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .calendar-header-cell {
  background: #0D0F17;
  color: #94A3B8;
}

[data-theme="dark"] .calendar-cell {
  background: #11141E;
}

[data-theme="dark"] .calendar-cell.today {
  background: rgba(168, 85, 247, 0.14);
  box-shadow: inset 0 0 0 1.5px #A855F7;
}

[data-theme="dark"] .calendar-task-dot.pending {
  background: rgba(245, 158, 11, 0.16);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .calendar-task-dot.in_progress {
  background: rgba(59, 130, 246, 0.16);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .calendar-task-dot.completed {
  background: rgba(16, 185, 129, 0.16);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ── Project, Team, Client & Settings Cards ── */
[data-theme="dark"] .project-card,
[data-theme="dark"] .team-card,
[data-theme="dark"] .client-card,
[data-theme="dark"] .settings-card,
[data-theme="dark"] .template-card {
  background: #131724;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .progress-bar-bg {
  background: rgba(255, 255, 255, 0.08);
}

/* ── Comment Thread ── */
[data-theme="dark"] .comment-item {
  background: #141825;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .comment-input-row input {
  background: #161A28;
  border-color: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

[data-theme="dark"] .comment-edit-textarea {
  background: #181D2D;
  color: #FFFFFF;
  border-color: #A855F7;
}

/* ── Login / Auth Screen ── */
[data-theme="dark"] .login-page {
  background: radial-gradient(circle at 50% 12%, rgba(147, 51, 234, 0.18) 0%, #07090E 70%);
}

[data-theme="dark"] .login-card {
  background: rgba(18, 21, 32, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(147, 51, 234, 0.12);
}

[data-theme="dark"] .auth-tab-bar {
  background: #0D0F17;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .auth-tab-btn.active {
  background: #1E2336;
  color: #C084FC;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ── Mobile Navigation Bar ── */
[data-theme="dark"] .mobile-bottom-nav {
  background: rgba(13, 16, 24, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .bottom-nav-item.active {
  color: #C084FC;
}

/* ── Custom Dark Scrollbars ── */
[data-theme="dark"] ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #080A0F;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}


/* ══════════════════════════════════════════
   TIMER WIDGET
   ══════════════════════════════════════════ */
.timer-widget {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(90, 24, 154, 0.1), rgba(233, 30, 144, 0.1));
  border: 1px solid var(--purple-soft);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  color: var(--purple);
  animation: timerPulse 2s infinite;
}

.timer-widget .timer-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #EF4444;
  animation: pulseDot 1s infinite;
}

.timer-widget .timer-display { font-family: 'Courier New', monospace; font-size: 14px; font-weight: 800; }
.timer-widget .timer-stop-btn {
  padding: 3px 10px; background: #FEE2E2; color: #DC2626;
  border-radius: 6px; font-size: 11px; font-weight: 700; cursor: pointer; border: none;
  transition: all var(--transition-fast);
}
.timer-widget .timer-stop-btn:hover { background: #FECACA; }
.timer-widget .timer-pause-btn {
  padding: 3px 10px; background: #FEF3C7; color: #B45309;
  border-radius: 6px; font-size: 11px; font-weight: 700; cursor: pointer; border: none;
  transition: all var(--transition-fast);
  display: inline-flex; align-items: center; gap: 3px;
}
.timer-widget .timer-pause-btn:hover { background: #FDE68A; color: #92400E; }

@keyframes timerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(90, 24, 154, 0.1); }
  50% { box-shadow: 0 0 0 6px rgba(90, 24, 154, 0); }
}

/* ══════════════════════════════════════════
   COMMENT THREAD
   ══════════════════════════════════════════ */
.comment-thread { display: flex; flex-direction: column; gap: 14px; max-height: 320px; overflow-y: auto; padding: 4px; }
.comment-item {
  display: flex; gap: 10px; padding: 12px; background: var(--bg-app);
  border-radius: var(--radius-md); border: 1px solid var(--border-light);
}
.comment-avatar {
  width: 32px; height: 32px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #FFF; flex-shrink: 0;
}
.comment-body { flex: 1; min-width: 0; }
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; gap: 8px; }
.comment-author { font-size: 12.5px; font-weight: 700; color: var(--text-heading); }
.comment-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.comment-time { font-size: 11px; color: var(--text-muted); }

.comment-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.comment-action-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.comment-action-btn svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.comment-action-btn.edit-btn:hover {
  color: var(--purple);
  border-color: var(--purple-light);
  background: var(--purple-soft);
}

.comment-action-btn.delete-btn {
  color: #DC2626;
  border-color: #FECACA;
  background: #FEF2F2;
}

.comment-action-btn.delete-btn:hover {
  background: #FEE2E2;
  color: #B91C1C;
}

[data-theme="dark"] .comment-action-btn.edit-btn:hover {
  color: var(--purple-light);
  background: rgba(157, 78, 221, 0.15);
}

[data-theme="dark"] .comment-action-btn.delete-btn {
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
}

[data-theme="dark"] .comment-action-btn.delete-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

.comment-text { font-size: 13px; color: var(--text-main); line-height: 1.5; word-break: break-word; }

/* Comment Inline Edit Box */
.comment-edit-box {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comment-edit-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--purple-light);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
  resize: vertical;
  min-height: 54px;
  outline: none;
  box-shadow: 0 0 0 2px rgba(123, 44, 191, 0.12);
}

.comment-edit-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-edit-save-btn {
  padding: 4px 12px;
  background: var(--gradient-primary);
  color: #FFF;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.comment-edit-save-btn:hover {
  opacity: 0.9;
}

.comment-edit-cancel-btn {
  padding: 4px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.comment-edit-cancel-btn:hover {
  background: var(--border-light);
  color: var(--text-heading);
}

.comment-input-row { display: flex; gap: 8px; margin-top: 12px; }
.comment-input-row input {
  flex: 1; padding: 10px 14px; border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md); font-size: 13px; background: var(--bg-input); outline: none;
}
.comment-input-row input:focus { border-color: var(--purple-light); }
.comment-send-btn {
  padding: 10px 18px; background: var(--gradient-primary); color: #FFF;
  border-radius: var(--radius-md); font-size: 13px; font-weight: 700; border: none; cursor: pointer;
}

/* ══════════════════════════════════════════
   TAG BADGES
   ══════════════════════════════════════════ */
.tag-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.tag-badge .tag-remove { cursor: pointer; opacity: 0.7; font-size: 10px; }
.tag-badge .tag-remove:hover { opacity: 1; }
.tags-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ══════════════════════════════════════════
   PROJECT CARDS
   ══════════════════════════════════════════ */
.project-card {
  background: var(--bg-surface); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm);
  transition: var(--transition-normal); display: flex; flex-direction: column; gap: 14px;
}
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--purple-soft); }
.project-progress-bar {
  width: 100%; height: 8px; background: var(--border-light);
  border-radius: 4px; overflow: hidden;
}
.project-progress-fill {
  height: 100%; border-radius: 4px;
  background: var(--gradient-primary); transition: width 0.8s ease;
}
.project-status-badge {
  display: inline-flex; padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700;
}
.project-status-badge.active { background: #D1FAE5; color: #047857; }
.project-status-badge.completed { background: #DBEAFE; color: #1D4ED8; }
.project-status-badge.on_hold { background: #FEF3C7; color: #B45309; }
.project-status-badge.cancelled { background: #FEE2E2; color: #B91C1C; }

/* ══════════════════════════════════════════
   CHARTS CONTAINER
   ══════════════════════════════════════════ */
.charts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 28px; }
.chart-card {
  background: var(--bg-surface); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm);
}
.chart-card h4 { font-size: 14px; font-weight: 800; color: var(--text-heading); margin-bottom: 14px; }
.chart-card canvas { width: 100% !important; max-height: 250px; }

/* ══════════════════════════════════════════
   CALENDAR VIEW
   ══════════════════════════════════════════ */
.calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
  background: var(--border-light); border-radius: var(--radius-md); overflow: hidden;
}
.calendar-header-cell {
  padding: 10px 4px; text-align: center; font-size: 11px;
  font-weight: 700; color: var(--text-secondary); background: var(--bg-app);
  text-transform: uppercase;
}
.calendar-cell {
  min-height: 90px; padding: 6px; background: var(--bg-surface);
  font-size: 12px; position: relative;
}
.calendar-cell.today { background: var(--purple-soft); }
.calendar-cell.other-month { opacity: 0.4; }
.calendar-day-num { font-weight: 700; color: var(--text-heading); margin-bottom: 4px; }
.calendar-task-dot {
  display: block; padding: 2px 6px; margin-bottom: 2px;
  font-size: 10px; font-weight: 600; border-radius: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.calendar-task-dot.pending { background: #FEF3C7; color: #92400E; }
.calendar-task-dot.in_progress { background: #DBEAFE; color: #1D4ED8; }
.calendar-task-dot.completed { background: #D1FAE5; color: #047857; }
.calendar-nav { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.calendar-nav button {
  padding: 6px 14px; background: var(--bg-input); border: 1px solid var(--border-light);
  border-radius: var(--radius-md); font-size: 13px; font-weight: 600; cursor: pointer;
}
.calendar-nav h3 { font-size: 16px; font-weight: 800; color: var(--text-heading); }

/* ══════════════════════════════════════════
   AUDIT LOG TABLE
   ══════════════════════════════════════════ */
.audit-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.audit-table th {
  background: #FAF8FD; padding: 12px 16px; font-size: 11px; font-weight: 750;
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light); text-align: left;
}
.audit-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--border-light);
  color: var(--text-main); vertical-align: middle;
}
.audit-table tr:hover td { background: #FDFBFE; }
.audit-action-badge {
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; display: inline-block;
}

/* ══════════════════════════════════════════
   SETTINGS PAGE
   ══════════════════════════════════════════ */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.settings-card {
  background: var(--bg-surface); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm);
}
.settings-card h3 {
  font-size: 16px; font-weight: 800; color: var(--text-heading);
  margin-bottom: 18px; display: flex; align-items: center; gap: 8px;
}
.theme-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--border-light);
}
.theme-toggle-label { font-size: 14px; font-weight: 600; color: var(--text-main); }
.theme-toggle-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.toggle-switch {
  position: relative; width: 48px; height: 26px; cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--border-medium);
  border-radius: 26px; transition: var(--transition-fast);
}
.toggle-slider::before {
  content: ''; position: absolute; width: 20px; height: 20px;
  left: 3px; bottom: 3px; background: white; border-radius: 50%;
  transition: var(--transition-fast); box-shadow: var(--shadow-xs);
}
.toggle-switch input:checked + .toggle-slider { background: var(--purple); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

/* ══════════════════════════════════════════
   FILE ATTACHMENTS
   ══════════════════════════════════════════ */
.attachment-list { display: flex; flex-direction: column; gap: 8px; }
.attachment-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--bg-app); border: 1px solid var(--border-light);
  border-radius: var(--radius-md); font-size: 13px;
}
.attachment-icon { font-size: 20px; flex-shrink: 0; }
.attachment-info { flex: 1; min-width: 0; }
.attachment-name {
  font-weight: 600; color: var(--text-heading);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.attachment-meta { font-size: 11px; color: var(--text-muted); }
.attachment-download {
  padding: 4px 10px; background: var(--purple-soft); color: var(--purple);
  border-radius: 6px; font-size: 11px; font-weight: 700;
  text-decoration: none; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 4px;
}

.attachment-actions-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.attachment-btn {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.attachment-btn.edit-btn:hover {
  color: var(--purple);
  border-color: var(--purple-light);
  background: var(--purple-soft);
}

.attachment-btn.delete-btn {
  color: #DC2626;
  border-color: #FECACA;
  background: #FEF2F2;
}

.attachment-btn.delete-btn:hover {
  background: #FEE2E2;
  color: #B91C1C;
}

[data-theme="dark"] .attachment-btn.edit-btn:hover {
  color: var(--purple-light);
  background: rgba(157, 78, 221, 0.15);
}

[data-theme="dark"] .attachment-btn.delete-btn {
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
}

[data-theme="dark"] .attachment-btn.delete-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* ══════════════════════════════════════════
   NATIVE MOBILE APPLICATION UI SYSTEM
   ══════════════════════════════════════════ */
@media (max-width: 860px) {
  /* Body & App Shell */
  body.sidebar-locked {
    overflow: hidden !important;
    touch-action: none !important;
  }

  .app-layout {
    flex-direction: column;
    min-height: 100dvh;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 12px 14px calc(76px + var(--sab)) !important;
    -webkit-overflow-scrolling: touch;
  }

  /* ── Mobile Sticky App Bar (Top Header) ── */
  .top-header {
    position: sticky;
    top: 0;
    z-index: 100;
    margin: -12px -14px 16px -14px;
    padding: calc(10px + var(--sat)) 14px 12px 14px;
    border-radius: 0 0 18px 18px;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  [data-theme="dark"] .top-header {
    background: rgba(14, 17, 26, 0.92);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  }

  .mobile-header-left {
    display: flex !important;
    align-items: center;
    gap: 10px;
  }

  .mobile-menu-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4.5px;
    cursor: pointer;
    padding: 0;
    transition: var(--transition-fast);
    user-select: none;
  }

  .mobile-menu-btn * {
    pointer-events: none;
  }

  .mobile-menu-btn:active {
    transform: scale(0.92);
    background: var(--purple-soft);
  }

  .hamburger-bar {
    width: 18px;
    height: 2px;
    background: var(--text-heading);
    border-radius: 2px;
    transition: var(--transition-fast);
  }

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

  .mobile-header-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.3px;
  }

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

  .header-filter-btn {
    display: none !important;
  }

  .header-icon-btn {
    width: 38px;
    height: 38px;
    font-size: 15px;
    border-radius: 10px;
  }

  .header-search-box {
    width: 100%;
    max-width: 100%;
    order: 3;
    margin-top: 2px;
  }

  .header-search-input {
    height: 40px;
    font-size: 14px;
    border-radius: 10px;
  }

  #headerTimerWidgetContainer {
    width: 100%;
    order: 2;
    margin-bottom: 2px;
  }

  .timer-widget {
    width: 100%;
    justify-content: space-between;
    padding: 8px 14px;
    font-size: 12.5px;
    border-radius: 10px;
  }

  #headerTimerTaskName {
    max-width: 120px;
  }

  /* ── Mobile Drawer (Sidebar) ── */
  .sidebar-overlay {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: min(320px, 85vw) !important;
    z-index: 1050 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 14px 0 40px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    background: var(--bg-sidebar);
  }

  .sidebar.open {
    transform: translateX(0) !important;
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(16px + var(--sat)) 18px 14px;
    min-height: auto;
  }

  .sidebar-logo-img {
    height: 44px;
    width: auto;
  }

  .sidebar-close-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-app);
    border: 1px solid var(--border-light);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
  }

  .sidebar-close-btn:active {
    transform: scale(0.9);
    background: var(--purple-soft);
    color: var(--purple);
  }

  .sidebar-nav {
    padding: 12px 14px;
    gap: 4px;
  }

  .nav-item {
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 10px;
  }

  .sidebar-user {
    margin: 10px 14px calc(14px + var(--sab));
    padding: 12px;
  }

  /* ── Mobile Bottom Navigation Bar (Tab Bar) ── */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(62px + var(--sab));
    padding-bottom: var(--sab);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
    z-index: 990;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
  }

  [data-theme="dark"] .mobile-bottom-nav {
    background: rgba(12, 14, 22, 0.96);
    border-top-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.55);
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 100%;
    background: none;
    border: none;
    padding: 4px 0;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
    position: relative;
    user-select: none;
  }

  .bottom-nav-item * {
    pointer-events: none;
  }

  .bottom-nav-item:active {
    transform: scale(0.92);
  }

  .bottom-nav-icon {
    font-size: 20px;
    line-height: 1;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .bottom-nav-label {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: -0.1px;
    line-height: 1;
  }

  .bottom-nav-item.active {
    color: var(--purple);
    font-weight: 700;
  }

  [data-theme="dark"] .bottom-nav-item.active {
    color: var(--pink-light);
  }

  .bottom-nav-item.active .bottom-nav-icon {
    transform: scale(1.12);
  }

  .bottom-nav-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    width: 32px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 0 0 3px 3px;
  }

  /* ── Mobile Floating Action Button (FAB) ── */
  .mobile-fab {
    display: flex !important;
    position: fixed;
    right: 18px;
    bottom: calc(72px + var(--sab));
    width: 54px;
    height: 54px;
    border-radius: 27px;
    background: var(--gradient-primary);
    color: #FFFFFF;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(90, 24, 154, 0.45);
    border: none;
    cursor: pointer;
    z-index: 980;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
    user-select: none;
  }

  .mobile-fab * {
    pointer-events: none;
  }

  .mobile-fab:active {
    transform: scale(0.9);
    box-shadow: 0 3px 10px rgba(90, 24, 154, 0.3);
  }

  .mobile-fab-icon {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -2px;
  }

  /* ── Page Headers & Grids on Mobile ── */
  .page-title-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 18px;
  }

  .page-title-row .btn-primary-gradient {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .analytics-hero-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .charts-grid,
  .settings-grid,
  .team-cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* ── 2x2 Mobile Metrics Grid ── */
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .metric-card {
    padding: 14px 12px !important;
    border-radius: var(--radius-md);
  }

  .metric-card-top {
    margin-bottom: 8px;
  }

  .metric-value {
    font-size: 22px !important;
  }

  .metric-label {
    font-size: 11px !important;
  }

  .metric-icon {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  /* ── Swipeable Horizontal Filter Pills Row ── */
  .filter-pills-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    margin-bottom: 12px;
    gap: 8px;
    scrollbar-width: none;
  }

  .filter-pills-row::-webkit-scrollbar {
    display: none;
  }

  .filter-pills-row .custom-select-pill {
    flex-shrink: 0;
    width: auto !important;
    font-size: 12px;
    padding: 8px 14px;
    border-radius: 20px;
    min-height: 36px;
  }

  /* ── Task Items Mobile Layout ── */
  .modern-task-item {
    padding: 14px 14px !important;
    gap: 10px !important;
    border-radius: var(--radius-md);
  }

  .task-item-main {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .task-badges-wrap {
    flex-wrap: wrap;
    gap: 6px;
  }

  .task-item-bottom {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .task-meta-left {
    justify-content: space-between;
    gap: 8px !important;
    width: 100%;
  }

  .task-actions-wrap {
    display: flex;
    gap: 8px;
    width: 100%;
  }

  .task-actions-wrap button,
  .task-actions-wrap a {
    flex: 1;
    justify-content: center;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 12px;
  }

  /* ── Calendar Mobile Optimization ── */
  .calendar-cell {
    min-height: 52px !important;
    padding: 4px !important;
  }

  .calendar-cell-num {
    font-size: 11px !important;
  }

  .calendar-task-dot {
    font-size: 9px !important;
    padding: 2px 4px !important;
    margin-bottom: 2px !important;
  }

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

/* ══════════════════════════════════════════
   MOBILE NATIVE BOTTOM SHEETS FOR MODALS
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  .modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
    z-index: 1100 !important;
  }

  .modal {
    border-radius: 24px 24px 0 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    max-height: 88dvh !important;
    margin: 0 !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    transform: translateY(100%) !important;
    transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1) !important;
    padding-bottom: calc(14px + var(--sab));
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.28) !important;
  }

  .modal-overlay.active .modal {
    transform: translateY(0) !important;
  }

  /* Native Bottom Sheet Grab Handle */
  .modal::before {
    content: '';
    display: block;
    width: 44px;
    height: 5px;
    background: var(--text-muted);
    border-radius: 4px;
    margin: 10px auto 4px auto;
    opacity: 0.35;
  }

  .modal-header {
    padding: 10px 18px 14px !important;
    position: sticky;
    top: 0;
    background: var(--bg-surface);
    z-index: 5;
  }

  .modal-header h3 {
    font-size: 16px;
  }

  .modal-body {
    padding: 14px 18px !important;
    -webkit-overflow-scrolling: touch;
    max-height: calc(88dvh - 130px);
  }

  .modal-footer {
    padding: 12px 18px !important;
    position: sticky;
    bottom: 0;
    background: var(--bg-surface);
    z-index: 5;
    border-top: 1px solid var(--border-light);
    gap: 10px;
  }

  .modal-footer button {
    flex: 1;
    min-height: 44px;
    justify-content: center;
  }

  /* Avoid iOS auto-zoom on input focus */
  .form-input,
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px !important;
    min-height: 44px;
  }

  textarea.form-input {
    min-height: 80px;
  }
}

/* ══════════════════════════════════════════
   SMALL SCREEN TOUCH ADJUSTMENTS (<= 480px)
   ══════════════════════════════════════════ */
@media (max-width: 480px) {
  .main-content {
    padding: 10px 10px calc(76px + var(--sab)) !important;
  }

  .top-header {
    margin: -10px -10px 14px -10px;
    padding: calc(8px + var(--sat)) 10px 10px 10px;
  }

  .section-container {
    padding: 14px 12px !important;
    border-radius: var(--radius-md);
  }

  .login-card {
    padding: 24px 18px !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
  }

  .login-logo img {
    height: 44px;
  }

  #signupOtp {
    font-size: 20px !important;
    letter-spacing: 6px !important;
  }
}

/* ══════════════════════════════════════════════════════
   ENHANCED "ALL TASKS" DELIVERABLES VIEW STYLES
   ══════════════════════════════════════════════════════ */

/* ── Metric Summary Strip ── */
.tasks-metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-strip-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  user-select: none;
}

.metric-strip-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background var(--transition-normal);
}

.metric-strip-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--purple-light);
}

.metric-strip-card.active {
  border-color: var(--purple);
  box-shadow: 0 0 0 2px rgba(123, 44, 191, 0.2);
}

.metric-strip-card.active::before {
  background: var(--gradient-primary);
}

.metric-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.metric-strip-icon {
  font-size: 14px;
}

.metric-strip-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.2;
}

.metric-strip-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Specific metric card color accents */
.metric-strip-card.card-pending::before { background: #EAB308; }
.metric-strip-card.card-progress::before { background: #3B82F6; }
.metric-strip-card.card-completed::before { background: #10B981; }
.metric-strip-card.card-overdue::before { background: #EF4444; }

/* ── Quick Preset Filter Tabs ── */
.tasks-preset-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}

.tasks-preset-tabs::-webkit-scrollbar {
  height: 4px;
}
.tasks-preset-tabs::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 4px;
}

.preset-pill {
  padding: 7px 15px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.preset-pill:hover {
  background: var(--bg-surface-hover);
  color: var(--purple);
  border-color: var(--purple-light);
}

.preset-pill.active {
  background: var(--gradient-primary);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(123, 44, 191, 0.3);
}

/* ── Advanced Toolbar Box ── */
.tasks-toolbar-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.tasks-toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tasks-search-wrap {
  position: relative;
  flex: 1 1 260px;
  min-width: 200px;
}

.tasks-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--text-muted);
  pointer-events: none;
}

.tasks-search-input {
  width: 100%;
  padding: 8px 32px 8px 34px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  background: var(--bg-base);
  color: var(--text-heading);
  font-size: 13px;
  outline: none;
  transition: all var(--transition-normal);
}

.tasks-search-input:focus {
  border-color: var(--purple);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.15);
}

.tasks-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 50%;
}

.tasks-search-clear:hover {
  color: var(--text-heading);
  background: var(--border-light);
}

.tasks-filters-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── View Mode Switcher ── */
.view-mode-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg-base);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 7px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.view-toggle-btn:hover {
  color: var(--text-heading);
}

.view-toggle-btn.active {
  background: var(--bg-surface);
  color: var(--purple);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* ── Card Selection Checkbox & Meta Chips ── */
.task-card-check-wrap {
  display: flex;
  align-items: center;
  margin-right: 10px;
}

.task-item-checkbox {
  width: 17px;
  height: 17px;
  accent-color: var(--purple);
  cursor: pointer;
}

.modern-task-item.is-selected {
  border-color: var(--purple) !important;
  background: rgba(123, 44, 191, 0.04);
}

.task-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-surface-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.task-meta-chip.chip-comment {
  color: #3B82F6;
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
}

.task-meta-chip.chip-attachment {
  color: #8B5CF6;
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.2);
}

.task-meta-chip.chip-overdue {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  font-weight: 700;
}

/* ── Visual Hours Progress Bar ── */
.task-hours-bar-container {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 130px;
}

.task-hours-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-muted);
}

.task-hours-bar-labels .hours-logged-bold {
  font-weight: 700;
  color: var(--text-heading);
}

.hours-progress-track {
  height: 5px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.hours-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
  background: #3B82F6;
}

.hours-progress-fill.fill-normal {
  background: #3B82F6;
}

.hours-progress-fill.fill-warning {
  background: #F59E0B;
}

.hours-progress-fill.fill-overdue {
  background: #EF4444;
}

.hours-progress-fill.fill-completed {
  background: #10B981;
}

/* ── Grouping Accordion Headers ── */
.task-group-section {
  margin-bottom: 22px;
}

.task-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast);
}

.task-group-header:hover {
  background: var(--bg-surface-hover);
}

.task-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
}

.task-group-count {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--bg-base);
  color: var(--purple);
  border: 1px solid var(--border-light);
}

.task-group-chevron {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.task-group-section.collapsed .task-group-chevron {
  transform: rotate(-90deg);
}

.task-group-section.collapsed .task-group-content {
  display: none !important;
}

/* ══════════════════════════════════════════════════════
   KANBAN BOARD VIEW
   ══════════════════════════════════════════════════════ */
.kanban-board-wrapper {
  overflow-x: auto;
  padding-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(290px, 1fr));
  gap: 16px;
  min-width: 900px;
  align-items: start;
}

.kanban-col {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 240px);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.kanban-col-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.kanban-col-header.col-pending {
  border-top: 3px solid #EAB308;
}

.kanban-col-header.col-in_progress {
  border-top: 3px solid #3B82F6;
}

.kanban-col-header.col-completed {
  border-top: 3px solid #10B981;
}

.kanban-col-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kanban-col-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: 0.2px;
}

.kanban-col-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--bg-base);
  color: var(--text-secondary);
}

.kanban-col-hours {
  font-size: 11px;
  color: var(--text-muted);
}

.kanban-col-body {
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 250px;
  flex: 1;
  transition: background 0.2s ease;
}

.kanban-col-body.drag-over {
  background: rgba(123, 44, 191, 0.08);
  outline: 2px dashed var(--purple);
  outline-offset: -4px;
  border-radius: var(--radius-md);
}

/* Kanban Cards */
.kanban-card {
  background: var(--bg-base);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: grab;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: relative;
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card:hover {
  transform: translateY(-2px);
  border-color: var(--purple-light);
  box-shadow: var(--shadow-md);
}

.kanban-card.dragging {
  opacity: 0.45;
  transform: scale(0.98);
}

.kanban-card.is-selected {
  border-color: var(--purple) !important;
  background: rgba(123, 44, 191, 0.06);
}

.kanban-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.kanban-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.35;
  cursor: pointer;
}

.kanban-card-title:hover {
  color: var(--purple);
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
  font-size: 11.5px;
}

.kanban-card-user {
  display: flex;
  align-items: center;
  gap: 5px;
}

.kanban-card-user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #FFF;
  font-size: 9.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════════════════════════════════
   COMPACT TABLE VIEW
   ══════════════════════════════════════════════════════ */
.tasks-compact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}

.tasks-compact-table th {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.tasks-compact-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  color: var(--text-secondary);
}

.tasks-compact-table tbody tr {
  transition: background var(--transition-fast);
  cursor: pointer;
}

.tasks-compact-table tbody tr:hover {
  background: var(--bg-surface-hover);
}

.tasks-compact-table tbody tr.is-selected {
  background: rgba(123, 44, 191, 0.05);
}

.table-title-cell {
  max-width: 280px;
}

.table-task-title {
  font-weight: 700;
  color: var(--text-heading);
  font-size: 13px;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.table-task-client {
  font-size: 11px;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════
   FLOATING BULK ACTION BAR
   ══════════════════════════════════════════════════════ */
.floating-bulk-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: #181D2D;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  padding: 8px 16px 8px 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(123, 44, 191, 0.3);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 999;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
  max-width: 95vw;
}

.floating-bulk-bar.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.bulk-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.bulk-badge-count {
  background: var(--purple);
  color: #FFF;
  font-weight: 800;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 12px;
}

.bulk-label-text {
  font-size: 12.5px;
  font-weight: 600;
  color: #E2E8F0;
}

.bulk-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bulk-btn {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.bulk-btn-status {
  background: rgba(255, 255, 255, 0.12);
  color: #F8FAFC;
}

.bulk-btn-status:hover {
  background: rgba(255, 255, 255, 0.22);
}

.bulk-btn-secondary {
  background: rgba(168, 85, 247, 0.2);
  color: #C084FC;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.bulk-btn-secondary:hover {
  background: rgba(168, 85, 247, 0.35);
  color: #FFFFFF;
}

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

.bulk-btn-danger:hover {
  background: #EF4444;
  color: #FFFFFF;
}

.bulk-btn-close {
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 15px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bulk-btn-close:hover {
  color: #FFF;
  background: rgba(255, 255, 255, 0.15);
}

/* ── Dark Mode Tweaks for All Tasks Enhancements ── */
[data-theme="dark"] .tasks-search-input {
  background: #121520;
  border-color: rgba(255, 255, 255, 0.1);
  color: #F8FAFC;
}

[data-theme="dark"] .tasks-search-input:focus {
  background: #161A28;
  border-color: #A855F7;
}

[data-theme="dark"] .view-mode-toggle {
  background: #10131D;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .view-toggle-btn.active {
  background: #181D2D;
  color: #C084FC;
}

[data-theme="dark"] .kanban-col {
  background: #121520;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .kanban-card {
  background: #171B2B;
  border-color: rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .kanban-card:hover {
  border-color: rgba(168, 85, 247, 0.4);
}

[data-theme="dark"] .tasks-compact-table th {
  background: #0D0F17;
  color: #94A3B8;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .tasks-compact-table td {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .task-hours-bar-labels .hours-logged-bold {
  color: #F8FAFC;
}

[data-theme="dark"] .hours-progress-track {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .metric-strip-card {
  background: #121520;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .task-group-header {
  background: #121520;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .task-group-count {
  background: #0D0F17;
  border-color: rgba(255, 255, 255, 0.08);
  color: #C084FC;
}

@media (max-width: 768px) {
  .tasks-toolbar-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .view-mode-toggle {
    align-self: flex-start;
  }
  .floating-bulk-bar {
    width: 92%;
    border-radius: 16px;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    bottom: 80px;
  }
  .bulk-bar-actions {
    justify-content: center;
    width: 100%;
  }
}
