/**
 * MRV Government UI — high-priority overrides (loads last).
 * Scoped to body.gov-enterprise
 */

@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap");

body.gov-enterprise {
  --gov-font: "Source Sans 3", "Segoe UI", system-ui, sans-serif !important;
  /* Professional climate / enterprise green palette */
  --gov-primary: #0f3d2e !important;
  --gov-primary-mid: #1a5c45 !important;
  --gov-accent: #2d7a5a !important;
  --gov-accent-light: #3d9a72 !important;
  --gov-accent-soft: #e8f4ee !important;
  --gov-surface: #f2f7f4 !important;
  --gov-surface-elevated: #ffffff !important;
  --gov-border: #c5d9ce !important;
  --gov-text: #1a2e26 !important;
  --gov-text-muted: #5a6f66 !important;
  --gov-maroc-red: #c1272d;
  --gov-maroc-green: #006233;
  --mrv-main-color: #0f3d2e !important;
  --mrv-table-header: #1a5c45 !important;
  --mrv-header-bg: #ffffff !important;
  --mrv-footer-bg: #0f3d2e !important;
  --mrv-white: #ffffff !important;
  --mrv-grey: #f2f7f4 !important;
  /* Override ALL legacy colored block variables → unified green palette */
  --mrv-color-1: #1a5c45 !important;
  /* Inventories — dark green */
  --mrv-color-2: #2d7a5a !important;
  /* Actions/Supports — was blue */
  --mrv-color-3: #3d9a72 !important;
  /* Issues/Quality — was yellow */
  --mrv-color-4: #4db08a !important;
  /* Resources — was grey */
  --mrv-color-5: #0f3d2e !important;
  /* Climate info — was light blue */
  --mrv-color-6: #1a5c45 !important;
  /* Administration — was purple */
  --mrv-color-7: #2d7a5a !important;
  /* water green → keep green */
  --mrv-color-grey: #c5d9ce !important;

  font-family: var(--gov-font) !important;
  font-size: 1.0625rem !important;
  line-height: 1.6 !important;
  color: var(--gov-text) !important;
  background: var(--gov-surface) !important;
}

/* Hide legacy wrappers */
body.gov-enterprise .header-wrapper,
body.gov-enterprise .footer-wrapper,
body.gov-enterprise .main-wrapper {
  all: unset !important;
  display: contents !important;
}

body.gov-enterprise .gov-shell {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
}

body.gov-enterprise .gov-tricolor {
  display: block !important;
  height: 5px !important;
  background: linear-gradient(90deg,
      var(--gov-primary) 0%,
      var(--gov-accent) 50%,
      var(--gov-accent-light) 100%) !important;
  flex-shrink: 0 !important;
}

/* ========== HEADER GRID ========== */
body.gov-enterprise .gov-header {
  background: #fff !important;
  box-shadow: 0 2px 12px rgba(15, 61, 46, 0.08) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1030 !important;
}

body.gov-enterprise .gov-container {
  max-width: 1400px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

body.gov-enterprise .gov-header-inner {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.75rem !important;
  padding: 0.75rem 0 !important;
}

/* Branding pushes tools to the right */
body.gov-enterprise #block-mrv-pakistan-branding,
body.gov-enterprise #block-mrv-pakistan-branding-2 {
  flex: 1 1 auto !important;
  margin-right: 0 !important;
}

/* Tools cluster: language + account + notifications — all forced right */
body.gov-enterprise #block-mrv-pakistan-dropdownlanguage,
body.gov-enterprise #block-mrv-pakistan-menuducomptedelutilisateur,
body.gov-enterprise #block-views-block-notifications-block-1 {
  flex: 0 0 auto !important;
  margin-left: 0.5rem !important;
  order: 5 !important;
}

/* Nav bar always on its own row, below header tools */
body.gov-enterprise #block-mainnavigation-2,
body.gov-enterprise .gov-nav-band {
  width: 100% !important;
  order: 10 !important;
  flex: 0 0 100% !important;
  margin-left: -1.5rem !important;
  margin-right: -1.5rem !important;
}

body.gov-enterprise .gov-nav-band,
body.gov-enterprise #block-mainnavigation-2 {
  grid-area: nav !important;
  grid-column: 1 / -1 !important;
  width: 100% !important;
  background: var(--gov-primary) !important;
  margin: 0 -1.5rem !important;
  padding: 0 1.5rem !important;
  border-radius: 0 !important;
}

body.gov-enterprise #block-mrv-pakistan-branding,
body.gov-enterprise #block-mrv-pakistan-branding-2 {
  grid-area: brand !important;
}

body.gov-enterprise #block-mrv-pakistan-dropdownlanguage,
body.gov-enterprise #block-mrv-pakistan-menuducomptedelutilisateur,
body.gov-enterprise #block-views-block-notifications-block-1 {
  margin-top: 0 !important;
}

