/* Sipariş paneli: mutfakta, uzaktan okunabilir; büyük dokunma alanları, yüksek kontrast.
   Marka rengi (--brand) restoranın temasından gelir. */

:root {
  --brand: #c2410c;
  --accent: #e0a526;
  --bg: #eef0f2;
  --surface: #ffffff;
  --text: #1c2024;
  --muted: #59616b;
  --line: #d9dde2;
  --ok: #1b7a3a;
  --warn: #a15c00;
  --danger: #b42318;
  --focus: #1d4ed8;
  --radius: 16px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Gölgeler arka plana (soğuk gri) uyumlu tonlu, tek ışık yönü; durağan olduklarından CPU'ya yük bindirmez */
  --shadow-sm: 0 1px 2px rgb(30 41 59 / .06), 0 6px 14px -8px rgb(30 41 59 / .16);
  --shadow-md: 0 2px 4px rgb(30 41 59 / .07), 0 16px 30px -14px rgb(30 41 59 / .32);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --st-accepted: #d99a06;
  --st-ready: #1b7a3a;
  --st-done: #9aa3ad;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font);
  padding-bottom: env(safe-area-inset-bottom); -webkit-font-smoothing: antialiased;
}
::selection { background: color-mix(in srgb, var(--brand) 25%, transparent); }
h1, h2, p { margin: 0; }
h1, h2 { letter-spacing: -.01em; text-wrap: balance; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.spacer { flex: 1; }

/* ---------- Düğmeler ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); font-weight: 700; text-decoration: none; color: var(--text);
}
.btn:hover:not(:disabled) { border-color: var(--text); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--brand) 80%, transparent); }
.btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--brand) 86%, #000); border-color: color-mix(in srgb, var(--brand) 86%, #000); }
/* Dokunma geri bildirimi: sadece transform + renk geçişi (GPU'da, ana iş parçacığını yormaz) */
.btn, .icon, .icon-sm, .seg button, .eta-btn { transition: background-color .15s, border-color .15s, color .15s, transform .12s var(--ease); -webkit-tap-highlight-color: transparent; }
.btn:active:not(:disabled), .icon-sm:active:not(:disabled), .seg button:active, .eta-btn:active { transform: scale(.97); }
.seg button:hover:not([aria-pressed="true"]), .eta-btn:hover:not([aria-pressed="true"]), .icon-sm:hover:not(:disabled) { border-color: var(--text); }
.btn.big { min-height: 52px; padding: 0 26px; font-size: 1.0625rem; }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.block { width: 100%; }
.icon { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.75rem; line-height: 1; border-radius: 10px; }

/* ---------- Giriş ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(100%, 380px); background: var(--surface); border-radius: 18px; padding: 28px; display: grid; gap: 12px; box-shadow: var(--shadow-md); position: relative; overflow: hidden; animation: rise .4s var(--ease) backwards; }
.login-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--brand); }
.login-card h1 { font-size: 1.5rem; line-height: 1.2; }
.login-card label { font-weight: 700; }
.login-card input { min-height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 10px; }
.form-error { color: var(--danger); font-weight: 700; }

/* ---------- Üst çubuk, sekmeler ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: var(--surface); border-bottom: 1px solid var(--line); border-top: 4px solid var(--brand); }
.brand { display: grid; line-height: 1.2; }
.brand strong { font-size: 1.1875rem; letter-spacing: -.01em; }
.brand .sub { color: var(--muted); font-size: .875rem; }
.demo { font-style: normal; font-weight: 800; font-size: .75rem; background: var(--accent); color: #2b1d00; padding: 1px 8px; border-radius: 99px; margin-left: 4px; }
.conn { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 700; }
.conn .dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
/* Bağlantı noktası: sürekli değil, durum değişince birkaç kez "ping" atar (animasyon adı değişince yeniden başlar) */
.conn .dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: ping 1.4s ease-out 2; }
.conn[data-ok="false"] { color: var(--danger); }
.conn[data-ok="false"] .dot { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 25%, transparent); }
.conn[data-ok="false"] .dot::after { background: var(--danger); animation: ping-bad 1s ease-out 6; }
@keyframes ping { to { transform: scale(2.8); opacity: 0; } }
@keyframes ping-bad { to { transform: scale(2.8); opacity: 0; } }

