.ahis-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ahis-border-color);
}

.ahis-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--ahis-color-red) 0 33.333%,
    var(--ahis-color-yellow) 33.333% 66.666%,
    var(--ahis-color-green) 66.666% 100%
  );
}

.ahis-logo-link {
  gap: 0.8rem;
}

.ahis-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(33, 37, 41, 0.10));
}

.ahis-flag {
  height: 34px;
  width: auto;
  border-radius: 0.65rem;
  border: 1px solid rgba(73, 80, 87, 0.12);
  box-shadow: var(--ahis-shadow-sm);
}

.ahis-country {
  color: var(--ahis-color-ink);
  letter-spacing: 0.08em;
}

.btn-nav {
  border-color: var(--ahis-border-color);
  color: var(--ahis-color-ink);
  background: rgba(255, 255, 255, 0.88);
}

.btn-nav:hover {
  color: var(--ahis-color-green);
  background: #fff;
}

.main-sidebar,
.left-side,
.sidebar {
  background: var(--ahis-sidebar-bg) !important;
  border-right: 1px solid var(--ahis-border-color);
}

.sidebar-menu {
  padding: 0 0.7rem !important;
}

.sidebar-menu > li.bf-menu {
  margin: 0.75rem 0 !important;
  background: var(--ahis-card-bg) !important;
  border: 1px solid var(--ahis-border-color) !important;
  border-radius: 1rem !important;
  box-shadow: var(--ahis-shadow-sm) !important;
}

.theme-green {
  --theme: var(--ahis-color-green);
}

.theme-gold {
  --theme: var(--ahis-color-yellow);
}

.theme-red {
  --theme: var(--ahis-color-red);
}

.sidebar-menu > li.bf-menu > a {
  min-height: 52px;
  color: var(--ahis-color-ink) !important;
}

.sidebar-menu > li.bf-menu > a::before {
  background: var(--theme, var(--ahis-color-green)) !important;
}

.sidebar-menu > li.bf-menu > a i.fa {
  color: var(--theme, var(--ahis-color-green)) !important;
  background: color-mix(in srgb, var(--theme, var(--ahis-color-green)) 10%, white 90%) !important;
}

.sidebar-menu > li.bf-menu > a:hover,
.sidebar-menu > li.bf-menu.active > a,
.sidebar-menu > li.bf-menu.menu-open > a {
  background: var(--ahis-sidebar-active) !important;
}

.sidebar-menu li.bf-menu > .treeview-menu > li > a:hover {
  background: var(--ahis-sidebar-hover) !important;
  border-radius: 0.8rem;
}

.sidebar-menu li.bf-menu > .treeview-menu > li.active > a {
  background: color-mix(in srgb, var(--theme, var(--ahis-color-green)) 12%, white 88%) !important;
  border: 1px solid color-mix(in srgb, var(--theme, var(--ahis-color-green)) 18%, var(--ahis-border-color) 82%);
}

.content-scroll {
  max-width: 1240px;
  padding: 1.25rem;
}

.container-fluid {
  --bs-gutter-x: 1rem;
}

.ahis-page-header,
.institutional-dashboard-header,
.dashboard-header,
.filter-card,
.filters-card,
.table-panel,
.panel,
.tabs-card,
.header-card {
  background: var(--ahis-card-bg);
  border: 1px solid var(--ahis-border-color);
  border-radius: 1.35rem;
  box-shadow: var(--ahis-shadow-sm);
}

.institutional-dashboard-header,
.dashboard-header,
.header-card {
  position: relative;
  overflow: hidden;
}

.institutional-dashboard-header::before,
.dashboard-header::before,
.header-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--ahis-color-red), var(--ahis-color-yellow), var(--ahis-color-green));
}

.institutional-icon,
.kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  background: rgba(46, 125, 50, 0.10);
  color: var(--ahis-color-green);
}

