/* TM Booth POS — mobile-first, brand orange #EA580C */
html { -webkit-text-size-adjust: 100%; }
body.tmbp-fullscreen { margin: 0; padding: 0; background: #f9fafb; font-family: Inter, system-ui, -apple-system, sans-serif; }
.tmbp { max-width: 640px; margin: 0 auto; padding: 12px 12px 60px; font-family: Inter, system-ui, -apple-system, sans-serif; color: #111827; background: #fff; min-height: 100vh; }
.tmbp *, .tmbp *::before, .tmbp *::after { box-sizing: border-box; }
.tmbp .tmbp-loading { text-align: center; padding: 40px 0; color: #6b7280; }

.tmbp-gate { text-align: center; padding: 48px 16px; }
.tmbp-gate p { font-size: 16px; color: #374151; margin: 0 0 20px; }

.tmbp-staffbar { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #6b7280; padding: 6px 2px 14px; }
.tmbp-staffbar-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; display: inline-block; }

.tmbp-sec { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; }
.tmbp-sec-num { width: 24px; height: 24px; border-radius: 50%; background: #EA580C; color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tmbp-sec-txt { font-size: 15px; font-weight: 700; }

/* Products */
.tmbp-products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tmbp-prod { display: flex; align-items: center; gap: 10px; padding: 8px; border: 2px solid #e5e7eb; border-radius: 12px; background: #fff; cursor: pointer; text-align: left; min-height: 64px; transition: border-color .12s, box-shadow .12s; }
.tmbp-prod:active { transform: scale(.99); }
.tmbp-prod.is-active { border-color: #EA580C; box-shadow: 0 0 0 3px rgba(234,88,12,.15); }
.tmbp-prod-img { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 1px solid rgba(0,0,0,.08); display: block; }
.tmbp-prod-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tmbp-prod-label { font-size: 14px; font-weight: 600; line-height: 1.2; }
.tmbp-prod-price { font-size: 12px; font-weight: 800; color: #EA580C; }

/* Sizes */
.tmbp-sizes { margin-top: 12px; }
.tmbp-sizes:empty { margin: 0; }
.tmbp-sizes-hint { font-size: 13px; color: #6b7280; margin-bottom: 8px; }
.tmbp-size-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tmbp-size { min-width: 54px; padding: 12px 10px; border: 2px solid #d1d5db; border-radius: 10px; background: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.tmbp-size:active { background: #EA580C; color: #fff; border-color: #EA580C; }
.tmbp-size.is-oos { opacity: .4; text-decoration: line-through; cursor: not-allowed; font-size: 12px; }

/* Item lain (misc) */
.tmbp-misc { margin-top: 16px; padding: 12px; border: 1px dashed #d1d5db; border-radius: 12px; background: #fafafa; }
.tmbp-misc-title { font-size: 12px; font-weight: 600; color: #6b7280; margin-bottom: 8px; }
.tmbp-misc-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.tmbp-misc-preset { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 12px; border: 2px solid #d1d5db; border-radius: 10px; background: #fff; cursor: pointer; line-height: 1.2; }
.tmbp-misc-preset:active { border-color: #EA580C; }
.tmbp-misc-preset-name { font-size: 13px; font-weight: 700; }
.tmbp-misc-preset-price { font-size: 12px; font-weight: 800; color: #EA580C; }
.tmbp-misc-other { justify-content: center; align-items: center; font-size: 14px; font-weight: 700; color: #6b7280; border-style: dashed; }
.tmbp-misc-custom { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tmbp-misc-custom input { padding: 12px; border: 2px solid #d1d5db; border-radius: 10px; font-size: 15px; }
.tmbp-misc-custom #tmbp-misc-name { flex: 1 1 100%; }
.tmbp-misc-custom #tmbp-misc-price { flex: 1 1 120px; }
.tmbp-misc-add { flex: 0 0 auto; padding: 12px 18px; border: 0; background: #111827; color: #fff; border-radius: 10px; font-size: 14px; font-weight: 800; cursor: pointer; }
.tmbp-line-tag { display: inline-block; margin-left: 8px; padding: 1px 7px; background: #e5e7eb; color: #6b7280; border-radius: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; vertical-align: middle; }

/* Cart */
.tmbp-cart { border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; }
.tmbp-cart.tmbp-flash { animation: tmbpFlash .5s ease; }
@keyframes tmbpFlash { 0% { background: #fff7ed; } 100% { background: transparent; } }
.tmbp-cart-empty { padding: 18px; text-align: center; color: #9ca3af; font-size: 13px; }
.tmbp-line { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #f3f4f6; }
.tmbp-line-name { font-size: 14px; font-weight: 600; }
.tmbp-line-ctrl { display: flex; align-items: center; gap: 4px; }
.tmbp-qtybtn { width: 34px; height: 34px; border: 1px solid #d1d5db; background: #fff; border-radius: 8px; font-size: 18px; font-weight: 700; cursor: pointer; line-height: 1; }
.tmbp-qty { min-width: 30px; text-align: center; font-size: 15px; font-weight: 700; }
.tmbp-total { display: flex; align-items: center; justify-content: space-between; padding: 14px; background: #fff7ed; font-size: 15px; }
.tmbp-total strong { font-size: 20px; color: #EA580C; }

/* Fields */
.tmbp-fields { display: grid; gap: 12px; }
.tmbp-field { display: flex; flex-direction: column; gap: 4px; }
.tmbp-field-label { font-size: 13px; font-weight: 600; color: #374151; }
.tmbp-field input { padding: 14px 14px; border: 2px solid #d1d5db; border-radius: 10px; font-size: 16px; width: 100%; }
.tmbp-field input:focus { outline: none; border-color: #EA580C; }

/* Resit bayaran */
.tmbp-receipt { }
.tmbp-receipt-btn { width: 100%; padding: 16px; border: 2px dashed #EA580C; border-radius: 12px; background: #fff7ed; color: #EA580C; font-size: 16px; font-weight: 800; cursor: pointer; }
.tmbp-receipt-btn:active { background: #ffedd5; }
.tmbp-receipt-preview { margin-top: 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tmbp-receipt-preview:empty { margin: 0; }
.tmbp-receipt-proc { font-size: 13px; color: #6b7280; }
.tmbp-receipt-img { max-width: 220px; max-height: 260px; width: auto; border-radius: 10px; border: 1px solid #e5e7eb; }
.tmbp-receipt-ok { font-size: 14px; font-weight: 700; color: #16a34a; }
.tmbp-receipt-change { padding: 8px 16px; border: 1px solid #d1d5db; background: #fff; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }

.tmbp-error { color: #dc2626; font-size: 14px; font-weight: 600; min-height: 18px; margin: 12px 2px 0; }
.tmbp-submit-hint { text-align: center; font-size: 12px; color: #9ca3af; margin-top: 6px; min-height: 14px; }

.tmbp-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.tmbp-submit { width: 100%; margin-top: 10px; padding: 18px; background: #EA580C; color: #fff; border: 0; border-radius: 12px; font-size: 17px; font-weight: 800; letter-spacing: .3px; cursor: pointer; }
.tmbp-submit:disabled { opacity: .6; cursor: default; }
.tmbp-btn-login { display: inline-flex; padding: 14px 24px; background: #EA580C; color: #fff; border-radius: 10px; font-weight: 700; }

/* Result */
.tmbp-result { display: none; margin-top: 20px; padding: 22px 18px; border: 2px solid #16a34a; border-radius: 16px; background: #f0fdf4; text-align: center; }
.tmbp-result.is-show { display: block; }
.tmbp-result-check { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%; background: #16a34a; color: #fff; font-size: 30px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.tmbp-result-h { font-size: 18px; font-weight: 800; }
.tmbp-result-sub { font-size: 14px; color: #4b5563; margin-top: 2px; }
.tmbp-tickets { margin: 18px 0; padding: 16px; background: #fff; border-radius: 12px; }
.tmbp-tickets-lbl { font-size: 13px; color: #6b7280; margin-bottom: 10px; }
.tmbp-tickets-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tmbp-ticket { padding: 10px 14px; background: #EA580C; color: #fff; border-radius: 8px; font-size: 16px; font-weight: 800; letter-spacing: .5px; }
.tmbp-ticket-warn { background: #f59e0b; font-size: 13px; }
.tmbp-result-mail { font-size: 13px; color: #4b5563; }
.tmbp-again { width: 100%; margin-top: 18px; padding: 16px; background: #111827; color: #fff; border: 0; border-radius: 12px; font-size: 16px; font-weight: 800; cursor: pointer; }

/* Guardrail: overlay pengesahan */
.tmbp-overlay { position: fixed; inset: 0; background: rgba(17,24,39,.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 99999; }
.tmbp-confirm { background: #fff; border-radius: 16px; max-width: 420px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.tmbp-confirm-h { font-size: 18px; font-weight: 800; text-align: center; margin-bottom: 14px; }
.tmbp-confirm-items { border: 1px solid #f3f4f6; border-radius: 10px; overflow: hidden; }
.tmbp-confirm-item { display: flex; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.tmbp-confirm-item:last-child { border-bottom: 0; }
.tmbp-confirm-total { display: flex; justify-content: space-between; align-items: center; padding: 12px; margin-top: 8px; background: #fff7ed; border-radius: 10px; }
.tmbp-confirm-total strong { font-size: 20px; color: #EA580C; }
.tmbp-confirm-cust { text-align: center; margin: 14px 0 10px; }
.tmbp-confirm-name { font-size: 16px; font-weight: 700; }
.tmbp-confirm-sub { font-size: 13px; color: #6b7280; margin-top: 2px; }
.tmbp-confirm-receipt { display: block; max-width: 160px; max-height: 200px; margin: 0 auto 10px; border-radius: 10px; border: 1px solid #e5e7eb; }
.tmbp-confirm-warn { font-size: 13px; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 10px; text-align: center; margin-bottom: 16px; font-weight: 600; }
.tmbp-confirm-acts { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.tmbp-confirm-cancel { padding: 15px; border: 2px solid #d1d5db; background: #fff; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; }
.tmbp-confirm-ok { padding: 15px; border: 0; background: #16a34a; color: #fff; border-radius: 12px; font-size: 15px; font-weight: 800; cursor: pointer; }

@media (min-width: 520px) {
    .tmbp-products { grid-template-columns: repeat(3, 1fr); }
}

/* ===== v1.11.0: cara bayaran (Tunai/QR) ===== */
.tmbp-pay-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 18px}
.tmbp-pay{display:flex;flex-direction:column;align-items:center;gap:2px;padding:14px 10px;border:2px solid #d1d5db;border-radius:12px;background:#fff;cursor:pointer;transition:border-color .12s, background .12s}
.tmbp-pay-big{font-size:18px;font-weight:800;letter-spacing:.5px;color:#111827}
.tmbp-pay-sub{font-size:11.5px;color:#6b7280}
.tmbp-pay.is-active{border-color:#16a34a;background:#f0fdf4;box-shadow:0 0 0 3px rgba(22,163,74,.15)}
.tmbp-pay.is-active .tmbp-pay-big{color:#15803d}

/* ===== v1.11.0: hint email conditional ===== */
.tmbp-email-hint{font-size:12px;color:#b45309;margin:-8px 0 14px;min-height:15px}
.tmbp-email-hint.is-optional{color:#6b7280}

/* ===== v1.11.0: carian + senarai item lain ===== */
.tmbp-misc-search{width:100%;box-sizing:border-box;padding:10px 12px;border:1.5px solid #d1d5db;border-radius:10px;font-size:14px;margin:0 0 10px;background:#fff}
.tmbp-misc-search:focus{outline:none;border-color:#16a34a}
.tmbp-misc-presets{max-height:220px;overflow-y:auto}
.tmbp-misc-none{font-size:12.5px;color:#6b7280;padding:6px 2px}
.tmbp-confirm-pay{font-size:13px;font-weight:700;color:#15803d;margin-top:4px}
.tmbp-result-mail-none{color:#6b7280}