body.gov-enterprise #block-mainnavigation-2,
body.gov-enterprise .block-tb-megamenu {
  grid-area: nav !important;
  grid-column: 1 / -1 !important;
  width: 100% !important;
  position: static !important;
  left: auto !important;
  bottom: auto !important;
}

body.gov-enterprise #block-mrv-pakistan-dropdownlanguage {
  position: static !important;
  width: auto !important;
  top: auto !important;
  right: auto !important;
  justify-self: end !important;
}

body.gov-enterprise #block-mrv-pakistan-menuducomptedelutilisateur {
  position: static !important;
  min-width: auto !important;
  background: var(--gov-primary) !important;
  border-radius: 4px !important;
  padding: 0.25rem 0.75rem !important;
  height: auto !important;
  font-size: 0.8125rem !important;
}

body.gov-enterprise .branding {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 1rem 1.5rem !important;
}

body.gov-enterprise .branding img,
body.gov-enterprise header#sitename a.navbar-brand img {
  display: none !important;
}

body.gov-enterprise a.navbar-brand.ms-3 {
  position: static !important;
  width: auto !important;
  height: auto !important;
  clip: auto !important;
  clip-path: none !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  color: var(--gov-primary) !important;
  line-height: 1.25 !important;
  white-space: normal !important;
}

body.gov-enterprise .navbar-text,
body.gov-enterprise p.navbar-text {
  display: none !important;
}

body.gov-enterprise .default-context-banner {
  font-size: 0.8125rem !important;
  background: var(--gov-accent-soft) !important;
  border: 1px solid var(--gov-border) !important;
  border-radius: 4px !important;
  padding: 0.35rem 0.65rem !important;
  color: var(--gov-text-muted) !important;
}

/* ========== NAVIGATION BAND ========== */
body.gov-enterprise .gov-nav-band {
  background: var(--gov-primary) !important;
  padding: 0 !important;
}

body.gov-enterprise .gov-nav-band .gov-container {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body.gov-enterprise .block-tb-megamenu .tbm,
body.gov-enterprise .tbm.tbm-main,
body.gov-enterprise #tbm-main,
body.gov-enterprise #tbm-main .tbm-collapse {
  background: transparent !important;
  max-width: none !important;
  width: 100% !important;
  display: flex !important;
  position: static !important;
  box-shadow: none !important;
}

body.gov-enterprise .tbm-nav,
body.gov-enterprise .tbm-nav.level-0 {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0 !important;
  width: 100% !important;
}

body.gov-enterprise .tbm-link.level-1,
body.gov-enterprise .tbm-item a,
body.gov-enterprise #navbar li a {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 600 !important;
  font-size: 0.9375rem !important;
  padding: 1rem 1.25rem !important;
  text-decoration: none !important;
  text-shadow: none !important;
  border: none !important;
}

body.gov-enterprise .tbm-link.level-1:hover,
body.gov-enterprise .tbm-link.level-1:focus {
  background: var(--gov-primary-mid) !important;
  color: #fff !important;
}

/* Active top-level nav tab only — darker; submenus stay white */
body.gov-enterprise .tbm-item.level-1.active>.tbm-link-container>.tbm-link,
body.gov-enterprise .tbm-item.level-1.active-trail>.tbm-link-container>.tbm-link {
  background: #0a2a1f !important;
  color: #fff !important;
}

body.gov-enterprise .tbm-item.active-trail .tbm-submenu .tbm-link,
body.gov-enterprise .tbm-item.active .tbm-submenu .tbm-link,
body.gov-enterprise .tbm-item.open .tbm-submenu .tbm-link {
  background: transparent !important;
  color: var(--gov-text) !important;
}

body.gov-enterprise #navbar>div>div>nav>ul>li.dropdown {
  background-color: transparent !important;
}

body.gov-enterprise #navbar>div>div>nav>ul>li.active-trail {
  background-color: transparent !important;
}

body.gov-enterprise #navbar li.active-trail>a.dropdown-toggle,
body.gov-enterprise #navbar li.open>a.dropdown-toggle {
  background: #0a2a1f !important;
  color: #fff !important;
}

body.gov-enterprise #navbar>div>div>nav>ul>li.open>ul.dropdown-menu,
body.gov-enterprise #navbar .dropdown-menu {
  background-color: #fff !important;
}

body.gov-enterprise .tbm-link-container:hover {
  border-bottom: none !important;
}

body.gov-enterprise .tbm-submenu,
body.gov-enterprise .tbm-item.open .tbm-submenu,
body.gov-enterprise .tbm-item.active-trail .tbm-submenu,
body.gov-enterprise .tbm-item.active .tbm-submenu {
  background: #fff !important;
  border: 1px solid var(--gov-border) !important;
  border-radius: 6px !important;
  box-shadow: 0 12px 32px rgba(15, 61, 46, 0.15) !important;
  padding: 0.5rem 0 !important;
}

