/* ============================================================
   Fortescue Brand Theme — brand.css
   Loaded last; overrides Bootstrap + Sneat components.
   Colors: Green #19E63C · Navy #0A1B3D · Body #F5F7F9
   ============================================================ */

/* ── 1. DESIGN TOKENS ──────────────────────────────────────── */
:root {
  --fmg-green:        #19e63c;
  --fmg-green-hover:  #13c232;
  --fmg-green-active: #0fa82b;
  --fmg-green-soft:   rgba(25, 230, 60, 0.12);
  --fmg-green-dim:    rgba(25, 230, 60, 0.30);
  --fmg-navy:         #0a1b3d;
  --fmg-navy-2:       #13294b;
  --fmg-navy-3:       #1c3a5e;
  --fmg-body-bg:      #f5f7f9;
  --fmg-surface:      #ffffff;
  --fmg-border:       #e3e8ee;
  --fmg-text:         #0a1b3d;
  --fmg-text-muted:   #5b6573;
  --fmg-radius:       0.5rem;
  --fmg-radius-lg:    0.75rem;
  --fmg-radius-pill:  50rem;
  --fmg-shadow:       0 2px 12px rgba(10,27,61,0.10);
  --fmg-shadow-sm:    0 1px 4px rgba(10,27,61,0.08);

  /* Bootstrap CSS variable overrides */
  --bs-primary:        #19e63c;
  --bs-primary-rgb:    25, 230, 60;
  --bs-dark:           #0a1b3d;
  --bs-dark-rgb:       10, 27, 61;
  --bs-body-bg:        #f5f7f9;
  --bs-body-color:     #0a1b3d;
  --bs-link-color:     #0fa82b;
  --bs-link-hover-color: #0a1b3d;
  --bs-border-color:   #e3e8ee;
  --bs-border-radius:       0.5rem;
  --bs-border-radius-sm:    0.375rem;
  --bs-border-radius-lg:    0.75rem;
  --bs-border-radius-xl:    1rem;
  --bs-border-radius-pill:  50rem;
  --bs-box-shadow:     0 2px 12px rgba(10,27,61,0.10);
  --bs-box-shadow-sm:  0 1px 4px rgba(10,27,61,0.08);
}

/* ── 2. TYPOGRAPHY (Manrope) ─────────────────────────────── */
body,
.menu,
.menu-item,
.layout-navbar,
button,
input,
select,
textarea {
  font-family: 'Manrope', 'Inter', 'Public Sans', sans-serif !important;
}
h1, h2, h3, h4, h5, h6,
.card-title,
.modal-title,
.page-title,
.app-brand-text,
.menu-header-text {
  font-family: 'Manrope', 'Inter', sans-serif !important;
  font-weight: 700;
  color: var(--fmg-navy);
  letter-spacing: -0.01em;
}

/* ── 3. BODY & PAGE ─────────────────────────────────────── */
body {
  background-color: var(--fmg-body-bg) !important;
  color: var(--fmg-text) !important;
}

