/* =========================================================
   WM Motowash Pontianak — Point of Sale (POS) & Kasir
   Theme: Automotive Charcoal + Amber + POS Ergonomics
   ========================================================= */

body.pos-body {
  background: #0B0E12;
  color: var(--text);
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------------- Topbar Kasir ---------------- */
.pos-topbar {
  background: #141A21;
  border-bottom: 1px solid var(--line-hard);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 60;
  flex-wrap: wrap;
}
.pos-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pos-logo {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.pos-logo .wmlogo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pos-title-block strong {
  font-family: var(--font-disp);
  font-size: 19px;
  letter-spacing: .05em;
  color: var(--text);
  line-height: 1;
  display: block;
}
.pos-title-block span {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 700;
}

.pos-cashier-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--raised);
  border: 1px solid var(--line-hard);
  padding: 6px 14px;
  border-radius: 99px;
  cursor: pointer;
  transition: border-color .2s;
}
.pos-cashier-pill:hover {
  border-color: var(--amber);
}
.pos-cashier-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--amber-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}
.pos-cashier-info {
  display: flex;
  flex-direction: column;
}
.pos-cashier-info strong {
  font-size: 13px;
  color: var(--text);
  line-height: 1.1;
}
.pos-cashier-info span {
  font-size: 10px;
  color: var(--muted);
}

.pos-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------------- Main POS Grid ---------------- */
.pos-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  flex: 1;
  min-height: calc(100vh - 65px);
}
@media (max-width: 980px) {
  .pos-layout {
    grid-template-columns: 1fr;
  }
}

/* ---------------- Kolom Kiri: Menu & Antrian ---------------- */
.pos-left {
  padding: 20px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.pos-nav-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  overflow-x: auto;
}
.pos-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--r-m);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.pos-tab-btn:hover {
  color: var(--text);
  background: var(--surface);
}
.pos-tab-btn.is-active {
  color: var(--amber-ink);
  background: var(--amber);
}

/* Grid Kartu Menu & Produk */
.pos-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.pos-item-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 14px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
}
.pos-item-card:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
  background: var(--raised);
}
.pos-item-card:active {
  transform: scale(.98);
}
.pos-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pos-card-title {
  font-family: var(--font-disp);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
}
.pos-card-price {
  font-family: var(--font-disp);
  font-size: 18px;
  font-weight: 800;
  color: var(--amber);
}
.pos-card-desc {
  font-size: 11px;
  color: var(--faint);
  line-height: 1.25;
}

/* Antrian di POS */
.pos-queue-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.pos-queue-row.is-ready {
  border-color: var(--green);
  box-shadow: 0 0 12px rgba(51, 176, 111, .15);
}

/* ---------------- Kolom Kanan: Billing / Checkout ---------------- */
.pos-right {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 16px;
}
.pos-bill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.pos-bill-num {
  font-family: var(--font-disp);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .05em;
  color: var(--text);
}
.pos-cart-list {
  flex: 1;
  overflow-y: auto;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.pos-cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--raised);
  padding: 8px 12px;
  border-radius: var(--r-s);
  font-size: 13px;
}
.pos-cart-ctrls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pos-btn-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line-hard);
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 13px;
}

/* Total Section */
.pos-total-box {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pos-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}
.pos-total-grand {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--line-hard);
  padding-top: 8px;
  margin-top: 4px;
}
.pos-total-grand strong {
  font-size: 15px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.pos-total-grand span {
  font-family: var(--font-disp);
  font-size: 30px;
  font-weight: 800;
  color: var(--amber);
}

/* Payment Selector */
.pos-pay-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pos-pay-btn {
  background: var(--raised);
  border: 1.5px solid var(--line-hard);
  border-radius: var(--r-s);
  padding: 10px 6px;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  transition: all .2s;
}
.pos-pay-btn.is-active {
  border-color: var(--amber);
  background: var(--amber-soft);
  color: var(--amber);
}

/* Tunai Calculator */
.pos-cash-calc {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--raised);
  border-radius: var(--r-m);
  padding: 12px;
}
.pos-quick-cash {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pos-qc-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.pos-qc-btn:hover {
  border-color: var(--amber);
}
.pos-change-box {
  background: var(--surface);
  border-radius: var(--r-s);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.pos-change-box strong {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}
.pos-change-box span {
  font-family: var(--font-disp);
  font-size: 24px;
  font-weight: 800;
  color: var(--green);
}

/* ---------------- Struk Nota Modal ---------------- */
.receipt-wrap {
  background: #fff;
  color: #111;
  font-family: 'Courier New', Courier, monospace;
  padding: 24px 20px;
  border-radius: 6px;
  max-width: 320px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  font-size: 12px;
  line-height: 1.35;
}
.receipt-header {
  text-align: center;
  border-bottom: 1px dashed #444;
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.receipt-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: .05em;
}
.receipt-items {
  border-bottom: 1px dashed #444;
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.receipt-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.receipt-footer {
  text-align: center;
  font-size: 11px;
  color: #555;
  margin-top: 10px;
}
@media print {
  body * {
    visibility: hidden;
  }
  #receipt-print-area, #receipt-print-area * {
    visibility: visible;
  }
  #receipt-print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
  }
}