body.gov-enterprise .tbm-submenu .tbm-link {
  color: var(--gov-text) !important;
  padding: 0.65rem 1.25rem !important;
}

body.gov-enterprise .tbm-submenu .tbm-link:hover {
  background: var(--gov-accent-soft) !important;
  color: var(--gov-primary) !important;
}

/* Force dark green text in mobile sidebar even if background is grey */
body.gov-enterprise .tbm-submenu.bg-grey .tbm-link,
body.gov-enterprise .tbm-submenu.bg-grey a,
body.gov-enterprise .tbm-submenu .tbm-link {
  color: var(--gov-primary) !important;
}

body.gov-enterprise #block-mrv-pakistan-dropdownlanguage fieldset {
  margin: 0 !important;
  border: none !important;
}

body.gov-enterprise #block-mrv-pakistan-dropdownlanguage .fieldset-legend {
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: var(--gov-text-muted) !important;
  font-weight: 600 !important;
}

/* ========== PAGE TITLE ========== */
body.gov-enterprise .page-header-shape-wrapper::before,
body.gov-enterprise .page-header-shape-wrapper::after,
body.gov-enterprise h1.page-header::after {
  display: none !important;
}

body.gov-enterprise .page-header-wrapper {
  background: linear-gradient(135deg, var(--gov-primary) 0%, var(--gov-primary-mid) 100%) !important;
  box-shadow: 0 4px 16px rgba(15, 61, 46, 0.12) !important;
  padding: 2.5rem 1.5rem !important;
  margin: 0 0 2rem !important;
  border: none !important;
}

body.gov-enterprise h1.page-header {
  font-size: clamp(1.75rem, 4vw, 2.5rem) !important;
  font-weight: 700 !important;
  height: auto !important;
  color: #fff !important;
  text-align: center !important;
  margin: 0 !important;
  letter-spacing: -0.02em !important;
}

/* ========== FRONT PAGE HERO ========== */
body.gov-enterprise .gov-hero {
  background: linear-gradient(135deg, var(--gov-primary) 0%, var(--gov-primary-mid) 50%, var(--gov-accent) 100%) !important;
  color: #fff !important;
  padding: 3rem 1.5rem !important;
  margin: 0 0 2.5rem !important;
  border-radius: 0 !important;
  position: relative !important;
  overflow: hidden !important;
}

body.gov-enterprise .gov-hero::after {
  content: "" !important;
  position: absolute !important;
  right: -80px !important;
  top: -80px !important;
  width: 320px !important;
  height: 320px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.06) !important;
  pointer-events: none !important;
}

body.gov-enterprise .gov-hero-inner {
  max-width: 900px !important;
  margin: 0 auto !important;
  position: relative !important;
  z-index: 1 !important;
}

body.gov-enterprise .gov-hero-eyebrow {
  text-transform: uppercase !important;
  letter-spacing: 0.12em !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  opacity: 0.85 !important;
  margin: 0 0 0.75rem !important;
}

body.gov-enterprise .gov-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  margin: 0 0 1rem !important;
  color: #fff !important;
}

body.gov-enterprise .gov-hero-lead {
  font-size: 1.125rem !important;
  line-height: 1.65 !important;
  opacity: 0.92 !important;
  margin: 0 !important;
  max-width: 720px !important;
}

body.gov-enterprise.path-frontpage .page-header-wrapper {
  display: none !important;
}

/* ========== MAIN CONTENT ========== */
body.gov-enterprise .gov-main-wrapper {
  flex: 1 !important;
  background: var(--gov-surface) !important;
  padding: 2rem 0 3rem !important;
}

body.gov-enterprise .gov-content,
body.gov-enterprise div.region-content {
  background: var(--gov-surface-elevated) !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 12px rgba(15, 61, 46, 0.06) !important;
  padding: 2rem !important;
  border: 1px solid var(--gov-border) !important;
  max-width: none !important;
  width: 100% !important;
}

body.gov-enterprise.path-frontpage .gov-content {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
}

body.gov-enterprise .row {
  --bs-gutter-x: 1.5rem !important;
}

body.gov-enterprise .path-frontpage section#block-mrv-pakistan-fronttext,
body.gov-enterprise .path-frontpage section#block-mrv-pakistan-connexionutilisateur {
  display: block !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin-bottom: 2rem !important;
}

body.gov-enterprise .path-frontpage .region-content {
  display: grid !important;
  grid-template-columns: 1fr 380px !important;
  gap: 2rem !important;
  align-items: start !important;
}

@media (max-width: 991px) {
  body.gov-enterprise .path-frontpage .region-content {
    grid-template-columns: 1fr !important;
  }

  body.gov-enterprise .gov-utility-inner {
    grid-template-columns: 1fr !important;
    grid-template-areas: "brand" "tools" "nav" !important;
  }
}