/* ── 4. BUTTONS ─────────────────────────────────────────── */
.btn {
  border-radius: var(--fmg-radius) !important;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.btn-primary {
  background-color: var(--fmg-green) !important;
  border-color: var(--fmg-green) !important;
  color: var(--fmg-navy) !important;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--fmg-green-hover) !important;
  border-color: var(--fmg-green-hover) !important;
  color: var(--fmg-navy) !important;
}
.btn-primary:active {
  background-color: var(--fmg-green-active) !important;
  border-color: var(--fmg-green-active) !important;
}
.btn-outline-primary {
  color: var(--fmg-green-active) !important;
  border-color: var(--fmg-green) !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--fmg-green) !important;
  border-color: var(--fmg-green) !important;
  color: var(--fmg-navy) !important;
}
.btn-secondary {
  background-color: var(--fmg-navy) !important;
  border-color: var(--fmg-navy) !important;
  color: #fff !important;
}
.btn-secondary:hover {
  background-color: var(--fmg-navy-2) !important;
  border-color: var(--fmg-navy-2) !important;
}
.btn-outline-secondary {
  color: var(--fmg-navy) !important;
  border-color: var(--fmg-navy) !important;
}
.btn-outline-secondary:hover {
  background-color: var(--fmg-navy) !important;
  color: #fff !important;
}
.btn-success {
  background-color: var(--fmg-green-active) !important;
  border-color: var(--fmg-green-active) !important;
  color: #fff !important;
}
.btn-success:hover {
  background-color: var(--fmg-green-hover) !important;
  border-color: var(--fmg-green-hover) !important;
}
.btn-outline-success {
  color: var(--fmg-green-active) !important;
  border-color: var(--fmg-green-active) !important;
}
.btn-outline-success:hover {
  background-color: var(--fmg-green-active) !important;
  color: #fff !important;
}
.btn-dark {
  background-color: var(--fmg-navy) !important;
  border-color: var(--fmg-navy) !important;
}
.btn-link {
  color: var(--fmg-green-active) !important;
}
.btn-link:hover {
  color: var(--fmg-navy) !important;
}
/* Custom app buttons */
.btn-cpm-red,
.btn-add-new,
#btnSubmit,
.btn-cpm-green {
  background-color: var(--fmg-green) !important;
  border-color: var(--fmg-green) !important;
  color: var(--fmg-navy) !important;
  font-weight: 600;
  border-radius: var(--fmg-radius) !important;
}
.btn-cpm-red:hover,
.btn-add-new:hover,
#btnSubmit:hover,
.btn-cpm-green:hover {
  background-color: var(--fmg-green-hover) !important;
  border-color: var(--fmg-green-hover) !important;
}

/* ── 5. CARDS ──────────────────────────────────────────────── */
.card {
  border-radius: var(--fmg-radius-lg) !important;
  border-color: var(--fmg-border) !important;
  box-shadow: var(--fmg-shadow-sm) !important;
}
.card-header {
  background-color: var(--fmg-navy) !important;
  color: #fff !important;
  border-bottom: none !important;
  border-radius: var(--fmg-radius-lg) var(--fmg-radius-lg) 0 0 !important;
}
.card-header h1, .card-header h2, .card-header h3,
.card-header h4, .card-header h5, .card-header h6,
.card-header .card-title {
  color: #fff !important;
}
.card-footer {
  border-top: 1px solid var(--fmg-border) !important;
  background-color: var(--fmg-body-bg) !important;
  border-radius: 0 0 var(--fmg-radius-lg) var(--fmg-radius-lg) !important;
}

/* ── 6. ACCORDION ───────────────────────────────────────────── */
.accordion-button {
  font-weight: 600;
  color: var(--fmg-navy) !important;
  background-color: var(--fmg-body-bg) !important;
}
.accordion-button:not(.collapsed) {
  background-color: var(--fmg-green-soft) !important;
  color: var(--fmg-navy) !important;
  box-shadow: inset 0 -1px 0 var(--fmg-border) !important;
}
.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem var(--fmg-green-dim) !important;
  border-color: var(--fmg-green) !important;
}
.accordion-button::after {
  filter: hue-rotate(110deg) saturate(2) !important;
}
.accordion-item {
  border-color: var(--fmg-border) !important;
  border-radius: var(--fmg-radius) !important;
}

/* ── 7. FORMS ───────────────────────────────────────────────── */
.form-control:focus,
.form-select:focus {
  border-color: var(--fmg-green) !important;
  box-shadow: 0 0 0 0.2rem var(--fmg-green-dim) !important;
}
.form-check-input:checked {
  background-color: var(--fmg-green) !important;
  border-color: var(--fmg-green) !important;
}
.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem var(--fmg-green-dim) !important;
}
.form-switch .form-check-input:checked {
  background-color: var(--fmg-green) !important;
  border-color: var(--fmg-green) !important;
}
.input-group-text {
  background-color: var(--fmg-body-bg) !important;
  border-color: var(--fmg-border) !important;
  color: var(--fmg-text-muted) !important;
}

