/* ============================================
   ENTERPRISE DASHBOARD - PROFESSIONAL UI
   ============================================ */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #f1f5f9 50%, #f8fafc 75%, #ffffff 100%);
  min-height: 100vh;
  color: #1e293b;
  line-height: 1.6;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
    url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="%23e2e8f0" stroke-width="1" opacity="0.3"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>') repeat;
  pointer-events: none;
  z-index: -1;
}

[data-theme="dark"] body {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #1e293b 75%, #0f172a 100%);
  color: #f1f5f9;
}

[data-theme="dark"] body::before {
  background: 
    radial-gradient(circle at 20% 20%, rgba(129, 140, 248, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
    url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="%23334155" stroke-width="1" opacity="0.2"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>') repeat;
}

.main-content {
  margin-top: 70px;
  min-height: calc(100vh - 70px);
}

.dashboard-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem 2.5rem;
  animation: fadeInUp 0.5s ease;
}

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

/* Dashboard Header */
.dashboard-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(40px) saturate(150%);
  -webkit-backdrop-filter: blur(40px) saturate(150%);
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
  animation: slideInLeft 0.6s ease;
}

[data-theme="dark"] .dashboard-header {
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.12) 0%, transparent 28%),
    radial-gradient(circle at 78% 18%, rgba(139, 92, 246, 0.18) 0%, transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(22, 30, 58, 0.96) 48%, rgba(36, 27, 65, 0.94) 100%);
  border: 1px solid rgba(96, 165, 250, 0.18);
  box-shadow:
    0 18px 40px rgba(2, 6, 23, 0.42),
    inset 0 1px 0 rgba(191, 219, 254, 0.08),
    inset 0 -1px 0 rgba(76, 29, 149, 0.16);
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.dashboard-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: 
    radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%),
    radial-gradient(circle at 60% 40%, rgba(59, 130, 246, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

[data-theme="dark"] .dashboard-header::before {
  background: 
    radial-gradient(circle, rgba(129, 140, 248, 0.16) 0%, transparent 66%),
    radial-gradient(circle at 60% 40%, rgba(56, 189, 248, 0.08) 0%, transparent 58%);
}

[data-theme="dark"] .dashboard-header::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0%, transparent 18%, transparent 82%, rgba(255, 255, 255, 0.02) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 22%, transparent 78%, rgba(15, 23, 42, 0.12) 100%);
}

.header-content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
}

.header-left {
  flex: 1;
}

.header-greeting {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 0.75rem;
}

[data-theme="dark"] .header-greeting {
  color: #cbd5e1;
}

.header-greeting span:first-child {
  font-size: 1.5rem;
  animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

.dashboard-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #0f172a;
}

[data-theme="dark"] .dashboard-header h1 {
  color: #ffffff;
}

.dashboard-subtitle {
  font-size: 1rem;
  color: #64748b;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

[data-theme="dark"] .dashboard-subtitle {
  color: #c7d2fe;
}

/* Header Actions */
.header-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.header-btn.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-clip: border-box;
  color: white;
  isolation: isolate;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.header-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.header-btn:not(.primary) {
  background: rgba(255, 255, 255, 0.8);
  color: #475569;
  border-color: #e2e8f0;
}

[data-theme="dark"] .header-btn:not(.primary) {
  background: rgba(51, 65, 85, 0.5);
  color: #cbd5e1;
  border-color: #475569;
}

.header-btn:not(.primary):hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: #667eea;
  color: #667eea;
}

/* Header Stats */
.header-right {
  display: flex;
  gap: 1.5rem;
}

.header-stat-card {
  text-align: center;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  min-width: 120px;
}

[data-theme="dark"] .header-stat-card {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(71, 85, 105, 0.4);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(148, 163, 184, 0.1);
}

