/* ============================================================
   Bhineka Jember — Brand & Fresh Theme
   CI: biru navy (#1e50a2) + aksen merah (#d0202e).
   Modern, eye-friendly. Dimuat PALING AKHIR agar override.
   ============================================================ */
:root{
  --bhineka-blue:#1e50a2;
  --bhineka-blue-dark:#173e80;
  --bhineka-blue-light:#5b8de0;
  --bhineka-red:#d0202e;
  --bs-primary:#1e50a2;
  --bs-primary-rgb:30,80,162;
  --bs-link-color:#1e50a2;
  --bs-link-hover-color:#173e80;
}

/* ---------- Surfaces lebih segar (light) ---------- */
html.light-style body{ background-color:#f4f6fb !important; }
html.light-style .card{
  border-radius:.75rem;
  box-shadow:0 2px 12px rgba(30,80,162,.06);
  border:1px solid rgba(30,80,162,.04);
}
html.light-style .card-header{ border-top-left-radius:.75rem; border-top-right-radius:.75rem; }
html.light-style .navbar-detached{ box-shadow:0 2px 10px rgba(30,80,162,.08) !important; }

/* Brand/logo sidebar: ukuran pas + garis aksen merah tipis (unsur CI) */
.app-brand{ border-bottom:1px solid rgba(208,32,46,.15); padding:.45rem .5rem .55rem; justify-content:center; }
.app-brand-link{ width:100%; justify-content:center; }
.app-brand-logo{ display:flex; align-items:center; justify-content:center; }
.app-brand-logo img{ height:46px !important; width:auto !important; max-width:200px; object-fit:contain; }
.layout-menu-collapsed:not(.layout-menu-hover) .app-brand-logo img{ height:34px !important; max-width:46px; }

/* ---------- Primary color mapping ---------- */
.bg-primary{ background-color:var(--bhineka-blue)!important; }
.text-primary{ color:var(--bhineka-blue)!important; }
a{ color:var(--bhineka-blue); }
a:hover{ color:var(--bhineka-blue-dark); }

.btn-primary{ background-color:var(--bhineka-blue); border-color:var(--bhineka-blue); }
.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,
.btn-primary:not(:disabled):not(.disabled):active{
  background-color:var(--bhineka-blue-dark)!important; border-color:var(--bhineka-blue-dark)!important;
}
.btn-outline-primary{ color:var(--bhineka-blue); border-color:var(--bhineka-blue); }
.btn-outline-primary:hover{ background-color:var(--bhineka-blue); border-color:var(--bhineka-blue); color:#fff; }

.bg-label-primary{ background-color:#e7eef8!important; color:var(--bhineka-blue)!important; }
.badge.bg-primary,.badge.bg-label-primary.text-primary{ background-color:var(--bhineka-blue)!important; }

.form-control:focus,.form-select:focus{
  border-color:var(--bhineka-blue); box-shadow:0 0 0 .15rem rgba(30,80,162,.15);
}
.form-check-input:checked,.form-switch .form-check-input:checked{
  background-color:var(--bhineka-blue); border-color:var(--bhineka-blue);
}
.page-item.active .page-link{ background-color:var(--bhineka-blue); border-color:var(--bhineka-blue); }
.nav-pills .nav-link.active{ background-color:var(--bhineka-blue); }

/* ---------- Sidebar menu aktif (light): biru brand ---------- */
html.light-style .bg-menu-theme .menu-item.active>.menu-link:not(.menu-toggle){
  background:linear-gradient(90deg, rgba(30,80,162,.14), rgba(30,80,162,.05))!important;
  color:var(--bhineka-blue)!important; box-shadow:none!important; border-radius:.375rem;
}
html.light-style .bg-menu-theme .menu-item.active>.menu-link:not(.menu-toggle) .menu-icon{ color:var(--bhineka-blue)!important; }
html.light-style .bg-menu-theme .menu-inner>.menu-item.active:before{ background:var(--bhineka-blue); }

/* ---------- Dark mode: primary biru brand ---------- */
html.dark-style .bg-primary{ background-color:var(--bhineka-blue)!important; }
html.dark-style .btn-primary{ background-color:var(--bhineka-blue); border-color:var(--bhineka-blue); }
html.dark-style .btn-primary:hover,html.dark-style .btn-primary:active{ background-color:var(--bhineka-blue-dark)!important; border-color:var(--bhineka-blue-dark)!important; }
html.dark-style .btn-outline-primary{ color:var(--bhineka-blue-light); border-color:var(--bhineka-blue-light); }
html.dark-style .btn-outline-primary:hover{ background-color:var(--bhineka-blue); border-color:var(--bhineka-blue); color:#fff; }
html.dark-style .text-primary{ color:var(--bhineka-blue-light)!important; }
html.dark-style a{ color:var(--bhineka-blue-light); }
html.dark-style .bg-label-primary{ background-color:rgba(30,80,162,.28)!important; color:#9db8e6!important; }
html.dark-style .form-control:focus,html.dark-style .form-select:focus{ border-color:var(--bhineka-blue-light); box-shadow:0 0 0 .15rem rgba(74,128,216,.2); }
html.dark-style .form-check-input:checked,html.dark-style .form-switch .form-check-input:checked{ background-color:#3f74c9; border-color:#3f74c9; }
html.dark-style .bg-menu-theme .menu-item.active>.menu-link:not(.menu-toggle){
  background-color:rgba(30,80,162,.5)!important; color:#fff!important;
}
html.dark-style .bg-menu-theme .menu-item.active>.menu-link:not(.menu-toggle) .menu-icon{ color:#fff!important; }
html.dark-style .bg-menu-theme .menu-inner>.menu-item.active:before{ background:var(--bhineka-blue-light); }