.dashboard-context-item,
.filter-pill,
.brand-stat,
.ahis-surface-muted {
  background: var(--ahis-card-muted);
  border: 1px solid var(--ahis-border-color);
  border-radius: 1rem;
}

.filter-pill {
  padding: 0.8rem 0.9rem;
}

.filter-pill label,
.dashboard-context-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ahis-color-text);
}

.dashboard-context-value {
  font-weight: 800;
  color: var(--ahis-color-ink);
}

.disease-card,
.ahis-kpi,
.stat-card,
.kpi-card {
  background: var(--ahis-card-bg);
  border: 1px solid var(--ahis-border-color);
  border-radius: 1.2rem;
  box-shadow: var(--ahis-shadow-sm);
}

.disease-card.active,
.tab-link.active,
.ahis-state-active {
  border-color: rgba(46, 125, 50, 0.32);
  box-shadow: 0 12px 28px rgba(46, 125, 50, 0.12);
}

.tab-link,
.btn-filter,
.btn-export {
  border-radius: 0.95rem;
}

.btn-filter,
.btn-export,
.btn-login {
  background: var(--ahis-color-green);
  color: #fff !important;
  border: 0;
  box-shadow: var(--ahis-shadow-sm);
}

.btn-export {
  background: var(--ahis-color-yellow);
  color: var(--ahis-color-ink) !important;
}

.btn-outline-danger {
  border-radius: var(--ahis-radius-md);
}

.auth-page {
  background:
    radial-gradient(circle at 10% 12%, rgba(214, 40, 40, 0.10), transparent 24%),
    radial-gradient(circle at 88% 14%, rgba(244, 197, 66, 0.18), transparent 22%),
    radial-gradient(circle at 82% 88%, rgba(46, 125, 50, 0.12), transparent 26%),
    var(--ahis-body-bg);
}

.brand-panel {
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.16), transparent 24%),
    linear-gradient(145deg, #A61E1E 0%, var(--ahis-color-red) 38%, var(--ahis-color-green) 100%) !important;
}

.ahis-logo-box,
.mobile-logo,
.flag-block,
.login-kicker,
.download-zone {
  border: 1px solid rgba(73, 80, 87, 0.08);
}

.ahis-logo-box strong,
.mobile-logo strong {
  color: var(--ahis-color-green);
}

.login-card::before,
.auth-page::before {
  background: linear-gradient(
    90deg,
    var(--ahis-color-red) 0 33.333%,
    var(--ahis-color-yellow) 33.333% 66.666%,
    var(--ahis-color-green) 66.666% 100%
  ) !important;
}

.login-kicker {
  background: rgba(46, 125, 50, 0.10);
  color: var(--ahis-color-green);
}

.btn-eye {
  border-radius: 0.9rem;
}

.auth-footer {
  background: #F9FBFC;
}

.ahis-auth-logo,
.ahis-logo-login {
  max-width: 76px;
}

.table-panel,
.panel,
.card,
.box {
  overflow: hidden;
}

.table-scroll,
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.page-loader {
  background: rgba(248, 249, 250, 0.88);
}

.list-group-item {
  border-color: var(--ahis-border-color);
  color: var(--ahis-color-ink);
}

.list-group-item.active {
  background: var(--ahis-color-green);
  border-color: var(--ahis-color-green);
}

.list-group-item-action:hover {
  background: var(--ahis-sidebar-hover);
  color: var(--ahis-color-ink);
}

.home-card,
.module-card,
.nav-item,
.download-zone,
.loader-card {
  border-radius: 1.4rem;
}

.home-card,
.module-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.home-card .home-meta h4,
.module-card h4 {
  font-weight: 900;
  letter-spacing: -0.02em;
}

.home-card .home-meta p,
.module-card p {
  opacity: 0.94;
}

.home-card-foot .enter,
.nav-item {
  box-shadow: var(--ahis-shadow-sm);
}

