/*!
 * KLH/BPLH Universal Compatibility Layer
 * Design System: KLH/BPLH v2.1
 * Purpose: Visual standardization for Bootstrap 3, 4, and 5 applications.
 * Usage: Load AFTER bootstrap.min.css and AFTER existing application theme CSS.
 */
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap");

:root {
  /* =========================================================
     KLH BRAND COLORS
     ========================================================= */
  --klh-primary: #005952;
  --klh-primary-rgb: 0, 89, 82;
  --klh-primary-dark: #003f3a;
  --klh-primary-light: #e5f2f0;
  --klh-secondary: #147def;
  --klh-secondary-rgb: 20, 125, 239;
  --klh-secondary-dark: #0b529d;
  --klh-secondary-light: #e8f2ff;
  --klh-accent: #f97910;
  --klh-accent-rgb: 249, 121, 16;
  --klh-accent-dark: #ae5104;
  --klh-accent-light: #fff0e3;
  --klh-success: #0e7a4e;
  --klh-success-rgb: 14, 122, 78;
  --klh-warning: #ae5104;
  --klh-warning-rgb: 174, 81, 4;
  --klh-danger: #c03a2b;
  --klh-danger-rgb: 192, 58, 43;
  --klh-info: #0b529d;
  --klh-info-rgb: 11, 82, 157;
  /* =========================================================
     KLH NEUTRALS
     ========================================================= */
  --klh-white: #ffffff;
  --klh-black: #10201f;
  --klh-text: #173331;
  --klh-text-muted: #5f7471;
  --klh-border: #d7e4e1;
  --klh-border-light: #e8f0ee;
  --klh-surface: #ffffff;
  --klh-surface-soft: #f5f9f8;
  --klh-body-bg: #f7faf9;
  /* =========================================================
     COLOR SCALES
     ========================================================= */
  --g-50: #edf8f6;
  --g-100: #d8efeb;
  --g-200: #b2dfd9;
  --g-300: #80c9c0;
  --g-400: #4aafa4;
  --g-500: #198f83;
  --g-600: #005952;
  --g-700: #004d47;
  --g-800: #003f3a;
  --g-900: #002d2a;
  --b-50: #eff6ff;
  --b-100: #dbeafe;
  --b-200: #bfdbfe;
  --b-300: #93c5fd;
  --b-400: #60a5fa;
  --b-500: #147def;
  --b-600: #0b66cc;
  --b-700: #0b529d;
  --b-800: #08447f;
  --b-900: #062f59;
  --o-50: #fff7ed;
  --o-100: #ffedd5;
  --o-200: #fed7aa;
  --o-300: #fdba74;
  --o-400: #fb923c;
  --o-500: #f97910;
  --o-600: #dd6207;
  --o-700: #c45106;
  --o-800: #ae5104;
  --o-900: #7c3503;
  /* =========================================================
     TYPOGRAPHY
     ========================================================= */
  --klh-font-heading: "Plus Jakarta Sans";
  --klh-font-body: "Inter";
  --klh-font-mono: "JetBrains Mono", Consolas, monospace;
  --klh-font-size-base: 16px;
  --klh-line-height-base: 1.6;
  /* =========================================================
     SPACING - 4PX SCALE
     ========================================================= */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --s10: 40px;
  --s12: 48px;
  --s16: 64px;
  /* =========================================================
     RADIUS, SHADOW, LAYOUT
     ========================================================= */
  --klh-radius-sm: 8px;
  --klh-radius-md: 12px;
  --klh-radius-lg: 16px;
  --klh-radius-pill: 999px;
  --klh-shadow-1: 0 2px 8px rgba(0, 89, 82, 0.08);
  --klh-shadow-2: 0 6px 18px rgba(0, 89, 82, 0.12);
  --klh-shadow-3: 0 14px 36px rgba(0, 89, 82, 0.16);
  --klh-container-width: 1200px;
  --klh-gutter: 24px;
  --klh-focus-ring: 0 0 0 3px rgba(20, 125, 239, 0.35);
  /* Bootstrap 4/5 variable bridges */
  --bs-primary: var(--klh-primary);
  --bs-primary-rgb: var(--klh-primary-rgb);
  --bs-secondary: var(--klh-secondary);
  --bs-success: var(--klh-success);
  --bs-warning: var(--klh-warning);
  --bs-danger: var(--klh-danger);
  --bs-info: var(--klh-info);
  --bs-body-color: var(--klh-text);
  --bs-body-bg: var(--klh-body-bg);
  --bs-border-color: var(--klh-border);
  --bs-border-radius: var(--klh-radius-md);
  --bs-border-radius-sm: var(--klh-radius-sm);
  --bs-border-radius-lg: var(--klh-radius-lg);
  --bs-box-shadow: var(--klh-shadow-1);
}

/* =========================================================
   BASE
   ========================================================= */
html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--klh-body-bg);
  color: var(--klh-text);
  font-family: var(--klh-font-body);
  font-size: var(--klh-font-size-base);
  line-height: var(--klh-line-height-base);
  -webkit-font-smoothing: antialiased;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

::selection {
  background: var(--klh-primary);
  color: var(--klh-white);
}

:focus-visible {
  outline: 3px solid var(--klh-secondary);
  outline-offset: 2px;
  box-shadow: var(--klh-focus-ring);
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  color: var(--klh-primary-dark);
  font-family: var(--klh-font-heading);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0;
}

h1,
.h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h2,
.h2 {
  font-size: 1.5rem;
}

h3,
.h3 {
  font-size: 1.25rem;
}

h4,
.h4 {
  font-size: 1.125rem;
}

p {
  margin-top: 0;
  margin-bottom: var(--s4);
}

small,
.small {
  font-size: 0.875rem;
}

.text-primary {
  color: var(--klh-primary) !important;
}

.text-secondary {
  color: var(--klh-secondary) !important;
}

.text-success {
  color: var(--klh-success) !important;
}

.text-warning {
  color: var(--klh-warning) !important;
}

.text-danger {
  color: var(--klh-danger) !important;
}

.text-info {
  color: var(--klh-info) !important;
}

.text-muted {
  color: var(--klh-text-muted) !important;
}

.font-heading {
  font-family: var(--klh-font-heading) !important;
}

.font-body {
  font-family: var(--klh-font-body) !important;
}