body.gov-enterprise section#block-mrv-pakistan-connexionutilisateur,
body.gov-enterprise .block-user-login-block {
  background: #fff !important;
  border: 1px solid var(--gov-border) !important;
  border-radius: 8px !important;
  padding: 2rem !important;
  box-shadow: 0 4px 20px rgba(15, 61, 46, 0.08) !important;
}

body.gov-enterprise section#block-mrv-pakistan-connexionutilisateur h2,
body.gov-enterprise .block-user-login-block h2 {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: var(--gov-primary) !important;
  margin-bottom: 1.25rem !important;
  padding-bottom: 0.75rem !important;
  border-bottom: 3px solid var(--gov-accent) !important;
}

body.gov-enterprise div.risq-stats div.risq-stats-container {
  box-shadow: 0 2px 8px rgba(15, 61, 46, 0.08) !important;
  border: 1px solid var(--gov-border) !important;
  border-radius: 8px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.gov-enterprise div.risq-stats div.risq-stats-container:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 8px 24px rgba(15, 61, 46, 0.12) !important;
}

/* ========== HOMEPAGE risq-front-menu icons (FrontMenuBlock) ========== */
body.gov-enterprise .risq-front-menu-list .risq-front-menu,
body.gov-enterprise .risq-front-menu {
  height: 140px !important;
}

body.gov-enterprise .risq-front-menu a {
  font-size: 1.1em !important;
}

body.gov-enterprise .risq-front-menu a:before {
  width: 40px !important;
  height: 40px !important;
  margin: 0.65em auto !important;
}

body.gov-enterprise .risq-front-menu a::after {
  top: 72px !important;
}

/* ========== HOMEPAGE legacy block icons (divmenubckground) ========== */
body.gov-enterprise #block-menumainmenu>.menu-wrapper>.divmenubckground,
body.gov-enterprise #block-inventoriesnew>.menu-wrapper>.divmenubckground,
body.gov-enterprise #block-issuesnew>.menu-wrapper>.divmenubckground,
body.gov-enterprise #block-actionssupports>.menu-wrapper>.divmenubckground,
body.gov-enterprise #block-actionssupportsnew>.menu-wrapper>.divmenubckground,
body.gov-enterprise #block-mrv-pakistan-resources>.menu-wrapper>.divmenubckground,
body.gov-enterprise #block-climateinformations>.menu-wrapper>.divmenubckground,
body.gov-enterprise #block-climateinformationsnew>.menu-wrapper>.divmenubckground,
body.gov-enterprise #block-administration>.menu-wrapper>.divmenubckground,
body.gov-enterprise #block-administrationnew>.menu-wrapper>.divmenubckground {
  background-size: 35% !important;
  transition: background-size 0.2s ease !important;
}

body.gov-enterprise #block-menumainmenu>.menu-wrapper:hover>.divmenubckground,
body.gov-enterprise #block-inventoriesnew>.menu-wrapper:hover>.divmenubckground,
body.gov-enterprise #block-issuesnew>.menu-wrapper:hover>.divmenubckground,
body.gov-enterprise #block-actionssupports>.menu-wrapper:hover>.divmenubckground,
body.gov-enterprise #block-actionssupportsnew>.menu-wrapper:hover>.divmenubckground,
body.gov-enterprise #block-mrv-pakistan-resources>.menu-wrapper:hover>.divmenubckground,
body.gov-enterprise #block-climateinformations>.menu-wrapper:hover>.divmenubckground,
body.gov-enterprise #block-climateinformationsnew>.menu-wrapper:hover>.divmenubckground,
body.gov-enterprise #block-administration>.menu-wrapper:hover>.divmenubckground,
body.gov-enterprise #block-administrationnew>.menu-wrapper:hover>.divmenubckground {
  background-size: 40% !important;
}

/* Section page menu cards — white panel; colored strip only on icon area */
body.gov-enterprise #block-menumainmenu .menu-wrapper,
body.gov-enterprise #block-inventoriesnew .menu-wrapper,
body.gov-enterprise #block-issuesnew .menu-wrapper,
body.gov-enterprise #block-actionssupports .menu-wrapper,
body.gov-enterprise #block-actionssupportsnew .menu-wrapper,
body.gov-enterprise #block-mrv-pakistan-resources .menu-wrapper,
body.gov-enterprise #block-climateinformations .menu-wrapper,
body.gov-enterprise #block-climateinformationsnew .menu-wrapper,
body.gov-enterprise #block-administration .menu-wrapper,
body.gov-enterprise #block-administrationnew .menu-wrapper {
  background-color: #fff !important;
  border: 1px solid var(--gov-border) !important;
  box-shadow: 0 2px 12px rgba(15, 61, 46, 0.08) !important;
}

