/**
 * Kas RT - Kasir06 Model CSS (Replicated from https://kasir06.bid/)
 * Theme: Modern Emerald / Teal RT 06
 */
:root {
  --k-bg: #f4f6f8;
  --k-card: #ffffff;
  --k-ink: #1c2630;
  --k-muted: #6b7785;
  --k-line: #e3e8ee;
  --k-brand: #0f766e;
  --k-brand-soft: #d9f2ee;
  --k-paid: #e8ecef;
  --k-danger: #c0392b;
}

.kasir-container {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--k-ink);
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 30px;
}

/* Kasir Top Header */
.kasir-header {
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--k-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.2);
  margin-bottom: 16px;
}
.kasir-header h1 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #fff;
  line-height: 1.2;
}
.kasir-header small {
  opacity: 0.88;
  display: block;
  font-weight: 400;
  font-size: 12px;
  margin-top: 2px;
}
.kasir-cart-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  border: 0;
  color: #1c2630;
  border-radius: 12px;
  width: 46px;
  height: 46px;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.kasir-cart-btn:hover {
  transform: scale(1.04);
  background: #ffffff;
}
.kasir-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #f59e0b;
  color: #1c2630;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

/* Kasir Main Cards */
.kasir-card {
  background: var(--k-card);
  border: 1px solid var(--k-line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.kasir-card label {
  font-size: 13px;
  color: var(--k-muted);
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}
.kasir-card h2 {
  font-size: 15px;
  margin: 0 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: var(--k-ink);
}
.kasir-card h2 span {
  font-size: 12px;
  font-weight: 500;
  color: var(--k-muted);
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
}

/* Grid & Items (Tile Buttons) */
.kasir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.kasir-item {
  border: 1.5px solid var(--k-line);
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: all 0.12s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 58px;
}
.kasir-item .n {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--k-ink);
}
.kasir-item .p {
  font-size: 12px;
  color: var(--k-muted);
  margin-top: 3px;
}
.kasir-item:hover:not([disabled]) {
  border-color: var(--k-brand);
  background: #fcfefe;
}
.kasir-item.selected {
  border-color: var(--k-brand);
  background: var(--k-brand-soft);
}
.kasir-item.selected .n::after {
  content: " ✓";
  color: var(--k-brand);
  font-weight: 700;
}
.kasir-item.paid {
  background: var(--k-paid);
  cursor: not-allowed;
  opacity: 0.72;
  border-style: dashed;
}
.kasir-item.paid .p {
  color: #166534;
  font-weight: 700;
}

.kasir-pill {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  background: var(--k-brand-soft);
  color: var(--k-brand);
  border-radius: 999px;
  padding: 4px 12px;
  text-transform: capitalize;
  display: inline-block;
}
.kasir-empty {
  color: var(--k-muted);
  text-align: center;
  padding: 30px 10px;
  font-size: 14px;
}

/* Combobox Pencarian Warga */
.kasir-combo {
  position: relative;
}
.kasir-combo input {
  width: 100%;
  padding: 12px 40px 12px 14px;
  font-size: 15px;
  border: 1px solid var(--k-line);
  border-radius: 10px;
  background: #fff;
  color: var(--k-ink);
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.kasir-combo input:focus {
  outline: 2px solid var(--k-brand-soft);
  border-color: var(--k-brand);
}
.kasir-combo input:disabled {
  background: #f1f4f6;
  color: var(--k-muted);
}
.kasir-combo .kasir-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  color: var(--k-muted);
  font-size: 20px;
  cursor: pointer;
  display: none;
}
.kasir-combo.has-text .kasir-clear {
  display: block;
}
.kasir-sugg {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--k-line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
  max-height: 280px;
  overflow-y: auto;
  display: none;
}
.kasir-sugg.open {
  display: block;
}
.kasir-sugg li {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 14.5px;
  transition: background 0.1s ease;
}
.kasir-sugg li small {
  color: var(--k-muted);
  font-size: 12px;
  white-space: nowrap;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
}
.kasir-sugg li.active,
.kasir-sugg li:hover {
  background: var(--k-brand-soft);
}
.kasir-sugg li mark {
  background: none;
  color: var(--k-brand);
  font-weight: 700;
  padding: 0;
}
.kasir-sugg li.none {
  color: var(--k-muted);
  cursor: default;
  justify-content: center;
}
.kasir-sugg li.none:hover {
  background: none;
}

/* Modals & Overlay */
.kasir-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}
.kasir-overlay.open {
  display: flex !important;
}
.kasir-modal {
  background: #fff;
  width: 100%;
  max-width: 480px;
  border-radius: 18px 18px 0 0;
  padding: 20px;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
  animation: kasirSlideUp 0.25s ease-out;
}
@media(min-width: 600px) {
  .kasir-overlay {
    align-items: center;
  }
  .kasir-modal {
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.2);
  }
}
@keyframes kasirSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.kasir-modal h3 {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--k-ink);
}
.kasir-modal .x {
  background: none;
  border: 0;
  font-size: 24px;
  cursor: pointer;
  color: var(--k-muted);
  line-height: 1;
  padding: 0 4px;
}
.kasir-modal .x:hover {
  color: var(--k-ink);
}

