/* Small, targeted overrides only; layout and components come from Metronic Demo 38.
   Visual direction: enterprise field-operations control console.
   Tokens live here; every rule below is either global-brand or scoped to .app-default
   so mobile pages and print documents stay isolated. */

/* ---------------------------------------------------------------- */
/* Brand tokens (PLN Icon Plus: deep blue + signal yellow)          */
/* ---------------------------------------------------------------- */
:root,
[data-bs-theme="light"] {
  /* Brand accents (Clean medium-light primary blue #1570EF) */
  --edc-pln-blue: #1570EF;
  --edc-pln-blue-active: #0D5CB6;
  --edc-yellow: #FFC91D;

  /* Console surfaces */
  --edc-canvas: #F2F5FA;
  --edc-surface: #FFFFFF;
  --edc-sidebar: #FBFCFE;
  --edc-border: #E3E9F2;
  --edc-thead: #F5F8FC;
  --edc-zebra: #FBFCFE;
  --edc-hover: #E0EDFD; /* Clearly visible soft ice blue highlight */
  --edc-ink: #16233B;
  --edc-muted: #66789B;

  /* Explicit Desktop Fixed Height for Visual Analytics Cards (Emil Kowalski zero-shift layout) */
  --edc-analytics-card-height: 520px;

  /* Map the Metronic primary family onto the brand blue */
  --bs-primary: var(--edc-pln-blue);
  --bs-primary-rgb: 21, 112, 239;
  --bs-primary-active: var(--edc-pln-blue-active);
  --bs-primary-light: #EFF5FE;
  --bs-primary-inverse: #FFFFFF;
  --bs-text-primary: var(--edc-pln-blue);
  --bs-primary-clarity: rgba(21, 112, 239, 0.18);
  --bs-primary-bg-subtle: #EFF5FE;
  --bs-primary-border-subtle: #EFF5FE;
  --bs-focus-ring-color: rgba(21, 112, 239, 0.22);
}

[data-bs-theme="dark"] {
  /* Brand accents for Dark Mode */
  --edc-pln-blue: #3E97FF;
  --edc-pln-blue-active: #2884EF;
  --edc-yellow: #FFC91D;

  /* Dark surfaces */
  --edc-canvas: #151521;
  --edc-surface: #1e1e2d;
  --edc-sidebar: #1e1e2d;
  --edc-border: #2b2b40;
  --edc-thead: #1b1b28;
  --edc-zebra: #1e1e2d;
  --edc-hover: #252538;
  --edc-ink: #ffffff;
  --edc-muted: #92929f;

  --bs-primary: #3E97FF;
  --bs-primary-rgb: 62, 151, 255;
  --bs-primary-active: #2884EF;
  --bs-primary-light: #212E48;
  --bs-primary-inverse: #FFFFFF;
  --bs-text-primary: #3E97FF;
  --bs-primary-clarity: rgba(62, 151, 255, 0.2);
  --bs-primary-bg-subtle: #212E48;
  --bs-primary-border-subtle: #2b2b40;
  --bs-focus-ring-color: rgba(62, 151, 255, 0.25);
}

html, body { overflow-x: hidden; }
[data-bs-theme="dark"] html,
[data-bs-theme="dark"] body { background-color: #151521 !important; }
/* Root cause fix (page-to-page width shift): the html-level vertical
   scrollbar gutter appeared/disappeared as document height changed between
   pages, shifting every centered surface. Reserve it on every page
   unconditionally (the previous :has()-scoped rule silently no-oped in
   engines without :has support). Early canvas paint also softens the
   inherent multi-page reload flash. */
html { scrollbar-gutter: stable; background-color: #F2F5FA; }
.edc-brand-logo {
  max-width: 180px;
  height: auto;
  max-height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.05));
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
}

/* Sidebar logo header: centered alignment, compact whitespace, aesthetic visual balance */
.app-default .app-sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
  padding: 12px 16px 8px 16px;
}

.app-sidebar-logo a:hover .edc-brand-logo {
  transform: scale(1.04);
}

[data-bs-theme="dark"] .app-sidebar-logo a {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .edc-brand-logo {
  filter: brightness(1.05) drop-shadow(0 1px 4px rgba(0, 0, 0, 0.4));
}

/* Sidebar inner scroll container (verified root cause of expand-induced
   reflow): bundle ships .hover-scroll-overlay-y as overflow-y:scroll on
   desktop but auto below 992px, with NO scrollbar sizing anywhere, so the
   gutter materialized/vanished when accordion groups expanded. Force a
   constant thin always-reserved scrollbar in every state and breakpoint. */
#kt_app_sidebar_menu_wrapper {
  overflow-y: scroll !important;
  scrollbar-width: thin;
  scrollbar-color: #93C5FD transparent;
  scrollbar-gutter: stable;
}
#kt_app_sidebar_menu_wrapper::-webkit-scrollbar { width: 6px; }
#kt_app_sidebar_menu_wrapper::-webkit-scrollbar-track { background: transparent; }
#kt_app_sidebar_menu_wrapper::-webkit-scrollbar-thumb {
  background-color: #93C5FD;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}
#kt_app_sidebar_menu_wrapper::-webkit-scrollbar-thumb:hover {
  background-color: #60A5FA;
}

/* ---------------------------------------------------------------- */
/* Application canvas & shell separation                            */
/* ---------------------------------------------------------------- */
.app-default {
  background-color: var(--edc-canvas);
}
.app-default .app-header {
  background-color: var(--edc-surface);
  border-bottom: 1px solid var(--edc-border);
  z-index: 1050 !important;
}
#kt_app_sidebar {
  background-color: var(--edc-sidebar);
  border-right: 1px solid var(--edc-border);
}
#kt_app_sidebar .menu-item .menu-link {
  border-radius: 8px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
#kt_app_sidebar .menu-item .menu-link:hover:not(.active) {
  background-color: #E1EEFC !important;
}
#kt_app_sidebar .menu-item .menu-link:hover:not(.active) .menu-title {
  color: #1D4ED8 !important;
}
/* Group toggles are role=button spans; make the affordance explicit */
#kt_app_sidebar .menu-item.menu-accordion > .menu-link {
  cursor: pointer;
}
#kt_app_sidebar .menu-item.menu-accordion > .menu-link:focus-visible {
  outline: 2px solid rgba(0, 70, 140, 0.45);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- */
/* Signature detail: blue status tick with yellow tip under titles  */
/* Used once per page, under the page heading only.                 */
/* ---------------------------------------------------------------- */
.app-default .page-heading::after {
  content: "";
  display: block;
  width: 46px;
  height: 4px;
  margin-top: 8px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--edc-yellow) 0 12px, var(--edc-pln-blue) 12px 100%);
}

/* ---------------------------------------------------------------- */
/* Cards                                                            */
/* ---------------------------------------------------------------- */
.app-default .card {
  background-color: var(--edc-surface);
  border: 1px solid var(--edc-border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 42, 83, 0.05), 0 10px 28px -22px rgba(16, 42, 83, 0.28);
}
.app-default .card .card-title {
  color: var(--edc-ink);
}
.app-default .breadcrumb .breadcrumb-item,
.app-default .text-muted {
  color: var(--edc-muted);
}

/* Dashboard KPI cards: restrained semantic top edge */
.app-default #kpiRow > div:nth-child(1) .card { border-top: 3px solid var(--edc-pln-blue); }
.app-default #kpiRow > div:nth-child(2) .card { border-top: 3px solid #17A278; }
.app-default #kpiRow > div:nth-child(3) .card { border-top: 3px solid #E8A80C; }
.app-default #kpiRow > div:nth-child(4) .card { border-top: 3px solid #2E93E6; }
.app-default #kpiRow .fs-2hx { color: var(--edc-ink); letter-spacing: -0.02em; }
.app-default #kpiRow .card:hover {
  border-bottom-color: rgba(0, 70, 140, 0.35);
  border-left-color: rgba(0, 70, 140, 0.35);
  border-right-color: rgba(0, 70, 140, 0.35);
}

/* ---------------------------------------------------------------- */
/* Accordion (dashboard transaction sections)                       */
/* ---------------------------------------------------------------- */
.app-default .accordion-item {
  border-color: var(--edc-border);
  border-radius: 10px;
  overflow: hidden;
}
.app-default .accordion-button {
  color: var(--edc-ink);
  font-weight: 600;
}
.app-default .accordion-button:not(.collapsed) {
  background-color: #F4F8FD;
  color: var(--edc-pln-blue);
  box-shadow: inset 3px 0 0 var(--edc-pln-blue);
}
.app-default .accordion-button:focus-visible {
  box-shadow: 0 0 0 3px var(--bs-primary-clarity);
}

/* ---------------------------------------------------------------- */
/* Tables: tinted head, zebra rows, clear hover                     */
/* ---------------------------------------------------------------- */
.edc-table-scroll {
  border: 1px solid var(--edc-border);
  border-radius: 10px;
  background-color: var(--edc-surface);
  max-height: 520px;
  overflow-y: auto;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #93C5FD transparent;
}
.edc-table-scroll::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
.edc-table-scroll::-webkit-scrollbar-track {
  background: #F8FAFC;
  border-radius: 4px;
}
.edc-table-scroll::-webkit-scrollbar-thumb {
  background-color: #93C5FD;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}
.edc-table-scroll::-webkit-scrollbar-thumb:hover {
  background-color: #60A5FA;
}
.edc-table-scroll-sm { max-height: 320px; }
.edc-table-scroll table thead th {
  position: sticky; top: 0; z-index: 2;
  background-color: var(--edc-thead);
  color: var(--edc-muted);
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--edc-border);
}

/* Contain all table sticky headers so they never occlude app-header or fixed dropdown menus */
.table thead tr.sticky-top,
.table thead.sticky-top,
.table tr.sticky-top,
.table th.sticky-top {
  z-index: 5 !important;
}
.app-default .edc-table-scroll .table tbody tr:nth-child(even) td {
  background-color: var(--edc-zebra);
}
.app-default .edc-table-scroll .table tbody tr:hover td {
  background-color: var(--edc-hover) !important;
  color: #0F172A;
}
.app-default .edc-table-scroll .table th[data-sort]:hover span {
  color: var(--edc-pln-blue);
}
@media (max-width: 768px) {
  .edc-table-scroll { max-height: none; overflow-x: auto; }
}

/* ---------------------------------------------------------------- */
/* States: focus, hover, disabled                                   */
/* ---------------------------------------------------------------- */
.app-default a:focus-visible,
.app-default button:focus-visible,
.app-default select:focus-visible,
.app-default input:focus-visible,
.app-default .menu-link:focus-visible {
  outline: 2px solid rgba(0, 70, 140, 0.45);
  outline-offset: 2px;
}
.app-default .btn-light:hover {
  border-color: rgba(0, 70, 140, 0.35);
}
.app-default .btn:disabled,
.app-default .btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.app-default .form-control:focus,
.app-default .form-select:focus {
  border-color: rgba(0, 70, 140, 0.45);
}