/* ── 8. NAVIGATION / TABS / PILLS ─────────────────────────── */
.nav-tabs .nav-link.active {
  color: var(--fmg-navy) !important;
  border-bottom-color: var(--fmg-green) !important;
  border-bottom-width: 2px !important;
}
.nav-tabs .nav-link:hover {
  color: var(--fmg-green-active) !important;
}
.nav-pills .nav-link.active {
  background-color: var(--fmg-green) !important;
  color: var(--fmg-navy) !important;
}
.nav-pills .nav-link:hover {
  color: var(--fmg-green-active) !important;
}
/* Breadcrumb */
.breadcrumb-item.active {
  color: var(--fmg-green-active) !important;
}
.breadcrumb-item a {
  color: var(--fmg-text-muted) !important;
}
/* Pagination */
.page-link {
  color: var(--fmg-navy) !important;
}
.page-link:hover {
  color: var(--fmg-green-active) !important;
  background-color: var(--fmg-green-soft) !important;
  border-color: var(--fmg-border) !important;
}
.page-item.active .page-link {
  background-color: var(--fmg-navy) !important;
  border-color: var(--fmg-navy) !important;
  color: #fff !important;
}

/* ── 9. BADGES & ALERTS ─────────────────────────────────────── */
.badge.bg-primary,
.badge.bg-label-primary {
  background-color: var(--fmg-green-soft) !important;
  color: var(--fmg-green-active) !important;
}
.badge.bg-dark {
  background-color: var(--fmg-navy) !important;
}
.alert-primary {
  background-color: var(--fmg-green-soft) !important;
  border-color: var(--fmg-green-dim) !important;
  color: var(--fmg-navy) !important;
}
.alert-primary .alert-link {
  color: var(--fmg-green-active) !important;
}
.alert-dark {
  background-color: var(--fmg-navy-2) !important;
  color: #fff !important;
}
.progress-bar {
  background-color: var(--fmg-green) !important;
}

/* ── 10. TABLES ─────────────────────────────────────────────── */
.table thead th,
.table > thead > tr > th {
  background-color: var(--fmg-navy) !important;
  color: #fff !important;
  border-color: var(--fmg-navy-2) !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 0.78rem;
  text-transform: uppercase;
}
.table-hover tbody tr:hover {
  background-color: var(--fmg-green-soft) !important;
}
.table > tbody > tr.selected,
.table > tbody > tr.active {
  background-color: var(--fmg-green-soft) !important;
}
/* DataTables */
table.dataTable thead th {
  background-color: var(--fmg-navy) !important;
  color: #fff !important;
}
table.dataTable thead .sorting::before,
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::before,
table.dataTable thead .sorting_desc::after {
  color: var(--fmg-green) !important;
  opacity: 0.8;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--fmg-navy) !important;
  color: #fff !important;
  border-color: var(--fmg-navy) !important;
  border-radius: var(--fmg-radius) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--fmg-green-soft) !important;
  color: var(--fmg-navy) !important;
  border-color: var(--fmg-border) !important;
}

/* ── 11. MODALS ──────────────────────────────────────────────── */
.modal-header {
  background-color: var(--fmg-navy) !important;
  color: #fff !important;
  border-bottom: none !important;
  border-radius: var(--fmg-radius-lg) var(--fmg-radius-lg) 0 0 !important;
}
.modal-header .modal-title,
.modal-header h5 {
  color: #fff !important;
}
.modal-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(2);
}
.modal-content {
  border-radius: var(--fmg-radius-lg) !important;
  border-color: var(--fmg-border) !important;
  box-shadow: var(--fmg-shadow) !important;
}
.modal-footer {
  border-top: 1px solid var(--fmg-border) !important;
}

/* ── 12. DROPDOWNS ───────────────────────────────────────────── */
.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--fmg-green) !important;
  color: var(--fmg-navy) !important;
}
.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--fmg-green-soft) !important;
  color: var(--fmg-navy) !important;
}
.dropdown-menu {
  border-color: var(--fmg-border) !important;
  border-radius: var(--fmg-radius) !important;
  box-shadow: var(--fmg-shadow) !important;
}

/* ── 13. SIDEBAR / LAYOUT MENU ──────────────────────────────── */
.layout-menu,
.bg-menu-theme,
#layout-menu {
  background-color: var(--fmg-navy) !important;
}

/* Override Bootstrap RGB custom properties inside the sidebar scope so ALL
   .text-primary / .text-info / .text-success etc. utility classes resolve
   to semi-transparent white instead of their global brand colours.
   CSS custom properties are inherited, so any icon using e.g. text-info
   will compute: rgba(255,255,255, 0.65) → matches the rest of the sidebar. */
