/* SC Konter HP — gaya tambahan di atas Bootstrap 5 (self-host). */
:root {
  --kh-primer: #0f3d63;
  --kh-primer-2: #134e7d;
  --kh-aksen: #18a0fb;
  --kh-latar: #f3f6f9;
}
body.kh-app { background: var(--kh-latar); min-height: 100vh; }
.kh-topbar { background: var(--kh-primer); position: sticky; top: 0; z-index: 1030; }
.kh-sidebar { background: var(--kh-primer); color: #dce8f3; width: 260px; min-height: 100vh; flex-shrink: 0; }
@media (min-width: 992px) {
  .kh-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}
/* Scrollbar sidebar: tipis, menyatu dengan navy, baru tampak saat kursor di sidebar
   (bawaan browser = jalur terang + panah, terlihat seperti tempelan). */
.kh-sidebar, .kh-sidebar .offcanvas-body { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.kh-sidebar:hover, .kh-sidebar:hover .offcanvas-body, .kh-sidebar:focus-within { scrollbar-color: rgba(255,255,255,.28) transparent; }
.kh-sidebar::-webkit-scrollbar, .kh-sidebar .offcanvas-body::-webkit-scrollbar { width: 6px; }
.kh-sidebar::-webkit-scrollbar-track, .kh-sidebar .offcanvas-body::-webkit-scrollbar-track { background: transparent; }
.kh-sidebar::-webkit-scrollbar-button, .kh-sidebar .offcanvas-body::-webkit-scrollbar-button { display: none; height: 0; }
.kh-sidebar::-webkit-scrollbar-thumb, .kh-sidebar .offcanvas-body::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.kh-sidebar:hover::-webkit-scrollbar-thumb, .kh-sidebar:hover .offcanvas-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); }
.kh-sidebar::-webkit-scrollbar-thumb:hover, .kh-sidebar .offcanvas-body::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.45); }
.kh-sidebar.offcanvas-lg { --bs-offcanvas-bg: var(--kh-primer); --bs-offcanvas-width: 270px; background-color: var(--kh-primer) !important; }
.kh-brand { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1rem .8rem; color: #fff; text-decoration: none; font-size: 1.15rem; }
.kh-brand i { font-size: 1.5rem; color: var(--kh-aksen); }
.kh-brand b { color: var(--kh-aksen); }
.kh-muted { color: #9fb7cc; }
.kh-toko { border-bottom: 1px solid rgba(255,255,255,.08); }
.kh-nav { padding: .5rem 0; }
.kh-nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #86a3bd; padding: .9rem 1rem .3rem; }
.kh-nav a { display: flex; align-items: center; gap: .7rem; padding: .5rem 1rem; margin: 1px .5rem; border-radius: .5rem; color: #dce8f3; text-decoration: none; font-size: .93rem; }
.kh-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.kh-nav a.active { background: var(--kh-primer-2); color: #fff; box-shadow: inset 3px 0 0 var(--kh-aksen); }
.kh-nav a i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
/* Kelompok menu dropdown (Bootstrap collapse, satu terbuka sekaligus). */
.kh-grup { margin-top: 2px; }
.kh-grup-tombol { display: flex; align-items: center; gap: .7rem; width: calc(100% - 1rem); margin: 1px .5rem; padding: .55rem 1rem;
  background: none; border: 0; border-radius: .5rem; color: #b9cde0; font-size: .8rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; text-align: left; }
.kh-grup-tombol:hover { background: rgba(255,255,255,.08); color: #fff; }
.kh-grup-tombol:focus-visible { outline: 2px solid var(--kh-aksen); outline-offset: -2px; }
.kh-grup-tombol > i:first-child { font-size: 1.05rem; width: 1.2rem; text-align: center; color: #86a3bd; }
.kh-grup-tombol:not(.collapsed) { color: #fff; }
.kh-grup-tombol:not(.collapsed) > i:first-child { color: var(--kh-aksen); }
.kh-grup-badge { margin-left: auto; font-size: .68rem; letter-spacing: 0; }
.kh-grup-panah { margin-left: auto; font-size: .75rem; transition: transform .2s ease; }
.kh-grup-badge + .kh-grup-panah { margin-left: .4rem; }
.kh-grup-tombol:not(.collapsed) .kh-grup-panah { transform: rotate(180deg); }
.kh-grup-isi { padding: 2px 0 6px; }
.kh-grup-isi a { padding-left: 1.6rem; font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { .kh-grup-panah { transition: none; } }
/* Tab laporan berkelompok (dropdown). */
.kh-tab-laporan .kh-tab-sub { color: var(--bs-secondary-color); font-weight: 400; }
.kh-tab-laporan .nav-link.active { font-weight: 600; }
.kh-tab-laporan .dropdown-item.active, .kh-tab-laporan .dropdown-item:active { background: var(--kh-primer); }
@media (max-width: 575.98px) { .kh-tab-laporan .kh-tab-sub { display: none; } }
.kh-user { border-top: 1px solid rgba(255,255,255,.08); }
.kh-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--kh-aksen); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.kh-main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.kh-main > .container-fluid { flex: 1; }
.kh-footer { border-top: 1px solid #e3e8ee; }
.card { border: 0; box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08); }
.kh-stat .ikon { width: 44px; height: 44px; border-radius: .75rem; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.kh-stat .angka { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.table > :not(caption) > * > * { padding: .55rem .7rem; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #5b6b7b; background: #f8fafc; white-space: nowrap; }
.kh-mono { font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .9em; }
.kh-hak th, .kh-hak td { text-align: center; vertical-align: middle; }
.kh-hak th:first-child, .kh-hak td:first-child { text-align: left; }
.kh-hak .form-check-input { width: 1.25em; height: 1.25em; cursor: pointer; }
.btn-salin { padding: 0 .35rem; line-height: 1.2; }
body.kh-polos { background: linear-gradient(160deg, #0f3d63 0%, #134e7d 40%, #f3f6f9 40.1%); min-height: 100vh; }
.kh-polos-brand { color: #fff; font-size: 1.6rem; }
.kh-polos-brand i { color: var(--kh-aksen); font-size: 2rem; }
.kh-polos-brand b { color: var(--kh-aksen); }
.stok-minus { color: #dc3545; font-weight: 600; }
.stok-tipis { color: #b26a00; font-weight: 600; }
.table-responsive { -webkit-overflow-scrolling: touch; }
@media (max-width: 575.98px) {
  .kh-stat .angka { font-size: 1.25rem; }
  .table { font-size: .9rem; }
}
.kh-w-qty { width: 7rem; }
.kh-w-uang { width: 9rem; }
.kh-kasir-hasil { max-height: 320px; overflow-y: auto; }
.table-danger-soft td { background: #fff5f5; }
.jt-lewat { color: #dc3545; font-weight: 600; }
/* struk & faktur cetak */
body.kh-struk { background: #eef1f4; font-family: "Courier New", Consolas, monospace; font-size: 12px; color: #000; }
.struk { background: #fff; margin: 16px auto; padding: 10px 8px; }
.struk-58 { width: 58mm; }
.struk-80 { width: 80mm; }
.struk h1 { font-size: 14px; margin: 0; text-align: center; font-weight: 700; }
.struk .tengah { text-align: center; }
.struk .garis { border-top: 1px dashed #000; margin: 6px 0; }
.struk table { width: 100%; border-collapse: collapse; }
.struk td { padding: 1px 0; vertical-align: top; }
.struk .kanan { text-align: right; white-space: nowrap; }
.struk .kecil { font-size: 10px; }
body.kh-faktur { background: #eef1f4; }
.faktur { background: #fff; width: 210mm; min-height: 270mm; margin: 16px auto; padding: 16mm; }
.cetak-alat { text-align: center; margin: 12px; font-family: system-ui, sans-serif; }
@media print {
  body.kh-struk, body.kh-faktur { background: #fff; }
  .struk, .faktur { margin: 0; box-shadow: none; }
  .cetak-alat { display: none; }
  @page { margin: 4mm; }
}