.header-stat-value {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.header-stat-label {
  font-size: 0.8125rem;
  color: #64748b;
  font-weight: 500;
}

[data-theme="dark"] .header-stat-label {
  color: #94a3b8;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(40px) saturate(150%);
  -webkit-backdrop-filter: blur(40px) saturate(150%);
  border-radius: 16px;
  padding: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  animation: fadeInScale 0.5s ease;
  animation-fill-mode: both;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .stat-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(71, 85, 105, 0.3);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(148, 163, 184, 0.1);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

[data-theme="dark"] .stat-card::before {
  background: 
    radial-gradient(circle at 80% 20%, rgba(129, 140, 248, 0.05) 0%, transparent 50%);
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .stat-card:hover {
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(148, 163, 184, 0.15);
}

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

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  color: #667eea;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #10b981;
  padding: 0.25rem 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 20px;
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
  line-height: 1;
}

[data-theme="dark"] .stat-value {
  color: #ffffff;
}

.stat-label {
  font-size: 0.9375rem;
  color: #64748b;
  font-weight: 500;
}

[data-theme="dark"] .stat-label {
  color: #94a3b8;
}

/* Integrity-style metric cards for Home dashboard stats row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.78rem;
  margin-bottom: 0.95rem;
}

.stats-grid .stat-card.stat-metric {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(129, 140, 248, 0.34) !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  padding: 0.62rem 1rem !important;
  min-height: 92px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.24), rgba(99, 102, 241, 0.14)) !important;
  transition: all 0.25s ease;
}

.stats-grid .stat-card.stat-metric::before {
  content: none !important;
}

.stats-grid .stat-card.stat-metric::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.82;
  background: radial-gradient(circle at 88% 14%, rgba(255, 255, 255, 0.34), transparent 52%);
}

.stats-grid .stat-card.stat-metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(129, 140, 248, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.stats-grid .stat-card.stat-metric .stat-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.58rem;
  width: 100%;
  z-index: 1;
}

.stats-grid .stat-card.stat-metric .stat-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.58rem;
}

.stats-grid .stat-card.stat-metric .stat-icon {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(129, 140, 248, 0.26);
  color: #c7d2fe;
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.34), 0 6px 14px rgba(99, 102, 241, 0.2);
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1;
}

.stats-grid .stat-card.stat-metric .stat-icon i {
  font-size: 0.88rem;
  line-height: 1;
}

.stats-grid .stat-card.stat-metric .stat-value {
  font-size: clamp(1.18rem, 1.45vw, 1.95rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1;
  color: #f8fbff;
  text-shadow: 0 1px 0 rgba(15, 23, 42, 0.28), 0 0 16px rgba(255, 255, 255, 0.18);
  white-space: nowrap;
  min-width: unset;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  text-align: right;
}

.stats-grid .stat-card.stat-metric .stat-label {
  font-size: 0.62rem;
  color: #c7d2fe;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin: 0;
  line-height: 1.22;
  white-space: normal;
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(129, 140, 248, 0.2);
  border: 1px solid rgba(167, 180, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0.96;
}

.stats-grid .stat-card.stat-metric.metric-exams {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.3), rgba(37, 99, 235, 0.22)) !important;
  border-color: rgba(56, 189, 248, 0.52) !important;
}

.stats-grid .stat-card.stat-metric.metric-candidates {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.32), rgba(99, 102, 241, 0.24)) !important;
  border-color: rgba(167, 139, 250, 0.52) !important;
}

.stats-grid .stat-card.stat-metric.metric-questions {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.26), rgba(249, 115, 22, 0.24)) !important;
  border-color: rgba(251, 146, 60, 0.52) !important;
}

.stats-grid .stat-card.stat-metric.metric-certificates {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.28), rgba(16, 185, 129, 0.22)) !important;
  border-color: rgba(52, 211, 153, 0.52) !important;
}

.stats-grid .stat-card.stat-metric.metric-exams .stat-label {
  color: #cffafe;
  background: rgba(34, 211, 238, 0.22);
  border-color: rgba(103, 232, 249, 0.44);
}

.stats-grid .stat-card.stat-metric.metric-candidates .stat-label {
  color: #e9ddff;
  background: rgba(167, 139, 250, 0.22);
  border-color: rgba(196, 181, 253, 0.44);
}

.stats-grid .stat-card.stat-metric.metric-questions .stat-label {
  color: #ffe4cf;
  background: rgba(249, 115, 22, 0.22);
  border-color: rgba(253, 186, 116, 0.44);
}

.stats-grid .stat-card.stat-metric.metric-certificates .stat-label {
  color: #ccfbf1;
  background: rgba(45, 212, 191, 0.22);
  border-color: rgba(94, 234, 212, 0.44);
}

.stats-grid .stat-card.stat-metric.metric-exams .stat-icon {
  background: rgba(14, 116, 144, 0.34);
  box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.42), 0 8px 16px rgba(14, 116, 144, 0.28);
}

.stats-grid .stat-card.stat-metric.metric-candidates .stat-icon {
  background: rgba(109, 40, 217, 0.28);
  box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.4), 0 8px 16px rgba(109, 40, 217, 0.24);
}

.stats-grid .stat-card.stat-metric.metric-questions .stat-icon {
  background: rgba(194, 65, 12, 0.3);
  box-shadow: inset 0 0 0 1px rgba(253, 186, 116, 0.44), 0 8px 16px rgba(194, 65, 12, 0.24);
}

.stats-grid .stat-card.stat-metric.metric-certificates .stat-icon {
  background: rgba(13, 148, 136, 0.3);
  box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.42), 0 8px 16px rgba(13, 148, 136, 0.24);
}

.stats-grid .stat-card.stat-metric:hover .stat-icon {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.42), 0 10px 18px rgba(99, 102, 241, 0.28);
}

[data-theme="light"] .stats-grid .stat-card.stat-metric {
  background: var(--bg-card) !important;
  border: 1px solid var(--gray-200) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08) !important;
  min-height: 98px !important;
  padding: 0.82rem 1.08rem !important;
}

[data-theme="light"] .stats-grid .stat-card.stat-metric.metric-exams {
  background: var(--bg-card) !important;
  border-color: var(--gray-200) !important;
}

[data-theme="light"] .stats-grid .stat-card.stat-metric.metric-candidates {
  background: var(--bg-card) !important;
  border-color: var(--gray-200) !important;
}

[data-theme="light"] .stats-grid .stat-card.stat-metric.metric-questions {
  background: var(--bg-card) !important;
  border-color: var(--gray-200) !important;
}

[data-theme="light"] .stats-grid .stat-card.stat-metric.metric-certificates {
  background: var(--bg-card) !important;
  border-color: var(--gray-200) !important;
}

[data-theme="light"] .stats-grid .stat-card.stat-metric::after {
  content: none !important;
}

[data-theme="light"] .stats-grid .stat-card.stat-metric:hover {
  border-color: rgba(148, 163, 184, 0.42) !important;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12) !important;
}

[data-theme="light"] .stats-grid .stat-card.stat-metric .stat-value {
  color: #1f2937;
  font-weight: 800 !important;
  letter-spacing: -0.045em !important;
  text-shadow: none;
}

[data-theme="light"] .stats-grid .stat-card.stat-metric .stat-label {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #728092 !important;
  display: block !important;
  font-size: 0.66rem !important;
  letter-spacing: 0 !important;
  padding: 0 !important;
  text-transform: none !important;
}

[data-theme="light"] .stats-grid .stat-card.stat-metric .stat-icon {
  color: var(--stat-icon-color, var(--primary)) !important;
  background: var(--stat-icon-bg, rgba(99, 102, 241, 0.12)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 8px 16px rgba(15, 23, 42, 0.08) !important;
}

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.card-col-3 {
  grid-column: span 3;
}

.card-col-9 {
  grid-column: span 9;
}

/* Make Quick Actions and Notifications align at same height */
.card-col-3 .dashboard-card,
.card-col-9 .dashboard-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-col-3 .dashboard-card .action-grid,
.card-col-9 .dashboard-card .notification-list {
  flex: 1;
}

@media (max-width: 1200px) {
  .card-col-3,
  .card-col-9 {
    grid-column: span 12;
  }
}

/* Dashboard Card */
.dashboard-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(40px) saturate(150%);
  -webkit-backdrop-filter: blur(40px) saturate(150%);
  border-radius: 16px;
  padding: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .dashboard-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(71, 85, 105, 0.3);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(148, 163, 184, 0.1);
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.02) 0%, transparent 50%);
  pointer-events: none;
}

