/* ==========================================================================
   MISTERO — Ortak tasarım sistemi
   Kaynak: docs/tasarim.md. Ekrana özel stiller menu.css / admin.css içinde,
   yalnızca buradaki token'lar (var(--...)) kullanılarak yazılmalıdır.
   Harici font / CDN yok.
   ========================================================================== */

/* ---------- 1. Token'lar ---------- */
:root {
  /* Marka */
  --c-espresso: #2E2520;
  --c-coffee: #5A463B;
  --c-primary: #B5491F;
  --c-primary-hover: #963A17;
  --c-primary-soft: #F3DED1;
  --c-caramel: #D9822B;
  --c-brand-grad: linear-gradient(135deg, #E0913A 0%, #B5491F 55%, #8A3A17 100%);

  /* Yüzeyler & metin */
  --c-bg: #F5EEE3;
  --c-surface: #FFFBF5;
  --c-surface-2: #EDE3D5;
  --c-border: #E2D5C3;
  --c-border-strong: #A8927E;
  --c-text: #2E2520;
  --c-text-muted: #6B5A4E;
  --c-text-inverse: #FFFBF5;
  --c-overlay: rgba(46, 37, 32, .55);

  /* Durum renkleri: bg / fg (metin) / accent (kenar, nokta) */
  --c-new-bg: #E6EFFB;   --c-new-fg: #1D4F8A;   --c-new-accent: #2E6BD1;
  --c-prep-bg: #FFF4D6;  --c-prep-fg: #7A5200;  --c-prep-accent: #E0A400;
  --c-done-bg: #E5F4EA;  --c-done-fg: #1F6B3F;  --c-done-accent: #2F9E5B;
  --c-alert-bg: #FDEBEA; --c-alert-fg: #A3211A; --c-alert-accent: #D92D20;
  --c-bill-bg: #F1E9FA;  --c-bill-fg: #5B2E8C;  --c-bill-accent: #7E45C2;
  --c-info-bg: #EFE7DC;  --c-info-fg: #4A3B31;  --c-info-accent: #8C7664;
  --c-idle-bg: #EDE3D5;  --c-idle-fg: #5E4F44;  --c-idle-accent: #A8927E;

  /* v2: diyet, indirim */
  --c-vegan-bg: #E3F2E6;  --c-vegan-fg: #1E6234;
  --c-veg-bg: #EEF3DC;    --c-veg-fg: #4A5E12;
  --c-gf-bg: #FFF1D6;     --c-gf-fg: #7A4E00;
  --c-sale: #B5491F;      /* indirim rozeti zemini (beyaz yazı 5.3:1) */
  --c-sale-fg: #8F3414;   /* indirimli fiyat metni (krem üzerinde 6.9:1) */
  --thumb: 80px;          /* menü satırı küçük görsel */
  /* v2: ödeme yöntemleri (rozetlerde daima ikon + metin) */
  --c-cash-bg: #E5F4EA; --c-cash-fg: #1F6B3F; --c-cash-accent: #2F9E5B;
  --c-card-bg: #E6EFFB; --c-card-fg: #1D4F8A; --c-card-accent: #2E6BD1;

  /* Dolu buton renkleri (beyaz/koyu metinle AA) */
  --c-danger: #B42318;   --c-danger-hover: #912018;
  --c-success: #1F7A45;  --c-success-hover: #17613A;
  --c-warning: #F2B526;  --c-warning-hover: #DCA312; /* koyu metinle */

  /* Tipografi */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.5rem;
  --fs-4xl: 3.5rem;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --lh-tight: 1.2;
  --lh: 1.5;
  --ls-caps: .16em;

  /* Boşluk */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;

  /* Radius */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;

  /* Gölge */
  --sh-1: 0 1px 2px rgba(46, 37, 32, .06), 0 1px 3px rgba(46, 37, 32, .08);
  --sh-2: 0 4px 12px rgba(46, 37, 32, .12), 0 2px 4px rgba(46, 37, 32, .06);
  --sh-3: 0 16px 40px rgba(46, 37, 32, .22), 0 4px 12px rgba(46, 37, 32, .10);
  --sh-focus: 0 0 0 2px var(--c-surface), 0 0 0 5px var(--c-primary);

  /* Dokunma */
  --tap-min: 44px;
  --tap-lg: 56px;
  --tap-key: 80px;

  /* Hareket */
  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-slow: 320ms;
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* Katman */
  --z-sticky: 10; --z-bar: 20; --z-overlay: 40; --z-modal: 50; --z-toast: 60;

  /* Güvenli alan */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, ol, figure, fieldset, legend { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ul[role="list"], ol[role="list"], .list { list-style: none; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh);
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img, svg, video { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--c-primary); text-underline-offset: .15em; }
a:hover { color: var(--c-primary-hover); }
h1, h2, h3 { line-height: var(--lh-tight); font-weight: var(--fw-bold); }
[hidden], .hidden { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--sh-focus); border-radius: var(--r-sm); }
::selection { background: var(--c-primary-soft); color: var(--c-text); }
body.is-locked { overflow: hidden; touch-action: none; }

/* Uygulama varyantları */
.app--admin { font-size: 1.0625rem; user-select: none; -webkit-user-select: none; }
.app--admin input, .app--admin textarea { user-select: text; -webkit-user-select: text; }

/* ---------- 3. Tipografi yardımcıları ---------- */
.h-display {
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  letter-spacing: .2em;
  color: var(--c-espresso);
  line-height: 1.1;
}
.h1 { font-family: var(--font-serif); font-size: var(--fs-2xl); }
.h2 { font-family: var(--font-serif); font-size: var(--fs-xl); }
.h3 { font-family: var(--font-serif); font-size: var(--fs-lg); }
.eyebrow {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: .12em;
  color: var(--c-text-muted);
}
.section-title {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-caps);
  color: var(--c-primary);
  padding-bottom: var(--sp-2);
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--c-border);
}
.cat-note {
  display: flex;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-style: italic;
  color: var(--c-text-muted);
  margin: calc(-1 * var(--sp-1)) 0 var(--sp-3);
}
.cat-note::before { content: "\25C6"; font-style: normal; color: var(--c-primary); font-size: .7em; line-height: 2; }
.text-muted { color: var(--c-text-muted); }
.text-sm { font-size: var(--fs-sm); }
.text-lg { font-size: var(--fs-lg); }
.text-serif { font-family: var(--font-serif); }
.num { font-variant-numeric: lining-nums tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 3b. Dile duyarlı tipografi (v2) ----------
   Büyük harf + geniş harf aralığı yalnız Latin dillerde (tr/en/de).
   Türkçe için lang="tr" şart (i→İ doğru dönüşsün). Arapçada harf aralığı
   harf bağlantısını bozar → 0. Kiril'de büyük harf yok, aralık azaltılır. */
:is(.h-display, .eyebrow, .section-title, .table th, .qr-card__table, .caps):is(:lang(tr), :lang(en), :lang(de)) {
  text-transform: uppercase;
}
:is(.h-display, .eyebrow, .section-title, .caps):lang(ru) { letter-spacing: .04em; }
:lang(ar) { letter-spacing: 0 !important; }
:root:lang(ar), [lang="ar"] {
  --font-sans: "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", "Noto Naskh Arabic", "Arabic UI Text", system-ui, sans-serif;
  --font-serif: "Noto Naskh Arabic", "Geeza Pro", "Times New Roman", "Segoe UI", serif;
  --lh: 1.65;
}
:lang(ar) { line-height: var(--lh); }
[lang="ar"] { font-family: var(--font-sans); }
/* Uzun Almanca/Rusça kelimeler: taşma yerine heceleyerek kır */
.product__name, .product__desc, .pdetail__title, .option__name, .chip, .btn--wrap, .lang-list__item {
  overflow-wrap: anywhere;
  hyphens: auto; -webkit-hyphens: auto;
}
.btn.btn--wrap { white-space: normal; text-align: center; line-height: 1.15; }
/* Yön ikonları RTL'de aynalanır (chevron, geri, çıkış, harici bağlantı) */
[dir="rtl"] .flip-rtl, [dir="rtl"] .icon--dir { transform: scaleX(-1); }
/* İzole sayılar/fiyatlar: RTL içinde "₺245" sırası bozulmasın */
.num, .price__old, .price__new { unicode-bidi: isolate; }

/* ---------- 4. Marka ---------- */
.brand { display: inline-flex; align-items: center; gap: var(--sp-3); }
.brand-mark {
  --size: 40px;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  background: var(--c-brand-grad);
  display: inline-grid; place-items: center;
  color: #fff;
  font-size: calc(var(--size) * .42);
  line-height: 1;
  box-shadow: inset 0 -2px 6px rgba(0, 0, 0, .18);
  flex-shrink: 0;
}
.brand-mark::before { content: "\25C6"; }
.brand-mark--lg { --size: 88px; }
.brand-mark--sm { --size: 28px; }
.ornament {
  display: flex; align-items: center; gap: var(--sp-3);
  color: var(--c-primary); font-size: var(--fs-xs);
}
.ornament::before, .ornament::after { content: ""; flex: 1; height: 1px; background: var(--c-border); }
.menu-footer {
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--c-text-muted);
  padding: var(--sp-8) var(--sp-4);
}

/* ---------- 5. Yerleşim yardımcıları ---------- */
.container { width: 100%; max-width: 480px; margin-inline: auto; padding-inline: var(--sp-4); }
.stack { display: flex; flex-direction: column; gap: var(--gap, var(--sp-3)); }
.row { display: flex; align-items: center; gap: var(--gap, var(--sp-3)); }
.row--wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.divider { height: 1px; border: 0; background: var(--c-border); margin: var(--sp-3) 0; }

