/* ============================================
   KASIRA – POS Theme
   By IndoKoding.net
   Bootstrap 5 + Tabler Icons + Custom CSS
   ============================================ */

/* ── Variables ───────────────────────────── */
:root {
  --primary:         #059669;
  --primary-dark:    #047857;
  --primary-darker:  #065F46;
  --primary-light:   #ECFDF5;
  --primary-mid:     #A7F3D0;
  --secondary:       #1E293B;
  --dark:            #0F172A;
  --danger:          #EF4444;
  --danger-dark:     #DC2626;
  --warning:         #F59E0B;
  --info:            #0EA5E9;
  --success:         #059669;
  --white:           #FFFFFF;

  --gray-50:         #F8FAFC;
  --gray-100:        #F1F5F9;
  --gray-200:        #E2E8F0;
  --gray-300:        #CBD5E1;
  --gray-400:        #94A3B8;
  --gray-500:        #64748B;
  --gray-600:        #475569;
  --gray-700:        #334155;
  --gray-800:        #1E293B;
  --gray-900:        #0F172A;

  --sidebar-bg:      #0F172A;
  --sidebar-width:   240px;

  --font-base:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm:       6px;
  --radius:          8px;
  --radius-lg:       12px;
  --radius-xl:       16px;
  --shadow-sm:       0 1px 2px 0 rgba(0,0,0,.05);
  --shadow:          0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:       0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --shadow-xl:       0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
  --transition:      all .2s ease;
}

/* ── Base ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-base);
  font-size: .9375rem;
  color: var(--gray-700);
  background: var(--gray-50);
  line-height: 1.6;
  overflow-x: hidden;
}
h1,h2,h3,h4,h5,h6 { font-weight: 600; color: var(--dark); line-height: 1.3; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
img { max-width: 100%; }

/* ── Buttons ─────────────────────────────── */
.btn {
  font-family: var(--font-base);
  font-weight: 600;
  border-radius: var(--radius);
  padding: .55rem 1.25rem;
  transition: var(--transition);
  font-size: .875rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.btn-primary   { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover  { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(5,150,105,.3); }
.btn-success   { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-success:hover  { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-danger    { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover   { background: var(--danger-dark); border-color: var(--danger-dark); color: #fff; }
.btn-outline-secondary { border-color: var(--gray-300); color: var(--gray-600); }
.btn-outline-secondary:hover { background: var(--gray-100); border-color: var(--gray-400); color: var(--gray-700); }
.btn-outline-primary { border-color: var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary-light); }
.btn-light { background: var(--gray-100); border-color: var(--gray-200); color: var(--gray-700); }
.btn-light:hover { background: var(--gray-200); color: var(--dark); }
.btn-lg { padding: .75rem 1.5rem; font-size: .95rem; }
.btn-sm { padding: .35rem .85rem; font-size: .8rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; justify-content: center; }

/* ── ════════════════════════════════════════
   POS SCREEN (kasir.html)
   ════════════════════════════════════════ */

/* POS Header */
.pos-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: .65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.pos-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.pos-brand i { color: var(--primary); font-size: 1.4rem; }
.pos-brand span { color: var(--primary); }

.pos-header-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: .82rem;
  color: var(--gray-500);
}
.pos-header-info strong { color: var(--gray-700); }

.pos-user {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  padding: .35rem .65rem;
  border-radius: var(--radius);
  transition: var(--transition);
}
.pos-user:hover { background: var(--gray-100); }
.pos-user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 2px solid var(--primary-mid);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: .75rem;
  font-weight: 700;
}
.pos-user-name { font-size: .82rem; font-weight: 600; color: var(--gray-700); }

/* POS Main Layout */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  height: calc(100vh - 57px);
  overflow: hidden;
}

/* Product Section */
.pos-products {
  padding: 1.25rem;
  overflow-y: auto;
  background: var(--gray-50);
}
.pos-products::-webkit-scrollbar { width: 4px; }
.pos-products::-webkit-scrollbar-track { background: transparent; }
.pos-products::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 10px; }

/* Search Bar */
.pos-search-wrap { position: relative; margin-bottom: 1rem; }
.pos-search-wrap input {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: .65rem 1rem .65rem 2.75rem;
  font-size: .875rem;
  font-family: var(--font-base);
  width: 100%;
  background: var(--white);
  transition: var(--transition);
}
.pos-search-wrap input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5,150,105,.1);
}
.pos-search-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 1rem;
  pointer-events: none;
}