[data-theme="dark"] .dashboard-card::before {
  background: 
    radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.04) 0%, transparent 50%);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.4);
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .card-header {
  border-bottom-color: rgba(71, 85, 105, 0.4);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

[data-theme="dark"] .card-title {
  color: #ffffff;
}

.card-title i {
  font-size: 1rem;
  color: #667eea;
}

.view-all {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #667eea;
  text-decoration: none;
  transition: all 0.2s ease;
}

.view-all:hover {
  gap: 0.75rem;
  color: #764ba2;
}

/* Action Grid */
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
  position: relative;
  z-index: 1;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.75rem 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 80px;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .action-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 2px solid rgba(71, 85, 105, 0.4);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(148, 163, 184, 0.1);
}

/* Gradient Backgrounds for Each Button */
.action-btn:nth-child(1) {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-color: rgba(99, 102, 241, 0.2);
}

.action-btn:nth-child(2) {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
  border-color: rgba(16, 185, 129, 0.2);
}

.action-btn:nth-child(3) {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
  border-color: rgba(59, 130, 246, 0.2);
}

.action-btn:nth-child(4) {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
  border-color: rgba(245, 158, 11, 0.2);
}

.action-btn:nth-child(5) {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.1) 0%, rgba(219, 39, 119, 0.1) 100%);
  border-color: rgba(236, 72, 153, 0.2);
}