/* ---------- 6. Buton ---------- */
.btn {
  --btn-bg: var(--c-surface);
  --btn-fg: var(--c-text);
  --btn-bd: transparent;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  padding: 0 var(--sp-4);
  border: 1.5px solid var(--btn-bd);
  border-radius: var(--r-md);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.btn:focus-visible { border-radius: var(--r-md); }
.btn:active:not([disabled]):not(.is-loading) { transform: scale(.97); }
.btn__icon, .btn > svg { width: 1.25em; height: 1.25em; }

.btn--primary { --btn-bg: var(--c-primary); --btn-fg: #fff; }
.btn--primary:hover:not([disabled]) { --btn-bg: var(--c-primary-hover); color: #fff; }
.btn--secondary { --btn-bg: var(--c-primary-soft); --btn-fg: var(--c-primary-hover); }
.btn--secondary:hover:not([disabled]) { --btn-bg: #EDCFBD; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--c-text); --btn-bd: var(--c-border-strong); }
.btn--ghost:hover:not([disabled]) { --btn-bg: var(--c-surface-2); }
.btn--plain { --btn-bg: transparent; --btn-fg: var(--c-primary); padding-inline: var(--sp-2); }
.btn--plain:hover:not([disabled]) { --btn-bg: var(--c-primary-soft); }
.btn--danger { --btn-bg: var(--c-danger); --btn-fg: #fff; }
.btn--danger:hover:not([disabled]) { --btn-bg: var(--c-danger-hover); }
.btn--success { --btn-bg: var(--c-success); --btn-fg: #fff; }
.btn--success:hover:not([disabled]) { --btn-bg: var(--c-success-hover); }
.btn--warning { --btn-bg: var(--c-warning); --btn-fg: var(--c-espresso); }
.btn--warning:hover:not([disabled]) { --btn-bg: var(--c-warning-hover); }

.btn--lg { min-height: var(--tap-lg); padding: 0 var(--sp-6); font-size: var(--fs-lg); border-radius: var(--r-lg); }
.btn--sm { min-height: 36px; min-width: 36px; padding: 0 var(--sp-3); font-size: var(--fs-sm); }
.btn--block { display: flex; width: 100%; }
.btn--icon { padding: 0; width: var(--tap-min); }
.btn--icon.btn--lg { width: var(--tap-lg); }
.btn--round { border-radius: 50%; }
.btn--round:focus-visible { border-radius: 50%; }

.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 1.2em; height: 1.2em; border-radius: 50%;
  border: 2.5px solid var(--btn-fg); border-inline-end-color: transparent;
  animation: spin .7s linear infinite;
}
.btn.is-sent { --btn-bg: var(--c-done-bg); --btn-fg: var(--c-done-fg); }

/* ---------- 7. Kart ---------- */
.card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: var(--sp-4);
}
.card--flat { box-shadow: none; border: 1px solid var(--c-border); }
.card--interactive { cursor: pointer; transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.card--interactive:hover { box-shadow: var(--sh-2); }
.card--interactive:active { transform: scale(.99); }
.card__header { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.card__title { font-family: var(--font-serif); font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.card__body { display: flex; flex-direction: column; gap: var(--sp-2); }
.card__footer { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); }
.card.is-disabled { background: var(--c-surface-2); box-shadow: none; color: var(--c-text-muted); }

/* Menü bölümü + ürün satırı (görselsiz, kompakt liste) */
.menu-section { scroll-margin-top: 72px; margin-bottom: var(--sp-8); }
.menu-section__list {
  list-style: none;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: 0 var(--sp-4);
}
.product {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: start;
  column-gap: var(--sp-3);
  min-height: var(--tap-lg);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--c-border);
}
.product:last-child { border-bottom: 0; }
.product__info { min-width: 0; padding-top: 10px; }
.product__name { font-size: var(--fs-md); font-weight: var(--fw-medium); line-height: 1.3; }
.product__desc {
  margin-top: 2px;
  font-size: var(--fs-sm); color: var(--c-text-muted); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product__price {
  padding-top: 10px;
  font-weight: var(--fw-semibold);
  color: var(--c-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: flex; align-items: center; gap: var(--sp-2);
}
.product__qty {
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--c-primary-soft); color: var(--c-primary-hover);
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  display: inline-grid; place-items: center;
}
.product__action { align-self: center; }
.product.is-soldout .product__name,
.product.is-unpriced .product__name { color: var(--c-text-muted); }
.product.is-soldout .product__price,
.product.is-unpriced .product__price { color: var(--c-text-muted); }

/* ---------- 8. Rozet ---------- */
.badge {
  --b-bg: var(--c-surface-2); --b-fg: var(--c-text);
  display: inline-flex; align-items: center; gap: var(--sp-1);
  min-height: 24px; padding: 2px var(--sp-3);
  border-radius: var(--r-pill);
  background: var(--b-bg); color: var(--b-fg);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); line-height: 1.2;
  white-space: nowrap;
}
.badge > svg { width: 1.1em; height: 1.1em; }
.badge--primary { --b-bg: var(--c-primary-soft); --b-fg: var(--c-primary-hover); }
.badge--new   { --b-bg: var(--c-new-bg);   --b-fg: var(--c-new-fg); }
.badge--prep  { --b-bg: var(--c-prep-bg);  --b-fg: var(--c-prep-fg); }
.badge--done  { --b-bg: var(--c-done-bg);  --b-fg: var(--c-done-fg); }
.badge--alert { --b-bg: var(--c-alert-bg); --b-fg: var(--c-alert-fg); }
.badge--bill  { --b-bg: var(--c-bill-bg);  --b-fg: var(--c-bill-fg); }
.badge--info  { --b-bg: var(--c-info-bg);  --b-fg: var(--c-info-fg); }
.badge--idle  { --b-bg: var(--c-idle-bg);  --b-fg: var(--c-idle-fg); }
.badge--lg { min-height: 32px; font-size: var(--fs-sm); padding-inline: var(--sp-4); }
.badge--count {
  --b-bg: var(--c-alert-accent); --b-fg: #fff;
  min-width: 22px; height: 22px; min-height: 0; padding: 0 6px;
  justify-content: center; font-size: 12px; font-weight: var(--fw-bold);
  box-shadow: 0 0 0 2px var(--c-surface);
}
.badge--dot { width: 8px; height: 8px; min-height: 0; padding: 0; background: var(--c-alert-accent); }

.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c-idle-accent); flex-shrink: 0; }
.status-dot--new   { background: var(--c-new-accent); }
.status-dot--prep  { background: var(--c-prep-accent); }
.status-dot--done  { background: var(--c-done-accent); }
.status-dot--alert { background: var(--c-alert-accent); }
.status-dot--bill  { background: var(--c-bill-accent); }
.status-dot--idle  { background: var(--c-idle-accent); }

/* ---------- 9. Overlay, Modal ---------- */
.overlay {
  position: fixed; inset: 0;
  background: var(--c-overlay);
  z-index: var(--z-overlay);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
}
.overlay.is-open { opacity: 1; visibility: visible; }

.modal {
  position: fixed; left: 50%; top: 50%;
  z-index: var(--z-modal);
  width: calc(100% - 2 * var(--sp-4));
  max-width: 520px;
  max-height: 90vh; max-height: 90dvh;
  display: flex; flex-direction: column;
  background: var(--c-surface);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-3);
  transform: translate(-50%, -46%) scale(.98);
  opacity: 0; visibility: hidden;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease), visibility var(--dur);
}
.modal.is-open { transform: translate(-50%, -50%); opacity: 1; visibility: visible; }
.modal--sm { max-width: 400px; }
.modal--lg { max-width: 640px; }
.modal__header { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-5) var(--sp-6) var(--sp-3); }
.modal__title { flex: 1; font-family: var(--font-serif); font-size: var(--fs-xl); font-weight: var(--fw-bold); }
.modal__close { margin-inline-end: calc(-1 * var(--sp-2)); }
.modal__body { padding: var(--sp-2) var(--sp-6) var(--sp-4); overflow-y: auto; overscroll-behavior: contain; }
.modal__footer {
  display: flex; gap: var(--sp-3); justify-content: flex-end;
  padding: var(--sp-4) var(--sp-6) var(--sp-5);
  border-top: 1px solid var(--c-border);
}
.modal--center .modal__body { text-align: center; }
.modal--center .modal__footer { flex-direction: column; border-top: 0; }
@media (max-width: 480px) {
  .modal__footer { flex-direction: column-reverse; }
  .modal__footer .btn { width: 100%; }
}

/* ---------- 10. Bottom sheet ---------- */
.sheet {
  position: fixed; inset-inline: 0; bottom: 0;
  z-index: var(--z-modal);
  width: 100%; max-width: 560px; margin-inline: auto;
  max-height: 85vh; max-height: 85dvh;
  display: flex; flex-direction: column;
  background: var(--c-surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--sh-3);
  transform: translateY(100%);
  visibility: hidden;
  transition: transform var(--dur-slow) var(--ease), visibility var(--dur-slow);
}
.sheet.is-open { transform: translateY(0); visibility: visible; }
.sheet__handle {
  width: 40px; height: 5px; border-radius: var(--r-pill);
  background: var(--c-border-strong); opacity: .6;
  margin: var(--sp-2) auto 0;
}
.sheet__header { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4) var(--sp-2); }
.sheet__title { flex: 1; font-family: var(--font-serif); font-size: var(--fs-xl); font-weight: var(--fw-bold); }
.sheet__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--sp-4) var(--sp-4); }
.sheet__footer {
  padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + var(--safe-bottom));
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
  display: flex; flex-direction: column; gap: var(--sp-3);
}

