/* 
   PROSCORE Custom Green Theme (Softer Contrast / Nerdytips Style)
   Created for premium UI overrides.
*/

:root,
[data-bs-theme=dark] {
  /* Softer Emerald/Green Primary Colors */
  --bs-primary: #10b981 !important; 
  --bs-primary-rgb: 16, 185, 129 !important;
  --bs-success: #10b981 !important;
  --bs-success-rgb: 16, 185, 129 !important;

  /* Softer Theme Backgrounds (Less Dark/Warm Dark Green) */
  --bs-body-bg: #0c120f !important;
  --bs-body-bg-rgb: 12, 18, 15 !important;
  --bs-secondary-bg: #121916 !important;
  --bs-secondary-bg-rgb: 18, 25, 22 !important;
  --bs-tertiary-bg: #0f1512 !important;
  --bs-tertiary-bg-rgb: 15, 21, 18 !important;
  
  /* Header/Topbar */
  --bs-header-bg: #0c120f !important;
  --bs-header-item-color: #83928a !important;
  --bs-topbar-search-bg: #151e1a !important;

  /* Sidebar styling */
  --bs-sidebar-bg: #080d0b !important;
  --bs-sidebar-dark-bg: #080d0b !important;
  --bs-sidebar-menu-item-color: #83928a !important;
  --bs-sidebar-menu-sub-item-color: #6a7971 !important;
  --bs-sidebar-menu-item-icon-color: #6a7971 !important;
  --bs-sidebar-menu-item-hover-color: #10b981 !important;
  --bs-sidebar-menu-item-hover-effact-color: rgba(16, 185, 129, 0.06) !important;
  --bs-sidebar-menu-item-active-color: #10b981 !important;
  --bs-sidebar-menu-item-active-effact-color: rgba(16, 185, 129, 0.1) !important;
  --bs-sidebar-border-color: rgba(16, 185, 129, 0.06) !important;
  
  --bs-sidebar-dark-menu-item-color: #83928a !important;
  --bs-sidebar-dark-menu-sub-item-color: #6a7971 !important;
  --bs-sidebar-dark-menu-item-icon-color: #6a7971 !important;
  --bs-sidebar-dark-menu-item-hover-color: #10b981 !important;
  --bs-sidebar-dark-menu-item-active-color: #10b981 !important;
  
  /* Form components and Inputs */
  --bs-form-control-bg: #141c19 !important;
  --bs-form-control-border-color: rgba(16, 185, 129, 0.1) !important;
  --bs-border-color: rgba(16, 185, 129, 0.06) !important;
  --bs-border-color-translucent: rgba(16, 185, 129, 0.05) !important;

  /* Footer Colors */
  --bs-footer-bg: #080d0b !important;
  --bs-footer-color: #6a7971 !important;
  --bs-footer-border-color: rgba(16, 185, 129, 0.06) !important;

  /* Link Colors */
  --bs-link-color: #10b981 !important;
  --bs-link-hover-color: #34d399 !important;
}

/* Global Ambient Background */
body[data-bs-theme=dark] {
  background-image: radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.04) 0%, rgba(12, 18, 15, 0) 35%),
                    radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.02) 0%, rgba(12, 18, 15, 0) 45%),
                    linear-gradient(135deg, #0c120f 0%, #080c0a 100%) !important;
  background-attachment: fixed !important;
  background-color: #0c120f !important;
}

/* Page Topbar overrides */
body[data-topbar=dark] #page-topbar {
  background-color: rgba(12, 18, 15, 0.85) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(16, 185, 129, 0.06) !important;
}

/* Logo brand box */
body[data-sidebar=dark] .navbar-brand-box {
  background-color: #080d0b !important;
  border-right: 1px solid rgba(16, 185, 129, 0.06) !important;
  border-bottom: 1px solid rgba(16, 185, 129, 0.06) !important;
}

body[data-sidebar=dark] .vertical-menu {
  background-color: #080d0b !important;
  border-right: 1px solid rgba(16, 185, 129, 0.06) !important;
}

/* Logo styling */
.logo-txt {
  color: #ffffff !important;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.logo-txt::after {
  content: '.';
  color: #10b981;
  font-size: 20px;
  line-height: 0;
}
.navbar-brand-box img {
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.4));
}

/* Sidebar Menu Items */
body[data-sidebar=dark] #sidebar-menu ul li a {
  color: #83928a !important;
  border-radius: 8px !important;
  margin: 4px 14px !important;
  padding: 10px 14px !important;
  border: 1.2px solid transparent !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body[data-sidebar=dark] #sidebar-menu ul li a i,
body[data-sidebar=dark] #sidebar-menu ul li a svg {
  color: #6a7971 !important;
  transition: all 0.25s ease !important;
}

/* Inactive item Hover styling */
body[data-sidebar=dark] #sidebar-menu ul li a:hover {
  color: #10b981 !important;
  background-color: rgba(16, 185, 129, 0.03) !important;
  border-color: rgba(16, 185, 129, 0.15) !important;
}

body[data-sidebar=dark] #sidebar-menu ul li a:hover i,
body[data-sidebar=dark] #sidebar-menu ul li a:hover svg {
  color: #10b981 !important;
  transform: scale(1.03);
}

/* Sidebar Active menu styling - Softer Contrast */
body[data-sidebar=dark] #sidebar-menu ul li.mm-active > a {
  color: #10b981 !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(16, 185, 129, 0.01) 100%) !important;
  border: 1.2px solid rgba(16, 185, 129, 0.4) !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.08) !important;
  font-weight: 500 !important;
}