.nav-item.active {
  color: var(--ahis-color-green);
}

.bottom-nav {
  border-radius: 1.8rem;
}

.module-search input,
.auth-input.form-control {
  border-color: var(--ahis-border-color);
}

.table.table-bordered > :not(caption) > * > * {
  border-color: var(--ahis-border-color);
}

table.dataTable,
.display.fa-table,
#liste_Vaccination,
#liste_documents {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
}

table.dataTable thead th,
.display.fa-table thead th,
#liste_Vaccination thead th,
#liste_documents thead th {
  background: var(--ahis-color-offwhite) !important;
  color: var(--ahis-color-ink) !important;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem !important;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--ahis-border-color) !important;
}

table.dataTable tbody tr:hover,
.display.fa-table tbody tr:hover,
#liste_Vaccination tbody tr:hover,
#liste_documents tbody tr:hover {
  background: rgba(46, 125, 50, 0.04) !important;
}

table.dataTable td,
.display.fa-table td,
#liste_Vaccination td,
#liste_documents td {
  color: var(--ahis-color-ink) !important;
  vertical-align: middle;
}

.modal-content {
  border: 1px solid var(--ahis-border-color);
  border-radius: 1.25rem;
  box-shadow: var(--ahis-shadow-lg);
}

.modal-header,
.modal-footer {
  border-color: var(--ahis-border-color);
}

.modal-title {
  color: var(--ahis-color-ink);
  font-weight: 800;
}

dl.card,
.detail-card {
  background: var(--ahis-card-bg);
  border: 1px solid var(--ahis-border-color);
  border-radius: 1.2rem;
  box-shadow: var(--ahis-shadow-sm);
  padding: 1.25rem;
}

dl.card dt,
.detail-card dt {
  font-weight: 800;
  color: var(--ahis-color-ink);
}

dl.card dd,
.detail-card dd {
  color: var(--ahis-color-text);
}

.card-header.bg-light,
.table-light {
  background: var(--ahis-color-offwhite) !important;
}

.text-primary {
  color: var(--ahis-color-green) !important;
}

.text-success {
  color: var(--ahis-color-green) !important;
}

.text-warning {
  color: #8C6800 !important;
}

.text-danger {
  color: var(--ahis-color-red) !important;
}

.text-info {
  color: #0F5D8C !important;
}

.ahis-empty-state {
  background: var(--ahis-card-bg);
  border: 1px dashed var(--ahis-border-color);
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
  color: var(--ahis-color-text);
}

.ahis-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 10% 12%, rgba(214, 40, 40, 0.10), transparent 24%),
    radial-gradient(circle at 88% 14%, rgba(244, 197, 66, 0.18), transparent 22%),
    radial-gradient(circle at 82% 88%, rgba(46, 125, 50, 0.12), transparent 26%),
    var(--ahis-body-bg);
  padding: 1.25rem;
}

.ahis-auth-card {
  width: min(100%, 42rem);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--ahis-border-color);
  border-radius: 2rem;
  box-shadow: var(--ahis-shadow-lg);
  overflow: hidden;
}

.ahis-auth-card .card-body {
  padding: 2rem;
}

@media (max-width: 991.98px) {
  .ahis-main {
    margin-left: 0 !important;
  }

  .content-scroll {
    padding: 0.9rem;
  }

  .ahis-logo {
    height: 44px;
  }
}

@media (max-width: 575.98px) {
  .ahis-header {
    min-height: 72px;
  }

  .ahis-flag {
    height: 26px;
  }

  .content-scroll {
    padding: 0.75rem;
  }

  .institutional-dashboard-header,
  .dashboard-header,
  .table-panel,
  .panel,
  .card-ahis,
  .card,
  .box,
  .crud-card,
  .crud-list-card,
  .crud-form-card,
  .crud-detail-card,
  .crud-delete-card {
    border-radius: 1rem !important;
  }
}
