/* Kasa ekranı — 03-TASARIM-SISTEMI-VE-UX §3 */
body.app-pos { overflow: hidden; user-select: none; -webkit-user-select: none; font-size: 15px; }
body.app-pos input, body.app-pos textarea { user-select: text; -webkit-user-select: text; }
.pos { display: grid; grid-template-rows: 56px 1fr; height: 100vh; height: 100dvh; background: var(--bg); }
.topbar { display: flex; align-items: center; gap: 6px; padding: 0 10px; background: var(--surface); border-bottom: 1px solid var(--line); min-width: 0; }
.topbar .brand { font-weight: 800; font-size: 15px; margin-right: 6px; white-space: nowrap; display: flex; gap: 8px; align-items: center; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.topbar .brand img { width: 28px; height: 28px; flex: none; object-fit: contain; }
.topbar .brand b { width: 28px; height: 28px; background: var(--brand); color: #fff; border-radius: 8px; display: grid; place-items: center; flex: none; }
.tb-btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; border-radius: 10px; border: 0; background: transparent; font-weight: 700; color: var(--ink-2); cursor: pointer; white-space: nowrap; position: relative; }
.tb-btn:hover { background: var(--surface-2); }
.tb-btn.on { background: var(--ink); color: var(--bg); }
.tb-btn .count { background: var(--danger); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 6px; min-width: 18px; text-align: center; }
.tb-btn .count.info { background: var(--info); }
.tb-search { flex: 1; max-width: 360px; margin-left: auto; position: relative; }
.tb-search input { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); padding: 0 12px 0 36px; }
.tb-search .ic { position: absolute; left: 10px; top: 10px; color: var(--muted); }
.tb-user { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; font-size: 13px; }
.tb-user .avatar { width: 30px; height: 30px; font-size: 12px; }
@media (max-width: 1100px) { .tb-btn .lbl { display: none; } .topbar .brand span { display: none; } }