/* ---------- 11. Toast ---------- */
.toast-region {
  position: fixed; z-index: var(--z-toast);
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--toast-offset, 140px) + var(--safe-bottom));
  width: calc(100% - 2 * var(--sp-4)); max-width: 420px;
  display: flex; flex-direction: column; gap: var(--sp-2);
  pointer-events: none;
}
.app--admin .toast-region { left: auto; right: auto; inset-inline-end: var(--sp-6); top: var(--sp-6); bottom: auto; transform: none; }
.toast {
  --t-accent: var(--c-info-accent);
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: 52px; padding: var(--sp-3) var(--sp-4);
  background: var(--c-espresso); color: var(--c-text-inverse);
  border-radius: var(--r-md);
  border-inline-start: 5px solid var(--t-accent);
  box-shadow: var(--sh-3);
  font-weight: var(--fw-medium);
  pointer-events: auto;
  opacity: 0; transform: translateY(12px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast--success { --t-accent: var(--c-done-accent); }
.toast--error   { --t-accent: var(--c-alert-accent); }
.toast--info    { --t-accent: var(--c-caramel); }
.toast__icon { width: 22px; height: 22px; color: var(--t-accent); }
.toast__msg { flex: 1; }
.toast .btn { --btn-bg: transparent; --btn-fg: var(--c-caramel); min-height: 36px; padding: 0 var(--sp-2); }

/* ---------- 12. Sekmeler ---------- */
.tabs {
  display: flex; gap: var(--sp-2);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: var(--sp-2) var(--sp-4);
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs--sticky {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--c-bg);
  box-shadow: 0 1px 0 var(--c-border), 0 6px 12px -10px rgba(46, 37, 32, .3);
}
.tab {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: var(--tap-min);
  padding: 0 var(--sp-4);
  border-radius: var(--r-pill);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  text-decoration: none; white-space: nowrap;
  scroll-snap-align: start;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.tab:hover { color: var(--c-primary); }
.tab:focus-visible { border-radius: var(--r-pill); }
.tab.is-active, .tab[aria-selected="true"], .tab[aria-current="true"] {
  background: var(--c-primary); border-color: var(--c-primary); color: #fff;
}

/* ---------- 13. Toggle ---------- */
.toggle {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  min-height: var(--tap-min);
  cursor: pointer; position: relative;
}
.toggle__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle__track {
  position: relative;
  width: 52px; height: 30px;
  border-radius: var(--r-pill);
  background: var(--c-border-strong);
  transition: background-color var(--dur) var(--ease);
  flex-shrink: 0;
}
.toggle__thumb {
  position: absolute; top: 3px; inset-inline-start: 3px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: var(--sh-1);
  transition: transform var(--dur) var(--ease);
}
.toggle__input:checked + .toggle__track { background: var(--c-success); }
.toggle__input:checked + .toggle__track .toggle__thumb { transform: translateX(22px); }
[dir="rtl"] .toggle__input:checked + .toggle__track .toggle__thumb { transform: translateX(-22px); }
.toggle__input:focus-visible + .toggle__track { box-shadow: var(--sh-focus); }
.toggle__input:disabled + .toggle__track { opacity: .5; }
.toggle__label { font-weight: var(--fw-medium); }

/* ---------- 14. PIN + tuş takımı ---------- */
.pin { display: flex; flex-direction: column; align-items: center; gap: var(--sp-6); }
.pin__dots { display: flex; gap: var(--sp-4); min-height: 24px; }
.pin__dot {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--c-border-strong); background: transparent;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast);
}
.pin__dot.is-filled { background: var(--c-primary); border-color: var(--c-primary); }
.pin__msg { min-height: 1.5em; color: var(--c-alert-fg); font-weight: var(--fw-semibold); }
.pin.is-error .pin__dot { border-color: var(--c-alert-accent); background: var(--c-alert-accent); }
.pin.is-error .pin__dots { animation: shake .4s var(--ease); }

.keypad {
  display: grid;
  grid-template-columns: repeat(3, var(--tap-key));
  gap: var(--sp-4);
}
.keypad__key {
  width: var(--tap-key); height: var(--tap-key);
  border-radius: 50%;
  background: var(--c-surface);
  box-shadow: var(--sh-1);
  border: 1px solid var(--c-border);
  font-size: var(--fs-2xl); font-weight: var(--fw-medium);
  font-variant-numeric: tabular-nums;
  display: grid; place-items: center;
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
  transition: background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.keypad__key:active { background: var(--c-primary-soft); transform: scale(.94); }
.keypad__key:focus-visible { border-radius: 50%; }
.keypad__key > svg { width: 28px; height: 28px; }
.keypad__key--action { background: transparent; box-shadow: none; border-color: transparent; color: var(--c-text-muted); }
.keypad__key--submit { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.keypad__key--submit:active { background: var(--c-primary-hover); }

/* ---------- 15. Form alanları ---------- */
.field { display: flex; flex-direction: column; gap: var(--sp-1); margin-bottom: var(--sp-4); }
.field--inline { flex-direction: row; align-items: center; gap: var(--sp-3); }
.field__label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--c-text); }
.field__label .req { color: var(--c-alert-fg); }
.field__control {
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-md); /* >=16px: iOS zoom engeli */
  background: var(--c-surface);
  border: 1.5px solid var(--c-border-strong);
  border-radius: var(--r-sm);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.field__control::placeholder { color: var(--c-text-muted); opacity: .8; }
.field__control:hover { border-color: var(--c-coffee); }
.field__control:focus-visible, .field__control:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); border-radius: var(--r-sm); }
.field__control:disabled { background: var(--c-surface-2); cursor: not-allowed; }
.field__control--textarea, textarea.field__control { min-height: 88px; resize: vertical; line-height: 1.4; }
select.field__control {
  appearance: none; -webkit-appearance: none;
  padding-inline-end: var(--sp-10);
  background-image: linear-gradient(45deg, transparent 50%, var(--c-coffee) 50%), linear-gradient(135deg, var(--c-coffee) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px; background-repeat: no-repeat;
}
[dir="rtl"] select.field__control { background-position: 14px 50%, 20px 50%; }
.field__affix { position: relative; display: flex; align-items: center; }
.field__affix > span {
  position: absolute; inset-inline-start: var(--sp-3);
  color: var(--c-text-muted); font-weight: var(--fw-semibold); pointer-events: none;
}
.field__affix > .field__control { padding-inline-start: calc(var(--sp-3) + 1.2em); }
.field__hint { font-size: var(--fs-xs); color: var(--c-text-muted); }
.field__error { font-size: var(--fs-sm); color: var(--c-alert-fg); font-weight: var(--fw-medium); display: none; }
.field.is-invalid .field__control { border-color: var(--c-alert-accent); }
.field.is-invalid .field__error { display: block; }

/* ---------- 16. Adet seçici ---------- */
.stepper {
  display: inline-flex; align-items: center;
  border: 1px solid var(--c-border); border-radius: var(--r-pill);
  background: var(--c-surface);
}
.stepper__btn {
  width: var(--tap-min); height: var(--tap-min);
  display: grid; place-items: center;
  border-radius: 50%; color: var(--c-primary);
  touch-action: manipulation;
}
.stepper__btn:active { background: var(--c-primary-soft); }
.stepper__btn:focus-visible { border-radius: 50%; }
.stepper__btn > svg { width: 20px; height: 20px; }
.stepper__btn--remove { color: var(--c-danger); }
.stepper__btn[disabled] { opacity: .4; }
.stepper__value { min-width: 2ch; text-align: center; font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }

/* ---------- 17. Yıldız puanlama ---------- */
.rating { display: inline-flex; flex-direction: row-reverse; justify-content: center; gap: var(--sp-1); }
.rating__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating__star {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--c-border-strong);
  border-radius: var(--r-sm);
  transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.rating__star > svg { width: 38px; height: 38px; }
/* row-reverse sayesinde ~ seçicisi soldaki yıldızları da boyar: HTML'de 5→1 sırasıyla yazın */
.rating__input:checked ~ .rating__star,
.rating__star:hover, .rating__star:hover ~ .rating__star { color: var(--c-caramel); }
.rating__input:focus-visible + .rating__star { box-shadow: var(--sh-focus); }
.rating__star:active { transform: scale(.9); }

/* Salt okunur yıldız: <span class="stars" style="--value:4.3" aria-label="5 üzerinden 4,3"></span> */
.stars {
  --value: 0; --size: 20px;
  display: inline-block;
  font-size: var(--size); line-height: 1; letter-spacing: 2px;
  font-family: var(--font-sans);
}
.stars::before {
  content: "\2605\2605\2605\2605\2605";
  background: linear-gradient(90deg, var(--c-caramel) calc(var(--value) / 5 * 100%), var(--c-border) calc(var(--value) / 5 * 100%));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stars--lg { --size: 32px; }
[dir="rtl"] .stars::before { background: linear-gradient(270deg, var(--c-caramel) calc(var(--value) / 5 * 100%), var(--c-border) calc(var(--value) / 5 * 100%)); -webkit-background-clip: text; background-clip: text; }

.meter { height: 8px; border-radius: var(--r-pill); background: var(--c-surface-2); overflow: hidden; }
.meter__bar { height: 100%; width: var(--pct, 0%); background: var(--c-caramel); border-radius: inherit; }

/* ---------- 18. Liste & tablo ---------- */
.list { padding: 0; margin: 0; }
.list__item {
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: var(--tap-lg);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--c-border);
}
.list__item:last-child { border-bottom: 0; }
.list__item.is-active { background: var(--c-primary-soft); color: var(--c-primary-hover); font-weight: var(--fw-semibold); box-shadow: inset 4px 0 0 var(--c-primary); }
[dir="rtl"] .list__item.is-active { box-shadow: inset -4px 0 0 var(--c-primary); }
button.list__item, a.list__item { width: 100%; text-align: start; color: inherit; text-decoration: none; }

.table { width: 100%; border-collapse: collapse; background: var(--c-surface); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1); }
.table th, .table td { padding: var(--sp-3) var(--sp-4); text-align: start; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
.table th { font-size: var(--fs-xs); letter-spacing: .08em; color: var(--c-text-muted); background: var(--c-surface-2); font-weight: var(--fw-semibold); }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: end; }
.table tr.is-muted td { color: var(--c-text-muted); background: color-mix(in srgb, var(--c-surface-2) 40%, transparent); }
.table__actions { display: flex; gap: var(--sp-2); justify-content: flex-end; }

/* ---------- 19. Uyarı bantları ---------- */
.alert {
  --a-bg: var(--c-info-bg); --a-fg: var(--c-info-fg); --a-accent: var(--c-info-accent);
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--a-bg); color: var(--a-fg);
  border-inline-start: 5px solid var(--a-accent);
  border-radius: var(--r-sm);
  font-weight: var(--fw-medium);
}
.alert > svg { width: 22px; height: 22px; }
.alert--alert   { --a-bg: var(--c-alert-bg); --a-fg: var(--c-alert-fg); --a-accent: var(--c-alert-accent); }
.alert--success { --a-bg: var(--c-done-bg);  --a-fg: var(--c-done-fg);  --a-accent: var(--c-done-accent); }
.alert--info    { --a-bg: var(--c-info-bg);  --a-fg: var(--c-info-fg);  --a-accent: var(--c-info-accent); }

/* Admin çağrı bandı */
.callbar {
  position: sticky; top: 0; z-index: var(--z-bar);
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-6);
  background: var(--c-alert-bg);
  border-inline-start: 6px solid var(--c-alert-accent);
  border-bottom: 1px solid #F5C9C5;
  color: var(--c-alert-fg);
}
.callbar__item {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  min-height: var(--tap-lg);
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4);
  background: var(--c-surface);
  border: 2px solid var(--c-alert-accent);
  border-radius: var(--r-md);
  font-weight: var(--fw-bold); font-size: var(--fs-lg);
}
.callbar__item--bill { border-color: var(--c-bill-accent); color: var(--c-bill-fg); }
.callbar__item > svg { width: 24px; height: 24px; }
.callbar__time { font-weight: var(--fw-medium); font-size: var(--fs-sm); opacity: .85; font-variant-numeric: tabular-nums; }