.action-btn:nth-child(6) {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
  border-color: rgba(168, 85, 247, 0.2);
}

.action-btn:nth-child(7) {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
  border-color: rgba(239, 68, 68, 0.2);
}

.action-btn:nth-child(8) {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.1) 0%, rgba(13, 148, 136, 0.1) 100%);
  border-color: rgba(20, 184, 166, 0.2);
}

.action-btn:nth-child(9) {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
  border-color: rgba(251, 146, 60, 0.2);
}

.action-btn:nth-child(10) {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
  border-color: rgba(14, 165, 233, 0.2);
}

/* Dark Mode Gradients */
[data-theme="dark"] .action-btn:nth-child(1) {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  border-color: rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .action-btn:nth-child(2) {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
  border-color: rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .action-btn:nth-child(3) {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
  border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .action-btn:nth-child(4) {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
  border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .action-btn:nth-child(5) {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(219, 39, 119, 0.15) 100%);
  border-color: rgba(236, 72, 153, 0.3);
}

[data-theme="dark"] .action-btn:nth-child(6) {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(147, 51, 234, 0.15) 100%);
  border-color: rgba(168, 85, 247, 0.3);
}

[data-theme="dark"] .action-btn:nth-child(7) {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
  border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .action-btn:nth-child(8) {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(13, 148, 136, 0.15) 100%);
  border-color: rgba(20, 184, 166, 0.3);
}

[data-theme="dark"] .action-btn:nth-child(9) {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.15) 0%, rgba(249, 115, 22, 0.15) 100%);
  border-color: rgba(251, 146, 60, 0.3);
}

[data-theme="dark"] .action-btn:nth-child(10) {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
  border-color: rgba(56, 189, 248, 0.3);
}

/* Shimmer Effect on Hover */
.action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.action-btn:hover::before {
  left: 100%;
}

/* Hover Effects - Each Button Gets Unique Transform */
.action-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .action-btn:hover {
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(148, 163, 184, 0.15);
}

.action-btn:nth-child(1):hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  border-color: #6366f1;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.action-btn:nth-child(2):hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
  border-color: #10b981;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.action-btn:nth-child(3):hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.2) 100%);
  border-color: #3b82f6;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.action-btn:nth-child(4):hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.2) 100%);
  border-color: #f59e0b;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.action-btn:nth-child(5):hover {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2) 0%, rgba(219, 39, 119, 0.2) 100%);
  border-color: #ec4899;
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.3);
}

.action-btn:nth-child(6):hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(147, 51, 234, 0.2) 100%);
  border-color: #a855f7;
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.3);
}

.action-btn:nth-child(7):hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
  border-color: #ef4444;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

.action-btn:nth-child(8):hover {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.2) 0%, rgba(13, 148, 136, 0.2) 100%);
  border-color: #14b8a6;
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.3);
}

.action-btn:nth-child(9):hover {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.2) 0%, rgba(249, 115, 22, 0.2) 100%);
  border-color: #fb923c;
  box-shadow: 0 6px 20px rgba(251, 146, 60, 0.3);
}

