/* Bhashani Cafe design tokens (from the Figma style guide) */
:root {
  --red: #C8412D; --red-hover: #A9361F; --red-subtle: #FBE9E5;
  --green: #2F7D3E; --green-subtle: #E6F2E8;
  --turmeric: #E9A825; --turmeric-subtle: #FCF1D9;
  --cream: #FBF6EC; --surface: #FFFFFF; --subtle: #F3ECDF;
  --ink: #1F1A16; --ink-2: #5C524A; --muted: #978C82;
  --border: #E6DCCB; --border-strong: #CDBFA8;
  --shadow: 0 1px 2px rgba(31,26,22,.06), 0 4px 14px rgba(31,26,22,.06);
  --radius: 14px;
  --font-head: "Baloo Da 2", "Noto Sans Bengali", system-ui, sans-serif;
  --font-body: "Hind Siliguri", "Noto Sans Bengali", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font-body); color: var(--ink); background: var(--cream); font-size: 15px; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid var(--turmeric); outline-offset: 2px; }
h1, h2, h3, .head { font-family: var(--font-head); margin: 0; line-height: 1.15; }
h1 { font-size: 28px; font-weight: 800; } h2 { font-size: 22px; font-weight: 700; } h3 { font-size: 18px; font-weight: 700; }
.small { font-size: 13px; } .muted { color: var(--muted); } .sec { color: var(--ink-2); }
.price { font-family: var(--font-head); font-weight: 700; color: var(--red); }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.between { justify-content: space-between; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 12px; font-weight: 600; font-size: 15px; transition: background .12s, transform .05s; user-select: none; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--red); color: #fff; } .btn-primary:hover { background: var(--red-hover); }
.btn-green { background: var(--green); color: #fff; }
.btn-outline { border: 1.5px solid var(--red); color: var(--red); background: var(--surface); }
.btn-ghost { border: 1px solid var(--border); background: var(--surface); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-big { min-height: 58px; font-family: var(--font-head); font-size: 19px; font-weight: 700; }
.btn-block { width: 100%; }
.kbd { font-size: 11px; opacity: .7; border: 1px solid currentColor; border-radius: 5px; padding: 0 5px; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill-green { background: var(--green-subtle); color: var(--green); }
.pill-red { background: var(--red-subtle); color: var(--red); }
.pill-yellow { background: var(--turmeric-subtle); color: var(--ink); }
.pill-grey { background: var(--subtle); color: var(--ink-2); }
.chip { border-radius: 999px; padding: 8px 14px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; white-space: nowrap; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.input { width: 100%; border: 1.5px solid var(--border); border-radius: 12px; padding: 11px 14px; background: var(--surface); }
.input:focus { border-color: var(--green); outline: none; }
.token { font-family: var(--font-head); font-weight: 800; background: var(--turmeric); border-radius: 10px; padding: 4px 12px; font-size: 22px; }
.seg { display: flex; gap: 4px; background: var(--subtle); padding: 4px; border-radius: 12px; }
.seg button { flex: 1; padding: 8px 10px; border-radius: 9px; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }

/* modal & toast */
.overlay { position: fixed; inset: 0; background: rgba(31,26,22,.55); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: var(--surface); border-radius: 20px; padding: 24px 26px; width: min(460px, 100%); max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 80; box-shadow: var(--shadow); max-width: 90vw; }
.toast.err { background: var(--red); }

/* sign-in */
.signin { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; }
.signin .card { width: min(380px, 100%); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pinpad button { height: 54px; border-radius: 12px; background: var(--subtle); font-family: var(--font-head); font-size: 22px; font-weight: 700; }
.pindots { display: flex; justify-content: center; gap: 10px; height: 18px; }
.pindots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); }
.pindots i.on { background: var(--ink); border-color: var(--ink); }

/* 58 mm thermal receipt: only #print is printed */
#print { display: none; }
@media print {
  @page { size: 58mm auto; margin: 0; }
  body * { visibility: hidden !important; }
  #print, #print * { visibility: visible !important; }
  #print { display: block; position: absolute; left: 0; top: 0; width: 58mm; padding: 2mm 3mm; font-family: var(--font-body); color: #000; font-size: 11px; }
  #print .r-center { text-align: center; }
  #print .r-token { font-family: var(--font-head); font-size: 40px; font-weight: 800; line-height: 1; margin: 2mm 0; }
  #print .r-row { display: flex; justify-content: space-between; gap: 4px; }
  #print .r-line { border-top: 1px dashed #000; margin: 1.5mm 0; }
  #print .r-big { font-size: 14px; font-weight: 700; }
  #print img { width: 14mm; }
}