/* Category Filters */
.cat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}
.cat-filter-btn {
  padding: .35rem .9rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 100px;
  background: var(--white);
  font-size: .8rem;
  font-weight: 600;
  font-family: var(--font-base);
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.cat-filter-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.cat-filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Product Grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .875rem; }

/* Product Card */
.product-card-pos {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card-pos:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.product-card-pos.out-of-stock { opacity: .5; cursor: not-allowed; }
.product-card-pos.out-of-stock:hover { transform: none; box-shadow: none; border-color: var(--gray-200); }

.product-card-img {
  position: relative;
  background: var(--gray-100);
  height: 130px;
  overflow: hidden;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card-pos:hover .product-card-img img { transform: scale(1.05); }
.product-card-img .product-emoji { font-size: 3rem; display: flex; align-items: center; justify-content: center; height: 100%; }

.product-stock-badge {
  position: absolute;
  top: .4rem;
  right: .4rem;
  font-size: .68rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.92);
  color: var(--gray-600);
  box-shadow: var(--shadow-sm);
}
.product-stock-badge.low { color: var(--warning); }
.product-stock-badge.empty { color: var(--danger); }

.product-card-body {
  padding: .65rem .75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: .2rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-price {
  font-size: .9rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .5rem;
  margin-top: auto;
}

.btn-add-pos {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: .4rem;
  font-size: .78rem;
  font-weight: 600;
  font-family: var(--font-base);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
}
.btn-add-pos:hover { background: var(--primary-dark); }
.btn-add-pos:disabled { background: var(--gray-300); cursor: not-allowed; }

/* ── CART PANEL ──────────────────────────── */
.pos-cart {
  background: var(--white);
  border-left: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.cart-header {
  background: var(--primary);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.cart-header-title {
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.cart-count-badge {
  background: rgba(0,0,0,.2);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .1rem .55rem;
  border-radius: 100px;
}
.cart-clear-btn {
  background: rgba(255,255,255,.15);
  border: none;
  color: rgba(255,255,255,.8);
  font-size: .75rem;
  font-weight: 600;
  font-family: var(--font-base);
  padding: .25rem .65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.cart-clear-btn:hover { background: rgba(255,255,255,.25); color: #fff; }

/* Customer selector */
.cart-customer {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
}
.cart-customer select {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: .45rem .85rem;
  font-size: .82rem;
  font-family: var(--font-base);
  color: var(--gray-700);
  background: var(--gray-50);
  cursor: pointer;
}
.cart-customer select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(5,150,105,.1); }

/* Cart Items */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: .5rem 0;
}
.cart-items::-webkit-scrollbar { width: 3px; }
.cart-items::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 10px; }

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--gray-400);
  text-align: center;
}
.cart-empty i { font-size: 3rem; margin-bottom: .75rem; opacity: .4; }
.cart-empty p { font-size: .82rem; margin: 0; }

.cart-item {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  flex-direction: column;
  gap: .4rem;
  transition: var(--transition);
}
.cart-item:hover { background: var(--gray-50); }
.cart-item-top {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  justify-content: space-between;
}
.cart-item-name {
  font-size: .83rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.4;
  flex: 1;
}
.cart-item-remove {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  font-size: .9rem;
  padding: .1rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.cart-item-remove:hover { color: var(--danger); }

.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-item-subtotal {
  font-size: .85rem;
  font-weight: 700;
  color: var(--primary);
}
.cart-item-price-each {
  font-size: .72rem;
  color: var(--gray-400);
}

/* Qty control in cart */
.qty-ctrl {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-ctrl-btn {
  width: 28px;
  height: 28px;
  background: var(--gray-50);
  border: none;
  font-size: .9rem;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-base);
}
.qty-ctrl-btn:hover { background: var(--primary); color: #fff; }
.qty-ctrl-input {
  width: 36px;
  height: 28px;
  border: none;
  border-left: 1.5px solid var(--gray-200);
  border-right: 1.5px solid var(--gray-200);
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  font-family: var(--font-base);
  color: var(--dark);
  background: var(--white);
}
.qty-ctrl-input:focus { outline: none; }

/* Cart Footer */
.cart-footer {
  padding: 1rem;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
  flex-shrink: 0;
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .3rem 0;
  font-size: .83rem;
}
.cart-summary-row .label { color: var(--gray-500); }
.cart-summary-row .value { font-weight: 600; color: var(--gray-700); }
.cart-summary-divider { border: none; border-top: 1px dashed var(--gray-200); margin: .4rem 0; }
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
}
.cart-total-row .total-amount { color: var(--primary); font-size: 1.1rem; }

.btn-checkout {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: .85rem;
  font-size: .95rem;
  font-weight: 700;
  font-family: var(--font-base);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: .75rem;
}
.btn-checkout:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(5,150,105,.35); }
.btn-checkout:disabled { background: var(--gray-300); cursor: not-allowed; transform: none; box-shadow: none; }

/* ── MODALS ──────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  animation: modalIn .2s ease;
}
.modal-box-sm { max-width: 420px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(-12px) scale(.97); } to { opacity: 1; transform: none; } }

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h5 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.modal-header h5 i { color: var(--primary); }
.modal-close {
  width: 32px; height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--gray-500);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: var(--gray-200); color: var(--dark); }
.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-100);
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
}

/* Checkout Modal Items */
.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: .65rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: .875rem;
}
.checkout-item:last-child { border-bottom: none; }
.checkout-item-name { font-weight: 600; color: var(--dark); }
.checkout-item-qty { font-size: .78rem; color: var(--gray-400); }
.checkout-item-price { font-weight: 700; color: var(--gray-700); white-space: nowrap; }

.checkout-total-box {
  background: var(--primary-light);
  border: 1.5px solid var(--primary-mid);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}
.checkout-total-row {
  display: flex;
  justify-content: space-between;
  font-size: .875rem;
  margin-bottom: .35rem;
  color: var(--gray-600);
}
.checkout-total-row.grand {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-darker);
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px dashed var(--primary-mid);
  margin-bottom: 0;
}