/* ---------------------------------------------------------------- */
/* EMIL KOWALSKI DESIGN ENG: TACTILE BUTTON ACTIVE FEEDBACK         */
/* Instant feedback on pointer-down (scale 0.975); smooth release   */
/* ---------------------------------------------------------------- */
.btn {
  transition: transform 140ms cubic-bezier(0.2, 0, 0, 1), background-color 150ms ease-out, border-color 150ms ease-out, box-shadow 150ms ease-out !important;
}
.btn:active:not(:disabled):not(.disabled) {
  transform: scale(0.975) !important;
  transition: transform 80ms cubic-bezier(0.2, 0, 0, 1) !important;
}
.btn-icon:active:not(:disabled):not(.disabled) {
  transform: scale(0.94) !important;
  transition: transform 70ms cubic-bezier(0.2, 0, 0, 1) !important;
}

/* ---------------------------------------------------------------- */
/* Typography refinements (local stack only)                        */
/* ---------------------------------------------------------------- */
.app-default .page-heading {
  color: var(--edc-ink) !important;
  letter-spacing: -0.015em;
}
.fs-2hx, .fs-1, .fs-2 {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}
#live_header_clock, .font-monospace {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
#kt_app_sidebar .menu-item .menu-link .menu-title {
  color: var(--edc-ink) !important;
  font-weight: 500;
}
#kt_app_sidebar .menu-heading {
  color: var(--edc-muted) !important;
  letter-spacing: 0.08em;
}
#kt_app_sidebar .menu-item .menu-link:hover,
#kt_app_sidebar .menu-item .menu-link:focus,
#kt_app_sidebar .menu-item .menu-link:focus-visible,
#kt_app_sidebar .menu-item .menu-link.active {
  background-color: var(--bs-primary-light) !important;
}
#kt_app_sidebar .menu-item .menu-link:hover .menu-title,
#kt_app_sidebar .menu-item .menu-link:focus .menu-title,
#kt_app_sidebar .menu-item .menu-link:focus-visible .menu-title,
#kt_app_sidebar .menu-item .menu-link.active .menu-title,
#kt_app_sidebar .menu-item .menu-link:hover .menu-icon i,
#kt_app_sidebar .menu-item .menu-link:focus .menu-icon i,
#kt_app_sidebar .menu-item .menu-link:focus-visible .menu-icon i,
#kt_app_sidebar .menu-item .menu-link.active .menu-icon i {
  color: var(--edc-pln-blue) !important;
}
#kt_app_sidebar .menu-item .menu-link.active {
  box-shadow: inset 3px 0 0 var(--edc-pln-blue);
}
#kt_app_sidebar .menu-item .menu-link:focus-visible {
  box-shadow: 0 0 0 0.25rem var(--bs-primary-clarity);
}

/* ---------------------------------------------------------------- */
/* Legacy helpers kept from phase 1                                 */
/* ---------------------------------------------------------------- */
.edc-mobile-frame { width: 100%; max-width: 430px; min-height: 100vh; margin: 0 auto; padding-bottom: 88px; }
.edc-mobile-nav { width: 100%; max-width: 430px; left: 50%; transform: translateX(-50%); }
.edc-mobile-nav .btn { min-width: 58px; min-height: 58px; }
.edc-mobile-nav .btn-light-primary,
.edc-mobile-nav .btn-light-primary:hover,
.edc-mobile-nav .btn-light-primary:focus,
.edc-mobile-nav .btn-light-primary:focus-visible,
.edc-mobile-nav .btn-light-primary:active {
  color: var(--bs-primary) !important;
  background-color: var(--bs-primary-light) !important;
}
.edc-mobile-nav .btn-light-primary i,
.edc-mobile-nav .btn-light-primary span {
  color: inherit !important;
}
.edc-print-page { max-width: 100%; width: 100%; box-sizing: border-box; margin: 0 auto; }

@media (max-width: 440px) {
  .edc-mobile-frame { max-width: none; }
  .edc-mobile-nav { max-width: none; }
}

/* ---------------------------------------------------------------- */
/* Sidebar navigation: uniform icon chips, one muted family per     */
/* group. Family colors ride on --edc-nav-* custom properties set   */
/* per [data-nav] below; active route falls back to Metronic blue.  */
/* ---------------------------------------------------------------- */
#kt_app_sidebar .menu-item .menu-link {
  --edc-nav: #66789B;
  --edc-nav-strong: #4A5E80;
  --edc-nav-bg: #F3F6FB;
  --edc-nav-bg-strong: #E9EEF6;
}
#kt_app_sidebar .menu-item .menu-link .menu-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background-color: var(--edc-nav-bg);
  transition: background-color 0.15s ease;
}
#kt_app_sidebar .menu-item .menu-link .menu-icon i {
  font-size: 1.05rem;
  line-height: 1;
  color: var(--edc-nav);
  transition: color 0.15s ease;
}
#kt_app_sidebar .menu-item .menu-link:hover .menu-icon,
#kt_app_sidebar .menu-item .menu-link:focus-visible .menu-icon {
  background-color: var(--edc-nav-bg-strong);
}
#kt_app_sidebar .menu-item .menu-link:hover .menu-icon i,
#kt_app_sidebar .menu-item .menu-link:focus-visible .menu-icon i {
  color: var(--edc-nav-strong);
}

/* Transactions — refined blue */
.menu-link[data-nav="install"], .menu-link[data-nav="preventive"],
.menu-link[data-nav="corrective"], .menu-link[data-nav="pullout"],
.menu-link[data-nav="monthlyPmSchedule"], .menu-link[data-nav="dailyActivity"] {
  --edc-nav: #3B6FD4; --edc-nav-strong: #2B57AE;
  --edc-nav-bg: #EDF3FC; --edc-nav-bg-strong: #DFEAF9;
}
/* Inventory — teal */
.menu-link[data-nav="invMasterAsset"], .menu-link[data-nav="invMerchTerminals"],
.menu-link[data-nav="invProcess"] {
  --edc-nav: #12808A; --edc-nav-strong: #0C656D;
  --edc-nav-bg: #E7F5F5; --edc-nav-bg-strong: #D8EEEF;
}
/* Reporting — indigo */
.menu-link[data-nav="repScheduleControl"], .menu-link[data-nav="repOutstandingWo"],
.menu-link[data-nav="repHistoryVisit"] {
  --edc-nav: #5A64C8; --edc-nav-strong: #4550AC;
  --edc-nav-bg: #EEEFFB; --edc-nav-bg-strong: #E2E5F8;
}
/* Master Data — warm amber */
.menu-link[data-nav="masterMerchant"], .menu-link[data-nav="masterAssets"],
.menu-link[data-nav="masterTerminal"], .menu-link[data-nav="masterSla"],
.menu-link[data-nav="masterServicePoint"] {
  --edc-nav: #A9771D; --edc-nav-strong: #855D14;
  --edc-nav-bg: #FAF3E3; --edc-nav-bg-strong: #F4EAD1;
}
/* Human Resource — restrained violet */
.menu-link[data-nav="hrEmployeeInfo"], .menu-link[data-nav="hrWorkingInfo"],
.menu-link[data-nav="hrDepartments"] {
  --edc-nav: #7E5FC0; --edc-nav-strong: #654AA3;
  --edc-nav-bg: #F2EEFA; --edc-nav-bg-strong: #E9E3F7;
}
/* Upload Management — cyan-blue */
.menu-link[data-nav="upMerchantUpload"], .menu-link[data-nav="upMerchantUpdateUpload"],
.menu-link[data-nav="upItemUpload"] {
  --edc-nav: #1F7FAE; --edc-nav-strong: #17648B;
  --edc-nav-bg: #E8F4FA; --edc-nav-bg-strong: #DAECF7;
}
/* Common Code — slate-blue */
.menu-link[data-nav="commonBank"], .menu-link[data-nav="commonWarehouse"] {
  --edc-nav: #56718D; --edc-nav-strong: #405871;
  --edc-nav-bg: #EDF2F7; --edc-nav-bg-strong: #E1E9F1;
}

/* Active route: Metronic primary-blue treatment wins */
#kt_app_sidebar .menu-item .menu-link.active {
  --edc-nav: var(--edc-pln-blue);
  --edc-nav-strong: var(--edc-pln-blue-active);
  --edc-nav-bg: var(--bs-primary-light);
  --edc-nav-bg-strong: #D9E7F5;
}

@media (max-width: 991.98px) {
  /* Drawer mode on tablets/phones: keep chips compact and aligned */
  #kt_app_sidebar.drawer-on .menu-item .menu-link { padding-top: 0.45rem; padding-bottom: 0.45rem; }
}

/* ---------------------------------------------------------------- */
/* Reduced motion                                                   */
/* ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .app-default *,
  .app-default *::before,
  .app-default *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------- */
