/* Modern Light Glassmorphism UI Design System - WorkFlow Pro */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  /* Light Theme Color Palette */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --border-color: rgba(226, 232, 240, 0.85);
  --border-glow: rgba(79, 70, 229, 0.25);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --accent-primary: #4f46e5;
  --accent-secondary: #7c3aed;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%);
  
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #3b82f6;
  
  --sidebar-width: 260px;
  --navbar-height: 70px;
  --box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  --box-shadow-hover: 0 20px 35px -10px rgba(79, 70, 229, 0.15), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
  --glass-blur: blur(16px);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Poppins', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-primary);
}

/* App Wrapper */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
}

.brand-logo i {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.75rem;
}

.sidebar-menu {
  padding: 1rem 0.75rem;
  flex: 1;
  overflow-y: auto;
}

.menu-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.75rem 1rem 0.25rem;
  font-weight: 600;
}

.nav-link-custom {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  border-radius: 0.75rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 0.25rem;
}

.nav-link-custom i {
  font-size: 1.1rem;
  width: 1.25rem;
  text-align: center;
  transition: var(--transition);
}

.nav-link-custom:hover {
  color: var(--accent-primary);
  background: var(--accent-gradient-subtle);
  transform: translateX(4px);
}

.nav-link-custom.active {
  color: #ffffff;
  background: var(--accent-gradient);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.35);
}

.nav-link-custom.active i {
  color: #ffffff;
}

/* Main Layout */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: var(--transition);
}

/* Top Navbar */
.top-navbar {
  height: var(--navbar-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  box-shadow: var(--box-shadow);
}

.search-bar-wrap {
  position: relative;
  width: 320px;
}

.search-bar-wrap input {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  width: 100%;
  transition: var(--transition);
}

.search-bar-wrap input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--border-glow);
}

.search-bar-wrap i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-icon-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

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

.nav-icon-btn .badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background-color: var(--danger-color);
  border-radius: 50%;
}

.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-primary);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

/* Light Glassmorphism Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.glass-card:hover {
  box-shadow: var(--box-shadow-hover);
  transform: translateY(-2px);
}

/* Stat Cards */
.stat-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stat-icon.primary { background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%); color: #4f46e5; }
.stat-icon.success { background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); color: #10b981; }
.stat-icon.warning { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); color: #f59e0b; }
.stat-icon.danger { background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%); color: #ef4444; }
.stat-icon.info { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); color: #3b82f6; }

.stat-info .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.stat-info .stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Kanban Board Styling */
.kanban-board {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.kanban-column {
  flex: 0 0 320px;
  background: rgba(241, 245, 249, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 160px);
}

.kanban-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.kanban-cards {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 200px;
}

.kanban-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: grab;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: var(--transition);
}

.kanban-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.12);
}

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

.kanban-cards.drag-over {
  background: rgba(79, 70, 229, 0.06);
  border-radius: 0.5rem;
  outline: 2px dashed var(--accent-primary);
  outline-offset: -2px;
}

/* Floating Timer Widget */
.timer-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1050;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: var(--glass-blur);
  border: 2px solid var(--accent-primary);
  box-shadow: 0 15px 35px rgba(79, 70, 229, 0.25);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: slideUp 0.3s ease;
}

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

.timer-display {
  font-family: 'Outfit', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-primary);
}

/* Ambient Floating Blur Orbs */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  opacity: 0.6;
  animation: pulseOrb 8s infinite alternate ease-in-out;
}

.bg-orb-1 { width: 300px; height: 300px; background: #c7d2fe; top: -50px; left: -50px; }
.bg-orb-2 { width: 400px; height: 400px; background: #ddd6fe; bottom: -100px; right: -100px; }

@keyframes pulseOrb {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.1) translate(20px, 20px); }
}

/* Modals & Forms */
.modal-content {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 1rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.form-control, .form-select {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 0.5rem;
}

.form-control:focus, .form-select:focus {
  background-color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--border-glow);
}

}

/* ========================================================= */
/* ROLE-BASED DASHBOARD COLOR THEMES & LUXURY UI STYLES      */
/* ========================================================= */