/* ---------- 20. Boş durum ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: var(--sp-3);
  padding: var(--sp-10) var(--sp-6);
  color: var(--c-text-muted);
}
.empty__icon {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-surface-2); color: var(--c-coffee);
}
.empty__icon > svg { width: 34px; height: 34px; }
.empty__title { font-family: var(--font-serif); font-size: var(--fs-xl); color: var(--c-text); font-weight: var(--fw-bold); }
.empty__text { max-width: 32ch; }
.empty__action { margin-top: var(--sp-2); }

/* ---------- 21. Yükleniyor ---------- */
.spinner {
  display: inline-block;
  width: 24px; height: 24px; border-radius: 50%;
  border: 3px solid var(--c-primary-soft); border-top-color: var(--c-primary);
  animation: spin .8s linear infinite;
}
.spinner--lg { width: 44px; height: 44px; border-width: 4px; }
.skeleton {
  display: block;
  background: linear-gradient(90deg, var(--c-surface-2) 25%, #F6EFE5 50%, var(--c-surface-2) 75%);
  background-size: 200% 100%;
  border-radius: var(--r-sm);
  animation: shimmer 1.4s ease-in-out infinite;
}
.skeleton--text { height: 14px; margin: 6px 0; width: var(--w, 100%); }
.skeleton--title { height: 22px; width: var(--w, 60%); margin-bottom: var(--sp-3); }
.skeleton--card { height: 72px; border-radius: var(--r-lg); margin-bottom: var(--sp-3); }
.skeleton--pill { height: var(--tap-min); width: 110px; border-radius: var(--r-pill); flex-shrink: 0; }
.skeleton--circle { width: var(--s, 44px); height: var(--s, 44px); border-radius: 50%; }

/* ==========================================================================
   v2 BİLEŞENLERİ — docs/tasarim.md §12
   ========================================================================== */

/* ---------- 26. Küçük görsel / yer tutucu ---------- */
.thumb {
  --s: var(--thumb);
  position: relative;
  width: var(--s); height: var(--s);
  flex-shrink: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-surface-2);
}
.thumb--xs { --s: 40px; border-radius: var(--r-sm); }
.thumb--sm { --s: 56px; border-radius: var(--r-sm); }
.thumb--lg { --s: 120px; border-radius: var(--r-lg); }
.thumb__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity var(--dur) var(--ease); }
/* Fotoğrafsız: krem zemin + ince çerçeve + ◆ (ya da içinde kategori ikonu: .thumb__icon) */
.thumb--ph {
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 251, 245, .9), transparent 60%),
    var(--c-surface-2);
  box-shadow: inset 0 0 0 1px var(--c-border);
  color: var(--c-primary);
}
.thumb--ph:not(:has(.thumb__icon))::before { content: "\25C6"; font-size: calc(var(--s) * .26); opacity: .55; }
.thumb__icon { width: 42%; height: 42%; opacity: .55; }
/* Görsel yüklenirken: img'ye .is-loading ekleyin, onload'da kaldırın (onerror → .thumb--ph) */
.thumb__img.is-loading { opacity: 0; }
.thumb:has(.thumb__img.is-loading) {
  background: linear-gradient(90deg, var(--c-surface-2) 25%, #F6EFE5 50%, var(--c-surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

/* ---------- 27. Fotoğraflı ürün satırı ----------
   <li class="product product--media"> .product__info | .product__media(.thumb + .product__add) */
.product--media {
  grid-template-columns: 1fr auto;
  column-gap: var(--sp-4);
  min-height: calc(var(--thumb) + 2 * var(--sp-3));
}
.product--media .product__info { padding-top: 2px; display: flex; flex-direction: column; gap: 2px; }
.product--media .product__price { padding-top: var(--sp-1); flex-wrap: wrap; }
.product__media { position: relative; align-self: center; }
.product__add {
  position: absolute;
  inset-inline-end: -6px; bottom: -6px;
  box-shadow: 0 0 0 3px var(--c-surface), var(--sh-1);
}
.product__media .product__qty {
  position: absolute; top: -6px; inset-inline-end: -6px;
  box-shadow: 0 0 0 2px var(--c-surface);
}
.product__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); margin-top: var(--sp-1); }
.product.is-soldout .thumb, .product.is-unpriced .thumb { filter: grayscale(1); opacity: .6; }

/* ---------- 28. Fiyat & indirim ----------
   <span class="price price--discount">
     <span class="sr-only">Eski fiyat 275 ₺, indirimli fiyat 220 ₺</span>
     <s class="price__old" aria-hidden="true">₺275</s>
     <span class="price__new" aria-hidden="true">₺220</span>
   </span>
   <span class="badge badge--discount" aria-hidden="true">%20</span>
   <span class="deal-note">⏱ Bugün son</span> */
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 var(--sp-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price__new { font-weight: var(--fw-bold); color: var(--c-primary); }
.price--discount .price__new { color: var(--c-sale-fg); }
.price__old {
  font-size: .875em; font-weight: var(--fw-regular);
  color: var(--c-text-muted);
  text-decoration: line-through; text-decoration-thickness: 1.5px;
}
.price--lg { font-size: var(--fs-xl); }
.badge--discount { --b-bg: var(--c-sale); --b-fg: #fff; font-weight: var(--fw-bold); letter-spacing: .02em; min-height: 20px; padding-inline: var(--sp-2); }
.deal-note {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  color: var(--c-prep-fg);
}
.deal-note > svg { width: 14px; height: 14px; }
/* Sepet/sipariş satırında kazanç satırı: "İndirim −₺55" */
.saving { font-size: var(--fs-sm); color: var(--c-done-fg); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }

/* ---------- 29. Diyet rozetleri & alerjenler ----------
   Renk tek başına anlam taşımaz: her zaman ikon + kısaltma/metin. */
.diet {
  --d-bg: var(--c-surface-2); --d-fg: var(--c-text);
  display: inline-flex; align-items: center; gap: 3px;
  min-height: 22px; padding: 1px 7px 1px 5px;
  border-radius: var(--r-pill);
  background: var(--d-bg); color: var(--d-fg);
  font-size: 11px; font-weight: var(--fw-bold); letter-spacing: .03em; line-height: 1;
  white-space: nowrap;
}
.diet > svg { width: 14px; height: 14px; }
.diet--vegan { --d-bg: var(--c-vegan-bg); --d-fg: var(--c-vegan-fg); }
.diet--vegetarian { --d-bg: var(--c-veg-bg); --d-fg: var(--c-veg-fg); }
.diet--gf { --d-bg: var(--c-gf-bg); --d-fg: var(--c-gf-fg); }
.diet--full { min-height: 30px; padding: 4px 12px 4px 8px; font-size: var(--fs-sm); font-weight: var(--fw-semibold); letter-spacing: 0; }
.diet--full > svg { width: 18px; height: 18px; }

/* Listede: "⚠ 1 · 7" — AB numaraları (dilden bağımsız) */
.allergen-codes {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: var(--fw-semibold); color: var(--c-text-muted);
  font-variant-numeric: tabular-nums;
}
.allergen-codes > svg { width: 14px; height: 14px; }
/* Detayda tam liste */
.allergen-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-2); }
.allergen { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); }
.allergen__code {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: inline-grid; place-items: center;
  background: var(--c-surface); border: 1.5px solid var(--c-border-strong);
  font-size: 12px; font-weight: var(--fw-bold); font-variant-numeric: tabular-nums;
}
.allergen-note {
  display: flex; gap: var(--sp-2); align-items: flex-start;
  font-size: var(--fs-xs); color: var(--c-text-muted); font-style: italic;
}
.allergen-note > svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

/* ---------- 30. Filtre çipleri ---------- */
.chips {
  display: flex; gap: var(--sp-2);
  overflow-x: auto; scrollbar-width: none;
  padding: var(--sp-1) var(--sp-4);
}
.chips::-webkit-scrollbar { display: none; }
.chips--wrap { flex-wrap: wrap; overflow: visible; padding-inline: 0; }
.chip {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: var(--sp-1);
  min-height: 36px; padding: 0 var(--sp-3);
  border-radius: var(--r-pill);
  border: 1.5px solid var(--c-border-strong);
  background: transparent; color: var(--c-text);
  font-size: var(--fs-sm); font-weight: var(--fw-medium);
  position: relative;
}
/* 36px görünür, ~44px dokunma alanı */
.chip::after { content: ""; position: absolute; inset: -4px 0; }
.chip > svg { width: 16px; height: 16px; }
.chip:focus-visible { border-radius: var(--r-pill); }
.chip[aria-pressed="true"], .chip.is-active, .chip:has(input:checked) {
  background: var(--c-espresso); border-color: var(--c-espresso); color: var(--c-text-inverse);
}
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip:has(input:focus-visible) { box-shadow: var(--sh-focus); }
.chip__count { opacity: .75; font-variant-numeric: tabular-nums; }
.chip--sale[aria-pressed="false"] { color: var(--c-sale-fg); border-color: var(--c-sale); }

/* ---------- 31. Ürün detay sheet'i ---------- */
.sheet--detail { max-height: 92vh; max-height: 92dvh; }
.pdetail__hero {
  position: relative;
  aspect-ratio: 4 / 3; max-height: 38vh; max-height: 38dvh; width: 100%;
  flex-shrink: 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  overflow: hidden;
  background: var(--c-surface-2);
}
.pdetail__hero > img { width: 100%; height: 100%; object-fit: cover; }
.pdetail__hero.thumb--ph { --s: 96px; aspect-ratio: auto; height: 96px; }
.pdetail__close {
  position: absolute; top: var(--sp-3); inset-inline-end: var(--sp-3);
  --btn-bg: rgba(255, 251, 245, .92); box-shadow: var(--sh-1);
}
.pdetail__body { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-5); overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.pdetail__head { display: flex; flex-direction: column; gap: var(--sp-2); }
.pdetail__title { font-family: var(--font-serif); font-size: var(--fs-xl); font-weight: var(--fw-bold); line-height: 1.2; }
.pdetail__desc { color: var(--c-text-muted); }
.pdetail__section { display: flex; flex-direction: column; gap: var(--sp-2); }
.pdetail__label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.pdetail__footer { display: flex; align-items: center; gap: var(--sp-3); }
.pdetail__footer .btn { flex: 1; min-width: 0; }