#layout-menu,
#layout-menu .menu-inner,
.bg-menu-theme {
  --bs-primary-rgb:    255, 255, 255;
  --bs-secondary-rgb:  255, 255, 255;
  --bs-success-rgb:    255, 255, 255;
  --bs-info-rgb:       255, 255, 255;
  --bs-warning-rgb:    255, 255, 255;
  --bs-danger-rgb:     255, 255, 255;
  --bs-dark-rgb:       255, 255, 255;
  --bs-text-opacity:   0.65;
}

/* All menu link text — white */
.bg-menu-theme .menu-link,
.bg-menu-theme .menu-horizontal-prev,
.bg-menu-theme .menu-horizontal-next,
.layout-menu .menu-item .menu-link {
  color: rgba(255,255,255,0.75) !important;
  border-radius: var(--fmg-radius) !important;
  transition: background 0.15s, color 0.15s;
}
/* Hover — subtle */
.bg-menu-theme .menu-link:hover,
.bg-menu-theme .menu-link:focus,
.layout-menu .menu-item .menu-link:hover {
  background-color: rgba(255,255,255,0.06) !important;
  color: #fff !important;
}
/* Active item — subtle green tint + green text/icon (minimal, professional).
   #layout-menu (ID) specificity beats theme-default.css, which only paints
   :not(.menu-toggle) and would otherwise leave active text navy-on-navy.
   Covers leaf links AND toggles, top-level AND inside .menu-sub. */
#layout-menu .menu-item.active > .menu-link,
#layout-menu .menu-item.active > .menu-link.menu-toggle,
#layout-menu .menu-sub > .menu-item.active > .menu-link,
#layout-menu .menu-item.open.active > .menu-toggle,
.bg-menu-theme .menu-item.active > .menu-link {
  background-color: rgba(25, 230, 60, 0.12) !important;
  color: var(--fmg-green) !important;
  font-weight: 600 !important;
  box-shadow: inset 2px 0 0 0 var(--fmg-green);
}
/* Open submenu toggle (not the active one) — faint white highlight */
#layout-menu .menu-item.open:not(.menu-item-closing):not(.active) > .menu-toggle {
  color: #fff !important;
  background-color: rgba(255,255,255,0.06) !important;
}
/* Icon colours — use ID selector for maximum specificity */
#layout-menu i,
#layout-menu [class*="bx"],
#layout-menu .menu-icon,
#layout-menu .tf-icons,
.bg-menu-theme i,
.bg-menu-theme .menu-icon,
.bg-menu-theme .tf-icons,
.layout-menu .menu-link i,
.layout-menu .menu-link .menu-icon {
  color: rgba(255,255,255,0.58) !important;
}

/* ── Monochrome icon normalization ─────────────────────────────
   The menu SVG icons (menuicons.css) ship with a fixed blue fill baked
   into the file, so `color` can't restyle them and they clash with the
   theme. Re-render them as CSS masks tinted by `currentColor`, so each
   icon inherits the link's colour: muted white normally, green when
   active, white on hover. Scoped to #layout-menu to avoid touching the
   same icon classes used in the navbar. */
#layout-menu .menu-icon.tag-icon,
#layout-menu .menu-icon.approval-icon,
#layout-menu .menu-icon.settings-icon,
#layout-menu .menu-icon.usersettings-icon,
#layout-menu .menu-icon.notification-icon {
  background-image: none !important;
  background-color: currentColor !important;
  -webkit-mask-repeat: no-repeat;          mask-repeat: no-repeat;
  -webkit-mask-position: center;           mask-position: center;
  -webkit-mask-size: contain;              mask-size: contain;
}
#layout-menu .menu-icon.tag-icon {
  -webkit-mask-image: url('../img/icons/tag-icon.svg');         mask-image: url('../img/icons/tag-icon.svg');
}
#layout-menu .menu-icon.approval-icon {
  -webkit-mask-image: url('../img/icons/approval-icon.svg');    mask-image: url('../img/icons/approval-icon.svg');
}
#layout-menu .menu-icon.settings-icon {
  -webkit-mask-image: url('../img/icons/amassettings-icon.svg'); mask-image: url('../img/icons/amassettings-icon.svg');
}
#layout-menu .menu-icon.usersettings-icon {
  -webkit-mask-image: url('../img/icons/usersettings-icon.svg'); mask-image: url('../img/icons/usersettings-icon.svg');
}
#layout-menu .menu-icon.notification-icon {
  -webkit-mask-image: url('../img/icons/notification-icon.svg'); mask-image: url('../img/icons/notification-icon.svg');
}
/* Sub-menu item text — brighter than default to remain readable on dark bg */
#layout-menu .menu-sub .menu-item .menu-link,
#layout-menu .menu-sub > .menu-item > .menu-link {
  color: rgba(255,255,255,0.82) !important;
}
#layout-menu .menu-sub .menu-item.active > .menu-link {
  color: var(--fmg-green) !important;
}

