/* VSudoTrans — Custom Styles (Unified with Landing Page Design System) */
:root {
  --sidebar-width: 256px;
  --sidebar-bg: #0b1120;
  --sidebar-hover: rgba(255, 255, 255, .07);
  --accent: #1d4ed8;
  --topbar-height: 60px;
  --page-bg: #f6f8fc;
  --surface: #ffffff;
  --surface-muted: #f1f5fb;
  --surface-subtle: #e9eff8;
  --surface-alt: #e2e8f0;
  --surface-hover: rgba(29, 78, 216, .07);
  --border-color: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-color: #0f172a;
  --text-heading: #0f172a;
  --muted-color: #64748b;
  --erp-tab-color: #475569;
  --topbar-bg: rgba(255, 255, 255, .86);
  --topbar-border: rgba(15, 23, 42, .08);
}

.min-w-0 {
  min-width: 0 !important;
}

html[data-bs-theme="dark"] {
  color-scheme: dark;
  --page-bg: #070b14;
  --surface: #0f172a;
  --surface-muted: #152036;
  --surface-subtle: #111a2e;
  --surface-alt: #1e293b;
  --surface-hover: rgba(59, 130, 246, .14);
  --border-color: #1e293b;
  --border-strong: #334155;
  --text-color: #e2e8f0;
  --text-heading: #f8fafc;
  --muted-color: #94a3b8;
  --erp-tab-color: #cbd5e1;
  --accent: #3b82f6;
  --topbar-bg: rgba(7, 11, 20, .84);
  --topbar-border: rgba(148, 163, 184, .14);
  --bs-body-bg: #070b14;
  --bs-body-color: #e2e8f0;
  --bs-secondary-bg: #152036;
  --bs-tertiary-bg: #111a2e;
  --bs-border-color: #1e293b;
  --bs-heading-color: #f8fafc;
}

/* ── Layout ───────────────────────────────────── */
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--page-bg);
  color: var(--text-color);
  font-size: .89rem;
  -webkit-font-smoothing: antialiased;
}

.wrapper {
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  min-height: 0;
  background-color: var(--sidebar-bg);
  background-image:
    radial-gradient(120% 35% at 15% 0%, rgba(29, 78, 216, .22) 0%, transparent 65%),
    radial-gradient(90% 30% at 90% 100%, rgba(2, 132, 199, .14) 0%, transparent 65%),
    linear-gradient(180deg, #0b1120 0%, #070b14 100%);
  border-right: 1px solid rgba(148, 163, 184, .14);
  box-shadow: 4px 0 24px -12px rgba(2, 6, 23, .45);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* nav-scroll: area menu yang bisa di-scroll */
.sidebar .nav-scroll {
  flex: 1 1 0;
  height: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, .28) transparent;
}

.sidebar .nav-scroll::-webkit-scrollbar {
  width: 5px;
}

.sidebar .nav-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, .28);
  border-radius: 999px;
}

.sidebar .nav-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-brand {
  position: relative;
  min-height: 60px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  background: linear-gradient(180deg, rgba(255, 255, 255, .03) 0%, rgba(255, 255, 255, 0) 100%);
  transition: background-color .18s ease;
}

.sidebar-brand:hover {
  background-color: rgba(255, 255, 255, .03);
}

.sidebar-company-name {
  font-size: .96rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
  color: #f8fafc;
  word-break: break-word;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: .62rem;
  border-radius: 10px;
  padding: .46rem .65rem;
  margin-bottom: 3px;
  font-size: .84rem;
  font-weight: 500;
  color: #cbd5e1 !important;
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.sidebar-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  background: rgba(148, 163, 184, .08);
  color: #94a3b8;
  flex-shrink: 0;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.sidebar-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar .nav-link:hover {
  background: var(--sidebar-hover);
  color: #ffffff !important;
}

.sidebar .nav-link:hover .sidebar-icon {
  background: rgba(59, 130, 246, .18);
  color: #60a5fa;
}

.sidebar .nav-link.active {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 8px 18px -6px rgba(29, 78, 216, .55);
}

.sidebar .nav-link.active .sidebar-icon {
  background: rgba(255, 255, 255, .18);
  color: #ffffff;
}

.sidebar .nav-link.has-active {
  background: rgba(59, 130, 246, .12);
  color: #f8fafc !important;
  font-weight: 600;
}

.sidebar .nav-link.has-active .sidebar-icon {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  color: #ffffff;
  box-shadow: 0 4px 10px -2px rgba(29, 78, 216, .45);
}

.sidebar .nav-link .bi-chevron-down {
  font-size: .72rem;
  opacity: .7;
  transition: transform .2s ease, opacity .2s ease;
}

.sidebar .nav-link[aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
  opacity: 1;
}

.sidebar .sidebar-section {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #64748b;
  padding: .85rem .7rem .3rem;
  margin-top: .15rem;
  user-select: none;
}

.sidebar .sidebar-tree {
  border-left: 1.5px solid rgba(148, 163, 184, .18);
  margin: 2px 0 6px 1.25rem;
  padding-left: .55rem;
}

.sidebar .sidebar-sub {
  position: relative;
  padding: .38rem .65rem !important;
  font-size: .81rem !important;
  border-radius: 8px;
  color: #94a3b8 !important;
}

.sidebar .sidebar-sub:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, .05);
}

.sidebar .sidebar-sub.active {
  background: rgba(56, 189, 248, .13);
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: inset 2.5px 0 0 #38bdf8;
}

.sidebar .sidebar-footer {
  flex-shrink: 0;
  padding: .55rem .65rem .65rem;
  border-top: 1px solid rgba(148, 163, 184, .12);
  background: rgba(7, 11, 20, .45);
}

.sidebar-footer-card {
  padding: .45rem .55rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(148, 163, 184, .14);
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  color: #ffffff;
  font-size: .74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px -2px rgba(29, 78, 216, .45);
}

.sidebar-user-role {
  font-size: .7rem;
  color: #94a3b8;
}

.sidebar-user-link {
  border-radius: 8px;
  padding: 2px 4px;
  margin: -2px -4px;
  transition: background .15s ease;
}

.sidebar-user-link:hover {
  background: rgba(255, 255, 255, .06);
}

.sidebar-logout-btn {
  border-radius: 8px;
  padding: 4px 8px;
  font-size: .8rem;
  line-height: 1.2;
}

/* Area konten: <main class="col-..."> dari halaman diberi margin sidebar.
   Class col-* halaman dinetralkan supaya <main> mengisi sisa lebar. */
.content-wrapper {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left .25s cubic-bezier(.4, 0, .2, 1), width .25s cubic-bezier(.4, 0, .2, 1);
}

@media (min-width: 992px) {
  html.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
  }

  html.sidebar-collapsed .content-wrapper {
    margin-left: 0;
    width: 100%;
  }
}

.content-main-row {
  flex: 1 1 auto;
  display: flex;
}

.wrapper>main,
.content-main-row>main {
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

/* ── Topbar (Frosted Glass Landing-Page Style) ─────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text-color);
  position: sticky;
  top: 0;
  z-index: 1030;
  flex-shrink: 0;
}

.topbar-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--text-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.topbar-icon-btn:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.topbar-divider {
  width: 1px;
  height: 22px;
  background: var(--border-color);
  margin: 0 .15rem;
  flex-shrink: 0;
}

.topbar-title-wrap {
  flex: 1 1 auto;
  overflow: hidden;
}

.topbar h6 {
  font-size: .96rem;
  font-weight: 700 !important;
  letter-spacing: -0.015em;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-pill {
  height: 36px;
  padding: 0 .75rem 0 .6rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--text-color);
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.topbar-pill:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}

.topbar-company-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .16);
  flex-shrink: 0;
}

.topbar-company-code {
  padding: .1rem .42rem;
  border-radius: 6px;
  font-size: .71rem;
  font-weight: 700;
  background: rgba(29, 78, 216, .1);
  color: var(--accent);
  letter-spacing: .02em;
}

html[data-bs-theme="dark"] .topbar-company-code {
  background: rgba(59, 130, 246, .2);
  color: #60a5fa;
}

.topbar-company-name {
  max-width: 165px;
  font-weight: 600;
}

.topbar-user-btn {
  height: 36px;
  padding: .2rem .55rem .2rem .25rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--text-color);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}

.topbar-user-btn:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}

.topbar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  color: #ffffff;
  font-size: .72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.topbar-user-meta {
  max-width: 135px;
  line-height: 1.15;
}

.topbar-user-name {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-heading);
}

.topbar-user-role {
  font-size: .68rem;
  color: var(--muted-color);
}

.topbar-dropdown {
  min-width: 230px;
  padding: .4rem;
  border-radius: 13px;
  border: 1px solid var(--border-color);
  background: var(--surface);
  box-shadow: 0 18px 42px -12px rgba(15, 23, 42, .18);
}

html[data-bs-theme="dark"] .topbar-dropdown {
  box-shadow: 0 20px 46px -12px rgba(0, 0, 0, .65);
}

.topbar-dropdown-header {
  padding: .35rem .65rem .25rem;
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted-color);
}

.topbar-dropdown .dropdown-item {
  border-radius: 8px;
  padding: .42rem .65rem;
  font-size: .82rem;
  font-weight: 500;
}

.topbar-company-item {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.topbar-item-code {
  padding: .08rem .38rem;
  border-radius: 5px;
  font-size: .69rem;
  font-weight: 700;
  background: var(--surface-muted);
  color: var(--muted-color);
  flex-shrink: 0;
}

.topbar-company-item.active .topbar-item-code {
  background: rgba(255, 255, 255, .22);
  color: #ffffff;
}

.flash-wrap {
  padding: .75rem 1rem 0;
}

/* ── Cards ────────────────────────────────────── */
.card {
  border: 1px solid var(--border-color);
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

.card-header {
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
}

.stat-card {
  border-radius: 10px;
}

.stat-card .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Tables ───────────────────────────────────── */
.table th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted-color);
  font-weight: 600;
}

.table td {
  vertical-align: middle;
}

.table-hover tbody tr:hover {
  background: var(--surface-muted);
}

/* Nilai kolom No pada grid: lebih ringkas dari teks sel agar kolom penomoran hemat ruang */
.table>tbody>tr>td:first-child.text-center.text-muted.small:not([colspan]) {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* ── Badges ───────────────────────────────────── */
.badge {
  font-size: .75rem;
  padding: .35em .65em;
}

/* ── Forms ────────────────────────────────────── */
.form-label {
  font-weight: 500;
  font-size: .85rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .2);
}

.form-control,
.form-select {
  background: var(--surface);
  border-color: var(--border-color);
  color: var(--text-color);
}

/* ── Auth pages ───────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--sidebar-hover) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  border-radius: 14px;
  border: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
}

.auth-logo-img {
  height: 72px;
  width: auto;
  object-fit: contain;
}

/* ── Dark mode toggle ─────────────────────────── */
.dark-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: .8rem;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.dark-toggle:hover {
  background: var(--border-color);
}

