/* Markaz Work Dashboard - Admin Panel CSS Stylesheet */

/* ----------------------------------------------------
   1. VARIABLES & DESIGN TOKENS
---------------------------------------------------- */
:root {
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Color Palette */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  
  --border-light: #e5e7eb;
  --border-dark: #d1d5db;
  
  /* Brand Soft Blue Accents */
  --accent-color: #3b82f6;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  
  /* Text colors */
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --text-white: #ffffff;
  
  /* Status Colors */
  --todo-color: #4b5563;
  --todo-bg: #e5e7eb;
  --progress-color: #1d4ed8;
  --progress-bg: #bfdbfe;
  --review-color: #6d28d9;
  --review-bg: #ddd6fe;
  --completed-color: #047857;
  --completed-bg: #a7f3d0;
  
  /* Priority Colors */
  --urgent-color: #dc2626;
  --urgent-bg: #fee2e2;
  --high-color: #ea580c;
  --high-bg: #ffedd5;
  --medium-color: #2563eb;
  --medium-bg: #dbeafe;
  --low-color: #4b5563;
  --low-bg: #f3f4f6;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-inset: inset 0 2px 4px 0 rgba(0,0,0,0.02);

  /* Transitions */
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Dimensions */
  --sidebar-width: 260px;
  --header-height: 70px;
}

/* ----------------------------------------------------
   2. RESET & BASE STYLES
---------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-secondary);
  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, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
}

/* Global Icon Styles for Premium Look */
svg.lucide {
  stroke-width: 1.25 !important;
}

/* ----------------------------------------------------
   3. LAYOUT STRUCTURE
---------------------------------------------------- */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-primary);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  transition: var(--transition-normal);
}

.sidebar-brand {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}

.brand-logo-img {
  max-width: 100%;
  height: 40px;
  object-fit: contain;
}

.brand-text h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: var(--transition-fast);
}

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

.nav-item:hover {
  background-color: var(--bg-secondary);
  color: var(--text-main);
}

.nav-item.active {
  background-color: var(--accent-light);
  color: var(--accent-hover);
  font-weight: 600;
}

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

.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background-color: var(--bg-tertiary);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-light);
}

.user-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.user-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

/* Header */
.top-header {
  height: var(--header-height);
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
}

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

.sidebar-toggle-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  transition: var(--transition-fast);
}

.sidebar-toggle-btn:hover {
  background-color: var(--bg-secondary);
}

.header-title h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.header-title p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

/* View Container */
.view-container {
  padding: 32px;
  flex-grow: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ----------------------------------------------------
   4. CONTENT VIEWS & STATE
---------------------------------------------------- */
.content-view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.content-view.active {
  display: block;
}

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

/* ----------------------------------------------------
   5. BUTTONS & UI CONTROLS
---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

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

.btn-primary {
  background-color: var(--accent-color);
  color: var(--text-white);
}

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

.btn-outline {
  background-color: var(--bg-primary);
  border-color: var(--border-light);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: var(--bg-secondary);
  border-color: var(--border-dark);
}

.btn-success {
  background-color: var(--accent-color);
  color: var(--text-white);
}

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

.btn-danger {
  background-color: var(--urgent-color);
  color: var(--text-white);
}

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

/* Status Indicators */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.775rem;
  font-weight: 500;
  border: 1px solid var(--border-light);
}

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

.status-indicator.mock-mode {
  background-color: var(--high-bg);
  border-color: #fed7aa;
  color: var(--high-color);
}

.status-indicator.mock-mode .status-dot {
  background-color: var(--high-color);
}

.status-indicator.live-mode {
  background-color: var(--completed-bg);
  border-color: #a7f3d0;
  color: var(--completed-color);
}

