/* Bosang Fishing Park — order system. Mobile-first, no framework. */
:root {
  --blue: #1b3f95;
  --blue-600: #15327a;
  --blue-50: #eef3ff;
  --red: #d92a1f;
  --red-50: #fdeeed;
  --green: #15803d;
  --green-50: #e8f6ee;
  --amber: #b45309;
  --amber-50: #fff6e5;
  --wood: #8b4a2b;
  --ink: #1c2333;
  --muted: #687085;
  --line: #e2e6ee;
  --bg: #f3f5f9;
  --card: #fff;
  --r: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  font-family: 'Noto Sans Thai', 'Sukhumvit Set', 'Leelawadee UI', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); line-height: 1.5; font-size: 16px; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5rem; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.1rem; }
p { margin: 0 0 0.6rem; }
img { max-width: 100%; }
small { font-size: 0.82em; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.88rem; margin: 0.4rem 0; }
.center { text-align: center; }
.text-ok { color: var(--green); }
.text-red { color: var(--red); }
.empty { color: var(--muted); text-align: center; padding: 1.5rem 0.5rem; margin: 0; }
.big-icon { font-size: 3rem; }
[hidden] { display: none !important; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  min-height: 42px; padding: 0.5rem 0.95rem; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font: inherit; font-weight: 600; font-size: 0.95rem; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: filter 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-ok { background: var(--green); border-color: var(--green); color: #fff; }
.btn-danger { color: var(--red); border-color: #f2c4c0; }
.btn-danger.btn-ghost { border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { min-height: 34px; padding: 0.3rem 0.65rem; font-size: 0.85rem; }
.btn-lg { min-height: 50px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn:hover { filter: brightness(0.97); }
.inline-form { display: inline; margin: 0; }
.inline-form.btn-block, form.inline-form:has(.btn-block) { display: block; }
.upload-btn input[type='file'] { display: none; }
.is-loading .btn { opacity: 0.6; pointer-events: none; }

input, select, textarea {
  font: inherit; color: inherit; width: 100%;
  border: 1px solid #cfd5e1; border-radius: 10px; padding: 0.6rem 0.75rem; background: #fff; min-height: 44px;
}
textarea { min-height: 0; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
input[type='checkbox'], input[type='radio'] { width: auto; min-height: 0; accent-color: var(--blue); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
.field { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.9rem; }
.field > span, .field > legend { font-weight: 600; font-size: 0.92rem; margin-bottom: 0.3rem; }
.check { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.inline { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; }
.stack > * + * { margin-top: 0.2rem; }
.stack-sm { display: flex; flex-direction: column; gap: 0.4rem; width: 100%; }
.inline-fields { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.inline-fields input { flex: 1 1 140px; width: auto; }
.w-num { max-width: 90px; flex: 0 0 auto !important; }
.w-md { max-width: 140px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.75rem; align-items: end; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 1rem; align-items: end; }
.grid-form > .btn { margin-bottom: 0.9rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }

/* ---------- Cards, badges, notices ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 1rem; margin-bottom: 0.9rem; display: block; color: inherit; text-decoration: none; }
.cards { display: grid; gap: 0.75rem; }
.cards > .card { margin: 0; }
.section-title { margin: 1.4rem 0 0.7rem; display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.section-title small { color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.section-title a { font-size: 0.88rem; font-weight: 500; }
.badge { display: inline-block; padding: 0.12rem 0.55rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: #eef0f4; color: #3a4152; white-space: nowrap; }
.badge-red, .pay-unpaid { background: var(--red-50); color: var(--red); }
.badge-blue, .st-new { background: var(--blue-50); color: var(--blue); }
.st-preparing, .pay-pending { background: var(--amber-50); color: var(--amber); }
.st-delivered, .pay-paid { background: var(--green-50); color: var(--green); }
.st-cancelled { background: #eef0f4; color: #6b7280; }
.notice { border-radius: 12px; padding: 0.75rem 1rem; margin-bottom: 0.9rem; font-weight: 600; }
.notice.warn { background: var(--amber-50); color: var(--amber); }
.notice.info { background: var(--blue-50); color: var(--blue); }
.notice.ok { background: var(--green-50); color: var(--green); }
details.more > summary { cursor: pointer; color: var(--blue); font-weight: 600; padding: 0.4rem 0; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '▸ '; }
details.more[open] > summary::before { content: '▾ '; }

.items { list-style: none; padding: 0; margin: 0.5rem 0; }
.items li { display: flex; gap: 0.5rem; padding: 0.35rem 0; border-bottom: 1px dashed var(--line); }
.items li:last-child { border-bottom: 0; }
.it-qty { font-weight: 700; color: var(--blue); min-width: 2.2em; }
.it-name { flex: 1; }
.it-amt { white-space: nowrap; }
.sum-row { display: flex; justify-content: space-between; padding: 0.35rem 0; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 0.3rem; padding-top: 0.6rem; font-size: 1.1rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; margin: 0.8rem 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; }
.note { background: var(--bg); padding: 0.5rem 0.75rem; border-radius: 8px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; top: 0.75rem; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 0.5rem; width: min(92vw, 460px); pointer-events: none; }
.toast { background: #1f2937; color: #fff; padding: 0.75rem 1rem; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-weight: 600; animation: toast-in 0.2s ease-out; white-space: pre-line; pointer-events: auto; }
.toast-ok { background: var(--green); }
.toast-err { background: var(--red); }
.toast-info { background: var(--blue); }
.toast.out { opacity: 0; transform: translateY(-8px); transition: all 0.3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } }

/* ---------- Gazebo SVG ---------- */
.hut { display: block; width: 100%; height: auto; }
.hut-off { filter: grayscale(1); opacity: 0.45; }
.hut-guest { fill: var(--blue); }

/* ================= Customer ================= */
.customer { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
.c-header { display: flex; align-items: center; gap: 0.75rem; background: #fff; padding: 0.5rem 1rem; border-bottom: 3px solid var(--blue); position: sticky; top: 0; z-index: 20; }
.c-logo { width: 56px; height: 56px; object-fit: contain; }
.c-who { display: flex; flex-direction: column; line-height: 1.25; }
.c-who b { color: var(--blue); font-size: 1.05rem; }
.c-who small { color: var(--muted); }
.c-tabs { display: flex; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 75px; z-index: 19; }
.c-tabs a { flex: 1; text-align: center; padding: 0.7rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; }
.c-tabs a.on { color: var(--blue); border-color: var(--red); }
.c-main { max-width: 640px; margin: 0 auto; padding: 1rem; }

.hut-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.6rem; }
.hut-opt { position: relative; display: flex; flex-direction: column; align-items: center; border: 2px solid var(--line); border-radius: 12px; padding: 0.4rem; cursor: pointer; background: #fbfcfe; text-align: center; }
.hut-opt input { position: absolute; opacity: 0; }
.hut-opt:has(input:checked) { border-color: var(--blue); background: var(--blue-50); box-shadow: 0 0 0 3px rgba(27, 63, 149, 0.15); }
.hut-opt.taken { opacity: 0.6; cursor: not-allowed; }
.hut-opt small { color: var(--red); }

.menu-cat h2 { margin: 1.2rem 0 0.6rem; color: var(--blue); }
.menu-item { display: flex; align-items: center; gap: 0.75rem; background: #fff; border-radius: 12px; padding: 0.6rem; margin-bottom: 0.55rem; box-shadow: var(--shadow); border: 2px solid transparent; }
.menu-item.in-cart { border-color: var(--blue); }
.mi-img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; background: #f1f3f7; }
.mi-ph { display: grid; place-items: center; font-size: 1.8rem; }
.mi-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mi-info small { color: var(--muted); }
.mi-price { color: var(--red); font-weight: 700; }
.stepper { display: flex; align-items: center; gap: 0.25rem; }
.stepper button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #cfd5e1; background: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--blue); }
.stepper button[data-inc] { background: var(--blue); color: #fff; border-color: var(--blue); }
.stepper span { min-width: 1.6em; text-align: center; font-weight: 700; }
.menu-item:not(.in-cart) [data-dec], .menu-item:not(.in-cart) [data-qty] { visibility: hidden; }

.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -4px 18px rgba(0,0,0,.1); }
.cart-bar > div { display: flex; flex-direction: column; }
.cart-bar #cart-total { color: var(--red); font-weight: 700; font-size: 1.15rem; }

dialog.sheet { border: 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); width: 100%; max-width: 640px; max-height: 92vh; margin: auto auto 0; border-radius: 18px 18px 0 0; overflow-y: auto; }
dialog.sheet::backdrop { background: rgba(15, 23, 42, 0.5); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-x { border: 0; background: #eef0f4; border-radius: 50%; width: 36px; height: 36px; font-size: 1rem; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip input, .pay-opt input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 0.5rem 0.9rem; border: 1.5px solid #cfd5e1; border-radius: 999px; font-weight: 600; cursor: pointer; }
.chip input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.pay-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.pay-opt span { display: flex; flex-direction: column; padding: 0.7rem; border: 1.5px solid #cfd5e1; border-radius: 12px; font-weight: 700; cursor: pointer; height: 100%; }
.pay-opt small { font-weight: 400; color: var(--muted); }
.pay-opt input:checked + span { border-color: var(--blue); background: var(--blue-50); box-shadow: 0 0 0 3px rgba(27, 63, 149, 0.12); }

.bill-head { display: flex; justify-content: space-between; align-items: flex-start; }
.bill-head h1 { font-size: 1.8rem; margin: 0; color: var(--blue); }
.progress { display: flex; list-style: none; padding: 0; margin: 1rem 0; counter-reset: s; }
.progress li { flex: 1; text-align: center; font-size: 0.85rem; color: var(--muted); position: relative; padding-top: 1.9rem; }
.progress li::before { counter-increment: s; content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #e5e8ef; display: grid; place-items: center; font-weight: 700; z-index: 1; }
.progress li::after { content: ''; position: absolute; top: 0.75rem; left: -50%; width: 100%; height: 3px; background: #e5e8ef; }
.progress li:first-child::after { display: none; }
.progress li.done { color: var(--green); font-weight: 700; }
.progress li.done::before { background: var(--green); color: #fff; content: '✓'; }
.progress li.done::after { background: var(--green); }
.progress.cancelled { display: block; background: #eef0f4; color: var(--muted); padding: 0.6rem; border-radius: 10px; text-align: center; }
.row-actions:has(> .btn) { justify-content: center; }
.pay-box { text-align: center; }
.pp-qr { width: 240px; height: 240px; image-rendering: pixelated; border: 6px solid #fff; outline: 1px solid var(--line); border-radius: 8px; }
.pp-amount { font-size: 1.6rem; font-weight: 800; color: var(--blue); margin: 0.3rem 0; }
.pay-upload { border-top: 1px dashed var(--line); margin-top: 1rem; padding-top: 0.8rem; }
.order-row .or-top { display: flex; gap: 0.75rem; align-items: baseline; }
.or-total { margin-left: auto; }
.or-items { color: var(--muted); font-size: 0.9rem; margin: 0.2rem 0 0.4rem; }
.or-badges { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* ================= Back office ================= */
.a-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; background: var(--blue); color: #fff; padding: 0.4rem 0.75rem; position: sticky; top: 0; z-index: 20; }
.a-brand { display: flex; align-items: center; gap: 0.5rem; color: #fff; text-decoration: none; font-weight: 700; }
.a-brand img { background: #fff; border-radius: 8px; width: 40px; height: 40px; object-fit: contain; }
.a-tools { display: flex; align-items: center; gap: 0.25rem; }
.a-tools .btn { color: #fff; }
.a-user { color: #fff; font-size: 0.9rem; opacity: 0.9; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-nav { display: flex; gap: 0.25rem; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--line); padding: 0 0.5rem; position: sticky; top: 56px; z-index: 19; scrollbar-width: none; }
.a-nav a { padding: 0.7rem 0.75rem; white-space: nowrap; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; display: flex; align-items: center; gap: 0.35rem; }
.a-nav a.on { color: var(--blue); border-color: var(--red); }
.nav-count { background: var(--red); color: #fff; border-radius: 999px; font-size: 0.72rem; padding: 0 0.45rem; min-width: 1.3rem; text-align: center; }
.a-main { max-width: 1200px; margin: 0 auto; padding: 1rem; }
.page-title { font-size: 1.3rem; margin-bottom: 1rem; }

.status-line { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; padding: 0.7rem 1rem; border-radius: 12px; font-weight: 600; margin-bottom: 1rem; }
.status-line.ok { background: var(--green-50); color: var(--green); }
.status-line.warn { background: var(--amber-50); color: var(--amber); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; margin-bottom: 0.5rem; }
.stat { background: #fff; border-radius: var(--r); padding: 0.8rem 1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.stat-label { color: var(--muted); font-size: 0.85rem; }
.stat-value { font-size: 1.45rem; }
.stat.tone-blue .stat-value { color: var(--blue); }
.stat.tone-red .stat-value { color: var(--red); }

.hut-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
.hut-card { background: linear-gradient(180deg, #f4fbf4 0%, #dff0dc 100%); border-radius: var(--r); box-shadow: var(--shadow); padding: 0.6rem 0.6rem 0.75rem; text-align: center; text-decoration: none; color: inherit; border: 2px solid transparent; display: block; }
.hut-card-busy { background: linear-gradient(180deg, #f3f6ff 0%, #dde6fb 100%); border-color: #b9c8ef; }
.hut-card-off { background: #eceef2; }
.hc-name { font-weight: 800; font-size: 1.05rem; }
.hc-sub { color: var(--muted); font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hut-card-busy .hc-sub { color: var(--blue); font-weight: 600; }
.hc-badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.3rem; }

.tabs { display: flex; gap: 0.4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a { padding: 0.45rem 0.9rem; border-radius: 999px; background: #fff; text-decoration: none; color: var(--muted); font-weight: 600; box-shadow: var(--shadow); }
.tabs a.on { background: var(--blue); color: #fff; }
.slot-group { margin-bottom: 1.4rem; }
.slot-head { display: flex; align-items: baseline; gap: 0.6rem; }
.slot-time { background: var(--blue); color: #fff; padding: 0.2rem 0.7rem; border-radius: 8px; }
.slot-head small { color: var(--muted); font-weight: 400; }
.tally { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: 0.9rem; color: #374151; background: #fff8e8; border-radius: 10px; padding: 0.5rem 0.8rem; }
.a-main .cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; }

.order-card { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 0.85rem 1rem; border-left: 5px solid var(--blue); }
.order-card.st-preparing { border-left-color: var(--amber); }
.order-card.st-delivered { border-left-color: var(--green); }
.order-card.st-cancelled { border-left-color: #c3c8d2; opacity: 0.75; }
.order-card.late { border-left-color: var(--red); box-shadow: 0 0 0 2px var(--red-50), var(--shadow); }
.oc-head { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.oc-no { font-size: 1.1rem; color: var(--blue); }
.oc-hut { font-weight: 700; }
.oc-slot b { font-size: 1.1rem; }
.oc-note { background: #fff8e8; border-radius: 8px; padding: 0.35rem 0.6rem; margin: 0.4rem 0; }
.oc-meta { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-size: 0.88rem; }
.oc-total { margin-left: auto; font-size: 1.1rem; }
.oc-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; align-items: flex-start; }
.oc-more { position: relative; }
.oc-more > summary { list-style: none; min-width: 42px; }
.oc-more > summary::-webkit-details-marker { display: none; }
.oc-more-body { position: absolute; right: 0; z-index: 5; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 0.5rem; display: flex; flex-direction: column; gap: 0.35rem; min-width: 210px; }
.oc-actions > .oc-more:last-child .oc-more-body { right: 0; }
.oc-more-body .btn, .oc-more-body form { width: 100%; }

.slip-card { display: flex; gap: 0.9rem; }
.slip-thumb img { width: 110px; height: 150px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #f5f5f5; }
.slip-info { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; min-width: 0; font-size: 0.92rem; }
.slip-amount b { font-size: 1.15rem; color: var(--blue); }
.debt-head { display: flex; justify-content: space-between; gap: 0.5rem; }
.debt-head a { text-decoration: none; color: inherit; }
.debt-list { list-style: none; padding: 0; margin: 0.5rem 0; }
.debt-list li { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0; border-bottom: 1px dashed var(--line); font-size: 0.92rem; }
.debt-list li span { flex: 1; }

.issue-form { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; }
.issue-form .field { margin: 0; flex: 0 1 180px; }
.ticket-list { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ticket-row { display: flex; align-items: center; gap: 0.8rem; margin: 0; }
.tr-no { font-size: 1.3rem; font-weight: 800; color: var(--blue); background: var(--blue-50); border-radius: 10px; padding: 0.3rem 0.6rem; }
.tr-main { flex: 1; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.tr-main small { color: var(--muted); }
.tr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; font-size: 0.85rem; color: var(--muted); }
.tk-unclaimed .tr-no { background: var(--amber-50); color: var(--amber); }
.tk-closed, .tk-expired { opacity: 0.7; }
.tk-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }
.tk-hut { font-size: 1.2rem; color: var(--blue); }
.tk-badge-active { background: var(--green-50); color: var(--green); }
.tk-badge-unclaimed { background: var(--amber-50); color: var(--amber); }
.sum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.5rem; margin: 0.8rem 0; }
.sum-grid > div { background: var(--bg); border-radius: 10px; padding: 0.5rem 0.75rem; display: flex; flex-direction: column; }
.sum-grid small { color: var(--muted); }

.hut-admin-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.75rem; }
.hut-admin { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; margin: 0; text-align: center; }
.hut-admin .row-actions { margin-top: 0.2rem; justify-content: center; }
.product-list { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.product-row { display: flex; align-items: center; gap: 0.75rem; margin: 0; }
.product-row .row-actions { margin: 0; flex-direction: column; align-items: stretch; }
.pr-img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; background: #f1f3f7; }
.pr-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.is-off { opacity: 0.6; }
.img-current { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.img-current img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 0.5rem; }
.slot-grid .inline-form { display: block; }
.slot { width: 100%; border-radius: 10px; border: 2px solid; padding: 0.4rem; display: flex; flex-direction: column; align-items: center; font: inherit; cursor: pointer; }
.slot b { font-size: 1.05rem; }
.slot small { font-size: 0.75rem; }
.slot-open { background: var(--green-50); border-color: #9fd3b2; color: var(--green); }
.slot-closed { background: var(--red-50); border-color: #f0b2ad; color: var(--red); text-decoration: line-through; }
.slot-closed small { text-decoration: none; }
.slot-past { background: #f1f2f5; border-color: #e1e4ea; color: #9aa1af; cursor: default; }
.pp-preview { display: flex; align-items: center; gap: 1rem; margin-top: 0.5rem; }
.pp-mini { width: 120px; flex: 0 0 auto; }
.pp-mini svg { display: block; width: 100%; height: auto; }
.user-row { margin: 0; }

/* ---------- Bare pages (login, landing, print) ---------- */
.bare { background: linear-gradient(180deg, #fff 0%, var(--bg) 60%); min-height: 100vh; }
.login, .landing { max-width: 400px; margin: 0 auto; padding: 2rem 1rem; text-align: center; }
.login form { text-align: left; margin-top: 1rem; }
.landing { padding-top: 15vh; }

.print-page { background: #e9ecf1; }
.print-bar { display: flex; gap: 0.5rem; justify-content: center; padding: 1rem; }
.paper { width: var(--paper, 80mm); margin: 0 auto 2rem; background: #fff; padding: 4mm; text-align: center; color: #000; font-size: 12pt; line-height: 1.35; }
.paper h1 { font-size: 15pt; margin: 2mm 0; }
.paper p { margin: 1.5mm 0; }
.paper-logo { width: 34mm; height: auto; }
.paper-logo.small { width: 22mm; }
.paper-qr svg { display: block; width: 100%; max-width: 60mm; height: auto; margin: 2mm auto; }
.paper-no { font-size: 13pt; }
.paper-no b { font-size: 18pt; }
.paper-exp b { font-size: 14pt; }
.paper-note { font-size: 9.5pt; border-top: 1px dashed #000; padding-top: 2mm; margin-top: 3mm !important; }
.receipt { text-align: left; font-size: 10.5pt; }
.receipt h1, .receipt > p, .receipt .paper-logo { text-align: center; display: block; margin-left: auto; margin-right: auto; }
.receipt hr { border: 0; border-top: 1px dashed #000; margin: 2mm 0; }
.r-meta, .r-line { display: flex; justify-content: space-between; gap: 2mm; }
.r-order { margin-bottom: 1.5mm; }
.r-line span:first-child { padding-left: 2mm; }
.r-total { font-size: 12pt; }
.r-total span:first-child { padding-left: 0; }

@media print {
  @page { margin: 0; }
  .no-print { display: none !important; }
  body, .print-page { background: #fff; }
  .paper { margin: 0; box-shadow: none; }
}

@media (max-width: 420px) {
  .a-main .cards, .ticket-list, .product-list { grid-template-columns: 1fr; }
  .a-user { display: none; }
  .pay-opts { grid-template-columns: 1fr; }
}