.dark-toggle i {
  pointer-events: none;
}

.sidebar-theme-toggle {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .2);
}

.sidebar-theme-toggle:hover {
  background: rgba(255, 255, 255, .15);
}

/* ── Responsive sidebar ───────────────────────── */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .content-wrapper {
    margin-left: 0;
    width: 100%;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 1039;
  }

  .sidebar-overlay.show {
    display: block;
  }
}

/* ── Misc ─────────────────────────────────────── */
.cursor-pointer {
  cursor: pointer;
}

.fs-7 {
  font-size: .8rem;
}

.avatar-sm {
  width: 32px;
  height: 32px;
}

/* Clear keyboard focus, refined surface hierarchy, and compact mobile spacing. */
:focus-visible {
  outline: 3px solid #80bdff;
  outline-offset: 2px;
}

.vst-ai-input:focus,
.vst-ai-input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.using-keyboard :focus:not(:focus-visible) {
  outline: none;
}

.topbar {
  box-shadow: 0 1px 3px rgba(16, 24, 40, .04);
}

.content-main-row>main {
  padding: 1.25rem !important;
}

.card {
  border-radius: 10px;
}

.table-responsive {
  border-radius: 8px;
}

.btn,
.form-control,
.form-select {
  border-radius: 7px;
}

.topbar h6 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .content-main-row>main {
    padding: .75rem !important;
  }

  .topbar {
    padding-inline: .75rem !important;
  }

  .topbar h6 {
    font-size: .9rem;
  }

  .flash-wrap {
    padding: .5rem .75rem 0;
  }

  .erp-filter-bar>[class*="col-6"]:not(.erp-filter-actions),
  .rutes-filter-bar>[class*="col-6"]:not(.rutes-filter-actions):not(.erp-filter-actions) {
    width: 100%;
    flex: 0 0 auto;
  }

  .vst-pagination-controls {
    width: 100%;
    justify-content: space-between !important;
  }

  .vst-pagination-controls .pagination {
    flex-wrap: wrap;
    row-gap: .25rem;
  }
}

/* ─── Desktop ERP Tabbed & Grouped Interface (DevExpress / Desktop Style) ─── */
.erp-window-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

/* Document Tabs Bar (Top level) */
.erp-doc-tabbar {
  display: flex;
  align-items: flex-end;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border-strong);
  padding: 6px 8px 0 8px;
  gap: 3px;
  position: relative;
}

.erp-doc-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--erp-tab-color);
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  border-bottom: none;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  white-space: nowrap;
}

.erp-doc-tab:hover {
  background: var(--surface-muted);
  color: var(--text-color);
}

.erp-doc-tab.active {
  background: var(--surface);
  color: var(--text-heading);
  font-weight: 600;
  border-bottom: 1px solid var(--surface);
  margin-bottom: -1px;
  z-index: 2;
}

.erp-doc-tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  color: var(--muted-color);
  text-decoration: none;
  margin-left: 4px;
  cursor: pointer;
}

.erp-doc-tab-close:hover {
  background: var(--border-strong);
  color: #dc3545;
}

.erp-doc-window-close {
  margin-left: auto;
  color: var(--muted-color);
  font-size: 18px;
  line-height: 1;
  padding: 2px 8px 6px 8px;
  text-decoration: none;
  cursor: pointer;
}

.erp-doc-window-close:hover {
  color: #dc3545;
}

/* Sub-Tabs (Detail, Sopir/Kernet/Montir, Pembayaran, etc.) */
.erp-sub-tabs {
  display: flex;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border-strong);
  padding: 8px 12px 0 12px;
  gap: 3px;
  margin-bottom: 0;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.erp-sub-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  color: var(--erp-tab-color);
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  font-size: 0.81rem;
  font-weight: 500;
  padding: 5px 14px;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  margin-bottom: -1px;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
}

.erp-sub-tabs .nav-link .badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  line-height: 1;
  border-radius: 3px;
}

.erp-sub-tabs .nav-link:hover {
  background: var(--surface);
  color: var(--text-color);
}

.erp-sub-tabs .nav-link.active {
  background: var(--surface);
  color: var(--text-heading);
  font-weight: 600;
  border-bottom: 1px solid var(--surface);
  z-index: 2;
}

/* Content Body */
.erp-content-body {
  background: var(--surface);
  padding: 14px 16px;
  border-top: none;
}

/* ERP Panels / Group Boxes */
.rnt-panel {
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: var(--surface);
  margin-bottom: 10px;
}

.rnt-panel-header {
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border-strong);
  padding: 5px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-color);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.rnt-panel-header .rnt-header-action,
.rnt-panel .rnt-header-action {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  font-size: 0.875em;
  font-weight: 400;
  line-height: 1.4;
  color: var(--bs-link-color, var(--accent));
  text-decoration: none;
  cursor: pointer;
}

.rnt-panel-header .rnt-header-action.text-danger,
.rnt-panel .rnt-header-action.text-danger {
  color: var(--bs-danger, #dc3545);
}

.rnt-panel-header .rnt-header-action.text-muted,
.rnt-panel .rnt-header-action.text-muted {
  color: var(--muted-color);
}

.rnt-panel-header .rnt-header-action:hover:not(:disabled),
.rnt-panel .rnt-header-action:hover:not(:disabled) {
  text-decoration: underline;
}

.rnt-panel-header .rnt-header-action:disabled,
.rnt-panel .rnt-header-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.rnt-panel-body {
  padding: 10px;
}

/* Form Rows & Labels */
.rnt-row {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.rnt-row:last-child {
  margin-bottom: 0;
}

.rnt-label {
  width: 165px;
  flex-shrink: 0;
  font-size: 0.82rem;
  color: var(--text-color);
  font-weight: 500;
  padding-right: 8px;
}

.rnt-field {
  flex: 1 1 auto;
  min-width: 0;
}

.rnt-field .form-control-sm,
.rnt-field .form-select-sm {
  font-size: 0.82rem;
  height: calc(1.5em + 0.5rem + 2px);
  padding: 0.25rem 0.5rem;
  border-radius: 2px;
  border: 1px solid var(--border-strong);
}

.rnt-field .input-group-sm>.input-group-text {
  font-size: 0.82rem;
  height: calc(1.5em + 0.5rem + 2px);
  padding: 0.25rem 0.55rem;
  border-radius: 0;
  border: 1px solid var(--border-strong);
  background: var(--surface-muted);
  color: var(--text-color);
}

.rnt-field .input-group-sm>.input-group-text:first-child {
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
}

.rnt-field .input-group-sm>.input-group-text:last-child {
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
}

.rnt-field .input-group-sm>.form-control-sm:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.rnt-field .input-group-sm>.form-control-sm:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.rnt-field textarea.form-control-sm,
.rnt-field textarea.form-control {
  height: auto;
  min-height: 80px;
}

.rnt-field .form-control-sm:focus,
.rnt-field .form-select-sm:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.2);
}

.rnt-field .ts-control {
  min-height: calc(1.5em + 0.5rem + 2px);
  padding: 0.2rem 0.5rem;
  font-size: 0.82rem;
  border-radius: 2px;
  border: 1px solid var(--border-strong);
}

