/* =====================================================================
   re.juve/89 POS — design system
   Deep forest green on soft cream. Calm, rounded, generous spacing.
   ===================================================================== */

:root {
  /* greens */
  --g-900: #0F271D;
  --g-800: #153829;
  --g-700: #1F4D3A;   /* primary */
  --g-600: #29604A;
  --g-500: #3B7A5C;
  --g-300: #9CC5A8;
  --g-200: #C9DFCF;
  --g-100: #E4EFE7;
  --g-50:  #F1F6F2;

  /* neutrals */
  --cream: #F6F4EE;
  --surface: #FFFFFF;
  --ink: #1A2B23;
  --ink-2: #4A5C53;
  --muted: #87978E;
  --line: #E7E9E2;
  --line-2: #EFF1EB;

  /* accents */
  --gold: #C8975A;
  --danger: #B9534A;
  --danger-bg: #FAECEA;
  --warn-bg: #FBF3E3;
  --warn-ink: #8A5A12;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --sh-1: 0 1px 2px rgba(15, 39, 29, .04), 0 2px 10px rgba(15, 39, 29, .05);
  --sh-2: 0 6px 24px rgba(15, 39, 29, .10);
  --sh-3: 0 24px 60px rgba(15, 39, 29, .22);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
input, textarea, select { user-select: text; font: inherit; color: inherit; }
a { color: inherit; }
.ic { flex-shrink: 0; display: block; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ---------------- buttons ---------------- */
button { font: inherit; color: inherit; border: none; background: none; cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .45; cursor: not-allowed; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: var(--r);
  background: var(--g-50); color: var(--g-800); font-weight: 600;
  border: 1px solid var(--line);
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn:hover:not(:disabled) { background: var(--g-100); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { background: var(--g-700); color: #fff; border-color: var(--g-700); box-shadow: 0 4px 14px rgba(31, 77, 58, .25); }
.btn.primary:hover:not(:disabled) { background: var(--g-800); }
.btn.danger { background: var(--danger-bg); color: var(--danger); border-color: #F2D6D2; }
.btn.danger:hover:not(:disabled) { background: #F6DEDA; }
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn.block { width: 100%; }
.btn.xl { padding: 18px 22px; font-size: 18px; border-radius: var(--r-lg); }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2); transition: background .15s;
}
.icon-btn:hover { background: var(--g-50); }

.pill-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .10); color: #fff; font-weight: 600; font-size: 14px;
  text-decoration: none; border: 1px solid rgba(255, 255, 255, .14);
  transition: background .15s;
}
.pill-btn:hover { background: rgba(255, 255, 255, .18); }

/* ---------------- form controls ---------------- */
input[type=text], input[type=number], input[type=tel], input[type=password], input[type=date], select, textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--g-500); box-shadow: 0 0 0 4px rgba(59, 122, 92, .14); }
label { display: block; font-size: 12.5px; color: var(--ink-2); margin: 14px 0 6px; font-weight: 600; letter-spacing: .01em; }
.field-icon { position: relative; }
.field-icon .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.field-icon input { padding-left: 42px; }
.check { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; font-size: 14px; margin-top: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--g-700); }

/* ---------------- app bar ---------------- */
.appbar {
  height: 72px; padding: 0 20px;
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(120deg, var(--g-800), var(--g-700) 60%, var(--g-600));
  color: #fff;
  position: relative; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: inline-block; box-shadow: 0 0 0 2px rgba(255,255,255,.25); flex-shrink: 0; overflow: hidden; }
.avatar svg { display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.brand-sub { font-size: 12px; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-search { flex: 1; max-width: 460px; margin-left: auto; position: relative; }
.appbar-search input {
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .16); color: #fff;
  padding-left: 42px; border-radius: 999px;
}
.appbar-search input::placeholder { color: rgba(255, 255, 255, .6); }
.appbar-search input:focus { background: rgba(255, 255, 255, .18); border-color: rgba(255,255,255,.35); box-shadow: none; }
.appbar-search .ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.7); }
.appbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.appbar-search + .appbar-actions { margin-left: 0; }
.clock { font-size: 14px; opacity: .85; font-variant-numeric: tabular-nums; padding: 0 6px; white-space: nowrap; }

/* ---------------- billing layout ---------------- */
.pos { display: grid; grid-template-columns: 1fr 400px; height: calc(100vh - 72px); }
.menu-pane { display: flex; flex-direction: column; overflow: hidden; }

.cats { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 20px 6px; flex-shrink: 0; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 10px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
  white-space: nowrap; font-weight: 600; color: var(--ink-2);
  transition: all .18s var(--ease);
  box-shadow: var(--sh-1);
}
.cat .cat-ic { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; }
.cat .cat-count { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--line-2); padding: 1px 8px; border-radius: 999px; }
.cat:hover { transform: translateY(-1px); }
.cat.active { background: var(--g-700); color: #fff; border-color: var(--g-700); box-shadow: 0 6px 18px rgba(31, 77, 58, .28); }
.cat.active .cat-ic { background: rgba(255,255,255,.14) !important; }
.cat.active .cat-ic svg { stroke: #fff; }
.cat.active .cat-count { background: rgba(255,255,255,.16); color: #fff; }

.section-head { display: flex; align-items: baseline; gap: 10px; padding: 12px 22px 4px; }
.section-head h2 { margin: 0; font-size: 20px; font-weight: 700; color: var(--g-800); }
.section-head span { color: var(--muted); font-size: 13px; }

.items {
  flex: 1; overflow-y: auto; padding: 10px 20px 28px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 16px; align-content: start; grid-auto-rows: max-content;
}
.item {
  position: relative; text-align: left;
  background: var(--surface); border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--sh-1);
  display: flex; flex-direction: column;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
  animation: rise .35s var(--ease) both;
}
.item:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--g-200); }
.item:active { transform: scale(.97); }
.item .thumb { aspect-ratio: 4 / 3; overflow: hidden; position: relative; flex-shrink: 0; }
.thumb-svg { width: 100%; height: 100%; display: block; }
.thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item .meta { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.item .name { font-weight: 700; font-size: 15px; color: var(--ink); line-height: 1.25; }
.item .desc { color: var(--muted); font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.item .price { font-weight: 700; color: var(--g-700); font-size: 15px; }
.item .price small { font-weight: 500; color: var(--muted); font-size: 11px; margin-right: 3px; }
.item .add {
  width: 32px; height: 32px; border-radius: 10px; background: var(--g-50); color: var(--g-700);
  display: flex; align-items: center; justify-content: center; border: 1px solid var(--g-100);
  transition: background .15s, color .15s;
}
.item:hover .add { background: var(--g-700); color: #fff; }
.item .in-cart {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--g-700); color: #fff; font-weight: 700; font-size: 13px;
  min-width: 28px; height: 28px; border-radius: 999px; padding: 0 9px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(31, 77, 58, .35);
  animation: pop .25s var(--ease);
}
.items .empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 60px 20px; }

/* ---------------- cart ---------------- */
.cart-pane {
  background: var(--surface); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; overflow: hidden;
}
.cart-head { padding: 18px 20px 14px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line-2); }
.cart-head h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--g-800); }
.cart-head .sub { font-size: 12.5px; color: var(--muted); }
.cart-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cart-toggle { width: 34px; height: 34px; color: var(--g-700); flex-shrink: 0; }
.cart-head .cart-toggle { margin-left: -8px; }

