/* ==========================================================================
   0. RESET, VARIABEL GLOBAL & UTILITAS
   ========================================================================== */
:root {
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-light: #ccfbf1;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.45;
  font-size: 15px;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

.hidden {
  display: none !important;
}

.app-view {
  min-height: 100vh;
  padding-bottom: 32px;
}

/* ==========================================================================
   1. SIDEBAR DRAWER NAVIGASI UTAMA
   ========================================================================== */
.sb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.sb-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sb-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 275px;
  max-width: 82vw;
  background: var(--bg-card);
  z-index: 950;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.sb-drawer.is-open {
  transform: translateX(0);
}

.sb-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
}

.sb-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  background: #ffffff;
  flex-shrink: 0;
}

.sb-store-info {
  flex: 1;
  min-width: 0;
}

.sb-store-name {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-store-sub {
  font-size: 0.78rem;
  opacity: 0.88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-close-btn {
  background: rgba(255, 255, 255, 0.16);
  border: none;
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 1.25rem;
  cursor: pointer;
}

.sb-nav {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sb-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.sb-link:hover {
  background: #f1f5f9;
}

.sb-link.is-active {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.sb-icon {
  font-size: 1.15rem;
}

.sb-badge-count {
  margin-left: auto;
  background: var(--danger);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

/* ==========================================================================
   2. TOPBAR UMUM UNTUK SEMUA HALAMAN
   ========================================================================== */
.mgmt-topbar,
.ksr-topbar,
.ksb-topbar,
.lpr-topbar,
.tb-topbar,
.ms-topbar,
.kb-topbar,
.plg-topbar,
.cfg-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.mgmt-topbar-title,
.ksr-topbar-title,
.ksb-topbar-title,
.lpr-topbar-title,
.tb-topbar-title,
.ms-topbar-title,
.kb-topbar-title,
.plg-topbar-title,
.cfg-topbar-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-main);
}

.mgmt-menu-toggle,
.ksr-menu-toggle,
.ksb-menu-toggle,
.lpr-menu-toggle,
.tb-back-btn,
.ms-back-btn,
.kb-back-btn,
.plg-back-btn,
.app-back-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.mgmt-menu-toggle:active,
.tb-back-btn:active,
.app-back-btn:active {
  background: #f1f5f9;
}

.mgmt-topbar-spacer,
.ksr-topbar-spacer,
.ksb-topbar-spacer,
.lpr-topbar-spacer,
.ms-topbar-spacer,
.kb-topbar-spacer,
.plg-topbar-spacer,
.cfg-topbar-spacer {
  width: 38px;
}

/* ==========================================================================
   3. SETUP TOKO AWAL (VIEW-SETUP)
   ========================================================================== */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(160deg, #f0fdfa 0%, #e2e8f0 100%);
}

#box-setup-admin {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border-radius: 18px;
  padding: 26px 22px;
  box-shadow: var(--shadow-lg);
}

#box-setup-admin h2 {
  font-size: 1.4rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
}

.setup-subtitle {
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.auth-alert-error {
  background: var(--danger-light);
  color: var(--danger);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  margin-bottom: 14px;
}

.logo-picker {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.logo-picker-btn {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 20px;
  border: 2px dashed #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  background: #f8fafc;
}

.logo-picker-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-picker-plus {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#form-setup-admin .form-group {
  margin-bottom: 14px;
}

#form-setup-admin label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: #334155;
}

#form-setup-admin input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
}

#form-setup-admin input:focus {
  border-color: var(--primary);
}

#form-setup-admin button[type="submit"] {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

/* ==========================================================================
   4. MENU DAFTAR (MANAJEMEN, LAPORAN & PENGATURAN UTAMA)
   ========================================================================== */
.mgmt-main {
  padding: 16px;
}

.mgmt-menu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mgmt-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: left;
  transition: transform 0.12s ease, border-color 0.15s ease;
}

.mgmt-menu-item:active {
  transform: scale(0.99);
  border-color: var(--primary);
}

.mgmt-menu-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.mgmt-menu-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mgmt-menu-text strong,
.mgmt-menu-label {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
}