body.gov-enterprise #block-inventoriesnew>.menu-wrapper>ul,
body.gov-enterprise #block-issuesnew>.menu-wrapper>ul,
body.gov-enterprise #block-actionssupportsnew>.menu-wrapper>ul,
body.gov-enterprise #block-mrv-pakistan-resources>.menu-wrapper>ul,
body.gov-enterprise #block-climateinformationsnew>.menu-wrapper>ul,
body.gov-enterprise #block-administrationnew>.menu-wrapper>ul,
body.gov-enterprise #block-menumainmenu>.menu-wrapper>ul,
body.gov-enterprise #block-actionssupports>.menu-wrapper>ul,
body.gov-enterprise #block-climateinformations>.menu-wrapper>ul,
body.gov-enterprise #block-administration>.menu-wrapper>ul,
body.gov-enterprise:not(.dark-mode-active) .menu-inventory.bg-dark,
body.gov-enterprise:not(.dark-mode-active) .menu-module.bg-dark {
  background-color: #fff !important;
}

body.gov-enterprise:not(.dark-mode-active) .menu-inventory.bg-dark .list-group-item,
body.gov-enterprise:not(.dark-mode-active) .menu-module.bg-dark .list-group-item {
  background-color: #fff !important;
  border-color: var(--gov-border) !important;
}

/* Base dark mode styles */
body.dark-mode-active {
  --gov-surface: #121212 !important;
  --gov-surface-elevated: #1e1e1e !important;
  --gov-text: #e0e0e0 !important;
  --gov-text-muted: #b0b0b0 !important;
  --gov-border: #333333 !important;
  background-color: #121212 !important;
  color: #e0e0e0 !important;
}

/* Dark mode form fieldset and controls */
body.dark-mode-active fieldset {
  background-color: var(--gov-surface-elevated) !important;
  border-color: var(--gov-border) !important;
  color: var(--gov-text) !important;
}

body.dark-mode-active legend,
body.dark-mode-active .fieldset-legend {
  color: var(--gov-text) !important;
  background-color: transparent !important;
}

body.dark-mode-active .form-control,
body.dark-mode-active .form-select,
body.dark-mode-active input[type="text"],
body.dark-mode-active input[type="email"],
body.dark-mode-active input[type="password"],
body.dark-mode-active input[type="number"],
body.dark-mode-active select,
body.dark-mode-active textarea {
  background-color: var(--gov-surface) !important;
  color: var(--gov-text) !important;
  border-color: var(--gov-border) !important;
}

body.dark-mode-active .gov-header {
  background-color: #1a1a1a !important;
  border-bottom: 1px solid #333 !important;
}

body.dark-mode-active .gov-content,
body.dark-mode-active .block-user-login-block,
body.dark-mode-active section#block-mrv-pakistan-connexionutilisateur {
  background-color: #1e1e1e !important;
  border-color: #333 !important;
  color: #e0e0e0 !important;
}

body.dark-mode-active .list-group-item {
  background-color: #252525 !important;
  border-color: #333 !important;
}

body.dark-mode-active a.navbar-brand.ms-3 {
  color: #fff !important;
}

body.dark-mode-active .tbm-submenu {
  background-color: #252525 !important;
  border-color: #444 !important;
}

body.dark-mode-active .tbm-submenu .tbm-link {
  color: #e0e0e0 !important;
}

body.dark-mode-active .tbm-submenu .tbm-link:hover {
  background-color: #333 !important;
}

body.dark-mode-active .default-context-banner {
  background-color: #2c2c2c !important;
  border-color: #444 !important;
  color: #ccc !important;
}

