/* İncirPOS arayüzü — renkler: turuncu #FF7700, beyaz #FFFFFF, siyah #000000 */
:root {
  --orange: #FF7700;
  --orange-dark: #E06800;
  --orange-soft: #FFF1E5;
  --black: #000000;
  --white: #FFFFFF;
  --ink: #000000;
  --muted: #5E5E5E;
  --line: #E4E4E4;
  --surface: #F5F5F5;
  --danger: #D62B1F;
  --danger-soft: #FDECEA;
  --ok: #128048;
  --ok-soft: #E6F4EC;
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 18px;
  --rail: 92px;
  font-family: "Segoe UI", "Segoe UI Variable", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--white); overflow: hidden; }
body { font-size: 16px; line-height: 1.35; user-select: none; -webkit-user-select: none; }
input, textarea, select { user-select: text; -webkit-user-select: text; font: inherit; color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .4; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.num, .money { font-variant-numeric: tabular-nums; }
#app { height: 100%; }
.hidden { display: none !important; }

/* ---------- Butonlar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: var(--radius-m); font-weight: 600; background: var(--surface); border: 1.5px solid var(--line); transition: transform .06s; white-space: nowrap; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: var(--white); }
.btn.primary:hover:not(:disabled) { background: var(--orange-dark); }
.btn.dark { background: var(--black); border-color: var(--black); color: var(--white); }
.btn.danger { background: var(--white); border-color: var(--danger); color: var(--danger); }
.btn.danger.fill { background: var(--danger); color: var(--white); }
.btn.ghost { background: var(--white); }
.btn.big { min-height: 64px; font-size: 20px; border-radius: var(--radius-l); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: var(--radius-s); }
.btn.block { width: 100%; }
.icon.big-check { width: 44px; height: 44px; stroke-width: 3; }
.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- PIN ---------- */
.pin-screen { height: 100%; display: grid; grid-template-columns: 1fr 1fr; }
.pin-brand { background: var(--black); color: var(--white); display: flex; flex-direction: column; justify-content: space-between; padding: 48px; }
.pin-brand .logo { display: flex; align-items: center; gap: 14px; font-size: 28px; font-weight: 700; }
.pin-brand .logo img { width: 52px; height: 52px; }
.pin-brand .clock { font-size: 96px; font-weight: 300; letter-spacing: -2px; line-height: 1; }
.pin-brand .date { font-size: 20px; color: #BDBDBD; margin-top: 8px; }
.pin-brand .biz { font-size: 18px; color: var(--orange); font-weight: 600; }
.pin-pad { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 24px; }
.pin-pad h1 { margin: 0; font-size: 24px; font-weight: 600; }
.pin-dots { display: flex; gap: 16px; height: 22px; }
.pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--black); }
.pin-dots span.on { background: var(--orange); border-color: var(--orange); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 88px); gap: 14px; }
.keypad button { height: 88px; border-radius: 50%; font-size: 30px; font-weight: 500; background: var(--surface); }
.keypad button:active { background: var(--orange); color: var(--white); }
.keypad button.fn { font-size: 16px; font-weight: 600; background: transparent; }
.pin-error { color: var(--danger); min-height: 22px; font-weight: 600; }