.font-mono,
code,
pre,
kbd {
  font-family: var(--klh-font-mono) !important;
}

/* =========================================================
   LINKS
   ========================================================= */
a {
  color: var(--klh-secondary-dark);
  text-decoration: none;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
  font-family: var(--klh-font-heading);
}

a:hover {
  color: var(--klh-primary);
  text-decoration: none;
}

/* =========================================================
   BACKGROUNDS
   ========================================================= */
.bg-primary {
  background-color: var(--klh-primary) !important;
}

.bg-secondary {
  background-color: var(--klh-secondary) !important;
}

.bg-success {
  background-color: var(--klh-success) !important;
}

.bg-warning {
  background-color: var(--klh-warning) !important;
}

.bg-danger {
  background-color: var(--klh-danger) !important;
}

.bg-info {
  background-color: var(--klh-info) !important;
}

.bg-light {
  background-color: var(--klh-surface-soft) !important;
}

.bg-white {
  background-color: var(--klh-white) !important;
}

.bg-dark {
  background-color: var(--g-900) !important;
}

.bg-klh-gradient {
  background: linear-gradient(135deg,
      var(--klh-primary-dark),
      var(--klh-primary)) !important;
  color: var(--klh-white);
}

.bg-klh-gradient-blue {
  background: linear-gradient(135deg,
      var(--klh-primary),
      var(--klh-secondary)) !important;
  color: var(--klh-white);
}

/* =========================================================
   BUTTONS - COMMON ACROSS BOOTSTRAP 3/4/5
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 40px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--klh-radius-sm);
  font-family: var(--klh-font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

/* BUTTON SMALL */
.btn-sm {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: var(--klh-radius-sm);
  font-size: 0.8125rem;
  line-height: 1.4;
}

/* BUTTON LARGE */
.btn-lg {
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--klh-radius-md);
  font-size: 1.0625rem;
  line-height: 1.5;
}

/* BUTTON EXTRA SMALL */
.btn-xs {
  min-height: 26px;
  padding: 4px 8px;
  border-radius: var(--klh-radius-sm);
  font-size: 0.75rem;
  line-height: 1.3;
}

/* BUTTON BLOCK */
.btn-block {
  display: flex;
  width: 100%;
}

/* BUTTON PILL */
.btn-pill {
  border-radius: var(--klh-radius-pill);
}

/* BUTTON SQUARE */
.btn-square {
  width: 40px;
  height: 40px;
  padding: 0;
}

/* BUTTON SQUARE SMALL */
.btn-square.btn-sm {
  width: 32px;
  height: 32px;
  padding: 0;
}

/* BUTTON SQUARE LARGE */
.btn-square.btn-lg {
  width: 48px;
  height: 48px;
  padding: 0;
}

/* BUTTON ICON */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
}

/* BUTTON DISABLED */
.btn:disabled,
.btn.disabled {
  cursor: not-allowed;
  opacity: 0.65;
  pointer-events: none;
}

/* BUTTON FOCUS */
.btn:focus-visible {
  outline: var(--klh-focus-ring);
  outline-offset: 2px;
}

/* BUTTON HOVER EFFECT */
.btn:not(:disabled):not(.disabled):hover {
  transform: translateY(-1px);
}

/* BUTTON ACTIVE EFFECT */
.btn:not(:disabled):not(.disabled):active {
  transform: translateY(0);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled,
.btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--klh-primary) !important;
  border-color: var(--klh-primary) !important;
  color: var(--klh-white) !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--klh-primary-dark) !important;
  border-color: var(--klh-primary-dark) !important;
  color: var(--klh-white) !important;
}

.btn-secondary {
  background-color: var(--klh-secondary) !important;
  border-color: var(--klh-secondary) !important;
  color: var(--klh-white) !important;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: var(--klh-secondary-dark) !important;
  border-color: var(--klh-secondary-dark) !important;
  color: var(--klh-white) !important;
}

.btn-success {
  background-color: var(--klh-success) !important;
  border-color: var(--klh-success) !important;
  color: var(--klh-white) !important;
}

.btn-warning {
  background-color: var(--klh-accent) !important;
  border-color: var(--klh-accent) !important;
  color: var(--klh-black) !important;
}

.btn-danger {
  background-color: var(--klh-danger) !important;
  border-color: var(--klh-danger) !important;
  color: var(--klh-white) !important;
}

.btn-info {
  background-color: var(--klh-info) !important;
  border-color: var(--klh-info) !important;
  color: var(--klh-white) !important;
}

.btn-light {
  background-color: var(--klh-surface-soft) !important;
  border-color: var(--klh-border) !important;
  color: var(--klh-primary) !important;
}

.btn-dark {
  background-color: var(--klh-primary-dark) !important;
  border-color: var(--klh-primary-dark) !important;
  color: var(--klh-white) !important;
}

.btn-outline-primary {
  background: transparent !important;
  border-color: var(--klh-primary) !important;
  color: var(--klh-primary) !important;
}

.btn-outline-primary:hover {
  background: var(--klh-primary) !important;
  color: var(--klh-white) !important;
}

.btn-outline-secondary {
  background: transparent !important;
  border-color: var(--klh-secondary) !important;
  color: var(--klh-secondary-dark) !important;
}

.btn-outline-secondary:hover {
  background: var(--klh-secondary) !important;
  color: var(--klh-white) !important;
}

.btn-link {
  color: var(--klh-secondary-dark) !important;
  background: transparent !important;
  border-color: transparent !important;
}

/* =========================================================
   CARDS / PANELS
   ========================================================= */
.card,
.panel,
.well {
  background: var(--klh-surface);
  border: 1px solid var(--klh-border);
  border-radius: var(--klh-radius-md);
  box-shadow: var(--klh-shadow-1);
  overflow: hidden;
}

.card-header,
.panel-heading {
  padding: var(--s4) var(--s6);
  background: var(--klh-surface);
  border-bottom: 1px solid var(--klh-border-light);
  color: var(--klh-primary-dark);
  font-family: var(--klh-font-heading);
  font-weight: 700;
}

.card-body,
.panel-body {
  padding: var(--s6);
}

.card-footer,
.panel-footer {
  padding: var(--s4) var(--s6);
  background: var(--klh-surface-soft);
  border-top: 1px solid var(--klh-border-light);
}