/* Payment Methods */
.payment-methods { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.25rem; }
.payment-method-opt { display: none; }
.payment-method-label {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: .875rem;
}
.payment-method-opt:checked + .payment-method-label {
  border-color: var(--primary);
  background: var(--primary-light);
}
.payment-method-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.payment-method-opt:checked + .payment-method-label .payment-method-icon {
  background: var(--primary-mid);
  color: var(--primary-darker);
}

/* Cash payment calc */
.payment-calc {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
}
.payment-calc-row {
  display: flex;
  justify-content: space-between;
  font-size: .875rem;
  padding: .3rem 0;
}
.payment-calc-row.change { font-weight: 700; font-size: 1rem; color: var(--primary); padding-top: .6rem; border-top: 1px dashed var(--gray-300); margin-top: .4rem; }
.payment-calc-row.change.negative { color: var(--danger); }

/* Input field */
.form-label { font-size: .8rem; font-weight: 700; color: var(--gray-700); margin-bottom: .35rem; }
.form-control, .form-select {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: .6rem 1rem;
  font-family: var(--font-base);
  font-size: .875rem;
  color: var(--dark);
  transition: var(--transition);
  width: 100%;
  background: var(--white);
}
.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5,150,105,.1);
}

/* Success Modal */
.success-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 3px solid var(--primary-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  color: var(--primary);
  margin: 0 auto 1.25rem;
}
.receipt-box {
  background: var(--gray-50);
  border: 1.5px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  font-size: .82rem;
}
.receipt-row { display: flex; justify-content: space-between; padding: .25rem 0; color: var(--gray-600); }
.receipt-row strong { color: var(--dark); }
.receipt-divider { border: none; border-top: 1px dashed var(--gray-300); margin: .6rem 0; }