/* ---------- 32. Seçenek grupları (varyant) ---------- */
.optgroup { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-2); scroll-margin-top: var(--sp-4); }
.optgroup__head { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; width: 100%; padding: 0; }
.optgroup__title { font-weight: var(--fw-bold); font-size: var(--fs-md); }
.optgroup__rule { font-size: var(--fs-xs); color: var(--c-text-muted); }
.optgroup__req { margin-inline-start: auto; }
.optgroup__error { display: none; align-items: center; gap: var(--sp-1); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--c-alert-fg); }
.optgroup__error > svg { width: 16px; height: 16px; }
.optgroup.is-invalid .optgroup__error { display: flex; }
.optgroup.is-invalid .optgroup__req { --b-bg: var(--c-alert-bg); --b-fg: var(--c-alert-fg); }
.optgroup.is-invalid .option { border-color: var(--c-alert-accent); }
.optgroup.is-complete .optgroup__req { --b-bg: var(--c-done-bg); --b-fg: var(--c-done-fg); }

/* Seçenek satırı:
   <label class="option"><input type="radio|checkbox" class="option__input" name="g12">
   <span class="option__control"></span><span class="option__name">Badem sütü</span>
   <span class="option__price">+₺15</span></label> */
.option-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.option {
  position: relative;
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: 52px; padding: var(--sp-2) var(--sp-3);
  border: 1.5px solid var(--c-border); border-radius: var(--r-md);
  background: var(--c-surface);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.option__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option__control {
  width: 22px; height: 22px; flex-shrink: 0;
  border: 2px solid var(--c-border-strong); background: var(--c-surface);
  display: grid; place-items: center;
  transition: background-color var(--dur-fast), border-color var(--dur-fast);
}
.option__input[type="radio"] + .option__control { border-radius: 50%; }
.option__input[type="checkbox"] + .option__control { border-radius: 6px; }
.option__input[type="radio"]:checked + .option__control { border-color: var(--c-primary); background: var(--c-primary); box-shadow: inset 0 0 0 4px var(--c-surface); }
.option__input[type="checkbox"]:checked + .option__control { border-color: var(--c-primary); background: var(--c-primary); }
.option__input[type="checkbox"]:checked + .option__control::after { content: "\2713"; color: #fff; font-size: 14px; font-weight: var(--fw-bold); line-height: 1; }
.option:has(.option__input:checked) { border-color: var(--c-primary); background: var(--c-primary-soft); }
.option:has(.option__input:focus-visible) { box-shadow: var(--sh-focus); }
.option__name { flex: 1; min-width: 0; }
.option__price { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--c-text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.option:has(.option__input:checked) .option__price { color: var(--c-primary-hover); }
.option.is-soldout, .option:has(.option__input:disabled) { cursor: not-allowed; background: var(--c-surface-2); color: var(--c-text-muted); }
.option.is-soldout .option__control { opacity: .5; }
/* Maks. seçime ulaşınca seçilmemişler soluk (JS: .optgroup.is-maxed + input disabled) */
.optgroup.is-maxed .option:not(:has(.option__input:checked)) { opacity: .55; }

/* Segment (≤3 kısa tek seçim, ör. Küçük / Orta / Büyük) */
.segment { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--c-surface-2); border-radius: var(--r-md); }
.segment__item { position: relative; min-width: 0; }
.segment__item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segment__label {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: var(--tap-min); padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-sm);
  font-weight: var(--fw-semibold); font-size: var(--fs-sm); line-height: 1.2;
  cursor: pointer; color: var(--c-text);
  overflow-wrap: anywhere;
}
.segment__label small { font-weight: var(--fw-medium); color: var(--c-text-muted); font-size: var(--fs-xs); unicode-bidi: isolate; }
.segment__item input:checked + .segment__label { background: var(--c-surface); color: var(--c-primary-hover); box-shadow: var(--sh-1); }
.segment__item input:focus-visible + .segment__label { box-shadow: var(--sh-focus); }
.segment__item input:disabled + .segment__label { color: var(--c-text-muted); text-decoration: line-through; cursor: not-allowed; }
.segment.is-invalid { box-shadow: inset 0 0 0 1.5px var(--c-alert-accent); }

/* Seçilen seçeneklerin özeti (sepet, siparişlerim, tablet kartı):
   <p class="item-options"><span>Büyük</span><span>Badem sütü</span><span class="item-options__extra">+Ekstra shot</span></p> */
.item-options { font-size: var(--fs-sm); color: var(--c-text-muted); line-height: 1.35; overflow-wrap: anywhere; }
.item-options > span + span::before { content: " \00B7 "; color: var(--c-text-muted); font-weight: var(--fw-regular); }
.item-options__extra { color: var(--c-text); font-weight: var(--fw-medium); }

/* ---------- 33. Dil seçici ---------- */
.lang-switch { gap: var(--sp-1); min-height: var(--tap-min); padding-inline: var(--sp-3); font-size: var(--fs-sm); font-weight: var(--fw-bold); letter-spacing: .04em; }
.lang-switch > svg { width: 18px; height: 18px; }
.popover-anchor { position: relative; }
.popover {
  position: absolute; z-index: var(--z-modal);
  top: calc(100% + var(--sp-1));
  min-width: 210px;
  padding: var(--sp-1);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-3);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), visibility var(--dur-fast);
}
.popover.is-open { opacity: 1; visibility: visible; transform: none; }
.popover--end { inset-inline-end: 0; }
.lang-list { list-style: none; padding: 0; margin: 0; }
.lang-list__item {
  display: flex; align-items: center; gap: var(--sp-3);
  width: 100%; min-height: 48px; padding: 0 var(--sp-3);
  border-radius: var(--r-sm);
  text-align: start; font-size: var(--fs-md);
}
.lang-list__item:hover { background: var(--c-surface-2); }
.lang-list__code { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--c-text-muted); min-width: 2.2em; font-family: system-ui, sans-serif; letter-spacing: .04em; }
.lang-list__item[aria-checked="true"] { color: var(--c-primary-hover); font-weight: var(--fw-semibold); background: var(--c-primary-soft); }
.lang-list__item[aria-checked="true"]::after { content: "\2713"; margin-inline-start: auto; }

/* ---------- 34. Harici bağlantı (Google'da Değerlendir) ---------- */
.ext-icon { width: .9em; height: .9em; opacity: .8; }
.btn__sub { display: block; font-size: 10px; font-weight: var(--fw-medium); opacity: .85; letter-spacing: .02em; }
.btn__stack { display: flex; flex-direction: column; align-items: center; line-height: 1.1; min-width: 0; }

/* ---------- 35. Admin: büyük form, sekmeler, eksik göstergesi, yükleyici, çip ızgarası ---------- */
.modal--xl { max-width: 880px; height: min(88vh, 760px); height: min(88dvh, 760px); }
.modal--xl .modal__body { flex: 1; }
.form-tabs { padding: 0 var(--sp-6); gap: var(--sp-1); border-bottom: 1px solid var(--c-border); background: var(--c-surface); flex-shrink: 0; }
.form-tabs .tab {
  border: 0; border-radius: 0; background: transparent;
  min-height: 48px; padding: 0 var(--sp-3);
  box-shadow: inset 0 -3px 0 transparent; color: var(--c-text-muted);
}
.form-tabs .tab[aria-selected="true"], .form-tabs .tab.is-active { background: transparent; color: var(--c-primary-hover); box-shadow: inset 0 -3px 0 var(--c-primary); }
.form-tabs .tab.has-error { color: var(--c-alert-fg); }
/* Eksik/uyarı noktası: sekmede, tabloda, dil alanında (yanında daima metin/aria-label) */
.missing-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c-prep-accent); flex-shrink: 0; }
.missing-dot--alert { background: var(--c-alert-accent); }
.badge--missing { --b-bg: var(--c-prep-bg); --b-fg: var(--c-prep-fg); }
.badge--missing::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c-prep-accent); }

.form-section { padding: var(--sp-4) 0; border-bottom: 1px solid var(--c-border); }
.form-section:last-child { border-bottom: 0; }
.form-section__title { font-family: var(--font-serif); font-size: var(--fs-lg); font-weight: var(--fw-bold); margin-bottom: var(--sp-3); display: flex; align-items: center; gap: var(--sp-2); }
.form-section__hint { font-size: var(--fs-sm); color: var(--c-text-muted); margin: calc(-1 * var(--sp-2)) 0 var(--sp-3); }

/* Çeviri alanı: kaynak Türkçe metin + hedef dil rozeti */
.field__ref { font-size: var(--fs-xs); color: var(--c-text-muted); font-style: italic; }
.field__lang { display: inline-grid; place-items: center; min-width: 30px; height: 20px; padding: 0 6px; border-radius: var(--r-sm); background: var(--c-surface-2); font-size: 11px; font-weight: var(--fw-bold); letter-spacing: .04em; }
.field.is-missing .field__control { border-style: dashed; background: var(--c-prep-bg); }

/* Fotoğraf yükleyici */
.uploader { display: grid; grid-template-columns: 200px 1fr; gap: var(--sp-5); align-items: start; }
.uploader__preview { width: 200px; aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; background: var(--c-surface-2); position: relative; }
.uploader__preview > img { width: 100%; height: 100%; object-fit: cover; }
.uploader__preview.thumb--ph { --s: 200px; height: 200px; }
.uploader__actions { display: flex; flex-direction: column; gap: var(--sp-3); align-items: flex-start; }
.uploader__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.uploader.is-busy .uploader__preview::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 40px; height: 40px; border-radius: 50%;
  border: 4px solid var(--c-primary-soft); border-top-color: var(--c-primary); animation: spin .8s linear infinite;
}
.uploader.is-busy .uploader__preview > img { opacity: .4; }
.uploader.is-dragover .uploader__preview { box-shadow: 0 0 0 3px var(--c-primary); }

/* Checkbox çip ızgarası (diyet, alerjen, ürün atama) */
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--sp-2); }
.check-chip {
  position: relative;
  display: flex; align-items: center; gap: var(--sp-2);
  min-height: var(--tap-lg); padding: 0 var(--sp-3);
  border: 1.5px solid var(--c-border); border-radius: var(--r-md);
  background: var(--c-surface); cursor: pointer;
  font-weight: var(--fw-medium);
}
.check-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-chip__box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--c-border-strong); display: grid; place-items: center; flex-shrink: 0; }
.check-chip:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-soft); }
.check-chip:has(input:checked) .check-chip__box { background: var(--c-primary); border-color: var(--c-primary); }
.check-chip:has(input:checked) .check-chip__box::after { content: "\2713"; color: #fff; font-size: 14px; font-weight: var(--fw-bold); }
.check-chip:has(input:focus-visible) { box-shadow: var(--sh-focus); }

/* Canlı önizleme kutusu (indirim, ürün satırı) */
.preview-box { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--c-bg); border: 1px dashed var(--c-border-strong); }
.preview-box__label { font-size: var(--fs-xs); color: var(--c-text-muted); margin-bottom: var(--sp-2); }