body[data-sidebar=dark] #sidebar-menu ul li.mm-active > a i,
body[data-sidebar=dark] #sidebar-menu ul li.mm-active > a svg {
  color: #10b981 !important;
}

/* Submenu items styling */
body[data-sidebar=dark] #sidebar-menu ul li ul.sub-menu {
  background-color: #050807 !important;
}
body[data-sidebar=dark] #sidebar-menu ul li ul.sub-menu li a {
  padding: 8px 16px 8px 20px !important;
  margin: 2px 14px !important;
}
body[data-sidebar=dark] #sidebar-menu ul li ul.sub-menu li.mm-active > a {
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.05) !important;
}

/* Submenu Arrow styling */
.vertical-menu #sidebar-menu ul li a.has-arrow::after {
  color: #6a7971 !important;
}
.vertical-menu #sidebar-menu ul li.mm-active > a.has-arrow::after {
  color: #10b981 !important;
}

/* Card overrides */
.card {
  background-color: #121916 !important;
  border: 1px solid rgba(16, 185, 129, 0.06) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.card:hover {
  border-color: rgba(16, 185, 129, 0.15) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(16, 185, 129, 0.02) !important;
}

/* Inputs & Form Controls */
.form-control, .form-select, .form-check-input {
  background-color: #141c19 !important;
  border: 1px solid rgba(16, 185, 129, 0.1) !important;
  color: #c9d6cf !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  transition: all 0.2s ease;
}
.form-control:focus, .form-select:focus {
  border-color: #10b981 !important;
  background-color: #141c19 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}
.form-label {
  color: #83928a !important;
  font-weight: 500;
}

/* Table Style Overrides */
.table {
  color: #c9d6cf !important;
  border-color: rgba(16, 185, 129, 0.06) !important;
}
.table-hover tbody tr:hover {
  background-color: rgba(16, 185, 129, 0.02) !important;
  color: #10b981 !important;
}
.table tbody tr {
  background-color: transparent !important;
}
.table th {
  border-bottom-color: rgba(16, 185, 129, 0.1) !important;
  color: #83928a !important;
  font-weight: 600;
}
.table td {
  border-color: rgba(16, 185, 129, 0.06) !important;
}

/* DataTables pagination and search UI styling */
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 6px !important;
  border: 1px solid transparent !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: #10b981 !important;
  color: #080d0b !important;
  border-color: #10b981 !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: #34d399 !important;
  color: #080d0b !important;
}

/* Buttons */
.btn-primary {
  background-color: #10b981 !important;
  border-color: #10b981 !important;
  color: #080d0b !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1) !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: #34d399 !important;
  border-color: #34d399 !important;
  color: #080d0b !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2) !important;
}
.btn-soft-primary {
  background-color: rgba(16, 185, 129, 0.08) !important;
  color: #10b981 !important;
  border: 1px solid transparent !important;
}
.btn-soft-primary:hover {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
}

/* Dropdown Menu overrides */
.dropdown-menu {
  background-color: #121916 !important;
  border: 1px solid rgba(16, 185, 129, 0.1) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
  border-radius: 8px !important;
}
.dropdown-item {
  color: #c9d6cf !important;
  transition: all 0.2s ease;
}
.dropdown-item:hover {
  background-color: rgba(16, 185, 129, 0.06) !important;
  color: #10b981 !important;
}
.dropdown-divider {
  border-top-color: rgba(16, 185, 129, 0.06) !important;
}

/* Badge styling */
.badge-soft-primary {
  background-color: rgba(16, 185, 129, 0.12) !important;
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.15) !important;
}
.bg-soft-light {
  background-color: rgba(16, 185, 129, 0.04) !important;
}

/* Modal overrides */
.modal-content {
  background-color: #121916 !important;
  border: 1px solid rgba(16, 185, 129, 0.1) !important;
  border-radius: 12px !important;
}
.modal-header {
  border-bottom: 1px solid rgba(16, 185, 129, 0.08) !important;
}
.modal-footer {
  border-top: 1px solid rgba(16, 185, 129, 0.08) !important;
}

/* Alerts */
.alert-primary {
  background-color: rgba(16, 185, 129, 0.08) !important;
  border-color: rgba(16, 185, 129, 0.15) !important;
  color: #10b981 !important;
}

/* Footer overrides */
.footer {
  background-color: #080d0b !important;
  border-top: 1px solid rgba(16, 185, 129, 0.06) !important;
  color: #6a7971 !important;
}
.footer a {
  color: #10b981 !important;
  transition: color 0.2s ease;
}
.footer a:hover {
  color: #34d399 !important;
}

/* Scrollbar customizations */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #080d0b;
}
::-webkit-scrollbar-thumb {
  background: #15221c;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #10b981;
}

/* Fix login background overlay */
.auth-bg {
  background-image: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.03) 0%, rgba(12, 18, 15, 0) 100%),
                    linear-gradient(135deg, #0c120f 0%, #080d0b 100%) !important;
}
.bg-overlay.bg-primary {
  background-color: rgba(12, 18, 15, 0.25) !important;
  opacity: 0.8 !important;
}
.bg-bubbles li {
  background-color: rgba(16, 185, 129, 0.04) !important;
}

/* Apexcharts styles */
.apexcharts-canvas {
  background: transparent !important;
}
.apexcharts-tooltip.apexcharts-theme-dark {
  background: #121916 !important;
  border: 1px solid rgba(16, 185, 129, 0.15) !important;
}
.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {
  background: #080d0b !important;
  border-bottom: 1px solid rgba(16, 185, 129, 0.1) !important;
}
.apexcharts-gridline {
  stroke: rgba(16, 185, 129, 0.04) !important;
}
.apexcharts-legend-text {
  color: #83928a !important;
}