/* ── Bootstrap overrides ─────────────────── */
/* Prevent Bootstrap from overriding our font */
body, .btn, input, select, textarea { font-family: var(--font-base) !important; }
/* Our card overrides Bootstrap's */
.card { border-color: var(--gray-200); border-radius: var(--radius-lg); }
.card-body { padding: 1.25rem; }
/* Our link color */
a { color: var(--primary); }
/* Reset Bootstrap nav overrides in sidebar */
.bo-nav-item { text-decoration: none !important; }
/* Prevent Bootstrap table overriding .bo-table */
.bo-table th, .bo-table td { border-color: var(--gray-100); }

/* ── ════════════════════════════════════════
   BACKOFFICE LAYOUT
   ════════════════════════════════════════ */
.bo-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.bo-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 200;
  transition: var(--transition);
  overflow: hidden;
}
.bo-sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  gap: .6rem;
}
.bo-logo-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.bo-logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.bo-logo-text span { color: var(--primary); }

.bo-sidebar-nav { flex: 1; padding: .75rem 0; overflow-y: auto; }
.bo-sidebar-nav::-webkit-scrollbar { width: 0; }

.nav-section-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.25);
  padding: .6rem 1.25rem .3rem;
  margin-top: .35rem;
}
.bo-nav-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .6rem 1.25rem;
  font-size: .85rem;
  font-weight: 500;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  transition: var(--transition);
  border-radius: 0;
  text-decoration: none;
  margin: .1rem .5rem;
  border-radius: var(--radius);
}
.bo-nav-item i { font-size: 1.05rem; width: 20px; flex-shrink: 0; }
.bo-nav-item:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.85); }
.bo-nav-item.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.bo-nav-item .nav-badge {
  margin-left: auto;
  font-size: .67rem;
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.8);
  padding: .1rem .45rem;
  border-radius: 100px;
}
.bo-nav-item.active .nav-badge { background: rgba(0,0,0,.2); color: #fff; }

.bo-sidebar-footer {
  padding: .75rem;
  border-top: 1px solid rgba(255,255,255,.07);
}
.bo-sidebar-user {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.bo-sidebar-user:hover { background: rgba(255,255,255,.07); }
.bo-sidebar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.bo-sidebar-uname { font-size: .8rem; font-weight: 600; color: rgba(255,255,255,.75); line-height: 1.2; }
.bo-sidebar-urole { font-size: .7rem; color: rgba(255,255,255,.35); }

/* Main Content */
.bo-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Bar */
.bo-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.bo-topbar-title h4 { font-size: 1rem; font-weight: 700; margin: 0; color: var(--dark); }
.bo-topbar-title p { font-size: .75rem; color: var(--gray-400); margin: 0; }
.bo-topbar-actions { display: flex; align-items: center; gap: .65rem; }
.bo-topbar-icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  background: var(--gray-100);
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
  position: relative;
}
.bo-topbar-icon-btn:hover { background: var(--gray-200); color: var(--dark); }
.bo-topbar-notif-dot {
  position: absolute;
  top: 5px; right: 5px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid #fff;
}

/* Page Content */
.bo-content { padding: 1.5rem; flex: 1; }

/* ── Stat Cards ──────────────────────────── */
.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-icon.green  { background: var(--primary-light); color: var(--primary); }
.stat-icon.blue   { background: #EFF6FF; color: #2563EB; }
.stat-icon.yellow { background: #FFFBEB; color: #D97706; }
.stat-icon.purple { background: #F5F3FF; color: #7C3AED; }
.stat-icon.red    { background: #FEF2F2; color: #DC2626; }
.stat-label { font-size: .78rem; color: var(--gray-500); margin-bottom: .25rem; font-weight: 500; }
.stat-value { font-size: 1.4rem; font-weight: 800; color: var(--dark); line-height: 1.2; }
.stat-change { font-size: .75rem; margin-top: .25rem; display: flex; align-items: center; gap: .25rem; }
.stat-change.up   { color: var(--primary); }
.stat-change.down { color: var(--danger); }

/* ── Card ─────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h6 { font-size: .875rem; font-weight: 700; margin: 0; color: var(--dark); }
.card-body { padding: 1.25rem; }

/* ── Table ───────────────────────────────── */
.bo-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.bo-table th {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--gray-500);
  padding: .75rem 1rem;
  background: var(--gray-50);
  border-bottom: 1.5px solid var(--gray-200);
  white-space: nowrap;
}
.bo-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  font-size: .85rem;
  vertical-align: middle;
}
.bo-table tr:last-child td { border-bottom: none; }
.bo-table tr:hover td { background: var(--gray-50); }
.bo-table .product-thumb { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; border: 1px solid var(--gray-200); }

/* ── Badges ──────────────────────────────── */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .65rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-success  { background: #D1FAE5; color: #065F46; }
.badge-warning  { background: #FEF3C7; color: #92400E; }
.badge-danger   { background: #FEE2E2; color: #991B1B; }
.badge-info     { background: #DBEAFE; color: #1E40AF; }
.badge-gray     { background: var(--gray-100); color: var(--gray-600); }

/* ── Chart Placeholder ───────────────────── */
.chart-area {
  background: var(--gray-50);
  border: 1.5px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
}
.chart-area i { font-size: 2.5rem; margin-bottom: .5rem; }
.chart-area p { font-size: .8rem; margin: 0; }

/* Simple bar chart visual */
.mini-chart { display: flex; align-items: flex-end; gap: 4px; height: 80px; }
.mini-bar {
  flex: 1;
  background: var(--primary-light);
  border-radius: 3px 3px 0 0;
  transition: var(--transition);
  min-width: 8px;
}
.mini-bar:hover { background: var(--primary); }
.mini-bar.active { background: var(--primary); }

/* ── Utilities ───────────────────────────── */
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }
.text-primary { color: var(--primary) !important; }
.text-danger  { color: var(--danger) !important; }
.text-muted   { color: var(--gray-400) !important; }
.divider { height: 1px; background: var(--gray-200); margin: .75rem 0; }

/* ── Modal Box Structure ─────────────────── */
.modal-box-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-box-header h5 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--dark);
}
.modal-box-header h5 i { color: var(--primary); }
.modal-box-body { padding: 1.25rem 1.5rem; flex: 1; overflow-y: auto; }
.modal-box-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-100);
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  background: var(--gray-50);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  flex-shrink: 0;
}

/* Cart Badge (count bubble in cart header) */
.cart-badge {
  background: rgba(0,0,0,.2);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: .1rem .55rem;
  border-radius: 100px;
  min-width: 22px;
  text-align: center;
  transition: transform .15s ease;
}
.cart-badge.pop { transform: scale(1.4); }

/* Cart item layout in JS render */
.cart-item {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: .6rem;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: .82rem; font-weight: 600; color: var(--dark); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { font-size: .72rem; color: var(--gray-400); }
.cart-item-controls { display: flex; align-items: center; gap: .25rem; flex-shrink: 0; }
.qty-btn {
  width: 26px; height: 26px;
  background: var(--gray-100);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.qty-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.qty-btn.danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.qty-val { font-size: .82rem; font-weight: 700; color: var(--dark); min-width: 20px; text-align: center; }
.cart-item-subtotal { font-size: .82rem; font-weight: 700; color: var(--primary); white-space: nowrap; flex-shrink: 0; }

/* Payment Options (flex buttons) */
.payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  margin-bottom: 1.25rem;
}
.payment-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .85rem .6rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-size: .8rem;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--white);
  transition: var(--transition);
  position: relative;
  text-align: center;
}
.payment-option i { font-size: 1.4rem; }
.payment-option:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.payment-option.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.payment-check {
  position: absolute;
  top: .4rem; right: .4rem;
  font-size: .8rem;
  opacity: 0;
  transition: var(--transition);
  color: var(--primary);
}
.payment-option.active .payment-check { opacity: 1; }

/* Payment form sections */
.payment-form-section { animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity:0; transform: translateY(4px); } to { opacity:1; transform:none; } }

