/* =====================================
   FIX DARK MODAL ISSUE
===================================== */

.modal-backdrop.show {
  opacity: 0.35;
}

.modal-content,
.modal-header,
.modal-body {
  background-color: #ffffff !important;
  color: #111 !important;
}

.modal-title {
  color: #111 !important;
  font-weight: 600;
}

.modal table {
  background-color: #fff;
}

.modal table th,
.modal table td {
  color: #111 !important;
}

.modal * {
  filter: none !important;
  opacity: 1 !important;
}

.modal-header .btn-close {
  filter: none !important;
  opacity: 1 !important;
}



/* =====================================
   PAGE BASE
===================================== */

body {
  background: #fff;
}

:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}



/* =====================================
   DASHBOARD GRID
===================================== */

.mis-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
}

@media (max-width: 992px) {
  .mis-layout {
    grid-template-columns: 1fr;
  }
}



/* =====================================
   SIDEBAR
===================================== */

.mis-sidebar {
  background: #ffffff;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  position: sticky;
  top: 90px;
  height: fit-content;
}

.sidebar-title {
  font-size: .7rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .75rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.mis-link {
  display: block;
  width: 100%;
  margin-bottom: .6rem;
  padding: .7rem 1rem;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: background .18s ease,
              color .18s ease,
              border-color .18s ease;
}

.mis-link:hover {
  background: #eef3ff;
}

.mis-link.active,
.mis-link[aria-current="true"] {
  background: #163b52;
  color: #fff;
  border-color: #163b52;
}



/* =====================================
   PANELS & CONTENT
===================================== */

.mis-content {
  min-width: 0;
}

.mis-panel {
  display: none;
}

.mis-panel.active {
  display: block;
  animation: fadeIn .25s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mis-panel.active {
    animation: none;
  }
}



/* =====================================
   PANEL HEADINGS / TOOLBARS
===================================== */

.panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.panel-subtitle {
  font-size: .95rem;
  font-weight: 600;
}

.panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}



/* =====================================
   KPI CARDS
===================================== */

.dashboard-kpis {
  margin-bottom: 1.5rem;
}

.kpi-card,
.stat-card {
  background: #ffffff;
  padding: 1.1rem;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
}

.kpi-card span,
.stat-card span {
  font-size: .75rem;
  color: #6b7280;
  display: block;
  margin-bottom: .2rem;
}

.kpi-card strong,
.stat-card strong {
  font-size: 1.7rem;
  font-weight: 700;
  color: #111827;
}



/* =====================================
   FILTER GROUPS
===================================== */

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}



/* =====================================
   CHART CARD
===================================== */

.chart-wrapper {
  max-width: 820px;
  width: 100%;
  margin: 2rem auto;
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
}



/* =====================================
   REPORT IMAGES
===================================== */

.report-image {
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}



/* =====================================
   PROGRESS BLOCK
===================================== */

.fund-progress span {
  display: block;
  font-weight: 600;
  margin-bottom: .4rem;
}



/* =====================================
   MOBILE POLISH
===================================== */

@media (max-width: 576px) {

  .mis-sidebar {
    padding: 1rem;
  }

  .chart-wrapper {
    padding: 1rem;
  }

  .panel-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

}

.report-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.report-tabs input {
  display: none;
}

.report-tabs label {
  padding: 0.5rem 1rem;
  border: 1px solid #0d6efd;
  border-radius: 0.375rem;
  cursor: pointer;
  color: #0d6efd;
  background: #fff;
}

.report-tabs input:checked + label {
  background: #0d6efd;
  color: #fff;
}

/* panels hidden by default */
.report-panel {
  display: none;
}

#tab1:checked ~ .panels #panel1,
#tab2:checked ~ .panels #panel2 {
  display: block;
}
