/* Enhanced Admin Dashboard Styles - Beautiful Purple Theme */
.admin-dashboard-new {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a0f2e 0%, #2d1b4e 50%, #3d2463 100%);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #ffffff;
}

/* Sidebar styles are now in separate component CSS files:
   - AdminDesktopSidebar.css
   - AdminMobileSidebar.css
*/

/* Mobile Topbar (visible only on mobile) */
.admin-mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(135deg, #2d1b4e 0%, #1a0f2e 100%);
  border-bottom: 3px solid #a78bfa;
  padding: 0 20px;
  align-items: center;
  gap: 15px;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.admin-mobile-menu-toggle {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(167, 139, 250, 0.2);
  color: #a78bfa;
  border-radius: 8px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.admin-mobile-menu-toggle:hover {
  background: rgba(167, 139, 250, 0.3);
  color: #c4b5fd;
}

.admin-mobile-topbar-title {
  font-size: 20px;
  font-weight: bold;
  background: linear-gradient(45deg, #a78bfa, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Show mobile topbar only on mobile */
@media (max-width: 768px) {
  .admin-mobile-topbar {
    display: flex;
  }
  
  .admin-main-content {
    padding-top: 60px;
  }
}

/* Admin Main Content */
.admin-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #cccccc;
  position: relative;
  width: 100%;
  overflow-x: auto;
}

.admin-main-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(167, 139, 250, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(167, 139, 250, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

/* Admin Header */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 40px;
  background: linear-gradient(135deg, #2d1b4e 0%, #1a0f2e 100%);
  border-bottom: 3px solid #a78bfa;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
  position: relative;
  z-index: 1;
}

.admin-header-left h1 {
  font-size: 32px;
  font-weight: 800;
  color: #a78bfa;
  margin: 0 0 8px 0;
  text-shadow: 0 3px 12px rgba(167, 139, 250, 0.5);
}

.admin-header-left p {
  font-size: 18px;
  color: #cccccc;
  margin: 0;
  font-weight: 500;
}

.admin-header-right {
  display: flex !important;
  gap: 18px;
  align-items: center;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 10 !important;
}

/* Admin Buttons */
.admin-btn-primary, .admin-btn-secondary, .admin-btn-warning, .admin-btn-danger {
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  position: relative;
  overflow: hidden;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 5 !important;
}

.admin-btn-primary {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: #fff;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.admin-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.7);
}

.admin-btn-secondary {
  background: linear-gradient(135deg, #4a5568, #2d3748);
  color: #a78bfa;
  border: 3px solid #a78bfa;
}

.admin-btn-secondary:hover {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: #fff;
}

.admin-btn-warning {
  background: linear-gradient(135deg, #f6ad55, #ed8936);
  color: #000;
  box-shadow: 0 6px 20px rgba(246, 173, 85, 0.5);
}

.admin-btn-warning:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(246, 173, 85, 0.7);
}

.admin-btn-danger {
  background: linear-gradient(135deg, #e53e3e, #c53030);
  color: white;
  box-shadow: 0 6px 20px rgba(229, 62, 62, 0.5);
}

.admin-btn-danger:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(229, 62, 62, 0.7);
}

.btn-icon {
  font-size: 18px;
}

/* System Alerts */
.system-alerts {
  padding: 25px 40px;
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  border-bottom: 2px solid #4a5568;
}

.system-alerts h3 {
  color: #d4af37;
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 700;
}

.alerts-list {
  display: flex;
  gap: 20px;
  overflow-x: auto;
}

.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 22px;
  border-radius: 12px;
  min-width: 320px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.alert-warning {
  background: linear-gradient(135deg, #f6ad55, #ed8936);
  color: #000;
}

.alert-error {
  background: linear-gradient(135deg, #e53e3e, #c53030);
  color: white;
}

.alert-success {
  background: linear-gradient(135deg, #48bb78, #38a169);
  color: white;
}

.alert-info {
  background: linear-gradient(135deg, #4299e1, #3182ce);
  color: white;
}

.alert-icon {
  font-size: 18px;
}

.alert-message {
  flex: 1;
}

.alert-time {
  font-size: 13px;
  opacity: 0.8;
}

/* Admin Dashboard Content */
.admin-dashboard-content {
  flex: 1;
  padding: 40px;
  background: transparent;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

/* Admin Sections */
.admin-section {
  margin-bottom: 35px;
}

.section-header {
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: #a78bfa;
  margin: 0 0 8px 0;
  text-shadow: 0 2px 8px rgba(167, 139, 250, 0.4);
}

.section-header p {
  font-size: 14px;
  color: #cccccc;
  margin: 0;
  font-weight: 500;
}

/* Admin Cards Grid */
.admin-cards-grid {
  display: grid;
  gap: 20px;
}

.health-grid {
  grid-template-columns: 2fr 1fr 1fr;
}

.users-grid {
  grid-template-columns: repeat(3, 1fr);
}

.financial-grid {
  grid-template-columns: repeat(3, 1fr);
}

.resources-grid {
  grid-template-columns: repeat(3, 1fr);
}

.payouts-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* Admin Cards */
.admin-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 18px 22px;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.25);
  display: flex;
  align-items: center;
  gap: 18px; 
  transition: all 0.3s ease;
  border: 4px solid #a78bfa;
  position: relative;
  overflow: hidden;
}

.admin-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(50px, -50px);
  pointer-events: none;
}

.admin-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(139, 92, 246, 0.35);
  border-color: rgba(167, 139, 250, 0.7);
}

.featured-card {
  border: 3px solid #8b5cf6;
  box-shadow: 0 12px 35px rgba(139, 92, 246, 0.4);
}

/* Card Types with Enhanced Gold Theme */
.system-health .card-icon {
  background: linear-gradient(135deg, #48bb78, #38a169);
  color: white;
}

.server-load .card-icon {
  background: linear-gradient(135deg, #f6ad55, #ed8936);
  color: white;
}

.memory-usage .card-icon {
  background: linear-gradient(135deg, #4299e1, #3182ce);
  color: white;
}

.total-users .card-icon {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: #fff;
}

.blocked-users .card-icon {
  background: linear-gradient(135deg, #e53e3e, #c53030);
  color: white;
}

.active-sessions .card-icon {
  background: linear-gradient(135deg, #9f7aea, #805ad5);
  color: white;
}

.total-revenue .card-icon {
  background: linear-gradient(135deg, #a78bfa, #c4b5fd);
  color: #fff;
}

.today-revenue .card-icon {
  background: linear-gradient(135deg, #8b5cf6, #9f7aea);
  color: white;
}

.error-rate .card-icon {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: white;
}

.api-calls .card-icon {
  background: linear-gradient(135deg, #4299e1, #3182ce);
  color: white;
}

.database-size .card-icon {
  background: linear-gradient(135deg, #ed8936, #dd6b20);
  color: white;
}

.disk-usage .card-icon {
  background: linear-gradient(135deg, #9f7aea, #805ad5);
  color: white;
}

.total-payouts .card-icon {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: #fff;
}

.pending-payouts .card-icon {
  background: linear-gradient(135deg, #f6ad55, #ed8936);
  color: white;
}

.failed-payouts .card-icon {
  background: linear-gradient(135deg, #e53e3e, #c53030);
  color: white;
}

.card-icon {
  width: 55px;
  height: 55px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.card-content h3 {
  font-size: 12px;
  font-weight: 700;
  color: #8b5cf6;
  margin: 0 0 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.card-value {
  font-size: 24px;
  font-weight: 900;
  color: #1a1a2e;
  margin: 0 0 6px 0;
  font-family: 'Courier New', monospace;
  text-shadow: none;
}

.card-subtitle {
  font-size: 11px;
  color: #666666;
  margin: 0;
  font-weight: 600;
}

/* Progress Bars */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
  border-radius: 4px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* Loading State */
.admin-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #2d1b4e, #1a0f2e);
  color: #a78bfa;
}

.loading-spinner {
  width: 70px;
  height: 70px;
  border: 5px solid rgba(167, 139, 250, 0.3);
  border-top: 5px solid #a78bfa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 25px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.admin-loading p {
  color: #a78bfa;
  font-size: 20px;
  margin: 0;
  font-weight: 700;
}

/* Responsive Design */
@media (max-width: 1400px) {
  .health-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .users-grid,
  .financial-grid,
  .resources-grid,
  .payouts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .admin-dashboard-new {
    flex-direction: column;
  }
  
  .admin-header {
    flex-direction: column;
    gap: 25px;
    text-align: center;
  }
  
  .admin-header-right {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .health-grid,
  .users-grid,
  .financial-grid,
  .resources-grid,
  .payouts-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-card {
    padding: 16px 18px;
  }
  
  .card-icon {
    width: 50px;
    height: 50px;
    font-size: 22px;
  }
  
  .card-value {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .admin-dashboard-content {
    padding: 25px;
  }
  
  .admin-card {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  
  .admin-header-left h1 {
    font-size: 26px;
  }
  
  .admin-btn-primary, .admin-btn-secondary, .admin-btn-warning, .admin-btn-danger {
    padding: 12px 18px;
    font-size: 12px;
  }
}

/* Animation for card entrance */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-card {
  animation: slideInUp 0.8s ease-out;
}

.admin-section:nth-child(1) .admin-card:nth-child(1) { animation-delay: 0.1s; }
.admin-section:nth-child(1) .admin-card:nth-child(2) { animation-delay: 0.2s; }
.admin-section:nth-child(1) .admin-card:nth-child(3) { animation-delay: 0.3s; }
.admin-section:nth-child(2) .admin-card:nth-child(1) { animation-delay: 0.4s; }
.admin-section:nth-child(2) .admin-card:nth-child(2) { animation-delay: 0.5s; }
.admin-section:nth-child(2) .admin-card:nth-child(3) { animation-delay: 0.6s; }
.admin-section:nth-child(3) .admin-card:nth-child(1) { animation-delay: 0.7s; }
.admin-section:nth-child(3) .admin-card:nth-child(2) { animation-delay: 0.8s; }
.admin-section:nth-child(3) .admin-card:nth-child(3) { animation-delay: 0.9s; }
.admin-section:nth-child(4) .admin-card:nth-child(1) { animation-delay: 1.0s; }
.admin-section:nth-child(4) .admin-card:nth-child(2) { animation-delay: 1.1s; }
.admin-section:nth-child(4) .admin-card:nth-child(3) { animation-delay: 1.2s; }
.admin-section:nth-child(5) .admin-card:nth-child(1) { animation-delay: 1.3s; }
.admin-section:nth-child(5) .admin-card:nth-child(2) { animation-delay: 1.4s; }
.admin-section:nth-child(5) .admin-card:nth-child(3) { animation-delay: 1.5s; }

/* ===========================
   ENHANCED MODERN COMPONENTS
   =========================== */

/* Quick Stats Banner */
.quick-stats-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
  padding: 25px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(167, 139, 250, 0.08));
  border-radius: 18px;
  border: 2px solid rgba(167, 139, 250, 0.4);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
}

.quick-stat-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  border-left: 4px solid #8b5cf6;
  transition: all 0.3s ease;
}

.quick-stat-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
  border-left-width: 6px;
  border-left-color: #7c3aed;
}

.quick-stat-icon {
  font-size: 32px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.quick-stat-info {
  flex: 1;
}

.quick-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.quick-stat-value {
  font-size: 20px;
  font-weight: 900;
  color: #1a1a2e;
  font-family: 'Courier New', monospace;
}

.status-excellent {
  color: #38a169;
}

@media (max-width: 1200px) {
  .quick-stats-banner {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Section Title Wrappers and Badges */
.section-title-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.section-badge {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

.live-badge {
  background: linear-gradient(135deg, #48bb78, #38a169);
  color: white;
  animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(72, 187, 120, 0.7); }
  50% { box-shadow: 0 0 0 8px rgba(72, 187, 120, 0); }
}

.info-badge {
  background: linear-gradient(135deg, #4299e1, #3182ce);
  color: white;
}

.success-badge {
  background: linear-gradient(135deg, #48bb78, #38a169);
  color: white;
}

.merchant-badge {
  background: linear-gradient(135deg, #ed8936, #dd6b20);
  color: white;
}

.payout-badge {
  background: linear-gradient(135deg, #9f7aea, #805ad5);
  color: white;
}

/* Card Header Row & Status Badges */
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  width: 100%;
}

.card-status-badge {
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.badge-success {
  background: linear-gradient(135deg, #48bb78, #38a169);
  color: white;
}

.badge-warning {
  background: linear-gradient(135deg, #f6ad55, #ed8936);
  color: white;
}

.badge-danger {
  background: linear-gradient(135deg, #e53e3e, #c53030);
  color: white;
}

/* Card Corner Badge */
.card-corner-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.badge-gold {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: #fff;
}

.badge-blue {
  background: linear-gradient(135deg, #4299e1, #3182ce);
  color: white;
}

.badge-purple {
  background: linear-gradient(135deg, #9f7aea, #805ad5);
  color: white;
}

.badge-orange {
  background: linear-gradient(135deg, #ed8936, #dd6b20);
  color: white;
}

.badge-teal {
  background: linear-gradient(135deg, #38b2ac, #319795);
  color: white;
}

.badge-green {
  background: linear-gradient(135deg, #48bb78, #38a169);
  color: white;
}

.badge-blue-light {
  background: linear-gradient(135deg, #63b3ed, #4299e1);
  color: white;
}

/* Enhanced Card Layouts */
.admin-card {
  flex-direction: column;
  align-items: flex-start;
}

.enhanced-card {
  position: relative;
  overflow: visible;
}

.gradient-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
}

/* Card Meta Row */
.card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 8px;
  gap: 8px;
}

.meta-icon {
  margin-right: 6px;
}

/* Card Value Variants */
.card-value-large {
  font-size: 28px !important;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-value-highlight {
  color: #4299e1;
}

.card-value-warning {
  color: #ed8936;
}

.card-value-success {
  color: #48bb78;
}

.card-value-currency {
  font-size: 22px !important;
  color: #8b5cf6;
}

.card-value-number {
  color: #38b2ac;
}

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

.card-value-large-number {
  color: #4299e1;
}

.card-value-warning-color {
  color: #ed8936;
}

.card-value-danger-color {
  color: #e53e3e;
}

/* Icon Gradients */
.icon-gradient-blue {
  background: linear-gradient(135deg, #4299e1, #3182ce) !important;
  color: white !important;
}

.icon-gradient-red {
  background: linear-gradient(135deg, #e53e3e, #c53030) !important;
  color: white !important;
}

.icon-gradient-purple {
  background: linear-gradient(135deg, #9f7aea, #805ad5) !important;
  color: white !important;
}

.icon-gradient-gold {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa) !important;
  color: #fff !important;
}

.icon-gradient-green {
  background: linear-gradient(135deg, #48bb78, #38a169) !important;
  color: white !important;
}

.icon-gradient-orange {
  background: linear-gradient(135deg, #ed8936, #dd6b20) !important;
  color: white !important;
}

.icon-gradient-teal {
  background: linear-gradient(135deg, #38b2ac, #319795) !important;
  color: white !important;
}

.icon-gradient-blue-bright {
  background: linear-gradient(135deg, #63b3ed, #4299e1) !important;
  color: white !important;
}

.icon-gradient-warning {
  background: linear-gradient(135deg, #f6ad55, #ed8936) !important;
  color: white !important;
}

.icon-gradient-danger {
  background: linear-gradient(135deg, #e53e3e, #c53030) !important;
  color: white !important;
}

/* Progress Bar Modern */
.progress-bar-modern {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 8px;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill-modern {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa, #8b5cf6);
  background-size: 200% 100%;
  border-radius: 8px;
  position: relative;
  transition: width 0.5s ease;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 0%; }
  100% { background-position: 0% 0%; }
}

.progress-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: shine 2s ease-in-out infinite;
}

@keyframes shine {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.progress-markers {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.progress-markers .marker {
  position: absolute;
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.4);
}

/* Trend Indicators */
.trend-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.trend-up {
  background: rgba(72, 187, 120, 0.15);
  color: #38a169;
}

.trend-down {
  background: rgba(229, 62, 62, 0.15);
  color: #c53030;
}

.trend-neutral {
  background: rgba(66, 153, 225, 0.15);
  color: #3182ce;
}

.trend-arrow {
  font-size: 14px;
  font-weight: 900;
}

/* Live Indicator */
.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #38a169;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38a169;
  animation: live-dot-pulse 1.5s ease-in-out infinite;
}

@keyframes live-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

/* Alert Pulse */
.alert-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e53e3e;
  animation: alert-pulse-animation 1.5s ease-in-out infinite;
}

@keyframes alert-pulse-animation {
  0%, 100% { 
    transform: scale(1); 
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.7);
  }
  50% { 
    transform: scale(1.2); 
    opacity: 0.8;
    box-shadow: 0 0 0 8px rgba(229, 62, 62, 0);
  }
}

/* Mini Chart Line */
.mini-chart-line {
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    #4299e1 10%, 
    #4299e1 20%, 
    transparent 30%,
    transparent 40%,
    #4299e1 50%,
    #4299e1 70%,
    transparent 80%,
    transparent 90%,
    #4299e1 100%
  );
  margin-top: 12px;
  border-radius: 2px;
  opacity: 0.6;
}

/* Role Distribution Section */
.role-distribution-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid rgba(167, 139, 250, 0.3);
}

.subsection-title {
  font-size: 20px;
  font-weight: 700;
  color: #a78bfa;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.subsection-icon {
  font-size: 24px;
}

.role-card {
  position: relative;
}

.role-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  width: 100%;
}

.role-percentage {
  font-size: 18px;
  font-weight: 900;
  color: #8b5cf6;
  padding: 6px 14px;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 12px;
  border: 2px solid rgba(167, 139, 250, 0.4);
}

.role-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 12px;
}

.role-progress-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s ease;
}

.manager-fill {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.merchant-fill {
  background: linear-gradient(90deg, #48bb78, #38a169);
}

.admin-fill {
  background: linear-gradient(90deg, #9f7aea, #805ad5);
}

/* Sparkline Container */
.sparkline-container {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
  margin-top: 15px;
}

.sparkline-bar {
  flex: 1;
  background: linear-gradient(to top, #8b5cf6, #a78bfa);
  border-radius: 3px 3px 0 0;
  min-width: 0;
  transition: height 0.3s ease;
  box-shadow: 0 -2px 6px rgba(139, 92, 246, 0.3);
}

.sparkline-bar:hover {
  opacity: 0.8;
}

/* Transaction Badge */
.transaction-badge {
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #9f7aea, #805ad5);
  color: white;
  box-shadow: 0 2px 8px rgba(159, 122, 234, 0.3);
}

/* Stat Comparison & Mini Stats */
.stat-comparison {
  display: flex;
  gap: 20px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 18px;
  font-weight: 900;
  color: #1a1a2e;
  font-family: 'Courier New', monospace;
}

.mini-stats-grid {
  display: flex;
  gap: 15px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.mini-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.mini-stat-value {
  font-size: 16px;
  font-weight: 900;
  color: #1a1a2e;
  font-family: 'Courier New', monospace;
}

.mini-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Completion Rate */
.completion-rate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(72, 187, 120, 0.1);
  border-radius: 10px;
  border-left: 4px solid #38a169;
}

.completion-label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.completion-value {
  font-size: 18px;
  font-weight: 900;
  color: #38a169;
  font-family: 'Courier New', monospace;
}

/* Fee Breakdown */
.fee-breakdown {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 10px;
  border-left: 4px solid #8b5cf6;
}

.fee-label {
  font-size: 11px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fee-value {
  font-size: 16px;
  font-weight: 900;
  color: #8b5cf6;
  font-family: 'Courier New', monospace;
}

/* Payout Breakdown */
.payout-breakdown {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

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

.success-dot {
  background: #38a169;
}

.breakdown-label {
  font-weight: 600;
  color: #666;
}

.breakdown-value {
  font-weight: 900;
  color: #1a1a2e;
  font-family: 'Courier New', monospace;
}

/* Attention Badge */
.attention-badge {
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: linear-gradient(135deg, #ed8936, #dd6b20);
  color: white;
  box-shadow: 0 2px 8px rgba(237, 137, 54, 0.4);
  animation: attention-pulse 2s ease-in-out infinite;
}

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

/* Status Indicator Row */
.status-indicator-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(237, 137, 54, 0.1);
  border-radius: 8px;
}

.status-dot-animated {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ed8936;
  animation: status-dot-pulse 1.5s ease-in-out infinite;
}

@keyframes status-dot-pulse {
  0%, 100% { 
    transform: scale(1); 
    box-shadow: 0 0 0 0 rgba(237, 137, 54, 0.7);
  }
  50% { 
    transform: scale(1.2); 
    box-shadow: 0 0 0 6px rgba(237, 137, 54, 0);
  }
}

.status-text {
  font-size: 12px;
  font-weight: 700;
  color: #ed8936;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Failure Rate Container */
.failure-rate-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(229, 62, 62, 0.1);
  border-radius: 10px;
  border-left: 4px solid #e53e3e;
}

.failure-label {
  font-size: 11px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.failure-rate {
  font-size: 18px;
  font-weight: 900;
  font-family: 'Courier New', monospace;
}

.low-failure {
  color: #38a169;
}

.high-failure {
  color: #e53e3e;
}

/* Pulse Animations */
.pulse-animation {
  animation: pulse-scale 2s ease-in-out infinite;
}

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

.pulse-slow {
  animation: pulse-scale-slow 3s ease-in-out infinite;
}

@keyframes pulse-scale-slow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Health Grid Enhanced */
.health-grid {
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
}

@media (max-width: 1400px) {
  .health-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Responsive Adjustments for New Elements */
@media (max-width: 768px) {
  .card-header-row {
    flex-direction: row;
    align-items: center;
  }

  .card-corner-badge {
    position: static;
    margin-bottom: 10px;
  }

  .sparkline-container {
    height: 30px;
  }

  .role-percentage {
    font-size: 14px;
    padding: 4px 10px;
  }
}

@media (max-width: 480px) {
  .section-title-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .card-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .stat-comparison {
    flex-direction: column;
    gap: 10px;
  }
}

/* ===========================
   SYSTEM CONTROL SECTION
   =========================== */

.system-control-section {
  position: relative;
}

.control-badge {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
}

.system-control-grid {
  grid-template-columns: repeat(3, 1fr);
}

.system-control-card {
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.system-control-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(139, 92, 246, 0.35);
}

.maintenance-card {
  border-color: #f59e0b;
}

.maintenance-card:hover {
  border-color: #d97706;
  box-shadow: 0 12px 35px rgba(245, 158, 11, 0.4);
}

.backup-card {
  border-color: #3b82f6;
}

.backup-card:hover {
  border-color: #2563eb;
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.4);
}

.security-card {
  border-color: #10b981;
}

.security-card:hover {
  border-color: #059669;
  box-shadow: 0 12px 35px rgba(16, 185, 129, 0.4);
}

.card-value-status {
  color: #f59e0b;
  font-size: 1.8rem !important;
}

.card-value-ready {
  color: #3b82f6;
  font-size: 1.8rem !important;
}

.card-value-secure {
  color: #10b981;
  font-size: 1.8rem !important;
}

.expand-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  color: #8b5cf6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 8px;
}

.backup-status-dot,
.security-shield {
  font-size: 14px;
  animation: pulse-scale 2s ease-in-out infinite;
}

/* ==================
   MAINTENANCE CONFIG
   ================== */
.maintenance-config-container {
  margin-top: 1.5rem;
  background: #ffffff;
  border-radius: 14px;
  border: 3px solid #a78bfa;
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.25);
  overflow: hidden;
  animation: slideDown 0.4s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    max-height: 1000px;
    transform: translateY(0);
  }
}

.maintenance-config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.maintenance-config-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: white;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.config-icon {
  font-size: 1.5rem;
}

.maintenance-status-badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.status-active {
  background: rgba(16, 185, 129, 0.2);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  animation: status-pulse 2s ease-in-out infinite;
}

.status-inactive {
  background: rgba(239, 68, 68, 0.2);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

/* ==================
   CONFIG FORM
   ================== */
.maintenance-config-body {
  padding: 1.5rem;
}

.config-form-group {
  margin-bottom: 1.5rem;
}

.config-form-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  font-weight: 700;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.85rem;
}

.label-icon {
  font-size: 1.1rem;
}

.config-input,
.config-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid rgba(167, 139, 250, 0.3);
  border-radius: 10px;
  font-size: 0.95rem;
  color: #1a1a1a;
  background: white;
  transition: all 0.3s ease;
  font-weight: 500;
  box-sizing: border-box;
  font-family: inherit;
}

.config-input:focus,
.config-textarea:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
  background: #ffffff;
}

.config-textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
}

/* ==================
   CONFIG ACTIONS
   ================== */
.config-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.config-btn {
  flex: 1;
  min-width: 200px;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.config-btn-save {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.config-btn-save:hover:not(:disabled) {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.5);
}

.config-btn-start {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.config-btn-start:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.5);
}

.config-btn-stop {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.config-btn-stop:hover:not(:disabled) {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.5);
}

.config-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ==================
   MAINTENANCE PREVIEW
   ================== */
.maintenance-preview {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, #f9fafb, #f3f4f6);
  border-radius: 10px;
  border: 2px dashed rgba(139, 92, 246, 0.3);
}

.maintenance-preview h4 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: #8b5cf6;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.preview-icon {
  font-size: 1.3rem;
}

.preview-box {
  background: linear-gradient(135deg, #2d1b4e, #1a0f2e);
  padding: 2rem;
  border-radius: 10px;
  border: 2px solid #a78bfa;
  text-align: center;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.preview-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #a78bfa;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(167, 139, 250, 0.5);
  letter-spacing: 0.5px;
}

.preview-description {
  font-size: 1rem;
  color: #c4b5fd;
  line-height: 1.6;
  font-weight: 500;
}

/* ==================
   ADMIN BTN SUCCESS
   ================== */
.admin-btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.admin-btn-success:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.7);
}

/* ==================
   RESPONSIVE SYSTEM CONTROL
   ================== */
@media (max-width: 1200px) {
  .system-control-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .config-actions {
    flex-direction: column;
  }

  .config-btn {
    min-width: 100%;
  }

  .maintenance-preview {
    padding: 1rem;
  }

  .preview-box {
    padding: 1.5rem;
  }

  .preview-title {
    font-size: 1.25rem;
  }

  .preview-description {
    font-size: 0.9rem;
  }
}

/* ===========================
   SETTINGS SECTION
   =========================== */

.settings-section {
  position: relative;
}

.settings-badge {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
}

.settings-grid {
  grid-template-columns: repeat(3, 1fr);
}

.settings-card {
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.cron-card {
  border-color: #8b5cf6;
}

.cron-card:hover {
  border-color: #7c3aed;
  box-shadow: 0 12px 35px rgba(139, 92, 246, 0.4);
}

.security-settings-card {
  border-color: #10b981;
}

.security-settings-card:hover {
  border-color: #059669;
  box-shadow: 0 12px 35px rgba(16, 185, 129, 0.4);
}

.analytics-card {
  border-color: #3b82f6;
}

.analytics-card:hover {
  border-color: #2563eb;
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.4);
}

.card-value-cron {
  color: #8b5cf6;
  font-size: 1.8rem !important;
}

.card-value-analytics {
  color: #3b82f6;
  font-size: 1.8rem !important;
}

.analytics-indicator {
  font-size: 14px;
  animation: pulse-scale 2s ease-in-out infinite;
}

.icon-gradient-purple-dark {
  background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
  color: white !important;
}

/* ==================
   CRON CONFIG CONTAINER
   ================== */
.cron-config-container {
  margin-top: 1.5rem;
  background: #ffffff;
  border-radius: 14px;
  border: 3px solid #a78bfa;
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.25);
  overflow: hidden;
  animation: slideDown 0.4s ease;
}

.cron-config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.cron-config-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: white;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cron-status-badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.cron-config-body {
  padding: 1.5rem;
}

/* ==================
   CRON MAIN SETTINGS
   ================== */
.cron-main-settings {
  background: linear-gradient(135deg, #f9fafb, #f3f4f6);
  padding: 1.5rem;
  border-radius: 10px;
  border: 2px solid rgba(167, 139, 250, 0.2);
  margin-bottom: 1.5rem;
}

.cron-toggle-group {
  margin-bottom: 1.5rem;
}

.cron-checkbox-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  padding: 1rem;
  background: white;
  border-radius: 10px;
  border: 2px solid rgba(167, 139, 250, 0.3);
  transition: all 0.3s ease;
}

.cron-checkbox-label:hover {
  border-color: #8b5cf6;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.cron-checkbox {
  width: 22px;
  height: 22px;
  cursor: pointer;
  accent-color: #8b5cf6;
}

.checkbox-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: #1a1a1a;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.checkbox-icon {
  font-size: 1.2rem;
}

/* ==================
   CRON EXPRESSION
   ================== */
.cron-expression-group {
  margin-bottom: 0;
}

.cron-expression-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

.expression-input-wrapper {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.expression-input-wrapper .config-input {
  flex: 1;
}

.expression-input-wrapper .config-btn {
  flex: 0 0 auto;
  min-width: 150px;
}

.cron-help-text {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 8px;
  border-left: 4px solid #8b5cf6;
  font-size: 0.875rem;
  color: #4b5563;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.help-icon {
  font-size: 1rem;
}

.cron-code {
  background: rgba(139, 92, 246, 0.15);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: #8b5cf6;
  font-size: 0.85rem;
}

.last-saved {
  margin-left: 1rem;
  font-weight: 600;
  color: #059669;
  font-style: italic;
}

/* ==================
   CRON TRIGGERS
   ================== */
.cron-triggers-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid rgba(167, 139, 250, 0.2);
}

.triggers-header {
  margin-bottom: 1.25rem;
}

.triggers-header h4 {
  margin: 0;
  font-size: 1.2rem;
  color: #8b5cf6;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.triggers-icon {
  font-size: 1.3rem;
}

.triggers-count {
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: white;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 800;
  margin-left: 0.5rem;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.triggers-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.trigger-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, #ffffff, #fafbfc);
  border-radius: 10px;
  border: 2px solid rgba(167, 139, 250, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.trigger-item:hover {
  border-color: #a78bfa;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
  transform: translateX(4px);
}

.trigger-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: white;
  border-radius: 8px;
  font-weight: 900;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.trigger-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.trigger-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.trigger-field-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.field-icon {
  font-size: 0.9rem;
}

.trigger-input {
  padding: 0.75rem 1rem;
  border: 2px solid rgba(167, 139, 250, 0.3);
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1a1a1a;
  background: white;
  transition: all 0.3s ease;
  font-weight: 500;
  font-family: 'Courier New', monospace;
}

.trigger-input:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.trigger-input-small {
  max-width: 200px;
}

.trigger-actions {
  display: flex;
  gap: 0.75rem;
}

.trigger-btn {
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.trigger-btn-run {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  flex: 1;
}

.trigger-btn-run:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.trigger-btn-run:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.trigger-btn-remove {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  flex: 1;
}

.trigger-btn-remove:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.trigger-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(167, 139, 250, 0.15);
}

.status-pill {
  padding: 0.35rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.status-ready {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.status-empty {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.trigger-name-display {
  font-size: 0.85rem;
  color: #374151;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 6px;
  margin: 0 0.5rem;
}

.expression-display {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: #666;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 6px;
}

/* ==================
   TRIGGERS FOOTER
   ================== */
.triggers-footer {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 2px solid rgba(167, 139, 250, 0.2);
}

.config-btn-secondary {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  color: #4b5563;
  border: 2px solid #d1d5db;
  flex: 1;
  min-width: 180px;
}

.config-btn-secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
  border-color: #9ca3af;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.config-btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.config-btn-run-all {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: white;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
  flex: 1.5;
  min-width: 200px;
}

.config-btn-run-all:hover:not(:disabled) {
  background: linear-gradient(135deg, #6d28d9, #5b21b6);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.5);
}

/* ==================
   RESPONSIVE SETTINGS
   ================== */
@media (max-width: 1200px) {
  .settings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .expression-input-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .expression-input-wrapper .config-btn {
    width: 100%;
  }

  .trigger-item {
    flex-direction: column;
  }

  .trigger-number {
    align-self: flex-start;
  }

  .trigger-actions {
    flex-direction: column;
  }

  .trigger-status {
    flex-direction: column;
    align-items: flex-start;
  }

  .triggers-footer {
    flex-direction: column;
  }

  .config-btn-secondary,
  .config-btn-run-all {
    min-width: 100%;
  }
}

/* ==================
   SCHEDULER STATUS WIDGET
   ================== */
.scheduler-status-widget {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
  border: 2px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.1);
}

.scheduler-header {
  margin-bottom: 15px;
}

.scheduler-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 8px;
}

.scheduler-icon {
  font-size: 1.2rem;
}

.scheduler-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.scheduler-status-info {
  background: white;
  border-radius: 8px;
  padding: 15px;
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.status-row:last-child {
  margin-bottom: 0;
}

.status-label {
  font-weight: 600;
  color: #6c757d;
  font-size: 0.9rem;
}

.status-value {
  font-weight: 700;
  font-size: 0.9rem;
  padding: 4px 8px;
  border-radius: 4px;
}

.status-value.status-running {
  background: #d4edda;
  color: #155724;
}

.status-value.status-stopped {
  background: #f8d7da;
  color: #721c24;
}

.status-value.status-error {
  background: #f8d7da;
  color: #721c24;
}

.scheduler-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.scheduler-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  text-align: center;
}

.scheduler-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.scheduler-btn-start {
  background: #28a745;
  color: white;
}

.scheduler-btn-start:hover:not(:disabled) {
  background: #218838;
}

.scheduler-btn-stop {
  background: #dc3545;
  color: white;
}

.scheduler-btn-stop:hover:not(:disabled) {
  background: #c82333;
}

.scheduler-btn-refresh {
  background: #17a2b8;
  color: white;
}

.scheduler-btn-refresh:hover:not(:disabled) {
  background: #138496;
}

.scheduler-btn-logs {
  background: #6f42c1;
  color: white;
}

.scheduler-btn-logs:hover {
  background: #5a32a3;
}

/* Responsive adjustments for scheduler widget */
@media (max-width: 768px) {
  .scheduler-controls {
    flex-direction: column;
  }
  
  .scheduler-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===== CRON LOGS MODAL STYLES ===== */
.logs-modal {
  max-width: 98vw !important;
  max-height: 90vh;
  width: 98vw !important;
  background: linear-gradient(135deg, #1a0f2e 0%, #2d1b4e 50%, #3d2463 100%);
  border: 2px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Override any existing modal-content styles */
.logs-modal .modal-content {
  max-width: none !important;
  width: 100% !important;
}

.logs-container {
  max-height: 60vh;
  overflow-y: auto;
}

.logs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.logs-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.live-indicator {
  color: #ef4444;
  font-weight: 600;
  font-size: 0.8rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.btn-toggle {
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  min-width: 80px;
}

.btn-toggle-active {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.btn-toggle-active:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-toggle-inactive {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.btn-toggle-inactive:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.logs-count {
  font-weight: 600;
  color: #8b5cf6;
  font-size: 0.9rem;
}

/* Table Styles */
.logs-table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.logs-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.02);
}

.logs-table thead {
  background: rgba(139, 92, 246, 0.15);
}

.logs-table th {
  padding: 0.75rem 0.5rem;
  text-align: left;
  font-weight: 600;
  color: #1f2937;
  border-bottom: 2px solid rgba(139, 92, 246, 0.3);
  font-size: 0.8rem;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.95);
}

.logs-table td {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  color: #1f2937;
  font-size: 0.75rem;
  vertical-align: top;
  background: rgba(255, 255, 255, 0.9);
}

.log-row:hover {
  background: rgba(139, 92, 246, 0.1);
}

.log-row:hover td {
  background: rgba(139, 92, 246, 0.05);
}

.log-id-cell {
  width: 80px;
  text-align: center;
}

.log-id-badge {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  color: white;
  padding: 0.2rem 0.4rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.7rem;
  display: inline-block;
}

.log-time-cell {
  width: 180px;
  color: #374151;
  font-size: 0.7rem;
  white-space: nowrap;
  font-weight: 500;
}

.log-merchant-cell {
  width: 150px;
  color: #1f2937;
  word-break: break-word;
  font-weight: 500;
  font-size: 0.7rem;
}

.log-description-cell {
  color: #1f2937;
  word-break: break-word;
  max-width: 800px;
  min-width: 400px;
  font-weight: 400;
  font-size: 0.7rem;
}

.log-transaction-cell {
  width: 300px;
  color: #4b5563;
  font-family: monospace;
  font-size: 0.65rem;
  word-break: break-all;
  font-weight: 500;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1rem;
}

.no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1rem;
  text-align: center;
}

.no-data p {
  color: #a78bfa;
  font-size: 1.1rem;
}

.btn-secondary {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #4b5563, #374151);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Pagination Styles */
.logs-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.pagination-btn {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  min-width: 80px;
}

.pagination-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.pagination-btn:disabled {
  background: linear-gradient(135deg, #9ca3af, #6b7280);
  cursor: not-allowed;
  opacity: 0.6;
}

.pagination-info {
  color: #374151;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Responsive design for logs modal */
@media (max-width: 1200px) {
  .logs-modal {
    width: 98vw;
    max-width: 98vw;
  }
}

@media (max-width: 768px) {
  .logs-modal {
    max-width: 98vw;
    max-height: 95vh;
    width: 98vw;
  }
  
  .logs-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .logs-controls {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  
  .btn-toggle {
    width: 100%;
  }
  
  .logs-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .logs-table {
    min-width: 1000px;
  }
  
  .logs-table th,
  .logs-table td {
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
  }
  
  .log-description-cell {
    max-width: 400px;
    min-width: 250px;
  }
  
  .log-transaction-cell {
    width: 200px;
    font-size: 0.7rem;
  }
  
  .logs-pagination {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .pagination-btn {
    width: 100%;
    min-width: auto;
  }
}