.ts-wrapper.form-select-sm .ts-control {
  min-height: calc(1.5em + 0.5rem + 2px);
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.ts-wrapper.is-invalid .ts-control,
.is-invalid+.ts-wrapper .ts-control {
  border-color: var(--bs-danger, #dc3545);
}

.ts-dropdown {
  z-index: 1065;
}

.ts-dropdown .option[data-disabled],
.ts-dropdown .option.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background-color: var(--surface-muted);
  color: var(--muted-color);
}

.rnt-tabs {
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
}

.rnt-tabs .nav-link {
  color: var(--erp-tab-color);
  background: var(--surface-muted);
  border: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-right: 4px;
  margin-bottom: -1px;
  font-size: .875rem;
  font-weight: 500;
  padding: .5rem 1rem;
  border-top-left-radius: .375rem;
  border-top-right-radius: .375rem;
}

.rnt-tabs .nav-link.active {
  color: var(--bs-link-color, var(--accent));
  background: var(--surface);
  font-weight: 600;
  border-bottom: 2px solid var(--surface);
  z-index: 2;
}

@media (max-width: 767.98px) {
  .erp-sub-tabs,
  .rnt-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .erp-sub-tabs::-webkit-scrollbar,
  .rnt-tabs::-webkit-scrollbar {
    display: none;
  }

  .erp-sub-tabs .nav-link,
  .rnt-tabs .nav-link {
    white-space: nowrap;
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .table-responsive table input.form-control:not([type="checkbox"]):not([type="radio"]):not(.tariff-seat-input):not(.reg-amount-input),
  .table-responsive table select.form-select:not(.ts-hidden-accessible),
  .table-responsive table .ts-wrapper {
    min-width: 115px;
  }

  .table-responsive table .tariff-seat-input {
    min-width: 72px;
  }

  .table-responsive table .reg-amount-group {
    min-width: 130px;
  }

  .table-responsive table .reg-amount-input {
    min-width: 78px;
  }

  .rnt-row {
    flex-direction: column;
    align-items: stretch;
  }

  .rnt-label {
    width: 100%;
    margin-bottom: .25rem;
  }

  .rnt-row>.rnt-field {
    width: 100%;
  }
}

/* ERP Grid Table */
.erp-grid-table {
  width: 100%;
  font-size: 0.81rem;
  border: 1px solid var(--border-strong);
  border-collapse: collapse;
}

.erp-grid-table th {
  background: var(--surface-muted);
  font-weight: 600;
  color: var(--text-color);
  border: 1px solid var(--border-strong);
  padding: 5px 8px;
  vertical-align: middle;
}

.erp-grid-table td {
  border: 1px solid var(--border-strong);
  padding: 4px 6px;
  vertical-align: middle;
}

.erp-grid-table tr:hover {
  background-color: var(--surface-hover);
}

.erp-grid-quick-add {
  background: var(--surface);
  color: var(--muted-color);
  cursor: pointer;
  font-style: italic;
  font-size: 0.8rem;
}

.erp-grid-quick-add:hover {
  background: var(--surface-hover);
  color: var(--bs-link-color, var(--accent));
}

/* Bottom status bar */
.erp-statusbar {
  border-top: 1px solid var(--border-strong);
  background: var(--surface-muted);
  padding: 3px 12px;
  font-size: 0.76rem;
  color: var(--erp-tab-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  width: 100%;
}

/* Rutes Index compact typography */
.rute-code-cell,
.rute-province-name {
  font-size: calc(1em - 1px);
}

.rute-city-name {
  font-size: 0.75rem;
}

.erp-filter-bar .form-select-sm,
.erp-filter-bar .input-group-sm>.form-control,
.erp-filter-bar .input-group-sm>.input-group-text,
.erp-filter-bar .btn-sm,
.rutes-filter-bar .form-select-sm,
.rutes-filter-bar .input-group-sm>.form-control,
.rutes-filter-bar .input-group-sm>.input-group-text,
.rutes-filter-bar .btn-sm {
  height: 31px;
}

.erp-filter-bar .ts-wrapper.form-select-sm,
.rutes-filter-bar .ts-wrapper.form-select-sm {
  padding: 0;
  min-height: 31px;
  height: 31px;
  background-position: right 0.65rem center;
}

.erp-filter-bar .ts-wrapper.form-select-sm .ts-control,
.rutes-filter-bar .ts-wrapper.form-select-sm .ts-control {
  height: 100%;
  min-height: 29px;
  padding: 0.2rem 2rem 0.2rem 0.5rem;
  flex-wrap: nowrap;
  overflow: hidden;
  align-items: center;
}

.erp-filter-bar .ts-wrapper.form-select-sm .ts-control>.item,
.rutes-filter-bar .ts-wrapper.form-select-sm .ts-control>.item {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .erp-filter-bar:not(.erp-filter-bar-wide) {
    flex-wrap: nowrap;
  }

  .erp-filter-bar:not(.erp-filter-bar-wide)>.erp-filter-q {
    flex: 1.45 1 0;
    min-width: 145px;
    width: auto;
    max-width: 100%;
  }

  .erp-filter-bar:not(.erp-filter-bar-wide)>.erp-filter-item {
    flex: 1 1 0;
    min-width: 112px;
    width: auto;
    max-width: 100%;
  }

  .erp-filter-bar:not(.erp-filter-bar-wide)>.erp-filter-status {
    flex: 0.75 1 0;
    min-width: 90px;
    width: auto;
    max-width: 100%;
  }

  .erp-filter-bar:not(.erp-filter-bar-wide)>.erp-filter-actions {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
  }
}

@media (min-width: 1200px) {

  .erp-filter-bar.erp-filter-bar-wide,
  .rutes-filter-bar {
    flex-wrap: nowrap;
  }

  .erp-filter-bar.erp-filter-bar-wide>.erp-filter-q,
  .rutes-filter-bar .rutes-filter-q {
    flex: 1.35 1 0;
    min-width: 135px;
    width: auto;
    max-width: 100%;
  }

  .erp-filter-bar.erp-filter-bar-wide>.erp-filter-item,
  .rutes-filter-bar .rutes-filter-item {
    flex: 1 1 0;
    min-width: 110px;
    width: auto;
    max-width: 100%;
  }

  .erp-filter-bar.erp-filter-bar-wide>.erp-filter-status,
  .rutes-filter-bar .rutes-filter-status {
    flex: 0.72 1 0;
    min-width: 88px;
    width: auto;
    max-width: 100%;
  }

  .erp-filter-bar.erp-filter-bar-wide>.erp-filter-actions,
  .rutes-filter-bar .rutes-filter-actions {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
  }
}

.rute-slots-wrap {
  max-width: 196px;
}

.badge.rute-slot-badge {
  font-size: 0.68rem;
  padding: 0.2em 0.42em;
  line-height: 1.15;
}

/* ERP Detail & Form supplementary helpers */
.rnt-field .rnt-ro-value {
  min-height: calc(1.5em + 0.5rem + 2px);
  padding: 0.25rem 0.5rem;
  font-size: 0.82rem;
  line-height: 1.5;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background-color: var(--surface-muted);
  color: var(--text-color);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.rnt-field textarea.form-control-sm.rnt-ta-compact {
  min-height: 54px;
}

.rnt-field .rnt-check-wrap {
  min-height: calc(1.5em + 0.5rem + 2px);
  display: flex;
  align-items: center;
  gap: 8px;
}

.rnt-subpill-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 10px;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border-strong);
}

.rnt-subpill-bar .nav-link {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 2px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--erp-tab-color);
}

.rnt-subpill-bar .nav-link:hover {
  background: var(--surface-alt);
  color: var(--text-color);
}

.rnt-subpill-bar .nav-link.active {
  background: #0d6efd;
  border-color: #0d6efd;
  color: #ffffff;
  font-weight: 600;
}

/* Regulations grid commission chips: 1px smaller than default .badge (.75rem) */
.badge.reg-detail-badge {
  font-size: calc(.75rem - 1px);
}

/* Uniform Filter & Reset button group across all ERP modules */
.erp-filter-actions .btn {
  height: 31px;
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.erp-filter-bar .erp-filter-compact {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
}

@media (min-width: 1200px) {
  .erp-filter-bar.erp-filter-bar-wide {
    flex-wrap: nowrap;
  }

  .erp-filter-bar.erp-filter-bar-wide>.erp-filter-q,
  .erp-filter-bar.erp-filter-bar-wide>.col-md-3:not(.erp-filter-item) {
    flex: 1.25 1 0;
    width: auto;
    min-width: 0;
  }

  .erp-filter-bar.erp-filter-bar-wide>.erp-filter-item,
  .erp-filter-bar.erp-filter-bar-wide>.col-md-2,
  .erp-filter-bar.erp-filter-bar-wide>.col-md-3.erp-filter-item {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  .erp-filter-bar.erp-filter-bar-wide>.erp-filter-date,
  .erp-filter-bar.erp-filter-bar-wide>div.col-md-2:has(> input[type="date"]),
  .erp-filter-bar.erp-filter-bar-wide>div.col-md-2:has(> input.flatpickr-date),
  .erp-filter-bar.erp-filter-bar-wide>div.col-md-2:has(> input[name="start_date"]),
  .erp-filter-bar.erp-filter-bar-wide>div.col-md-2:has(> input[name="end_date"]) {
    flex: 0 0 auto;
    width: 128px;
  }

  .erp-filter-bar.erp-filter-bar-wide>.erp-filter-actions {
    flex: 0 0 auto;
    width: auto;
    margin-left: auto;
  }
}

/* Travel & Rental Bookings index: Total Harga & Total Pembayaran compact nominal typography */
.booking-amount-cell {
  font-size: calc(1em - 1px);
  font-variant-numeric: tabular-nums;
}

.booking-driver-phone {
  font-variant-numeric: tabular-nums;
}

.booking-driver-name {
  font-size: 0.72rem;
  line-height: 1.25;
}

.badge.booking-extra-pax-badge {
  font-size: calc(.75rem - 1px);
}

/* ── Kalender Operasional (FullCalendar Light + Dark Mode) ─────────────────── */
.content-main-row>main.ops-calendar-page {
  padding: 1rem .65rem !important;
}

.ops-calendar-page {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.ops-calendar-page .ts-wrapper.form-select-sm .ts-control {
  border: 1px solid var(--border-color) !important;
  background-color: var(--surface) !important;
  color: var(--text-color) !important;
  border-radius: var(--bs-border-radius-sm, .25rem) !important;
}

#ops-calendar {
  --fc-border-color: var(--border-color);
  --fc-page-bg-color: var(--surface);
  --fc-neutral-bg-color: var(--surface-muted);
  --fc-neutral-text-color: var(--muted-color);
  --fc-list-event-hover-bg-color: var(--surface-muted);
  --fc-today-bg-color: rgba(13, 110, 253, .09);
  --fc-event-border-color: transparent;
  color: var(--text-color);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#ops-calendar .fc-view-harness,
#ops-calendar .fc-scrollgrid,
#ops-calendar .fc-daygrid-body,
#ops-calendar .fc-daygrid-body>table,
#ops-calendar .fc-col-header {
  width: 100% !important;
  max-width: 100% !important;
}

#ops-calendar .fc-scrollgrid {
  table-layout: fixed;
}

#ops-calendar .fc-daygrid-day-frame,
#ops-calendar .fc-daygrid-day-events {
  min-width: 0;
  overflow: visible;
}

#ops-calendar .fc-daygrid-event-harness:not(.fc-daygrid-event-harness-abs) {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

#ops-calendar .fc-daygrid-event-harness-abs {
  max-width: none;
  overflow: visible;
}

#ops-calendar .fc-daygrid-event,
#ops-calendar .fc-event-main {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

html[data-bs-theme="dark"] #ops-calendar {
  --fc-today-bg-color: rgba(59, 130, 246, .16);
}

#ops-calendar .fc-toolbar-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-color);
}

#ops-calendar .fc .fc-button {
  font-size: .82rem;
  padding: .32rem .68rem;
  border-radius: 6px;
  font-weight: 500;
  box-shadow: none;
}

#ops-calendar .fc .fc-button-primary {
  background-color: var(--surface-muted);
  border-color: var(--border-color);
  color: var(--text-color);
}

#ops-calendar .fc .fc-button-primary:hover,
#ops-calendar .fc .fc-button-primary:focus {
  background-color: var(--border-color);
  border-color: var(--border-color);
  color: var(--text-color);
}

#ops-calendar .fc .fc-button-primary:not(:disabled).fc-button-active,
#ops-calendar .fc .fc-button-primary:not(:disabled):active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

#ops-calendar .fc .fc-button-primary:disabled {
  opacity: .55;
  background-color: var(--surface-muted);
  border-color: var(--border-color);
  color: var(--muted-color);
}

#ops-calendar .fc-col-header-cell {
  background: var(--surface-muted);
}

#ops-calendar .fc-col-header-cell-cushion,
#ops-calendar .fc-daygrid-day-number,
#ops-calendar .fc-timegrid-slot-label-cushion,
#ops-calendar .fc-timegrid-axis-cushion,
#ops-calendar .fc-list-day-text,
#ops-calendar .fc-list-day-side-text {
  color: var(--text-color);
  text-decoration: none;
}

#ops-calendar .fc-col-header-cell-cushion {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 6px 4px;
}

#ops-calendar .fc-daygrid-day-number {
  font-size: .8rem;
  font-weight: 600;
  padding: 4px 6px;
}

#ops-calendar .fc-day-today .fc-daygrid-day-number {
  color: var(--accent);
  font-weight: 700;
}

html[data-bs-theme="dark"] #ops-calendar .fc-day-today .fc-daygrid-day-number {
  color: #7bb4ff;
}

#ops-calendar .fc-list-day-cushion,
#ops-calendar .fc-list-table th {
  background-color: var(--surface-muted);
}

#ops-calendar .fc-list-empty {
  background-color: var(--surface);
  color: var(--muted-color);
}

#ops-calendar .fc-popover {
  background-color: var(--surface);
  border-color: var(--border-color);
  color: var(--text-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  z-index: 1050;
}

#ops-calendar .fc-popover-header {
  background-color: var(--surface-muted);
  color: var(--text-color);
  font-weight: 600;
}

#ops-calendar .fc-daygrid-more-link {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 600;
}

#ops-calendar.fc-can-create .fc-daygrid-day:hover {
  background-color: rgba(13, 110, 253, .04);
  cursor: pointer;
}