/* Active item icon → green (matches subtle tint treatment) */
#layout-menu .menu-item.active > .menu-link i,
#layout-menu .menu-item.active > .menu-link .menu-icon,
#layout-menu .menu-item.active > .menu-link .tf-icons,
.bg-menu-theme .menu-item.active > .menu-link i,
.bg-menu-theme .menu-item.active > .menu-link .menu-icon {
  color: var(--fmg-green) !important;
}
/* Hover icon → bright white */
#layout-menu .menu-item .menu-link:hover i,
#layout-menu .menu-item .menu-link:hover .menu-icon {
  color: #fff !important;
}
/* Sub-menu dot — all items: small gray */
.bg-menu-theme .menu-sub > .menu-item > .menu-link:before {
  background-color: rgba(255,255,255,0.25) !important;
  width: 0.3rem !important;
  height: 0.3rem !important;
}
/* Active sub-item dot — green, kept small */
.bg-menu-theme .menu-sub > .menu-item.active > .menu-link:not(.menu-toggle):before {
  background-color: var(--fmg-green) !important;
  border: none !important;
  width: 0.5rem !important;
  height: 0.5rem !important;
  left: 1.3rem !important;
}
/* Top-level active bar (right edge) — removed; the subtle tint + left accent
   is the active indicator now, so this would be redundant clutter. */
.bg-menu-theme .menu-inner > .menu-item.active:before {
  background: transparent !important;
}
/* Open sub-menu active link indicator */
.bg-menu-theme .menu-inner > .menu-item.open .menu-item.active > .menu-link::before {
  background-color: var(--fmg-green) !important;
}
/* Sub-menu: flat (no nested dark panel) — cleaner, relies on indent + dots */
.bg-menu-theme .menu-sub {
  background-color: transparent !important;
  padding: 2px 0 !important;
}
/* Menu section header labels */
.bg-menu-theme .menu-header,
.menu-header-text,
.bg-menu-theme .menu-inner > .menu-header::before {
  color: rgba(255,255,255,0.38) !important;
  font-size: 0.65rem !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
/* Menu text class */
.bg-menu-theme .menu-text {
  color: rgba(255,255,255,0.75) !important;
}
/* ── SIDEBAR BRAND AREA ─────────────────────────────────────── */
#layout-menu .app-brand {
  background-color: var(--fmg-navy) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  overflow: visible !important;
  height: 72px;
  padding: 0 10px 0 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

#layout-menu .app-brand .app-brand-link {
  flex: 1;
  display: flex !important;
  align-items: center;
  min-width: 0;
}

/* ── SIDEBAR TOGGLE BUTTON ───────────────────────────────────── */
.sidebar-toggle-btn {
  flex-shrink: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.20) !important;
  cursor: pointer;
  outline: none;
  transition: background 0.18s, border-color 0.18s;
}
.sidebar-toggle-btn:hover {
  background-color: rgba(25,230,60,0.16) !important;
  border-color: var(--fmg-green) !important;
}
.sidebar-toggle-btn .sidebar-toggle-icon {
  font-size: 17px;
  color: var(--fmg-green) !important;
  line-height: 1;
  transition: transform 0.25s ease;
  display: block;
}

/* Hide the Sneat auto-generated floating edge toggle */
.layout-menu > .layout-menu-toggle {
  display: none !important;
}

.app-brand-text {
  color: #fff !important;
  font-weight: 800;
}

/* ════════════════════════════════════════════════════════════════
   COLLAPSED SIDEBAR  —  driven by the project's .sidebar_small class
   (toggled by ERDB.js on #layout-menu). Single source of truth.
   ════════════════════════════════════════════════════════════════ */

/* Smooth width transition */
#layout-menu {
  transition: width 0.25s ease;
}