.tabs { position: sticky; top: 0; z-index: 10; display: flex; gap: 4px; padding: 10px 14px 0; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { position: relative; flex: none; min-height: 48px; padding: 0 18px; border: 0; background: transparent; font-weight: 700; color: var(--muted); transition: color .15s; }
.tabs button:hover { color: var(--text); }
.tabs button::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 4px; border-radius: 4px 4px 0 0; background: var(--brand); transform: scaleX(0); transition: transform .25s var(--ease); }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; margin-left: 6px; border-radius: 99px; background: var(--brand); color: #fff; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.count.bump { animation: bump .5s var(--ease); } /* sayı değişince bir kez zıplar; sürekli animasyon yok */
@keyframes bump { 35% { transform: scale(1.4); } }

/* Sekme değişince içerik kısa süre yukarı kayarak gelir (panel.js enterView; yoklamayla yeniden çizimde tekrarlanmaz) */
#view.enter > * { animation: rise .32s var(--ease) backwards; }
#view.enter > :nth-child(2) { animation-delay: 40ms; }
#view.enter > :nth-child(3) { animation-delay: 80ms; }
#view.enter > :nth-child(4) { animation-delay: 120ms; }
#view.enter > :nth-child(5) { animation-delay: 160ms; }
#view.enter > :nth-child(n+6) { animation-delay: 200ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