.mgmt-menu-text span {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.mgmt-menu-arrow {
  font-size: 1.3rem;
  color: #94a3b8;
  font-weight: 600;
}

/* ==========================================================================
   5. TOOLBAR PENCARIAN & SORTIR (KASIR, BARANG, STOCK, PELANGGAN)
   ========================================================================== */
.ksr-toolbar,
.tb-toolbar,
.ms-toolbar,
.plg-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.tb-sort-wrap,
.ms-sort-wrap {
  flex-shrink: 0;
}

.tb-sort-select,
.ms-sort-select {
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.ksr-search-wrap,
.tb-search-wrap,
.ms-search-wrap,
.plg-search-wrap {
  flex: 1;
}

.ksr-search-input,
.tb-search-input,
.ms-search-input,
.plg-search-input,
.ksb-search-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.9rem;
  outline: none;
}

.ksr-search-input:focus,
.tb-search-input:focus,
.ms-search-input:focus,
.plg-search-input:focus,
.ksb-search-input:focus {
  border-color: var(--primary);
  background: #ffffff;
}

.ksr-cat-wrap {
  flex: 0 0 auto;
  min-width: 118px;
  max-width: 138px;
}

.ksr-cat-select {
  width: 100%;
  height: 40px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background-color: #ffffff;
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 500;
}

.ksr-scan-btn,
.tb-scan-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* ==========================================================================
   6. HALAMAN KASIR, LACI KAS AWAL, ALERT STOK & KATALOG BARANG
   ========================================================================== */
#view-kasir .ksr-drawer-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  margin: 8px 12px;
  border-radius: 10px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  font-size: 12px;
  color: #0f172a;
}

#view-kasir .ksr-drawer-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
}

#view-kasir .ksr-drawer-meta span:last-child {
  font-weight: 600;
  color: #0f766e;
}

#view-kasir .ksr-drawer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

#view-kasir .ksr-rekap-btn {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #0f172a;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

#view-kasir .ksr-drawer-btn {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #0d9488;
  background: #0d9488;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

#view-kasir .ksr-drawer-btn:active,
#view-kasir .ksr-rekap-btn:active {
  opacity: 0.85;
}

#view-kasir .ksr-alert-strip {
  margin: 0 12px 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.ksr-main {
  padding: 4px 0 0;
}

#view-kasir #list-ksr-barang {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 12px 92px;
}

.tb-list,
.ms-list,
.kb-list,
.plg-list,
.ksb-list,
.lpr-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#view-kasir .ksr-product-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

#view-kasir .ksr-product-info {
  flex: 1;
  min-width: 0;
}

#view-kasir .ksr-product-title {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

#view-kasir .ksr-product-sub {
  margin: 0 0 6px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.3;
}

#view-kasir .ksr-product-price {
  font-size: 14px;
  font-weight: 700;
  color: #0f766e;
  line-height: 1.35;
}

#view-kasir .ksr-pack-note {
  margin-top: 3px;
  font-size: 11px;
  color: #475569;
  line-height: 1.3;
}

#view-kasir .ksr-product-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

#view-kasir .ksr-stock-text {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
}

#view-kasir .ksr-stock-text.is-empty {
  background: #fee2e2;
  color: #b91c1c;
}

#view-kasir .ksr-add-btn-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

#view-kasir .ksr-add-btn {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #0d9488;
  background: #0d9488;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

#view-kasir .ksr-add-btn.ksr-add-pack-btn {
  background: #f0fdfa;
  color: #0f766e;
  border-color: #5eead4;
}

#view-kasir .ksr-add-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tb-item-card,
.ms-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}

.tb-item-info,
.ms-item-info {
  flex: 1;
  min-width: 0;
}

.tb-item-title,
.ms-item-title,
.plg-item-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.tb-item-sub,
.ms-item-sub,
.plg-item-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.tb-item-price,
.ms-item-price {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 4px;
}

.ksr-cart-fab-wrap {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 200;
}