html[data-bs-theme="dark"] #ops-calendar.fc-can-create .fc-daygrid-day:hover {
  background-color: rgba(59, 130, 246, .08);
}

/* Custom event pills & status visuals */
#ops-calendar .fc-vst-event {
  cursor: pointer;
  border-radius: 5px;
  border-width: 1px;
  font-size: .71rem;
  line-height: 1.25;
  transition: filter .15s ease, transform .15s ease;
}

#ops-calendar .fc-daygrid-event-harness .fc-daygrid-event {
  margin-left: 1px;
  margin-right: 1px;
}

#ops-calendar .fc-daygrid-event.fc-vst-event {
  padding: 2px 4px;
  margin-top: 2px;
}

#ops-calendar .fc-vst-event:hover {
  filter: brightness(1.06);
}

#ops-calendar .fc-vst-event.fc-vst-status-draft {
  border-style: dashed !important;
  opacity: .92;
}

#ops-calendar .fc-vst-event.fc-vst-status-on_trip {
  border-left: 4px solid #f59e0b !important;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .35);
}

#ops-calendar .fc-vst-event.fc-vst-status-done {
  opacity: .88;
}

#ops-calendar .fc-vst-event.fc-vst-status-cancelled {
  opacity: .62;
  filter: grayscale(.35);
}

#ops-calendar .fc-vst-event.fc-vst-status-cancelled .fc-vst-pill-inner,
#ops-calendar .fc-vst-event.fc-vst-status-cancelled .fc-vst-pill-route,
#ops-calendar .fc-vst-event.fc-vst-status-cancelled .fc-vst-list-doc {
  text-decoration: line-through;
}

#ops-calendar .fc-vst-pill-stack {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  gap: 1px;
}

#ops-calendar .fc-vst-pill-inner {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#ops-calendar .fc-vst-pill-route {
  font-size: .65rem;
  line-height: 1.2;
  opacity: .92;
  padding-left: 14px;
  min-width: 0;
}

#ops-calendar .fc-vst-time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  opacity: .95;
  flex-shrink: 0;
}

#ops-calendar .fc-vst-kind-tag,
#ops-calendar .fc-vst-cat-tag {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  background: rgba(255, 255, 255, .22);
  border-radius: 3px;
  padding: 0 4px;
  line-height: 1.35;
  flex-shrink: 0;
}

#ops-calendar .fc-vst-pill-alerts {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  flex-shrink: 0;
}

#ops-calendar .fc-vst-alert-warn,
#ops-calendar .fc-vst-alert-unpaid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .64rem;
  line-height: 1;
  border-radius: 3px;
  padding: 1px 3px;
  flex-shrink: 0;
}

#ops-calendar .fc-vst-alert-warn {
  background: rgba(245, 158, 11, .95);
  color: #111827;
}

#ops-calendar .fc-vst-alert-unpaid {
  background: rgba(254, 226, 226, .95);
  color: #991b1b;
  font-weight: 800;
}

#ops-calendar .fc-vst-missing-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(245, 158, 11, .92);
  color: #111827;
  font-weight: 700;
  font-size: .61rem;
  padding: 0 4px;
  border-radius: 3px;
  line-height: 1.3;
}

#ops-calendar .fc-vst-live-dot,
.ops-calendar-icon-legend .fc-vst-live-dot,
.ops-cal-kpi-item .fc-vst-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, .35);
  flex-shrink: 0;
}

.ops-calendar-icon-legend .fc-vst-live-dot,
.ops-cal-kpi-item .fc-vst-live-dot {
  width: 8px;
  height: 8px;
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .28);
}

#ops-calendar .fc-vst-sub {
  opacity: .88;
  font-size: .68rem;
  min-width: 0;
}

#ops-calendar .fc-vst-plate {
  opacity: .96;
  font-weight: 600;
}

/* List view readability in light + dark */
#ops-calendar .fc-list-event.fc-vst-event {
  background-color: transparent !important;
  color: var(--text-color) !important;
  border-left-width: 0 !important;
  cursor: pointer;
}

#ops-calendar .fc-list-event.fc-vst-event:hover > td {
  background-color: var(--surface-muted) !important;
}

#ops-calendar .fc-list-event-title,
#ops-calendar .fc-list-event-title a {
  color: var(--text-color) !important;
  text-decoration: none !important;
  cursor: pointer;
}

#ops-calendar .fc-list-event-time {
  font-variant-numeric: tabular-nums;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted-color);
  white-space: nowrap;
}

.ops-calendar-legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  vertical-align: -1px;
  flex-shrink: 0;
}

/* Unified interactive legend & filter chips */
.ops-calendar-icon-legend {
  row-gap: .35rem;
}

.ops-cal-chip-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
}

.ops-cal-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--surface-muted);
  color: var(--text-color);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.ops-cal-chip:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.ops-cal-chip.active {
  background: rgba(13, 110, 253, .12);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(13, 110, 253, .18);
}

html[data-bs-theme="dark"] .ops-cal-chip.active {
  background: rgba(59, 130, 246, .22);
  color: #93c5fd;
  border-color: #60a5fa;
}

/* Operational KPI summary strip + Date Jump Picker */
.ops-cal-toolbar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-bottom: .55rem;
  margin-bottom: .55rem;
  border-bottom: 1px solid var(--border-color);
}

.ops-cal-kpi-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  min-width: 0;
}

.ops-cal-kpi-item {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .3rem .65rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--surface-muted);
  color: var(--text-color);
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.ops-cal-kpi-item:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.ops-cal-kpi-item.active {
  border-color: var(--accent);
  background: rgba(13, 110, 253, .11);
  color: var(--accent);
  box-shadow: 0 0 0 2px rgba(13, 110, 253, .14);
}

html[data-bs-theme="dark"] .ops-cal-kpi-item.active {
  background: rgba(59, 130, 246, .22);
  color: #93c5fd;
  border-color: #60a5fa;
}

.ops-cal-kpi-num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: .86rem;
}

.ops-cal-kpi-item.is-warn:not(.active) {
  border-color: rgba(245, 158, 11, .5);
  background: rgba(245, 158, 11, .1);
}

.ops-cal-kpi-item.is-danger:not(.active) {
  border-color: rgba(220, 53, 69, .45);
  background: rgba(220, 53, 69, .09);
}

.ops-cal-jump-wrap {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
}

.ops-cal-jump-input {
  width: 146px;
  font-variant-numeric: tabular-nums;
}

.ops-calendar-page .ops-cal-filter-bar {
  flex-wrap: wrap !important;
}

@media (min-width: 768px) {
  .ops-calendar-page #cal-filter-advanced.collapse,
  .ops-calendar-page #cal-filter-advanced > .row {
    display: contents !important;
  }
}

/* Hover quick-preview card */
.ops-cal-hover-card {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1080;
  width: 295px;
  max-width: calc(100vw - 24px);
  padding: .65rem .75rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--text-color);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .2);
  pointer-events: none;
  font-size: .78rem;
  line-height: 1.35;
}

html[data-bs-theme="dark"] .ops-cal-hover-card {
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
  border-color: var(--border-strong);
}

.ops-cal-quick-status {
  background-color: var(--surface-muted);
  border: 1px solid var(--border-color);
}

.ops-cal-cat-package {
  background-color: rgba(111, 66, 193, .14);
  color: #5b21b6;
  border: 1px solid rgba(111, 66, 193, .32);
}

html[data-bs-theme="dark"] .ops-cal-cat-package {
  background-color: rgba(139, 92, 246, .22);
  color: #ddd6fe;
  border-color: rgba(167, 139, 250, .4);
}

.ops-cal-modal-dialog {
  max-width: 560px;
}

.ops-cal-modal {
  border-radius: 14px;
  background-color: var(--surface);
  color: var(--text-color);
}

.ops-cal-modal-header,
.ops-cal-modal-footer {
  background-color: var(--surface-muted);
  border-color: var(--border-color) !important;
}

.ops-cal-modal-header {
  padding: .85rem 1rem;
}

.ops-cal-detail-card {
  background-color: var(--surface-muted);
  border: 1px solid var(--border-color);
}

.ops-cal-section-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted-color);
}

.ops-cal-route-stops {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  border-color: var(--border-color) !important;
}

.ops-cal-route-stop {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
}

.ops-cal-stop-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: .38rem;
  flex-shrink: 0;
}

.ops-cal-stop-dot-pickup {
  background-color: #198754;
  box-shadow: 0 0 0 3px rgba(25, 135, 84, .16);
}

.ops-cal-stop-dot-delivery {
  background-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, .16);
}

.ops-cal-stop-tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted-color);
  line-height: 1.2;
}

.ops-cal-wa-btn {
  font-size: .76rem;
  font-variant-numeric: tabular-nums;
}

.ops-cal-money {
  font-size: .92rem;
  font-variant-numeric: tabular-nums;
}

.ops-cal-tabular {
  font-variant-numeric: tabular-nums;
}

@media (min-width: 576px) {
  .ops-cal-money-sep {
    border-left: 1px solid var(--border-color);
    padding-left: .85rem;
  }
}

@media (max-width: 575.98px) {
  .ops-cal-money-sep {
    border-top: 1px solid var(--border-color);
    padding-top: .45rem;
  }
}

.ops-cal-note-box {
  background-color: var(--surface-muted);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent);
}

/* ── Global Dark Mode: Utilitas Bootstrap, Tom Select, & Flatpickr ────────── */
html[data-bs-theme="dark"] .card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, .28);
}

html[data-bs-theme="dark"] .topbar {
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}

/* Override utilitas terang Bootstrap agar adaptif di tema gelap (kecuali QR/gambar bernada gelap) */
html[data-bs-theme="dark"] .bg-white:not(img):not(.qr-code-frame) {
  background-color: var(--surface) !important;
  color: var(--text-color);
}

html[data-bs-theme="dark"] .bg-light:not(img):not(.qr-code-frame) {
  background-color: var(--surface-muted) !important;
  color: var(--text-color);
}

html[data-bs-theme="dark"] .card-header.bg-white,
html[data-bs-theme="dark"] .card-footer.bg-white {
  background-color: var(--surface-muted) !important;
  border-color: var(--border-color);
  color: var(--text-color);
}

html[data-bs-theme="dark"] .form-control.bg-light,
html[data-bs-theme="dark"] .form-select.bg-light,
html[data-bs-theme="dark"] .form-control:disabled,
html[data-bs-theme="dark"] .form-control[readonly],
html[data-bs-theme="dark"] .form-select:disabled {
  background-color: var(--surface-muted) !important;
  border-color: var(--border-strong);
  color: var(--text-color) !important;
}

html[data-bs-theme="dark"] .form-control.bg-white,
html[data-bs-theme="dark"] .form-select.bg-white {
  background-color: var(--surface) !important;
  border-color: var(--border-strong);
  color: var(--text-color) !important;
}

