:root {
  --green: #00924B;
  --green-dark: #00753C;
  --green-deep: #0B3D27;
  --red: #B7200D;
  --red-dark: #8F190A;
  --mint: #E0F2E8;
  --mint-2: #F2F9F5;
  --ink: #15201C;
  --muted: #5E6E68;
  --line: #DCE9E3;
  --white: #fff;
  --ember: #F28C28;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(14, 74, 58, .12);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--mint-2); line-height: 1.4; overflow-x: hidden; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header ---------- */
.top { background: var(--green-deep); color: #fff; position: relative; overflow: hidden; }
.top::after { content: ""; position: absolute; inset: auto -10% -60px -10%; height: 120px; background: radial-gradient(60% 100% at 50% 100%, rgba(242,140,40,.35), transparent 70%); pointer-events: none; }
.top-inner { max-width: 760px; margin: 0 auto; padding: 14px 16px 22px; position: relative; z-index: 1; }
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-row .logo { width: 84px; height: 84px; flex: none; filter: drop-shadow(0 2px 6px rgba(0,0,0,.3)); }
.brand-name { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 26px; line-height: 1; }
.brand-sub { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .8; margin-top: 4px; }
.langs { margin-left: auto; display: flex; gap: 4px; background: rgba(255,255,255,.1); border-radius: 999px; padding: 3px; }
.langs button { border: 0; background: transparent; color: #fff; font-weight: 800; font-size: 12px; padding: 6px 9px; border-radius: 999px; min-width: 34px; }
.langs button[aria-pressed="true"] { background: #fff; color: var(--green-deep); }
.hero-title { font-family: var(--display); font-size: 28px; line-height: 1.15; margin: 18px 0 6px; }
.hero-title em { color: var(--ember); font-style: italic; }
.hero-text { margin: 0; opacity: .85; font-size: 14px; }

.mode-bar { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 7px 12px; font-weight: 800; font-size: 13px; }
.pill-red { background: var(--red); color: #fff; }
.pill-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.btn-ghost { border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #fff; border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: 13px; }
.btn-ghost:active { background: rgba(255,255,255,.2); }

/* ---------- Sticky nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(242,249,245,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: 760px; margin: 0 auto; padding: 10px 16px 8px; }
.search { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px 10px 38px; font-size: 15px; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%235E6E68' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center; }
.search:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,146,75,.15); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--green-deep); border-radius: 999px; padding: 6px 12px 6px 9px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.chip.active { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------- Menu ---------- */
main { max-width: 760px; margin: 0 auto; padding: 8px 16px 120px; }
.notice { display: flex; gap: 10px; align-items: flex-start; background: #FFF4E5; border: 1px solid #F6D9AE; color: #6B4310; border-radius: 12px; padding: 10px 12px; font-size: 13px; margin: 12px 0 0; }
.cat { scroll-margin-top: 120px; padding-top: 18px; }
.cat-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 10px; }
.cat-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--red); flex: none; }
.cat-title { font-family: var(--display); font-size: 22px; margin: 0; color: var(--green-deep); }
.cat-alc { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--red); background: #FCE8EB; border-radius: 999px; padding: 4px 8px; text-align: right; }
.items { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-top: 1px solid var(--line); min-height: 64px; }
.item:first-child { border-top: 0; }
.item-main { flex: 1; min-width: 0; }
.item-name { font-weight: 800; font-size: 15px; }
.item-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; line-height: 1.35; }
.item { align-items: flex-start; }
.item .item-price, .item .add, .item .stepper, .item .no-del { margin-top: 2px; }
.langs button { min-width: 30px; padding: 6px 7px; }
.item-price { font-weight: 900; color: var(--green-deep); white-space: nowrap; font-size: 15px; }
.item-price.ask { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.add { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--green); color: #fff; display: grid; place-items: center; flex: none; transition: transform .1s; }
.add:active { transform: scale(.92); }
.no-del { font-size: 10.5px; font-weight: 800; color: var(--red); max-width: 76px; text-align: right; line-height: 1.15; flex: none; }
.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--mint); border-radius: 999px; padding: 2px; flex: none; }
.stepper button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: #fff; color: var(--green-deep); font-weight: 900; font-size: 18px; line-height: 1; }
.stepper span { min-width: 22px; text-align: center; font-weight: 900; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

.foot { max-width: 760px; margin: 0 auto; padding: 0 16px 130px; color: var(--muted); font-size: 13px; }
.foot-card { background: var(--green-deep); color: #fff; border-radius: var(--radius); padding: 18px; display: grid; gap: 8px; }
.foot-card a { color: #fff; }
.foot-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.foot-actions a { background: rgba(255,255,255,.12); padding: 8px 12px; border-radius: 999px; text-decoration: none; font-weight: 700; }
.foot small { display: block; margin-top: 10px; }

/* ---------- Cart bar ---------- */
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); pointer-events: none; }
.cartbar button { pointer-events: auto; max-width: 728px; margin: 0 auto; width: 100%; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 16px; background: var(--red); color: #fff; padding: 14px 16px; font-weight: 900; font-size: 16px; box-shadow: 0 10px 30px rgba(143,25,10,.35); }
.cartbar .badge { background: #fff; color: var(--red); border-radius: 999px; min-width: 28px; height: 28px; display: grid; place-items: center; font-size: 14px; }
.cartbar .sum { margin-left: auto; }
.cartbar[hidden], .cartbar button[hidden] { display: none; }
.cartbar { display: flex; flex-direction: column; gap: 8px; }
.cartbar .statusbtn { justify-content: center; font-size: 14px; padding: 11px 16px; background: #fff; color: var(--green-deep); border: 2px solid var(--green); box-shadow: var(--shadow); }
.cartbar .statusbtn.approved { background: var(--green); color: #fff; }
.cartbar .statusbtn.rejected { border-color: var(--red); color: var(--red); }

/* ---------- Sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; display: none; }
.sheet.open { display: block; }
.sheet-bg { position: absolute; inset: 0; background: rgba(10,30,24,.5); }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; background: var(--mint-2); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; max-width: 760px; margin: 0 auto; animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: .6; } }
.sheet-head { display: flex; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-family: var(--display); color: var(--green-deep); font-size: 22px; }
.x { margin-left: auto; border: 0; background: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 20px; color: var(--muted); }
.sheet-body { overflow-y: auto; padding: 12px 16px; flex: 1; }
.sheet-foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.cline { background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.cline-top { display: flex; align-items: center; gap: 10px; }
.cline-top .item-name { flex: 1; }
.cline input { margin-top: 8px; width: 100%; border: 1px dashed var(--line); background: var(--mint-2); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.field { display: block; margin: 10px 0; }
.field span { display: block; font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.field input, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fff; font-size: 15px; }
.field textarea { min-height: 64px; resize: vertical; }
.pay { display: flex; gap: 8px; }
.pay label { flex: 1; display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px; font-size: 14px; font-weight: 700; }
.total-row { display: flex; font-weight: 900; font-size: 18px; margin-bottom: 4px; }
.total-row span:last-child { margin-left: auto; color: var(--green-deep); }
.hint { color: var(--muted); font-size: 12px; margin: 0 0 10px; }
.primary { width: 100%; border: 0; border-radius: 14px; padding: 15px; font-weight: 900; font-size: 16px; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; }
.primary.wa { background: #1FA855; }
.primary:disabled { opacity: .45; cursor: not-allowed; }
.err { color: var(--red); font-size: 13px; font-weight: 700; margin: 0 0 8px; }

/* ---------- Status ---------- */
.status { text-align: center; padding: 28px 12px; }
.status .ring { width: 86px; height: 86px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: var(--green); }
.status .ring.spin { border: 5px solid var(--mint); border-top-color: var(--green); animation: spin 1s linear infinite; background: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.status h3 { font-family: var(--display); color: var(--green-deep); font-size: 22px; margin: 0 0 6px; }
.status p { color: var(--muted); margin: 0 0 18px; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; z-index: 60; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; }

/* ---------- Kasa (cashier screen) ---------- */
.kasa body, body.kasa { background: #EEF3F1; }
.k-top { background: var(--green-deep); color: #fff; }
.k-top-inner { display: flex; align-items: center; gap: 14px; padding: 12px 20px; }
.k-top .logo { width: 44px; height: 44px; }
.k-title { font-family: var(--display); font-size: 22px; }
.k-sub { font-size: 12px; opacity: .75; }
.k-badge { margin-left: auto; background: var(--red); border-radius: 999px; padding: 6px 12px; font-weight: 900; }
.k-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; opacity: .9; }
.k-live i { width: 8px; height: 8px; border-radius: 50%; background: #3BE08C; box-shadow: 0 0 0 0 rgba(59,224,140,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(59,224,140,0); } 100% { box-shadow: 0 0 0 0 rgba(59,224,140,0); } }
.k-calls { display: flex; gap: 10px; flex-wrap: wrap; padding: 12px 20px 0; }
.k-call { display: flex; align-items: center; gap: 10px; background: #FFF4E5; border: 2px solid var(--ember); border-radius: 12px; padding: 10px 12px; font-weight: 800; animation: flash 1s 3; }
@keyframes flash { 50% { background: #FFD9A8; } }
.k-call button { border: 0; background: var(--green); color: #fff; border-radius: 8px; padding: 6px 10px; font-weight: 800; }
.k-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 16px 20px 40px; }
@media (max-width: 800px) { .k-cols { grid-template-columns: 1fr; } }
.k-col h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; }
.k-card { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; border-left: 6px solid var(--red); }
.k-card.done { border-left-color: var(--green); opacity: .85; }
.k-card.rej { border-left-color: #999; opacity: .6; }
.k-card-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.k-table { font-size: 22px; font-weight: 900; color: var(--green-deep); }
.k-time { color: var(--muted); font-size: 13px; }
.k-state { margin-left: auto; font-size: 12px; font-weight: 800; }
.k-line { padding: 4px 0; border-top: 1px dashed var(--line); font-size: 15px; }
.k-line:first-of-type { border-top: 0; }
.k-line small { display: block; color: var(--red); font-weight: 700; }
.k-note { background: var(--mint); border-radius: 8px; padding: 6px 8px; margin-top: 6px; font-size: 13px; }
.k-actions { display: flex; gap: 8px; margin-top: 10px; }
.k-actions button { flex: 1; border: 0; border-radius: 10px; padding: 11px; font-weight: 900; }
.k-ok { background: var(--green); color: #fff; }
.k-no { background: #EEE; color: var(--ink); }
.k-print { background: var(--mint); color: var(--green-deep); }
.k-empty { color: var(--muted); background: #fff; border-radius: 14px; padding: 24px; text-align: center; border: 2px dashed var(--line); }
.k-start { position: fixed; inset: 0; background: rgba(11,61,39,.92); z-index: 80; display: grid; place-items: center; color: #fff; text-align: center; padding: 20px; }
.k-start button { margin-top: 16px; border: 0; background: #fff; color: var(--green-deep); border-radius: 14px; padding: 14px 28px; font-weight: 900; font-size: 18px; }
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.55); display: none; place-items: center; padding: 20px; }
.modal.open { display: grid; }
.modal-box { background: #fff; border-radius: 16px; padding: 18px; max-height: 90vh; overflow: auto; }
.modal-actions { display: flex; gap: 8px; margin-top: 14px; }
.modal-actions button { flex: 1; border: 0; border-radius: 10px; padding: 11px; font-weight: 900; }

.k-tables { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 20px 0; }
.k-tables-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
#tables { display: flex; gap: 10px; flex-wrap: wrap; }
.k-tablebill { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 8px 10px; box-shadow: var(--shadow); }
.k-tablebill span { font-weight: 900; color: var(--green-deep); }
.k-tablebill small { color: var(--red); font-weight: 700; }
.k-tablebill button { border: 0; background: var(--mint); color: var(--green-deep); border-radius: 8px; padding: 6px 10px; font-weight: 800; }
.bill .item-name { font-weight: 700; }

/* Kitchen receipt (80mm) */
.receipt { width: 300px; font-family: 'Courier New', ui-monospace, monospace; color: #000; background: #fff; padding: 10px 6px; font-size: 14px; }
.receipt hr { border: 0; border-top: 1px dashed #000; margin: 8px 0; }
.r-head { text-align: center; font-weight: 700; font-size: 16px; }
.r-table { text-align: center; font-size: 28px; font-weight: 900; margin: 6px 0 2px; }
.r-meta { text-align: center; font-size: 12px; }
.r-line { font-size: 16px; font-weight: 700; margin: 4px 0; }
.r-note { font-size: 13px; margin-left: 12px; }
.r-foot { text-align: center; font-size: 12px; }

@media print {
  body * { visibility: hidden; }
  .modal.open .receipt, .modal.open .receipt * { visibility: visible; }
  .modal.open .receipt { position: absolute; left: 0; top: 0; width: 72mm; }
  @page { size: 80mm auto; margin: 2mm; }
}

/* live system additions */
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; margin: 12px 0 4px; line-height: 1.35; }
.consent input { margin-top: 2px; width: 18px; height: 18px; flex: none; }
.consent a { color: var(--green-deep); font-weight: 800; }
.item.off .item-name, .item.off .item-price { opacity: .5; }
.cartbar .statusbtn.waiting { background: #fff; }
.foot small a { color: inherit; }
.r-cust { text-align: center; font-size: 13px; margin: 4px 0; }
.logo-link { display: inline-flex; flex: none; border-radius: 50%; }
.logo-link:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.logo-link.center { display: flex; justify-content: center; width: fit-content; margin: 0 auto; }
.kvkk-text { font-size: 14px; line-height: 1.5; } .kvkk-text h1 { font-size: 20px; } .kvkk-text h2 { font-size: 16px; color: var(--green-deep); } .foot .linkbtn { color: inherit; text-decoration: underline; font-weight: 700; }