/* ========== LIST GROUP ITEMS — unified green styling ========== */
/* Outer col-sm-6 list items (nav card) */
body.gov-enterprise ul.list-group>li.col-sm-6.list-group-item {
  background-color: var(--gov-surface-elevated) !important;
  border: 2px solid var(--gov-border) !important;
  border-top: 4px solid var(--gov-primary) !important;
  color: var(--gov-text) !important;
  padding: 1.25rem !important;
  margin-bottom: 0.75rem !important;
  border-radius: 8px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.gov-enterprise ul.list-group>li.col-sm-6.list-group-item>a {
  color: var(--gov-primary) !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  text-decoration: none !important;
  display: block !important;
  margin-bottom: 0.5rem !important;
}

body.gov-enterprise ul.list-group>li.col-sm-6.list-group-item:hover {
  border-color: var(--gov-accent) !important;
  border-top-color: var(--gov-accent) !important;
  background-color: var(--gov-accent-soft) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(15, 61, 46, 0.12) !important;
}

/* Inner nested list items */
body.gov-enterprise .list-group-item .item-list ul.list-group {
  margin-top: 0.75rem !important;
  padding-left: 0 !important;
  border-left: none !important;
}

body.gov-enterprise .list-group-item .item-list .list-group-item {
  border: none !important;
  border-bottom: 1px solid var(--gov-border) !important;
  padding: 0.45rem 0.5rem !important;
  margin-bottom: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
}

body.gov-enterprise .list-group-item .item-list .list-group-item:last-child {
  border-bottom: none !important;
}

body.gov-enterprise .list-group-item .item-list .list-group-item a {
  color: var(--gov-accent) !important;
  font-weight: 500 !important;
  font-size: 0.9rem !important;
  text-decoration: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
}

body.gov-enterprise .list-group-item .item-list .list-group-item a:hover {
  color: var(--gov-primary) !important;
  text-decoration: none !important;
  padding-left: 0.25rem !important;
}

body.gov-enterprise .list-group-item .item-list .list-group-item a::before {
  content: '→' !important;
  font-size: 0.75rem !important;
  opacity: 0.6 !important;
}

body.gov-enterprise div.block-front-stat-block {
  box-shadow: 0 4px 16px rgba(15, 61, 46, 0.1) !important;
  border-radius: 8px !important;
  margin-top: 2rem !important;
}

/* ========== TYPOGRAPHY & LINKS ========== */
body.gov-enterprise h1,
body.gov-enterprise h2,
body.gov-enterprise h3,
body.gov-enterprise h4 {
  font-family: var(--gov-font) !important;
  font-weight: 700 !important;
  color: var(--gov-primary) !important;
}

body.gov-enterprise a:hover,
body.gov-enterprise a:focus {
  color: var(--gov-primary-mid) !important;
  text-decoration: underline !important;
}

/* Remove all blue colors and force professional green */
body.gov-enterprise a,
body.gov-enterprise .btn-link {
  color: var(--gov-accent) !important;
}

body.gov-enterprise a:hover,
body.gov-enterprise a:focus,
body.gov-enterprise .btn-link:hover,
body.gov-enterprise .btn-link:focus {
  color: var(--gov-primary-mid) !important;
}

/* ========== BUTTONS ========== */
body.gov-enterprise .btn,
body.gov-enterprise .button,
body.gov-enterprise input[type="submit"],
body.gov-enterprise button[type="submit"] {
  font-family: var(--gov-font) !important;
  font-weight: 600 !important;
  border-radius: 4px !important;
  padding: 0.5rem 1.25rem !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

body.gov-enterprise .btn:hover,
body.gov-enterprise .button:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

body.gov-enterprise .btn-primary,
body.gov-enterprise .button--primary {
  background: var(--gov-accent) !important;
  border-color: var(--gov-accent) !important;
}

body.gov-enterprise .btn-primary:hover {
  background: var(--gov-primary-mid) !important;
  border-color: var(--gov-primary-mid) !important;
}

/* ========== TABLES ========== */
body.gov-enterprise table thead th,
body.gov-enterprise .table thead th,
body.gov-enterprise table.dataTable thead th {
  background: var(--gov-primary) !important;
  color: #fff !important;
  font-weight: 600 !important;
  border: none !important;
}

/* Paragraphs field headers (e.g. "Inventory files list") — h4 typography
   uses gov-primary text; override inside green thead for contrast. */
body.gov-enterprise table thead th h1,
body.gov-enterprise table thead th h2,
body.gov-enterprise table thead th h3,
body.gov-enterprise table thead th h4,
body.gov-enterprise table thead th .label,
body.gov-enterprise .table thead th h1,
body.gov-enterprise .table thead th h2,
body.gov-enterprise .table thead th h3,
body.gov-enterprise .table thead th h4,
body.gov-enterprise .table thead th .label {
  color: #fff !important;
}

body.gov-enterprise table thead th .paragraphs-actions .btn,
body.gov-enterprise table thead th .paragraphs-actions input[type="submit"],
body.gov-enterprise table thead th .paragraphs-actions button,
body.gov-enterprise .table thead th .paragraphs-actions .btn,
body.gov-enterprise .table thead th .paragraphs-actions input[type="submit"],
body.gov-enterprise .table thead th .paragraphs-actions button {
  background: #fff !important;
  color: var(--gov-primary) !important;
  border-color: rgba(255, 255, 255, 0.85) !important;
}

body.gov-enterprise table thead th .paragraphs-actions .btn:hover,
body.gov-enterprise table thead th .paragraphs-actions input[type="submit"]:hover,
body.gov-enterprise table thead th .paragraphs-actions button:hover,
body.gov-enterprise .table thead th .paragraphs-actions .btn:hover,
body.gov-enterprise .table thead th .paragraphs-actions input[type="submit"]:hover,
body.gov-enterprise .table thead th .paragraphs-actions button:hover {
  background: var(--gov-accent-soft) !important;
  color: var(--gov-primary) !important;
}

/* ========== FORMS ========== */
body.gov-enterprise .form-control,
body.gov-enterprise .form-select {
  border-radius: 4px !important;
  border-color: var(--gov-border) !important;
  min-height: 2.75rem !important;
}

body.gov-enterprise fieldset {
  border: 1px solid var(--gov-border) !important;
  border-radius: 8px !important;
  padding: 1.25rem !important;
  background: #fff !important;
}

/* ========== TABS ========== */
body.gov-enterprise nav.tabs ul.nav-tabs li {
  background: transparent !important;
}

body.gov-enterprise nav.tabs ul.nav-tabs li a {
  color: var(--gov-primary) !important;
  font-weight: 600 !important;
}

body.gov-enterprise nav.tabs ul.nav-tabs li.active {
  display: inline-block !important;
  background: var(--gov-primary) !important;
}

body.gov-enterprise nav.tabs ul.nav-tabs li.active a {
  color: #fff !important;
}

/* ========== MESSAGES ========== */
body.gov-enterprise .messages,
body.gov-enterprise .alert {
  border-radius: 6px !important;
  border-left-width: 4px !important;
  font-weight: 500 !important;
}

body.gov-enterprise .view-empty {
  background: var(--gov-accent-soft) !important;
  border: 1px dashed var(--gov-border) !important;
  color: var(--gov-text-muted) !important;
  border-radius: 8px !important;
}

/* ========== FOOTER ========== */
body.gov-enterprise .gov-footer {
  background: var(--gov-primary) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  padding: 2.5rem 0 !important;
  margin-top: auto !important;
}

body.gov-enterprise .gov-footer a,
body.gov-enterprise .gov-footer .menu a {
  color: rgba(255, 255, 255, 0.9) !important;
}

body.gov-enterprise .region-footer,
body.gov-enterprise #block-mrv-pakistan-footer {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  gap: 1.5rem !important;
  color: rgba(255, 255, 255, 0.88) !important;
}

body.gov-enterprise #block-circlemenu {
  display: none !important;
}