/* Narrow the rail to icon-width */
#layout-menu.sidebar_small {
  width: 5.25rem !important;
}
#layout-menu.sidebar_small .menu-inner > .menu-item,
#layout-menu.sidebar_small .menu-inner > .menu-header {
  width: 5.25rem !important;
}

/* Reclaim the content space (aside is position:fixed at ≥1200px, so the
   page is offset by left padding — Sneat sets 16.25rem; shrink to match). */
@media (min-width: 1200px) {
  html.layout-menu-fixed .layout-page.layout-page_large,
  .layout-page.layout-page_large {
    padding-left: 5.25rem !important;
    transition: padding-left 0.25s ease;
  }
}

/* ── Brand area: stack icon logo + toggle vertically ───────────── */
#layout-menu.sidebar_small .app-brand {
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  height: 88px !important;
  padding: 10px 0 !important;
  gap: 8px;
}
#layout-menu.sidebar_small .app-brand .app-brand-link {
  flex: 0 0 auto !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
}
/* Logo swap: hide full wordmark, show icon-only mark */
#layout-menu.sidebar_small .app-brand-img {
  display: none !important;
}
#layout-menu.sidebar_small .app-brand-img-collapsed {
  display: block !important;
}
/* Toggle button: smaller, chevron flips to point right */
#layout-menu.sidebar_small .sidebar-toggle-btn {
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
}
#layout-menu.sidebar_small .sidebar-toggle-icon {
  transform: rotate(180deg);
}

/* ── Menu items: centre the icon, hide labels + submenus ───────── */
#layout-menu.sidebar_small .menu-inner > .menu-item > .menu-link {
  justify-content: center !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
#layout-menu.sidebar_small .menu-inner > .menu-item > .menu-link .menu-icon,
#layout-menu.sidebar_small .menu-inner > .menu-item > .menu-link i.tf-icons {
  margin-right: 0 !important;
  margin-left: 0 !important;
  font-size: 1.35rem !important;
}
/* Text labels (div) inside links */
#layout-menu.sidebar_small .menu-inner .menu-item .menu-link > div {
  display: none !important;
}
/* Submenus + their open state */
#layout-menu.sidebar_small .menu-inner .menu-sub {
  display: none !important;
}
/* Dropdown caret on toggles */
#layout-menu.sidebar_small .menu-inner > .menu-item > .menu-toggle::after {
  display: none !important;
}
/* Section header labels — collapse to nothing */
#layout-menu.sidebar_small .menu-header {
  text-indent: -9999px;
  padding-top: 0.5rem !important;
  padding-bottom: 0.25rem !important;
}
#layout-menu.sidebar_small .menu-header .menu-header-text {
  opacity: 0;
}
/* Active item keeps its green left accent */
#layout-menu.sidebar_small .menu-item.active > .menu-link {
  box-shadow: inset 3px 0 0 0 var(--fmg-green) !important;
}
/* Copyright at footer of menu */
.cpmCopyright {
  color: rgba(255,255,255,0.35) !important;
  font-size: 0.75rem;
}

/* ── 14. TOP NAVBAR — hidden on desktop (content moved to sidebar) ─── */
/* Mobile: keep for hamburger toggle */
@media (min-width: 1200px) {
  #layout-navbar {
    display: none !important;
  }
  .layout-page > .content-wrapper {
    padding-top: 0 !important;
  }
}
/* Mobile navbar styling */
.layout-navbar,
.bg-navbar-theme,
#layout-navbar {
  background-color: var(--fmg-navy) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}