/* ---------- Ana menü ---------- */
.home { height: 100%; display: flex; flex-direction: column; }
.topbar { height: 72px; display: flex; align-items: center; gap: 16px; padding: 0 24px; border-bottom: 1.5px solid var(--line); flex: none; }
.topbar .title { font-size: 22px; font-weight: 700; }
.topbar .sub { color: var(--muted); }
.topbar .spacer { flex: 1; }
.topbar .user { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.topbar .clock { background: var(--surface); padding: 6px 12px; border-radius: 999px; font-weight: 600; }
.home-grid { flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 20px; padding: 24px; }
.home-tile { border-radius: 24px; padding: 32px; display: flex; flex-direction: column; justify-content: space-between; text-align: left;
  background: var(--surface); border: 2px solid var(--line); position: relative; overflow: hidden; }
.home-tile .icon { width: 56px; height: 56px; stroke-width: 1.6; }
.home-tile b { font-size: 40px; letter-spacing: .5px; }
.home-tile small { display: block; font-size: 16px; color: var(--muted); margin-top: 4px; font-weight: 400; }
.home-tile.sales { background: var(--orange); border-color: var(--orange); color: var(--white); }
.home-tile.sales small { color: rgba(255,255,255,.85); }
.home-tile.dark { background: var(--black); border-color: var(--black); color: var(--white); }
.home-tile.dark small { color: #BDBDBD; }
.home-tile:active:not(:disabled) { transform: scale(.99); }
.home-foot { display: flex; gap: 12px; padding: 0 24px 24px; }

/* ---------- Satış düzeni ---------- */
.shell { height: 100%; display: grid; grid-template-columns: var(--rail) 1fr; }
.rail { background: var(--black); color: var(--white); display: flex; flex-direction: column; align-items: stretch; padding: 14px 10px; gap: 6px; }
.rail img { width: 44px; height: 44px; margin: 0 auto 14px; }
.rail button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border-radius: var(--radius-m); color: #CFCFCF; font-size: 13px; font-weight: 600; }
.rail button.active { background: var(--orange); color: var(--white); }
.rail .grow { flex: 1; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

/* ---------- Masa ekranı ---------- */
.area-tabs, .chips { display: flex; gap: 10px; padding: 16px 24px 0; overflow-x: auto; flex: none; scrollbar-width: none; }
.chip { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); font-weight: 600; white-space: nowrap; }
.chip.active { background: var(--black); border-color: var(--black); color: var(--white); }
.legend { display: flex; gap: 18px; padding: 12px 24px 0; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 1.5px solid var(--line); }
.tables { flex: 1; overflow: auto; padding: 18px 24px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; align-content: start; }
.tbl { aspect-ratio: 1.15; border-radius: var(--radius-l); border: 2px solid var(--line); background: var(--white); padding: 14px; display: flex; flex-direction: column;
  justify-content: space-between; text-align: left; position: relative; }
.tbl .nm { font-size: 22px; font-weight: 700; }
.tbl .meta { font-size: 13px; color: var(--muted); }
.tbl .amt { font-size: 20px; font-weight: 700; }
.tbl.busy { background: var(--orange); border-color: var(--orange); color: var(--white); }
.tbl.busy .meta { color: rgba(255,255,255,.9); }
.tbl.paying { background: var(--black); border-color: var(--black); color: var(--white); }
.tbl.paying .meta { color: #CFCFCF; }
.tbl .badge { position: absolute; top: 10px; right: 10px; background: var(--white); color: var(--black); border-radius: 999px; font-size: 12px; font-weight: 700; padding: 3px 8px; }
.tbl .badge.unsent { background: var(--black); color: var(--white); }

/* ---------- Adisyon ekranı ---------- */
.order { flex: 1; display: grid; grid-template-columns: 1fr 420px; min-height: 0; }
.catalog { min-width: 0; display: flex; flex-direction: column; min-height: 0; border-right: 1.5px solid var(--line); }
.search { margin: 16px 24px 0; display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 999px; padding: 0 18px; height: 50px; flex: none; }
.search input { border: 0; background: transparent; outline: none; flex: 1; font-size: 17px; }
.products { flex: 1; overflow: auto; padding: 16px 24px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; align-content: start; }
.prod { min-height: 110px; border-radius: var(--radius-m); border: 1.5px solid var(--line); background: var(--white); padding: 12px 14px; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; border-top: 6px solid var(--cat, var(--orange)); }
.prod b { font-size: 17px; line-height: 1.2; }
.prod span { font-size: 18px; font-weight: 700; color: var(--orange-dark); }
.prod:active { background: var(--orange-soft); }
.prod.flash { animation: flash .35s; }
@keyframes flash { from { background: var(--orange); color: var(--white); } }

.ticket { min-width: 0; display: flex; flex-direction: column; min-height: 0; background: var(--white); }
.ticket-head { padding: 16px 20px 10px; border-bottom: 1.5px solid var(--line); flex: none; }
.ticket-head .row1 { display: flex; justify-content: space-between; align-items: baseline; }
.ticket-head h2 { margin: 0; font-size: 24px; }
.ticket-head .meta { color: var(--muted); font-size: 14px; margin-top: 2px; }
.lines { flex: 1; overflow: auto; padding: 6px 12px; }
.line { width: 100%; display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; align-items: start; padding: 12px 8px; border-bottom: 1px solid var(--line); text-align: left; border-left: 4px solid transparent; }
.line .q { font-weight: 700; font-size: 18px; }
.line .n { font-size: 17px; font-weight: 600; }
.line .note { font-size: 13px; color: var(--muted); margin-top: 2px; }
.line .p { font-weight: 700; font-size: 17px; text-align: right; }
.line .tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; }
.line.new { border-left-color: var(--orange); background: var(--orange-soft); }
.line.new .tag { background: var(--orange); color: var(--white); }
.line.sent .tag { background: var(--surface); color: var(--muted); }
.line.void { color: #9A9A9A; text-decoration: line-through; }
.line.void .tag { background: var(--danger-soft); color: var(--danger); text-decoration: none; }
.line.gift .p { color: var(--ok); }
.line.paid .p::after { content: " ✓"; color: var(--ok); }
.empty { color: var(--muted); text-align: center; padding: 40px 20px; }
.totals { padding: 12px 20px; border-top: 1.5px solid var(--line); flex: none; }
.totals .r { display: flex; justify-content: space-between; color: var(--muted); font-size: 15px; padding: 2px 0; }
.totals .grand { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.totals .grand b { font-size: 34px; letter-spacing: -.5px; }
.ticket-actions { padding: 0 20px 16px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 10px; flex: none; }
.ticket-actions .wide { grid-column: span 2; }
.ticket-actions .btn { min-width: 0; padding: 0 12px; }

/* ---------- Hızlı satış ---------- */
.quick-bar { display: flex; gap: 12px; padding: 16px 24px 0; flex: none; }
.quick-bar .search { margin: 0; flex: 1; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 20px 16px; }

/* ---------- Modal / Sheet ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal { background: var(--white); border-radius: 22px; width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.modal.wide { width: min(980px, 100%); }
.modal.xwide { width: min(1200px, 100%); height: calc(100vh - 40px); }
.modal header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1.5px solid var(--line); }
.modal header h3 { margin: 0; font-size: 21px; }
.modal .body { padding: 18px 22px; overflow: auto; flex: 1; }
.modal footer { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1.5px solid var(--line); flex-wrap: wrap; }
.x { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); }

/* ---------- Form ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--white); }
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--orange); outline: none; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.field.err input, .field.err select, .field.err textarea { border-color: var(--danger); background: var(--danger-soft); }
.field .msg { color: var(--danger); font-size: 13px; font-weight: 600; margin-top: 4px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 46px; font-weight: 600; }
.field label.check { display: flex; margin: 0; }
.check input { width: 24px; height: 24px; accent-color: var(--orange); }
.alert { padding: 12px 14px; border-radius: var(--radius-s); font-weight: 600; margin-bottom: 12px; }
.alert.err { background: var(--danger-soft); color: var(--danger); }
.alert.info { background: var(--orange-soft); color: #7A3800; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }

/* ---------- Ödeme ---------- */
.pay { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pay-sum { background: var(--black); color: var(--white); border-radius: var(--radius-l); padding: 18px; }
.pay-sum .r { display: flex; justify-content: space-between; color: #CFCFCF; padding: 3px 0; }
.pay-sum .rem { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding-top: 10px; border-top: 1px solid #333; }
.pay-sum .rem b { font-size: 36px; color: var(--orange); }
.amount-box { font-size: 40px; font-weight: 700; text-align: right; padding: 10px 14px; border: 2px solid var(--black); border-radius: var(--radius-m); margin-bottom: 10px; min-height: 66px; }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.numpad button { height: 58px; border-radius: var(--radius-s); background: var(--surface); font-size: 24px; font-weight: 600; }
.numpad button:active { background: var(--orange); color: var(--white); }
.paytypes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.paylist { margin-top: 12px; }
.paylist .p { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #333; }
.shares { display: grid; gap: 8px; }
.share { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s); }
.share.done { background: var(--ok-soft); border-color: var(--ok); }
.pick { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 40px; height: 40px; border-radius: var(--radius-s); background: var(--surface); font-size: 20px; font-weight: 700; }
.stepper b { min-width: 34px; text-align: center; font-size: 18px; }
.seg { display: flex; background: var(--surface); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.seg button { flex: 1; min-height: 42px; border-radius: 999px; font-weight: 600; }
.seg button.active { background: var(--black); color: var(--white); }
.busy-overlay { position: absolute; inset: 0; background: rgba(255,255,255,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; border-radius: 22px; z-index: 5; text-align: center; padding: 30px; }
.spinner { width: 54px; height: 54px; border: 6px solid var(--orange-soft); border-top-color: var(--orange); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Ayarlar ---------- */
.settings { flex: 1; display: grid; grid-template-columns: 250px 1fr; min-height: 0; }
.snav { border-right: 1.5px solid var(--line); overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.snav button { text-align: left; padding: 12px 14px; border-radius: var(--radius-s); font-weight: 600; }
.snav button.active { background: var(--orange); color: var(--white); }
.spane { overflow: auto; padding: 22px 26px 40px; }
.spane h2 { margin: 0 0 4px; font-size: 24px; }
.spane .lead { color: var(--muted); margin: 0 0 18px; max-width: 70ch; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 10px; border-bottom: 1.5px solid var(--black); }
table.grid td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.grid tr.click { cursor: pointer; }
table.grid tr.click:hover td { background: var(--orange-soft); }
table.grid td.r, table.grid th.r { text-align: right; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface); }
.pill.on { background: var(--ok-soft); color: var(--ok); }
.pill.off { background: var(--danger-soft); color: var(--danger); }
.pill.or { background: var(--orange); color: var(--white); }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 5px; vertical-align: -3px; margin-right: 8px; }
.section { margin-top: 26px; }
.section h3 { margin: 0 0 10px; font-size: 18px; }
.tpl-editor { display: grid; grid-template-columns: 1fr 380px; gap: 18px; }
.tpl-editor textarea { width: 100%; min-height: 460px; font-family: Consolas, "Cascadia Mono", monospace; font-size: 14px; line-height: 1.5; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s); resize: vertical; }
.paper { background: #FFFDF8; border: 1.5px solid var(--line); border-radius: 4px; padding: 16px 12px; font-family: Consolas, "Cascadia Mono", "Courier New", monospace; font-size: 12.5px; line-height: 1.45; white-space: pre; overflow: auto; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.paper .b { font-weight: 700; }
.paper .w { font-weight: 700; font-size: 1.55em; line-height: 1.25; }
.paper .cut { color: var(--muted); border-top: 2px dashed var(--muted); margin: 8px 0; height: 0; }
.fieldlist { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.7; }
.fieldlist code { background: var(--surface); padding: 1px 6px; border-radius: 4px; color: var(--black); cursor: pointer; }

/* ---------- Raporlar ---------- */
.reports { flex: 1; overflow: auto; padding: 20px 24px 40px; background: var(--surface); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { background: var(--white); border-radius: var(--radius-l); padding: 18px 20px; border: 1.5px solid var(--line); }
.kpi span { color: var(--muted); font-weight: 600; font-size: 14px; }
.kpi b { display: block; font-size: 32px; margin-top: 6px; letter-spacing: -.5px; }
.kpi.accent { background: var(--orange); color: var(--white); border-color: var(--orange); }
.kpi.accent span { color: rgba(255,255,255,.9); }
.panels { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-top: 14px; }
.panel { background: var(--white); border-radius: var(--radius-l); padding: 18px 20px; border: 1.5px solid var(--line); min-width: 0; }
.panel h3 { margin: 0 0 14px; font-size: 18px; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 220px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.bars .bar i { display: block; width: 100%; max-width: 54px; background: var(--black); border-radius: 8px 8px 3px 3px; min-height: 3px; }
.bars .bar.top i { background: var(--orange); }
.bars .bar small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.bars .bar em { font-style: normal; font-size: 12px; font-weight: 700; white-space: nowrap; }
.hbar { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-bottom: 12px; }
.hbar .track { grid-column: 1 / -1; height: 10px; background: var(--surface); border-radius: 999px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--orange); border-radius: 999px; }

/* ---------- Gün sonu ---------- */
.eod { flex: 1; overflow: auto; padding: 22px 26px 40px; }
.eod-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }

/* ---------- Mutfak ekranı ---------- */
.kitchen { height: 100%; background: var(--black); color: var(--white); display: flex; flex-direction: column; }
.kitchen .topbar { border-color: #222; }
.kcards { flex: 1; overflow: auto; padding: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; align-content: start; }
.kcard { background: var(--white); color: var(--black); border-radius: var(--radius-l); display: flex; flex-direction: column; border-top: 8px solid var(--ok); min-height: 280px; }
.kcard.late { border-top-color: var(--orange); }
.kcard.urgent { border-top-color: var(--danger); }
.kcard header { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px 8px; }
.kcard header b { font-size: 22px; }
.kcard .timer { font-size: 22px; font-weight: 700; }
.kcard ul { list-style: none; margin: 0; padding: 4px 16px; flex: 1; }
.kcard li { padding: 7px 0; font-size: 18px; font-weight: 600; border-bottom: 1px solid var(--line); }
.kcard li small { display: block; color: var(--orange-dark); font-weight: 700; font-size: 14px; }
.kcard footer { padding: 12px 16px 16px; }

/* ---------- Toast ---------- */
#toast-root { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; align-items: center; pointer-events: none; }
.toast { background: var(--black); color: var(--white); padding: 14px 20px; border-radius: 14px; font-weight: 600; max-width: 640px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.toast.err { background: var(--danger); }
.toast.ok { border-left: 6px solid var(--orange); }

/* ---------- Dar ekran (garson telefonu / tablet) ---------- */
@media (max-width: 900px) {
  :root { --rail: 0px; }
  .shell { grid-template-columns: 1fr; }
  .rail { position: fixed; bottom: 0; left: 0; right: 0; flex-direction: row; height: 64px; padding: 6px; z-index: 20; justify-content: space-around; }
  .rail img, .rail .grow { display: none; }
  .rail button { padding: 6px 10px; font-size: 11px; }
  .main { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .rail { padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); height: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .order { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .ticket-actions .btn.big { font-size: 17px; min-height: 54px; }
  .totals .grand b { font-size: 26px; }
  /* Telefon: menü ve adisyon ayrı sekme; alttaki çubuk adisyona geçirir */
  .order, .order.m-menu, .order.m-ticket { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .order.m-menu .ticket, .order.m-ticket .catalog { display: none; }
  .m-only { display: inline-flex; }
  .mbar { display: block; }
  .ticket-head { position: relative; }
  .ticket-actions { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .catalog { border-right: 0; }
  .products { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .tables { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); padding: 14px; }
  .pin-screen { grid-template-columns: 1fr; }
  .pin-brand { display: none; }
  .home-grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .home-tile b { font-size: 28px; }
  .pay, .eod-grid, .panels, .tpl-editor { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .settings { grid-template-columns: 1fr; }
  .snav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1.5px solid var(--line); }
  .snav button { white-space: nowrap; }
  .form { grid-template-columns: 1fr; }
  .topbar { padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---- Kurulum sihirbazı */
.wiz-wrap { min-height: 100%; background: var(--black, #000); padding: 28px 16px 60px; overflow: auto; }
.wiz-head { max-width: 860px; margin: 0 auto 18px; display: flex; justify-content: space-between; align-items: center; color: #fff; }
.wiz-head .logo { display: flex; gap: 10px; align-items: center; font-size: 24px; font-weight: 700; }
.wiz-head .logo img { width: 36px; height: 36px; }
.wiz-biz { color: var(--orange); font-weight: 600; }
.wiz { max-width: 860px; margin: 0 auto; background: #fff; border-radius: 18px; padding: 26px; }
.wiz-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 22px; flex-wrap: wrap; }
.wiz-steps li { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #8a8a8a; padding: 6px 10px 6px 6px; border-radius: 999px; background: #f3f3f3; }
.wiz-steps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #ddd; color: #fff; font-weight: 700; font-size: 13px; }
.wiz-steps li.on { background: var(--orange-soft); color: #000; font-weight: 600; } .wiz-steps li.on span { background: var(--orange); }
.wiz-steps li.done span { background: #000; }
.wiz-body h1 { margin: 0 0 6px; } .wiz-body .lead { color: #555; margin: 0 0 18px; }
.wiz-code { font-size: 40px; letter-spacing: 14px; text-align: center; max-width: 340px; padding: 14px; border: 2px solid #ddd; border-radius: 14px; width: 100%; font-variant-numeric: tabular-nums; }
.wiz-code:focus { border-color: var(--orange); outline: none; }
.wiz-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.wiz-rows { display: grid; gap: 8px; margin: 10px 0; }
.wiz-row { display: flex; gap: 8px; align-items: center; }
.wiz-row input, .wiz-row select { flex: 1; min-height: 46px; padding: 0 12px; border: 1px solid #ccc; border-radius: 10px; font: inherit; }
.wiz-nav { display: flex; justify-content: space-between; margin-top: 24px; }
.wiz-err:empty { display: none; } .wiz-err { margin-top: 14px; }
.wiz-sum { width: 100%; border-collapse: collapse; } .wiz-sum td { padding: 9px 0; border-bottom: 1px solid #eee; vertical-align: top; } .wiz-sum td:first-child { width: 38%; }
@media (max-width: 640px) { .wiz { padding: 18px; } .wiz-tiles { grid-template-columns: 1fr; } .wiz-row { flex-wrap: wrap; } .wiz-steps li { font-size: 0; padding: 4px; } }
.muted { color: #6b6b6b; }

/* ---- Porsiyon seçimi */
.portion-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.portion { min-height: 96px; border: 2px solid var(--line, #ddd); border-radius: 14px; background: #fff; font: inherit; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; cursor: pointer; }
.portion b { font-size: 22px; } .portion span { color: #555; }
.portion:hover, .portion.on { border-color: var(--orange); background: var(--orange-soft); }

/* ---- Ödeme: hızlı nakit/kart, indirim çubuğu */
.ticket-actions .pay3 { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 10px; }
.disc-bar { margin-top: 12px; border: 1.5px solid var(--line, #ddd); border-radius: 12px; padding: 10px 12px; }
.disc-title { font-weight: 700; margin-bottom: 8px; }
.disc-btns { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---- Entegrasyonlar */
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.int-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; padding: 14px; min-height: 64px; border: 1.5px solid var(--line, #ddd); border-radius: 12px; background: #fff; font: inherit; cursor: pointer; }
.int-card:hover { border-color: var(--orange); } .int-card.on { border-color: var(--orange); background: var(--orange-soft); }
.int-editor { max-height: 68vh; overflow: auto; padding-right: 4px; }
.int-editor .hint { font-size: 11px; color: #9a9a9a; }
.int-sub { margin-top: 16px; border: 1.5px solid var(--line, #ddd); border-radius: 12px; padding: 12px; background: #fafafa; }
.int-sub-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.int-row { border-top: 1px dashed #ccc; padding-top: 10px; margin-top: 10px; }
.int-row-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }

/* ---------- Telefon adisyon çubuğu ---------- */
.m-only, .mbar { display: none; }
@supports (height: 100dvh) { html, body { height: 100dvh; } }
@media (max-width: 900px) {
  .m-only { display: inline-flex; }
  .mbar { display: block; }
}
.mbar { flex: none; padding: 8px 12px 10px; border-top: 1.5px solid var(--line); background: var(--white); }
.mbar-btn { width: 100%; min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--black); color: var(--white); font: inherit; font-weight: 700; cursor: pointer; }
.mbar-btn:active { transform: scale(.99); }
.mbar-n { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 17px; background: var(--orange); color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.mbar-t { flex: 1; text-align: left; display: flex; flex-direction: column; line-height: 1.15; font-size: 17px; }
.mbar-t small { color: #FFB27A; font-size: 12px; font-weight: 600; }
.mbar-btn b { font-size: 19px; }
.m-back { margin: 0 0 8px -6px; }