.kasir-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--k-line);
  font-size: 14px;
}
.kasir-row button {
  background: none;
  border: 0;
  color: var(--k-danger);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  margin-left: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}
.kasir-row button:hover {
  background: #fee2e2;
}

.kasir-total {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 17px;
  padding: 14px 0;
  color: var(--k-ink);
}
.kasir-btn {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--k-brand);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.kasir-btn:hover:not(:disabled) {
  opacity: 0.95;
  transform: translateY(-1px);
}
.kasir-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.kasir-btn.ghost {
  background: #fff;
  color: var(--k-ink);
  border: 1px solid var(--k-line);
  margin-top: 8px;
}
.kasir-btn.ghost:hover {
  background: #f8fafc;
}

/* QRIS view */
.kasir-qr-wrap {
  text-align: center;
  margin-top: 6px;
}
.kasir-qr-box {
  display: inline-block;
  padding: 14px;
  border: 1px solid var(--k-line);
  border-radius: 14px;
  background: #fff;
  min-width: 200px;
  min-height: 200px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.kasir-qr-box canvas, .kasir-qr-box img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}
.kasir-muted {
  color: var(--k-muted);
  font-size: 13px;
}
.kasir-status {
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff8e1;
  font-size: 13.5px;
  font-weight: 600;
  color: #854d0e;
  text-align: center;
  border: 1px solid #fef08a;
}

/* How to pay box */
.kasir-howto {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--k-line);
  border-radius: 12px;
  background: #f9fbfc;
  font-size: 12.5px;
  line-height: 1.55;
  color: #334155;
}
.kasir-howto b {
  display: block;
  margin-bottom: 6px;
  font-size: 13.5px;
  color: var(--k-ink);
}
.kasir-howto ol {
  margin: 0;
  padding-left: 18px;
}
.kasir-howto li {
  margin-bottom: 4px;
}
.kasir-howto .save {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--k-brand-soft);
  color: #0b4f4a;
  font-weight: 600;
  font-size: 12px;
}

/* Digital Nota / Kwitansi */
.kasir-nota {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px dashed #b9c3cd;
  border-radius: 14px;
  padding: 20px 18px;
  margin-bottom: 14px;
}
.kasir-nota > *:not(.wm) {
  position: relative;
  z-index: 1;
}
.kasir-nota .wm {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-24deg);
  font-size: 72px;
  font-weight: 900;
  letter-spacing: 6px;
  color: rgba(15, 118, 110, 0.16);
  border: 6px solid rgba(15, 118, 110, 0.16);
  border-radius: 16px;
  padding: 0 18px;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}
.kasir-nota-head {
  text-align: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #b9c3cd;
}
.kasir-nota-head b {
  font-size: 18px;
  color: var(--k-ink);
  display: block;
}
.kasir-nota-meta {
  font-size: 12.5px;
  margin-bottom: 10px;
}
.kasir-nota-meta div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
}
.kasir-nota-meta span:first-child {
  color: var(--k-muted);
}
.kasir-nota-meta span:last-child {
  text-align: right;
  font-weight: 600;
  word-break: break-all;
}
.kasir-nota .kasir-row {
  border-bottom: 1px dotted var(--k-line);
  padding: 6px 0;
  font-size: 13px;
}
.kasir-nota .kasir-total {
  border-top: 1px dashed #b9c3cd;
  margin-top: 8px;
  padding: 10px 0 0;
  font-size: 15.5px;
}
.kasir-nota-foot {
  text-align: center;
  font-size: 11.5px;
  color: var(--k-muted);
  margin-top: 10px;
  font-style: italic;
}

/* Support Footer */
.kasir-support {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 4px;
}
.kasir-support .kasir-card {
  margin-bottom: 0;
}
.kasir-support h2 {
  margin-bottom: 10px;
}
.kasir-support ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.5;
}
.kasir-support li {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dotted var(--k-line);
}
.kasir-support li:last-child {
  border-bottom: 0;
}
.kasir-support .lbl {
  flex: 0 0 125px;
  color: var(--k-muted);
  font-size: 12px;
  font-weight: 500;
}
.kasir-support a {
  color: var(--k-brand);
  font-weight: 600;
  text-decoration: none;
  word-break: break-word;
}
.kasir-support a:hover {
  text-decoration: underline;
}
.kasir-support .wa {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--k-brand-soft);
  font-size: 12px;
  color: #0b4f4a;
}
.kasir-support .copy {
  text-align: center;
  font-size: 12px;
  color: var(--k-muted);
  margin-top: 12px;
}