/* ── 14b. SIDEBAR FOOTER — user profile ──────────────────────── */
.sidebar-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background-color: var(--fmg-navy);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user-avatar {
  flex-shrink: 0;
}
.sidebar-user-avatar img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.sidebar-user-avatar .avatar-initial {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background-color: var(--fmg-green-soft) !important;
  color: var(--fmg-green) !important;
}
.sidebar-user-info {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}
.sidebar-user-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.90) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.40) !important;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.sidebar-user-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.sidebar-user-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: rgba(255,255,255,0.40) !important;
  transition: color 0.15s, background 0.15s;
  text-decoration: none !important;
}
.sidebar-user-actions a:hover {
  color: var(--fmg-green) !important;
  background: rgba(25,230,60,0.10);
}
.sidebar-user-actions i {
  font-size: 16px;
  line-height: 1;
}
.notif-bell {
  position: relative;
}
.notif-bell.has-unread i {
  color: var(--fmg-green) !important;
  animation: notif-bell-ring 4s ease-in-out infinite;
  transform-origin: top center;
}
.notif-bell-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: var(--fmg-radius-pill);
  background: #ea5455;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--fmg-navy);
}
@keyframes notif-bell-ring {
  0%, 92%, 100% { transform: rotate(0deg); }
  93% { transform: rotate(-12deg); }
  94% { transform: rotate(10deg); }
  95% { transform: rotate(-8deg); }
  96% { transform: rotate(6deg); }
  97% { transform: rotate(0deg); }
}
/* Push menu content above the sticky footer */
#layout-menu .menu-inner {
  padding-bottom: 68px !important;
}
/* Collapsed sidebar: hide text, centre avatar */
#layout-menu.sidebar_small .sidebar-footer {
  padding: 10px 8px;
}
#layout-menu.sidebar_small .sidebar-user {
  justify-content: center;
}
#layout-menu.sidebar_small .sidebar-user-info,
#layout-menu.sidebar_small .sidebar-user-actions {
  display: none;
}

/* ── 15. SELECT2 ─────────────────────────────────────────────── */
.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: var(--fmg-green) !important;
  box-shadow: 0 0 0 0.2rem var(--fmg-green-dim) !important;
}
.select2-container--default .select2-results__option--highlighted {
  background-color: var(--fmg-green) !important;
  color: var(--fmg-navy) !important;
}
.select2-container--default .select2-results__option--selected {
  background-color: var(--fmg-green-soft) !important;
  color: var(--fmg-navy) !important;
}
.select2-selection__choice {
  background-color: var(--fmg-green-soft) !important;
  border-color: var(--fmg-green-dim) !important;
  color: var(--fmg-navy) !important;
}

/* ── 16. SWEETALERT2 ─────────────────────────────────────────── */
.swal2-confirm {
  background-color: var(--fmg-green) !important;
  border-color: var(--fmg-green) !important;
  color: var(--fmg-navy) !important;
}
.swal2-confirm:hover {
  background-color: var(--fmg-green-hover) !important;
}
.swal2-icon.swal2-success [class^="swal2-success-line"] {
  background-color: var(--fmg-green) !important;
}
.swal2-icon.swal2-success .swal2-success-ring {
  border-color: var(--fmg-green-dim) !important;
}
.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step {
  background: var(--fmg-green) !important;
}

/* ── 17. NOTIFLIX ──────────────────────────────────────────── */
.notiflix-confirm-content {
  background: #ffffff !important;
  border-radius: var(--fmg-radius) !important;
  box-shadow: var(--fmg-shadow) !important;
  color: var(--fmg-text) !important;
}
.notiflix-confirm-head {
  background: transparent !important;
}
.notiflix-confirm-head h5 {
  color: var(--fmg-navy) !important;
}
.notiflix-confirm-head > div {
  color: var(--fmg-text-muted) !important;
}
.notiflix-confirm-button-ok {
  background: var(--fmg-green) !important;
  color: var(--fmg-navy) !important;
  border-radius: var(--fmg-radius) !important;
}
.notiflix-confirm-button-ok:hover {
  background: var(--fmg-green-hover) !important;
}
.notiflix-confirm-button-cancel {
  background: #6c757d !important;
  color: #ffffff !important;
  border-radius: var(--fmg-radius) !important;
}
.notiflix-confirm-button-cancel:hover {
  background: #5a6268 !important;
}

/* ── 18. TOASTIFY / TOAST ──────────────────────────────────── */
.toastify {
  background: var(--fmg-navy) !important;
  color: #fff !important;
  border-left: 4px solid var(--fmg-green) !important;
  border-radius: var(--fmg-radius) !important;
}

/* ── 19. LIST GROUPS ─────────────────────────────────────────── */
.list-group-item.active {
  background-color: var(--fmg-navy) !important;
  border-color: var(--fmg-navy) !important;
}
.list-group-item-action:hover {
  background-color: var(--fmg-green-soft) !important;
}

/* ── 20. LINKS ───────────────────────────────────────────────── */
a {
  color: var(--fmg-green-active);
}
a:hover {
  color: var(--fmg-navy);
}