/* 1. ADMIN DASHBOARD THEME (EXECUTIVE ROYAL NAVY & GOLD LIGHT THEME) */
.theme-admin {
  --bg-primary: #F8FAFC;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --role-primary: #2563EB;
  --role-accent: #F59E0B;
}

.main-wrapper.theme-admin {
  background-color: #F8FAFC !important;
  color: #0f172a !important;
}

.sidebar-admin {
  background: linear-gradient(180deg, #1e1b4b 0%, #1e3a8a 100%) !important;
  border-right: 1px solid #1e3a8a !important;
}

.sidebar-admin .brand-logo {
  color: #ffffff !important;
}

.sidebar-admin .brand-logo i {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.sidebar-admin .menu-category {
  color: rgba(255, 255, 255, 0.6) !important;
}

.sidebar-admin .nav-link-custom {
  color: rgba(255, 255, 255, 0.85) !important;
}

.sidebar-admin .nav-link-custom:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.15) !important;
}

.sidebar-admin .nav-link-custom.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4) !important;
  border-left: 4px solid #F59E0B !important;
}

.top-navbar-admin {
  background: #ffffff !important;
  border-bottom: 1px solid rgba(37, 99, 235, 0.15) !important;
}

.top-navbar-admin .search-bar-wrap input {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}

.top-navbar-admin .search-bar-wrap i {
  color: #64748b !important;
}

.top-navbar-admin .nav-icon-btn {
  background: #ffffff !important;
  color: #475569 !important;
  border-color: #e2e8f0 !important;
}

.theme-admin .glass-card {
  background: #ffffff !important;
  border: 1px solid rgba(37, 99, 235, 0.18) !important;
  border-top: 3px solid #2563EB !important;
  box-shadow: 0 10px 30px -5px rgba(37, 99, 235, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.03) !important;
  color: #0f172a !important;
}

.theme-admin .btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

.theme-admin .btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
}


/* 2. MANAGER DASHBOARD THEME (MODERN PRODUCTIVITY THEME) */
.theme-manager {
  --bg-primary: #F8FAFC;
  --role-primary: #10B981;
  --role-secondary: #06B6D4;
  --role-accent: #14B8A6;
}

.main-wrapper.theme-manager {
  background-color: #F8FAFC !important;
}

.sidebar-manager {
  background: linear-gradient(180deg, #064e3b 0%, #047857 100%) !important;
  border-right: 1px solid #059669 !important;
}

.sidebar-manager .brand-logo {
  color: #ffffff !important;
}

.sidebar-manager .brand-logo i {
  background: linear-gradient(135deg, #34d399 0%, #06b6d4 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.sidebar-manager .menu-category {
  color: rgba(255, 255, 255, 0.6) !important;
}

.sidebar-manager .nav-link-custom {
  color: rgba(255, 255, 255, 0.85) !important;
}

.sidebar-manager .nav-link-custom:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.15) !important;
}

.sidebar-manager .nav-link-custom.active {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.35) !important;
  border-left: 4px solid #34d399 !important;
}

.top-navbar-manager {
  background: #ffffff !important;
  border-bottom: 1px solid rgba(16, 185, 129, 0.15) !important;
}

.theme-manager .glass-card {
  background: #ffffff !important;
  border: 1px solid rgba(16, 185, 129, 0.2) !important;
  box-shadow: 0 10px 30px -5px rgba(16, 185, 129, 0.14), 0 4px 12px -2px rgba(0, 0, 0, 0.03) !important;
}

.theme-manager .btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

.theme-manager .btn-outline-primary {
  color: #10b981 !important;
  border-color: #10b981 !important;
}

.theme-manager .btn-outline-primary:hover {
  background: #10b981 !important;
  color: #ffffff !important;
}


/* 3. EMPLOYEE DASHBOARD THEME (FRESH PRODUCTIVITY THEME) */
.theme-employee {
  --bg-primary: #F9FAFB;
  --role-primary: #7C3AED;
  --role-secondary: #6366F1;
  --role-accent: #38BDF8;
}