/* Print: neutral surfaces, chrome hidden                           */
/* ---------------------------------------------------------------- */
@media print {
  body { background: #fff !important; }
  .no-print { display: none !important; }
  .app-header, .app-sidebar, .app-toolbar, .app-footer { display: none !important; }
  .app-default { background: #fff !important; }
  .app-default .card {
    box-shadow: none !important;
    border-color: #d9dde3 !important;
    border-radius: 0 !important;
  }
  .edc-table-scroll {
    max-height: none !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
  }
  .edc-table-scroll table thead th { background: #fff !important; position: static !important; }
  .app-default .page-heading::after { display: none !important; }
  .edc-print-page { width: auto; min-height: auto; margin: 0; padding: 0; box-shadow: none !important; border: 0 !important; }
  @page { size: A4 portrait; margin: 10mm; }
}

/* ---------------------------------------------------------------- */
/* Leaflet GIS Map custom overrides                                 */
/* ---------------------------------------------------------------- */
.leaflet-control-attribution,
.leaflet-attribution-flag {
  display: none !important;
}

.edc-map-pin {
  transition: transform 0.2s ease;
}

.edc-map-pin:hover {
  transform: scale(1.35);
  z-index: 1000 !important;
}

/* ---------------------------------------------------------------- */
/* Scrollable modal fix for form-based modals                       */
/* ---------------------------------------------------------------- */
.modal-dialog-scrollable .modal-content {
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-dialog-scrollable .modal-body {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* ---------------------------------------------------------------- */
/* UI/UX PRO MAX: STANDARDIZED ELECTRIC BLUE CHECKBOXES             */
/* High-contrast, WCAG 2.2 AAA compliant, vivid blue interactive UI */
/* ---------------------------------------------------------------- */
.form-check-input,
.form-check.form-check-custom .form-check-input,
.form-check.form-check-solid .form-check-input {
  appearance: none;
  -webkit-appearance: none;
  width: 1.35rem !important;
  height: 1.35rem !important;
  margin-top: 0.1rem;
  vertical-align: top;
  background-color: #FFFFFF !important;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 2px solid #2563EB !important; /* Bold Electric Blue border */
  border-radius: 6px !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.6) !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  flex-shrink: 0;
}

/* Hover state: Vivid focus glow and deeper blue frame */
.form-check-input:hover,
.form-check.form-check-custom:hover .form-check-input,
.form-check.form-check-solid:hover .form-check-input {
  border-color: #1D4ED8 !important;
  background-color: #EFF6FF !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.22), 0 2px 6px rgba(29, 78, 216, 0.3) !important;
  transform: scale(1.08);
}

/* Checked state: Radiant Electric Blue with crisp white checkmark */
.form-check-input:checked,
.form-check.form-check-custom .form-check-input:checked,
.form-check.form-check-solid .form-check-input:checked {
  background-color: #1D4ED8 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3.2' d='M5 10.5l3.5 3.5L15 6'/%3e%3c/svg%3e") !important;
  border-color: #1E40AF !important;
  box-shadow: 0 0 0 1px #FFFFFF, 0 3px 10px rgba(29, 78, 216, 0.55) !important;
  transform: scale(1.04);
}

/* Indeterminate state (e.g., partial select all) */
.form-check-input:indeterminate,
.form-check.form-check-custom .form-check-input:indeterminate,
.form-check.form-check-solid .form-check-input:indeterminate {
  background-color: #1D4ED8 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3.5' d='M5 10h10'/%3e%3c/svg%3e") !important;
  border-color: #1E40AF !important;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.45) !important;
}

/* Focus Visible: Accessibility WCAG 2.2 AAA ring */
.form-check-input:focus-visible {
  outline: 2px solid #2563EB !important;
  outline-offset: 3px !important;
}

/* ---------------------------------------------------------------- */
/* UI/UX PRO MAX & APPLE DESIGN: TABLE DATA DENSITY RHYTHMS        */
/* Standardize table cell padding, vertical center alignment,       */
/* and multiline text spacing for predictable spatial rhythm.       */
/* ---------------------------------------------------------------- */
.table.align-middle th,
.table.align-middle td,
.edc-table-scroll .table th,
.edc-table-scroll .table td,
#work_orders_table th,
#work_orders_table td {
  padding-top: 0.75rem !important;   /* standard py-3 */
  padding-bottom: 0.75rem !important; /* standard py-3 */
  vertical-align: middle !important;
  line-height: 1.35;
}

/* Ensure secondary text in table cells has tight, consistent rhythm */
.table td .text-muted.fs-8,
.table td .text-muted.fs-9,
.table td .fs-8.text-muted {
  line-height: 1.25;
  margin-top: 2px;
}

/* Micro badge and chip alignment inside cells */
.table td .badge {
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
}

/* First column in all tables (Checkbox or Row Number #) */
.table th:first-child,
.table td:first-child {
  padding-left: 1.5rem !important;
  padding-right: 0.85rem !important;
  vertical-align: middle !important;
}

/* Specific styling for Row Number (#) column */
.table th:first-child:not(:has(.form-check)),
.table td:first-child:not(:has(.form-check)) {
  width: 60px !important;
  min-width: 60px !important;
  text-align: center !important;
}

/* Number badge in rows for cleaner visual hierarchy */
.table td:first-child:not(:has(.form-check)) {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #64748B;
  letter-spacing: 0.02em;
}

/* In tables where first column is checkbox, second column is # */
.table th:first-child:has(.form-check) + th,
.table td:first-child:has(.form-check) + td {
  width: 55px !important;
  min-width: 55px !important;
  text-align: center !important;
  padding-left: 0.5rem !important;
  padding-right: 0.75rem !important;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #64748B;
  vertical-align: middle !important;
}

/* Table grid selection checkbox specific highlight */
#work_orders_table th:first-child,
#work_orders_table td:first-child,
.table th.w-20px,
.table th.w-50px,
.table td:has(.wo-select-checkbox),
.table th:has(#check_all_wos) {
  width: 58px !important;
  min-width: 58px !important;
  max-width: 58px !important;
  padding-left: 1.5rem !important;
  padding-right: 0.85rem !important;
  text-align: center !important;
  vertical-align: middle !important;
}

#work_orders_table th .form-check,
#work_orders_table td .form-check,
.table th .form-check,
.table td .form-check {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

#work_orders_table th .form-check-input,
#work_orders_table td .form-check-input,
.table th .form-check-input,
.table td .form-check-input {
  width: 1.4rem !important;
  height: 1.4rem !important;
  border-width: 2.2px !important;
  margin: 0 !important;
}

/* Row highlight when table row selection checkbox is checked */
tr:has(.wo-select-checkbox:checked),
tr:has(.edc-row-checkbox:checked) {
  background-color: #D8E8FC !important;
  transition: background-color 0.15s ease-in-out;
}
tr:has(.wo-select-checkbox:checked) td,
tr:has(.edc-row-checkbox:checked) td {
  background-color: #D8E8FC !important;
  color: #0F172A !important;
}

[data-bs-theme="dark"] .form-check-input,
[data-bs-theme="dark"] .form-check.form-check-custom .form-check-input,
[data-bs-theme="dark"] .form-check.form-check-solid .form-check-input {
  background-color: #1E1E2D !important;
  border-color: #3E97FF !important;
  box-shadow: 0 1px 3px rgba(62, 151, 255, 0.25) !important;
}
[data-bs-theme="dark"] .form-check-input:hover {
  background-color: #212E48 !important;
  box-shadow: 0 0 0 4px rgba(62, 151, 255, 0.3) !important;
}
[data-bs-theme="dark"] .form-check-input:checked {
  background-color: #3E97FF !important;
  border-color: #2884EF !important;
  box-shadow: 0 0 12px rgba(62, 151, 255, 0.6) !important;
}
[data-bs-theme="dark"] tr:has(.form-check-input:checked) {
  background-color: rgba(33, 46, 72, 0.5) !important;
}

/* ---------------------------------------------------------------- */
/* UI/UX PRO MAX: STANDARDIZED MODAL & DIALOG SYSTEM                */
/* Clean backdrop blur, solid depth, consistent headers & footers   */
/* ---------------------------------------------------------------- */
.modal-backdrop.show {
  backdrop-filter: blur(5px) !important;
  background-color: rgba(15, 23, 42, 0.68) !important;
  opacity: 1 !important;
}

.modal-content {
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 45px -12px rgba(15, 23, 42, 0.28), 0 4px 16px rgba(15, 23, 42, 0.08) !important;
  overflow: hidden;
}

.modal-header {
  border-bottom: 1px solid #E2E8F0 !important;
  padding: 1.25rem 1.75rem !important;
  background-color: #F8FAFC !important;
}

.modal-header .modal-title {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #1E293B !important;
  display: flex;
  align-items: center;
}

.modal-body {
  padding: 1.75rem !important;
}

.modal-footer {
  border-top: 1px solid #E2E8F0 !important;
  padding: 1rem 1.75rem !important;
  background-color: #F8FAFC !important;
  gap: 0.75rem;
}

/* Dark mode modal */
[data-bs-theme="dark"] .modal-content {
  background-color: #1E1E2D !important;
  border-color: #2B2B40 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65) !important;
}
[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
  background-color: #161622 !important;
  border-color: #2B2B40 !important;
}
[data-bs-theme="dark"] .modal-header .modal-title {
  color: #FFFFFF !important;
}

/* ---------------------------------------------------------------- */
/* UI/UX PRO MAX: STANDARDIZED COMBO BOX (SELECT2) ELEVATION        */
/* Clean borders, search input glow, refined options and hover      */
/* ---------------------------------------------------------------- */
.select2-container--bootstrap5 .select2-selection--single,
.select2-container--bootstrap5 .select2-selection--multiple {
  border: 1px solid #CBD5E1 !important;
  border-radius: 8px !important;
  background-color: #FFFFFF !important;
  min-height: 42px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.select2-container--bootstrap5.select2-container--focus .select2-selection--single,
.select2-container--bootstrap5.select2-container--open .select2-selection--single {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
}

.select2-container--bootstrap5 .select2-dropdown {
  border: 1px solid #CBD5E1 !important;
  border-radius: 10px !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14) !important;
  overflow: hidden;
  padding: 6px 0 !important;
}

.select2-container--bootstrap5 .select2-search--dropdown .select2-search__field {
  border: 1px solid #E2E8F0 !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
}

.select2-container--bootstrap5 .select2-search--dropdown .select2-search__field:focus {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.select2-container--bootstrap5 .select2-results__option--highlighted[aria-selected] {
  background-color: #EFF6FF !important;
  color: #1D4ED8 !important;
  font-weight: 600 !important;
}

.select2-container--bootstrap5 .select2-results__option--selected {
  background-color: #2563EB !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
}

/* ---------------------------------------------------------------- */
/* UI/UX PRO MAX & LENDORA (RONDESIGNLAB) AESTHETIC CHART STYLING   */
/* Ultra-smooth curves, floating pill glassmorphism tooltips,       */
/* refined legend dots and soft ambient glow                        */
/* ---------------------------------------------------------------- */
.apexcharts-tooltip {
  background: rgba(15, 23, 42, 0.90) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.25) !important;
  color: #FFFFFF !important;
  font-family: inherit !important;
  padding: 8px 12px !important;
}

.apexcharts-tooltip-title {
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #94A3B8 !important;
  padding: 6px 8px !important;
  margin-bottom: 4px !important;
}

.apexcharts-tooltip-text {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #F8FAFC !important;
}

.apexcharts-tooltip-marker {
  width: 9px !important;
  height: 9px !important;
  border-radius: 50% !important;
  margin-right: 8px !important;
}

.apexcharts-legend-text {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #64748B !important;
}

.apexcharts-legend-marker {
  border-radius: 50% !important;
  margin-right: 6px !important;
}

.apexcharts-gridline {
  stroke: #F1F5F9 !important;
}

[data-bs-theme="dark"] .apexcharts-gridline {
  stroke: #252538 !important;
}

/* ---------------------------------------------------------------- */
/* ---------------------------------------------------------------- */
/* 3D CLAYMORPHIC & GLASSMORPHIC DONUT VISUALIZATION                */
/* Volumetric 3D depth, isometric perspective, and frosted glass    */
/* ---------------------------------------------------------------- */
.donut-3d-stage {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0 !important;
  max-height: 330px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  overflow: visible;
  padding: 0;
  margin: auto 0;
}

/* 3D Upright Claymorphic Ring Container - Desktop Target: 320px x 320px */
.donut-3d-scene {
  position: relative;
  width: 320px;
  height: 320px;
  transform: rotateX(0deg) rotateZ(0deg);
  transform-style: preserve-3d;
  transition: none;
}

/* Emil Kowalski: Strict geometry lock - disable any transform / scale on hover */
.donut-3d-scene:hover {
  transform: none !important;
}

/* Volumetric Clay Drop Shadow - Symmetrical below */
.donut-3d-shadow {
  position: absolute;
  width: 270px;
  height: 270px;
  top: 35px;
  left: 25px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.18) 0%, rgba(15, 23, 42, 0) 70%);
  transform: translateZ(-20px) scaleY(0.85);
  filter: blur(16px);
  pointer-events: none;
}

/* Layer Base for Thickness Extrusion */
.donut-3d-base {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform: translateZ(-14px);
  filter: brightness(0.68) saturate(1.2);
}

/* SVG Claymorphic Doughnut Slice Styling - 320px coordinate system */
.donut-3d-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  filter: drop-shadow(0 14px 22px rgba(15, 23, 42, 0.16));
}

/* Constant thickness: 70px stroke on 248px track = outer 318px, inner 178px (55.97% inner hole) */
.donut-slice {
  fill: none;
  stroke-width: 70 !important;
  stroke-linecap: round;
  transition: filter 0.2s ease, stroke-dashoffset 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

/* Hover brightness & soft glow only - NEVER alter stroke-width or scale */
.donut-slice:hover {
  stroke-width: 70 !important;
  filter: brightness(1.10) drop-shadow(0 0 12px rgba(255, 255, 255, 0.5));
}

/* Glassmorphic Central Floating Hub - Proportionally sized to 174px to match 178px inner hole */
.donut-glass-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateZ(20px);
  width: 174px;
  height: 174px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 12px 28px rgba(15, 23, 42, 0.10),
    inset 0 2px 5px rgba(255, 255, 255, 0.95),
    inset 0 -2px 5px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  transition: none;
}

[data-bs-theme="dark"] .donut-glass-core {
  background: rgba(30, 30, 45, 0.84);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 12px 28px rgba(0, 0, 0, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.4);
}

/* Interactive Slice Tooltip Badge */
.donut-live-tooltip {
  position: absolute;
  top: 6px;
  right: 10px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

/* ---------------------------------------------------------------- */
/* 3D CLAYMORPHIC BAR CHART STYLING                                 */
/* Volumetric pills, ambient soft lighting and dual shadow depth    */
/* ---------------------------------------------------------------- */
#chart_sp_workload .apexcharts-bar-series path {
  filter: drop-shadow(0 4px 6px rgba(15, 23, 42, 0.12));
  transition: filter 0.2s ease, transform 0.2s ease;
}

#chart_sp_workload .apexcharts-bar-series path:hover {
  filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.22)) brightness(1.08);
}