.total-due-box {
  background: var(--primary-light);
  border: 1.5px solid var(--primary-mid);
  border-radius: var(--radius-lg);
  padding: .85rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: .875rem;
  color: var(--gray-600);
}
.total-due-box strong { font-size: 1.1rem; font-weight: 800; color: var(--primary-darker); }

.form-label-pos { font-size: .8rem; font-weight: 700; color: var(--gray-700); margin-bottom: .35rem; display: block; }
.form-input-pos {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: .6rem 1rem;
  font-family: var(--font-base);
  font-size: .9rem;
  color: var(--dark);
  transition: var(--transition);
  background: var(--white);
}
.form-input-pos:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(5,150,105,.1); }

.quick-amounts { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .6rem; }
.quick-amt-btn {
  padding: .3rem .75rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  font-size: .78rem;
  font-weight: 600;
  font-family: var(--font-base);
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
}
.quick-amt-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.change-calc {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: .9rem 1rem;
  margin-top: .85rem;
}
.change-row {
  display: flex;
  justify-content: space-between;
  font-size: .83rem;
  padding: .2rem 0;
  color: var(--gray-600);
}
.change-row.kembalian {
  font-size: .95rem;
  font-weight: 700;
  color: var(--primary);
  padding-top: .5rem;
  margin-top: .4rem;
  border-top: 1px dashed var(--gray-300);
}