#view-tambah-barang .tb-fab-wrap,
.tb-fab-wrap,
#view-pelanggan .plg-fab-wrap,
.plg-fab-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  pointer-events: none;
  z-index: 200;
}

#view-tambah-barang .tb-fab-wrap .tb-fab-btn,
.tb-fab-wrap .tb-fab-btn,
#view-pelanggan .plg-fab-wrap .plg-fab-btn,
.plg-fab-wrap .plg-fab-btn {
  pointer-events: auto;
}

.ksr-cart-fab,
.tb-fab-btn,
.plg-fab-btn {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #ffffff;
  font-size: 1.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}

.ksr-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* QRIS Statis Preview di Keranjang */
.ksr-qris-box {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  text-align: center;
}

.ksr-qris-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.ksr-qris-img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 4px;
  margin: 0 auto 6px;
  display: block;
}

.ksr-qris-hint {
  font-size: 0.75rem;
  color: #475569;
}

/* ==========================================================================
   7. MODAL OVERLAY & FORM DI DALAM MODAL
   ========================================================================== */
.ksr-modal-overlay,
.tb-modal-overlay,
.ms-modal-overlay,
.plg-modal-overlay,
.ksb-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.ksr-modal-overlay.is-open,
.tb-modal-overlay.is-open,
.ms-modal-overlay.is-open,
.plg-modal-overlay.is-open,
.ksb-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ksr-modal-box,
.tb-modal-box,
.ms-modal-box,
.plg-modal-box,
.ksb-modal-box {
  width: 100%;
  max-width: 500px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  padding: 18px 16px 24px;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 540px) {
  .ksr-modal-overlay,
  .tb-modal-overlay,
  .ms-modal-overlay,
  .plg-modal-overlay,
  .ksb-modal-overlay {
    align-items: center;
    padding: 16px;
  }

  .ksr-modal-box,
  .tb-modal-box,
  .ms-modal-box,
  .plg-modal-box,
  .ksb-modal-box {
    border-radius: 18px;
  }
}

.ksr-modal-header,
.tb-modal-header,
.ms-modal-header,
.plg-modal-header,
.ksb-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.ksr-modal-title,
.tb-modal-title,
.ms-modal-title,
.plg-modal-title,
.ksb-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.ksr-modal-close,
.tb-modal-close,
.ms-modal-close,
.plg-modal-close,
.ksb-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f1f5f9;
  color: var(--text-main);
  border-radius: 8px;
  font-size: 1.3rem;
  cursor: pointer;
}

.ksr-form-row,
.tb-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.ksr-form-group,
.tb-form-group,
.ms-form-group,
.plg-form-group,
.ksb-form-group,
.cfg-form-group {
  margin-bottom: 12px;
}

.ksr-label,
.tb-label,
.ms-label,
.plg-label,
.ksb-label,
.cfg-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.ksr-input,
.ksr-select,
.tb-input,
.tb-select,
.ms-input,
.ms-select,
.plg-input,
.plg-textarea,
.ksb-input,
.cfg-input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #ffffff;
  color: var(--text-main);
  outline: none;
}

.ksr-input:focus,
.tb-input:focus,
.ms-input:focus,
.plg-input:focus,
.ksb-input:focus,
.cfg-input:focus {
  border-color: var(--primary);
}

.ksr-cart-items {
  max-height: 220px;
  overflow-y: auto;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  margin: 10px 0;
}

.ksr-cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
}

.ksr-cart-item:last-child {
  border-bottom: none;
}

.ksr-cart-item-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.ksr-cart-item-price {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ksr-qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ksr-qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 7px;
  font-weight: 700;
  cursor: pointer;
}

.ksr-qty-input {
  width: 52px;
  height: 28px;
  text-align: center;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-main);
  background: #ffffff;
  padding: 0 4px;
}

.ksr-qty-input:focus {
  border-color: var(--primary);
  outline: none;
}

.ksr-checkout-summary {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
}

.ksr-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.ksr-kembalian-row {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #cbd5e1;
  color: var(--primary-dark);
}