.status-indicator.live-mode .status-dot {
  background-color: var(--completed-color);
  box-shadow: 0 0 8px var(--accent-color);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.725rem;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

.badge-gray { background-color: var(--bg-tertiary); color: var(--text-muted); }

/* Priority Badges */
.badge-priority-urgent { background-color: var(--urgent-bg); color: var(--urgent-color); }
.badge-priority-high { background-color: var(--high-bg); color: var(--high-color); }
.badge-priority-important { background-color: var(--high-bg); color: var(--high-color); }
.badge-priority-medium { background-color: var(--medium-bg); color: var(--medium-color); }
.badge-priority-low { background-color: var(--low-bg); color: var(--low-color); }
.badge-priority-planned { background-color: var(--low-bg); color: var(--low-color); }

/* Status Badges */
.badge-status-todo { background-color: var(--todo-bg); color: var(--todo-color); }
.badge-status-progress { background-color: var(--progress-bg); color: var(--progress-color); }
.badge-status-review { background-color: var(--review-bg); color: var(--review-color); }
.badge-status-completed { background-color: var(--completed-bg); color: var(--completed-color); }

/* ----------------------------------------------------
   6. CARDS & GRID PANELS
---------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background-color: var(--bg-primary);
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}


.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  border-color: var(--border-dark);
}

.stat-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-color: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrapper i {
  width: 20px;
  height: 20px;
}

.stat-icon-wrapper.urgent { background-color: var(--urgent-bg); }
.stat-icon-wrapper.progress { background-color: var(--progress-bg); }
.stat-icon-wrapper.completed { background-color: var(--completed-bg); }

.text-gray { color: var(--text-muted); }
.text-red { color: var(--urgent-color); }
.text-blue { color: var(--progress-color); }
.text-green { color: var(--completed-color); }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-info h3 {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 2px;
  letter-spacing: -0.02em;
}

.stat-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Panel Design */
.panel {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

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

.panel-header h2 {
  font-size: 1rem;
  font-weight: 600;
}

.view-all-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-color);
  transition: var(--transition-fast);
}

.view-all-link:hover {
  color: var(--accent-hover);
}

.panel-body {
  padding: 24px;
}

/* Dashboard Details Grid */
.dashboard-details-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 24px;
  align-items: stretch; /* Make both cards same height */
}

.dashboard-details-grid .panel {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.dashboard-details-grid .panel-body {
  padding: 16px 24px 24px 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.max-w-3xl { max-width: 768px; }
.max-w-2xl { max-width: 640px; }

/* ----------------------------------------------------
   7. LISTS & INTERACTION ITEMS
---------------------------------------------------- */
.list-wrapper {
  position: relative;
  min-height: 150px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state i {
  width: 40px;
  height: 40px;
  stroke-width: 1.5px;
  margin-bottom: 12px;
  color: var(--text-light);
}

.empty-state p {
  font-size: 0.875rem;
}

.empty-state.hidden {
  display: none !important;
}

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

.quick-task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background-color: var(--bg-primary);
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.01);
  transition: var(--transition-fast);
}

.quick-task-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  border-color: #e2e8f0;
}

.quick-task-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quick-task-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.quick-task-bullet.urgent { background-color: var(--urgent-color); }
.quick-task-bullet.high { background-color: var(--high-color); }

.quick-task-details h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.quick-task-details p {
  font-size: 0.775rem;
  color: var(--text-muted);
}

/* Status bar chart */
.status-dist-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.status-bars {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 8px 0;
}

.status-bar-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bar-label {
  font-size: 0.85rem;
  font-weight: 500;
  width: 90px;
  flex-shrink: 0;
  color: var(--text-main);
}

.bar-val {
  font-weight: 600;
  font-size: 0.85rem;
  width: 32px;
  text-align: right;
  flex-shrink: 0;
  color: var(--text-main);
}

.bar-track {
  flex-grow: 1;
  height: 8px;
  background-color: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-fill.todo { background-color: var(--todo-color); }
.bar-fill.progress { background-color: var(--progress-color); }
.bar-fill.review { background-color: var(--review-color); }
.bar-fill.completed { background-color: var(--completed-color); }

.panel-toolbar {
  padding: 24px;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-radius: 16px;
}

.panel.toolbar-panel {
  border-radius: 16px;
  border: none;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
}
.panel.toolbar-panel .panel-toolbar {
  border-bottom: none;
}

.search-filters-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-grow: 1;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  min-width: 320px;
  max-width: 480px;
  flex-grow: 1;
}