.qris-box {
  text-align: center;
  padding: 1.5rem;
  border: 1.5px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  color: var(--gray-400);
}
.qris-box i { font-size: 4rem; margin-bottom: .5rem; }
.qris-box p { font-size: .8rem; margin: 0; }

/* Checkout modal items */
.order-items-list { margin-bottom: 1rem; }
.order-item-row {
  display: flex;
  justify-content: space-between;
  padding: .5rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: .85rem;
}
.order-item-row:last-child { border-bottom: none; }
.modal-summary {
  background: var(--primary-light);
  border: 1.5px solid var(--primary-mid);
  border-radius: var(--radius-lg);
  padding: .9rem 1.1rem;
  margin-top: .75rem;
}
.modal-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  padding: .25rem 0;
  color: var(--gray-600);
}
.modal-summary-row.total {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-darker);
  padding-top: .5rem;
  margin-top: .4rem;
  border-top: 1px dashed var(--primary-mid);
}

/* Success modal */
.modal-success .success-icon {
  width: 76px; height: 76px;
  font-size: 2.6rem;
}
.success-details {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: left;
}
.success-row {
  display: flex;
  justify-content: space-between;
  font-size: .83rem;
  padding: .3rem 0;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-600);
}
.success-row:last-child { border-bottom: none; }
.success-row strong { color: var(--dark); }

/* ── Responsive ──────────────────────────── */
@media (max-width: 991.98px) {
  .pos-layout { grid-template-columns: 1fr; grid-template-rows: 1fr auto; height: auto; }
  .pos-cart { border-left: none; border-top: 1px solid var(--gray-200); height: auto; max-height: 480px; }
  .pos-products { height: auto; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (max-width: 767.98px) {
  .bo-sidebar { transform: translateX(-100%); }
  .bo-sidebar.open { transform: translateX(0); }
  .bo-main { margin-left: 0; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
  .pos-header-info { display: none; }
}
@media print {
  .modal-overlay:not(.active) { display: none; }
  body > *:not(#successModal) { display: none; }
}