.ksr-kasbon-box {
  background: var(--warning-light);
  border: 1px solid #fcd34d;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}

.ksr-kasbon-note {
  font-size: 0.8rem;
  color: #92400e;
  margin-bottom: 8px;
}

.ksr-modal-actions,
.tb-modal-actions,
.ms-modal-actions,
.plg-modal-actions,
.ksb-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin-top: 12px;
}

#modal-rekap-harian .ksr-modal-actions {
  grid-template-columns: 1fr 1fr;
}

.ksr-modal-actions-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 8px;
  margin-top: 12px;
}

.ksr-btn-primary,
.tb-btn-primary,
.ms-btn-primary,
.plg-btn-primary,
.ksb-btn-primary,
.cfg-btn-primary {
  width: 100%;
  padding: 11px 14px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.ksr-btn-secondary,
.tb-btn-secondary,
.ms-btn-secondary,
.plg-btn-secondary,
.ksb-btn-secondary,
.cfg-btn-secondary {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--text-main);
  font-weight: 600;
  cursor: pointer;
}

.ksr-btn-hold {
  border: 1px solid #f59e0b;
  background: #fef3c7;
  color: #92400e;
  font-weight: 600;
  border-radius: 10px;
  padding: 11px 8px;
  cursor: pointer;
}

.ksr-btn-wa {
  width: 100%;
  padding: 11px 14px;
  border: none;
  border-radius: 10px;
  background: #16a34a;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.ksr-scanner-viewport {
  position: relative;
  width: 100%;
  height: 220px;
  background: #0f172a;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}

.ksr-scanner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ksr-scanner-line {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 2px;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.ksr-scanner-status {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 0.76rem;
  text-align: center;
}

.ksr-scan-manual-row {
  display: flex;
  gap: 8px;
}

.ksr-scan-submit-btn,
.tb-scan-submit-btn {
  width: auto;
  padding: 9px 16px;
}

/* ==========================================================================
   8. TAMBAH BARANG, STOCK, KATEGORI & PELANGGAN
   ========================================================================== */
.tb-main,
.ms-main,
.kb-main,
.plg-main,
.ksb-main,
.lpr-main,
.cfg-main {
  padding: 14px 14px 86px;
}

.ms-alert-box {
  padding: 0 14px;
}

.ms-alert-warn {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
}

.ms-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ksr-low-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 700;
}

.ms-combo-alert {
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #b91c1c;
}

.tb-more-wrap {
  position: relative;
}

.tb-more-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  color: var(--text-main);
  border-radius: 10px;
  cursor: pointer;
}

.tb-more-menu {
  position: absolute;
  right: 0;
  top: 42px;
  width: 185px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: none;
  z-index: 300;
}

.tb-more-menu.is-open {
  display: block;
}

.tb-more-item {
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
}

.tb-more-item:hover {
  background: #f1f5f9;
}

.tb-file-input,
.plg-file-input {
  display: none;
}

.tb-kode-row {
  display: flex;
  gap: 8px;
}

.tb-scan-input-btn {
  width: 44px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.tb-item-right,
.ms-right-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.tb-stock-badge,
.ms-stock-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-dark);
}

.tb-stock-badge.is-low,
.ms-stock-badge.is-low {
  background: var(--warning-light);
  color: var(--warning);
}

.ms-stock-badge.is-empty {
  background: var(--danger-light);
  color: var(--danger);
}

.tb-item-actions,
.plg-item-actions {
  display: flex;
  gap: 6px;
}