html[data-bs-theme="dark"] .input-group-text.bg-white,
html[data-bs-theme="dark"] .input-group-text.bg-light {
  background-color: var(--surface-muted) !important;
  border-color: var(--border-strong);
  color: var(--muted-color) !important;
}

html[data-bs-theme="dark"] .text-dark:not(.bg-warning):not(.bg-info):not(.btn-warning):not(.btn-info):not(.qr-code-frame):not(.bg-warning *):not(.bg-info *):not(.qr-code-frame *) {
  color: var(--text-color) !important;
}

html[data-bs-theme="dark"] .badge.bg-light {
  background-color: var(--surface-muted) !important;
  color: var(--text-color) !important;
  border-color: var(--border-strong) !important;
}

html[data-bs-theme="dark"] .table-light {
  --bs-table-color: var(--text-color);
  --bs-table-bg: var(--surface-muted);
  --bs-table-border-color: var(--border-color);
  --bs-table-striped-bg: #27313d;
  --bs-table-striped-color: var(--text-color);
  --bs-table-active-bg: #2c3745;
  --bs-table-active-color: var(--text-color);
  --bs-table-hover-bg: #2a3441;
  --bs-table-hover-color: var(--text-color);
  color: var(--text-color);
  border-color: var(--border-color);
}

/* Badge bg-warning/bg-info agar selalu punya teks gelap kontras (baik terang maupun gelap) */
.badge.bg-warning:not(.text-white),
.badge.bg-info:not(.text-white) {
  color: #111827 !important;
}

html[data-bs-theme="dark"] .btn-light {
  --bs-btn-color: var(--text-color);
  --bs-btn-bg: var(--surface-muted);
  --bs-btn-border-color: var(--border-strong);
  --bs-btn-hover-color: var(--text-heading);
  --bs-btn-hover-bg: var(--surface-alt);
  --bs-btn-hover-border-color: var(--border-strong);
  --bs-btn-active-color: var(--text-heading);
  --bs-btn-active-bg: var(--border-color);
  --bs-btn-active-border-color: var(--border-strong);
}

html[data-bs-theme="dark"] .btn-outline-dark {
  --bs-btn-color: var(--text-color);
  --bs-btn-border-color: var(--border-strong);
  --bs-btn-hover-color: var(--text-heading);
  --bs-btn-hover-bg: var(--surface-muted);
  --bs-btn-hover-border-color: var(--muted-color);
  --bs-btn-active-color: var(--text-heading);
  --bs-btn-active-bg: var(--surface-alt);
}

html[data-bs-theme="dark"] .btn-outline-secondary {
  --bs-btn-color: #cbd5e1;
  --bs-btn-border-color: #4b5968;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #334155;
  --bs-btn-hover-border-color: #64748b;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #475569;
  --bs-btn-active-border-color: #64748b;
}

html[data-bs-theme="dark"] .btn-outline-primary {
  --bs-btn-color: #6ea8fe;
  --bs-btn-border-color: #3b82f6;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #0d6efd;
  --bs-btn-hover-border-color: #0d6efd;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #0b5ed7;
}

html[data-bs-theme="dark"] .btn-outline-danger {
  --bs-btn-color: #f2747f;
  --bs-btn-border-color: #e05260;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #dc3545;
  --bs-btn-hover-border-color: #dc3545;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #bb2d3b;
}

html[data-bs-theme="dark"] .btn-outline-success {
  --bs-btn-color: #4ad295;
  --bs-btn-border-color: #2fb87d;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #198754;
  --bs-btn-hover-border-color: #198754;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #157347;
}

html[data-bs-theme="dark"] .text-primary:not(.bg-warning):not(.bg-info):not(.qr-code-frame) {
  color: #6ea8fe !important;
}

html[data-bs-theme="dark"] .text-danger:not(.bg-warning):not(.bg-info):not(.qr-code-frame) {
  color: #f2747f !important;
}

html[data-bs-theme="dark"] .text-success:not(.bg-warning):not(.bg-info):not(.qr-code-frame) {
  color: #4ad295 !important;
}

/* Tom Select global dark mode */
html[data-bs-theme="dark"] .ts-wrapper .ts-control,
html[data-bs-theme="dark"] .ts-wrapper.single .ts-control,
html[data-bs-theme="dark"] .ts-wrapper.multi .ts-control,
html[data-bs-theme="dark"] .ts-control>input,
html[data-bs-theme="dark"] .ts-control>.item {
  background-color: var(--surface) !important;
  color: var(--text-color) !important;
  border-color: var(--border-strong) !important;
}

html[data-bs-theme="dark"] .erp-filter-bar .ts-wrapper.form-select-sm,
html[data-bs-theme="dark"] .rutes-filter-bar .ts-wrapper.form-select-sm {
  background-color: var(--surface);
  border-color: var(--border-strong);
}

html[data-bs-theme="dark"] .erp-filter-bar .ts-wrapper.form-select-sm .ts-control,
html[data-bs-theme="dark"] .rutes-filter-bar .ts-wrapper.form-select-sm .ts-control {
  background-color: transparent !important;
  border-color: transparent !important;
}

html[data-bs-theme="dark"] .erp-filter-bar .ts-wrapper.form-select-sm .ts-control>.item,
html[data-bs-theme="dark"] .rutes-filter-bar .ts-wrapper.form-select-sm .ts-control>.item {
  background-color: transparent !important;
}

html[data-bs-theme="dark"] .ts-wrapper.disabled .ts-control,
html[data-bs-theme="dark"] .ts-wrapper.locked .ts-control {
  background-color: var(--surface-muted) !important;
  color: var(--muted-color) !important;
}

html[data-bs-theme="dark"] .ts-control>input::placeholder {
  color: var(--muted-color);
}

html[data-bs-theme="dark"] .ts-wrapper.multi .ts-control>div.item {
  background-color: var(--surface-alt) !important;
  color: var(--text-color) !important;
  border: 1px solid var(--border-strong);
}

html[data-bs-theme="dark"] .ts-wrapper.multi .ts-control>div.item.active {
  background-color: var(--accent) !important;
  border-color: var(--accent);
  color: #ffffff !important;
}

html[data-bs-theme="dark"] .ts-wrapper.single .ts-control:not(.no-arrow)::after {
  border-color: var(--muted-color) transparent transparent transparent !important;
}

html[data-bs-theme="dark"] .ts-wrapper.single.dropdown-active .ts-control:not(.no-arrow)::after {
  border-color: transparent transparent var(--muted-color) transparent !important;
}

html[data-bs-theme="dark"] .ts-dropdown {
  background-color: var(--surface) !important;
  color: var(--text-color) !important;
  border-color: var(--border-strong) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}

html[data-bs-theme="dark"] .ts-dropdown .option,
html[data-bs-theme="dark"] .ts-dropdown .create,
html[data-bs-theme="dark"] .ts-dropdown .no-results {
  color: var(--text-color) !important;
}

html[data-bs-theme="dark"] .ts-dropdown .optgroup-header {
  background-color: var(--surface-subtle) !important;
  color: var(--muted-color) !important;
}

html[data-bs-theme="dark"] .ts-dropdown .active,
html[data-bs-theme="dark"] .ts-dropdown .option:hover {
  background-color: var(--surface-muted) !important;
  color: var(--text-heading) !important;
}

/* Flatpickr global dark mode */
html[data-bs-theme="dark"] .flatpickr-calendar {
  background: var(--surface);
  border-color: var(--border-strong);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .48);
  color: var(--text-color);
}

html[data-bs-theme="dark"] .flatpickr-calendar.arrowTop::before {
  border-bottom-color: var(--border-strong);
}

html[data-bs-theme="dark"] .flatpickr-calendar.arrowTop::after {
  border-bottom-color: var(--surface);
}

html[data-bs-theme="dark"] .flatpickr-calendar.arrowBottom::before {
  border-top-color: var(--border-strong);
}

html[data-bs-theme="dark"] .flatpickr-calendar.arrowBottom::after {
  border-top-color: var(--surface);
}

html[data-bs-theme="dark"] .flatpickr-months .flatpickr-month,
html[data-bs-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months,
html[data-bs-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month,
html[data-bs-theme="dark"] .flatpickr-weekdays,
html[data-bs-theme="dark"] span.flatpickr-weekday {
  background: var(--surface);
  color: var(--text-color);
  fill: var(--text-color);
}

html[data-bs-theme="dark"] .flatpickr-current-month input.cur-year {
  color: var(--text-color);
}

html[data-bs-theme="dark"] .flatpickr-months .flatpickr-prev-month,
html[data-bs-theme="dark"] .flatpickr-months .flatpickr-next-month {
  color: var(--text-color);
  fill: var(--text-color);
}

html[data-bs-theme="dark"] .flatpickr-months .flatpickr-prev-month:hover svg,
html[data-bs-theme="dark"] .flatpickr-months .flatpickr-next-month:hover svg {
  fill: var(--accent);
}

html[data-bs-theme="dark"] .flatpickr-day {
  color: var(--text-color);
}

html[data-bs-theme="dark"] .flatpickr-day.flatpickr-disabled,
html[data-bs-theme="dark"] .flatpickr-day.prevMonthDay,
html[data-bs-theme="dark"] .flatpickr-day.nextMonthDay,
html[data-bs-theme="dark"] .flatpickr-day.notAllowed {
  color: var(--muted-color);
  opacity: .42;
}

html[data-bs-theme="dark"] .flatpickr-day:hover,
html[data-bs-theme="dark"] .flatpickr-day:focus,
html[data-bs-theme="dark"] .flatpickr-day.prevMonthDay:hover,
html[data-bs-theme="dark"] .flatpickr-day.nextMonthDay:hover {
  background: var(--surface-muted);
  border-color: var(--border-strong);
  color: var(--text-heading);
}

html[data-bs-theme="dark"] .flatpickr-day.today {
  border-color: var(--accent);
}

html[data-bs-theme="dark"] .flatpickr-day.selected,
html[data-bs-theme="dark"] .flatpickr-day.startRange,
html[data-bs-theme="dark"] .flatpickr-day.endRange {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

html[data-bs-theme="dark"] .flatpickr-time {
  background: var(--surface);
  border-top-color: var(--border-color);
}

html[data-bs-theme="dark"] .flatpickr-time input,
html[data-bs-theme="dark"] .flatpickr-time .flatpickr-am-pm,
html[data-bs-theme="dark"] .flatpickr-time .flatpickr-time-separator {
  color: var(--text-color);
}

html[data-bs-theme="dark"] .flatpickr-time input:hover,
html[data-bs-theme="dark"] .flatpickr-time .flatpickr-am-pm:hover,
html[data-bs-theme="dark"] .flatpickr-time input:focus,
html[data-bs-theme="dark"] .flatpickr-time .flatpickr-am-pm:focus {
  background: var(--surface-muted);
}

@media (max-width: 767.98px) {
  #ops-calendar .fc-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
  }

  #ops-calendar .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .25rem;
  }

  #ops-calendar .fc-toolbar-title {
    font-size: 1rem;
  }

  .ops-cal-kpi-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .ops-cal-kpi-item {
    justify-content: space-between;
    padding: .35rem .55rem;
    font-size: .74rem;
  }

  .ops-cal-jump-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .ops-cal-jump-input {
    flex: 1 1 auto;
    width: auto;
  }

  .ops-cal-chip-group {
    gap: .28rem;
  }

  .ops-cal-chip {
    padding: .18rem .46rem;
    font-size: .72rem;
  }
}

