/* ============================================================
   PREMIUM-UI.CSS - ADVANCED RESPONSIVE DESIGN SYSTEM
   Modern overlays for Bootstrap 5 standard components.
   ============================================================ */

:root {
  --premium-green-dark: #16632b;
  --premium-green-light: #1da144;
  --premium-shadow-soft: 0 10px 35px rgba(0, 0, 0, 0.06);
  --premium-shadow-bold: 0 15px 45px rgba(0, 0, 0, 0.08);
  --premium-radius-lg: 18px;
  --premium-radius-md: 12px;
  --premium-font-main: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  font-family: var(--premium-font-main);
  background-color: #f8fafc; /* Lighter, more modern gray */
}

/* ============================================================
   CARD ENHANCEMENTS
   ============================================================ */
.card {
  border: none !important;
  border-radius: var(--premium-radius-lg) !important;
  box-shadow: var(--premium-shadow-soft) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--premium-shadow-bold) !important;
}

.card-header {
  background-color: #fff !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03) !important;
  font-weight: 700;
  padding: 1.25rem;
}

/* ============================================================
   FORM ENHANCEMENTS (Modern Focus & Spacing)
   ============================================================ */
.form-control, .form-select {
  border: 1.5px solid #e2e8f0 !important;
  border-radius: var(--premium-radius-md) !important;
  padding: 0.75rem 1rem !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: #ffffff;
}

.form-control:focus, .form-select:focus {
  border-color: var(--premium-green-dark) !important;
  box-shadow: 0 0 0 4px rgba(22, 99, 43, 0.12) !important;
  background-color: #fff;
}

.form-label {
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

/* Custom Checkboxes and Radios */
.form-check-input:checked {
  background-color: var(--premium-green-dark);
  border-color: var(--premium-green-dark);
}

/* ============================================================
   TABLE ENHANCEMENTS (Clean & Modern)
   ============================================================ */
.table {
  width: 100%;
  margin-bottom: 0;
  color: #334155;
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  background-color: #f8fafc !important;
  color: #64748b !important;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 1rem 1.25rem !important;
  border-bottom: 2px solid #f1f5f9 !important;
  border-top: none !important;
}

.table tbody td {
  padding: 1.1rem 1.25rem !important;
  border-bottom: 1px solid #f1f5f9 !important;
  vertical-align: middle;
}

.table-hover tbody tr:hover {
  background-color: rgba(22, 99, 43, 0.02) !important;
  transition: background-color 0.15s ease;
}

/* ============================================================
   REPORT SUMMARY CARDS (Premium Gradients)
   ============================================================ */
.summary-card {
  padding: 1.5rem;
  border-radius: var(--premium-radius-lg);
  color: #fff;
  position: relative;
  overflow: hidden;
  min-height: 120px;
}

.summary-card::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.summary-card .metric-label {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.9;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.summary-card .metric-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ============================================================
   RESPONSIVITY & MOBILE OPTIMIZATION
   ============================================================ */
@media (max-width: 768px) {
  /* Tables become custom scrollable or list view */
  .table-responsive {
    border-radius: var(--premium-radius-md);
    border: 1px solid #f1f5f9;
    background: #fff;
    padding: 0.5rem;
  }

  .summary-card .metric-value {
    font-size: 1.5rem;
  }

  /* Form spacing adjustments */
  .container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* ============================================================
   ANIMATIONS & MICRO-INTERACTIONS
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Delay classes for staggered entrances */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Interactive Hover Effects */
.premium-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--premium-shadow-bold) !important;
}

.summary-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.summary-card:hover {
  transform: scale(1.02) translateY(-3px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.summary-card:hover::before {
  transform: scale(1.5);
  opacity: 0.2;
}

.btn-primary {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Refined Form Focus */
.form-control:focus {
  transform: translateY(-1px);
}

/* Pulse animation for live indicators */
@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.badge-live {
  animation: pulse-green 2s infinite;
}

/* ============================================================
   SIDEBAR REDESIGN — Category labels, links, submenu
   ============================================================ */

/* Category section label */
.sidebar-category-label {
  font-size: 0.67rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.09em !important;
  color: #94a3b8 !important;
  padding: 20px 20px 5px !important;
  display: block;
  pointer-events: none;
}

/* Override default sidebar link hover/active with new theme */
.sidebar-link {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 9px 20px !important;
  margin: 1px 10px !important;
  border-radius: 10px !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: #475569 !important;
  text-decoration: none !important;
  transition: all 0.18s ease !important;
  width: calc(100% - 20px) !important;
}

.sidebar-link:hover {
  background: rgba(22, 99, 43, 0.06) !important;
  color: #16632b !important;
}

.sidebar-link.active-link {
  background: rgba(22, 99, 43, 0.10) !important;
  color: #16632b !important;
  font-weight: 700 !important;
}

/* Navbar top bar — sticky */
.navbar-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 999 !important;
}

/* Sidebar scrollable menu area */
.sidebar-menu-area {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: calc(100vh - 68px) !important;
  padding-bottom: 24px !important;
}

/* Shortcut button hover */
.shortcut-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* Search input placeholder color in green navbar */
.navbar-search input::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
}