[data-bs-theme="dark"] #chart_sp_workload .apexcharts-bar-series path {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

[data-bs-theme="dark"] #chart_sp_workload .apexcharts-bar-series path:hover {
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5)) brightness(1.15);
}

/* ---------------------------------------------------------------- */
/* 1. CLAYMORPHIC KPI CARDS & GLASSMORPHIC FLOATING ICON HUBS       */
/* ---------------------------------------------------------------- */
.kpi-clay-card {
  position: relative;
  background: var(--edc-surface, #ffffff) !important;
  border-radius: 18px !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  box-shadow: 
    0 10px 25px -5px rgba(15, 23, 42, 0.06),
    0 8px 10px -6px rgba(15, 23, 42, 0.04),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.9) !important;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1) !important;
  overflow: hidden;
}

.kpi-clay-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--kpi-accent-color, #2563EB);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  z-index: 3;
}

@media (hover: hover) and (pointer: fine) {
  .kpi-clay-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 
      0 20px 30px -8px rgba(15, 23, 42, 0.12),
      0 10px 15px -5px rgba(15, 23, 42, 0.06),
      inset 0 1px 2px 0 rgba(255, 255, 255, 1) !important;
  }

  .kpi-clay-card:hover .glass-icon-hub {
    transform: scale(1.08) rotate(3deg);
  }
}

.kpi-clay-card:active {
  transform: scale(0.985);
  transition: transform 90ms cubic-bezier(0.2, 0, 0, 1) !important;
}

/* Floating Glassmorphic Icon Hub */
.glass-icon-hub {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-hub-bg, rgba(37, 99, 235, 0.08));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-hub-border, rgba(37, 99, 235, 0.2));
  box-shadow: 
    0 8px 16px var(--glass-hub-shadow, rgba(37, 99, 235, 0.12)),
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.04);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms ease;
}

/* Claymorphic Mini Progress Bar */
.clay-progress-track {
  height: 8px;
  border-radius: 10px;
  background: rgba(241, 245, 249, 0.9);
  box-shadow: inset 0 2px 3px rgba(15, 23, 42, 0.08);
  padding: 1px;
}

.clay-progress-bar {
  height: 100%;
  border-radius: 10px;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.15),
    inset 0 1px 1px rgba(255, 255, 255, 0.5);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------------------------------------------------------------- */
/* 2. GLASSMORPHIC MAP HUD & 3D CLAY DOME PINS                      */
/* ---------------------------------------------------------------- */
.map-container-relative {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}

.map-glass-hud {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.12);
}

[data-bs-theme="dark"] .map-glass-hud {
  background: rgba(30, 30, 45, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.4);
}

.map-glass-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  border-radius: 8px;
  transition: background-color 150ms ease-out, color 150ms ease-out, transform 100ms ease-out, box-shadow 150ms ease-out;
}

@media (hover: hover) and (pointer: fine) {
  .map-glass-btn:hover {
    background: #E2E8F0;
    color: #1E293B;
  }
}

.map-glass-btn.active {
  background: #2563EB;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.35);
}

.map-glass-btn:active {
  transform: scale(0.95);
  transition: transform 70ms ease-out;
}

[data-bs-theme="dark"] .map-glass-btn {
  color: #94A3B8;
}

/* Clay 3D Dome Pin for Leaflet */
.clay-map-pin {
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  border: 2px solid #ffffff !important;
  box-shadow: 
    0 4px 10px rgba(15, 23, 42, 0.35),
    inset 0 2px 3px rgba(255, 255, 255, 0.7),
    inset 0 -2px 3px rgba(0, 0, 0, 0.25) !important;
  transition: transform 0.25s ease, filter 0.25s ease;
  cursor: pointer;
}

.clay-map-pin:hover {
  transform: scale(1.4) !important;
  filter: brightness(1.15) !important;
  z-index: 1000 !important;
}

/* Glassmorphic Leaflet Popup */
.leaflet-popup-content-wrapper {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.95) !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.2) !important;
  padding: 4px !important;
}

[data-bs-theme="dark"] .leaflet-popup-content-wrapper {
  background: rgba(30, 30, 45, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.5) !important;
  color: #F8FAFC !important;
}

.leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.92) !important;
}

[data-bs-theme="dark"] .leaflet-popup-tip {
  background: rgba(30, 30, 45, 0.92) !important;
}

/* Leaflet Zoom Control Positioned at Bottom-Right with 16px spacing */
#edc_leaflet_map .leaflet-bottom.leaflet-right {
  margin-bottom: 6px;
  margin-right: 6px;
}

#edc_leaflet_map .leaflet-bottom.leaflet-right .leaflet-control-zoom {
  margin-right: 16px !important;
  margin-bottom: 16px !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.12), 0 4px 6px -2px rgba(15, 23, 42, 0.05) !important;
  border-radius: 10px !important;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

#edc_leaflet_map .leaflet-control-zoom a {
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
  color: #1E293B !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  background-color: transparent !important;
  transition: background-color 150ms ease-out, color 150ms ease-out !important;
}

#edc_leaflet_map .leaflet-control-zoom a:hover {
  background-color: #F1F5F9 !important;
  color: #2563EB !important;
}

[data-bs-theme="dark"] #edc_leaflet_map .leaflet-bottom.leaflet-right .leaflet-control-zoom {
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.5) !important;
  background: rgba(30, 30, 45, 0.88) !important;
}

[data-bs-theme="dark"] #edc_leaflet_map .leaflet-control-zoom a {
  color: #F8FAFC !important;
}

[data-bs-theme="dark"] #edc_leaflet_map .leaflet-control-zoom a:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #60A5FA !important;
}

/* ---------------------------------------------------------------- */
/* 3. CLAYMORPHIC STATUS MICRO-PILLS                                */
/* Volumetric tactile badges for table grids (WO & Users)           */
/* ---------------------------------------------------------------- */
.badge-clay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 20px !important;
  padding: 4px 12px !important;
  font-size: 11px !important;
  line-height: 1.3;
  box-shadow: 
    0 2px 5px var(--badge-shadow, rgba(15, 23, 42, 0.1)),
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    inset 0 -1px 2px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--badge-border, transparent);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.badge-clay:hover {
  transform: translateY(-1px);
  box-shadow: 
    0 4px 8px var(--badge-shadow, rgba(15, 23, 42, 0.15)),
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 -1px 2px rgba(0, 0, 0, 0.08);
}

