/* Modern Theme CSS for Smart Energy Campaign Admin */

:root {
  /* Modern Color Palette */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --gradient-warning: linear-gradient(135deg, #ffb347 0%, #ffcc33 100%);
  --gradient-danger: linear-gradient(135deg, #ff8a80 0%, #ff5722 100%);
  --gradient-info: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
  
  /* Shadows */
  --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-dark: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
  
  /* Border Radius */
  --border-radius: 16px;
  --border-radius-lg: 24px;
  --border-radius-sm: 8px;
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s ease;
}

[data-bs-theme="dark"] {
  --bs-body-bg: #0d1117;
  --bs-body-color: #f0f6fc;
  --bs-border-color: #30363d;
  --card-bg: #161b22;
  --card-border: #30363d;
  --sidebar-bg: #0d1117;
  --navbar-bg: #161b22;
}

[data-bs-theme="light"] {
  --bs-body-bg: #f8fafc;
  --bs-body-color: #1e293b;
  --bs-border-color: #e2e8f0;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --sidebar-bg: #ffffff;
  --navbar-bg: #ffffff;
}

body {
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
}

/* Dashboard Layout */
.dashboard-page {
  padding: 1.5rem;
}

.dashboard-hero {
  background: var(--gradient-hero);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  color: #f8fafc;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
  box-shadow: 0 20px 60px rgba(17, 24, 39, 0.35);
}

.dashboard-hero .eyebrow {
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.85rem;
  opacity: 0.9;
}

.text-hero-muted {
  color: rgba(248, 250, 252, 0.75);
}

.pulse-dot {
  font-size: 0.55rem;
}

.hero-left {
  flex: 1;
  min-width: 260px;
}

.hero-stats {
  display: flex;
  gap: 0.75rem;
  min-width: 280px;
  width: 100%;
  max-width: 560px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.hero-stats .hero-stat {
  flex: 1 1 0;
  min-width: 0;
}

.hero-stat {
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--border-radius);
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
}

.hero-stat .stat-label {
  font-size: 0.85rem;
  opacity: 0.85;
}

.hero-stat .stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

.hero-stat .stat-sub {
  font-size: 0.85rem;
  opacity: 0.8;
}

[data-bs-theme="light"] .hero-stat {
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.08);
}

/* Hero Section */
.hero-section {
  background: var(--gradient-primary);
  border-radius: var(--border-radius-lg);
  color: white;
  padding: 3rem 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.1"><circle cx="7" cy="7" r="4"/><circle cx="53" cy="7" r="4"/><circle cx="7" cy="53" r="4"/><circle cx="53" cy="53" r="4"/></g></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* Feature Cards */
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

[data-bs-theme="dark"] .feature-card {
  box-shadow: var(--shadow-dark);
}

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

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.feature-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.25rem;
  color: white;
}

.icon-upload { background: var(--gradient-success); }
.icon-users { background: var(--gradient-primary); }
.icon-phone { background: var(--gradient-warning); }
.icon-dashboard { background: var(--gradient-info); }
.icon-campaigns { background: var(--gradient-danger); }
.icon-agents { background: var(--gradient-primary); }

/* Modern Buttons */
.btn-modern {
  border-radius: var(--border-radius);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.btn-modern * {
  position: relative;
  z-index: 2;
}

.btn-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
  z-index: 1;
}

.btn-modern:hover::before {
  transform: translateX(100%);
}

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

.btn-primary-modern {
  background: var(--gradient-primary);
  color: white !important;
  border: 2px solid transparent;
}

.btn-primary-modern:hover {
  color: white !important;
  background: linear-gradient(135deg, #5a6fd8 0%, #6b4d92 100%);
}

.btn-success-modern {
  background: var(--gradient-success);
  color: white !important;
  border: 2px solid transparent;
}

.btn-success-modern:hover {
  color: white !important;
  background: linear-gradient(135deg, #0f8a7e 0%, #32d46d 100%);
}

.btn-warning-modern {
  background: var(--gradient-warning);
  color: white !important;
  border: 2px solid transparent;
}

.btn-warning-modern:hover {
  color: white !important;
  background: linear-gradient(135deg, #e6a03d 0%, #e6b829 100%);
}

.btn-danger-modern {
  background: var(--gradient-danger);
  color: white !important;
  border: 2px solid transparent;
}

.btn-danger-modern:hover {
  color: white !important;
  background: linear-gradient(135deg, #e67c70 0%, #e64e12 100%);
}

.btn-info-modern {
  background: var(--gradient-info);
  color: white !important;
  border: 2px solid transparent;
}

.btn-info-modern:hover {
  color: white !important;
  background: linear-gradient(135deg, #2563eb 0%, #1a3bb8 100%);
}

/* Dark mode specific button adjustments */
[data-bs-theme="dark"] .btn-modern {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .btn-modern:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Light mode specific button adjustments */
[data-bs-theme="light"] .btn-modern {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .btn-modern:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Small button variant */
.btn-modern.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Additional Bootstrap compatibility */
.btn-modern i {
  margin-right: 0.5rem;
  position: relative;
  z-index: 2;
}

.btn-modern:last-child i,
.btn-modern:only-child i {
  margin-right: 0.5rem;
}

/* Action Buttons with Labels - Improved Design */
.action-btn-group {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
  align-items: center;
  width: 100%;
  max-width: 500px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.4rem 0.5rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: var(--transition-fast);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  min-height: 30px;
  min-width: 85px;
}

.action-btn i {
  margin-right: 0;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.action-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

/* Action Button Variants */
.action-btn-view {
  background: linear-gradient(135deg, #17a2b8, #20c997);
  color: white;
  border-color: #17a2b8;
}

.action-btn-view:hover {
  background: linear-gradient(135deg, #138496, #1aa179);
  color: white;
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.action-btn-edit {
  background: linear-gradient(135deg, #ffc107, #fd7e14);
  color: #212529;
  border-color: #ffc107;
}

.action-btn-edit:hover {
  background: linear-gradient(135deg, #ffcd39, #fd7e14);
  color: #212529;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.action-btn-copy {
  background: linear-gradient(135deg, #0d6efd, #6610f2);
  color: white;
  border-color: #0d6efd;
}

.action-btn-copy:hover {
  background: linear-gradient(135deg, #0b5ed7, #5a0fc8);
  color: white;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.action-btn-toggle {
  background: linear-gradient(135deg, #198754, #20c997);
  color: white;
  border-color: #198754;
}

.action-btn-toggle:hover {
  background: linear-gradient(135deg, #157347, #1aa179);
  color: white;
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

.action-btn-toggle.pause {
  background: linear-gradient(135deg, #fd7e14, #ffc107);
  color: #212529;
  border-color: #fd7e14;
}

.action-btn-toggle.pause:hover {
  background: linear-gradient(135deg, #fd7e14, #ffcd39);
  color: #212529;
  box-shadow: 0 4px 12px rgba(253, 126, 20, 0.3);
}

.action-btn-delete {
  background: linear-gradient(135deg, #dc3545, #e74c3c);
  color: white;
  border-color: #dc3545;
}

.action-btn-delete:hover {
  background: linear-gradient(135deg, #c82333, #dc3545);
  color: white;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.action-btn-activate {
  background: linear-gradient(135deg, #198754, #20c997);
  color: white;
  border-color: #198754;
}

.action-btn-activate:hover {
  background: linear-gradient(135deg, #157347, #1aa179);
  color: white;
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

.action-btn-deactivate {
  background: linear-gradient(135deg, #dc3545, #e74c3c);
  color: white;
  border-color: #dc3545;
}

.action-btn-deactivate:hover {
  background: linear-gradient(135deg, #c82333, #dc3545);
  color: white;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.action-btn-logs {
  background: linear-gradient(135deg, #374151, #4b5563);
  color: white;
  border-color: #374151;
  font-weight: 600;
}

.action-btn-logs:hover {
  background: linear-gradient(135deg, #4b5563, #6b7280);
  color: white;
  box-shadow: 0 4px 12px rgba(55, 65, 81, 0.3);
}

/* Dark Mode Adjustments for Action Buttons */
[data-bs-theme="dark"] .action-btn {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .action-btn:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .action-btn-view:hover {
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.5);
}

[data-bs-theme="dark"] .action-btn-edit:hover {
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.5);
}

[data-bs-theme="dark"] .action-btn-copy:hover {
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.5);
}

[data-bs-theme="dark"] .action-btn-toggle:hover {
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.5);
}

[data-bs-theme="dark"] .action-btn-toggle.pause:hover {
  box-shadow: 0 4px 12px rgba(253, 126, 20, 0.5);
}

[data-bs-theme="dark"] .action-btn-delete:hover {
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.5);
}

[data-bs-theme="dark"] .action-btn-activate:hover {
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.5);
}

[data-bs-theme="dark"] .action-btn-deactivate:hover {
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.5);
}

[data-bs-theme="dark"] .action-btn-logs {
  background: linear-gradient(135deg, #6b7280, #9ca3af);
  color: #1f2937;
  border-color: #6b7280;
  font-weight: 600;
}

[data-bs-theme="dark"] .action-btn-logs:hover {
  background: linear-gradient(135deg, #9ca3af, #d1d5db);
  color: #111827;
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.5);
}

/* Light Mode Adjustments for Action Buttons */
[data-bs-theme="light"] .action-btn {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-bs-theme="light"] .action-btn:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

/* Responsive Design for Action Buttons */
@media (max-width: 768px) {
  .action-btn-group {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem;
    max-width: 100%;
  }

  .action-btn {
    padding: 0.35rem 0.4rem;
    font-size: 0.7rem;
    min-width: 70px;
    min-height: 28px;
  }
}

@media (max-width: 480px) {
  .action-btn-group {
    grid-template-columns: repeat(2, 1fr);
  }

  .action-btn {
    padding: 0.3rem 0.35rem;
    font-size: 0.65rem;
    min-width: 65px;
  }
}

/* Accessibility improvements for action buttons */
.action-btn:focus {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

@media (prefers-reduced-motion: reduce) {
  .action-btn {
    transition: none;
  }

  .action-btn:hover {
    transform: none;
  }
}

/* Ensure text is always visible */
.btn-modern,
.btn-modern:hover,
.btn-modern:focus,
.btn-modern:active {
  text-shadow: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

/* Override any conflicting Bootstrap styles */
.btn-modern:not(:disabled):not(.disabled):active,
.btn-modern:not(:disabled):not(.disabled).active {
  color: white !important;
}

.btn-modern:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .btn-modern {
    transition: none;
  }
  
  .btn-modern::before {
    transition: none;
  }
  
  .btn-modern:hover {
    transform: none;
  }
}

/* Forms */
.form-control-modern,
.form-select-modern {
  border-radius: var(--border-radius);
  border: 2px solid var(--bs-border-color);
  padding: 0.75rem 1rem;
  transition: var(--transition);
  background: var(--card-bg);
  color: var(--bs-body-color);
}

.form-control-modern:focus,
.form-select-modern:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Tables */
.table-modern {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
}

.table-modern th {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 1rem;
  font-weight: 600;
}

.table-modern td {
  padding: 1rem;
  border-color: var(--bs-border-color);
  vertical-align: middle;
}

.table-modern tbody tr:hover {
  background: rgba(102, 126, 234, 0.05);
}

/* Alerts */
.alert-modern {
  border: none;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin: 1rem 0;
}

.alert-success-modern {
  background: linear-gradient(135deg, rgba(17, 153, 142, 0.1) 0%, rgba(56, 239, 125, 0.1) 100%);
  border-left: 4px solid #11998e;
  color: #0d7377;
}

.alert-warning-modern {
  background: linear-gradient(135deg, rgba(255, 179, 71, 0.1) 0%, rgba(255, 204, 51, 0.1) 100%);
  border-left: 4px solid #ffb347;
  color: #d97706;
}

.alert-info-modern {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-left: 4px solid #667eea;
  color: #4f46e5;
}

.alert-danger-modern {
  background: linear-gradient(135deg, rgba(255, 138, 128, 0.1) 0%, rgba(255, 87, 34, 0.1) 100%);
  border-left: 4px solid #ff8a80;
  color: #dc2626;
}

/* Cards */
.card-modern {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: var(--transition);
}

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

.card-modern .card-header {
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  padding: 1rem 1.5rem;
  font-weight: 600;
}

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

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card.soft::before {
  display: none;
}

.stat-card.soft {
  text-align: left;
  box-shadow: var(--shadow-light);
}

[data-bs-theme="dark"] .stat-card.soft {
  box-shadow: var(--shadow-dark);
}

.stat-card-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.stat-card .stat-foot {
  font-size: 0.9rem;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

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

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Progress Bars */
.progress-modern {
  height: 8px;
  border-radius: 50px;
  background: rgba(102, 126, 234, 0.1);
  overflow: hidden;
  margin: 1rem 0;
}

.progress-modern .progress-bar {
  background: var(--gradient-primary);
  border-radius: 50px;
  transition: width 0.3s ease;
}

/* Nav Pills */
.nav-pills-modern .nav-link {
  border-radius: var(--border-radius);
  padding: 0.75rem 1.5rem;
  margin: 0 0.25rem;
  transition: var(--transition);
  border: 2px solid transparent;
  font-weight: 500;
}

.nav-pills-modern .nav-link.active {
  background: var(--gradient-primary);
  color: white;
}

.nav-pills-modern .nav-link:hover:not(.active) {
  background: rgba(102, 126, 234, 0.1);
  border-color: #667eea;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.5s ease-out;
}

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

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Page Transitions */
.page-content {
  animation: slideInUp 0.6s ease-out;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 1rem;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .feature-header {
    flex-direction: column;
    text-align: center;
  }
  
  .feature-icon {
    margin-right: 0;
    margin-bottom: 1rem;
  }
}

/* Quick action row */
.action-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

/* Quick actions - neutral, modern buttons */
.quick-actions .btn-modern {
  background: var(--card-bg);
  color: var(--bs-body-color) !important;
  border: 1px solid var(--bs-border-color);
  box-shadow: none;
}

.quick-actions .btn-modern:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-light);
  border-color: rgba(102, 126, 234, 0.35);
}

[data-bs-theme="dark"] .quick-actions .btn-modern {
  box-shadow: none;
}

[data-bs-theme="dark"] .quick-actions .btn-modern:hover {
  box-shadow: var(--shadow-dark);
}

.quick-actions .btn-modern i {
  margin-right: 0.5rem;
}

/* Pills & badges */
.badge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: white;
  font-size: 0.9rem;
  box-shadow: var(--shadow-light);
}

.badge-pill-primary { background: var(--gradient-info); }
.badge-pill-success { background: var(--gradient-success); }
.badge-pill-warning { background: var(--gradient-warning); color: #2b1c00; }
.badge-pill-info { background: var(--gradient-primary); }

.badge-soft {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

[data-bs-theme="light"] .badge-soft {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.08);
}

/* Panels */
.panel-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-light);
  height: 100%;
}

[data-bs-theme="dark"] .panel-card {
  box-shadow: var(--shadow-dark);
}

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

.chart-placeholder {
  border: 1px dashed var(--bs-border-color);
  border-radius: var(--border-radius);
  padding: 2.5rem 1rem;
  text-align: center;
  background: rgba(102, 126, 234, 0.04);
}

[data-bs-theme="dark"] .chart-placeholder {
  background: rgba(59, 130, 246, 0.05);
}

.chart-area {
  background: var(--card-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--border-radius);
  padding: 1rem;
}

.line-chart {
  width: 100%;
  height: 200px;
}

.line-path {
  fill: none;
  stroke: var(--line-color, #60a5fa);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.line-fill {
  fill: url(#lineGradient);
  stroke: none;
}

.line-dots circle.line-dot {
  fill: var(--line-color, #60a5fa);
  stroke: var(--card-bg);
  stroke-width: 0.5;
  pointer-events: all;
}

.line-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.axis-line {
  stroke: var(--bs-border-color);
  stroke-width: 0.6;
}

.axis-label {
  fill: var(--text-secondary, #6b7280);
  font-size: 2.4px;
}

.axis-label-end {
  text-anchor: end;
}

.line-legend .legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-color, #60a5fa);
  margin-right: 8px;
}

.line-legend .legend-text {
  flex: 1;
}

.line-legend .legend-max {
  font-weight: 600;
}

.chart-donut {
  display: grid;
  gap: 0.75rem;
  text-align: center;
}

.donut-chart {
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
}

.donut-ring {
  fill: transparent;
  stroke: var(--bs-border-color);
  stroke-width: 3.5;
}

.donut-segment {
  fill: transparent;
  stroke-width: 3.5;
  stroke-linecap: round;
}

.donut-segment.success { stroke: #22c55e; }
.donut-segment.danger { stroke: #ef4444; }

.donut-center {
  fill: var(--bs-body-color);
  font-size: 0.32rem;
}

.donut-number {
  font-size: 0.38rem;
  font-weight: 700;
}

.donut-label {
  font-size: 0.28rem;
  fill: var(--text-secondary, #6b7280);
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--card-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.55rem 0.75rem;
}

.legend-label {
  flex: 1;
}

.legend-value {
  font-weight: 600;
}

.dot-success { background: #22c55e; }
.dot-danger { background: #ef4444; }

@media (max-width: 992px) {
  .dashboard-hero {
    flex-direction: column;
  }

  .hero-stats {
    width: 100%;
    max-width: none;
    flex-wrap: wrap;
  }
}

/* Dark mode specific adjustments */
[data-bs-theme="dark"] .stat-value {
  background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-bs-theme="dark"] .alert-success-modern {
  color: #34d399;
}

[data-bs-theme="dark"] .alert-warning-modern {
  color: #fbbf24;
}

[data-bs-theme="dark"] .alert-info-modern {
  color: #60a5fa;
}

[data-bs-theme="dark"] .alert-danger-modern {
  color: #f87171;
}