/* collapsible cart: slim rail with count, total and a quick Charge button */
.pos { transition: grid-template-columns .25s var(--ease); }
.pos.cart-collapsed { grid-template-columns: 1fr 88px; }
.cart-rail { display: none; }
.pos.cart-collapsed .cart-pane > :not(.cart-rail) { display: none; }
.pos.cart-collapsed .cart-rail { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 14px 0 18px; height: 100%; animation: fade .2s ease; }
.rail-bag {
  position: relative; width: 50px; height: 50px; border-radius: 15px;
  background: var(--g-50); border: 1px solid var(--g-100); color: var(--g-700);
  display: flex; align-items: center; justify-content: center;
}
.rail-count {
  position: absolute; top: -7px; right: -7px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--g-700); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 8px rgba(31, 77, 58, .3);
}
.rail-count.zero { display: none; }
.rail-total { display: flex; flex-direction: column; align-items: center; gap: 1px; font-weight: 800; font-size: 15px; color: var(--g-800); white-space: nowrap; line-height: 1.2; }
.rail-total small { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.rail-pay { margin-top: auto; width: 54px; height: 54px; padding: 0; border-radius: 16px; }
.cart-lines { flex: 1; overflow-y: auto; padding: 6px 12px; }
.cart-empty { text-align: center; padding: 50px 30px; color: var(--muted); }
.cart-empty .art { width: 120px; height: 120px; margin: 0 auto 14px; border-radius: 50%; overflow: hidden; opacity: .9; }
.cart-empty b { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }

.line {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 4px 12px; align-items: center;
  padding: 12px 8px; border-bottom: 1px solid var(--line-2);
  animation: slidein .25s var(--ease);
}
.line .lthumb { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; grid-row: span 2; }
.line .lname { font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.line .lmeta { color: var(--muted); font-size: 12px; line-height: 1.35; }
.line .ltotal { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--g-50); border-radius: 12px; padding: 3px; border: 1px solid var(--g-100); }
.stepper button { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--g-700); }
.stepper button:hover { background: #fff; }
.stepper span { min-width: 24px; text-align: center; font-weight: 700; font-size: 14px; }

.cart-foot { padding: 14px 20px 18px; border-top: 1px solid var(--line-2); background: linear-gradient(180deg, #fff, var(--g-50)); }
.row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0; font-size: 14px; color: var(--ink-2); }
.row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.row.discount b { color: var(--g-600); }
.row.total { font-size: 15px; color: var(--ink); margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.row.total b { font-size: 28px; font-weight: 800; color: var(--g-800); letter-spacing: -.01em; }
.foot-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.foot-actions #btn-custom { grid-column: 1 / -1; }   /* third button gets its own row */
.chip-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px; border-radius: var(--r); font-weight: 600; font-size: 14px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  transition: all .15s;
}
.chip-btn:hover { border-color: var(--g-300); color: var(--g-700); }
.chip-btn.on { background: var(--g-50); border-color: var(--g-300); color: var(--g-700); }
.pay-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; font-size: 18px; border-radius: var(--r-lg); }

/* ---------------- modal ---------------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; padding: 20px;
  background: rgba(15, 39, 29, .42); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  animation: fade .18s ease both;
}
.overlay.closing { animation: fade .16s ease reverse both; }
.overlay.closing .modal { animation: modal-in .16s ease reverse both; }
.modal {
  background: var(--surface); border-radius: var(--r-xl); width: 560px; max-width: 100%;
  max-height: 92vh; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--sh-3);
  animation: modal-in .24s var(--ease) both;
}
.modal.wide { width: 860px; }
.modal-head { padding: 18px 20px 14px 24px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { margin: 0; font-size: 19px; font-weight: 700; color: var(--g-800); }
.modal-head .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.modal-body { padding: 18px 24px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; justify-content: flex-end; align-items: center; background: var(--g-50); }
.spacer { flex: 1; }

/* item modal hero */
.item-hero { display: flex; gap: 18px; align-items: center; padding: 20px 24px; background: var(--g-50); border-bottom: 1px solid var(--line-2); position: relative; }
.item-hero .hero-thumb { width: 108px; height: 108px; border-radius: 22px; overflow: hidden; flex-shrink: 0; box-shadow: var(--sh-1); }
.item-hero h3 { margin: 0; font-size: 22px; color: var(--g-800); }
.item-hero .desc { color: var(--ink-2); font-size: 14px; margin-top: 3px; }
.item-hero .cat-tag { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.item-hero .icon-btn { position: absolute; top: 12px; right: 12px; }

.section-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin: 18px 0 10px; }
.section-title:first-child { margin-top: 0; }
.sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.size {
  padding: 12px; border-radius: var(--r); border: 1.5px solid var(--line); background: #fff; text-align: center;
  transition: all .15s;
}
.size b { display: block; font-size: 16px; color: var(--ink); }
.size span { font-size: 14px; color: var(--g-700); font-weight: 600; }
.size .cup { display: block; margin: 0 auto 6px; color: var(--g-500); }
.size.on { border-color: var(--g-700); background: var(--g-50); box-shadow: 0 0 0 3px rgba(31, 77, 58, .10); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line);
  font-weight: 600; font-size: 14px; color: var(--ink-2); transition: all .15s;
}
.chip small { color: var(--muted); font-weight: 600; }
.chip .tick { display: none; }
.chip.on { border-color: var(--g-700); background: var(--g-700); color: #fff; }
.chip.on small { color: rgba(255,255,255,.75); }
.chip.on .tick { display: block; }
.qty-row { display: flex; align-items: center; justify-content: space-between; }
.qty-big { display: inline-flex; align-items: center; gap: 6px; background: var(--g-50); border: 1px solid var(--g-100); padding: 5px; border-radius: 16px; }
.qty-big button { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--g-700); background: #fff; box-shadow: var(--sh-1); }
.qty-big span { font-size: 22px; font-weight: 800; min-width: 40px; text-align: center; }

/* payment */
.pay-amount { text-align: center; margin-bottom: 18px; }
.pay-amount .k { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.pay-amount .v { font-size: 44px; font-weight: 800; color: var(--g-800); letter-spacing: -.02em; line-height: 1.1; }
.pay-methods { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; }
.pay-methods button {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 8px; border-radius: var(--r-lg); border: 1.5px solid var(--line); background: #fff;
  font-weight: 700; color: var(--ink-2); transition: all .15s;
}
.pay-methods button .ic { color: var(--g-500); }
.pay-methods button.on { border-color: var(--g-700); background: var(--g-700); color: #fff; box-shadow: 0 6px 18px rgba(31, 77, 58, .25); }
.pay-methods button.on .ic { color: #fff; }
.pay-panel { margin-top: 16px; animation: fade .2s ease; }
.quick-cash { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.quick-cash button { padding: 10px 16px; border-radius: 999px; background: var(--g-50); border: 1px solid var(--g-100); font-weight: 700; color: var(--g-800); }
.quick-cash button:hover { background: var(--g-100); }
.change { margin-top: 14px; padding: 14px 16px; border-radius: var(--r); background: var(--g-50); display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: var(--ink-2); }
.change b { font-size: 22px; color: var(--g-800); }
.change.bad { background: var(--danger-bg); color: var(--danger); }
.change.bad b { color: var(--danger); }
.upi-box { text-align: center; padding: 16px; border-radius: var(--r-lg); background: var(--g-50); border: 1px solid var(--g-100); }
.upi-box img { width: 250px; height: 250px; object-fit: contain; background: #fff; border-radius: 16px; padding: 8px; box-shadow: var(--sh-1); }
.qr-zoomable { position: relative; display: inline-block; padding: 0; border-radius: 16px; cursor: zoom-in; transition: transform .15s var(--ease); }
.qr-zoomable:hover { transform: scale(1.02); }
.qr-zoomable img { display: block; }
.zoom-tag {
  position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  background: var(--g-700); color: #fff; font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 999px; box-shadow: 0 4px 12px rgba(31, 77, 58, .3);
}
.upi-box .qr-zoomable + .hint { margin-top: 22px; }

/* full-screen scanner (white background = best contrast for phone cameras) */
.qr-zoom {
  position: fixed; inset: 0; z-index: 150; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 24px; cursor: zoom-out; animation: fade .18s ease both;
}
.qr-zoom.closing { animation: fade .16s ease reverse both; }
.qr-zoom img {
  width: min(78vh, 90vw); height: min(78vh, 90vw); object-fit: contain;
  animation: modal-in .25s var(--ease) both;
}
.qr-zoom-shop { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.qr-zoom-amount { font-size: 40px; font-weight: 800; color: var(--g-800); line-height: 1; letter-spacing: -.02em; }
.qr-zoom-hint { font-size: 14px; color: var(--muted); }
.qr-zoom-close { position: absolute; top: 18px; right: 18px; width: 52px; height: 52px; background: var(--g-50); border-radius: 16px; }
.upi-box .hint { color: var(--ink-2); font-size: 13.5px; margin-top: 10px; }
.upi-box .hint b { color: var(--g-800); font-size: 17px; }
.info-box { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: var(--r-lg); background: var(--g-50); color: var(--ink-2); }

/* WhatsApp */
.btn.wa { background: #1FA855; color: #fff; border-color: #1FA855; box-shadow: 0 4px 14px rgba(31, 168, 85, .25); }
.btn.wa:hover:not(:disabled) { background: #178F47; }
.btn.wa .wa-num { opacity: .8; font-weight: 500; font-size: 13px; }
.btn.wa-big { padding: 12px 18px; }
.btn.wa-big > span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.phone-field .cc { position: absolute; left: 40px; top: 50%; transform: translateY(-50%); font-weight: 600; color: var(--ink-2); font-size: 15px; }
.phone-field input { padding-left: 78px; letter-spacing: .02em; }
.phone-field .ic { color: #1FA855; }
.phone-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 28px; margin-top: 6px; flex-wrap: wrap; }
.phone-hint { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; }
.phone-foot .phone-hint { margin-top: 0; }
.phone-hint.good { color: #178F47; font-weight: 600; }
.phone-hint.bad { color: var(--danger); font-weight: 600; }
.wa-check { margin: 0; gap: 7px; font-weight: 600; color: #178F47; }
.wa-check input { accent-color: #1FA855; }

.wa-reminder { display: flex; gap: 10px; text-align: left; margin-top: 18px; padding: 12px 14px; border-radius: var(--r); background: #E8F7EE; color: #145C33; font-size: 13px; line-height: 1.45; }
.wa-reminder .ic { color: #1FA855; margin-top: 1px; }
.pdf-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--g-50); }
.pdf-ic { width: 42px; height: 50px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--danger); font-weight: 800; font-size: 11px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 7px; box-shadow: var(--sh-1); flex-shrink: 0; }
.pdf-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pdf-meta b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-meta span { font-size: 12.5px; color: var(--muted); }
.pdf-card a.btn { text-decoration: none; }
.wa-steps { margin: 14px 0 0; padding-left: 20px; color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.wa-steps li::marker { color: #1FA855; font-weight: 800; }
.modal-head h3 .ic { display: inline-block; vertical-align: -3px; color: #1FA855; }

/* success */
.success { text-align: center; padding: 34px 28px 26px; }
.success .tick-circle {
  width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--g-700); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 10px var(--g-100);
  animation: pop .4s var(--ease);
}
.success .tok-label { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-top: 8px; }
.success .tok { font-size: 64px; font-weight: 800; color: var(--g-800); line-height: 1; letter-spacing: -.02em; }
.success .paid { color: var(--ink-2); margin-top: 8px; }
.success .actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; margin-top: 22px; }
.success .actions.bill-soft { grid-template-columns: 1fr 1fr; }
.bill-soft-row { display: flex; gap: 8px; margin-top: 12px; }

/* toast */
.toast {
  position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 160;
  display: flex; align-items: center; gap: 10px;
  background: var(--g-800); color: #fff; padding: 12px 18px; border-radius: 14px;
  font-weight: 600; font-size: 14px; box-shadow: var(--sh-3);
  animation: toast-in .25s var(--ease) both;
}
.toast.err { background: var(--danger); }
.toast.out { animation: toast-out .3s ease both; }

/* ---------------- splash ---------------- */
#splash {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(120% 90% at 50% 30%, var(--g-600) 0%, var(--g-800) 55%, var(--g-900) 100%);
  color: #fff; text-align: center;
  transition: opacity .6s ease, visibility .6s;
}
#splash.gone { opacity: 0; visibility: hidden; }
#splash .ring {
  width: 168px; height: 168px; border-radius: 50%; padding: 6px;
  background: conic-gradient(from 0deg, rgba(255,255,255,.65), rgba(156,197,168,.25), rgba(255,255,255,.65));
  animation: breathe 2.4s ease-in-out infinite;
}
#splash .ring > * { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: var(--g-100); overflow: hidden; }
#splash .ring svg { width: 100%; height: 100%; }
#splash h1 { margin: 6px 0 0; font-size: 46px; font-weight: 800; letter-spacing: .01em; animation: rise .7s .15s var(--ease) both; }
#splash h1 .slash { color: var(--g-300); font-weight: 600; }
#splash p { margin: 0; font-size: 15px; letter-spacing: .18em; text-transform: uppercase; opacity: .78; animation: rise .7s .3s var(--ease) both; }
#splash .loader { width: 160px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; margin-top: 18px; }
#splash .loader i { display: block; height: 100%; width: 40%; background: var(--g-300); border-radius: 3px; animation: load 1.1s ease-in-out infinite; }
#splash .tap { position: absolute; bottom: 28px; font-size: 12px; opacity: .5; letter-spacing: .08em; }
#splash .leaf { position: absolute; opacity: .08; }

/* ---------------- pages (reports / admin) ---------------- */
.page { max-width: 1140px; margin: 0 auto; padding: 24px 20px 40px; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title h1 { margin: 0; font-size: 26px; color: var(--g-800); letter-spacing: -.01em; }
.page-title .sub { color: var(--muted); font-size: 14px; }
.card { background: var(--surface); border-radius: var(--r-lg); padding: 20px; margin-bottom: 18px; box-shadow: var(--sh-1); border: 1px solid var(--line); }
.card h3 { margin: 0 0 4px; font-size: 16px; color: var(--g-800); display: flex; align-items: center; gap: 8px; }
.card .card-sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h3 { margin: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
th { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.group td { background: var(--g-50); font-weight: 700; color: var(--g-800); }
tbody tr.click { cursor: pointer; transition: background .12s; }
tbody tr.click:hover { background: var(--g-50); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--sh-1); border: 1px solid var(--line); display: flex; gap: 14px; align-items: center; }
.stat .s-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--g-50); color: var(--g-700); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat.hero { background: linear-gradient(135deg, var(--g-700), var(--g-600)); color: #fff; border: none; }
.stat.hero .s-ic { background: rgba(255,255,255,.14); color: #fff; }
.stat.hero .k { color: rgba(255,255,255,.75); }
.stat.hero .v { color: #fff; }
.stat .k { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 24px; font-weight: 800; color: var(--g-800); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tabs { display: inline-flex; gap: 4px; margin-bottom: 18px; flex-wrap: wrap; background: var(--surface); padding: 5px; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--sh-1); }
.tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; font-weight: 600; color: var(--ink-2); font-size: 14px; }
.tabs button:hover { background: var(--g-50); }
.tabs button.on { background: var(--g-700); color: #fff; }
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--g-50); color: var(--g-700); }
.badge.void { background: var(--danger-bg); color: var(--danger); }
.badge.off { background: var(--warn-bg); color: var(--warn-ink); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.inline { display: flex; gap: 10px; align-items: center; }
.bar-track { height: 8px; background: var(--g-50); border-radius: 4px; overflow: hidden; }
.bar { height: 100%; background: linear-gradient(90deg, var(--g-500), var(--g-700)); border-radius: 4px; }
.warn { display: flex; gap: 10px; align-items: center; background: var(--warn-bg); color: var(--warn-ink); padding: 12px 16px; border-radius: var(--r); margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.mini-thumb { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.name-cell { display: flex; align-items: center; gap: 12px; }
.img-drop {
  width: 168px; height: 168px; border-radius: var(--r-lg); border: 1.5px dashed var(--g-200);
  background: var(--g-50); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--muted);
  flex-shrink: 0;
}
.img-drop img { width: 100%; height: 100%; object-fit: contain; }
.img-drop.round { border-radius: 50%; }
.img-drop.round img { object-fit: cover; }
.upload-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.upload-row > div:last-child { flex: 1; min-width: 200px; }
.login-card { max-width: 400px; margin: 60px auto; text-align: center; padding: 32px; }
.login-card .avatar { width: 72px; height: 72px; margin: 0 auto 12px; display: block; box-shadow: 0 0 0 6px var(--g-50); }
.empty-note { color: var(--muted); padding: 18px 4px; text-align: center; }
code { background: var(--g-50); padding: 1px 6px; border-radius: 6px; font-size: 13px; }

/* ---------------- animations ---------------- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes slidein { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, -12px); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
.bump { animation: bump .3s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 1100px) {
  .pos { grid-template-columns: 1fr 350px; }
  .items { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .clock { display: none; }
  .pill-btn span { display: none; }
  .pill-btn { padding: 10px 12px; }
}
@media (max-width: 760px) {
  .grid2 { grid-template-columns: 1fr; }
}

/* ---------------- 58mm thermal receipt ---------------- */
#receipt { display: none; }
@media print {
  @page { size: 58mm auto; margin: 0; }
  body { background: #fff; }
  body > *:not(#receipt) { display: none !important; }
  #receipt {
    display: block; width: 48mm; margin: 0 auto; padding: 2mm 0 6mm;
    font-family: "Courier New", monospace; font-size: 11px; line-height: 1.3; color: #000;
  }
}
#receipt .c { text-align: center; }
#receipt .shop { font-size: 15px; font-weight: 700; }
#receipt .tok { font-size: 22px; font-weight: 700; margin: 4px 0; }
#receipt .hr { border-top: 1px dashed #000; margin: 4px 0; }
#receipt .r { display: flex; justify-content: space-between; gap: 4px; }
#receipt .sub { padding-left: 6px; font-size: 10px; }
#receipt .big { font-size: 14px; font-weight: 700; }
#receipt .small { font-size: 10px; }
#receipt .fssai-row { display: flex; justify-content: center; align-items: center; gap: 3mm; margin: 2px 0 1px; }
#receipt img.fssai { width: 18mm; height: auto; filter: grayscale(1) contrast(1.4); }
#receipt img.fssai-qr { width: 14mm; height: 14mm; image-rendering: pixelated; }

/* =====================================================================
   Recipe card (kitchen screen + Recipe Lab)
   ===================================================================== */
a.btn { text-decoration: none; }
.recipe-modal.modal.wide { width: 1080px; }
.rc { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.rc-main > .section-title:first-child { margin-top: 0; }
.rc-summary { margin: 2px 0 6px; color: var(--ink-2); font-size: 15px; }
.rc-alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r); margin-bottom: 10px; font-size: 14px; line-height: 1.4; }
.rc-alert .ic { margin-top: 1px; }
.rc-alert.draft, .rc-alert.warn { background: var(--warn-bg); color: var(--warn-ink); }
.rc-alert.warn { border: 1.5px solid #E9C98B; }
.rc-alert.opt { background: #FFF1D6; color: #7A4B00; border: 1.5px solid #F2C46B; font-size: 15px; }
.rc-alert.info { background: #E9F1FA; color: #2F5277; }
.rc-alert.ok { background: var(--g-50); color: var(--g-700); }
.rc-alert .muted { color: inherit; opacity: .8; font-size: 13px; margin-top: 2px; }
.rc-ings td, .rc-ings th { padding: 9px 10px; }
.rc-ings td.qty { font-size: 17px; font-weight: 800; color: var(--g-800); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-ings td.qty.total { color: var(--gold); }
.rc-prep { font-size: 12.5px; margin-top: 1px; }
.rc-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.rc-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--g-50); border: 1px solid var(--line-2); font-size: 15px; }
.step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--g-700); color: #fff; font-weight: 800; font-size: 13.5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-t { flex: 1; }
.timer-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: #fff; border: 1.5px solid var(--g-300); color: var(--g-700); font-weight: 800; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.timer-btn.running { background: var(--g-700); color: #fff; border-color: var(--g-700); animation: breathe 1s infinite; }
.timer-btn.finished { background: var(--gold); border-color: var(--gold); color: #fff; }
.tick-row { cursor: pointer; transition: opacity .15s, background .15s; }
.tick-cell { width: 34px; }
.tick-box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--g-300); display: flex; align-items: center; justify-content: center; color: transparent; background: #fff; }
.tick-row.ticked { opacity: .45; }
.tick-row.ticked .tick-box { background: var(--g-700); border-color: var(--g-700); color: #fff; }
.rc-steps li.ticked .step-n { background: var(--g-300); }
.rc-steps li.ticked .step-t { text-decoration: line-through; }
.rc-side { display: flex; flex-direction: column; gap: 12px; }
.rc-thumb { width: 100%; aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1); }
.rc-thumb .thumb-svg, .rc-thumb .thumb-img { width: 100%; height: 100%; display: block; object-fit: cover; }
.rc-box { background: var(--g-50); border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 14px; }
.rc-box .section-title { margin: 0 0 8px; }
.rc-box.serve { background: #FFF8EC; border-color: #F1E1C0; }
.rc-main .rc-box { margin-top: 14px; }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 8px; font-size: 13.5px; padding: 4px 0; }
.kv span { color: var(--muted); font-weight: 600; }
.kv b { font-weight: 600; color: var(--ink); }
.rc-hold { margin: 0; font-size: 13.5px; }
.rc-tips { margin: 0; padding-left: 18px; font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; }
.rc-empty { display: flex; gap: 20px; align-items: center; }
.rc-empty .rc-thumb { width: 140px; }
.rc-foot-hint { font-size: 13px; }
.size-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.size-tabs .chip { padding: 8px 14px; }

/* =====================================================================
   Kitchen screen
   ===================================================================== */
body.kitchen { background: #EEF1EC; }
.k-start { position: fixed; inset: 0; z-index: 100; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 700px at 15% 10%, #2E6B50 0%, transparent 60%), radial-gradient(900px 600px at 90% 100%, #15382980 0%, transparent 60%), linear-gradient(160deg, var(--g-800), var(--g-900));
  display: flex; align-items: center; justify-content: center; transition: opacity .55s var(--ease), transform .55s var(--ease); }
.k-start.gone { opacity: 0; transform: scale(1.03); pointer-events: none; }
.ks-bg { position: absolute; inset: 0; pointer-events: none; }
.ks-bg span { position: absolute; bottom: -90px; opacity: .13; animation: ks-float linear infinite; }
.ks-bg svg { width: 100%; height: 100%; display: block; }
@keyframes ks-float { from { transform: translateY(0) rotate(0); } to { transform: translateY(-125vh) rotate(260deg); } }
.ks-wrap { position: relative; display: grid; grid-template-columns: 1fr 440px; gap: 48px; align-items: center; width: min(1080px, 100% - 48px); }
.ks-hero { animation: rise .7s var(--ease) both; }
.ks-brand { display: flex; align-items: center; gap: 14px; }
.ks-ring { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px rgba(255,255,255,.25), 0 10px 30px rgba(0,0,0,.25); flex-shrink: 0; display: block; }
.ks-ring img, .ks-ring svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.ks-name { font-size: 26px; font-weight: 800; letter-spacing: .01em; }
.ks-name .slash { color: var(--g-300); font-weight: 600; }
.ks-role { font-size: 11.5px; letter-spacing: .24em; opacity: .7; font-weight: 700; margin-top: 2px; }
.ks-greet { margin-top: 38px; font-size: 22px; opacity: .85; }
.ks-clock { font-size: 96px; font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.ks-date { font-size: 17px; opacity: .7; margin-top: 8px; }
.ks-glass { width: 150px; margin-top: 30px; filter: drop-shadow(0 18px 30px rgba(0,0,0,.25)); }
.ks-glass svg { width: 100%; display: block; }
.ks-fill { animation: ks-fill 3.2s var(--ease) .3s both; }
@keyframes ks-fill { from { transform: translateY(150px); } to { transform: translateY(46px); } }
.ks-wave { animation: ks-wave 2.6s linear infinite; }
@keyframes ks-wave { to { transform: translateX(60px); } }
.ks-bub { fill: rgba(255,255,255,.7); animation: ks-bub 2.4s ease-in infinite; }
.ks-bub.b2 { animation-delay: .8s; } .ks-bub.b3 { animation-delay: 1.5s; }
@keyframes ks-bub { from { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } to { transform: translateY(-80px); opacity: 0; } }
.ks-panel { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 28px; padding: 26px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 30px 80px rgba(0,0,0,.25); animation: rise .7s .15s var(--ease) both; }
.ks-panel h2 { margin: 0 0 16px; font-size: 22px; }
.ks-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ks-stat { background: rgba(255,255,255,.08); border-radius: 16px; padding: 12px; text-align: center; }
.ks-stat b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.ks-stat span { font-size: 11.5px; opacity: .72; }
.ks-checks { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; min-height: 40px; }
.ks-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; animation: rise .4s var(--ease) both; }
.ks-check .ic { margin-top: 2px; padding: 3px; border-radius: 50%; box-sizing: content-box; }
.ks-check.ok .ic { background: rgba(156,197,168,.25); color: var(--g-300); }
.ks-check.todo .ic { background: rgba(255,193,77,.2); color: #FFD27A; }
.ks-check b { font-weight: 600; }
.ks-check small { display: block; opacity: .65; font-size: 12.5px; }
.ks-tip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,.18); font-size: 13.5px; line-height: 1.4; min-height: 62px; opacity: 0; transition: opacity .25s; }
.ks-tip.in { opacity: .9; }
.ks-tip .ic { color: var(--gold); margin-top: 1px; }
.ks-go { width: 100%; margin-top: 16px; padding: 18px; border-radius: 20px; background: #fff; color: var(--g-800); display: flex; flex-direction: column; align-items: center; gap: 3px; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: ks-pulse 2.2s ease-in-out infinite; }
.ks-go span { font-size: 20px; font-weight: 800; }
.ks-go small { font-size: 12px; color: var(--muted); }
.ks-go:active { transform: scale(.98); }
@keyframes ks-pulse { 0%, 100% { box-shadow: 0 10px 30px rgba(0,0,0,.25), 0 0 0 0 rgba(255,255,255,.35); } 50% { box-shadow: 0 10px 30px rgba(0,0,0,.25), 0 0 0 12px rgba(255,255,255,0); } }
.ks-alt { width: 100%; margin-top: 10px; padding: 12px; border-radius: 16px; color: #fff; border: 1px solid rgba(255,255,255,.25); font-weight: 600; }
.ks-alt:hover { background: rgba(255,255,255,.08); }
@media (max-width: 900px) {
  .k-start { align-items: flex-start; overflow-y: auto; }
  .ks-wrap { grid-template-columns: 1fr; gap: 20px; padding: 28px 0 40px; }
  .ks-hero { display: grid; grid-template-columns: 1fr auto; align-items: end; }
  .ks-brand { grid-column: 1 / -1; }
  .ks-greet { margin-top: 22px; grid-column: 1; }
  .ks-clock { font-size: 64px; grid-column: 1; }
  .ks-date { grid-column: 1; }
  .ks-glass { grid-column: 2; grid-row: 2 / span 3; width: 96px; margin: 0; }
}
.k-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px 4px; flex-wrap: wrap; }
.k-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.k-stat { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 13.5px; color: var(--ink-2); box-shadow: var(--sh-1); }
.k-stat b { color: var(--g-800); font-size: 15px; font-variant-numeric: tabular-nums; }
.k-stat .ic { color: var(--g-600); }
.k-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; padding: 14px 20px; align-items: start; min-height: 50vh; }
.k-empty { grid-column: 1 / -1; text-align: center; padding: 70px 20px; color: var(--g-600); }
.k-empty .ic { margin: 0 auto 6px; }
.k-empty h3 { margin: 6px 0 2px; color: var(--g-800); }
.ticket { background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-1); border: 2px solid transparent; border-top: 8px solid var(--g-500); display: flex; flex-direction: column; overflow: hidden; }
.ticket.fresh { animation: rise .35s var(--ease); box-shadow: 0 0 0 4px rgba(200, 151, 90, .35), var(--sh-2); }
.ticket.slow { border-top-color: #E0A43A; }
.ticket.late { border-top-color: var(--danger); border-color: rgba(185, 83, 74, .35); }
.t-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 10px; border-bottom: 1px dashed var(--line); }
.t-token { font-size: 30px; font-weight: 800; color: var(--g-800); line-height: 1; letter-spacing: -.02em; }
.t-token small { display: block; font-size: 10.5px; letter-spacing: .12em; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.t-time { text-align: right; }
.t-time b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; color: var(--g-700); }
.ticket.slow .t-time b { color: #B87A12; }
.ticket.late .t-time b { color: var(--danger); }
.t-time small { color: var(--muted); font-size: 12px; }
.t-items { display: flex; flex-direction: column; }
.t-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; transition: background .12s; }
.t-item:hover, .t-item:active { background: var(--g-50); }
.t-item .mini-thumb { width: 48px; height: 48px; }
.t-name { flex: 1; min-width: 0; }
.t-name b { font-size: 16px; }
.t-qty { color: var(--gold); font-size: 18px; }
.t-meta { display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.t-size { font-weight: 800; color: var(--g-700); font-size: 13.5px; background: var(--g-50); padding: 1px 8px; border-radius: 6px; }
.t-recipe { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 12px; font-weight: 600; }
.t-addons { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.t-addons .badge { font-size: 12px; background: #FFF1D6; color: #7A4B00; }
.t-check { width: 46px; height: 46px; border-radius: 14px; border: 2px solid var(--g-200); color: var(--g-300); background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.t-item.done { opacity: .5; }
.t-item.done .t-name b { text-decoration: line-through; }
.t-item.done .t-check { background: var(--g-700); border-color: var(--g-700); color: #fff; }
.t-note { margin: 10px 14px 0; padding: 8px 12px; background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; font-size: 13.5px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.t-bump.btn.block { margin: 12px 14px 14px; width: calc(100% - 28px); }
.k-done { padding: 4px 20px 30px; }
.k-done-list { display: flex; gap: 10px; flex-wrap: wrap; }
.k-done-chip { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px 6px 6px 12px; font-size: 13.5px; max-width: min(420px, 100%); }
.k-done-chip span { flex: 1; min-width: 0; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-done-chip small { color: var(--g-600); font-weight: 700; font-variant-numeric: tabular-nums; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.book-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; text-align: left; font-weight: 600; color: var(--ink); }
.book-item:hover { background: var(--g-50); }
.book-item span:not(.badge) { flex: 1; }
.fruit-table td { vertical-align: middle; }

/* =====================================================================
   Recipe Lab
   ===================================================================== */
.lab-head { display: flex; gap: 18px; align-items: center; margin: 14px 0 18px; }
.lab-thumb { width: 92px; height: 92px; border-radius: 20px; overflow: hidden; box-shadow: var(--sh-1); flex-shrink: 0; }
.lab-thumb .thumb-svg, .lab-thumb .thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lab-head h2 { margin: 0; color: var(--g-800); font-size: 24px; }
.lab-prices { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.lab-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.ver-card { position: sticky; top: 12px; }
.ver { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: var(--r); border: 1.5px solid var(--line); background: #fff; margin-bottom: 8px; }
.ver.on { border-color: var(--g-700); background: var(--g-50); }
.ver-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ver-note { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.ver-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.lab-actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.taste-row { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.taste-row:last-child { border-bottom: none; }
.taste-top { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.stars { color: var(--gold); letter-spacing: 1px; }
.stars .dim { color: var(--line); }
.taste-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.taste-comment { margin-top: 6px; font-size: 13.5px; color: var(--ink-2); font-style: italic; }
.suggest-mini { display: flex; gap: 8px; align-items: center; margin-top: 8px; padding: 8px 10px; background: var(--g-50); border-radius: 10px; font-size: 13.5px; }
.suggest-mini > div { flex: 1; }
.suggest-change { display: flex; gap: 10px; align-items: center; padding: 12px 14px; background: var(--g-50); border-radius: var(--r); color: var(--g-800); margin-bottom: 14px; }
.diff s { color: var(--danger); opacity: .8; }
.diff tr.added td:first-child b { color: var(--g-600); }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale button { padding: 10px 4px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600; color: var(--ink-2); line-height: 1.2; }
.scale button.on { background: var(--g-700); border-color: var(--g-700); color: #fff; }
.scale button[data-v="0"].on { background: var(--g-500); border-color: var(--g-500); }
.star-pick { display: flex; gap: 6px; }
.star-pick button { font-size: 34px; color: var(--line); line-height: 1; padding: 0 2px; }
.star-pick button.on { color: var(--gold); }
.thinking { text-align: center; padding: 20px 10px; }
.thinking p { color: var(--ink-2); margin: 14px 0 0; }
.thinking-dots { display: flex; justify-content: center; gap: 8px; }
.thinking-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--g-500); animation: breathe 1s infinite; }
.thinking-dots i:nth-child(2) { animation-delay: .15s; }
.thinking-dots i:nth-child(3) { animation-delay: .3s; }
.key-status { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--r); background: var(--warn-bg); color: var(--warn-ink); font-weight: 600; font-size: 14px; }
.key-status.ok { background: var(--g-50); color: var(--g-700); }
.editor .ed-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.editor .ed-row { padding: 8px; border-radius: var(--r); background: var(--g-50); border: 1px solid var(--line-2); }
.editor .ed-line { display: flex; gap: 6px; align-items: center; }
.editor .ed-line .grow { flex: 1; min-width: 120px; }
.editor .ed-line select { width: 86px; }
.editor .qty-in { width: 76px; padding: 10px 8px; }
.editor .ed-sub { margin-top: 6px; font-size: 13px; }
.editor .ed-hint { font-size: 12px; display: inline-block; margin: 0 0 8px 6px; }
.editor [data-up] svg { transform: rotate(90deg); }

@media (max-width: 1100px) {
  .rc { grid-template-columns: 1fr; }
  .rc-side { display: grid; grid-template-columns: 180px 1fr; }
  .rc-side .rc-thumb { grid-row: span 3; }
  .lab-grid { grid-template-columns: 1fr; }
  .ver-card { position: static; }
}
@media (max-width: 640px) {
  .rc-foot-hint { display: none; }
  .rc-side { grid-template-columns: 1fr; }
  .rc-side .rc-thumb { width: 160px; }
  .k-board { grid-template-columns: 1fr; padding: 12px; }
}

/* =====================================================================
   SEEKU chat assistant
   ===================================================================== */
#seeku-fab { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: 999px; background: var(--g-700); color: #fff; font-weight: 700; font-size: 15px; box-shadow: var(--sh-2); }
#seeku-fab:hover { background: var(--g-600); }
.seeku-av { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: block; box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.seeku-av.big { width: 64px; height: 64px; margin: 0 auto 10px; box-shadow: var(--sh-1); }
#seeku { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 420px; max-width: calc(100vw - 24px); height: min(680px, calc(100vh - 40px)); background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); border: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; animation: modal-in .22s var(--ease) both; }
.seeku-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; background: linear-gradient(135deg, var(--g-800), var(--g-700)); color: #fff; }
.seeku-head > div { flex: 1; min-width: 0; }
.seeku-head b { display: block; font-size: 17px; letter-spacing: .04em; }
.seeku-head small { color: rgba(255,255,255,.72); font-size: 12px; }
.seeku-head .icon-btn { color: #fff; }
.seeku-head .icon-btn:hover { background: rgba(255,255,255,.12); }
.seeku-ctx { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; background: #FFF8EC; border-bottom: 1px solid #F1E1C0; font-size: 13px; color: var(--warn-ink); }
.seeku-ctx span { flex: 1; }
.seeku-ctx .icon-btn { width: 30px; height: 30px; }
.seeku-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--g-50); user-select: text; }
.seeku-msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; word-wrap: break-word; }
.seeku-msg.me { align-self: flex-end; background: var(--g-700); color: #fff; border-bottom-right-radius: 5px; }
.seeku-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.seeku-msg p { margin: 0 0 6px; }
.seeku-msg p:last-child { margin-bottom: 0; }
.seeku-msg ul, .seeku-msg ol { margin: 2px 0 6px; padding-left: 20px; }
.seeku-msg li { margin: 2px 0; }
.seeku-msg b { color: var(--g-800); }
.seeku-typing { display: inline-flex; gap: 5px; padding: 4px 0; }
.seeku-typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--g-300); animation: breathe 1s infinite; }
.seeku-typing i:nth-child(2) { animation-delay: .15s; }
.seeku-typing i:nth-child(3) { animation-delay: .3s; }
.seeku-hello { text-align: center; margin: auto 0; padding: 10px 6px; color: var(--ink-2); font-size: 14.5px; }
.seeku-sugg { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.seeku-sugg button { text-align: left; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 13.5px; color: var(--g-800); font-weight: 600; }
.seeku-sugg button:hover { border-color: var(--g-300); }
.seeku-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line-2); background: #fff; align-items: flex-end; }
.seeku-form textarea { resize: none; min-height: 46px; max-height: 120px; padding: 12px 14px; }
.seeku-form .btn { width: 46px; height: 46px; padding: 0; flex-shrink: 0; }
@media (max-width: 640px) {
  #seeku { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100dvh; border-radius: 0; }
  #seeku-fab { right: 14px; bottom: 14px; }
}

/* recipe search (kitchen book + Lab) */
.book-search { margin-bottom: 6px; }
.book-desc { display: block; font-size: 12px; font-weight: 500; }
.lab-search { width: 260px; }
@media (max-width: 760px) { .lab-search { width: 100%; } .card-head:has(.lab-search) { flex-wrap: wrap; } }
.seeku-follow { display: flex; gap: 6px; padding: 8px 10px 0; background: var(--g-50); overflow-x: auto; scrollbar-width: none; }
.seeku-follow::-webkit-scrollbar { display: none; }
.seeku-follow button { flex-shrink: 0; padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--g-200); color: var(--g-700); font-size: 13px; font-weight: 600; white-space: nowrap; }
.seeku-follow button:hover { background: var(--g-100); }
@media (max-width: 600px) {
  .ks-clock { font-size: 52px; white-space: nowrap; }
  .ks-greet { font-size: 18px; }
  .ks-panel { padding: 20px; }
  .ks-stat { padding: 10px 6px; }
  .ks-stat b { font-size: 20px; white-space: nowrap; }
  .ks-stat span { font-size: 11px; line-height: 1.25; display: block; }
}

/* =====================================================================
   Web orders (billing screen)
   ===================================================================== */
.web-btn { position: relative; }
.web-btn .web-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.web-btn .web-mode { font-size: 10.5px; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.16); font-weight: 700; letter-spacing: .02em; }
.web-btn.has-new { background: rgba(200, 151, 90, .35); border-color: var(--gold); animation: web-glow 1.6s ease-in-out infinite; }
@keyframes web-glow { 50% { box-shadow: 0 0 0 6px rgba(200, 151, 90, .25); } }
.ws-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--muted); }
.ws-dot.ok { background: var(--g-500); } .ws-dot.bad { background: var(--danger); } .ws-dot.off { background: #C9C9C9; }
.web-modes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; font-size: 13.5px; }
.web-modes .chip { padding: 8px 14px; }
.web-card { border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.web-card.st-received { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 151, 90, .15); }
.web-card.st-rejected { opacity: .55; }
.web-card header { display: flex; gap: 12px; align-items: center; }
.web-code { font-size: 22px; font-weight: 800; color: var(--g-800); background: var(--g-50); border-radius: 12px; padding: 6px 10px; letter-spacing: .02em; }
.web-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.web-who span { color: var(--muted); font-size: 12.5px; }
.web-status { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--g-50); color: var(--g-700); }
.st-received .web-status { background: var(--gold); color: #fff; }
.web-lines { list-style: none; margin: 10px 0 0; padding: 0; }
.web-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line-2); font-size: 14px; }
.web-lines small { color: var(--muted); }
.web-opts { display: block; }
.web-note { margin-top: 8px; padding: 7px 10px; background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; font-size: 13px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.web-card footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.web-pay { display: flex; gap: 10px; align-items: center; }
.web-pay b { font-size: 17px; color: var(--g-800); }
.web-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge.web-claim { background: #FFF1D6; color: #7A4B00; }
.web-banner { display: flex; align-items: center; gap: 8px; margin: 0 14px 6px; padding: 6px 6px 6px 12px; border-radius: 12px; background: #FFF1D6; color: #7A4B00; font-size: 13px; }
.web-banner span { flex: 1; }
.web-banner .icon-btn { width: 30px; height: 30px; color: inherit; }
.online-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.online-mode { text-align: left; padding: 14px; border-radius: var(--r); border: 1.5px solid var(--line); background: #fff; display: flex; flex-direction: column; gap: 4px; }
.online-mode b { font-size: 16px; color: var(--g-800); }
.online-mode span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.online-mode.on { border-color: var(--g-700); background: var(--g-50); box-shadow: 0 0 0 3px rgba(31, 77, 58, .1); }
.online-status { display: flex; align-items: center; gap: 4px; margin-top: 14px; padding: 10px 12px; border-radius: var(--r); background: var(--g-50); font-size: 13.5px; }
@media (max-width: 760px) { .online-modes { grid-template-columns: 1fr; } }

/* =====================================================================
   Coachmarks (first-run tips)
   ===================================================================== */
.cm-layer { position: fixed; inset: 0; z-index: 300; animation: fade .2s ease both; }
.cm-layer.closing { opacity: 0; transition: opacity .18s; }
.cm-spot { position: fixed; box-shadow: 0 0 0 9999px rgba(10, 30, 21, .62), 0 0 0 3px var(--gold); transition: all .3s var(--ease); pointer-events: none; }
.cm-tip { position: fixed; background: #fff; border-radius: 18px; padding: 16px 16px 12px; box-shadow: var(--sh-3); transition: top .3s var(--ease), left .3s var(--ease); animation: rise .3s var(--ease) both; }
.cm-tip::before { content: ""; position: absolute; top: -8px; left: calc(var(--arrow-x, 50%) - 8px); width: 16px; height: 16px; background: #fff; transform: rotate(45deg); border-radius: 3px; }
.cm-tip.above::before { top: auto; bottom: -8px; }
.cm-step { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.cm-tip h4 { margin: 4px 0 4px; font-size: 17px; color: var(--g-800); }
.cm-tip p { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.cm-foot { display: flex; align-items: center; gap: 6px; }
.cm-skip { font-size: 13px; color: var(--muted); font-weight: 600; padding: 6px 2px; }
.tips-btn { font-weight: 700; }
.qr-btn { padding: 10px 12px; }
.qr-btn .upi-mark { display: inline-block !important; font-size: 12px; font-weight: 800; letter-spacing: .04em; font-style: italic; }

/* incoming web-order alert (billing screen) */
.web-alert { position: fixed; top: 84px; right: 18px; z-index: 60; width: min(400px, calc(100vw - 24px)); background: #fff; border-radius: 22px; box-shadow: 0 24px 60px rgba(15,39,29,.32), 0 0 0 3px var(--gold); padding: 14px 16px 10px; animation: wa-in .35s var(--ease) both; }
.web-alert.closing { opacity: 0; transform: translateY(-10px); transition: all .2s; }
@keyframes wa-in { from { opacity: 0; transform: translateY(-16px) scale(.97); } }
.web-alert header { display: flex; align-items: center; gap: 10px; }
.web-alert header > div { flex: 1; min-width: 0; }
.web-alert header b { display: block; font-size: 16px; color: var(--g-800); }
.web-alert header small { color: var(--muted); font-size: 12.5px; }
.wa-bell { width: 38px; height: 38px; border-radius: 12px; background: var(--gold); color: #fff; display: flex; align-items: center; justify-content: center; animation: wa-swing 1.2s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes wa-swing { 0%, 60%, 100% { transform: rotate(0); } 10% { transform: rotate(14deg); } 20% { transform: rotate(-12deg); } 30% { transform: rotate(8deg); } 40% { transform: rotate(-5deg); } }
.wa-who { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.wa-who > div { flex: 1; display: flex; flex-direction: column; }
.wa-who > div span { color: var(--muted); font-size: 12.5px; }
.wa-total { font-size: 20px; color: var(--g-800); }
.web-alert .web-lines { margin-top: 8px; }
.wa-unlock { width: 100%; margin-top: 10px; padding: 9px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); font-weight: 700; font-size: 13px; }
.wa-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.wa-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; }
.wa-foot button { font-size: 12.5px; color: var(--g-700); font-weight: 600; padding: 6px 2px; }
.web-modes .web-sound { background: #fff; color: var(--ink-2); border-color: var(--line); }
.web-modes .web-sound.on { background: var(--g-50); color: var(--g-700); border-color: var(--g-500); }
@media (max-width: 640px) { .web-alert { top: auto; bottom: 12px; right: 12px; } }
.web-card.st-ready { border-color: var(--g-500); }
.st-ready .web-status { background: var(--g-700); color: #fff; }
.st-collected .web-status { background: #eee; color: #777; }
.wa-link-status { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 12px; border-radius: 12px; background: var(--g-50); color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.wa-link-status.ok { background: var(--g-50); color: var(--g-700); }
.wa-link-status.warn { background: var(--warn-bg); color: var(--warn-ink); }

/* Kitchen button on the billing screen: chef's hat, live count, "cooking" animation for new orders */
#nav-kitchen { position: relative; }
.kit-ic { position: relative; display: inline-flex; }
.kit-ic .steam { position: absolute; bottom: 70%; width: 3px; height: 8px; border-radius: 3px; background: rgba(255,255,255,.85); opacity: 0; pointer-events: none; }
.kit-ic .s1 { left: 3px; } .kit-ic .s2 { left: 8px; } .kit-ic .s3 { left: 13px; }
.kit-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--g-800); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
#nav-kitchen.cooking { background: rgba(200, 151, 90, .38); border-color: var(--gold); animation: kit-glow 1.3s ease-in-out 2; }
#nav-kitchen.cooking .kit-ic > svg { animation: kit-hop .65s var(--ease) 4; transform-origin: 50% 100%; }
#nav-kitchen.cooking .steam { animation: kit-steam 1.3s ease-out 2; }
#nav-kitchen.cooking .s2 { animation-delay: .25s; } #nav-kitchen.cooking .s3 { animation-delay: .5s; }
#nav-kitchen.cooking .kit-badge { animation: bump .4s var(--ease) 2; background: var(--gold); color: #fff; }
@keyframes kit-hop { 0%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-4px) rotate(-8deg); } 60% { transform: translateY(0) rotate(6deg); } }
@keyframes kit-steam { 0% { opacity: 0; transform: translateY(0) scaleY(.6); } 30% { opacity: .9; } 100% { opacity: 0; transform: translateY(-12px) scaleY(1.2); } }
@keyframes kit-glow { 50% { box-shadow: 0 0 0 6px rgba(200, 151, 90, .25); } }
@media (prefers-reduced-motion: reduce) { #nav-kitchen.cooking .kit-ic > svg, #nav-kitchen.cooking .steam { animation: none; } }
.pill-btn .kit-ic { display: inline-flex !important; }
.appbar .pill-btn { white-space: nowrap; }
@media (max-width: 1300px) {
  .appbar .clock { display: none; }
  #btn-orders span, #nav-reports span, #nav-admin span { display: none; }
  #btn-orders, #nav-reports, #nav-admin { padding: 10px 12px; }
}

/* ---------------- order stages (walk-in + web) ---------------- */
.stage { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.stage.in_kitchen { background: var(--warn-bg); color: var(--warn-ink); }
.stage.ready { background: var(--g-700); color: #fff; box-shadow: 0 0 0 0 rgba(31, 77, 58, .45); animation: ready-pulse 1.8s ease-out infinite; }
.stage.collected { background: var(--line-2); color: var(--ink-2); }
.stage.void { background: var(--danger-bg); color: var(--danger); }
@keyframes ready-pulse { 0% { box-shadow: 0 0 0 0 rgba(31, 77, 58, .45); } 70% { box-shadow: 0 0 0 7px rgba(31, 77, 58, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 77, 58, 0); } }
tr.row-ready td { background: #F1F8F3; }
.order-day { display: flex; align-items: center; gap: 8px; padding: 12px 24px 0; }
.order-day input[type=date] { width: auto; padding: 7px 10px; }
.order-day .btn[disabled] { opacity: .4; pointer-events: none; }
.order-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 24px 4px; }
.order-filters .chip { padding: 8px 14px; font-size: 13px; }
.order-filters .chip small { background: var(--line-2); color: var(--ink-2); border-radius: 999px; padding: 0 7px; margin-left: 2px; }
.order-filters .chip.on small { background: rgba(255,255,255,.2); color: #fff; }
.order-filters .chip.has-ready:not(.on) { border-color: var(--g-500); color: var(--g-700); }
.web-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--g-600); margin-top: 2px; }
.ready-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--g-800); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; margin-left: 2px; animation: pop .25s var(--ease); }
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.tl-step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--line-2); color: var(--muted); }
.tl-step.on { background: var(--g-50); color: var(--g-800); border: 1px solid var(--g-100); }
.tl-dot { width: 26px; height: 26px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid var(--line); }
.tl-step.on .tl-dot { background: var(--g-700); color: #fff; border-color: var(--g-700); }
.tl-step b { display: block; font-size: 13px; }
.tl-step span { font-size: 12px; }
.made-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--line); margin-right: 8px; vertical-align: 1px; }
.made-dot.on { background: var(--g-500); }
.tl-action { margin: -4px 0 16px; }
.tl-undo { display: flex; justify-content: flex-end; }

/* ---------------- errors & validation ---------------- */
input.invalid, select.invalid, textarea.invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(185, 83, 74, .12) !important; }
.field-msg { color: var(--danger); font-size: 12.5px; font-weight: 600; margin: 5px 2px 0; animation: fade .15s ease; }
#conn-banner {
  position: fixed; left: 50%; top: 14px; transform: translate(-50%, -140%); z-index: 300;
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 14px;
  background: #3A1F1C; color: #fff; font-weight: 600; font-size: 14px; box-shadow: var(--sh-3);
  transition: transform .3s var(--ease);
}
#conn-banner.show { transform: translate(-50%, 0); }
#conn-banner .dot { width: 9px; height: 9px; border-radius: 50%; background: #FF7A6E; animation: ready-pulse 1.4s infinite; }
#conn-banner button { background: rgba(255,255,255,.15); color: #fff; border-radius: 10px; padding: 6px 12px; font-weight: 700; font-size: 13px; }
.inline + .field-msg { margin: -2px 2px 8px; }

/* ---------------- brand logo (files: pos/static/brand/logo*.png) ---------------- */
.brand-logo { display: block; height: 40px; width: auto; }
.appbar .brand { gap: 14px; }
.brand-page { border-left: 1px solid rgba(255, 255, 255, .25); padding-left: 14px; }
.brand-page .brand-sub { font-size: 15px; font-weight: 600; opacity: .9; }
#splash-art { animation: rise .8s var(--ease) both; }
#splash .splash-logo { height: auto; width: min(560px, 78vw); filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .25)); }
.ks-logo .brand-logo { height: 58px; }
.ks-brand { gap: 18px; }
.ks-brand .ks-role { border-left: 1px solid rgba(255, 255, 255, .25); padding-left: 18px; }
.login-logo { height: 64px; margin: 0 auto 16px; }
@media (max-width: 1100px) { .brand-logo { height: 34px; } }

/* pay later / items added to a bill */
.web-banner.add-banner { background: var(--g-50); color: var(--g-800); border: 1px solid var(--g-300, #b9d3c4); }
.badge.due { background: #FBE4E1; color: #A3261B; }
.badge.added { background: #E4F0FF; color: #1F4F8A; margin-left: 6px; vertical-align: 1px; }
.due-text { color: #A3261B; font-weight: 700; }
tr.due-row td { color: #A3261B; }
.bill-actions { display: flex; gap: 8px; margin-top: 12px; }
.bill-actions .btn { flex: 1; justify-content: center; }
.chip.has-due small { background: #A3261B; color: #fff; }
.t-unpaid { margin: 0 12px 8px; padding: 5px 10px; border-radius: 10px; background: #FBE4E1; color: #A3261B; font-size: 13px; font-weight: 700; display: flex; gap: 6px; align-items: center; }
.t-added { background: #E4F0FF; color: #1F4F8A; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; letter-spacing: .03em; }

/* payment screen: customer directory + offers consent */
.mk-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px;
  padding: 9px 12px; border-radius: 12px; background: var(--g-50); }
.mk-who { font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.mk-check { margin: 0; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--g-700); }
.mk-on { font-size: 13px; font-weight: 700; color: #178F47; display: inline-flex; align-items: center; gap: 5px; }
/* admin: customers */
.seg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.seg-chips .chip.on { background: var(--g-700); color: #fff; border-color: var(--g-700); }
.seg-chips .chip.on small { color: rgba(255,255,255,.8); }
.sub-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.sub-pill.yes { background: #E3F6EA; color: #178F47; }
.sub-pill.no { background: var(--line-2); color: var(--muted); }
.camp-preview { white-space: pre-wrap; background: #E7F8DC; border-radius: 12px 12px 12px 2px; padding: 12px 14px; font-size: 14px; line-height: 1.45; color: #1d2b14; }
.send-list { max-height: 52vh; overflow: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; }
.send-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.send-row:last-child { border-bottom: 0; }
.send-row .who { flex: 1; min-width: 0; }
.send-row .who small { display: block; color: var(--muted); }
.send-row.done { opacity: .6; }
.send-progress { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.send-progress i { display: block; height: 100%; background: #1FA855; }
#c-csv, #c-new { white-space: nowrap; }