.card-title {
  margin-bottom: var(--s2);
}

.card-subtitle {
  color: var(--klh-text-muted);
}

/* =========================================================
   FORMS
   ========================================================= */
.form-control,
.form-select,
select.form-control,
input.form-control,
textarea.form-control {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  background-color: var(--klh-white);
  border: 1px solid var(--klh-border);
  border-radius: var(--klh-radius-sm);
  color: var(--klh-text);
  font: inherit;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-control::placeholder {
  color: #8ba09c;
}

.form-control:focus,
.form-select:focus,
select:focus,
input:focus,
textarea:focus {
  border-color: var(--klh-secondary) !important;
  box-shadow: var(--klh-focus-ring) !important;
  outline: none;
}

.form-label,
.control-label,
label {
  display: inline-block;
  margin-bottom: var(--s2);
  color: var(--klh-primary-dark);
  font-weight: 600;
}

.form-text,
.help-block {
  display: block;
  margin-top: var(--s1);
  color: var(--klh-text-muted);
  font-size: 0.875rem;
}

.form-group {
  margin-bottom: var(--s4);
}

.has-error .form-control,
.is-invalid,
.form-control.is-invalid {
  border-color: var(--klh-danger) !important;
}

.has-success .form-control,
.is-valid,
.form-control.is-valid {
  border-color: var(--klh-success) !important;
}

/* =========================================================
   SELECT2
========================================================= */
.select2-container {
  width: 100% !important;
}

/* Select2 Single */
.select2-container--default .select2-selection--single {
  width: 100% !important;
  min-height: 42px !important;
  height: 42px !important;
  padding: 10px 12px !important;
  background-color: var(--klh-white) !important;
  border: 1px solid var(--klh-border) !important;
  border-radius: var(--klh-radius-sm) !important;
  color: var(--klh-text) !important;
  font: inherit !important;
  box-shadow: none !important;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* Teks Select2 Single */
.select2-container--default .select2-selection--single .select2-selection__rendered {
  height: 20px !important;
  line-height: 20px !important;
  padding: 0 28px 0 0 !important;
  color: var(--klh-text) !important;
  margin-top: 1px;
}

/* Arrow Select2 */
.select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 10px !important;
  right: 10px !important;
  height: 20px !important;
}

/* Select2 Multiple */
.select2-container--default .select2-selection--multiple {
  width: 100% !important;
  min-height: 42px !important;
  padding: 6px 8px !important;
  background-color: var(--klh-white) !important;
  border: 1px solid var(--klh-border) !important;
  border-radius: var(--klh-radius-sm) !important;
  color: var(--klh-text) !important;
  font: inherit !important;
  box-shadow: none !important;
}

/* Pilihan Select2 Multiple */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: var(--klh-primary-light) !important;
  border: 1px solid var(--klh-primary-dark) !important;
  border-radius: 4px !important;
  color: var(--klh-white) !important;
  padding: 3px 6px !important;
}

/* State Focus */
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--klh-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 82, 137, 0.12) !important;
}

.select2-container--default .select2-results__option[aria-selected=true], .select2-container--default .select2-results__option[aria-selected=true]:hover {
  color: var(--klh-accent);
}

/* =========================================================
   TABLES
   ========================================================= */
.table {
  width: 100%;
  margin-bottom: var(--s4);
  color: var(--klh-text);
  vertical-align: middle;
  border-color: var(--klh-border);
}

.table thead th,
.table>thead>tr>th {
  padding: 12px 16px;
  background: var(--klh-primary);
  border-color: var(--klh-primary);
  color: var(--klh-white);
  font-family: var(--klh-font-heading);
  font-weight: 700;
  font-size: 13px;
  vertical-align: middle;
}

.table tbody td,
.table>tbody>tr>td {
  padding: 12px 16px;
  border-color: var(--klh-border-light);
  vertical-align: middle;
  font-size: 13px;
}

.table-striped>tbody>tr:nth-of-type(odd),
.table-striped>tbody>tr:nth-child(odd) {
  background-color: var(--klh-surface-soft);
}

.table-hover>tbody>tr:hover,
.table-hover>tbody>tr:hover {
  background-color: var(--klh-primary-light);
}

/* =========================================================
   BADGES / LABELS
   ========================================================= */
.badge,
.label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: var(--klh-radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
}

.badge-primary,
.label-primary {
  background: var(--klh-primary) !important;
  color: #fff !important;
}

.badge-secondary,
.label-info {
  background: var(--klh-secondary) !important;
  color: #fff !important;
}

.badge-success,
.label-success {
  background: var(--klh-success) !important;
  color: #fff !important;
}

.badge-warning,
.label-warning {
  background: var(--klh-accent) !important;
  color: #10201f !important;
}

.badge-danger,
.label-danger {
  background: var(--klh-danger) !important;
  color: #fff !important;
}

.badge-info {
  background: var(--klh-info) !important;
  color: #fff !important;
}

/* =========================================================
   ALERTS
   ========================================================= */
.alert {
  position: relative;
  padding: var(--s4) var(--s6);
  border: 1px solid transparent;
  border-radius: var(--klh-radius-sm);
}

.alert-primary {
  background: var(--klh-primary-light);
  border-color: var(--g-200);
  color: var(--klh-primary-dark);
}

.alert-info {
  background: var(--b-50);
  border-color: var(--b-200);
  color: var(--b-900);
}

.alert-success {
  background: #e7f5ee;
  border-color: #a9ddc3;
  color: #075536;
}

.alert-warning {
  background: var(--o-50);
  border-color: var(--o-200);
  color: var(--o-900);
}

.alert-danger {
  background: #fff0ee;
  border-color: #f0b7b1;
  color: #85251c;
}

/* =========================================================
   NAVBAR / NAVIGATION
   ========================================================= */
.navbar,
.navbar-default,
.navbar-inverse {
  border: 0;
  border-radius: 0;
  box-shadow: var(--klh-shadow-1);
}

.navbar-klh,
.navbar-primary {
  background: var(--klh-primary) !important;
  color: var(--klh-white);
}

.navbar-klh .navbar-brand,
.navbar-primary .navbar-brand,
.navbar-klh .nav-link,
.navbar-primary .nav-link,
.navbar-klh .navbar-nav>li>a,
.navbar-primary .navbar-nav>li>a {
  color: var(--klh-white) !important;
}