.main-wrapper.theme-employee {
  background-color: #F9FAFB !important;
}

.sidebar-employee {
  background: linear-gradient(180deg, #4c1d95 0%, #6d28d9 100%) !important;
  border-right: 1px solid #7c3aed !important;
}

.sidebar-employee .brand-logo {
  color: #ffffff !important;
}

.sidebar-employee .brand-logo i {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.sidebar-employee .menu-category {
  color: rgba(255, 255, 255, 0.6) !important;
}

.sidebar-employee .nav-link-custom {
  color: rgba(255, 255, 255, 0.85) !important;
}

.sidebar-employee .nav-link-custom:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.15) !important;
}

.sidebar-employee .nav-link-custom.active {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.35) !important;
  border-left: 4px solid #38bdf8 !important;
}

.top-navbar-employee {
  background: #ffffff !important;
  border-bottom: 1px solid rgba(124, 58, 237, 0.15) !important;
}

.theme-employee .glass-card, .theme-employee .hero-timer-card {
  background: #ffffff !important;
  border: 1px solid rgba(124, 58, 237, 0.2) !important;
  box-shadow: 0 10px 30px -5px rgba(124, 58, 237, 0.14), 0 4px 12px -2px rgba(0, 0, 0, 0.03) !important;
}

.theme-employee .hero-timer-clock {
  color: #7C3AED !important;
  text-shadow: 0 2px 10px rgba(124, 58, 237, 0.2) !important;
}

.theme-employee .btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3) !important;
}

.theme-employee .btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border: none !important;
}

/* Enhanced Glassmorphism & KPI Cards */
.glass-card-sm {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 1rem 1.25rem;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.glass-card-sm:hover {
  box-shadow: var(--box-shadow-hover);
  transform: translateY(-2px);
}

.stat-card-luxury {
  position: relative;
  overflow: hidden;
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 4px 10px -2px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card-luxury:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px -8px rgba(79, 70, 229, 0.12), 0 6px 12px -2px rgba(0, 0, 0, 0.05);
  border-color: rgba(79, 70, 229, 0.3);
}

.stat-card-luxury::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--card-accent, var(--accent-primary));
  border-radius: 4px 0 0 4px;
}

.stat-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

/* Leaderboard Ranking Item */
.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.leaderboard-item:hover {
  background: #ffffff;
  border-color: var(--accent-primary);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.rank-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.rank-badge-1 { background: linear-gradient(135deg, #fef08a 0%, #eab308 100%); color: #713f12; box-shadow: 0 4px 10px rgba(234, 179, 8, 0.3); }
.rank-badge-2 { background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%); color: #1e293b; box-shadow: 0 4px 10px rgba(148, 163, 184, 0.3); }
.rank-badge-3 { background: linear-gradient(135deg, #ffedd5 0%, #f97316 100%); color: #7c2d12; box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3); }
.rank-badge-other { background: #f1f5f9; color: #64748b; }

/* Achievement Badges Pills */
.achievement-badge-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition);
}

.achievement-badge-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  border-color: var(--accent-primary);
}

.achievement-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Kanban Preview Columns for Manager */
.kanban-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.kanban-preview-col {
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 0.85rem;
}

.kanban-preview-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 0.65rem;
  padding: 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  transition: var(--transition);
}

.kanban-preview-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06);
}

/* Workload Distribution Items */
.workload-item {
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
}

.workload-progress {
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  overflow: hidden;
}

/* Live Timer Hero Card */
.hero-timer-card {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.06) 0%, rgba(124, 58, 237, 0.06) 100%);
  border: 1.5px solid rgba(79, 70, 229, 0.2);
  border-radius: 1.25rem;
  padding: 1.5rem;
}

.hero-timer-clock {
  font-family: 'Outfit', monospace;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent-primary);
  text-shadow: 0 2px 10px rgba(79, 70, 229, 0.15);
}

/* Timeframe filter pill buttons */
.timeframe-pill {
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 2rem;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.timeframe-pill.active, .timeframe-pill:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

/* Pulse animation dot */
.pulse-dot-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--success-color);
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 1.8s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ========================================================= */
/* COMPREHENSIVE MOBILE & TABLET RESPONSIVE DESIGN SYSTEM     */
/* ========================================================= */