/* ---------- 36. Masa seçimi (tek QR) ---------- */
.table-picker {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: var(--sp-4) var(--sp-4) calc(var(--sp-6) + var(--safe-bottom));
  max-width: 560px; margin-inline: auto;
}
.table-picker__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.table-picker__brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-2); margin: var(--sp-6) 0 var(--sp-5); }
.table-picker__title { font-family: var(--font-serif); font-size: var(--fs-2xl); font-weight: var(--fw-bold); line-height: 1.2; }
.table-picker__hint {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-size: var(--fs-sm); color: var(--c-text-muted); text-align: center;
}
.table-picker__hint > svg { width: 18px; height: 18px; flex-shrink: 0; }
.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.table-grid__btn {
  aspect-ratio: 1;
  min-height: 72px;
  display: grid; place-items: center;
  border-radius: var(--r-lg);
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  box-shadow: var(--sh-1);
  font-family: var(--font-serif);
  font-size: var(--fs-2xl); font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
  color: var(--c-espresso);
  touch-action: manipulation;
  transition: transform var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), border-color var(--dur-fast);
}
.table-grid__btn:hover { border-color: var(--c-primary); }
.table-grid__btn:active { transform: scale(.95); background: var(--c-primary-soft); }
.table-grid__btn:focus-visible { border-radius: var(--r-lg); }
.table-grid__btn[aria-pressed="true"], .table-grid__btn.is-current {
  background: var(--c-primary); border-color: var(--c-primary); color: #fff;
}
/* Masa adı sayı değilse (ör. "Bahçe 2") daha küçük punto */
.table-grid__btn--text { font-family: var(--font-sans); font-size: var(--fs-md); padding: var(--sp-2); text-align: center; line-height: 1.2; overflow-wrap: anywhere; }
.table-picker__footer { margin-top: auto; padding-top: var(--sp-6); text-align: center; }

/* Menü başlığında masa göstergesi: "Masa 5 · Değiştir" */
.table-chip {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: var(--tap-min);
  padding: 0 var(--sp-2) 0 var(--sp-3);
  border-radius: var(--r-pill);
  background: var(--c-primary-soft); color: var(--c-primary-hover);
  font-size: var(--fs-sm); font-weight: var(--fw-bold);
  white-space: nowrap;
}
.table-chip:focus-visible { border-radius: var(--r-pill); }
.table-chip__no { font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.table-chip__action {
  font-weight: var(--fw-semibold); text-decoration: underline; text-underline-offset: .2em;
  padding-inline-start: var(--sp-2); border-inline-start: 1px solid rgba(150, 58, 23, .3);
}

/* ---------- 37. Tek QR posteri ---------- */
.qr-poster {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: var(--sp-3);
  width: 100%; max-width: 420px;
  margin-inline: auto;
  padding: var(--sp-8) var(--sp-6);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-2);
  break-inside: avoid; page-break-inside: avoid;
}
.qr-poster__brand { font-family: var(--font-serif); font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: .2em; }
.qr-poster__tagline { font-size: var(--fs-xs); letter-spacing: .14em; color: var(--c-text-muted); }
.qr-poster__img { width: 240px; height: 240px; image-rendering: pixelated; margin: var(--sp-2) 0; }
.qr-poster__cta { font-family: var(--font-serif); font-size: var(--fs-xl); font-weight: var(--fw-bold); color: var(--c-primary); }
.qr-poster__langs { font-size: var(--fs-xs); color: var(--c-text-muted); }
.qr-poster__url { font-size: var(--fs-xs); color: var(--c-text-muted); font-variant-numeric: tabular-nums; word-break: break-all; }
/* Ekranda baskı düzeni seçimi önizlemesi */
.qr-sheet { display: grid; gap: var(--sp-5); justify-items: center; }
.qr-sheet--2 { grid-template-columns: repeat(2, 1fr); }
.qr-sheet--4 { grid-template-columns: repeat(2, 1fr); }
.qr-sheet--2 .qr-poster, .qr-sheet--4 .qr-poster { padding: var(--sp-5) var(--sp-4); gap: var(--sp-2); }
.qr-sheet--4 .qr-poster__img { width: 150px; height: 150px; }
.qr-sheet--4 .qr-poster__brand { font-size: var(--fs-lg); }
.qr-sheet--4 .qr-poster__cta { font-size: var(--fs-md); }

/* ---------- 38. Avatar (garson) ----------
   <span class="avatar avatar--c2" aria-hidden="true">A</span>  ya da içinde <img class="avatar__img" alt="">
   Renk: ada göre sabit hash → c1..c4 (hepsi beyaz harfle AA). */
.avatar {
  --av: 48px;
  position: relative;
  width: var(--av); height: var(--av);
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  display: inline-grid; place-items: center;
  background: var(--c-primary);
  color: #fff;
  font-family: var(--font-serif);
  font-size: calc(var(--av) * .42); font-weight: var(--fw-bold);
  line-height: 1;
  text-transform: none;
  user-select: none; -webkit-user-select: none;
}
.avatar__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar--c1 { background: #B5491F; }
.avatar--c2 { background: #963A17; }
.avatar--c3 { background: #A0522D; }
.avatar--c4 { background: #7A3E22; }
.avatar--xs { --av: 28px; }
.avatar--sm { --av: 36px; }
.avatar--lg { --av: 64px; }
.avatar--xl { --av: 96px; }
.avatar--ring { box-shadow: 0 0 0 3px var(--c-surface), 0 0 0 5px var(--c-primary); }
/* Genel "ilk müsait" simgesi: krem zemin + zil */
.avatar--any { background: var(--c-primary-soft); color: var(--c-primary-hover); }
.avatar--any > svg { width: 50%; height: 50%; }
/* Avatar + ad (tablet kartı, callbar) */
.person { display: inline-flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.person__name { font-weight: var(--fw-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 39. Garson seçimi (müşteri, Garson Çağır sheet'i) ---------- */
.waiter-pick { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-4); }
/* Ortak radyo-kart davranışı */
.waiter-any, .waiter-card { position: relative; cursor: pointer; }
.waiter-any input, .waiter-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
/* "İlk müsait garson": büyük, vurgulu, varsayılan */
.waiter-any {
  display: flex; align-items: center; gap: var(--sp-4);
  min-height: 84px; padding: var(--sp-4);
  border: 2px solid var(--c-border); border-radius: var(--r-lg);
  background: var(--c-surface);
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.waiter-any__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.waiter-any__title { font-family: var(--font-serif); font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.waiter-any__sub { font-size: var(--fs-sm); color: var(--c-text-muted); }
.waiter-any:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-soft); }
.waiter-any:has(input:focus-visible), .waiter-card:has(input:focus-visible) { box-shadow: var(--sh-focus); }
/* Seçili işareti (sağ üst / RTL'de sol üst) */
.waiter-any::after, .waiter-card::after {
  content: "\2713";
  position: absolute; top: var(--sp-2); inset-inline-end: var(--sp-2);
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-primary); color: #fff;
  font-size: 13px; font-weight: var(--fw-bold);
  opacity: 0; transform: scale(.6);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.waiter-any:has(input:checked)::after, .waiter-card:has(input:checked)::after { opacity: 1; transform: none; }

.waiter-pick__label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--c-text-muted); }
.waiter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
.waiter-card {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  min-height: 112px; padding: var(--sp-3) var(--sp-2);
  border: 1.5px solid var(--c-border); border-radius: var(--r-lg);
  background: var(--c-surface);
  text-align: center;
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.waiter-card__name { font-weight: var(--fw-semibold); font-size: var(--fs-sm); max-width: 100%; overflow-wrap: anywhere; line-height: 1.25; }
.waiter-card:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-soft); }
.waiter-card:has(input:checked) .avatar { box-shadow: 0 0 0 3px var(--c-surface), 0 0 0 5px var(--c-primary); }
.waiter-card:active { transform: scale(.97); }

/* Başarı durumu: sheet içeriği yerine */
.call-success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-3); padding: var(--sp-6) var(--sp-4) var(--sp-4); }
.call-success__title { font-family: var(--font-serif); font-size: var(--fs-2xl); font-weight: var(--fw-bold); }
.call-success__meta { color: var(--c-text-muted); }
.call-success .avatar { animation: bump var(--dur-slow) var(--ease); }
.call-success__badge {
  position: absolute; bottom: -2px; inset-inline-end: -2px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-success); color: #fff;
  box-shadow: 0 0 0 3px var(--c-surface);
}
.call-success__badge > svg { width: 18px; height: 18px; }
.call-success__avatar { position: relative; }

/* Hızlı işlem butonunda "Çağrıldı · Ayşe" mini avatar */
.btn .avatar--xs { --av: 22px; font-size: 11px; }

/* ---------- 40. Admin: Garsonlar ekranı ---------- */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-4); }
.staff-card {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-4) var(--sp-4);
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  border: 2px solid transparent;
  text-align: center;
  position: relative;
}
.staff-card.is-on-shift { border-color: var(--c-done-accent); }
.staff-card:not(.is-on-shift) .avatar { filter: grayscale(.7); opacity: .7; }
.staff-card__name { font-family: var(--font-serif); font-size: var(--fs-xl); font-weight: var(--fw-bold); overflow-wrap: anywhere; }
.staff-card__status { min-height: 24px; }
.staff-card__edit { position: absolute; top: var(--sp-2); inset-inline-end: var(--sp-2); }
/* Büyük vardiya anahtarı: kartın tam genişliği, 56px */
.toggle--lg {
  width: 100%; justify-content: space-between;
  min-height: var(--tap-lg); padding: 0 var(--sp-4);
  border-radius: var(--r-md); background: var(--c-surface-2);
  font-size: var(--fs-lg);
}
.toggle--lg .toggle__track { width: 64px; height: 36px; }
.toggle--lg .toggle__thumb { width: 30px; height: 30px; }
.toggle--lg .toggle__input:checked + .toggle__track .toggle__thumb { transform: translateX(28px); }
[dir="rtl"] .toggle--lg .toggle__input:checked + .toggle__track .toggle__thumb { transform: translateX(-28px); }
.toggle--lg:has(.toggle__input:checked) { background: var(--c-done-bg); color: var(--c-done-fg); }
.staff-section__title { display: flex; align-items: center; gap: var(--sp-2); font-family: var(--font-serif); font-size: var(--fs-lg); font-weight: var(--fw-bold); margin: var(--sp-6) 0 var(--sp-3); }
.staff-section__title:first-child { margin-top: 0; }
/* Yuvarlak fotoğraf önizlemeli yükleyici varyantı */
.uploader--round .uploader__preview { border-radius: 50%; width: 160px; }
.uploader--round { grid-template-columns: 160px 1fr; }