.nav-link,
.navbar-nav>li>a {
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.nav-link:hover,
.navbar-nav>li>a:hover {
  color: var(--klh-accent) !important;
}

.nav-pills .nav-link.active,
.nav-pills>li.active>a,
.nav-tabs .nav-link.active,
.nav-tabs>li.active>a {
  background: var(--klh-primary) !important;
  border-color: var(--klh-primary) !important;
  color: var(--klh-white) !important;
}

/* =========================================================
   DROPDOWN / LIST GROUP
   ========================================================= */
.dropdown-menu {
  border: 1px solid var(--klh-border);
  border-radius: var(--klh-radius-sm);
  box-shadow: var(--klh-shadow-2);
  padding: var(--s2);
}

.dropdown-item,
.dropdown-menu>li>a {
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--klh-text);
}

.dropdown-item:hover,
.dropdown-menu>li>a:hover {
  background: var(--klh-primary-light);
  color: var(--klh-primary);
}

.list-group-item {
  padding: 12px 16px;
  border-color: var(--klh-border-light);
  background: var(--klh-surface);
  color: var(--klh-text);
}

.list-group-item:hover,
.list-group-item-action:hover {
  background: var(--klh-primary-light);
  color: var(--klh-primary);
}

.list-group-item.active {
  background: var(--klh-primary) !important;
  border-color: var(--klh-primary) !important;
  color: var(--klh-white) !important;
}

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination .page-link {
  color: var(--klh-primary);
  border-color: var(--klh-border);
  border-radius: var(--klh-radius-sm);
  margin: 0 2px;
}

.pagination .page-link:hover {
  background: var(--klh-primary-light);
  color: var(--klh-primary);
}

.pagination .active .page-link,
.pagination .page-item.active .page-link {
  background: var(--klh-primary) !important;
  border-color: var(--klh-primary) !important;
  color: var(--klh-white) !important;
}

/* =========================================================
   MODAL
   ========================================================= */
.modal-content {
  border: 0;
  border-radius: var(--klh-radius-lg);
  box-shadow: var(--klh-shadow-3);
  overflow: hidden;
}

.modal-header {
  padding: var(--s4) var(--s6);
  background: var(--klh-primary);
  border-bottom: 0;
  color: var(--klh-white);
}

.modal-title {
  color: var(--klh-white);
}

.modal-body {
  padding: var(--s6);
}

.modal-footer {
  padding: var(--s4) var(--s6);
  background: var(--klh-surface-soft);
  border-top: 1px solid var(--klh-border-light);
}

/* =========================================================
   PROGRESS / SPINNER
   ========================================================= */
.progress {
  height: 8px;
  overflow: hidden;
  background: var(--klh-border-light);
  border-radius: var(--klh-radius-pill);
}

.progress-bar {
  background: var(--klh-primary);
}

.spinner-border,
.spinner-grow {
  color: var(--klh-primary) !important;
}

/* =========================================================
   UTILITY CLASSES
   ========================================================= */
.rounded {
  border-radius: var(--klh-radius-md) !important;
}

.rounded-sm {
  border-radius: var(--klh-radius-sm) !important;
}

.rounded-lg {
  border-radius: var(--klh-radius-lg) !important;
}

.rounded-pill {
  border-radius: var(--klh-radius-pill) !important;
}

.shadow-sm {
  box-shadow: var(--klh-shadow-1) !important;
}

.shadow {
  box-shadow: var(--klh-shadow-2) !important;
}

.shadow-lg {
  box-shadow: var(--klh-shadow-3) !important;
}

.border {
  border: 1px solid var(--klh-border) !important;
}

.border-primary {
  border-color: var(--klh-primary) !important;
}

.border-secondary {
  border-color: var(--klh-secondary) !important;
}

.text-wrap {
  overflow-wrap: anywhere;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.container-klh {
  width: 100%;
  max-width: var(--klh-container-width);
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--klh-gutter);
  padding-left: var(--klh-gutter);
}

.section-klh {
  padding-top: var(--s12);
  padding-bottom: var(--s12);
}

.surface-klh {
  background: var(--klh-surface);
  border: 1px solid var(--klh-border);
  border-radius: var(--klh-radius-md);
  box-shadow: var(--klh-shadow-1);
}

.text-klh-primary {
  color: var(--klh-primary) !important;
}

.text-klh-secondary {
  color: var(--klh-secondary-dark) !important;
}

