/* Dragon Legend POS — shared styles */
:root {
  --ink: #0b0505; --ink-2: #140909; --ink-3: #1f0e0e; --ink-4: #2a1414;
  --crimson: #8e1b1b; --crimson-2: #c0392b;
  --gold: #d4b062; --gold-2: #f1d793; --gold-dim: #8c7239;
  --text: #f3e9d6; --muted: #a8987f; --line: rgba(212, 176, 98, .18);
  --ok: #4ade80; --warn: #fbbf24; --info: #60a5fa; --bad: #f87171;
  --serif: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  --han: "Noto Serif SC", serif;
  --sans: "Manrope", system-ui, sans-serif;
  --r: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ink); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: var(--text); color-scheme: dark; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.han { font-family: var(--han); }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.gold { color: var(--gold-2); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 20px; border-radius: 12px; font-weight: 700; font-size: .9rem; letter-spacing: .02em; border: 1px solid var(--line); transition: transform .15s, background .2s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-gold { background: linear-gradient(120deg, var(--gold-2), var(--gold)); color: var(--ink); border-color: transparent; }
.btn-red { background: var(--crimson); border-color: var(--crimson-2); }
.btn-ghost { background: rgba(255, 255, 255, .03); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: .8rem; border-radius: 9px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.input { width: 100%; padding: 13px 14px; border-radius: 11px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); outline: none; transition: border-color .2s, box-shadow .2s; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 176, 98, .15); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border: 1px solid currentColor; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-new { color: var(--warn); } .st-cooking { color: var(--info); } .st-ready { color: #2dd4bf; } .st-served { color: var(--ok); } .st-cancelled { color: var(--bad); }
.st-unpaid { color: var(--bad); } .st-open { color: var(--ok); } .st-paying { color: var(--warn); } .st-paid { color: var(--gold); } .st-free { color: var(--muted); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.stepper button { width: 34px; height: 34px; font-size: 1.1rem; color: var(--gold); }
.stepper span { min-width: 26px; text-align: center; font-weight: 700; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; background: var(--ink-4); border: 1px solid var(--gold-dim); padding: 12px 18px; border-radius: 12px; z-index: 999; transition: .3s var(--ease); max-width: calc(100% - 32px); box-shadow: 0 20px 40px rgba(0, 0, 0, .5); font-size: .9rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: var(--bad); }

.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .25s; }
.sheet-bg.open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; max-height: 92svh; overflow: auto; background: var(--ink-2); border-top: 1px solid var(--gold-dim); border-radius: 22px 22px 0 0; transform: translateY(105%); transition: transform .35s var(--ease); padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto; }
.sheet.open { transform: none; }
.sheet .grab { width: 44px; height: 4px; border-radius: 4px; background: var(--line); margin: 4px auto 14px; }
.sheet h3 { font-family: var(--serif); font-size: 1.6rem; margin: 0 0 12px; color: var(--gold-2); font-weight: 600; }

.spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; color: var(--muted); font-size: .92rem; }
.sum-row.total { color: var(--gold-2); font-size: 1.15rem; font-weight: 700; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 12px; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .han { font-size: 3rem; color: var(--gold-dim); display: block; margin-bottom: 6px; }