main#view { max-width: 1100px; margin: 0 auto; padding: 18px 14px 80px; display: grid; gap: 16px; outline: none; }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 18px; font-weight: 500; }
.banner.warn { background: #fff4d6; color: #5c3a00; border-bottom: 1px solid #f0d58a; }
.banner.danger { background: var(--danger); color: #fff; }

/* ---------- Siparişler ---------- */
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.summary > div { position: relative; overflow: hidden; background: var(--surface); border-radius: var(--radius); padding: 16px 14px 12px; display: grid; box-shadow: var(--shadow-sm); }
.summary > div:not(.wide)::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--tile, var(--line)); }
.summary > div:nth-child(1) { --tile: var(--brand); }
.summary > div:nth-child(2) { --tile: var(--st-accepted); }
.summary > div:nth-child(3) { --tile: var(--st-ready); }
.summary > div.hot { background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.summary > div.hot b { color: var(--brand); }
.summary b { font-size: 1.75rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.summary span { color: var(--muted); font-size: .875rem; }
.summary .wide { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; padding-top: 12px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.seg button { min-height: 44px; padding: 0 18px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; }
.seg button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: #fff; }
.seg input[type="date"] { min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); }

.orders { display: grid; gap: 14px; align-items: start; }
@media (min-width: 900px) { .orders { grid-template-columns: 1fr 1fr; } }
.empty { padding: 40px 10px; text-align: center; color: var(--muted); text-wrap: balance; }
.empty-orders { --bell: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M6%208a6%206%200%201%201%2012%200c0%207%203%209%203%209H3s3-2%203-9'/%3E%3Cpath%20d='M10.3%2021a1.94%201.94%200%200%200%203.4%200'/%3E%3C/svg%3E"); padding: 56px 12px; }
.empty-orders::before { content: ''; display: block; width: 52px; height: 52px; margin: 0 auto 14px; background: currentColor; opacity: .4; -webkit-mask: var(--bell) center / contain no-repeat; mask: var(--bell) center / contain no-repeat; }

.order { --st: #cbd5e1; position: relative; background: var(--surface); border-radius: var(--radius); padding: 16px 16px 16px 20px; display: grid; gap: 12px; border-left: 6px solid var(--st); box-shadow: var(--shadow-sm); }
.order.enter { animation: cardIn .3s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms); } /* sadece ekrana ilk kez gelen kart; fill=backwards: bitince katman serbest kalır */
@keyframes cardIn { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.order[data-status="new"] { --st: var(--brand); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); box-shadow: var(--shadow-md); }
.order[data-status="accepted"] { --st: var(--st-accepted); }
.order[data-status="ready"] { --st: var(--st-ready); }
.order[data-status="done"] { --st: var(--st-done); opacity: .75; }
.order[data-status="cancelled"] { --st: #dc6a62; opacity: .75; }
/* Yeni sipariş halkası: eskiden box-shadow animasyonuydu (her karede yeniden boyama = CPU). Şimdi sadece opacity (GPU),
   ~32 sn nabız atar, sonra sabit halka olarak kalır; zil zaten çalmaya devam eder. */
.order[data-status="new"]::after { content: ''; position: absolute; inset: -5px; border: 3px solid var(--brand); border-radius: calc(var(--radius) + 5px); opacity: .5; pointer-events: none; animation: ring 1.6s ease-in-out 20; }
@keyframes ring { 0%, 100% { opacity: .15; } 50% { opacity: .85; } }
.order[data-status="done"], .order[data-status="cancelled"] { opacity: .75; }
.o-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.o-no { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.o-time { color: var(--muted); font-size: .9375rem; flex: 1; }
.chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 99px; background: #e8ebef; font-size: .875rem; font-weight: 700; box-shadow: inset 0 0 0 1px rgb(30 41 59 / .05); }
.chip.subtle { background: transparent; border: 1px solid var(--line); font-weight: 500; }
.chip.delivery { background: #dbeafe; color: #123a7a; }
.chip.pickup { background: #e6f4ea; color: #14532d; }
.order[data-status="new"] .chip.st { background: var(--brand); color: #fff; }
.order[data-status="accepted"] .chip.st { background: #fde68a; color: #5c3a00; }
.order[data-status="ready"] .chip.st { background: #bbf7d0; color: #14532d; }
.order[data-status="cancelled"] .chip.st { background: #fecaca; color: #7f1d1d; }
.o-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.o-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 1.0625rem; }
.o-items li { display: grid; grid-template-columns: 3ch 1fr auto; gap: 8px; align-items: baseline; }
.o-items .q { font-weight: 800; }
.o-items .p { font-variant-numeric: tabular-nums; color: var(--muted); }
.o-totals { display: grid; gap: 2px; border-top: 1px dashed var(--line); padding-top: 8px; font-variant-numeric: tabular-nums; }
.o-totals > div { display: flex; justify-content: space-between; color: var(--muted); }
.o-totals .grand { color: var(--text); font-size: 1.375rem; font-weight: 800; }
.o-cust { display: grid; gap: 2px; }
.o-note { background: #fff4d6; border-radius: 10px; padding: 10px 12px; }
.o-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Menü ---------- */
.menu-tools .search input { width: 100%; min-height: 48px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); }
.cat { background: var(--surface); border-radius: var(--radius); padding: 6px 14px 10px; box-shadow: var(--shadow-sm); }
.cat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 2px solid var(--text); }
.cat-head h2 { font-size: 1.1875rem; }
.prow { display: grid; grid-template-columns: 56px 1fr; gap: 10px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.prow:last-child { border-bottom: 0; }
.prow img, .ph { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #e8ebef; display: block; }
.ph { background: radial-gradient(circle at 35% 35%, #f3e3c4, #e0c48e); }
.pinfo { display: grid; gap: 2px; min-width: 0; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags em { font-style: normal; font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: #e8ebef; }
.tags em.warn { background: #fde68a; color: #5c3a00; }
.prow .price, .prow > .btn { grid-column: 2; }
.prow .price { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.prow .price input { width: 120px; min-height: 44px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: 10px; font-variant-numeric: tabular-nums; }
.prow > .btn { justify-self: start; }
@media (min-width: 760px) {
  .prow { grid-template-columns: 56px 1fr 170px auto auto; }
  .prow .price, .prow > .btn { grid-column: auto; }
}
.prow.is-hidden .pinfo, .prow.is-hidden img { opacity: .5; }
.prow.is-soldout strong { text-decoration: line-through; text-decoration-thickness: 1px; }

/* ---------- Ayarlar ---------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 18px; display: grid; gap: 14px; box-shadow: var(--shadow-sm); }
.card h2 { font-size: 1.1875rem; }
.field { display: grid; gap: 4px; border: 0; padding: 0; margin: 0; }
.field label, .field legend, .field .label { font-weight: 700; padding: 0; }
.field input, .field textarea, .hour-row input[type="time"] { min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; width: 100%; }
.field small { color: var(--muted); }
.field textarea { resize: vertical; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.switch-row span { display: grid; gap: 2px; }
.switch-row small { color: var(--muted); }
.switch-row input[type="checkbox"], .check input { width: 26px; height: 26px; accent-color: var(--brand); flex: none; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.hours { display: grid; gap: 8px; }
.hour-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; }
.hour-row input[type="time"] { width: 150px; }
.sound-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.range { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.range input { accent-color: var(--brand); width: 140px; }

/* Tahmini hazırlık süresi seçici (kabul ederken) */
.eta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.eta-label { font-weight: 700; font-size: .9375rem; margin-right: 2px; }
.eta-btn { min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; }
.eta-btn[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: #fff; }
.chip.eta-chip { background: #dcfce7; color: #14532d; }

.site-price { grid-column: 2; color: var(--muted); font-size: .8125rem; font-weight: 600; }
@media (min-width: 760px) { .site-price { grid-column: auto; } }

.fee-mode { gap: 8px; }
.fee-mode .check { align-items: center; flex-wrap: wrap; }
.fee-mode input[type="number"] { width: 110px; min-height: 40px; }
.blocked-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.blocked-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: #f6f7f9; border-radius: 10px; font-variant-numeric: tabular-nums; }

/* Kurulum testi */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: #f6f7f9; }
.check-row .mark { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--ok); }
.check-row.warn .mark { background: var(--warn); }
.check-row.bad .mark { background: var(--danger); }
.check-text { flex: 1; display: grid; min-width: 0; }
.check-text small { color: var(--muted); }
.check-actions { display: grid; gap: 6px; justify-items: start; }
.check-actions small { color: var(--muted); }
.chip.test-chip { background: #e0e7ff; color: #1e3a8a; }
.order:has(.test-chip) { outline: 2px dashed #a5b4fc; outline-offset: -3px; }

/* İndirim kodları, silinen ürünler */
.coupons { display: grid; gap: 12px; }
@media (min-width: 900px) { .coupons { grid-template-columns: 1fr 1fr; } }
.coupon-card { background: var(--surface); border-radius: var(--radius); padding: 16px; display: grid; gap: 6px; border: 2px dashed var(--line); }
.coupon-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.coupon-card .code { font: 800 1.5rem/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.coupon-kind { font-size: 1.125rem; font-weight: 700; }
.coupon-card footer { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.chip.cstate.ok { background: #dcfce7; color: #14532d; }
.chip.cstate.warn { background: #fde68a; color: #5c3a00; }
.chip.cstate.off { background: #e5e7eb; color: #4b5563; }
.chip.coupon-chip { background: #fef3c7; color: #78350f; }
details.deleted { padding: 6px 14px 10px; }
details.deleted summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
select { min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; width: 100%; }

/* Kategori/ürün düzeni, tatil, rapor */
.pctl { display: flex; gap: 4px; grid-column: 2; }
.icon-sm { width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); font-size: 1.125rem; font-weight: 700; line-height: 1; }
.icon-sm.on { background: var(--accent); border-color: var(--accent); color: #2b1d00; }
.icon-sm:disabled { opacity: .35; }
.cat-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cat.is-hidden { opacity: .75; }
.cat-empty { padding: 8px 0; }
.tags em.star { background: #fef3c7; color: #78350f; }
.menu-tools { display: flex; gap: 10px; align-items: center; }
.menu-tools .search { flex: 1; }
@media (min-width: 760px) {
  .prow { grid-template-columns: 56px 1fr auto 170px auto auto; }
  .pctl { grid-column: auto; }
}
.pay-list { display: grid; gap: 8px; }
.closure-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.closure-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: #f6f7f9; border-radius: 10px; }
.closure-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.closure-form label { display: grid; gap: 4px; font-weight: 700; }
.closure-form label.grow { flex: 1; min-width: 180px; }
.closure-form input { min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.report-custom { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.report-custom label { display: grid; gap: 4px; font-weight: 700; }
.report-custom input { min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.report-kpis { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .report-kpis { grid-template-columns: repeat(4, 1fr); } }
.report-kpis b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.report-kpis span { font-size: .8125rem; }
.rtable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rtable th { text-align: left; color: var(--muted); font-size: .8125rem; font-weight: 700; padding: 4px 8px; }
.rtable td { padding: 8px; border-top: 1px solid var(--line); position: relative; }
.rtable td:first-child { position: relative; z-index: 1; }
.rtable td:not(:first-child), .rtable th:not(:first-child) { text-align: right; white-space: nowrap; }
.rtable .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--brand); opacity: .45; border-radius: 2px; transform-origin: left center; animation: grow .7s var(--ease) .15s backwards; }
@keyframes grow { from { transform: scaleX(0); } }
.report-card { gap: 8px; }
#csv-link { justify-self: start; }


/* Kapak görseli ayarı */
.cover-pick { position: relative; justify-self: center; max-width: 100%; border-radius: 12px; overflow: hidden; background: #e8ebef; cursor: crosshair; touch-action: manipulation; line-height: 0; }
.cover-pick img { display: block; max-width: 100%; max-height: 360px; width: auto; height: auto; }
.cover-dot { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 0 0 1.5px rgb(0 0 0 / .35), 0 3px 8px rgb(0 0 0 / .35); pointer-events: none; }
.cover-crops { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.cover-crops figure { margin: 0; display: grid; gap: 6px; }
.cover-crop { aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; background: #e8ebef; }
.cover-crop.wide { aspect-ratio: 4 / 3; }
.cover-crop img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-sliders { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.cover-sliders label { display: grid; gap: 4px; font-weight: 700; }
.cover-sliders input { accent-color: var(--brand); width: 100%; min-height: 32px; }
#cover-file:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 560px) { .cover-crops, .cover-sliders { grid-template-columns: 1fr; } }

/* ---------- Pencere ---------- */
.dialog { width: min(100% - 24px, 560px); max-height: 92vh; border: 0; border-radius: 18px; padding: 0; overflow: auto; }
.dialog { box-shadow: var(--shadow-md); }
.dialog[open] { animation: dlgIn .22s var(--ease); }
.dialog[open]::backdrop { animation: fade .2s ease-out; }
.dialog::backdrop { background: rgb(15 23 42 / .5); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }
.dialog form { padding: 4px 20px 20px; display: grid; gap: 14px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; background: #fff; padding: 12px 0; z-index: 1; }
.dialog-head h2 { font-size: 1.25rem; }
.dialog-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; position: sticky; bottom: 0; background: #fff; padding-top: 10px; }
.field.photo .photo-row { display: flex; align-items: center; gap: 12px; }
.field .inline { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.field .inline input { width: 120px; }
.en summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.en .field { margin-top: 8px; }

/* ---------- Bildirim mesajı ---------- */
#toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 12px; background: #1c2024; color: #fff; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); z-index: 50; box-shadow: var(--shadow-md); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast[data-kind="err"] { background: var(--danger); }

/* ---------- Yazdırma: sadece seçilen siparişin fişi ---------- */
#print-root { display: none; }
@media print {
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; width: 72mm; margin: 0; font: 13px/1.35 monospace; color: #000; }
  #print-root h1 { font-size: 16px; text-align: center; }
  #print-root p { display: flex; justify-content: space-between; gap: 8px; margin: 3px 0; }
  #print-root hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
}

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

/* Site sekmesi, ürün etiketleri */
.site-top { margin: 0; }
.logo-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.logo-preview { width: 88px; height: 88px; border-radius: 50%; object-fit: contain; background: #e8ebef; border: 1px solid var(--line); flex: none; }
.logo-none { display: inline-block; }
.og-preview { width: 160px; height: 84px; border-radius: 10px; object-fit: cover; background: #e8ebef; }
label.btn.disabled { opacity: .5; pointer-events: none; }
.palette-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.palette-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 600; min-height: 52px; transition: border-color .15s, background-color .15s; }
.palette-opt:hover { border-color: var(--text); }
.palette-opt:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.palette-opt input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.swatch { width: 38px; height: 38px; border-radius: 10px; flex: none; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12); }
.gallery-edit { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.gallery-edit li { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #e8ebef; }
.gallery-edit img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-edit .icon-sm { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; background: rgb(255 255 255 / .92); }
.tag-field { border: 0; padding: 0; margin: 0; }
.tag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; }

/* Ürün seçenekleri düzenleyicisi, siparişte seçenek satırı */
.o-opts { display: block; color: var(--muted); font-size: .875rem; }
.opt-field { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.opt-group { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 8px; background: #fafbfc; }
.opt-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.opt-choice { grid-template-columns: 1fr 1fr auto auto; }
.opt-row input, .opt-meta input[type="number"], .opt-meta select { min-height: 44px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; width: 100%; min-width: 0; }
.opt-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.opt-meta select { width: auto; }
.opt-meta input[type="number"] { width: 72px; }
.opt-price { display: flex; align-items: center; gap: 4px; white-space: nowrap; font-weight: 700; }
.opt-price input { width: 84px; }
@media (max-width: 560px) { .opt-row, .opt-choice { grid-template-columns: 1fr auto; } .opt-row input:nth-child(2), .opt-choice input:nth-child(2) { grid-column: 1 / -1; } }

/* Teslimat bölgeleri */
.zone-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.zone-row input { min-height: 44px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; width: 100%; min-width: 0; }
.zone-num { display: flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 600; color: var(--muted); }
.zone-num input { width: 84px; flex: none; }
@media (max-width: 820px) { .zone-row { grid-template-columns: 1fr 1fr auto; } .zone-row > input:first-child { grid-column: 1 / -1; } }
.chip.sched { background: #e0e7ff; color: #1e3a8a; }
.sch-field { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.day-checks { display: flex; gap: 6px 14px; flex-wrap: wrap; }
.sch-times { display: flex; gap: 14px; flex-wrap: wrap; }
.sch-times label { display: grid; gap: 4px; font-weight: 700; }
.sch-times input { min-height: 44px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; }
.tags em.sched, .cat-head em.sched { font-style: normal; font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: #e0e7ff; color: #1e3a8a; vertical-align: middle; }
.camp { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; background: #fafbfc; }
.camp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.camp-grid label { display: grid; gap: 4px; font-weight: 700; font-size: .875rem; }
.camp input[type="date"], .camp input[type="time"] { min-height: 44px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; width: 100%; }
@media (max-width: 700px) { .camp-grid { grid-template-columns: 1fr 1fr; } }

/* Kasiyer girişi: yönetici öğeleri gizlenir (asıl yetki sunucuda kontrol edilir) */
body[data-role="staff"] .owner-only { display: none !important; }
body[data-role="staff"] .prow { grid-template-columns: 56px 1fr auto; }
body[data-role="staff"] .cat-head { border-bottom-width: 1px; }

/* Online kart ödemesi */
.chip.pay-ok { background: #dcfce7; color: #14532d; }
.chip.pay-bad { background: #fecaca; color: #7f1d1d; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; min-height: 44px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #f6f7f9; }
#pending-pay { padding: 12px 16px; }
#pending-pay summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.pending-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- Ana sayfa (Afiyeto): abonelik, site adresi, kurulum, hesap
   Hareket: yalnızca transform/opacity (düşük CPU). */
.pf-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.pf-card.warn { border-left: 5px solid var(--accent); }
.pf-card.danger { border-left: 5px solid var(--danger); }
.pf-big { margin: 0; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.pf-meter { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.pf-meter span { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--brand); transform-origin: left center; transition: transform .6s var(--ease); }
.pf-copy { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-copy input { flex: 1 1 220px; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; }
.pf-copy .btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.pf-qr, .pf-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pf-qr .btn, .pf-actions .btn, .pf-card a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.pf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pf-list li { display: flex; align-items: center; gap: 12px; }
.pf-list li > span:nth-child(2) { flex: 1; display: grid; gap: 2px; min-width: 0; }
.pf-list small { color: var(--muted); }
.pf-tick { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; color: #fff; }
.pf-list li.done .pf-tick { background: var(--ok); border-color: var(--ok); }
.pf-list li.done b { opacity: .55; }
.pf-badge { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }
.pf-form { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.pf-form:first-of-type { padding-top: 0; border-top: 0; }
.pf-langs { display: grid; gap: 6px; }
.pf-langs label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.pf-langs input { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); }
.pf-slug { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.pf-slug span { padding: 0 6px 0 12px; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.pf-slug input { flex: 1; min-width: 0; border: 0 !important; border-radius: 0 !important; }
.pf-rate { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.pf-rate label { display: block; font-weight: 700; margin-bottom: 4px; }
.pf-rate input { width: 8rem; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; }
@media (prefers-reduced-motion: reduce) { .pf-meter span { transition: none; } }

/* Hızlı kurulum sihirbazı */
.pf-wizard { border: 2px solid var(--brand); }
.pf-ok { border: 2px solid var(--ok); }
.pf-wiz fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.pf-wiz legend { font-weight: 800; padding: 0; margin-bottom: 4px; }
.pf-wiz input:not([type=checkbox]) { min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; width: 100%; }
.pf-hours { display: flex; gap: 12px; flex-wrap: wrap; }
.pf-hours label { display: grid; gap: 4px; font-weight: 600; }
.pf-hours input { width: auto !important; }
.pf-days { display: flex; gap: 6px; flex-wrap: wrap; }
.pf-days label { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 600; cursor: pointer; background: #fff; }
.pf-days input { width: 18px; height: 18px; accent-color: var(--brand); }
.pf-prod { display: grid; grid-template-columns: 1fr 9rem; gap: 8px; }

/* ---------------------------------------------------------------- Masada sipariş (QR menü): ekran seçici, masa etiketi, masa istekleri, mutfak ekranı, ayar kartı */
.scope-seg { margin-bottom: 2px; }
.scope-seg .badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 6px; padding: 0 6px; border-radius: 11px; background: var(--brand); color: #fff; font-size: .8rem; font-weight: 800; }
.scope-note { margin: 0 0 4px; }
.o-table { margin-left: 8px; padding: 3px 12px; border-radius: 999px; background: var(--text); color: #fff; font-weight: 800; font-size: 1.05rem; }
.chip.dinein { background: #e6eeff; color: #1d3f9a; }
.calls { display: grid; gap: 10px; }
.call { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid var(--accent); border-radius: var(--radius); background: #fff4d6; }
.call[data-kind="bill"] { border-color: #6aa3e8; background: #e8f2ff; }
.call > div { flex: 1; display: grid; gap: 2px; min-width: 0; font-size: 1.0625rem; }
.call small { color: var(--muted); }
.call-chip { background: var(--text); color: #fff; font-weight: 800; }
.di-sub { margin: 4px 0 0; font-size: 1.0625rem; }
.di-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.di-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.di-row .di-label, .di-row .di-pw { flex: 1 1 160px; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; }
.di-row .btn { text-decoration: none; display: inline-flex; align-items: center; }
.di-devices { display: grid; gap: 8px; }
.di-url { flex: 1 1 220px; min-width: 0; padding: 8px 10px; border-radius: 8px; background: #f3f4f6; font-size: .85rem; overflow-wrap: anywhere; }
.di-first { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.di-first label { display: block; font-weight: 700; margin-bottom: 4px; }
.di-first input { width: 9rem; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; }
.di-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.di-actions .btn { text-decoration: none; display: inline-flex; align-items: center; }
.di-screen { display: grid; gap: 8px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.pf-fixed { margin: 2px 0 0; }
.pf-reqform { display: grid; gap: 10px; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line); }
.pf-reqform select, .pf-reqform input { width: 100%; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; }
.pf-requests ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.pf-requests h3 { margin: 12px 0 0; font-size: 1rem; }