.text-klh-accent {
  color: var(--klh-accent-dark) !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 767.98px) {
  :root {
    --klh-gutter: 16px;
  }

  body {
    font-size: 15px;
  }

  .card-body,
  .panel-body,
  .modal-body {
    padding: var(--s4);
  }

  .table-responsive {
    border: 0;
    -webkit-overflow-scrolling: touch;
  }

  .btn {
    min-height: 40px;
    padding: 9px 14px;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* =========================================================
   COMPONENT
   ========================================================= */
/* TOP MENU */
.klh-top-menu {
  padding: 8px 0;
  background-color: var(--klh-primary-dark);
}

/* TOP MENU LINK */
.klh-top-menu-link {
  color: var(--klh-white);
  font-size: 0.875rem;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.klh-top-menu-link:hover {
  color: var(--klh-white);
  opacity: 0.8;
}

/* TOP MENU RESPONSIVE */
@media (max-width: 575.98px) {
  .klh-top-menu-link {
    font-size: 0.75rem;
  }
}

/* KLH FOOTER */
.klh-footer {
  overflow: hidden;
  background-color: var(--klh-primary-dark);
  color: var(--klh-white);
}

/* FOOTER LOGO */
.klh-footer-logo {
  width: 66px;
  height: 66px;
  flex-shrink: 0;
  object-fit: contain;
}

/* FOOTER TITLE */
.klh-footer-title {
  color: var(--klh-white);
  font-family: var(--klh-font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.55;
}

/* FOOTER TEXT */
.klh-footer-text {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
}

/* FOOTER HEADING */
.klh-footer-heading {
  margin-bottom: var(--s4);
  color: var(--klh-white);
  font-family: var(--klh-font-heading);
  font-size: 1.125rem;
  font-weight: 700;
}

/* FOOTER LIST */
.klh-footer-list {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
  line-height: 1.55;
}

/* FOOTER LINKS */
.klh-footer-list a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

.klh-footer-list a:hover {
  color: var(--klh-white);
}

/* FOOTER BOTTOM */
.klh-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 60px;
  padding: var(--s4) var(--s5);
  background-color: rgba(0, 0, 0, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* FOOTER COPYRIGHT */
.klh-footer-copyright {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9375rem;
}

/* FOOTER ACTIONS */
.klh-footer-actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

/* FOOTER ACTION BUTTON */
.klh-footer-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 42px;
  border-radius: var(--klh-radius-sm);
  background-color: rgba(255, 255, 255, 0.09);
  color: var(--klh-white);
  font-size: 1.125rem;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.klh-footer-action:hover {
  background-color: rgba(255, 255, 255, 0.18);
  color: var(--klh-white);
  transform: translateY(-2px);
}

/* FOOTER RESPONSIVE */
@media (max-width: 767.98px) {
  .klh-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .klh-footer-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .klh-footer-copyright {
    font-size: 0.8125rem;
  }
}

/* =========================================================
   BOOTSTRAP 3/4/5 COMPATIBILITY UTILITIES
========================================================= */
.d-none {
  display: none !important
}

.d-block {
  display: block !important
}

.d-inline {
  display: inline !important
}

.d-inline-block {
  display: inline-block !important
}

.d-flex {
  display: flex !important
}

.d-inline-flex {
  display: inline-flex !important
}

.d-grid {
  display: grid !important
}

.flex-row {
  flex-direction: row !important
}

.flex-column {
  flex-direction: column !important
}

.flex-wrap {
  flex-wrap: wrap !important
}

.flex-nowrap {
  flex-wrap: nowrap !important
}

.flex-fill {
  flex: 1 1 auto !important
}

.flex-grow-0 {
  flex-grow: 0 !important
}

.flex-grow-1 {
  flex-grow: 1 !important
}

.flex-shrink-0 {
  flex-shrink: 0 !important
}

.align-items-start {
  align-items: flex-start !important
}

.align-items-center {
  align-items: center !important
}

.align-items-end {
  align-items: flex-end !important
}

.align-items-stretch {
  align-items: stretch !important
}

.align-items-baseline {
  align-items: baseline !important
}

.justify-content-start {
  justify-content: flex-start !important
}

.justify-content-center {
  justify-content: center !important
}

.justify-content-end {
  justify-content: flex-end !important
}

.justify-content-between {
  justify-content: space-between !important
}

.justify-content-around {
  justify-content: space-around !important
}

.justify-content-evenly {
  justify-content: space-evenly !important
}

.gap-0 {
  gap: 0 !important
}

.gap-1 {
  gap: var(--s1) !important
}

.gap-2 {
  gap: var(--s2) !important
}

.gap-3 {
  gap: var(--s3) !important
}

.gap-4 {
  gap: var(--s4) !important
}

.gap-5 {
  gap: var(--s5) !important
}

.m-0 {
  margin: 0 !important
}

.m-1 {
  margin: var(--s1) !important
}

.m-2 {
  margin: var(--s2) !important
}

.m-3 {
  margin: var(--s3) !important
}

.m-4 {
  margin: var(--s4) !important
}

.m-5 {
  margin: var(--s5) !important
}

.mt-0 {
  margin-top: 0 !important
}

.mt-1 {
  margin-top: var(--s1) !important
}

.mt-2 {
  margin-top: var(--s2) !important
}

.mt-3 {
  margin-top: var(--s3) !important
}

.mt-4 {
  margin-top: var(--s4) !important
}

.mt-5 {
  margin-top: var(--s5) !important
}

.mb-0 {
  margin-bottom: 0 !important
}

.mb-1 {
  margin-bottom: var(--s1) !important
}

.mb-2 {
  margin-bottom: var(--s2) !important
}

.mb-3 {
  margin-bottom: var(--s3) !important
}

.mb-4 {
  margin-bottom: var(--s4) !important
}

.mb-5 {
  margin-bottom: var(--s5) !important
}

.ml-0, .ms-0 {
  margin-left: 0 !important
}

.ml-1, .ms-1 {
  margin-left: var(--s1) !important
}

.ml-2, .ms-2 {
  margin-left: var(--s2) !important
}

.ml-3, .ms-3 {
  margin-left: var(--s3) !important
}

.mr-0, .me-0 {
  margin-right: 0 !important
}

.mr-1, .me-1 {
  margin-right: var(--s1) !important
}

.mr-2, .me-2 {
  margin-right: var(--s2) !important
}

.mr-3, .me-3 {
  margin-right: var(--s3) !important
}

.p-0 {
  padding: 0 !important
}

.p-1 {
  padding: var(--s1) !important
}

.p-2 {
  padding: var(--s2) !important
}

.p-3 {
  padding: var(--s3) !important
}

.p-4 {
  padding: var(--s4) !important
}

.p-5 {
  padding: var(--s5) !important
}

.pt-0 {
  padding-top: 0 !important
}

.pt-1 {
  padding-top: var(--s1) !important
}

.pt-2 {
  padding-top: var(--s2) !important
}

.pt-3 {
  padding-top: var(--s3) !important
}

.pt-4 {
  padding-top: var(--s4) !important
}

.pt-5 {
  padding-top: var(--s5) !important
}

.pb-0 {
  padding-bottom: 0 !important
}

.pb-1 {
  padding-bottom: var(--s1) !important
}

.pb-2 {
  padding-bottom: var(--s2) !important
}

.pb-3 {
  padding-bottom: var(--s3) !important
}

.pb-4 {
  padding-bottom: var(--s4) !important
}

.pb-5 {
  padding-bottom: var(--s5) !important
}

.w-25 {
  width: 25% !important
}

.w-50 {
  width: 50% !important
}

.w-75 {
  width: 75% !important
}

.w-100 {
  width: 100% !important
}

.h-25 {
  height: 25% !important
}

.h-50 {
  height: 50% !important
}

.h-75 {
  height: 75% !important
}

.h-100 {
  height: 100% !important
}

.mw-100 {
  max-width: 100% !important
}

.mh-100 {
  max-height: 100% !important
}

.text-left, .text-start {
  text-align: left !important
}

.text-center {
  text-align: center !important
}

.text-right, .text-end {
  text-align: right !important
}

.text-uppercase {
  text-transform: uppercase !important
}

.text-lowercase {
  text-transform: lowercase !important
}

.text-capitalize {
  text-transform: capitalize !important
}

.text-decoration-none {
  text-decoration: none !important
}

.fw-light {
  font-weight: 300 !important
}

.fw-normal {
  font-weight: 400 !important
}

.fw-medium {
  font-weight: 500 !important
}

.fw-semibold {
  font-weight: 600 !important
}

.fw-bold {
  font-weight: 700 !important
}

.position-static {
  position: static !important
}

.position-relative {
  position: relative !important
}

.position-absolute {
  position: absolute !important
}

.position-fixed {
  position: fixed !important
}

.position-sticky {
  position: sticky !important
}

.overflow-auto {
  overflow: auto !important
}

.overflow-hidden {
  overflow: hidden !important
}

.overflow-visible {
  overflow: visible !important
}

.visible {
  visibility: visible !important
}

.invisible {
  visibility: hidden !important
}

.opacity-0 {
  opacity: 0 !important
}

.opacity-50 {
  opacity: .5 !important
}

.opacity-75 {
  opacity: .75 !important
}

.opacity-100 {
  opacity: 1 !important
}

.border-0 {
  border: 0 !important
}

.border-top {
  border-top: 1px solid var(--klh-border) !important
}

.border-bottom {
  border-bottom: 1px solid var(--klh-border) !important
}

.border-left, .border-start {
  border-left: 1px solid var(--klh-border) !important
}

.border-right, .border-end {
  border-right: 1px solid var(--klh-border) !important
}

.rounded-0 {
  border-radius: 0 !important
}

.rounded-sm {
  border-radius: var(--klh-radius-sm) !important
}

.rounded {
  border-radius: var(--klh-radius-md) !important
}

.rounded-lg {
  border-radius: var(--klh-radius-lg) !important
}

.rounded-pill {
  border-radius: var(--klh-radius-pill) !important
}

.shadow-sm {
  box-shadow: var(--klh-shadow-1) !important
}

.shadow {
  box-shadow: var(--klh-shadow-2) !important
}

.shadow-lg {
  box-shadow: var(--klh-shadow-3) !important
}

.pull-left {
  float: left !important
}

.pull-right {
  float: right !important
}

.center-block {
  display: block;
  margin-left: auto;
  margin-right: auto
}

.clearfix:before, .clearfix:after {
  display: table;
  content: " "
}

.clearfix:after {
  clear: both
}

.img-responsive, .img-fluid {
  display: block;
  max-width: 100%;
  height: auto
}

.cursor-pointer {
  cursor: pointer !important
}

.user-select-none {
  user-select: none !important
}

@media(min-width:576px) {
  .d-sm-none {
    display: none !important
  }

  .d-sm-block {
    display: block !important
  }

  .d-sm-flex {
    display: flex !important
  }
}

@media(min-width:768px) {
  .d-md-none {
    display: none !important
  }

  .d-md-block {
    display: block !important
  }

  .d-md-flex {
    display: flex !important
  }
}

@media(min-width:992px) {
  .d-lg-none {
    display: none !important
  }

  .d-lg-block {
    display: block !important
  }

  .d-lg-flex {
    display: flex !important
  }
}

@media(min-width:1200px) {
  .d-xl-none {
    display: none !important
  }

  .d-xl-block {
    display: block !important
  }

  .d-xl-flex {
    display: flex !important
  }
}

/* =========================================================
   KLH/BPLH DESIGN SYSTEM v2.1
   COMPONENT-ONLY STANDARD
   Scope: reusable UI components; no generic margin/padding utilities.
   Load after Bootstrap 3, 4, or 5.
   ========================================================= */
/* ---------- ICONS & MEDIA ---------- */
.icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
  flex: 0 0 auto;
  color: currentColor;
}

.icon--sm {
  width: 18px;
  height: 18px
}

.icon--lg {
  width: 32px;
  height: 32px
}

.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  border-radius: var(--klh-radius-md, .75rem);
  background: linear-gradient(135deg, var(--g-600, #005952), var(--g-900, #002d2a));
  color: #fff;
  overflow: hidden;
}

.ph--earth {
  background: linear-gradient(135deg, #806044, #3e3026)
}

.ph--sky {
  background: linear-gradient(135deg, #147def, #062f59)
}

.ph--mist {
  background: linear-gradient(135deg, #dce8e5, #8ca6a0);
  color: #173331
}

/* ---------- BUTTONS ---------- */
.btn, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 42px;
  padding: .625rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--klh-radius-sm, .5rem);
  font: inherit;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s, transform .2s;
}

.btn:focus, .button:focus {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(var(--klh-primary-rgb, 0, 89, 82), .2)
}

.btn:disabled, .btn.disabled, .button:disabled {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none
}

.btn-primary, .btn-klh-primary {
  background: var(--klh-primary, #005952);
  border-color: var(--klh-primary, #005952);
  color: #fff
}

.btn-primary:hover, .btn-klh-primary:hover {
  background: var(--klh-primary-dark, #003f3a);
  border-color: var(--klh-primary-dark, #003f3a);
  color: #fff
}

.btn-secondary, .btn-klh-secondary {
  background: var(--klh-secondary, #147def);
  border-color: var(--klh-secondary, #147def);
  color: #fff
}

.btn-success {
  background: var(--klh-success, #0e7a4e);
  border-color: var(--klh-success, #0e7a4e);
  color: #fff
}

.btn-danger {
  background: var(--klh-danger, #c03a2b);
  border-color: var(--klh-danger, #c03a2b);
  color: #fff
}

.btn-warning {
  background: var(--klh-accent, #f97910);
  border-color: var(--klh-accent, #f97910);
  color: #10201f
}

.btn-info {
  background: var(--klh-info, #0b529d);
  border-color: var(--klh-info, #0b529d);
  color: #fff
}

.btn-light {
  background: #fff;
  border-color: var(--klh-border, #d7e4e1);
  color: var(--klh-text, #173331)
}

.btn-dark {
  background: var(--klh-black, #10201f);
  border-color: var(--klh-black, #10201f);
  color: #fff
}

.btn-outline-primary, .btn-klh-outline {
  background: transparent;
  border-color: var(--klh-primary, #005952);
  color: var(--klh-primary, #005952)
}

.btn-outline-primary:hover, .btn-klh-outline:hover {
  background: var(--klh-primary, #005952);
  color: #fff
}

.btn-ghost, .btn-klh-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--klh-primary, #005952)
}

.btn-ghost:hover, .btn-klh-ghost:hover {
  background: var(--klh-primary-light, #e5f2f0)
}

.btn-cta, .btn-klh-cta {
  background: var(--klh-accent, #f97910);
  border-color: var(--klh-accent, #f97910);
  color: #10201f;
  font-weight: 700
}

.btn-sm {
  min-height: 36px;
  padding: .45rem .75rem;
  font-size: .875rem
}

.btn-lg {
  min-height: 48px;
  padding: .8rem 1.35rem;
  font-size: 1.05rem
}

.btn-xl {
  min-height: 56px;
  padding: 1rem 1.6rem;
  font-size: 1.15rem
}

.btn-xs {
  min-height: 30px;
  padding: .25rem .5rem;
  font-size: .75rem
}

.btn-icon-only {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0
}

.btn-icon-only.btn-sm {
  width: 36px;
  height: 36px;
  min-height: 36px
}

.btn-icon-only.btn-lg {
  width: 48px;
  height: 48px;
  min-height: 48px
}

.btn-loading {
  pointer-events: none;
  opacity: .75
}

.btn-loading:before {
  content: "";
  width: 1em;
  height: 1em;
  border: .15em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: klh-spin .7s linear infinite
}

@keyframes klh-spin {
  to {
    transform: rotate(360deg)
  }
}

.btn-block {
  display: flex;
  width: 100%
}

.btn-group>.btn {
  border-radius: 0
}

.btn-group>.btn:first-child {
  border-radius: var(--klh-radius-sm, .5rem) 0 0 var(--klh-radius-sm, .5rem)
}

.btn-group>.btn:last-child {
  border-radius: 0 var(--klh-radius-sm, .5rem) var(--klh-radius-sm, .5rem) 0
}

/* ---------- BADGE, CHIP & TAG ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .35em .7em;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap
}

.badge-primary {
  background: var(--klh-primary, #005952);
  color: #fff
}

.badge-secondary {
  background: var(--klh-secondary, #147def);
  color: #fff
}

.badge-success, .badge-processed {
  background: #d9f3e4;
  color: #126b3a
}

.badge-danger, .badge-rejected {
  background: #fde2e5;
  color: #a51f30
}

.badge-warning, .badge-featured {
  background: #fff0c7;
  color: #805b00
}

.badge-info, .badge-new {
  background: #d9f3fa;
  color: #075d76
}

.badge-light, .badge-archived {
  background: #edf0f4;
  color: #596273
}

.badge-dark {
  background: #173331;
  color: #fff
}

.badge-priority {
  background: #ffe3c2;
  color: #934d00
}

.badge-mangrove {
  background: #dcefe4;
  color: #236044
}

.badge-peatland {
  background: #eee4d5;
  color: #74512d
}

.badge-circular {
  background: #dceeff;
  color: #155a87
}

.badge-dot:before {
  content: "";
  width: .5em;
  height: .5em;
  border-radius: 50%;
  background: currentColor
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .75rem;
  border: 1px solid var(--klh-border, #d7e4e1);
  border-radius: 999px;
  background: #fff;
  color: var(--klh-text, #173331);
  font-size: .875rem
}

.chip.is-active, .chip.active {
  background: var(--klh-primary-light, #e5f2f0);
  border-color: var(--klh-primary);
  color: var(--klh-primary)
}

.chip__close {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer
}

.tag {
  display: inline-block;
  padding: .25rem .55rem;
  border-radius: .3rem;
  background: #eef3f7;
  color: #425466;
  font-size: .75rem;
  font-weight: 700
}

/* ---------- ALERT / SYSTEM MESSAGE ---------- */
.alert {
  position: relative;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--klh-radius-sm, .5rem);
  margin-bottom: 0
}

.alert-content {
  flex: 1;
  min-width: 0
}

.alert-heading, .alert-title {
  font-weight: 700;
  margin: 0 0 .25rem
}

.alert-text {
  margin: 0;
  font-size: .925rem
}

.alert-link {
  font-weight: 700;
  text-decoration: underline
}

.alert-icon {
  flex: 0 0 1.5rem;
  width: 1.5rem;
  text-align: center;
  font-size: 1.15rem
}

.alert-dismissible {
  padding-right: 3rem
}

.alert-dismissible .close, .alert-dismissible .btn-close {
  position: absolute;
  right: .75rem;
  top: .75rem
}

.alert-success {
  background: #e7f6ed;
  border-color: #b9e4ca;
  color: #126b3a
}

.alert-info {
  background: #e5f5fb;
  border-color: #b7e3f2;
  color: #075d76
}

.alert-warning {
  background: #fff6df;
  border-color: #f4d98c;
  color: #805b00
}

.alert-danger {
  background: #fff0f1;
  border-color: #f2b8bf;
  color: #a51f30
}

.alert-primary {
  background: #e7f0f8;
  border-color: #b9d3e8;
  color: #005289
}

.alert-secondary {
  background: #edf0f4;
  border-color: #d1d9e2;
  color: #425466
}

.alert-light {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569
}

.alert-dark {
  background: #e8edf2;
  border-color: #b9c6d2;
  color: #17324d
}

.alert-system {
  background: #e5f5fb;
  border-left: 4px solid #0ea5c6;
  color: #075d76
}

.alert-escalation {
  background: #fff0df;
  border-left: 4px solid #f97910;
  color: #805000
}

.alert-success-soft {
  background: #f0faf4;
  border-left: 4px solid #0e7a4e;
  color: #126b3a
}

.alert-danger-soft {
  background: #fff5f5;
  border-left: 4px solid #c03a2b;
  color: #a51f30
}

/* ---------- FORM COMPONENTS ---------- */
.form-label {
  display: block;
  margin-bottom: .4rem;
  font-weight: 600;
  color: var(--klh-text, #173331)
}

.form-control, .form-select, select.form-control, input.form-control, textarea.form-control {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--klh-border, #d7e4e1);
  border-radius: var(--klh-radius-sm, .5rem);
  color: var(--klh-text, #173331);
  font: inherit;
  transition: border-color .2s, box-shadow .2s
}

.form-control:focus, .form-select:focus {
  border-color: var(--klh-primary);
  box-shadow: 0 0 0 3px rgba(var(--klh-primary-rgb, 0, 89, 82), .12);
  outline: 0
}

.is-invalid, .form-control.is-invalid {
  border-color: var(--klh-danger, #c03a2b)
}

.is-valid, .form-control.is-valid {
  border-color: var(--klh-success, #0e7a4e)
}

.invalid-feedback {
  color: var(--klh-danger, #c03a2b);
  font-size: .8125rem
}

.valid-feedback {
  color: var(--klh-success, #0e7a4e);
  font-size: .8125rem
}

.form-check-card {
  display: block;
  padding: 1rem;
  border: 1px solid var(--klh-border);
  border-radius: var(--klh-radius-md, .75rem);
  cursor: pointer
}

.form-check-card:has(input:checked) {
  border-color: var(--klh-primary);
  box-shadow: 0 0 0 3px rgba(var(--klh-primary-rgb), .12)
}

.dropzone {
  border: 1.5px dashed var(--klh-border);
  border-radius: var(--klh-radius-md, .75rem);
  padding: 2rem;
  text-align: center;
  background: var(--klh-surface-soft, #f5f9f8)
}

/* ---------- NAVIGATION ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: .875rem
}

.nav-tabs .nav-link, .nav-pills .nav-link {
  font-weight: 600;
  color: var(--klh-text-muted)
}

.nav-tabs .nav-link.active {
  color: var(--klh-primary);
  border-color: var(--klh-primary) var(--klh-primary) #fff
}

.nav-pills .nav-link.active {
  background: var(--klh-primary);
  color: #fff
}

.pagination .page-link {
  color: var(--klh-primary);
  border-color: var(--klh-border)
}

.pagination .page-item.active .page-link {
  background: var(--klh-primary);
  border-color: var(--klh-primary);
  color: #fff
}

.stepper {
  display: flex;
  align-items: flex-start;
  gap: 1rem
}

.stepper__item {
  flex: 1;
  position: relative;
  text-align: center
}

.stepper__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--klh-border-light);
  color: var(--klh-text-muted);
  font-weight: 700
}

.stepper__item.is-active .stepper__number, .stepper__item.is-complete .stepper__number {
  background: var(--klh-primary);
  color: #fff
}

.accordion-button:not(.collapsed) {
  background: var(--klh-primary-light);
  color: var(--klh-primary)
}

/* ---------- DATA COMPONENTS ---------- */
.card-klh, .kpi-card, .service-card, .news-card {
  background: #fff;
  border: 1px solid var(--klh-border);
  border-radius: var(--klh-radius-md, .75rem);
  box-shadow: var(--klh-shadow-1, 0 2px 10px rgba(16, 32, 31, .06));
  overflow: hidden
}

.kpi-card__value {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--klh-primary)
}

.table-klh, .table {
  --bs-table-border-color: var(--klh-border);
  vertical-align: middle
}

.tblwrap {
  width: 100%;
  overflow-x: auto
}

.progress {
  height: 8px;
  background: var(--klh-border-light);
  border-radius: 999px;
  overflow: hidden
}

.progress-bar {
  background: var(--klh-primary)
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--klh-primary-light);
  color: var(--klh-primary);
  font-weight: 700
}

.avatar-group .avatar {
  margin-left: -10px;
  border: 2px solid #fff
}

.status {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600
}

.status:before {
  content: "";
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: currentColor
}

.status-success, .status-safe {
  color: var(--klh-success)
}

.status-warning {
  color: var(--klh-warning)
}

.status-danger {
  color: var(--klh-danger)
}

.status-info {
  color: var(--klh-info)
}

.status-muted {
  color: var(--klh-text-muted)
}

/* ---------- OVERLAY, TOAST, EMPTY & LOADING ---------- */
.modal-content {
  border: 0;
  border-radius: var(--klh-radius-lg, 1rem);
  box-shadow: 0 20px 60px rgba(16, 32, 31, .2)
}

.toast {
  border: 1px solid var(--klh-border);
  border-radius: var(--klh-radius-sm, .5rem);
  box-shadow: var(--klh-shadow-2, 0 8px 30px rgba(16, 32, 31, .12))
}

.skeleton {
  background: linear-gradient(90deg, #edf2f0 25%, #f8faf9 37%, #edf2f0 63%);
  background-size: 400% 100%;
  animation: klh-skeleton 1.4s ease infinite;
  border-radius: .4rem
}

@keyframes klh-skeleton {
  0% {
    background-position: 100% 0
  }

  100% {
    background-position: -100% 0
  }
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--klh-text-muted)
}

.spinner-border {
  color: var(--klh-primary)
}

/* ---------- NOTIFICATION / TIMER / FAB ---------- */
.notification-item {
  display: flex;
  gap: .75rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--klh-border)
}

.notification-item.is-unread {
  background: var(--klh-primary-light)
}

.notification-item__title {
  font-weight: 700
}

.sla-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700
}

.sla-safe {
  color: var(--klh-success)
}

.sla-warning {
  color: var(--klh-warning)
}

.sla-overdue {
  color: var(--klh-danger)
}

.fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: var(--klh-primary);
  color: #fff;
  box-shadow: var(--klh-shadow-2, 0 8px 30px rgba(16, 32, 31, .18));
  cursor: pointer
}

.fab:hover {
  background: var(--klh-primary-dark)
}

/* ---------- SITE PATTERNS ---------- */
.utility-bar {
  background: var(--g-900, #002d2a);
  color: var(--g-100, #d8efeb)
}

.page-hero {
  background: linear-gradient(135deg, var(--g-800, #003f3a), var(--g-900, #002d2a));
  color: #fff
}

.cta-ribbon {
  background: linear-gradient(135deg, var(--g-700, #004d47), var(--g-900, #002d2a));
  color: #fff
}

.footer-klh {
  background: var(--g-900, #002d2a);
  color: var(--g-100, #d8efeb)
}

@media(max-width:767.98px) {
  .btn-block-xs {
    display: flex;
    width: 100%
  }

  .stepper {
    gap: .35rem
  }

  .stepper__label {
    font-size: .75rem
  }

  .fab {
    width: 48px;
    height: 48px
  }
}