/* Prevent Horizontal Body Overflow & Global Touch Target Rules */
html, body {
  width: 100%;
  overflow-x: hidden !important;
  position: relative;
}

body.sidebar-open {
  overflow: hidden !important;
}

/* Off-Canvas Sidebar Backdrop */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1050 !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-backdrop.show, .sidebar-backdrop.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Sidebar Responsive Off-Canvas Drawer Styles */
@media (max-width: 991.98px) {
  .sidebar, aside.sidebar, #appSidebar {
    width: 280px !important;
    max-width: 85vw !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    z-index: 1060 !important;
    transform: translateX(-100%) !important;
    -webkit-transform: translateX(-100%) !important;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.35) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .sidebar.show, aside.sidebar.show, #appSidebar.show,
  .sidebar.active, aside.sidebar.active, #appSidebar.active {
    transform: translateX(0) !important;
    -webkit-transform: translateX(0) !important;
    visibility: visible !important;
    display: flex !important;
  }

  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .top-navbar {
    height: 62px !important;
    padding: 0 0.85rem !important;
  }

  #sidebarToggleBtn {
    flex-shrink: 0 !important;
    min-width: 44px !important;
    min-height: 44px !important;
    position: relative !important;
    z-index: 10 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* App-Style Mobile Bottom Navigation Bar (< 768px) */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 0.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.mobile-bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.725rem;
  font-weight: 500;
  padding: 6px 0;
  border-radius: 0.5rem;
  transition: var(--transition);
  position: relative;
  min-height: 44px;
}

.mobile-bottom-nav-item i {
  font-size: 1.25rem;
  transition: var(--transition);
}

.mobile-bottom-nav-item.active,
.mobile-bottom-nav-item:hover {
  color: var(--accent-primary);
  font-weight: 600;
}

.mobile-bottom-nav-item.active i {
  transform: translateY(-2px);
  color: var(--accent-primary);
}

.mobile-bottom-nav-item .badge-dot {
  position: absolute;
  top: 6px;
  right: 25%;
  width: 8px;
  height: 8px;
  background-color: var(--danger-color);
  border-radius: 50%;
}

/* Content spacing on mobile when bottom navigation is active */
@media (max-width: 767.98px) {
  body {
    padding-bottom: 75px !important;
  }

  .live-lunch-status-badge {
    font-size: 0.725rem !important;
    white-space: normal !important;
    word-break: break-word !important;
    padding: 0.25rem 0.5rem !important;
  }

  #activeShiftWidget {
    padding: 0.85rem !important;
    border-radius: 0.85rem !important;
  }

  #activeShiftWidget small, #activeShiftWidget div {
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* Adjust Floating Widgets on Mobile */
  #aiTriggerBtn {
    bottom: 78px !important;
    right: 16px !important;
    width: 50px !important;
    height: 50px !important;
  }

  #aiChatModalWindow {
    bottom: 135px !important;
    right: 4vw !important;
    left: 4vw !important;
    width: 92vw !important;
    max-width: 92vw !important;
    height: calc(100vh - 160px) !important;
    max-height: 520px !important;
  }

  .timer-widget {
    bottom: 78px !important;
    right: 16px !important;
    left: 16px !important;
    padding: 0.85rem 1rem !important;
    flex-wrap: wrap;
  }
}

/* Touch-Friendly Controls & 44px Minimum Sizing */
.btn, .form-control, .form-select, .nav-link-custom, .user-profile-menu, .nav-icon-btn, .btn-icon {
  min-height: 44px;
}

.btn-sm, .form-control-sm, .form-select-sm {
  min-height: 38px;
}