.tb-btn-edit,
.plg-btn-edit {
  padding: 5px 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--text-main);
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.tb-btn-delete,
.plg-btn-delete,
.kb-btn-delete {
  padding: 5px 10px;
  border: 1px solid #fecaca;
  background: var(--danger-light);
  color: var(--danger);
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.ms-btn-adjust {
  padding: 6px 10px;
  border: none;
  background: var(--primary);
  color: #ffffff;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.ms-adj-product-name {
  font-weight: 700;
  font-size: 1rem;
}

.ms-adj-current {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.kb-add-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.kb-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
}

.kb-add-btn {
  width: 44px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
}

.kb-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.kb-item-name {
  font-weight: 600;
}

.plg-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.plg-item-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.plg-item-info {
  flex: 1;
  min-width: 0;
}

.plg-item-address {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.plg-photo-picker,
.cfg-logo-picker {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.plg-photo-label,
.cfg-logo-label {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 2px dashed #94a3b8;
  overflow: hidden;
  cursor: pointer;
}

.plg-photo-preview,
.cfg-logo-label img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plg-photo-badge,
.cfg-logo-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ksr-empty-state,
.tb-empty-state,
.ms-empty-state,
.kb-empty-state,
.plg-empty-state,
.ksb-empty-state,
.lpr-empty-state,
.ksr-cart-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   9. HALAMAN KASBON & LAPORAN
   ========================================================================== */
.ksb-toolbar,
.lpr-toolbar {
  padding: 10px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.ksb-filter-group,
.lpr-filter-group {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.ksb-toolbar .ksb-filter-group {
  margin-bottom: 8px;
}

.ksb-filter-btn,
.lpr-filter-btn,
.lpr-kas-filter-btn {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
}

.ksb-filter-btn.is-active,
.lpr-filter-btn.is-active,
.lpr-kas-filter-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.ksb-summary-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.ksb-summary-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ksb-summary-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--danger);
}

.ksb-summary-count {
  background: #f1f5f9;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
}

.ksb-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.ksb-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.ksb-cust-name {
  font-size: 0.98rem;
  font-weight: 700;
}

.ksb-cust-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.ksb-status-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
}

.ksb-status-badge.is-unpaid {
  background: var(--danger-light);
  color: var(--danger);
}

.ksb-status-badge.is-paid {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.ksb-items-summary {
  font-size: 0.8rem;
  color: #475569;
  background: #f8fafc;
  padding: 6px 8px;
  border-radius: 7px;
  margin-bottom: 10px;
}

.ksb-amounts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px 0;
  border-top: 1px dashed var(--border-color);
  border-bottom: 1px dashed var(--border-color);
  margin-bottom: 10px;
}

.ksb-amounts-grid span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.ksb-amounts-grid strong {
  font-size: 0.84rem;
}

.ksb-amounts-grid strong.is-sisa {
  color: var(--danger);
}

.ksb-card-actions {
  display: flex;
  gap: 8px;
}

.ksb-btn-struk,
.ksb-btn-wa,
.ksb-btn-pay {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}

.ksb-btn-wa {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.ksb-btn-pay {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.ksb-info-box {
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.ksb-quick-pay {
  margin-bottom: 10px;
}

.ksb-quick-btn {
  padding: 6px 12px;
  border: 1px solid var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.lpr-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.lpr-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}

.lpr-stat-label {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.lpr-stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.lpr-stat-value.is-teal {
  color: var(--primary-dark);
}

.lpr-stat-value.is-sky {
  color: #0284c7;
}

.lpr-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #334155;
}

.lpr-trx-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
}

.lpr-trx-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.lpr-trx-id {
  font-weight: 700;
  font-size: 0.88rem;
}

.lpr-trx-total {
  font-weight: 800;
  color: var(--primary-dark);
}

.lpr-trx-meta,
.lpr-trx-items {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.lpr-void-actions-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.lpr-btn-retur {
  padding: 5px 10px;
  border: 1px solid #fcd34d;
  background: #fef3c7;
  color: #92400e;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   10. PENGATURAN, PRINTER BOTTOM SHEET & STRUK KERTAS
   ========================================================================== */
.cfg-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}

.cfg-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.cfg-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.cfg-storage-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 0.8rem;
  color: #334155;
}

.cfg-storage-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0;
}

.cfg-storage-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.cfg-btn-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cfg-btn-danger {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: var(--danger-light);
  color: var(--danger);
  font-weight: 700;
  cursor: pointer;
}

.cfg-qris-preview-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.cfg-qris-thumb {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  padding: 4px;
}

.prt-main {
  padding: 16px 16px 90px;
}

.prt-preview-caption {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.prt-preview-wrap {
  display: flex;
  justify-content: center;
}

.prt-bottom-trigger-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  z-index: 200;
}

.prt-bottom-trigger-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.prt-trigger-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prt-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 950;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.prt-sheet-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.prt-bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  padding: 10px 16px 24px;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  box-shadow: var(--shadow-lg);
}

.prt-bottom-sheet.is-open {
  transform: translateY(0);
}

.prt-sheet-handle {
  width: 42px;
  height: 5px;
  background: #cbd5e1;
  border-radius: 999px;
  margin: 0 auto 10px;
  cursor: pointer;
}

.prt-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.prt-sheet-title {
  font-size: 1rem;
  font-weight: 700;
}

.prt-setting-block,
.prt-bar-item {
  margin-bottom: 14px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.prt-bar-head,
.prt-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.prt-bar-row {
  margin-bottom: 0;
}

.prt-bar-title {
  font-weight: 700;
  font-size: 0.88rem;
}

.prt-bar-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.prt-bar-status {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.prt-radio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.prt-choice-btn {
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.prt-choice-btn.is-active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}

.prt-bar-clickable {
  cursor: pointer;
}

.prt-select-pill {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
}

.prt-fallback-preview {
  max-height: 52vh;
  overflow-y: auto;
  background: #f1f5f9;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
}

.receipt-paper {
  width: 100%;
  max-width: 300px;
  margin: 0 auto 14px;
  padding: 14px 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  color: #000000;
  line-height: 1.4;
}

.receipt-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.receipt-actions.receipt-actions-3 {
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 8px;
}

.rcp-wrap,
#receipt-paper > div,
#prt-sample-receipt > div,
#print-area > div {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 58mm;
  margin: 0 auto;
  font-family: monospace, sans-serif;
  font-size: 12px;
  color: #000000;
  background: #ffffff;
}

.rcp-wrap.rcp-paper-80mm,
#receipt-paper > div.rcp-paper-80mm,
#prt-sample-receipt > div.rcp-paper-80mm,
#print-area > div.rcp-paper-80mm {
  max-width: 80mm;
}

.rcp-wrap.rcp-paper-88mm,
#receipt-paper > div.rcp-paper-88mm,
#prt-sample-receipt > div.rcp-paper-88mm,
#print-area > div.rcp-paper-88mm {
  max-width: 88mm;
}

.rcp-wrap.rcp-paper-auto,
#receipt-paper > div.rcp-paper-auto,
#prt-sample-receipt > div.rcp-paper-auto,
#print-area > div.rcp-paper-auto {
  max-width: 100%;
}