body.gov-enterprise div.footer-logos img {
  filter: brightness(0) invert(1) opacity(0.9) !important;
  max-height: 48px !important;
}

/* ========== MISC CLEANUP ========== */
body.gov-enterprise #block-mainnavigation-2 {
  left: auto !important;
}

body.gov-enterprise .block-help {
  background: var(--gov-accent-soft) !important;
  border-left: 4px solid var(--gov-accent) !important;
  padding: 1rem 1.25rem !important;
  border-radius: 0 6px 6px 0 !important;
}

body.gov-enterprise .breadcrumb {
  background: transparent !important;
  padding: 0.5rem 0 1rem !important;
  font-size: 0.875rem !important;
}

body.gov-enterprise .skip-link:focus {
  background: var(--gov-primary) !important;
  color: #fff !important;
  padding: 0.75rem 1rem !important;
  z-index: 9999 !important;
}

/* ========== GLOBE LANGUAGE SWITCHER ========== */
body.gov-enterprise #block-mrv-pakistan-dropdownlanguage .content>fieldset,
body.gov-enterprise #block-mrv-pakistan-dropdownlanguage fieldset,
body.gov-enterprise .gov-lang-switcher--fallback fieldset {
  display: none !important;
}

body.gov-enterprise .gov-lang-switcher--fallback .dropbutton-wrapper {
  display: none !important;
}

body.gov-enterprise .gov-lang-switcher {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-self: end !important;
}

body.gov-enterprise .gov-lang-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2.75rem !important;
  height: 2.75rem !important;
  padding: 0 !important;
  border: 1px solid var(--gov-border) !important;
  border-radius: 50% !important;
  background: var(--gov-surface-elevated) !important;
  color: var(--gov-primary) !important;
  cursor: pointer !important;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
}

body.gov-enterprise .gov-lang-toggle:hover,
body.gov-enterprise .gov-lang-toggle:focus {
  background: var(--gov-accent-soft) !important;
  border-color: var(--gov-accent) !important;
  box-shadow: 0 2px 8px rgba(15, 61, 46, 0.12) !important;
}

body.gov-enterprise .gov-lang-globe {
  font-size: 1.35rem !important;
  line-height: 1 !important;
}

body.gov-enterprise .gov-lang-menu {
  position: absolute !important;
  top: calc(100% + 0.5rem) !important;
  right: 0 !important;
  min-width: 11rem !important;
  margin: 0 !important;
  padding: 0.35rem !important;
  list-style: none !important;
  background: #fff !important;
  border: 1px solid var(--gov-border) !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 24px rgba(15, 61, 46, 0.14) !important;
  z-index: 1200 !important;
}

body.gov-enterprise .gov-lang-menu[hidden] {
  display: none !important;
}

body.gov-enterprise .gov-lang-item {
  margin: 0 !important;
  padding: 0 !important;
}

body.gov-enterprise .gov-lang-link {
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  padding: 0.55rem 0.75rem !important;
  border-radius: 6px !important;
  color: var(--gov-text) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
}

body.gov-enterprise .gov-lang-link:hover {
  background: var(--gov-accent-soft) !important;
  color: var(--gov-primary) !important;
  text-decoration: none !important;
}

body.gov-enterprise .gov-lang-link.is-active {
  background: var(--gov-accent-soft) !important;
  color: var(--gov-primary) !important;
  cursor: default !important;
}