.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-light);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.875rem;
  background-color: #f8fafc;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.search-box input:focus {
  background-color: var(--bg-primary);
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Premium Search Design */
.search-box.premium-search {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 4px;
  height: 48px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  transition: var(--transition-fast);
}
.search-box.premium-search:focus-within {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.search-icon-box {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f1f5f9;
  border-radius: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.search-icon-box i {
  width: 18px;
  height: 18px;
  position: static;
  transform: none;
}
.search-box.premium-search input {
  border: none;
  background: transparent;
  padding: 0 16px;
  font-size: 0.925rem;
  box-shadow: none;
  height: 100%;
  flex-grow: 1;
}
.search-box.premium-search input:focus {
  box-shadow: none;
}

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

/* Premium Filters */
.filters-row.premium-filters {
  display: flex;
  gap: 12px;
}
.btn-filter {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.btn-filter:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}
.btn-filter i {
  width: 18px;
  height: 18px;
}
.filters-row.premium-filters .filter-select {
  height: 48px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 0 36px 0 16px;
  background-color: #f8fafc;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2364748b%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: var(--transition-fast);
  cursor: pointer;
}
.filters-row.premium-filters .filter-select:hover {
  border-color: #cbd5e1;
}
.filters-row.premium-filters .filter-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

/* Premium Btn */
.premium-btn {
  height: 48px;
  border-radius: 16px;
  padding: 0 24px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.filter-select {
  padding: 8px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.825rem;
  font-weight: 500;
  background-color: var(--bg-primary);
  color: var(--text-main);
  cursor: pointer;
  height: 38px;
  transition: var(--transition-fast);
}

.filter-select:hover {
  border-color: var(--border-dark);
}

.filter-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ----------------------------------------------------
   9. DATA TABLES
---------------------------------------------------- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.tasks-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.tasks-table th {
  padding: 12px 24px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid #f1f5f9;
  background-color: #f8fafc;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.tasks-table td {
  padding: 18px 24px;
  font-size: 0.875rem;
  color: var(--text-main);
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.tasks-table tbody tr {
  transition: var(--transition-fast);
}

.tasks-table tbody tr:hover {
  background-color: #f8fafc;
}

.text-right {
  text-align: right;
}

/* Task details td customization */
.td-task-details {
  max-width: 320px;
}

.td-task-name {
  font-weight: 600;
  color: var(--text-main);
  display: block;
}

.td-task-note {
  font-size: 0.775rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Table action buttons */
.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background-color: var(--bg-primary);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

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

.btn-icon:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-main);
}

.btn-icon.btn-icon-complete:hover {
  background-color: var(--completed-bg);
  color: var(--accent-hover);
  border-color: #a7f3d0;
}

.btn-icon.btn-icon-edit:hover {
  background-color: var(--progress-bg);
  color: var(--progress-color);
  border-color: #bfdbfe;
}

.btn-icon.btn-icon-delete:hover {
  background-color: var(--urgent-bg);
  color: var(--urgent-color);
  border-color: #fecaca;
}

.btn-deliverable {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background-color: #eff6ff;
  color: #3b82f6;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-deliverable:hover {
  background-color: #dbeafe;
  color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
}

.btn-deliverable i {
  width: 18px;
  height: 18px;
}

/* ----------------------------------------------------
   10. MODALS & FORMS
---------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

/* Modal Slide-over (Drawer style for Task Form) */
.modal-drawer {
  position: absolute;
  right: -450px;
  top: 0;
  height: 100%;
  width: 100%;
  max-width: 450px;
  background-color: var(--bg-primary);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-drawer {
  right: 0;
}

/* Standard Dialog Center Modal (for completion pop-up) */
.modal-dialog {
  background-color: var(--bg-primary);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

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

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

.modal-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
}

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

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

.modal-body {
  padding: 24px;
  flex-grow: 1;
  overflow-y: auto;
}

.modal-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

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

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 0.875rem;
  background-color: var(--bg-primary);
  transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-light);
}

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

.form-help {
  display: block;
  margin-top: 4px;
  font-size: 0.725rem;
}

.input-with-button {
  display: flex;
  gap: 8px;
}

.input-with-button input {
  flex-grow: 1;
}

/* ----------------------------------------------------
   11. TIMELINE & ACTIVITIES
---------------------------------------------------- */
.activity-timeline {
  position: relative;
  list-style: none;
  padding-left: 20px;
}

.activity-timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background-color: var(--border-light);
}

.activity-item {
  position: relative;
  padding-bottom: 24px;
}

.activity-item:last-child {
  padding-bottom: 0;
}

.activity-marker {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--border-dark);
  border: 2px solid var(--bg-primary);
}