.rcp-header {
  text-align: center;
}

.rcp-logo {
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
  margin: 0 auto 4px;
  display: block;
}

.rcp-store-name {
  font-size: 14px;
  font-weight: 700;
}

.rcp-sub,
.rcp-meta,
.rcp-footer {
  font-size: 11px;
  line-height: 1.4;
}

.rcp-footer {
  text-align: center;
  margin-top: 6px;
}

.rcp-divider {
  border-top: 1px dashed #000000;
  margin: 6px 0;
}

.rcp-item {
  margin-bottom: 4px;
}

.rcp-item-name {
  font-weight: 600;
}

.rcp-item-meta,
.rcp-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}

.rcp-total,
.rcp-bold {
  font-weight: 700;
  font-size: 12px;
}

.rcp-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-26deg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.14;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 1;
}

.rcp-watermark-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px dashed #000000;
  border-radius: 6px;
  background: transparent;
}

.rcp-watermark-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.rcp-watermark-text {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #000000;
}

.rcp-wrap > *:not(.rcp-watermark),
#receipt-paper > div > *:not(.rcp-watermark),
#prt-sample-receipt > div > *:not(.rcp-watermark),
#print-area > div > *:not(.rcp-watermark) {
  position: relative;
  z-index: 2;
}

#print-area .rcp-logo,
#print-area .rcp-watermark-logo,
#print-area img,
#receipt-paper .rcp-logo,
#receipt-paper .rcp-watermark-logo,
#prt-sample-receipt .rcp-logo,
#prt-sample-receipt .rcp-watermark-logo {
  filter: grayscale(100%) contrast(175%) !important;
  -webkit-filter: grayscale(100%) contrast(175%) !important;
}