/* ─── Accessibility & Print Hygiene ─── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .sidebar,
  .sidebar-backdrop,
  .topbar,
  .btn:not(.d-print-inline),
  .pagination,
  .erp-filter-bar,
  .rutes-filter-bar,
  [data-no-print] {
    display: none !important;
  }

  body,
  .content-wrapper {
    margin-left: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .card,
  .erp-window-card {
    box-shadow: none !important;
    border: 1px solid #dee2e6 !important;
  }
}

/* ─── Auth Layout (Login) ─── */
.auth-wrapper {
  min-height: 100vh;
  padding: 1.5rem 1rem;
  background: radial-gradient(circle at 80% 20%, rgba(2, 132, 199, 0.25) 0%, transparent 50%),
              linear-gradient(135deg, #091e3a 0%, #0d47a1 60%, #1565c0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 410px;
  position: relative;
  background: var(--surface);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .24);
}

.auth-theme-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.auth-brand-logo {
  height: 46px;
  width: auto;
  object-fit: contain;
}

.auth-title {
  color: var(--text-heading);
  letter-spacing: -0.01em;
}

@media (max-width: 575.98px) {
  .auth-wrapper {
    padding: 1rem .75rem;
  }

  .auth-card {
    padding: 1.5rem 1.25rem;
  }
}

html[data-bs-theme="dark"] .auth-wrapper {
  background: radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.16) 0%, transparent 50%),
              linear-gradient(135deg, #040b16 0%, #081529 55%, #0d2240 100%);
}

html[data-bs-theme="dark"] .auth-card {
  box-shadow: 0 20px 52px rgba(0, 0, 0, .55);
}

html[data-bs-theme="dark"] .auth-card .input-group-text {
  background-color: var(--surface-muted);
  border-color: var(--border-strong);
  color: var(--muted-color);
}

html[data-bs-theme="dark"] .auth-card .form-control {
  background-color: var(--surface-alt);
  border-color: var(--border-strong);
  color: var(--text-color);
}

html[data-bs-theme="dark"] .auth-card .form-control:focus {
  background-color: var(--surface);
  border-color: #38bdf8;
}

html[data-bs-theme="dark"] .auth-card .form-control:-webkit-autofill,
html[data-bs-theme="dark"] .auth-card .form-control:-webkit-autofill:hover,
html[data-bs-theme="dark"] .auth-card .form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-color);
  -webkit-box-shadow: 0 0 0 1000px var(--surface-alt) inset;
  caret-color: var(--text-color);
}

html[data-bs-theme="dark"] .auth-card .btn-outline-secondary {
  background-color: var(--surface-muted);
  border-color: var(--border-strong);
  color: var(--text-color);
}

html[data-bs-theme="dark"] .auth-card #loginThemeToggle {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
}

html[data-bs-theme="dark"] .auth-card #loginThemeToggle:hover {
  background-color: rgba(251, 191, 36, 0.14);
  border-color: #fbbf24;
  color: #fde68a;
}

/* ── AI Assistant Floating Widget (Native ERP Design System) ──────────────── */
.vst-ai-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1045;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.02rem;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: -.01em;
  box-shadow: 0 10px 24px -4px rgba(15, 23, 42, .35), 0 4px 10px rgba(29, 78, 216, .22);
  cursor: pointer;
  visibility: visible;
  transition: transform .18s ease, box-shadow .18s ease, opacity .16s ease .06s, visibility 0s linear 0s;
}

.vst-ai-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -4px rgba(15, 23, 42, .42), 0 6px 14px rgba(29, 78, 216, .3);
}

html[data-bs-theme="dark"] .vst-ai-fab {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  border-color: rgba(147, 197, 253, .28);
  box-shadow: 0 12px 28px rgba(2, 6, 23, .55);
}

.vst-ai-fab.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(.92);
  transition: transform .14s ease, opacity .12s ease, visibility 0s linear .14s;
}

.vst-ai-fab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #93c5fd;
}

html[data-bs-theme="dark"] .vst-ai-fab-icon {
  color: #e0f2fe;
}

.vst-ai-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1047;
  background: rgba(2, 6, 23, .42);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility 0s linear .2s;
}

@media (min-width: 576px) {
  .vst-ai-backdrop {
    display: none !important;
  }
}

.vst-ai-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .2s ease, visibility 0s linear 0s;
}

.vst-ai-drawer {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: min(420px, calc(100vw - 2rem));
  height: min(640px, calc(100vh - 2.5rem));
  z-index: 1048;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 24px 56px -12px rgba(15, 23, 42, .22), 0 0 0 1px rgba(15, 23, 42, .04);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform-origin: bottom right;
  transform: translateY(14px) scale(.96);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.vst-ai-drawer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear 0s;
}

.vst-ai-drawer.is-expanded {
  width: min(560px, calc(100vw - 2rem));
  height: min(740px, calc(100vh - 2.5rem));
}

.vst-ai-drawer.is-instant,
.vst-ai-fab.is-instant,
.vst-ai-backdrop.is-instant {
  transition: none !important;
}

.vst-ai-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--border-strong);
  margin: .45rem auto .1rem;
  flex-shrink: 0;
}

.vst-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  padding: .75rem .95rem;
  flex-shrink: 0;
  background: var(--surface);
  color: var(--text-heading);
  border-bottom: 1px solid var(--border-color);
}

.vst-ai-avatar {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(29, 78, 216, .24);
}

.vst-ai-online-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
  border: 2px solid var(--surface);
}

.vst-ai-badge {
  font-size: .64rem;
  font-weight: 600;
  padding: .1rem .38rem;
  border-radius: 999px;
  background: rgba(29, 78, 216, .1);
  color: var(--accent);
  flex-shrink: 0;
}

html[data-bs-theme="dark"] .vst-ai-badge {
  background: rgba(59, 130, 246, .18);
  color: #93c5fd;
}

.vst-ai-subtitle {
  font-size: .72rem;
  color: var(--muted-color);
  margin-top: 1px;
}

.vst-ai-icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.vst-ai-icon-btn:hover {
  background: var(--surface-muted);
  color: var(--text-heading);
  border-color: var(--border-color);
}

/* Welcome Canvas */
.vst-ai-welcome {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: .25rem .1rem;
}

.vst-ai-welcome-hero {
  text-align: center;
  padding: .75rem .75rem .45rem;
}

.vst-ai-welcome-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto .55rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(29, 78, 216, .12) 0%, rgba(2, 132, 199, .14) 100%);
  color: var(--accent);
  border: 1px solid rgba(29, 78, 216, .2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

html[data-bs-theme="dark"] .vst-ai-welcome-icon {
  background: rgba(59, 130, 246, .16);
  border-color: rgba(96, 165, 250, .28);
  color: #93c5fd;
}

.vst-ai-welcome-title {
  font-size: .98rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: .2rem;
}

.vst-ai-welcome-sub {
  font-size: .79rem;
  color: var(--muted-color);
  margin: 0;
  line-height: 1.45;
}

.vst-ai-welcome-label {
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted-color);
  padding: 0 .15rem;
}

.vst-ai-welcome-chips {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.vst-ai-welcome-hint {
  font-size: .75rem;
  line-height: 1.48;
  color: var(--muted-color);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  padding: .55rem .72rem;
}

.vst-ai-welcome-hint code {
  padding: .06rem .28rem;
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--accent);
  font-size: .72rem;
}

/* Quick Prompt Chips & Popover */
.vst-ai-chips {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: .38rem;
  padding: .65rem .85rem;
  background: var(--surface);
  border-top: 1px solid var(--border-color);
  max-height: 230px;
  overflow-y: auto;
  overflow-x: hidden;
}

.vst-ai-chips-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: .1rem;
}

.vst-ai-chips-close {
  border: 0;
  background: transparent;
  color: var(--muted-color);
  padding: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.vst-ai-chips-close:hover {
  background: var(--surface-muted);
  color: var(--text-heading);
}

.vst-ai-chip {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .55rem;
  text-align: left;
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--text-color);
  border-radius: 10px;
  padding: .5rem .68rem;
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease, transform .12s ease;
}

.vst-ai-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-hover);
  transform: translateX(2px);
}

.vst-ai-chip-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  flex-shrink: 0;
}

.vst-ai-chip-text {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
}

.vst-ai-chip-arrow {
  font-size: 1rem;
  color: var(--muted-color);
  flex-shrink: 0;
  transition: transform .15s ease, color .15s ease;
}

.vst-ai-chip:hover .vst-ai-chip-arrow {
  transform: translateX(2px);
  color: var(--accent);
}

/* Body & Messages */
.vst-ai-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: .9rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  background: var(--page-bg);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.vst-ai-body::-webkit-scrollbar {
  width: 6px;
}

.vst-ai-body::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}

.vst-ai-msg {
  display: flex;
  max-width: 100%;
}

.vst-ai-msg-user {
  align-self: flex-end;
  justify-content: flex-end;
  max-width: 84%;
}

.vst-ai-msg-assistant {
  align-self: flex-start;
  align-items: flex-start;
  gap: .5rem;
  width: 100%;
  max-width: 96%;
}

.vst-ai-msg-avatar {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(29, 78, 216, .12);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  flex-shrink: 0;
  margin-top: 2px;
}

html[data-bs-theme="dark"] .vst-ai-msg-avatar {
  background: rgba(59, 130, 246, .18);
  color: #93c5fd;
}

.vst-ai-msg-content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.vst-ai-bubble {
  padding: .66rem .86rem;
  border-radius: 14px;
  font-size: .825rem;
  line-height: 1.54;
  word-break: break-word;
  max-width: 100%;
}

.vst-ai-msg-user .vst-ai-bubble {
  background: #1d4ed8;
  color: #ffffff;
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 2px 8px rgba(29, 78, 216, .22);
}

html[data-bs-theme="dark"] .vst-ai-msg-user .vst-ai-bubble {
  background: #2563eb;
}

.vst-ai-msg-assistant .vst-ai-bubble {
  background: var(--surface);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 4px 16px 16px 16px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .04);
}

.vst-ai-bubble.vst-ai-bubble-error {
  border-color: rgba(220, 38, 38, .35);
  background: rgba(254, 242, 242, .9);
  color: #991b1b;
}