/* Mobile Touch Buttons & Dropdown Customization */
@media (max-width: 575.98px) {
  .search-bar-wrap {
    width: 100%;
    max-width: 200px;
  }

  .search-bar-wrap input {
    font-size: 0.8rem;
    padding-left: 2.2rem;
  }

  .nav-actions {
    gap: 0.5rem;
  }

  .nav-icon-btn {
    width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .user-avatar {
    width: 36px;
    height: 36px;
  }

  /* Compact KPI & Stat Cards on Mobile */
  .stat-card-luxury {
    padding: 1rem;
    gap: 0.85rem;
  }

  .stat-card-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .stat-info .stat-value {
    font-size: 1.4rem;
  }

  .stat-info .stat-label {
    font-size: 0.775rem;
  }
}

/* Data Tables Responsive Mobile Cards (< 768px) */
@media (max-width: 767.98px) {
  /* Scrollable Table Wrapper Safety */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.75rem;
  }

  /* Mobile Task Cards & Data Row Transformation */
  .mobile-card-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .mobile-data-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition);
  }

  .mobile-data-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.1);
  }

  .mobile-data-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border-color);
  }

  .mobile-data-card-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    font-size: 0.85rem;
  }

  .mobile-data-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border-color);
  }

  /* Stack Multi-Column Form Inputs Vertically on Mobile */
  .form-grid-responsive {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  /* Responsive Modal Fit */
  .modal-dialog {
    margin: 0.75rem auto;
    max-width: 95% !important;
  }

  .modal-body {
    max-height: calc(100vh - 160px);
    overflow-y: auto;
  }

  /* Chart Containers Mobile Height */
  .chart-container-responsive {
    position: relative;
    height: 260px !important;
    width: 100% !important;
  }
}

/* Tablet Optimizations (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .search-bar-wrap {
    width: 240px;
  }

  .kanban-board {
    gap: 1rem;
  }

  .kanban-column {
    flex: 0 0 280px;
  }
}

/* High Resolution Screens */
@media (min-width: 1025px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}

/* ==========================================================================
   WORKFLOW MODULE: TIMELINE, STATUS BADGES & PURPLE THEME UTILITIES
   ========================================================================== */
.text-purple { color: #8b5cf6 !important; }
.bg-purple { background-color: #8b5cf6 !important; }
.bg-purple-subtle { background-color: rgba(139, 92, 246, 0.12) !important; color: #8b5cf6 !important; }
.btn-purple {
  color: #ffffff !important;
  background-color: #8b5cf6 !important;
  border-color: #8b5cf6 !important;
}
.btn-purple:hover,
.btn-purple:focus {
  color: #ffffff !important;
  background-color: #7c3aed !important;
  border-color: #7c3aed !important;
}
.btn-outline-purple {
  color: #8b5cf6;
  border-color: #8b5cf6;
  background: transparent;
}
.btn-outline-purple:hover,
.btn-outline-purple:focus,
.btn-outline-purple.active {
  color: #ffffff !important;
  background-color: #8b5cf6 !important;
  border-color: #8b5cf6 !important;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
}

/* Timeline Feed Styles */
.activity-timeline-feed {
  position: relative;
}
.timeline-has-line::after {
  content: '';
  position: absolute;
  top: 40px;
  left: 18px;
  bottom: -15px;
  width: 2px;
  background: #e2e8f0;
  z-index: 1;
}
.timeline-marker-box {
  transition: transform 0.2s ease;
}
.timeline-content-card {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
}
.timeline-content-card:hover {
  transform: translateX(3px);
  border-color: rgba(79, 70, 229, 0.3);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Pulse Animation */
@keyframes statusPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.pulse-dot {
  animation: statusPulse 2s infinite;
}

/* Activity Pill Buttons */
.activity-pill-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
}
.activity-pill-btn.active {
  font-weight: 700;
  color: #fff !important;
  background: var(--accent-gradient) !important;
  border-color: transparent !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}
.activity-pill-btn.btn-outline-purple.active {
  background: #8b5cf6 !important;
}
.activity-pill-btn.btn-outline-warning.active {
  background: #f59e0b !important;
  color: #000 !important;
}
.activity-pill-btn.btn-outline-danger.active {
  background: #ef4444 !important;
}

/* Filter Pill Buttons */
.filter-pill-btn {
  transition: all 0.2s ease;
}
.filter-pill-btn.active {
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}