/* Masalar */
.tables { display: flex; flex-direction: column; min-height: 0; }
.tables-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
.area-tabs { display: flex; gap: 6px; overflow-x: auto; }
.area-tabs button { height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; white-space: nowrap; }
.area-tabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.area-tabs button .n { font-size: 11px; opacity: .7; margin-left: 4px; }
.tables-body { flex: 1; overflow: auto; padding: 4px 14px 14px; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.ttile { position: relative; min-height: 104px; border-radius: 16px; border: 2px dashed var(--line-2); background: var(--surface); padding: 10px 12px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; transition: transform .08s var(--ease); touch-action: manipulation; }
.ttile:active { transform: scale(.97); }
.ttile .tn { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.ttile .ta { font-weight: 800; font-size: 15px; margin-top: auto; font-variant-numeric: tabular-nums; }
.ttile .tm { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; gap: 6px; align-items: center; }
.ttile.busy { border: 2px solid var(--brand); background: var(--brand-50); }
.ttile.busy .tn { color: var(--brand-600); }
.ttile.bill { border-color: var(--warning); background: var(--warning-50); }
.ttile.bill .tn { color: var(--warning); }
.ttile.long { box-shadow: inset 0 0 0 2px var(--danger); }
.ttile.call::after { content: ""; position: absolute; inset: -4px; border-radius: 18px; border: 3px solid var(--info); animation: pulse 1.2s ease-in-out infinite; pointer-events: none; }
@keyframes pulse { 50% { opacity: .2; } }
.ttile .flags { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; }
.ttile .flag { font-size: 11px; font-weight: 800; border-radius: 99px; padding: 2px 7px; background: var(--info); color: #fff; }
.ttile .flag.w { background: var(--warning); } .ttile .flag.q { background: var(--success); }
.ttile .wa { position: absolute; bottom: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.tplan { position: relative; min-height: 600px; }
.tplan .ttile { position: absolute; min-height: 0; padding: 6px 8px; align-items: center; justify-content: center; text-align: center; }
.tplan .ttile.round { border-radius: 50%; }
.tplan .ttile .tn { font-size: 18px; }
.open-strip { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 12px; }
.open-strip button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 12px; text-align: left; cursor: pointer; min-width: 150px; }
.open-strip button b { display: block; } .open-strip button span { font-size: 12px; color: var(--muted); }

/* Sipariş ekranı */
.orderv { display: grid; grid-template-columns: 176px 1fr 400px; min-height: 0; }
.cats { background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.cat { min-height: 52px; border-radius: 12px; border: 0; background: var(--surface-2); text-align: left; padding: 8px 12px; font-weight: 800; font-size: 14px; cursor: pointer; border-left: 5px solid var(--c, var(--line-2)); color: var(--ink); line-height: 1.2; }
.cat.on { background: var(--c, var(--brand)); color: #fff; }
.products { overflow-y: auto; padding: 10px; min-width: 0; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.ptile { min-height: 86px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); padding: 10px 11px 9px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; touch-action: manipulation; transition: transform .06s var(--ease), box-shadow .1s; }
.ptile::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--c, var(--line-2)); }
.ptile:active { transform: scale(.96); }
.ptile:hover { box-shadow: var(--sh-1); }
.ptile .pn { font-weight: 700; font-size: 14px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ptile .pp { margin-top: auto; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 14px; }
.ptile .pi { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 8px; margin-bottom: 2px; }
.ptile.out { opacity: .45; }
.ptile.out::after { content: "TÜKENDİ"; position: absolute; top: 10px; right: -26px; transform: rotate(35deg); background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 30px; }
.ptile .opt { position: absolute; top: 8px; right: 8px; color: var(--muted); }
.ptile .inorder { position: absolute; top: 8px; right: 8px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; border-radius: 99px; min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 6px; }
.ptile .kbd { position: absolute; bottom: 8px; right: 8px; }

.bill { background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; position: relative; }
.bill-h { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.bill-h .t { display: flex; align-items: center; gap: 8px; }
.bill-h .t h2 { font-size: 20px; margin: 0; flex: 1; }
.bill-h .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.bill-h .meta button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.lines { flex: 1; overflow-y: auto; padding: 6px 8px; }
.line { border-radius: 10px; padding: 8px 8px; cursor: pointer; display: grid; grid-template-columns: 34px 1fr auto; gap: 6px; align-items: start; }
.line:hover { background: var(--surface-2); }
.line.sel { background: var(--brand-50); box-shadow: inset 0 0 0 1.5px var(--brand); }
.line .q { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.line .n { font-weight: 600; line-height: 1.25; }
.line .n small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.line .n .nt { color: var(--warning); font-weight: 700; }
.line .a { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.line .a small { display: block; color: var(--success); font-size: 11px; font-weight: 700; }
.line.void .n, .line.void .a, .line.void .q { text-decoration: line-through; color: var(--muted); }
.line .st { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: 1px 5px; border-radius: 4px; margin-right: 4px; }
.line .st.pending { background: var(--warning-50); color: var(--warning); }
.line .st.sent, .line .st.preparing { background: var(--info-50); color: var(--info); }
.line .st.ready { background: var(--success-50); color: var(--success); }
.line .st.await { background: var(--danger-50); color: var(--danger); }
.line .st.comp { background: var(--success-50); color: var(--success); }
.line-actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; padding-top: 6px; }
.line-actions button { height: 38px; min-width: 38px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.line-actions button.danger { color: var(--danger); }
.line-actions .qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; }
.line-actions .qty button { border: 0; border-radius: 0; }
.line-actions .qty span { min-width: 40px; text-align: center; font-weight: 800; }
.bill-empty { flex: 1; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 20px; }
.bill-sum { border-top: 1px solid var(--line); padding: 8px 14px; }
.bill-sum .r { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-2); padding: 1px 0; font-variant-numeric: tabular-nums; }
.bill-sum .tot { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0 2px; }
.bill-sum .tot b { font-size: 30px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bill-sum .tot span { font-weight: 700; color: var(--muted); }
.bill-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 12px 8px; }
.bill-actions .btn { min-height: 48px; padding: 0 8px; font-size: 14px; }
.bill-pay { padding: 0 12px 12px; }
.bill-pay .btn { width: 100%; min-height: 64px; font-size: 20px; border-radius: 14px; justify-content: space-between; padding: 0 20px; }
.searchres .pgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* Panel katmanı (ödeme, bölme vb.) — adisyonun üstünde */
.sheet-wrap { position: fixed; inset: 56px 0 0 0; z-index: 800; display: flex; justify-content: flex-end; background: rgba(10, 12, 16, .35); animation: fade .12s; }
.sheet { width: min(760px, 100%); background: var(--surface); height: 100%; display: flex; flex-direction: column; box-shadow: var(--sh-3); animation: slide-in .18s var(--ease); }
.sheet.narrow { width: min(460px, 100%); }
.sheet-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.sheet-h h3 { margin: 0; flex: 1; font-size: 19px; }
.sheet-b { flex: 1; overflow-y: auto; padding: 16px; }
.sheet-f { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.sheet.pay-sheet { width: min(1180px, 100%); }
.pay-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .9fr); gap: 18px; align-items: start; }
.pay-methods { display: flex; flex-direction: column; gap: 10px; }
.pay-methods .pay-hint { margin-top: 0; }
.pay-methods .change-box { margin-top: 0; }
.pay-methods .methods { grid-template-columns: 1fr; }
.pay-methods .methods .btn[data-method] { min-height: 76px; font-size: 18px; }
.pay-methods .methods .btn-soft { min-height: 52px; }
.pay-sheet .numpad button { min-height: 54px; }
@media (max-width: 1100px) { .pay-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .pay-methods { grid-column: 2; } .pay-methods .methods { grid-template-columns: 1fr 1fr; } .pay-methods .methods .btn[data-method] { min-height: 64px; } }
@media (max-width: 760px) { .pay-grid { grid-template-columns: 1fr; } .pay-methods { grid-column: auto; } }
.pay-sum { background: var(--ink); color: var(--bg); border-radius: 16px; padding: 14px 18px; }
.pay-sum .ps-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 600; opacity: .8; padding: 2px 0; }
.pay-sum .ps-row b { font-weight: 700; } .pay-sum .ps-row b.ok { color: #86EFAC; }
.pay-sum .ps-row.sub { margin-top: 2px; }
.pay-sum .ps-main { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1px solid rgba(255,255,255,.14); margin-top: 8px; padding-top: 8px; }
.pay-sum .ps-main span { font-weight: 700; opacity: .85; }
.pay-sum .ps-main b { font-size: 38px; letter-spacing: -.02em; line-height: 1.1; }
.pay-how { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.pay-hint { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-size: 14px; font-weight: 600; line-height: 1.4; }
.pay-hint.part { background: var(--info-50); color: var(--info); }
.pay-hint.chg { background: var(--success-50); color: var(--success); }
.pay-hint.warn { background: var(--warning-50); color: var(--warning); }
.pay-right .mp-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pay-right .mp-quick .btn { padding: 0 6px; min-width: 0; font-variant-numeric: tabular-nums; }
.pay-right .mp-quick .btn.exact { grid-column: span 2; }
.pay-right .mp-quick .btn.on { background: var(--ink); color: var(--bg); }
.pay-sheet .sheet-h { flex-wrap: wrap; }
.pay-sheet .seg-l { margin-left: auto; margin-right: -4px; }
.pay-sheet .seg-l + .seg { margin-right: 4px; }
.methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.methods .btn { min-height: 64px; font-size: 16px; flex-direction: column; gap: 2px; }
.methods .btn small { font-size: 12px; opacity: .9; font-weight: 600; font-variant-numeric: tabular-nums; }
.paid-list { margin-top: 12px; }
.paid-list .pl-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); margin-bottom: 6px; font-weight: 600; }
.change-box { margin-top: 10px; background: var(--success-50); color: var(--success); border-radius: 14px; padding: 10px 14px; display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; }
.change-box b { font-size: 28px; }
.split-items .si { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 6px; cursor: pointer; }
.split-items .si.on { border-color: var(--brand); background: var(--brand-50); }
.split-items .si .qs { display: flex; align-items: center; gap: 4px; }
.split-items .si .qs button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 800; cursor: pointer; }
.parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.parts .part { border: 2px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; cursor: pointer; background: var(--surface); }
.parts .part.paid { border-color: var(--success); background: var(--success-50); cursor: default; }
.parts .part.next { border-color: var(--brand); }
.parts .part b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.done-overlay { position: fixed; inset: 0; z-index: 950; background: rgba(10,12,16,.55); display: grid; place-items: center; animation: fade .15s; }
.done-card { background: var(--surface); border-radius: 24px; padding: 28px; width: min(440px, 92%); text-align: center; box-shadow: var(--sh-3); animation: pop .2s var(--ease); }
.done-card .ok-ic { width: 72px; height: 72px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; margin: 0 auto 12px; }
.done-card .chg { font-size: 44px; font-weight: 900; color: var(--success); font-variant-numeric: tabular-nums; }
.mod-sheet .grp { margin-bottom: 18px; }
.mod-sheet .grp h4 { margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.mod-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.mod-opts button { min-height: 56px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; padding: 6px 10px; text-align: left; display: flex; flex-direction: column; justify-content: center; }
.mod-opts button small { color: var(--muted); font-weight: 600; }
.mod-opts button.on { border-color: var(--brand); background: var(--brand-50); color: var(--brand-600); }
.mod-opts button:disabled { opacity: .4; }
.qty-step { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.qty-step button { width: 52px; height: 52px; border: 0; background: var(--surface-2); font-size: 22px; font-weight: 800; cursor: pointer; }
.qty-step span { min-width: 60px; text-align: center; font-size: 22px; font-weight: 800; }
.menu-list { display: flex; flex-direction: column; gap: 4px; }
.menu-list button { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border-radius: 12px; border: 0; background: transparent; font-weight: 700; font-size: 15px; text-align: left; cursor: pointer; color: var(--ink); }
.menu-list button:hover { background: var(--surface-2); }
.menu-list button.danger { color: var(--danger); }
.menu-list button:disabled { opacity: .4; cursor: not-allowed; }
.menu-list .kbd { margin-left: auto; }
.menu-list hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.denoms { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.denoms label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-weight: 700; }
.denoms input { width: 64px; text-align: center; }
.calls-list .call { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 8px; }
.calls-list .call b { font-size: 17px; }
.palette { position: fixed; inset: 0; z-index: 990; background: rgba(10,12,16,.4); display: flex; justify-content: center; padding-top: 12vh; }
.palette .box { width: min(560px, 94%); background: var(--surface); border-radius: 16px; box-shadow: var(--sh-3); overflow: hidden; align-self: flex-start; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 16px 18px; font-size: 17px; outline: none; background: transparent; }
.palette .it { padding: 10px 18px; display: flex; justify-content: space-between; cursor: pointer; font-weight: 600; }
.palette .it.on { background: var(--brand-50); color: var(--brand-600); }
.offline-bar { position: fixed; left: 50%; top: 62px; transform: translateX(-50%); z-index: 700; background: var(--danger); color: #fff; font-weight: 700; padding: 6px 14px; border-radius: 99px; font-size: 13px; box-shadow: var(--sh-2); }
@media (max-width: 1180px) { .orderv { grid-template-columns: 140px 1fr 360px; } }
@media (max-width: 900px) {
  .orderv { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .cats { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .cat { min-width: 120px; min-height: 44px; }
  .bill { position: fixed; left: 0; right: 0; bottom: 0; height: 52vh; z-index: 50; border-left: 0; border-top: 1px solid var(--line); box-shadow: var(--sh-3); }
  .products { padding-bottom: 54vh; }
}

.dlv-board { display: grid; grid-template-columns: repeat(4, minmax(200px, 1fr)); gap: 10px; overflow-x: auto; }
.dlv-col { background: var(--surface-2); border-radius: 14px; padding: 10px; min-height: 200px; }
.dlv-col h4 { margin: 0 0 8px; display: flex; gap: 6px; align-items: center; }
.dlv-card { background: var(--surface); border-radius: 12px; padding: 10px; margin-bottom: 8px; border: 1px solid var(--line); }

/* Arayan numara kartı */
.cid-card { position: fixed; right: 16px; top: 72px; z-index: 900; width: min(380px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.25); padding: 14px; animation: cidIn .25s ease-out; }
@keyframes cidIn { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
.cid-h { display: flex; gap: 10px; align-items: center; }
.cid-ring { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #16a34a; color: #fff; animation: cidPulse 1.2s infinite; }
@keyframes cidPulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.5); } 100% { box-shadow: 0 0 0 14px rgba(22,163,74,0); } }
.cid-num { font-size: 19px; letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.cid-body { margin-top: 10px; padding: 10px; border-radius: 12px; background: var(--surface-2); display: grid; gap: 4px; }
.cid-last { border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { .cid-card, .cid-ring { animation: none; } }