.action-btn:nth-child(10):hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(37, 99, 235, 0.2) 100%);
  border-color: #0ea5e9;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.25);
}

/* Icon Colors */
.action-btn:nth-child(1) i { color: #6366f1; }
.action-btn:nth-child(2) i { color: #10b981; }
.action-btn:nth-child(3) i { color: #3b82f6; }
.action-btn:nth-child(4) i { color: #f59e0b; }
.action-btn:nth-child(5) i { color: #ec4899; }
.action-btn:nth-child(6) i { color: #a855f7; }
.action-btn:nth-child(7) i { color: #ef4444; }
.action-btn:nth-child(8) i { color: #14b8a6; }
.action-btn:nth-child(9) i { color: #fb923c; }
.action-btn:nth-child(10) i { color: #0284c7; }

[data-theme="dark"] .action-btn:nth-child(1) i { color: #a5b4fc; }
[data-theme="dark"] .action-btn:nth-child(2) i { color: #6ee7b7; }
[data-theme="dark"] .action-btn:nth-child(3) i { color: #93c5fd; }
[data-theme="dark"] .action-btn:nth-child(4) i { color: #fbbf24; }
[data-theme="dark"] .action-btn:nth-child(5) i { color: #f9a8d4; }
[data-theme="dark"] .action-btn:nth-child(6) i { color: #c4b5fd; }
[data-theme="dark"] .action-btn:nth-child(7) i { color: #fca5a5; }
[data-theme="dark"] .action-btn:nth-child(8) i { color: #5eead4; }
[data-theme="dark"] .action-btn:nth-child(9) i { color: #fdba74; }
[data-theme="dark"] .action-btn:nth-child(10) i { color: #7dd3fc; }

.action-btn i {
  font-size: 1.25rem;
  transition: all 0.3s ease;
}

.action-btn:hover i {
  transform: scale(1.1) rotate(5deg);
}

.action-btn span {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  line-height: 1.2;
}

[data-theme="dark"] .action-btn span {
  color: #cbd5e1;
}

.action-btn:nth-child(1):hover span { color: #6366f1; }
.action-btn:nth-child(2):hover span { color: #10b981; }
.action-btn:nth-child(3):hover span { color: #3b82f6; }
.action-btn:nth-child(4):hover span { color: #f59e0b; }
.action-btn:nth-child(5):hover span { color: #ec4899; }
.action-btn:nth-child(6):hover span { color: #a855f7; }
.action-btn:nth-child(7):hover span { color: #ef4444; }
.action-btn:nth-child(8):hover span { color: #14b8a6; }
.action-btn:nth-child(9):hover span { color: #fb923c; }
.action-btn:nth-child(10):hover span { color: #0284c7; }

[data-theme="dark"] .action-btn:nth-child(1):hover span { color: #a5b4fc; }
[data-theme="dark"] .action-btn:nth-child(2):hover span { color: #6ee7b7; }
[data-theme="dark"] .action-btn:nth-child(3):hover span { color: #93c5fd; }
[data-theme="dark"] .action-btn:nth-child(4):hover span { color: #fbbf24; }
[data-theme="dark"] .action-btn:nth-child(5):hover span { color: #f9a8d4; }
[data-theme="dark"] .action-btn:nth-child(6):hover span { color: #c4b5fd; }
[data-theme="dark"] .action-btn:nth-child(7):hover span { color: #fca5a5; }
[data-theme="dark"] .action-btn:nth-child(8):hover span { color: #5eead4; }
[data-theme="dark"] .action-btn:nth-child(9):hover span { color: #fdba74; }
[data-theme="dark"] .action-btn:nth-child(10):hover span { color: #7dd3fc; }

/* Active/Press Effect */
.action-btn:active {
  transform: translateY(-1px) scale(0.98);
}

/* Responsive */
@media (max-width: 768px) {
  .action-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Notification List */
.notification-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.notification-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

[data-theme="dark"] .notification-item {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(71, 85, 105, 0.4);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(148, 163, 184, 0.1);
}

.notification-item:hover {
  background: rgba(99, 102, 241, 0.05);
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateX(4px);
  box-shadow: 
    0 4px 12px rgba(99, 102, 241, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .notification-item:hover {
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 
    0 4px 12px rgba(99, 102, 241, 0.2),
    inset 0 1px 0 rgba(148, 163, 184, 0.15);
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.notification-icon.info {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.notification-icon.warning {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.notification-icon.success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.notification-content {
  flex: 1;
}

.notification-text {
  font-size: 0.9375rem;
  color: #1e293b;
  margin: 0 0 0.25rem 0;
  line-height: 1.5;
}

[data-theme="dark"] .notification-text {
  color: #e2e8f0;
}

.notification-time {
  font-size: 0.8125rem;
  color: #64748b;
}

[data-theme="dark"] .notification-time {
  color: #94a3b8;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  position: relative;
}

.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 35px;
  top: 70px;
  bottom: -24px;
  width: 2px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.3) 0%, transparent 100%);
}

.timeline-date {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.timeline-day {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.timeline-month {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  opacity: 0.9;
}

.timeline-content {
  flex: 1;
  padding: 0.5rem 0;
}

.timeline-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
}

[data-theme="dark"] .timeline-title {
  color: #ffffff;
}

.timeline-meta {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}

[data-theme="dark"] .timeline-meta {
  color: #94a3b8;
}

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

.btn-small {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  background: rgba(99, 102, 241, 0.1);
  color: #667eea;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.btn-small:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: #667eea;
  transform: translateY(-1px);
}

/* Activity List */
.activity-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.activity-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 10px;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .activity-item {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.3);
}

.activity-item:hover {
  background: rgba(99, 102, 241, 0.05);
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .activity-item:hover {
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  color: #667eea;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.875rem;
}

.activity-content {
  flex: 1;
}

.activity-text {
  font-size: 0.875rem;
  color: #1e293b;
  margin: 0 0 0.25rem 0;
}

[data-theme="dark"] .activity-text {
  color: #e2e8f0;
}

.activity-text strong {
  font-weight: 600;
  color: #0f172a;
}

[data-theme="dark"] .activity-text strong {
  color: #ffffff;
}

.activity-time {
  font-size: 0.75rem;
  color: #64748b;
}

[data-theme="dark"] .activity-time {
  color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 1400px) {
  .dashboard-container {
    padding: 2rem 1.5rem;
  }
  
  .header-content {
    flex-direction: column;
    gap: 2rem;
  }
  
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    padding: 1.5rem 1rem;
  }
  
  .dashboard-header {
    padding: 1.5rem;
  }
  
  .dashboard-header h1 {
    font-size: 1.75rem;
  }
  
  .header-actions {
    flex-direction: column;
  }
  
  .header-btn {
    width: 100%;
    justify-content: center;
  }
  
  .header-right {
    flex-direction: column;
    gap: 1rem;
  }
  
  .header-stat-card {
    width: 100%;
  }
  
  .stats-grid {
    --dash-stat-min-h: 74px;
    --dash-stat-py: 0.38rem;
    --dash-stat-px: 0.58rem;
    --dash-stat-main-gap: 0.54rem;
    --dash-stat-left-gap: 0.34rem;
    --dash-stat-icon-size: 1.36rem;
    --dash-stat-value-minw: 86px;
    grid-template-columns: 1fr;
  }

  .stats-grid .stat-card.stat-metric .stat-value {
    font-size: 1.46rem;
  }

  .stats-grid .stat-card.stat-metric .stat-label {
    font-size: 0.55rem;
    line-height: 1.02;
  }
  
  .action-grid {
    grid-template-columns: 1fr;
  }
  
  .timeline-item {
    gap: 1rem;
  }
  
  .timeline-date {
    width: 60px;
    height: 60px;
  }
  
  .timeline-day {
    font-size: 1.25rem;
  }
}

/* Smooth Transitions */
* {
  transition: background-color 0.3s ease, 
              border-color 0.3s ease, 
              color 0.3s ease;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Preserve the dashboard's per-action color identity while keeping compact tiles. */
.dashboard-container .action-btn,
.dashboard-container .action-btn:nth-child(n) {
  min-height: 76px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.dashboard-container .action-btn::before {
  display: none;
}

.dashboard-container .action-btn:hover,
.dashboard-container .action-btn:nth-child(n):hover {
  transform: translateY(-2px);
}

.dashboard-container .card-col-3 .card-title i {
  color: #e5a915;
}