/* ── 21. SPINNER ────────────────────────────────────────────── */
.three-quarter-spinner,
.spinner-border {
  border-color: var(--fmg-navy) !important;
  border-right-color: transparent !important;
}
.spinner-box p,
.spinner-border-sm {
  color: var(--fmg-navy) !important;
}

/* ── 22. LOGIN PAGE (admin) ──────────────────────────────────── */
.login-page,
.authentication-wrapper {
  background-color: var(--fmg-body-bg) !important;
}
.authentication-wrapper .card {
  border-top: 4px solid var(--fmg-green) !important;
}

/* ── 23. FORTESCUE GREEN RING MOTIF ─────────────────────────── */
/* Decorative ring shown in sidebar header & login hero panel */
.fmg-ring-motif {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 5px solid var(--fmg-green);
  border-radius: 50%;
  flex-shrink: 0;
}
/* Sidebar brand link — logo already contains the Fortescue ring */
.app-brand-link {
  gap: 0.75rem;
}

/* ── 24. CONTENT WRAPPER ─────────────────────────────────────── */
.content-wrapper {
  background-color: var(--fmg-body-bg) !important;
}
.container-xxl,
.container-fluid {
  padding-top: 1.5rem;
}

/* ── 25. JSTREE ──────────────────────────────────────────────── */
.jstree-default .jstree-clicked {
  background-color: var(--fmg-green-soft) !important;
  color: var(--fmg-navy) !important;
}
.jstree-default .jstree-hovered {
  background-color: var(--fmg-green-soft) !important;
}
.tag-tree-item.active {
  background-color: var(--fmg-green-soft) !important;
  color: var(--fmg-navy) !important;
  border-left: 3px solid var(--fmg-green) !important;
}

/* ── 26. SUPPLIER / VENDOR PORTAL OVERLAY ─────────────────── */
/* Vendor portal uses its own token system (tokens.css). This
   ensures all shared components also get the Fortescue look. */
.vendor-layout .layout-menu,
.vendor-layout .bg-menu-theme {
  background-color: var(--fmg-navy) !important;
}
.stat-tile:hover {
  border-color: var(--fmg-green) !important;
  box-shadow: 0 0 0 2px var(--fmg-green-dim) !important;
}
.tab-btn.active {
  color: var(--fmg-navy) !important;
  border-bottom-color: var(--fmg-green) !important;
}
.badge-accent {
  background-color: var(--fmg-green-soft) !important;
  color: var(--fmg-green-active) !important;
}

/* ── 27. MISC OVERRIDES ──────────────────────────────────────── */
/* scrollbar thumb */
::-webkit-scrollbar-thumb {
  background-color: var(--fmg-border) !important;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #c4c9d0 !important;
}
/* Status dots — harmonize approved/active to brand green */
.dot-approved, .dot-active, .dot-released {
  background-color: var(--fmg-green) !important;
}
/* Checkbox success */
.checkbox-success .form-check-input:checked {
  background-color: var(--fmg-green) !important;
  border-color: var(--fmg-green) !important;
}
/* Focus ring global */
*:focus-visible {
  outline: 2px solid var(--fmg-green) !important;
  outline-offset: 2px;
}
/* The select2 search field already sits inside the container's own green
   focus border (see .select2-container--focus above); the global focus ring
   on top of it doubles up as a nested green box. Suppress it here only. */
.select2-search__field:focus-visible {
  outline: none !important;
}

/* ── Select2 inline "+ Add" action row ─────────────────────── */
/* Sits between the search box and the results list; the side borders + white
   bg make it read as part of the dropdown box (matching demo.css's #34495e
   select2 frame), 6px padding matches .select2-results__option, and the hover
   reuses the select2 highlight green. */
.select2-add-option {
  padding: 6px;
  cursor: pointer;
  color: var(--fmg-navy);
  font-weight: 600;
  background-color: var(--fmg-surface);
  border-top: 1px solid #34495e;
  border-left: 1px solid #34495e;
  border-right: 1px solid #34495e;
  display: flex;
  align-items: center;
  transition: background-color 0.12s ease;
}
.select2-add-option:hover {
  background-color: var(--fmg-green);
  color: var(--fmg-navy);
}