/* ==========================================================================
   11. ANTREAN HOLD, QUICK CASH, GROSIR, STOK MINIMUM & REKAP TUTUP HARIAN
   ========================================================================== */
.ksr-hold-list-btn {
  position: relative;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.ksr-hold-badge {
  display: inline-block;
  background: #f59e0b;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 4px;
}

.ksr-quick-cash-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.ksr-quick-cash-btn {
  flex: 1;
  min-width: 56px;
  padding: 6px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #0f172a;
  border-radius: 6px;
  cursor: pointer;
}

.ksr-hold-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
}

#view-kasir #modal-daftar-hold .ksr-hold-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

#view-kasir #modal-daftar-hold .ksr-hold-info {
  flex: 1;
  min-width: 0;
}

#view-kasir #modal-daftar-hold .ksr-hold-info strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
  margin-bottom: 2px;
}

#view-kasir #modal-daftar-hold .ksr-hold-info p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

#view-kasir #modal-daftar-hold .ksr-hold-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#view-kasir #modal-daftar-hold .ksr-hold-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-width: 74px;
  padding: 0 12px;
  margin: 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}

#view-kasir #modal-daftar-hold .ksr-hold-actions .ksr-btn-primary {
  background: #0f766e;
  border: 1px solid #0f766e;
  color: #ffffff;
}

#view-kasir #modal-daftar-hold .ksr-hold-actions .tb-btn-delete {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
}

.bk-row-low-stock,
.bk-card-low-stock,
.ksr-product-card.is-low-stock,
.ms-item-card.is-low-stock {
  border: 1.5px solid #dc2626 !important;
  background: #fef2f2 !important;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.12) !important;
}

.bk-low-stock-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  font-size: 11px;
  font-weight: 700;
}

.bk-grosir-tag,
.tb-grosir-tag {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 11px;
  font-weight: 600;
}

.bk-rekap-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 14px;
}

.bk-rekap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  color: #0f172a;
}

.bk-rekap-row.is-highlight {
  background: #f0fdfa;
  border-color: #5eead4;
  font-size: 14px;
}

.tb-grosir-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 12px;
}

.tb-grosir-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.tb-exp-badge {
  display: inline-block;
  margin-top: 4px;
  margin-left: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 6px;
}

.tb-exp-badge.is-soon {
  color: #92400e;
  background: #fef3c7;
}

.tb-exp-badge.is-expired {
  color: #b91c1c;
  background: #fee2e2;
}

/* ==========================================================================
   12. LAPORAN TAMBAHAN (GRAFIK, TERLARIS, PENGELUARAN & VOID)
   ========================================================================== */
.lpr-export-btn {
  border: 1px solid #0d9488;
  background: #ccfbf1;
  color: #115e59;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.lpr-custom-date-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.lpr-date-input {
  flex: 1;
  min-width: 115px;
  padding: 7px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.82rem;
}

.lpr-date-apply-btn {
  padding: 7px 12px;
  border: none;
  border-radius: 8px;
  background: #0f766e;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
}

.lpr-chart-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.lpr-bar-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  align-items: end;
  height: 160px;
  padding-top: 16px;
}

.lpr-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 4px;
}

.lpr-bar-val {
  font-size: 0.68rem;
  font-weight: 600;
  color: #475569;
}

.lpr-bar-track {
  width: 100%;
  max-width: 28px;
  height: 105px;
  background: #f1f5f9;
  border-radius: 6px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.lpr-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #14b8a6, #0f766e);
  border-radius: 6px 6px 0 0;
  transition: height 0.25s ease;
}

.lpr-bar-lbl {
  font-size: 0.68rem;
  color: #64748b;
  text-align: center;
}

.lpr-top-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lpr-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  background: #f8fafc;
}

.lpr-top-rank {
  font-weight: 800;
  font-size: 0.85rem;
  color: #0f766e;
  min-width: 26px;
}