/* Selesai / Aktif (Clay Emerald) */
.badge-clay-success {
  background: linear-gradient(180deg, #D1FAE5 0%, #A7F3D0 100%);
  color: #065F46 !important;
  --badge-border: #6EE7B7;
  --badge-shadow: rgba(16, 185, 129, 0.25);
}

/* In Progress / Warning (Clay Amber) */
.badge-clay-warning {
  background: linear-gradient(180deg, #FEF3C7 0%, #FDE68A 100%);
  color: #92400E !important;
  --badge-border: #FCD34D;
  --badge-shadow: rgba(245, 158, 11, 0.25);
}

/* Terjadwal / Open / Admin (Clay Royal Blue) */
.badge-clay-primary {
  background: linear-gradient(180deg, #DBEAFE 0%, #BFDBFE 100%);
  color: #1E40AF !important;
  --badge-border: #93C5FD;
  --badge-shadow: rgba(37, 99, 235, 0.25);
}

/* Nonaktif / Terlambat / Danger (Clay Rose) */
.badge-clay-danger {
  background: linear-gradient(180deg, #FEE2E2 0%, #FECACA 100%);
  color: #991B1B !important;
  --badge-border: #FCA5A5;
  --badge-shadow: rgba(239, 68, 68, 0.25);
}

/* Info / Dispatcher (Clay Cyan) */
.badge-clay-info {
  background: linear-gradient(180deg, #CFFAFE 0%, #A5F3FC 100%);
  color: #155E75 !important;
  --badge-border: #67E8F9;
  --badge-shadow: rgba(6, 182, 212, 0.25);
}

/* Secondary / General (Clay Slate) */
.badge-clay-secondary {
  background: linear-gradient(180deg, #F1F5F9 0%, #E2E8F0 100%);
  color: #475569 !important;
  --badge-border: #CBD5E1;
  --badge-shadow: rgba(100, 116, 139, 0.2);
}

[data-bs-theme="dark"] .kpi-clay-card {
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 
    0 10px 25px -5px rgba(0, 0, 0, 0.35),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .badge-clay-success {
  background: linear-gradient(180deg, #064E3B 0%, #065F46 100%);
  color: #A7F3D0 !important;
  --badge-border: #059669;
}

[data-bs-theme="dark"] .badge-clay-warning {
  background: linear-gradient(180deg, #78350F 0%, #92400E 100%);
  color: #FDE68A !important;
  --badge-border: #D97706;
}

[data-bs-theme="dark"] .badge-clay-primary {
  background: linear-gradient(180deg, #1E3A8A 0%, #1E40AF 100%);
  color: #BFDBFE !important;
  --badge-border: #2563EB;
}

[data-bs-theme="dark"] .badge-clay-danger {
  background: linear-gradient(180deg, #7F1D1D 0%, #991B1B 100%);
  color: #FECACA !important;
  --badge-border: #DC2626;
}

/* ---------------------------------------------------------------- */
/* 4. GLASSMORPHIC FLOATING TOPBAR & HEADER                         */
/* ---------------------------------------------------------------- */
.app-header {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05) !important;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .app-header {
  background: rgba(30, 30, 45, 0.85) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.3) !important;
}

/* ---------------------------------------------------------------- */
/* 5. HARDWARE INVENTORY CLAY BENTO TILES                           */
/* ---------------------------------------------------------------- */
.clay-bento-card {
  background: var(--edc-surface, #ffffff) !important;
  border-radius: 16px !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  padding: 16px 20px !important;
  box-shadow: 
    0 8px 18px -4px rgba(15, 23, 42, 0.05),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.9) !important;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1), border-color 180ms ease !important;
}

.clay-bento-clickable {
  cursor: pointer;
  display: flex;
}

.clay-bento-clickable .bento-nav-arrow {
  transition: transform 160ms cubic-bezier(0.2, 0, 0, 1), color 160ms ease;
  opacity: 0.6;
}

@media (hover: hover) and (pointer: fine) {
  .clay-bento-card:hover {
    transform: translateY(-3px);
    box-shadow: 
      0 16px 26px -6px rgba(15, 23, 42, 0.1),
      inset 0 1px 2px 0 rgba(255, 255, 255, 1) !important;
  }
  .clay-bento-clickable:hover {
    border-color: rgba(37, 99, 235, 0.3) !important;
  }
  .clay-bento-clickable:hover .bento-nav-arrow {
    transform: translate(2px, -2px);
    color: #2563EB !important;
    opacity: 1;
  }
  .clay-bento-clickable:hover .bento-val {
    color: #1D4ED8 !important;
  }
}

.clay-bento-card:active {
  transform: scale(0.985);
  transition: transform 80ms cubic-bezier(0.2, 0, 0, 1) !important;
}

[data-bs-theme="dark"] .clay-bento-card {
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 
    0 8px 18px -4px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* ---------------------------------------------------------------- */
/* 6. DETAIL WO: FROSTED EVIDENCE TILES & CLAY TIMELINE             */
/* ---------------------------------------------------------------- */
.frosted-evidence-card {
  border-radius: 14px;
  overflow: hidden;
  background: var(--edc-surface, #ffffff);
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 6px 16px -3px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.frosted-evidence-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -5px rgba(15, 23, 42, 0.12);
}

.frosted-evidence-header {
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  padding: 8px 14px;
}

[data-bs-theme="dark"] .frosted-evidence-card {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 16px -3px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .frosted-evidence-header {
  background: rgba(30, 30, 45, 0.85);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* ---------------------------------------------------------------- */
/* 7. CINEMATIC GLASS MODALS & CLAY PILL BUTTONS                    */
/* ---------------------------------------------------------------- */
.modal-backdrop.show {
  opacity: 0.65 !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  background-color: #0b1329 !important;
}

.modal-content {
  border-radius: 18px !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 
    0 25px 50px -12px rgba(15, 23, 42, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
}

[data-bs-theme="dark"] .modal-content {
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.08) !important;
}

.modal-header {
  border-top-left-radius: 18px !important;
  border-top-right-radius: 18px !important;
  background: rgba(248, 250, 252, 0.85) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7) !important;
}

[data-bs-theme="dark"] .modal-header {
  background: rgba(30, 30, 45, 0.85) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

/* Clay Button tactile style */
.btn-clay-primary {
  background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%) !important;
  color: #ffffff !important;
  border: 1px solid #60A5FA !important;
  border-radius: 20px !important;
  padding: 6px 18px !important;
  font-weight: 700 !important;
  box-shadow: 
    0 4px 10px rgba(37, 99, 235, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.4),
    inset 0 -1px 2px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.2s ease !important;
}

.btn-clay-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 
    0 6px 16px rgba(37, 99, 235, 0.4),
    inset 0 1px 2px rgba(255, 255, 255, 0.5) !important;
  color: #ffffff !important;
}

.btn-clay-primary:active {
  transform: translateY(1px) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

/* ---------------------------------------------------------------- */
/* 8. CLAYMORPHIC CALENDAR EVENT STRIPS                             */
/* ---------------------------------------------------------------- */
.fc .fc-event {
  border-radius: 8px !important;
  border: none !important;
  padding: 3px 6px !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.12) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.fc .fc-event:hover {
  transform: scale(1.03) !important;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2) !important;
  z-index: 100 !important;
}

/* ---------------------------------------------------------------- */
/* 9. LUXURY WHITE & ROYAL BLUE DYNAMIC EDC BACKGROUND              */
/* ---------------------------------------------------------------- */
.login-stage-white-blue {
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #F8FAFC;
  background-image: 
    radial-gradient(at 15% 15%, rgba(37, 99, 235, 0.15) 0px, transparent 45%),
    radial-gradient(at 85% 85%, rgba(6, 182, 212, 0.12) 0px, transparent 50%),
    radial-gradient(at 50% 10%, rgba(59, 130, 246, 0.08) 0px, transparent 60%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Atmospheric Luminous Orbs (Dynamic Floating Aura Glow) */
.login-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.82;
  will-change: transform, opacity;
}

/* Pojok Kiri Atas: Royal Blue Luminous Orb (Pulsing & Floating) */
.login-bg-orb-1 {
  width: 650px;
  height: 650px;
  top: -160px;
  left: -120px;
  background: radial-gradient(circle at 35% 35%, #3B82F6 0%, #2563EB 35%, #1D4ED8 65%, rgba(29, 78, 216, 0) 78%);
  animation: floatOrbTopLeft 14s ease-in-out infinite alternate;
}

/* Pojok Kanan Bawah: Cyan & Electric Blue Luminous Orb (Pulsing & Floating) */
.login-bg-orb-2 {
  width: 580px;
  height: 580px;
  bottom: -130px;
  right: -90px;
  background: radial-gradient(circle at 40% 40%, #22D3EE 0%, #06B6D4 35%, #0284C7 65%, rgba(2, 132, 199, 0) 78%);
  animation: floatOrbBottomRight 16s ease-in-out infinite alternate;
}

/* Aksen Titik Tengah Mengambang */
.login-bg-orb-3 {
  width: 420px;
  height: 420px;
  top: 35%;
  left: 60%;
  background: radial-gradient(circle, #60A5FA 0%, rgba(96, 165, 250, 0.4) 45%, rgba(96, 165, 250, 0) 72%);
  animation: floatOrbCenter 18s ease-in-out infinite alternate;
}

/* Animasi Khusus Pojok Kiri Atas */
@keyframes floatOrbTopLeft {
  0% {
    transform: translate(0px, 0px) scale(1) rotate(0deg);
    opacity: 0.75;
  }
  35% {
    transform: translate(90px, 60px) scale(1.18) rotate(45deg);
    opacity: 0.95;
  }
  70% {
    transform: translate(40px, 120px) scale(0.95) rotate(90deg);
    opacity: 0.7;
  }
  100% {
    transform: translate(-30px, 70px) scale(1.12) rotate(140deg);
    opacity: 0.88;
  }
}

/* Animasi Khusus Pojok Kanan Bawah */
@keyframes floatOrbBottomRight {
  0% {
    transform: translate(0px, 0px) scale(1) rotate(0deg);
    opacity: 0.72;
  }
  40% {
    transform: translate(-80px, -70px) scale(1.22) rotate(-60deg);
    opacity: 0.92;
  }
  75% {
    transform: translate(-120px, -20px) scale(0.9) rotate(-110deg);
    opacity: 0.68;
  }
  100% {
    transform: translate(-40px, -90px) scale(1.15) rotate(-160deg);
    opacity: 0.85;
  }
}

/* Animasi Aksen Tengah */
@keyframes floatOrbCenter {
  0% { transform: translate(0px, 0px) scale(0.9); opacity: 0.4; }
  50% { transform: translate(-60px, 50px) scale(1.15); opacity: 0.65; }
  100% { transform: translate(40px, -40px) scale(0.85); opacity: 0.35; }
}

/* ---------------------------------------------------------------- */
/* ACCESSIBILITY & LOW-END PC SAFEGUARD (Zero-GPU Fallback)         */
/* If user system enables battery saver or reduces animations        */
/* ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .login-bg-orb-1,
  .login-bg-orb-2,
  .login-bg-orb-3 {
    animation: none !important;
    opacity: 0.8 !important;
  }
}


/* White Floating Form Card with Breathing Electric Cyan & Royal Blue LED Halo */
@keyframes ledBlueBreathe {
  0%, 100% {
    box-shadow: 
      0 0 0 1.5px rgba(6, 182, 212, 0.55),
      0 0 22px 3px rgba(37, 99, 235, 0.32),
      0 0 55px 10px rgba(6, 182, 212, 0.2),
      0 35px 80px -20px rgba(15, 23, 42, 0.22),
      inset 0 1.5px 3px rgba(255, 255, 255, 1);
    border-color: rgba(56, 189, 248, 0.7);
  }
  50% {
    box-shadow: 
      0 0 0 2px rgba(37, 99, 235, 0.85),
      0 0 35px 8px rgba(37, 99, 235, 0.52),
      0 0 80px 18px rgba(6, 182, 212, 0.35),
      0 40px 90px -20px rgba(15, 23, 42, 0.26),
      inset 0 1.5px 4px rgba(255, 255, 255, 1);
    border-color: rgba(6, 182, 212, 0.95);
  }
}

.login-center-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  background: #ffffff !important;
  border-radius: 28px !important;
  border: 1.5px solid rgba(56, 189, 248, 0.7) !important;
  animation: ledBlueBreathe 3.5s ease-in-out infinite;
  overflow: hidden !important;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-center-card > * {
  position: relative;
  z-index: 2;
}

.login-center-card:hover {
  transform: translateY(-4px);
}

/* ---------------------------------------------------------------- */
/* DECORATIVE AMBIENT FX LAYER FOR LOGIN FORM CARD                  */
/* Soft blue-cyan radial corner gradients + 5x5 subtle pulse grids  */
/* ---------------------------------------------------------------- */
.login-card-fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1; /* Sits behind form content (z-index: 2) */
  overflow: hidden;
  border-radius: inherit;
}

/* Corner Radial Gradients: top-left & top-right (~20-30% area) */
.login-corner-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(28px);
  opacity: 0.32;
  transition: opacity 0.5s ease;
}

.login-corner-tl {
  top: -60px;
  left: -60px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.55) 0%, rgba(37, 99, 235, 0.3) 50%, transparent 72%);
  animation: floatCornerGlowTL 10s ease-in-out infinite alternate;
}

.login-corner-br {
  bottom: -60px;
  right: -60px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.5) 0%, rgba(6, 182, 212, 0.35) 50%, transparent 72%);
  animation: floatCornerGlowBR 12s ease-in-out infinite alternate;
}

@keyframes floatCornerGlowTL {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.28;
  }
  50% {
    transform: translate(18px, 14px) scale(1.08);
    opacity: 0.42;
  }
  100% {
    transform: translate(-10px, 8px) scale(0.96);
    opacity: 0.30;
  }
}

@keyframes floatCornerGlowBR {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.30;
  }
  50% {
    transform: translate(-16px, -12px) scale(1.1);
    opacity: 0.44;
  }
  100% {
    transform: translate(8px, 10px) scale(0.95);
    opacity: 0.32;
  }
}

/* 5x5 Decorative Dot Grids */
.login-dot-grid {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

/* Top-Right (Beside Heading area - shifted slightly down & further toward center) */
.login-dot-grid-tr {
  top: 88px;
  right: 72px;
}

/* Bottom-Left (Near Login Button area - shifted slightly up) */
.login-dot-grid-bl {
  bottom: 125px;
  left: 24px;
}

/* Dots Color Palette: PLN Blue, Cyan, Subtle Yellow Accents */
.login-dot-grid .dot-b {
  fill: #2563EB; /* PLN Royal Blue */
  opacity: 0.22;
}

.login-dot-grid .dot-c {
  fill: #06B6D4; /* Vibrant Cyan */
  opacity: 0.26;
}

.login-dot-grid .dot-y {
  fill: #FFC91D; /* PLN Yellow Accent */
  opacity: 0.38;
}

/* Gentle Staggered Pulse for 5x5 Dot Grids */
@keyframes dotGridPulse {
  0%, 100% {
    transform: scale(1);
    opacity: var(--dot-base-op, 0.24);
  }
  50% {
    transform: scale(1.35);
    opacity: calc(var(--dot-base-op, 0.24) + 0.32);
  }
}

.login-dot-grid circle {
  transform-origin: center;
  transform-box: fill-box;
  animation: dotGridPulse 4s ease-in-out infinite;
}

.login-dot-grid .dot-b { --dot-base-op: 0.20; }
.login-dot-grid .dot-c { --dot-base-op: 0.24; }
.login-dot-grid .dot-y { --dot-base-op: 0.36; }

/* Staggered phases */
.login-dot-grid .dot-p1 { animation-delay: 0s; }
.login-dot-grid .dot-p2 { animation-delay: 0.8s; }
.login-dot-grid .dot-p3 { animation-delay: 1.6s; }
.login-dot-grid .dot-p4 { animation-delay: 2.4s; }
.login-dot-grid .dot-p5 { animation-delay: 3.2s; }

/* Dark mode adjustment for subtle ambient visibility */
[data-bs-theme="dark"] .login-corner-tl,
[data-bs-theme="dark"] .login-corner-br {
  opacity: 0.22;
}
[data-bs-theme="dark"] .login-dot-grid {
  opacity: 0.45;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .login-corner-tl,
  .login-corner-br {
    animation: none !important;
    transform: none !important;
  }
  .login-dot-grid circle {
    animation: none !important;
    transform: none !important;
  }
}

/* Ocamba Frosted Glass Brand Hub */
.ocamba-brand-hub {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(223, 232, 244, 0.85) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 14px 28px -6px rgba(106, 150, 209, 0.22),
    0 2px 8px rgba(144, 177, 219, 0.18),
    inset 0 2px 4px rgba(255, 255, 255, 1),
    inset 0 -2px 4px rgba(144, 177, 219, 0.1);
  margin-bottom: 16px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

/* Ambient Radial Micro-Aura di Belakang Logo */
.ocamba-brand-hub::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 24px;
  background: radial-gradient(circle, rgba(144, 177, 219, 0.35) 0%, rgba(106, 150, 209, 0.15) 60%, transparent 80%);
  z-index: -1;
  opacity: 0.85;
  filter: blur(8px);
  transition: opacity 0.3s ease;
}

.ocamba-brand-hub:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 20px 36px -8px rgba(106, 150, 209, 0.28),
    0 4px 14px rgba(144, 177, 219, 0.25),
    inset 0 2px 5px rgba(255, 255, 255, 1);
}

.ocamba-brand-hub:hover::before {
  opacity: 1;
}

.ocamba-brand-hub img.edc-brand-logo {
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.08));
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.ocamba-brand-hub:hover img.edc-brand-logo {
  transform: scale(1.01);
}

.ocamba-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(223, 232, 244, 0.8);
  border: 1px solid rgba(183, 203, 231, 0.9);
  font-size: 11px;
  font-weight: 700;
  color: #4853E5;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(106, 150, 209, 0.08);
}

/* Luxury Editorial Typography with 3D Crystal Glass & Ocamba Palette Flow */
@keyframes textShimmerFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.login-title-lux {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  background: linear-gradient(
    90deg, 
    #1E293B 0%, 
    #4853E5 28%, 
    #6A96D1 45%, 
    #90B1DB 52%, 
    #4853E5 72%, 
    #1E293B 100%
  );
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  animation: textShimmerFlow 7s ease-in-out infinite;
  will-change: background-position;
  /* 3D Crystal Glass Emboss with Ocamba Soft Depth */
  filter: 
    drop-shadow(0 1px 0px rgba(255, 255, 255, 0.95))
    drop-shadow(0 -1px 0px rgba(255, 255, 255, 0.8))
    drop-shadow(0 2px 4px rgba(106, 150, 209, 0.3))
    drop-shadow(0 8px 16px rgba(15, 23, 42, 0.1))
    drop-shadow(0 0 10px rgba(144, 177, 219, 0.3));
  transform: translateZ(0);
}

.login-subtitle-lux {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 5px 14px;
  background: rgba(223, 232, 244, 0.7);
  border-radius: 12px;
  border: 1px solid rgba(183, 203, 231, 0.85);
  margin-bottom: 1.75rem;
}

.login-subtitle-lux .sub-accent-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4853E5;
  box-shadow: 0 0 8px #4853E5;
}

/* Input Group with Metronic KeenIcon Integrations (Ocamba Frosted Style) */
.login-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 16px;
  pointer-events: none;
  color: #90B1DB;
  transition: color 0.2s ease;
  z-index: 2;
}

.login-field {
  height: 52px;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1.5px solid #B7CBE7 !important;
  font-weight: 600;
  font-size: 13.5px;
  color: #1E293B;
  box-shadow: inset 0 2px 4px rgba(106, 150, 209, 0.05) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}

.login-field.has-icon-left {
  padding-left: 46px !important;
}

.login-input-group:focus-within .login-input-icon {
  color: #4853E5;
}

.login-field:focus {
  background: #ffffff !important;
  border-color: #4853E5 !important;
  box-shadow: 
    0 0 0 4px rgba(72, 83, 229, 0.15),
    0 6px 18px rgba(106, 150, 209, 0.12) !important;
}

/* High-Contrast Primary Button: #4853E5 (Ocamba Primary Accent) */
.btn-login-royal {
  height: 52px;
  background: linear-gradient(135deg, #4853E5 0%, #3B46D6 100%) !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  border-radius: 14px !important;
  border: 1px solid #5C67ED !important;
  box-shadow: 
    0 12px 26px -4px rgba(72, 83, 229, 0.45),
    inset 0 1px 2px rgba(255, 255, 255, 0.45) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease !important;
}

.btn-login-royal:hover {
  transform: translateY(-2px) !important;
  background: linear-gradient(135deg, #515DF0 0%, #434EE0 100%) !important;
  box-shadow: 
    0 18px 34px -4px rgba(72, 83, 229, 0.55),
    inset 0 1px 2px rgba(255, 255, 255, 0.6) !important;
  color: #ffffff !important;
}

.btn-login-royal:active {
  transform: translateY(1px) !important;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.25) !important;
}

/* Button Loading / Submitting State (Metronic indicator-progress) */
.btn-login-royal .indicator-progress {
  display: none;
}
.btn-login-royal.is-loading {
  pointer-events: none;
  opacity: 0.88;
}
.btn-login-royal.is-loading .indicator-label {
  display: none !important;
}
.btn-login-royal.is-loading .indicator-progress {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}

/* Staggered Entrance Reveal Keyframes */
@keyframes loginFadeUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-reveal-step {
  animation: loginFadeUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  will-change: transform, opacity;
}

.login-reveal-1 {
  animation-delay: 0.15s;
}

.login-reveal-2 {
  animation-delay: 0.45s;
}

.login-reveal-3 {
  animation-delay: 0.75s;
}

.login-reveal-4 {
  animation-delay: 1.0s;
}

.login-reveal-5 {
  animation-delay: 1.25s;
}

/* Shake Animation on Validation / Auth Error */
@keyframes loginShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.login-shake {
  animation: loginShake 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
}

@media (prefers-reduced-motion: reduce) {
  .login-reveal-step {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .login-shake {
    animation: none !important;
  }
}

/* Demo Role Chip (Enhanced Bento Interactive Pills) */
.role-demo-chip {
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.9);
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.role-demo-chip:hover {
  background: #ffffff;
  color: #4853E5;
  border-color: #B7CBE7;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -2px rgba(106, 150, 209, 0.25);
}

.role-demo-chip:active {
  transform: translateY(0);
}

/* ---------------------------------------------------------------- */
/* 10. OCAMBA DASHBOARD HERO CAPSULE                               */
/* ---------------------------------------------------------------- */

/* Ocamba Hero Floating Filter Capsule Bar */
.ocamba-hero-bar {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-radius: 20px !important;
  border: 1px solid rgba(226, 232, 240, 0.85) !important;
  box-shadow: 
    0 16px 36px -8px rgba(15, 23, 42, 0.08),
    inset 0 1px 2px rgba(255, 255, 255, 1) !important;
}

[data-bs-theme="dark"] .ocamba-hero-bar {
  background: rgba(30, 30, 45, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.4) !important;
}

/* Ocamba Bento KPI Stat Pod */
.kpi-ocamba-pod,
.kpi-clay-card {
  border-radius: 22px !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  background: #ffffff !important;
  box-shadow: 
    0 14px 30px -6px rgba(15, 23, 42, 0.06),
    0 6px 12px -4px rgba(15, 23, 42, 0.03),
    inset 0 1.5px 2px rgba(255, 255, 255, 1) !important;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative;
  overflow: hidden;
}

.kpi-ocamba-pod:hover,
.kpi-clay-card:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 24px 44px -10px rgba(15, 23, 42, 0.12),
    0 10px 18px -4px rgba(37, 99, 235, 0.08),
    inset 0 2px 4px rgba(255, 255, 255, 1) !important;
}

[data-bs-theme="dark"] .kpi-ocamba-pod,
[data-bs-theme="dark"] .kpi-clay-card {
  background: #1e1e2d !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 14px 30px -6px rgba(0, 0, 0, 0.4) !important;
}

/* Ocamba Feed Item Floating Pill */
.ocamba-feed-item {
  background: rgba(248, 250, 252, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 14px;
  padding: 10px 14px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ocamba-feed-item:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -4px rgba(37, 99, 235, 0.12);
  border-color: #93C5FD;
}

[data-bs-theme="dark"] .ocamba-feed-item {
  background: rgba(30, 30, 45, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .ocamba-feed-item:hover {
  background: rgba(30, 30, 45, 0.95);
  border-color: #2563EB;
}

/* ---------------------------------------------------------------- */
/* 11. UI/UX PRO MAX: DUAL-TONE LUXURY FORM & CRISP INPUT CONTROLS   */
/* ---------------------------------------------------------------- */

/* Global Enhancement: Automatically style all standard card forms */
form.card,
.card > form,
form .card,
.form-card-luxury {
  background: #ffffff !important;
  border-radius: 20px !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 
    0 16px 36px -8px rgba(15, 23, 42, 0.07),
    0 4px 12px rgba(37, 99, 235, 0.03),
    inset 0 1px 2px rgba(255, 255, 255, 1) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  overflow: hidden;
}

[data-bs-theme="dark"] form.card,
[data-bs-theme="dark"] .card > form,
[data-bs-theme="dark"] form .card,
[data-bs-theme="dark"] .form-card-luxury {
  background: #1e1e2d !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.4) !important;
}

/* Global Form Headers */
form.card .card-header,
form .card .card-header,
.form-card-luxury .card-header {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(255, 255, 255, 0.6) 100%) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85) !important;
  padding: 18px 24px !important;
}

[data-bs-theme="dark"] form.card .card-header,
[data-bs-theme="dark"] form .card .card-header,
[data-bs-theme="dark"] .form-card-luxury .card-header {
  background: linear-gradient(180deg, rgba(30, 30, 45, 0.95) 0%, rgba(30, 30, 45, 0.5) 100%) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

/* Global Form Footers */
form.card .card-footer,
form .card .card-footer,
.form-card-luxury .card-footer {
  background: rgba(248, 250, 252, 0.75) !important;
  border-top: 1px solid rgba(226, 232, 240, 0.85) !important;
  padding: 16px 24px !important;
}

[data-bs-theme="dark"] form.card .card-footer,
[data-bs-theme="dark"] form .card .card-footer,
[data-bs-theme="dark"] .form-card-luxury .card-footer {
  background: rgba(30, 30, 45, 0.75) !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* Form Section Divider Block */
.form-section-block {
  background: #F8FAFC;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  padding: 18px 20px;
  position: relative;
  transition: all 0.2s ease;
}

.form-section-block:hover {
  border-color: rgba(147, 197, 253, 0.8);
  background: #ffffff;
  box-shadow: 0 6px 16px -3px rgba(15, 23, 42, 0.04);
}

[data-bs-theme="dark"] .form-section-block {
  background: rgba(30, 30, 45, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .form-section-block:hover {
  background: rgba(30, 30, 45, 0.95);
  border-color: rgba(37, 99, 235, 0.4);
}

.form-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #2563EB;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Global Crisp Input Field Replacement */
.form-control,
.form-select,
.form-control-solid,
.form-select-solid {
  background-color: #ffffff !important;
  border: 1.5px solid #CBD5E1 !important;
  border-radius: 10px !important;
  color: #0F172A !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 9px 14px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.form-control:focus,
.form-select:focus,
.form-control-solid:focus,
.form-select-solid:focus {
  background-color: #ffffff !important;
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.15) !important;
  outline: none !important;
}

/* Readonly Input Styling */
input[readonly],
textarea[readonly],
.form-control[readonly],
.form-control-solid[readonly] {
  background-color: #F1F5F9 !important;
  border-color: #E2E8F0 !important;
  color: #64748B !important;
  cursor: not-allowed;
}

/* Select2 Container Sync */
.select2-container--bootstrap5 .select2-selection {
  background-color: #ffffff !important;
  border: 1.5px solid #CBD5E1 !important;
  border-radius: 10px !important;
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
}

.select2-container--bootstrap5.select2-container--focus .select2-selection,
.select2-container--bootstrap5.select2-container--open .select2-selection {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.15) !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .form-control-solid,
[data-bs-theme="dark"] .form-select-solid,
[data-bs-theme="dark"] .select2-container--bootstrap5 .select2-selection {
  background-color: #151521 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #F8FAFC !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus,
[data-bs-theme="dark"] .form-control-solid:focus,
[data-bs-theme="dark"] .form-select-solid:focus,
[data-bs-theme="dark"] .select2-container--bootstrap5.select2-container--focus .select2-selection,
[data-bs-theme="dark"] .select2-container--bootstrap5.select2-container--open .select2-selection {
  border-color: #3B82F6 !important;
  box-shadow: 0 0 0 3.5px rgba(59, 130, 246, 0.25) !important;
}

[data-bs-theme="dark"] input[readonly],
[data-bs-theme="dark"] textarea[readonly],
[data-bs-theme="dark"] .form-control[readonly],
[data-bs-theme="dark"] .form-control-solid[readonly] {
  background-color: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #94A3B8 !important;
}

/* Side Info Companion Card */
.form-companion-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 20px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05);
}

[data-bs-theme="dark"] .form-companion-card {
  background: #1e1e2d;
  border-color: rgba(255, 255, 255, 0.08);
}

/* Telegram Real-Time Incident Stacked Toast Animation (Emil Motion Principle) */
@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast-item {
  transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1), opacity 180ms ease-out;
}

#tg_toast_stack_container {
  pointer-events: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(241, 65, 108, 0.3) transparent;
}

#tg_toast_stack_container::-webkit-scrollbar {
  width: 6px;
}

/* ---------------------------------------------------------------- */
/* 12. EMIL DESIGN ENG & UI/UX PRO MAX FORM & TABLE POLISH         */
/* ---------------------------------------------------------------- */

/* Tactile Active feedback for Action Buttons */
.btn-primary:active,
.btn-light-primary:active,
.btn-light:active,
.btn-danger:active {
  transform: scale(0.98) !important;
  transition: transform 100ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Subtle Row Hover Tracking in High-Density Grids */
.table-hover-accent tbody tr {
  transition: background-color 150ms ease-out;
}

.table-hover-accent tbody tr:hover td {
  background-color: rgba(241, 245, 249, 0.65) !important;
}

[data-bs-theme="dark"] .table-hover-accent tbody tr:hover td {
  background-color: rgba(30, 41, 59, 0.5) !important;
}

/* Metronic Input-Group Seamless Search Bar */
.input-group.input-group-sm .input-group-text {
  border-radius: 10px 0 0 10px !important;
  transition: border-color 150ms ease-out;
}

.input-group.input-group-sm input#transfer_search_input {
  border-radius: 0 10px 10px 0 !important;
  transition: all 150ms ease-out;
}

.input-group.input-group-sm:focus-within .input-group-text,
.input-group.input-group-sm:focus-within input#transfer_search_input {
  border-color: #3B82F6 !important;
  background-color: #ffffff !important;
}

.input-group.input-group-sm:focus-within {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12) !important;
  border-radius: 10px !important;
}

/* UI UX Pro Max & Emil Kowalski: Icon & Input Optical Breathing Room */
.edc-input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.edc-input-icon-wrapper .input-leading-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 3;
  color: var(--bs-gray-500, #7e8299);
  line-height: 1;
}

.edc-input-icon-wrapper input.form-control {
  padding-left: 2.5rem !important;
  padding-right: 2.25rem !important;
}

/* ---------------------------------------------------------------- */
/* UI/UX PRO MAX: SEAMLESS AMBIENT VIDEO BACKGROUND FOR 4 PRIMARY KPIS */
/* Zero white gap below top accent border, stable geometry, Emil Kowalski polish */
/* ---------------------------------------------------------------- */
.kpi-ambient-card {
  position: relative;
  overflow: hidden !important;
}

.kpi-video-ambient-wrap {
  position: absolute;
  top: -1px; /* 1px extension beyond boundary to prevent subpixel rendering seams */
  right: 0;
  bottom: 0;
  left: 0;
  inset: -1px 0 0 0;
  width: 100%;
  height: calc(100% + 1px);
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  border-radius: 18px;
}

.kpi-ambient-video {
  position: absolute;
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  display: block;
  opacity: 0.55;
  filter: brightness(1) contrast(1);
  /* Hover may change only visual properties (opacity, filter), never size/position */
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  transform: none !important; /* No hover resize or movement */
  
  /* Smooth horizontal gradient mask: fades to transparent towards left text area */
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0.45) 55%, rgba(0, 0, 0, 0.9) 75%, #000000 100%);
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0.45) 55%, rgba(0, 0, 0, 0.9) 75%, #000000 100%);
}

.kpi-ambient-card:hover .kpi-ambient-video,
.kpi-ambient-card:focus-within .kpi-ambient-video {
  opacity: 0.85;
  filter: brightness(1.08) contrast(1.02);
  transform: none !important;
}

/* Ensure all card content sits cleanly above the ambient background */
.kpi-ambient-card .card-header,
.kpi-ambient-card .card-body {
  position: relative;
  z-index: 2;
  background: transparent !important;
}

/* Dark mode adjustment for optimal contrast */
[data-bs-theme="dark"] .kpi-ambient-video {
  opacity: 0.50;
  filter: brightness(0.95);
}
[data-bs-theme="dark"] .kpi-ambient-card:hover .kpi-ambient-video,
[data-bs-theme="dark"] .kpi-ambient-card:focus-within .kpi-ambient-video {
  opacity: 0.78;
  filter: brightness(1.05);
  transform: none !important;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .kpi-ambient-video {
    opacity: 0.40 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Specific vividness enhancement for Pullout Devices (Purple glass-ball) */
.kpi-pullout-ambient .kpi-ambient-video {
  opacity: 0.88; /* Clearly visible & vivid by default without hover */
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.95) 72%, #000000 100%);
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.95) 72%, #000000 100%);
}

.kpi-pullout-ambient:hover .kpi-ambient-video,
.kpi-pullout-ambient:focus-within .kpi-ambient-video {
  opacity: 1;
  filter: brightness(1.1);
  transform: none !important;
}

[data-bs-theme="dark"] .kpi-pullout-ambient .kpi-ambient-video {
  opacity: 0.82;
}

/* ---------------------------------------------------------------- */
/* Work Order Control Nav Button in Dashboard Tabs Header           */
/* Emil Kowalski tactile feedback & Metronic clean soft pill style  */
/* ---------------------------------------------------------------- */
.btn-schedule-control-nav {
  position: relative;
  border-radius: 8px;
  background-color: var(--bs-light-primary, #eff6ff) !important;
  border: 1px solid rgba(59, 130, 246, 0.18) !important;
  color: var(--bs-primary, #2563eb) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-schedule-control-nav:hover {
  background-color: #dbeafe !important;
  border-color: rgba(37, 99, 235, 0.35) !important;
  color: #1d4ed8 !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.btn-schedule-control-nav:hover .nav-arrow-icon {
  transform: translate(2px, -1px);
  color: #1d4ed8 !important;
}

.btn-schedule-control-nav .nav-arrow-icon {
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), color 0.18s ease;
}

.btn-schedule-control-nav:active {
  transform: scale(0.96) translateY(0);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08);
}

.btn-schedule-control-nav:focus-visible {
  outline: 2px solid #2563eb !important;
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- */
/* SLA Attention Watchlist & Visual Analytics Tabbed Card Layout     */
/* Emil Kowalski refined scroll physics & zero-gap flex expansion   */
/* ---------------------------------------------------------------- */
@media (min-width: 1200px) {
  .edc-analytics-card {
    height: var(--edc-analytics-card-height, 520px) !important;
    max-height: var(--edc-analytics-card-height, 520px) !important;
  }
}

@media (max-width: 1199.98px) {
  .edc-analytics-card {
    height: auto !important;
    min-height: 480px;
  }
}

.edc-tabbed-analytics-card .card-body,
.edc-proporsi-status-card .card-body {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding-bottom: 16px !important;
}

.edc-tabbed-analytics-card .tab-content {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.edc-tabbed-analytics-card .tab-pane {
  min-height: 0 !important;
}

.edc-tabbed-analytics-card .tab-pane.active {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 0% !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

.sla-watchlist-scroll-wrapper {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(203, 213, 225, 0.8) transparent;
  overscroll-behavior: contain;
}

.sla-watchlist-scroll-wrapper::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.sla-watchlist-scroll-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.sla-watchlist-scroll-wrapper::-webkit-scrollbar-thumb {
  background: rgba(203, 213, 225, 0.8);
  border-radius: 999px;
}

.sla-watchlist-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.9);
}

.sla-watchlist-scroll-wrapper thead tr th {
  box-shadow: inset 0 -1px 0 #e2e8f0;
}

/* ---------------------------------------------------------------- */
/* Unified ApexCharts Modern Tooltip Styling                        */
/* ui-ux-pro-max + Emil Kowalski fluid ergonomics & soft shadow     */
/* ---------------------------------------------------------------- */
.apexcharts-tooltip.apexcharts-theme-light,
.apexcharts-tooltip.apexcharts-theme-dark,
.apexcharts-tooltip.edc-unified-tooltip {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(12px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
  border: 1px solid rgba(203, 213, 225, 0.75) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.14), 0 4px 10px -2px rgba(15, 23, 42, 0.06) !important;
  color: #0F172A !important;
  padding: 0 !important;
  overflow: hidden !important;
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.12s ease !important;
  pointer-events: none !important;
}

/* Dark theme adaptation */
[data-bs-theme="dark"] .apexcharts-tooltip.apexcharts-theme-light,
[data-bs-theme="dark"] .apexcharts-tooltip.apexcharts-theme-dark,
[data-bs-theme="dark"] .apexcharts-tooltip.edc-unified-tooltip {
  background: rgba(30, 30, 45, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #F8FAFC !important;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.5) !important;
}

/* Tooltip card content container */
.edc-chart-tooltip-card {
  padding: 10px 14px;
  font-family: inherit;
  font-size: 11px;
  min-width: 190px;
  line-height: 1.4;
  color: #0F172A;
}

[data-bs-theme="dark"] .edc-chart-tooltip-card {
  color: #F1F5F9;
}

.edc-chart-tooltip-header {
  font-size: 12px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

[data-bs-theme="dark"] .edc-chart-tooltip-header {
  color: #F8FAFC;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.edc-chart-tooltip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 11px;
}

.edc-chart-tooltip-label {
  display: flex;
  align-items: center;
  color: #475569;
  font-weight: 500;
}

[data-bs-theme="dark"] .edc-chart-tooltip-label {
  color: #94A3B8;
}

.edc-chart-tooltip-value {
  font-weight: 700;
  color: #0F172A;
  margin-left: 12px;
}

[data-bs-theme="dark"] .edc-chart-tooltip-value {
  color: #F8FAFC;
}

.edc-chart-tooltip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
  display: inline-block;
}

/* Remove duplicate black axis tooltips */
.apexcharts-xaxistooltip,
.apexcharts-yaxistooltip {
  display: none !important;
}

/* ---------------------------------------------------------------- */
/* Operations Command Center Header Filters (Desktop Sizing & Alignment) */
/* ---------------------------------------------------------------- */
.command-center-card .command-filter-item {
  display: flex;
  align-items: center;
}

.command-center-card .command-filter-item label {
  white-space: nowrap;
  user-select: none;
  flex-shrink: 0;
}

@media (min-width: 992px) {
  .command-center-card .command-filter-item {
    flex-shrink: 0 !important;
  }

  /* Explicit ~190px width on desktop to prevent shrinking */
  .command-center-card .command-filter-item .command-filter-select,
  .command-center-card .command-filter-item .select2-container {
    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
    flex-shrink: 0 !important;
  }

  .command-center-card .command-filter-item .select2-container .select2-selection--single {
    width: 100% !important;
  }
}

/* SP Select2 dropdown expansion: clean readability without truncating branch names */
.sp-filter-select2-dropdown {
  min-width: 240px !important;
  z-index: 1050 !important;
}

.sp-filter-select2-dropdown .select2-results__option {
  white-space: nowrap;
  padding: 8px 14px;
}

/* ---------------------------------------------------------------- */
/* UI/UX PRO MAX: ACTIVITY FEED STATUS BADGES & LIVE FEED BADGE     */
/* Accessible soft tints, consistent dimensions, Emil Kowalski polish */
/* ---------------------------------------------------------------- */
.activity-feed-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 22px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  border-radius: 6px;
  border: 1px solid transparent;
  white-space: nowrap;
  letter-spacing: 0.01em;
  text-align: center;
}

/* OPEN: blue text with soft blue background */
.activity-feed-badge.badge-status-open {
  color: #1570EF !important;
  background-color: #EFF6FF !important;
  border-color: rgba(21, 112, 239, 0.18) !important;
}

[data-bs-theme="dark"] .activity-feed-badge.badge-status-open {
  color: #60A5FA !important;
  background-color: rgba(30, 64, 175, 0.22) !important;
  border-color: rgba(96, 165, 250, 0.25) !important;
}

/* Draft: slate-gray text with soft neutral-gray background */
.activity-feed-badge.badge-status-draft {
  color: #475569 !important;
  background-color: #F1F5F9 !important;
  border-color: rgba(100, 116, 139, 0.18) !important;
}

[data-bs-theme="dark"] .activity-feed-badge.badge-status-draft {
  color: #94A3B8 !important;
  background-color: rgba(51, 65, 85, 0.3) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
}

/* completed: green text with soft green background */
.activity-feed-badge.badge-status-completed {
  color: #059669 !important;
  background-color: #ECFDF5 !important;
  border-color: rgba(5, 150, 105, 0.18) !important;
}

[data-bs-theme="dark"] .activity-feed-badge.badge-status-completed {
  color: #34D399 !important;
  background-color: rgba(6, 95, 70, 0.25) !important;
  border-color: rgba(52, 211, 153, 0.25) !important;
}

/* In Progress / Active fallback */
.activity-feed-badge.badge-status-in-progress {
  color: #D97706 !important;
  background-color: #FFFBEB !important;
  border-color: rgba(217, 119, 6, 0.18) !important;
}

[data-bs-theme="dark"] .activity-feed-badge.badge-status-in-progress {
  color: #FBBF24 !important;
  background-color: rgba(180, 83, 9, 0.25) !important;
  border-color: rgba(251, 191, 36, 0.25) !important;
}

/* Live Feed badge: cyan/teal styling distinct from OPEN */
.badge-live-feed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 9px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  border-radius: 6px;
  color: #0891B2 !important;
  background-color: #ECFEFF !important;
  border: 1px solid rgba(8, 145, 178, 0.2) !important;
  letter-spacing: 0.02em;
}

[data-bs-theme="dark"] .badge-live-feed {
  color: #22D3EE !important;
  background-color: rgba(21, 94, 117, 0.3) !important;
  border-color: rgba(34, 211, 238, 0.25) !important;
}

/* Matching activity indicator dots */
.activity-dot-open {
  background-color: #1570EF !important;
}
.activity-dot-draft {
  background-color: #64748B !important;
}
.activity-dot-completed {
  background-color: #059669 !important;
}
.activity-dot-in-progress {
  background-color: #D97706 !important;
}

/* ---------------------------------------------------------------- */
/* Table Cell Image Safety Bounds (UI-UX Pro Max Table Integrity)   */
/* ---------------------------------------------------------------- */
.table td img {
  max-width: 100px;
  max-height: 100px;
}
.table td .rounded-circle img {
  max-width: 100% !important;
  max-height: 100% !important;
}

/* ---------------------------------------------------------------- */
/* Header Live Clock Capsule - Emil Kowalski & UI-UX Pro Max Polish */
/* Fluid scale, zoom-safe clamp, responsive layout & dark mode      */
/* ---------------------------------------------------------------- */
.header-clock-capsule {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  max-height: 38px;
  background-color: rgba(21, 112, 239, 0.05);
  border: 1px solid rgba(21, 112, 239, 0.18);
  border-radius: 9999px;
  white-space: nowrap;
  user-select: none;
  transition: all 180ms cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04);
}