html[data-bs-theme="dark"] .vst-ai-bubble.vst-ai-bubble-error {
  border-color: rgba(248, 113, 113, .38);
  background: rgba(127, 29, 29, .28);
  color: #fecaca;
}

.vst-ai-bubble code {
  padding: .1rem .34rem;
  border-radius: 5px;
  background: var(--surface-muted);
  color: var(--accent);
  font-size: .77rem;
}

.vst-ai-heading {
  font-weight: 700;
  font-size: .84rem;
  color: var(--text-heading);
  margin-top: .25rem;
  margin-bottom: .12rem;
}

.vst-ai-heading:first-child {
  margin-top: 0;
}

.vst-ai-bullet {
  position: relative;
  padding-left: .95rem;
  margin-top: .2rem;
}

.vst-ai-bullet::before {
  content: '•';
  position: absolute;
  left: .18rem;
  color: var(--accent);
  font-weight: 700;
}

.vst-ai-subbullet {
  position: relative;
  padding-left: 1.55rem;
  margin-top: .14rem;
  font-size: .79rem;
  color: var(--muted-color);
}

.vst-ai-subbullet::before {
  content: '◦';
  position: absolute;
  left: .9rem;
}

.vst-ai-num-bullet {
  display: flex;
  align-items: flex-start;
  gap: .38rem;
  margin-top: .2rem;
}

.vst-ai-num {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.vst-ai-spacer {
  height: .38rem;
}

.vst-ai-tip {
  display: inline-block;
  font-size: .75rem;
  color: var(--muted-color);
  font-style: italic;
}

.vst-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .38rem;
  margin-top: .45rem;
}

.vst-ai-action-chip {
  display: inline-flex;
  align-items: center;
  padding: .26rem .64rem;
  border-radius: 999px;
  font-size: .73rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--surface);
  color: var(--accent);
  border: 1px solid rgba(29, 78, 216, .3);
  transition: background-color .15s ease, border-color .15s ease;
}

.vst-ai-action-chip:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}

/* Composer Footer */
.vst-ai-footer {
  flex-shrink: 0;
  padding: .6rem .85rem .55rem;
  background: var(--surface);
  border-top: 1px solid var(--border-color);
}

.vst-ai-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: .35rem;
  padding: .35rem .38rem;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface-muted);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.vst-ai-input-wrap:focus-within {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .12);
}

.vst-ai-prompts-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.vst-ai-prompts-btn:hover,
.vst-ai-prompts-btn.is-active {
  background: var(--surface-hover);
  color: var(--accent);
}

.vst-ai-input {
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  color: var(--text-color);
  resize: none;
  overflow-y: hidden;
  font-size: .835rem;
  line-height: 1.42;
  max-height: 96px;
  padding: .26rem .1rem;
  outline: none;
}

.vst-ai-send-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: #1d4ed8;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .95rem;
  cursor: pointer;
  transition: background-color .15s ease, transform .12s ease, opacity .15s ease;
}

.vst-ai-send-btn:hover:not(:disabled) {
  background: #1e40af;
}

.vst-ai-send-btn:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.vst-ai-send-btn.is-stop {
  background: #dc2626;
}

.vst-ai-send-btn.is-stop:hover {
  background: #b91c1c;
}

.vst-ai-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .38rem;
  padding: 0 .15rem;
  font-size: .69rem;
  color: var(--muted-color);
}

.vst-ai-meta kbd {
  padding: .04rem .28rem;
  font-size: .66rem;
  background: var(--surface-subtle);
  color: var(--text-color);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
}

html[data-bs-theme="dark"] .vst-ai-drawer {
  box-shadow: 0 24px 60px rgba(0, 0, 0, .62);
}

html[data-bs-theme="dark"] .vst-ai-action-chip {
  color: #7eb6ff;
  border-color: rgba(110, 168, 254, .4);
}

@media (max-width: 575.98px) {
  .vst-ai-fab {
    right: .9rem;
    bottom: .9rem;
    padding: .58rem .9rem;
  }

  .vst-ai-drawer,
  .vst-ai-drawer.is-expanded {
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100vw;
    height: min(88vh, 660px);
    height: min(88dvh, 660px);
    border-radius: 20px 20px 0 0;
    transform-origin: bottom center;
  }

  .vst-ai-footer {
    padding-bottom: max(.55rem, env(safe-area-inset-bottom));
  }
}

.vst-ai-msg-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .34rem;
}

.vst-ai-copy-btn {
  display: inline-flex;
  align-items: center;
  padding: .18rem .52rem;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted-color);
  font-size: .71rem;
  font-weight: 500;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

.vst-ai-copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--surface-hover);
}

.vst-ai-copy-btn.is-copied {
  color: #198754;
  border-color: #198754;
}

html[data-bs-theme="dark"] .vst-ai-copy-btn.is-copied {
  color: #4ad295;
  border-color: #2fb87d;
}

.vst-ai-wa-btn {
  display: inline-flex;
  align-items: center;
  padding: .18rem .56rem;
  border: 1px solid rgba(25, 135, 84, .45);
  border-radius: 7px;
  background: rgba(25, 135, 84, .1);
  color: #157347;
  font-size: .71rem;
  font-weight: 600;
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

.vst-ai-wa-btn:hover {
  background: #198754;
  border-color: #198754;
  color: #ffffff;
}

html[data-bs-theme="dark"] .vst-ai-wa-btn {
  border-color: rgba(74, 210, 149, .42);
  background: rgba(25, 135, 84, .2);
  color: #4ad295;
}

html[data-bs-theme="dark"] .vst-ai-wa-btn:hover {
  background: #198754;
  border-color: #2fb87d;
  color: #ffffff;
}

.vst-ai-streaming-cursor {
  display: inline-block;
  width: 7px;
  height: .95em;
  margin-left: 3px;
  vertical-align: text-bottom;
  background: var(--accent);
  border-radius: 1px;
  animation: vstAiCursorBlink .75s steps(1) infinite;
}

@keyframes vstAiCursorBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .vst-ai-fab,
  .vst-ai-drawer,
  .vst-ai-backdrop,
  .vst-ai-chip {
    transition: none !important;
  }
  .vst-ai-streaming-cursor {
    animation: none !important;
  }
}

/* ---------- Dashboard KPI Hover Drill-Down ---------- */
.dash-kpi-card {
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}
.dash-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 .35rem 1rem rgba(15, 23, 42, .08) !important;
}
html[data-bs-theme="dark"] .dash-kpi-card:hover {
  box-shadow: 0 .35rem 1rem rgba(0, 0, 0, .38) !important;
}

/* ---------- Kalender Quick Assign & Reschedule Modal ---------- */
.ops-cal-quick-assign {
  border: 1px solid rgba(13, 110, 253, .25);
  background: var(--bs-tertiary-bg, #f8fafc);
}
.ops-cal-resched-diff {
  border: 1px solid var(--border);
  background: var(--bs-tertiary-bg, #f8fafc);
}
html[data-bs-theme="dark"] .ops-cal-quick-assign {
  border-color: rgba(96, 165, 250, .3);
  background: rgba(30, 41, 59, .55);
}
html[data-bs-theme="dark"] .ops-cal-resched-diff {
  background: rgba(30, 41, 59, .55);
}
@media (max-width: 575.98px) {
  .ops-cal-jump-wrap {
    flex-wrap: wrap;
    width: 100%;
  }
  .ops-cal-jump-wrap .btn {
    flex: 1 1 auto;
  }
}

/* ---------- Laporan Preset Periode Cepat & CRM Pelanggan ---------- */
.rpt-preset-bar {
  gap: .35rem !important;
}
.rpt-preset-pill {
  font-size: .76rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  white-space: nowrap;
}
.pax-crm-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  background: rgba(13, 110, 253, .12);
  color: #0d6efd;
  border: 1px solid rgba(13, 110, 253, .22);
}
.pax-crm-loc-box {
  background: var(--bs-tertiary-bg, #f8fafc);
  border: 1px solid var(--border);
}
html[data-bs-theme="dark"] .pax-crm-avatar {
  background: rgba(96, 165, 250, .18);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, .3);
}
html[data-bs-theme="dark"] .pax-crm-loc-box {
  background: rgba(30, 41, 59, .55);
}

/* ---------- Split Curtain Reveal Setelah Login ---------- */
.vst-lgo-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: auto;
  overflow: hidden;
}
.vst-lgo-half {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  background: linear-gradient(150deg, #061329 0%, #0d2b5c 60%, #144284 100%);
  transition: transform .65s cubic-bezier(.72, 0, .28, 1);
  will-change: transform;
}
.vst-lgo-half--l {
  left: 0;
  border-right: 1px solid rgba(251, 191, 36, .38);
}
.vst-lgo-half--r {
  right: 0;
  border-left: 1px solid rgba(251, 191, 36, .38);
}
.vst-lgo-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 96px;
  height: 96px;
  transform: translate(-50%, -50%) scale(1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .26s ease, transform .26s ease;
}
.vst-lgo-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, .18);
  border-top-color: #fbbf24;
  border-right-color: #38bdf8;
  animation: vst-spin .9s linear infinite;
}
.vst-lgo-logo {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  padding: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}
.vst-lgo-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.vst-lgo-overlay.is-open {
  pointer-events: none;
}
.vst-lgo-overlay.is-open .vst-lgo-half--l {
  transform: translateX(-102%);
}
.vst-lgo-overlay.is-open .vst-lgo-half--r {
  transform: translateX(102%);
}
.vst-lgo-overlay.is-open .vst-lgo-core {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.84);
}
@keyframes vst-spin {
  to { transform: rotate(360deg); }
}