.lpr-top-info {
  flex: 1;
}

.lpr-top-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #0f172a;
}

.lpr-top-sub {
  font-size: 0.76rem;
  color: #64748b;
}

.lpr-top-qty {
  font-size: 0.78rem;
  font-weight: 700;
  background: #ccfbf1;
  color: #115e59;
  padding: 3px 8px;
  border-radius: 999px;
}

.lpr-expense-form {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.lpr-expense-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.lpr-exp-amount {
  font-weight: 700;
  color: #dc2626;
}

.lpr-exp-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.lpr-trx-card.is-void {
  opacity: 0.65;
  background: #fef2f2;
  border-color: #fecaca;
}

.lpr-void-hint {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 12px;
}

.lpr-void-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #b91c1c;
  background: #fee2e2;
  padding: 3px 8px;
  border-radius: 6px;
}

/* ==========================================================================
   13. CETAK LABEL BARCODE & MEDIA PRINT
   ========================================================================== */
.lbl-main {
  padding: 14px 16px 32px;
}

.lbl-preview-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
}

.lbl-preview-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 10px;
}

.lbl-preview-grid,
.lbl-print-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
  gap: 8px;
}

.lbl-sticker-item {
  border: 1px dashed #64748b;
  border-radius: 6px;
  padding: 6px 8px;
  text-align: center;
  background: #ffffff;
  color: #000000;
}

.lbl-sticker-name {
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lbl-barcode-svg {
  width: 100%;
  height: 26px;
  margin: 4px 0 2px;
}

.lbl-sticker-code {
  font-size: 0.68rem;
  font-family: monospace;
}

.lbl-sticker-price {
  font-size: 0.82rem;
  font-weight: 800;
  margin-top: 2px;
}

#print-area {
  display: none;
}

@media print {
  body > *:not(#print-area) {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #print-area {
    display: block !important;
    width: 100% !important;
    max-width: 58mm !important;
    margin: 0 auto !important;
    padding: 4px !important;
    font-family: "Courier New", Courier, monospace !important;
    font-size: 11px !important;
    color: #000000 !important;
  }

  .rcp-logo,
  .rcp-watermark-logo,
  #print-area .rcp-logo,
  #print-area .rcp-watermark-logo,
  #print-area img {
    filter: grayscale(100%) contrast(175%) !important;
    -webkit-filter: grayscale(100%) contrast(175%) !important;
  }

  .rcp-watermark {
    opacity: 0.12 !important;
  }
}

/* ==========================================================================
   14. LAYOUT FORM MODAL TAMBAH / EDIT BARANG (SELARAS 2 KOLOM PENUH)
   ========================================================================== */
#modal-tb-barang .tb-modal-box,
#form-tb-barang {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#form-tb-barang .tb-form-group,
#form-tb-barang .form-group,
#form-tb-barang .ksr-form-group,
#form-tb-barang .tb-full-row {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  grid-column: 1 / -1 !important;
  box-sizing: border-box !important;
}

#form-tb-barang .tb-grid-2,
#form-tb-barang #tb-price-row,
#form-tb-barang #tb-grosir-row > .tb-grid-2 {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  align-items: start !important;
}

#form-tb-barang .tb-grid-2 > .tb-col,
#form-tb-barang .tb-grid-2 > div,
#form-tb-barang #tb-price-row > div,
#form-tb-barang #tb-grosir-row .tb-col {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

#form-tb-barang label {
  display: block !important;
  width: 100% !important;
  margin-bottom: 6px !important;
  line-height: 1.35 !important;
  white-space: normal !important;
}

#form-tb-barang input:not([type="checkbox"]):not([type="radio"]),
#form-tb-barang select,
#form-tb-barang textarea,
#tb-harga-modal,
#tb-harga-jual,
#tb-min-grosir,
#tb-harga-grosir,
#tb-stock,
#tb-min-stock,
#tb-satuan {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex: 1 1 0 !important;
  box-sizing: border-box !important;
}

#form-tb-barang .tb-hint,
#form-tb-barang small {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 6px !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}