.header-clock-capsule:hover {
  background-color: rgba(21, 112, 239, 0.08);
  border-color: rgba(21, 112, 239, 0.28);
}

.header-clock-time {
  font-family: var(--bs-font-monospace, monospace);
  font-size: clamp(0.8125rem, 0.75rem + 0.25vw, 0.9375rem);
  font-weight: 700;
  color: var(--bs-primary, #1570EF);
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.header-clock-divider {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: #94A3B8;
  opacity: 0.7;
}

.header-clock-date {
  font-size: clamp(0.75rem, 0.7rem + 0.2vw, 0.84rem);
  font-weight: 600;
  color: #334155;
  line-height: 1;
}

[data-bs-theme="dark"] .header-clock-capsule {
  background-color: rgba(62, 151, 255, 0.08);
  border-color: rgba(62, 151, 255, 0.22);
}

[data-bs-theme="dark"] .header-clock-capsule:hover {
  background-color: rgba(62, 151, 255, 0.12);
  border-color: rgba(62, 151, 255, 0.35);
}

[data-bs-theme="dark"] .header-clock-time {
  color: #60A5FA;
}

[data-bs-theme="dark"] .header-clock-divider {
  background-color: #64748B;
}

[data-bs-theme="dark"] .header-clock-date {
  color: #CBD5E1;
}

/* Sembunyikan tanggal jika layar mengecil / browser di-zoom in sangat besar */
@media (max-width: 1200px) {
  .header-clock-date-group {
    display: none !important;
  }
}