/* ---------- Component Shimmer Skeleton & Modern Loading States ---------- */
.vst-skel {
  display: block;
  max-width: 100%;
  border-radius: 7px;
  background: linear-gradient(90deg, #e5eaf2 20%, #f4f7fc 44%, #e5eaf2 68%);
  background-size: 320% 100%;
  animation: vst-shimmer 1.35s ease-in-out infinite;
}
.vst-skel-line {
  height: 12px;
  margin-bottom: 8px;
}
.vst-skel-pill {
  height: 18px;
  border-radius: 999px;
}
.vst-skel-circle {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  flex-shrink: 0;
}
.vst-skel-btn {
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}
.vst-skel-input {
  height: 34px;
  width: 100%;
  border-radius: 8px;
}
.vst-skel-block {
  width: 100%;
  height: 150px;
  border-radius: 10px;
}
.vst-skel-bar {
  height: 4px;
  border-radius: 999px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, #1d4ed8 0%, #38bdf8 50%, #f59e0b 100%);
  background-size: 200% 100%;
  animation: vst-shimmer 1.4s linear infinite;
}
.ops-cal-stage {
  position: relative;
}
.vst-cal-skeleton {
  position: absolute;
  inset: 0;
  z-index: 15;
  padding: .85rem;
  border-radius: 10px;
  background: var(--surface, #ffffff);
  overflow: hidden;
}
html[data-bs-theme="dark"] .vst-skel {
  background: linear-gradient(90deg, #1e293b 20%, #2e3d54 44%, #1e293b 68%);
  background-size: 320% 100%;
}
html[data-bs-theme="dark"] .vst-cal-skeleton {
  background: var(--surface, #0f172a);
}
@keyframes vst-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Tom Select remote loading shimmer */
.ts-dropdown .vst-ts-loading-skel {
  padding: .45rem .65rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.ts-dropdown .vst-ts-loading-row {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.ts-dropdown .vst-ts-loading-row .vst-skel-line {
  height: 11px;
  margin-bottom: 0;
}
.ts-dropdown .vst-ts-loading-row .vst-skel-pill {
  height: 14px;
  width: 44px;
  flex-shrink: 0;
}

/* AI Assistant Shimmer Bubble & Quick-Fill Panel Shimmer */
.vst-ai-shimmer {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 220px;
  max-width: 100%;
  padding: .75rem .9rem;
}
.vst-ai-shimmer .vst-skel-line {
  height: 10px;
  margin-bottom: 0;
  border-radius: 999px;
}
.vst-ai-panel-skel {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: .55rem .75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--surface-subtle, #f8fafc);
}
html[data-bs-theme="dark"] .vst-ai-panel-skel {
  background: rgba(30, 41, 59, .55);
}
.vst-ai-panel-skel-row {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.vst-ai-panel-skel-row .vst-skel-line {
  height: 11px;
  margin-bottom: 0;
}

/* Chart.js Card Shimmer Overlay */
.vst-chart-stage {
  position: relative;
  min-height: 180px;
}
.vst-chart-skel {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: .65rem;
  padding: .5rem .25rem;
  background: var(--surface, #ffffff);
  transition: opacity .22s ease, visibility .22s ease;
}
html[data-bs-theme="dark"] .vst-chart-skel {
  background: var(--surface, #151c27);
}
.vst-chart-stage.is-ready .vst-chart-skel {
  display: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.vst-chart-skel-bars {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  gap: .55rem;
  min-height: 110px;
  padding: .25rem .25rem 0;
}
.vst-chart-skel-bars .vst-skel {
  flex: 1 1 0;
  border-radius: 6px 6px 2px 2px;
}
.vst-chart-skel-donut-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}
.vst-chart-skel-donut {
  width: 132px;
  height: 132px;
  border-radius: 999px;
  position: relative;
}
.vst-chart-skel-legend {
  display: flex;
  justify-content: center;
  gap: .85rem;
}
.vst-chart-skel-legend .vst-skel-line {
  height: 10px;
  margin-bottom: 0;
}

/* QRIS Dinamis Shimmer & Live Pulse Dot */
.vst-qr-skel-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}
.vst-qr-skel-box {
  width: 230px;
  height: 230px;
  border-radius: 12px;
}
.vst-qr-img-wrap {
  position: relative;
  display: inline-block;
}
.vst-qr-img-skel {
  display: none;
  position: absolute;
  inset: 8px;
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease;
}
.vst-qr-img-wrap.is-loading .vst-qr-img-skel {
  display: block;
  opacity: 1;
  visibility: visible;
}
.vst-live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  vertical-align: middle;
  animation: vst-live-pulse 1.25s ease-in-out infinite;
}
.vst-live-dot--warn {
  background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, .45);
}
@keyframes vst-live-pulse {
  0%, 100% { transform: scale(.85); opacity: .65; box-shadow: 0 0 0 0 rgba(245, 158, 11, .45); }
  50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 5px rgba(245, 158, 11, 0); }
}

/* Inline Field / Control Shimmer (Cascading & AJAX Check) */
.vst-field-shimmer {
  position: relative !important;
  overflow: hidden !important;
}
.vst-field-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, rgba(148, 163, 184, 0) 20%, rgba(148, 163, 184, .22) 48%, rgba(148, 163, 184, 0) 76%);
  background-size: 240% 100%;
  animation: vst-shimmer 1.15s ease-in-out infinite;
  border-radius: inherit;
}
html[data-bs-theme="dark"] .vst-field-shimmer::after {
  background: linear-gradient(105deg, rgba(148, 163, 184, 0) 20%, rgba(226, 232, 240, .14) 48%, rgba(148, 163, 184, 0) 76%);
  background-size: 240% 100%;
}

/* ---------- Halaman Profil Saya ---------- */
.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .02em;
  background: rgba(13, 110, 253, .12);
  color: #0d6efd;
  border: 1px solid rgba(13, 110, 253, .22);
  flex-shrink: 0;
}
html[data-bs-theme="dark"] .profile-avatar {
  background: rgba(96, 165, 250, .18);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, .3);
}
.profile-info-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.profile-info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--border);
}
.profile-info-item:first-child {
  border-top: 1px solid var(--border);
}
.profile-info-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.profile-info-label {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .82rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.profile-info-value {
  font-size: .86rem;
  font-weight: 500;
  text-align: right;
  min-width: 0;
  word-break: break-word;
}
.profile-security-tip {
  background: var(--bs-tertiary-bg, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .65rem .85rem;
  font-size: .78rem;
  color: var(--text-muted);
}
html[data-bs-theme="dark"] .profile-security-tip {
  background: rgba(30, 41, 59, .55);
}
.profile-pw-meter {
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  margin-top: .4rem;
}
.profile-pw-meter-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width .2s ease, background-color .2s ease;
}
@media (max-width: 575.98px) {
  .profile-info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: .2rem;
  }
  .profile-info-value {
    text-align: left;
  }
}

/* ---------- Global Interactive Loading System ---------- */
.vst-nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 10050;
  pointer-events: none;
  opacity: 0;
  transition: opacity .22s ease;
}
.vst-nav-progress.is-active {
  opacity: 1;
}
.vst-nav-progress-bar {
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, #1d4ed8 0%, #38bdf8 55%, #f59e0b 100%);
  box-shadow: 0 0 10px rgba(56, 189, 248, .65);
  transition: transform .24s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}

.vst-page-loader {
  position: fixed;
  top: var(--topbar-height, 60px);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1025;
  background: var(--page-bg, #f4f6f9);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, visibility .16s ease;
}
@media (min-width: 992px) {
  .vst-page-loader {
    left: var(--sidebar-width, 256px);
  }
  html.sidebar-collapsed .vst-page-loader {
    left: 0;
  }
}
html[data-bs-theme="dark"] .vst-page-loader {
  background: var(--page-bg, #0b1120);
}
.vst-page-loader.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.vst-skel-workspace {
  width: 100%;
  height: 100%;
  padding: 1rem 1.25rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
@media (max-width: 767.98px) {
  .vst-skel-workspace {
    padding: .75rem;
    gap: .7rem;
  }
}
.vst-sk-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-width: 0;
}
.vst-sk-header-left,
.vst-sk-card,
.vst-sk-subpanel {
  min-width: 0;
}
.vst-sk-header-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  min-width: 0;
}
.vst-sk-card {
  padding: .9rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--surface, #ffffff);
  overflow: hidden;
}
.vst-sk-subpanel {
  background: var(--surface-subtle, #f8fafc);
}
html[data-bs-theme="dark"] .vst-sk-subpanel {
  background: var(--surface-muted, #152036);
}
.vst-sk-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  padding: .7rem .9rem;
}
.vst-sk-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}
.vst-sk-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}
.vst-sk-grid-dash {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: .85rem;
}
.vst-sk-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: .85rem;
  align-items: start;
}
.vst-sk-kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .48rem 0;
  border-bottom: 1px solid var(--border-color);
}
.vst-sk-kv-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
@media (max-width: 991.98px) {
  .vst-sk-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .vst-sk-grid-2,
  .vst-sk-grid-dash,
  .vst-sk-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.vst-sk-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding-bottom: .75rem;
  margin-bottom: .85rem;
  border-bottom: 1px solid var(--border-color);
}
.vst-sk-form-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
  margin-bottom: .75rem;
}
@media (max-width: 575.98px) {
  .vst-sk-form-row {
    grid-template-columns: minmax(0, 1fr);
    gap: .35rem;
  }
}
.vst-sk-table {
  padding: 0;
}
.vst-sk-table-head,
.vst-sk-table-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .68rem 1rem;
  min-width: 0;
}
.vst-sk-table-head {
  background: var(--surface-muted, #f1f5fb);
  border-bottom: 1px solid var(--border-color);
}
.vst-sk-table-row {
  border-bottom: 1px solid var(--border-color);
}
.vst-sk-table-row:last-child {
  border-bottom: 0;
}
.vst-sk-actions {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-left: auto;
  flex-shrink: 0;
}
.vst-sk-actions .vst-skel-pill {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.vst-sk-cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin-bottom: .75rem;
}
.vst-sk-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .4rem;
  padding: .45rem .5rem;
  border: 1px solid var(--border-color);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--surface-muted, #f1f5fb);
}
.vst-sk-cal-weekdays .vst-skel-line {
  width: 48%;
  height: 11px;
  margin: 0 auto;
}
.vst-sk-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-left: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}
.vst-sk-cal-cell {
  min-height: 74px;
  padding: .4rem;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.vst-sk-cal-num {
  width: 22px;
  height: 11px;
  margin-bottom: 2px;
}
.vst-sk-cal-list {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.vst-sk-cal-list-row {
  padding: .65rem .75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.vst-sk-cal-list-top {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
}

.vst-btn-loading {
  position: relative;
  overflow: hidden;
  pointer-events: none;
  opacity: .92;
  cursor: progress !important;
}
.vst-btn-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, .28) 48%, rgba(255, 255, 255, 0) 76%);
  background-size: 240% 100%;
  animation: vst-shimmer 1.15s ease-in-out infinite;
}
.vst-btn-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  vertical-align: middle;
  flex-shrink: 0;
  animation: vst-btn-dot-pulse .95s ease-in-out infinite;
}
@keyframes vst-btn-dot-pulse {
  0%, 100% { transform: scale(.72); opacity: .55; }
  50% { transform: scale(1.08); opacity: 1; }
}

html.vst-nav-arriving .content-main-row > main {
  animation: vst-page-in .22s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes vst-page-in {
  from {
    opacity: .01;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vst-lgo-half,
  .vst-lgo-core {
    transition: opacity .15s linear !important;
  }
  .vst-lgo-ring,
  .vst-skel,
  .vst-skel-bar,
  .vst-live-dot,
  .vst-btn-dot,
  .vst-btn-loading::after,
  .vst-field-shimmer::after,
  html.vst-nav-arriving .content-main-row > main {
    animation: none !important;
  }
  .vst-nav-progress-bar,
  .vst-page-loader,
  .vst-chart-skel,
  .vst-qr-img-skel {
    transition: none !important;
  }
}
@media print {
  #vstNavProgress,
  #vstPageLoader,
  #vstSplitReveal,
  #cal-skeleton-overlay {
    display: none !important;
  }
}