.activity-item.create .activity-marker { background-color: var(--progress-color); }
.activity-item.complete .activity-marker { background-color: var(--completed-color); }
.activity-item.update .activity-marker { background-color: var(--high-color); }
.activity-item.delete .activity-marker { background-color: var(--urgent-color); }

.activity-content {
  font-size: 0.875rem;
}

.activity-time {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ----------------------------------------------------
   12. SETTINGS PANEL STYLING
---------------------------------------------------- */
.settings-section {
  padding: 16px 0;
}

.settings-section:first-child {
  padding-top: 0;
}

.settings-section.border-top {
  border-top: 1px solid var(--border-light);
  margin-top: 16px;
}

.settings-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.settings-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.connection-status-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  padding: 16px;
  border-radius: 10px;
  margin-top: 16px;
}

.connection-status-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.connection-status-info .label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ----------------------------------------------------
   13. RESPONSIVE DESIGN
---------------------------------------------------- */

/* Tablet & Mobile Layouts */
@media (max-width: 1024px) {
  .dashboard-details-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }
  
  /* Sidebar responsive toggle setup */
  .sidebar {
    left: calc(-1 * var(--sidebar-width));
  }
  
  .sidebar.open {
    left: 0;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .sidebar-toggle-btn {
    display: flex;
  }
  
  .top-header {
    padding: 0 16px;
  }
  
  .header-left .header-title p {
    display: none;
  }
  
  .header-left .header-title h1 {
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
  }
  
  .header-right {
    gap: 8px;
  }
  
  .header-right .btn-primary span {
    display: none;
  }
  
  .header-right .btn-primary {
    padding: 8px;
    width: 40px;
    height: 40px;
    justify-content: center;
  }
  
  .view-container {
    padding: 16px;
  }
  
  .stats-grid {
    gap: 16px;
    margin-bottom: 24px;
  }
  
  .panel-toolbar {
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-filters-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .search-box {
    min-width: 100%;
    max-width: 100%;
  }
  
  .filters-row {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 4px;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
  }
  
  .filters-row::-webkit-scrollbar {
    display: none;
  }
  
  .filter-select {
    width: auto;
    white-space: nowrap;
  }
  
  .tasks-table th, .tasks-table td {
    padding: 12px 16px;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .modal-drawer {
    max-width: 100%;
  }
  
  .status-indicator .status-text {
    display: none;
  }
  
  .status-indicator {
    padding: 6px;
  }
  
  .hide-mobile {
    display: none !important;
  }
}

/* Task lead badges */
.task-title-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.task-title-wrapper > div:last-child {
  min-width: 0;
  flex: 1;
}

.task-lead-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.task-lead-badge.type-green { background-color: #ecfdf5; color: #059669; }
.task-lead-badge.type-blue { background-color: #eff6ff; color: #2563eb; }
.task-lead-badge.type-orange { background-color: #fff7ed; color: #ea580c; }
.task-lead-badge.type-red { background-color: #fef2f2; color: #dc2626; }
.task-lead-badge.type-purple { background-color: #faf5ff; color: #9333ea; }
.task-lead-badge.type-gray { background-color: #f9fafb; color: #4b5563; }

.task-lead-badge i {
  width: 18px;
  height: 18px;
}

/* Task type cell wrapper */
.type-cell-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.type-cell-wrapper i {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

/* Stat card trend lines spacing */
.stat-card-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-card-graph {
  width: 60px;
  height: 30px;
  display: flex;
  align-items: flex-end;
  opacity: 0.85;
}

.mini-graph {
  width: 100%;
  height: 100%;
}