/* ---------- 41. Hesabı Kapat (tablet) ---------- */
/* Hesap dökümü */
.bill { display: flex; flex-direction: column; gap: var(--sp-3); }
.bill__head { display: flex; align-items: baseline; gap: var(--sp-3); }
.bill__table { font-family: var(--font-serif); font-size: var(--fs-3xl); font-weight: var(--fw-bold); line-height: 1; font-variant-numeric: tabular-nums; }
.bill__meta { color: var(--c-text-muted); font-size: var(--fs-sm); }
.bill__orders { max-height: 32vh; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 0 var(--sp-4); background: var(--c-bg); }
.bill__order { padding: var(--sp-3) 0; border-bottom: 1px dashed var(--c-border); }
.bill__order:last-child { border-bottom: 0; }
.bill__order-head { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--c-text-muted); font-weight: var(--fw-semibold); margin-bottom: var(--sp-1); }
.bill__line { display: grid; grid-template-columns: 2.5ch 1fr auto; gap: var(--sp-2); font-size: var(--fs-sm); padding: 2px 0; }
.bill__line-qty { font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.bill__line-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bill__line .item-options { grid-column: 2 / -1; font-size: var(--fs-xs); }
.bill__discount { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--c-done-fg); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
.bill__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--sp-2); border-top: 2px solid var(--c-espresso); }
.bill__total-label { font-size: var(--fs-lg); font-weight: var(--fw-semibold); }
.bill__total-value { font-family: var(--font-serif); font-size: var(--fs-3xl); font-weight: var(--fw-bold); color: var(--c-primary-hover); font-variant-numeric: tabular-nums; }

/* Ödeme yöntemi: 3 büyük radyo-kart
   <div class="pay-methods" role="radiogroup"><label class="pay-method"><input type="radio" name="method" value="cash">
   [banknote svg]<span class="pay-method__label">Nakit</span></label>…</div> */
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); border: 0; padding: 0; margin: 0; min-width: 0; }
.pay-method {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 104px; padding: var(--sp-3);
  border: 2px solid var(--c-border); border-radius: var(--r-lg);
  background: var(--c-surface); cursor: pointer;
  font-size: var(--fs-lg); font-weight: var(--fw-semibold);
  touch-action: manipulation;
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.pay-method input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pay-method > svg { width: 36px; height: 36px; color: var(--c-coffee); }
.pay-method:active { transform: scale(.98); }
.pay-method:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-soft); color: var(--c-primary-hover); box-shadow: inset 0 0 0 1px var(--c-primary); }
.pay-method:has(input:checked) > svg { color: var(--c-primary); }
.pay-method:has(input:focus-visible) { box-shadow: var(--sh-focus); }
.pay-method::after {
  content: "\2713"; position: absolute; top: var(--sp-2); inset-inline-end: var(--sp-2);
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c-primary); color: #fff; font-size: 13px; font-weight: var(--fw-bold);
  opacity: 0;
}
.pay-method:has(input:checked)::after { opacity: 1; }
.pay-methods.is-invalid .pay-method { border-color: var(--c-alert-accent); }

/* Bölünmüş ödeme */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); padding: var(--sp-4); border-radius: var(--r-md); background: var(--c-surface-2); }
.split .field { margin-bottom: 0; }
.split .field__control { font-size: var(--fs-xl); font-weight: var(--fw-semibold); min-height: var(--tap-lg); font-variant-numeric: tabular-nums; }
.split .field.is-auto .field__control { background: var(--c-bg); border-style: dashed; }
.split__status { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--sp-2); font-weight: var(--fw-semibold); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.split__status > svg { width: 18px; height: 18px; }
.split__status--ok { color: var(--c-done-fg); }
.split__status--error { color: var(--c-alert-fg); }

/* Kapatılamaz nedeni (buton yanında) */
.blocker { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--c-alert-fg); }
.blocker > svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Ödeme yöntemi rozetleri (ikon + metin) */
.badge--cash { --b-bg: var(--c-cash-bg); --b-fg: var(--c-cash-fg); }
.badge--card { --b-bg: var(--c-card-bg); --b-fg: var(--c-card-fg); }
.badge--split { --b-bg: var(--c-idle-bg); --b-fg: var(--c-idle-fg); }
.badge--edited { --b-bg: transparent; --b-fg: var(--c-text-muted); border: 1px dashed var(--c-border-strong); font-weight: var(--fw-medium); }

/* ---------- 42. Raporlar ---------- */
.report-toolbar { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.date-nav { display: inline-flex; align-items: center; gap: var(--sp-1); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: var(--sp-1); }
.date-nav__btn { min-width: var(--tap-lg); min-height: var(--tap-lg); }
.date-nav__label {
  position: relative;
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: var(--tap-lg); padding: 0 var(--sp-4);
  border-radius: var(--r-sm);
  font-weight: var(--fw-semibold); font-size: var(--fs-lg); white-space: nowrap;
  cursor: pointer;
}
.date-nav__label:hover { background: var(--c-surface-2); }
.date-nav__label > svg { width: 20px; height: 20px; color: var(--c-coffee); }
/* Görünmez native tarih input'u etiketin üstüne serilir → dokununca takvim açılır */
.date-nav__input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.date-nav__label:has(.date-nav__input:focus-visible) { box-shadow: var(--sh-focus); }
.date-range { display: flex; align-items: flex-end; gap: var(--sp-3); flex-wrap: wrap; }
.date-range .field { margin-bottom: 0; }
.report-meta { font-size: var(--fs-sm); color: var(--c-text-muted); }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); margin-bottom: var(--sp-5); }
.stat {
  display: flex; flex-direction: column; gap: var(--sp-1);
  padding: var(--sp-4) var(--sp-5);
  background: var(--c-surface); border-radius: var(--r-lg); box-shadow: var(--sh-1);
  min-width: 0;
}
.stat__label { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--c-text-muted); }
.stat__label > svg { width: 18px; height: 18px; }
.stat__value { font-family: var(--font-serif); font-size: var(--fs-2xl); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; line-height: 1.15; overflow-wrap: anywhere; }
.stat__sub { font-size: var(--fs-xs); color: var(--c-text-muted); font-variant-numeric: tabular-nums; }
.stat--primary { grid-column: span 2; background: var(--c-espresso); color: var(--c-text-inverse); }
.stat--primary .stat__label, .stat--primary .stat__sub { color: #E2D5C3; }
.stat--primary .stat__value { font-size: var(--fs-4xl); color: #fff; }

/* Nakit / kart oranı: grafik kütüphanesi yok, iki segmentli bar */
.ratio { display: flex; flex-direction: column; gap: var(--sp-2); }
.ratio-bar { display: flex; height: 20px; border-radius: var(--r-pill); overflow: hidden; background: var(--c-surface-2); }
.ratio-bar__seg { height: 100%; width: var(--pct, 0%); min-width: 0; }
.ratio-bar__seg--cash { background: var(--c-cash-accent); }
.ratio-bar__seg--card {
  background: var(--c-card-accent);
  /* renge ek olarak desen: gri tonlamada/renk körlüğünde de ayrışsın */
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .28) 0 4px, transparent 4px 8px);
}
.ratio-bar__seg + .ratio-bar__seg { box-shadow: inset 2px 0 0 var(--c-surface); }
.ratio-legend { display: flex; gap: var(--sp-5); flex-wrap: wrap; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.ratio-legend__item { display: inline-flex; align-items: center; gap: var(--sp-2); }
.ratio-legend__swatch { width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; }
.ratio-legend__swatch--cash { background: var(--c-cash-accent); }
.ratio-legend__swatch--card { background: var(--c-card-accent); background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .35) 0 3px, transparent 3px 6px); }