body.gov-enterprise .gov-lang-flag {
  border-radius: 2px !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
  object-fit: cover !important;
}

/* ========== MOBILE RESPONSIVENESS ========== */
@media (max-width: 767px) {
  body.gov-enterprise .gov-header-inner {
    padding: 0.5rem 0 !important;
    gap: 0.5rem !important;
  }

  body.gov-enterprise .branding img,
  body.gov-enterprise header#sitename a.navbar-brand img {
    max-height: 52px !important;
  }

  body.gov-enterprise a.navbar-brand.ms-3 {
    font-size: 1rem !important;
  }

  /* Keep tools to the right on mobile */
  body.gov-enterprise #block-mrv-pakistan-branding,
  body.gov-enterprise #block-mrv-pakistan-branding-2 {
    flex: 1 1 auto !important;
    text-align: left !important;
  }

  body.gov-enterprise a.navbar-brand.ms-3 {
    font-size: 1.1rem !important;
    max-width: 200px !important;
    display: block !important;
  }

  body.gov-enterprise #block-mrv-pakistan-dropdownlanguage,
  body.gov-enterprise #block-mrv-pakistan-menuducomptedelutilisateur,
  body.gov-enterprise #block-views-block-notifications-block-1 {
    flex: 0 0 auto !important;
    order: 5 !important;
    margin-left: 0.15rem !important;
  }

  /* Stack nav below header on mobile */
  body.gov-enterprise #block-mainnavigation-2,
  body.gov-enterprise .gov-nav-band {
    order: 10 !important;
    flex: 0 0 100% !important;
    margin-top: 0.5rem !important;
  }

  /* Improve mobile menu appearance */
  body.gov-enterprise .navbar-toggler {
    border: none !important;
    padding: 0.5rem !important;
    color: #fff !important;
  }

  /* Homepage card icons - smaller on mobile */
  body.gov-enterprise #block-menumainmenu .menu-wrapper,
  body.gov-enterprise #block-inventoriesnew .menu-wrapper,
  body.gov-enterprise #block-issuesnew .menu-wrapper,
  body.gov-enterprise #block-actionssupports .menu-wrapper,
  body.gov-enterprise #block-actionssupportsnew .menu-wrapper,
  body.gov-enterprise #block-mrv-pakistan-resources .menu-wrapper,
  body.gov-enterprise #block-climateinformations .menu-wrapper,
  body.gov-enterprise #block-climateinformationsnew .menu-wrapper,
  body.gov-enterprise #block-administration .menu-wrapper,
  body.gov-enterprise #block-administrationnew .menu-wrapper {
    flex-direction: row !important;
    height: auto !important;
    padding: 1rem !important;
    align-items: center !important;
    gap: 1rem !important;
  }

  body.gov-enterprise #block-menumainmenu>.menu-wrapper>.divmenubckground,
  body.gov-enterprise #block-inventoriesnew>.menu-wrapper>.divmenubckground,
  body.gov-enterprise #block-issuesnew>.menu-wrapper>.divmenubckground,
  body.gov-enterprise #block-actionssupports>.menu-wrapper>.divmenubckground,
  body.gov-enterprise #block-actionssupportsnew>.menu-wrapper>.divmenubckground,
  body.gov-enterprise #block-mrv-pakistan-resources>.menu-wrapper>.divmenubckground,
  body.gov-enterprise #block-climateinformations>.menu-wrapper>.divmenubckground,
  body.gov-enterprise #block-climateinformationsnew>.menu-wrapper>.divmenubckground,
  body.gov-enterprise #block-administration>.menu-wrapper>.divmenubckground,
  body.gov-enterprise #block-administrationnew>.menu-wrapper>.divmenubckground {
    width: 60px !important;
    height: 60px !important;
    flex-shrink: 0 !important;
    background-size: contain !important;
  }

  /* List-group cards - full width on mobile */
  body.gov-enterprise ul.list-group>li.col-sm-6.list-group-item {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem !important;
  }

  /* Front content stacked on mobile */
  body.gov-enterprise .path-frontpage .region-content {
    grid-template-columns: 1fr !important;
    padding: 1rem !important;
  }

  body.gov-enterprise .gov-hero {
    padding: 2rem 1rem !important;
  }

  body.gov-enterprise .gov-hero-title {
    font-size: 1.5rem !important;
  }
}

@media (max-width: 991px) and (min-width: 768px) {

  body.gov-enterprise .branding img,
  body.gov-enterprise header#sitename a.navbar-brand img {
    max-height: 60px !important;
  }
}

#gov-theme-toggle {
  border-width: 2px !important;
  font-weight: 600 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#gov-theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  transform: scale(1.05) !important;
}

body.dark-mode-active #gov-theme-toggle {
  border-color: var(--gov-accent) !important;
  color: var(--gov-accent) !important;
}

body.dark-mode-active #gov-theme-toggle:hover {
  background-color: var(--gov-accent) !important;
  color: #fff !important;
}