.report-grid { display: grid; grid-template-columns: 3fr 2fr; gap: var(--sp-5); align-items: start; }
.report-card { background: var(--c-surface); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; }
.report-card__head { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--c-border); }
.report-card__title { font-family: var(--font-serif); font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.report-card .table { box-shadow: none; border-radius: 0; }
.table--compact th, .table--compact td { padding: var(--sp-2) var(--sp-4); }
.table tfoot td { font-weight: var(--fw-bold); border-top: 2px solid var(--c-border-strong); background: var(--c-surface-2); }
.rank { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c-surface-2); font-size: var(--fs-xs); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.rank--1 { background: var(--c-caramel); color: var(--c-espresso); }
/* Ürün ciro payı için satır içi mini bar */
.mini-bar { height: 6px; border-radius: var(--r-pill); background: var(--c-surface-2); overflow: hidden; margin-top: 4px; }
.mini-bar__fill { height: 100%; width: var(--pct, 0%); background: var(--c-primary); }

/* ---------- 43. Fiş (80mm) ---------- */
.receipt {
  width: 72mm; max-width: 100%;
  margin-inline: auto;
  padding: 4mm 0;
  font-family: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", "Courier New", monospace;
  font-size: 10pt; line-height: 1.35; color: #000; background: #fff;
}
.receipt__head { text-align: center; margin-bottom: 3mm; }
.receipt__brand { font-family: var(--font-serif); font-weight: var(--fw-bold); font-size: 14pt; letter-spacing: .2em; }
.receipt__row { display: flex; justify-content: space-between; gap: 2mm; }
.receipt__row > :last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.receipt__sep { border: 0; border-top: 1px dashed #000; margin: 2mm 0; }
.receipt__total { font-weight: var(--fw-bold); font-size: 12pt; }
.receipt__foot { text-align: center; margin-top: 3mm; font-size: 9pt; }

/* ---------- 44. Personel siparişi: ürün seçici (tablet) ---------- */
.badge--staff { --b-bg: var(--c-espresso); --b-fg: var(--c-text-inverse); }
.badge--staff > svg { width: 1em; height: 1em; }
.badge--added { --b-bg: var(--c-new-bg); --b-fg: var(--c-new-fg); }

/* Tam ekran modal */
.modal--full {
  width: calc(100% - 2 * var(--sp-4)); max-width: none;
  height: calc(100vh - 2 * var(--sp-4)); height: calc(100dvh - 2 * var(--sp-4)); max-height: none;
}
.picker { flex: 1; min-height: 0; display: grid; grid-template-columns: 200px minmax(0, 1fr) 340px; border-top: 1px solid var(--c-border); }
.picker__cats { overflow-y: auto; border-inline-end: 1px solid var(--c-border); background: var(--c-bg); padding: var(--sp-2) 0; }
.picker__cats .list__item { min-height: var(--tap-lg); padding-inline: var(--sp-4); font-weight: var(--fw-medium); }
.picker__main { display: flex; flex-direction: column; min-height: 0; }
.picker__search { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--c-border); }
.picker__search .field { margin-bottom: 0; }
.picker__search .field__control { min-height: var(--tap-lg); font-size: var(--fs-lg); }
.picker__grid {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-3);
  align-content: start;
  padding: var(--sp-4);
}
.picker__group-title { grid-column: 1 / -1; margin: var(--sp-2) 0 0; }
.pick-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: var(--sp-2);
  min-height: 96px; padding: var(--sp-3);
  border: 1.5px solid var(--c-border); border-radius: var(--r-md);
  background: var(--c-surface); box-shadow: var(--sh-1);
  text-align: start;
  touch-action: manipulation;
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.pick-btn:active { transform: scale(.97); background: var(--c-primary-soft); }
.pick-btn:focus-visible { border-radius: var(--r-md); }
.pick-btn__name { font-weight: var(--fw-semibold); line-height: 1.25; overflow-wrap: anywhere; }
.pick-btn__foot { display: flex; align-items: center; gap: var(--sp-2); width: 100%; flex-wrap: wrap; }
.pick-btn__price { color: var(--c-primary); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.pick-btn__opts { font-size: var(--fs-xs); color: var(--c-text-muted); margin-inline-start: auto; display: inline-flex; align-items: center; gap: 2px; }
.pick-btn__opts > svg { width: 14px; height: 14px; }
.pick-btn__qty {
  position: absolute; top: -8px; inset-inline-end: -8px;
  min-width: 28px; height: 28px; padding: 0 8px; border-radius: var(--r-pill);
  display: inline-grid; place-items: center;
  background: var(--c-primary); color: #fff; font-weight: var(--fw-bold); font-size: var(--fs-sm);
  box-shadow: 0 0 0 3px var(--c-surface);
}
.pick-btn.is-in-cart { border-color: var(--c-primary); }
.pick-btn[disabled], .pick-btn.is-soldout { background: var(--c-surface-2); box-shadow: none; color: var(--c-text-muted); cursor: not-allowed; }
.pick-btn[disabled] .pick-btn__price { color: var(--c-text-muted); }

/* Sağ: oluşan sipariş özeti */
.picker__summary { display: flex; flex-direction: column; min-height: 0; border-inline-start: 1px solid var(--c-border); background: var(--c-surface); }
.picker__summary-head { padding: var(--sp-4); border-bottom: 1px solid var(--c-border); display: flex; flex-direction: column; gap: var(--sp-1); }
.picker__target { font-family: var(--font-serif); font-size: var(--fs-xl); font-weight: var(--fw-bold); }
.picker__lines { flex: 1; overflow-y: auto; list-style: none; padding: 0 var(--sp-4); margin: 0; }
.picker__line { padding: var(--sp-3) 0; border-bottom: 1px solid var(--c-border); display: flex; flex-direction: column; gap: var(--sp-2); }
.picker__line:last-child { border-bottom: 0; }
.picker__line-head { display: flex; gap: var(--sp-2); align-items: baseline; }
.picker__line-name { flex: 1; min-width: 0; font-weight: var(--fw-semibold); overflow-wrap: anywhere; }
.picker__line-amount { font-variant-numeric: tabular-nums; font-weight: var(--fw-semibold); white-space: nowrap; }
.picker__line-controls { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.picker__line.is-flash { animation: bump var(--dur-slow) var(--ease); background: var(--c-primary-soft); }
.picker__footer { padding: var(--sp-4); border-top: 1px solid var(--c-border); display: flex; flex-direction: column; gap: var(--sp-3); background: var(--c-surface); }
.picker__total { display: flex; justify-content: space-between; align-items: baseline; font-weight: var(--fw-semibold); font-size: var(--fs-lg); }
.picker__total-value { font-family: var(--font-serif); font-size: var(--fs-2xl); color: var(--c-primary-hover); font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) {
  .picker { grid-template-columns: 170px minmax(0, 1fr) 300px; }
}

/* Seçenek paneli: müşteri detay sheet'inin tablet uyarlaması (modal--lg içinde) */
.optpanel { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5) var(--sp-6); align-items: start; }
.optpanel .optgroup--wide, .optpanel__full { grid-column: 1 / -1; }
.optpanel .option, .optpanel .segment__label { min-height: var(--tap-lg); font-size: var(--fs-md); }
.optpanel__head { display: flex; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-4); }

/* Siparişe sonradan eklenen kalemler (tablet kartı, müşteri Siparişlerim) */
.line-added {
  position: relative;
  background: var(--c-new-bg);
  box-shadow: inset 4px 0 0 var(--c-new-accent);
  border-radius: var(--r-sm);
  padding-inline-start: var(--sp-2);
}
[dir="rtl"] .line-added { box-shadow: inset -4px 0 0 var(--c-new-accent); }
.line-added.is-fresh { animation: pulse-new 1.2s var(--ease) 2; }

/* ---------- 22. Vurgu animasyonları ---------- */
.is-new { position: relative; box-shadow: 0 0 0 3px var(--c-new-accent), var(--sh-2); animation: slide-in var(--dur-slow) var(--ease), pulse-new 1.2s var(--ease) 3; }
.is-attention { animation: pulse-alert 2s ease-in-out infinite; }
.shake { animation: shake .4s var(--ease); }
.bump { animation: bump var(--dur-slow) var(--ease); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}
@keyframes slide-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes pulse-new {
  0%   { box-shadow: 0 0 0 3px var(--c-new-accent), 0 0 0 3px rgba(46, 107, 209, .55); }
  100% { box-shadow: 0 0 0 3px var(--c-new-accent), 0 0 0 22px rgba(46, 107, 209, 0); }
}
@keyframes pulse-alert {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 45, 32, .45); }
  50%      { box-shadow: 0 0 0 10px rgba(217, 45, 32, 0); }
}
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* ---------- 23. Hareket azaltma ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .is-new { box-shadow: 0 0 0 4px var(--c-new-accent), var(--sh-2); }
  .line-added.is-fresh { outline: 2px solid var(--c-new-accent); }
  .is-attention { outline: 3px solid var(--c-alert-accent); outline-offset: 2px; }
  .skeleton { animation: none; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- 24. Yüksek kontrast (Windows) ---------- */
@media (forced-colors: active) {
  .btn, .tab, .card, .badge, .toggle__track, .keypad__key { border: 1px solid CanvasText; }
  :focus-visible { outline: 3px solid Highlight; }
}

/* ---------- 25. QR kartları & yazdırma ---------- */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-5); }
.qr-card {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  padding: var(--sp-6) var(--sp-4);
  background: #fff;
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--r-lg);
  text-align: center;
  break-inside: avoid; page-break-inside: avoid;
}
.qr-card__brand { font-family: var(--font-serif); font-weight: var(--fw-bold); letter-spacing: .2em; font-size: var(--fs-lg); }
.qr-card__img { width: 180px; height: 180px; image-rendering: pixelated; }
.qr-card__table { font-family: var(--font-serif); font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: .08em; }
.qr-card__hint { font-size: var(--fs-sm); color: var(--c-text-muted); }

.print-only, .print-receipt { display: none !important; }

@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff !important; color: #000 !important; font-size: 11pt; }
  .no-print, .popover, .table-picker__top, .sidenav, .callbar, .toast-region, .overlay, .modal, .sheet, .btn, .bottom-dock { display: none !important; }
  .print-only { display: block !important; }
  * { box-shadow: none !important; animation: none !important; }
  a { color: #000; text-decoration: none; }
  .qr-grid { grid-template-columns: repeat(2, 1fr); gap: 8mm; }
  .qr-card { border: 1px dashed #777; border-radius: 4mm; padding: 8mm 6mm; height: 85mm; justify-content: center; }
  .qr-card__img { width: 48mm; height: 48mm; }
  .qr-card__hint { color: #333; }
  .brand-mark { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* v2 tek QR posteri. Kapsayıcıya .qr-sheet--1 (A4'e 1 büyük), --2 (A5 x2), --4 (A6 x4) */
  .qr-sheet { display: grid; gap: 0; justify-items: stretch; align-items: stretch; width: 186mm; margin: 0 auto; }
  .qr-poster { max-width: none; border: 1px dashed #888; border-radius: 0; box-shadow: none; justify-content: center; }
  .qr-poster__cta { color: #000; }
  .qr-poster__tagline, .qr-poster__langs, .qr-poster__url { color: #333; }
  .qr-sheet--1 { grid-template-columns: 1fr; }
  .qr-sheet--1 .qr-poster { height: 268mm; border: 0; gap: 8mm; }
  .qr-sheet--1 .qr-poster__brand { font-size: 36pt; }
  .qr-sheet--1 .qr-poster__img { width: 120mm; height: 120mm; }
  .qr-sheet--1 .qr-poster__cta { font-size: 24pt; }
  .qr-sheet--2 { grid-template-columns: 1fr; }
  .qr-sheet--2 .qr-poster { height: 134mm; gap: 4mm; }
  .qr-sheet--2 .qr-poster__img { width: 75mm; height: 75mm; }
  .qr-sheet--4 { grid-template-columns: 1fr 1fr; }
  .qr-sheet--4 .qr-poster { height: 134mm; gap: 3mm; padding: 6mm; }
  .qr-sheet--4 .qr-poster__img { width: 60mm; height: 60mm; }

  /* v2 Raporlar: A4 (varsayılan). Ekran kartları sade kenarlıklı kutulara döner. */
  .report-toolbar .date-nav__btn, .report-actions { display: none !important; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); gap: 3mm; }
  .stat { border: 1px solid #999; padding: 3mm; break-inside: avoid; }
  .stat--primary { background: #fff !important; color: #000 !important; }
  .stat--primary .stat__label, .stat--primary .stat__sub, .stat--primary .stat__value { color: #000 !important; }
  .stat__value { font-size: 14pt !important; }
  .report-grid { grid-template-columns: 1fr; gap: 5mm; }
  .report-card { border: 1px solid #999; break-inside: avoid; }
  .table { font-size: 9pt; }
  .table thead { display: table-header-group; }
  .table tr { break-inside: avoid; }
  .ratio-bar, .ratio-legend__swatch, .badge, .rank--1 { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* 80mm fiş: JS yazdırmadan önce body'ye .is-printing-receipt ekler, sonra kaldırır */
  body.is-printing-receipt > :not(.print-receipt) { display: none !important; }
  body.is-printing-receipt .print-receipt { display: block !important; page: receipt; }
}
@page receipt { size: 80mm auto; margin: 3mm 4mm; }
