/* Renkler ve yazı: Obsidian/tasarim.md. Fontlar kendi sunucumuzdan (Google'a istek yok, KVKK); lisans: wwwroot/fonts/OFL-*.txt.
   Türkçe: ı "latin"de, ğ ş İ "latin-ext"te; tarayıcı yalnızca gereken dosyayı indirir (unicode-range). */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/fraunces-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/fraunces-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #F7F5EF; --surface: #FFFFFF; --soft: #FBFAF6; --line: #E6E1D6; --line2: #EFEBE2;
  --ink: #1D211C; --ink2: #545A50;
  --green: #2E6B3E; --green-d: #22522F; --green-s: #E2EFD9;
  --amber: #C98A1B; --amber-s: #FBEBD0; --amber-d: #7A4E0E;
  --red: #A63A2B; --red-s: #F5DEDA;
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
}

h1 { font-family: var(--font-head); font-weight: 600; color: var(--green-d); }

.page { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }
.muted { color: var(--ink2); }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1100px; margin: 0 auto; padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.topbar a { color: var(--green-d); text-decoration: none; font-weight: 600; }
.topbar form { margin: 0; }
.brand { font-family: var(--font-head); font-size: 1.15rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.narrow { max-width: 420px; margin: 24px auto; }

label { display: block; font-weight: 600; margin: 16px 0 6px; }
input {
  width: 100%; min-height: 44px; padding: 10px 12px; font: inherit;
  border: 1px solid var(--line); border-radius: 12px; background: var(--soft);
}
.btn {
  display: block; width: 100%; min-height: 44px; margin-top: 16px;
  border: 0; border-radius: 12px; background: var(--green); color: #fff;
  font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--green-d); }
/* Dokunma hedefi en az 44px (Obsidian/tasarim.md) — metin gibi görünen düğmeler dahil. */
.link-btn { background: none; border: 0; padding: 0 4px; min-height: 44px; display: inline-flex; align-items: center; color: var(--green-d); font: inherit; font-weight: 600; cursor: pointer; }
.secondary-action { margin-top: 12px; text-align: center; }

select {
  width: 100%; min-height: 44px; padding: 10px 12px; font: inherit;
  border: 1px solid var(--line); border-radius: 12px; background: var(--soft);
}
.btn.inline { display: inline-flex; align-items: center; justify-content: center; width: auto; margin: 0; padding: 0 16px; text-decoration: none; }
.btn.danger, .link-btn.danger { background: var(--red); }
.link-btn.danger { background: none; color: var(--red); }
.small { font-size: .875rem; }

/* Yönetim paneli */
/* Giriş ekranı: müşteri / satıcı / yönetici düğmeleri (her biri kendi giriş adresine gider). */
.login-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.login-kinds .btn { min-height: 44px; padding: 0 8px; }

/* Satıcı ve yönetim panellerinin üst bandı (Obsidian/tasarim.md, "Panel çerçeveleri"): tema müşteri sitesiyle aynı;
   ayrımı etiket ve bandın içindeki menü yapar. */
.panel-head { max-width: 1100px; margin: 0 auto; border-bottom: 1px solid var(--line); }
.panel-head .topbar { border-bottom: 0; padding-bottom: 4px; }
.brand-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.panel-tag { background: var(--green-d); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.panel-nav { display: flex; flex-wrap: wrap; gap: 0 4px; padding: 0 6px; }
.panel-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--ink2); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; }
.panel-nav a.on { color: var(--green-d); border-color: var(--green); }
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0; }
.inline-form select, .inline-form input { width: auto; flex: 1 1 220px; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin: 16px 0; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.table th { background: var(--soft); font-weight: 600; }
.table form { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 16px 0; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 6px 0; border-bottom: 1px solid var(--line2); }
.link-list li { margin: 8px 0; }
@media (max-width: 600px) { .table { display: block; overflow-x: auto; } }

/* Satıcı paneli (M5) */
textarea { width: 100%; padding: 10px 12px; font: inherit; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
fieldset { border: 1px solid var(--line2); border-radius: 12px; padding: 12px; margin: 16px 0; }
legend { font-weight: 600; padding: 0 6px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input[type=checkbox] { width: 22px; height: 22px; min-height: 0; }
.grid-2.tight { gap: 12px; margin: 0; }
.row-list { display: grid; gap: 8px; margin-bottom: 8px; }
.row-item.two { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.group { border-top: 1px solid var(--line2); padding-top: 12px; margin-top: 12px; display: grid; gap: 8px; }
.grow { flex: 1; }
.btn.secondary { background: var(--surface); color: var(--green-d); border: 1px solid var(--line); }
.product-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.product-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; flex-wrap: wrap; }
.product-row img, .no-image { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--line2); display: block; }
.row-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row-actions form { margin: 0; }
.row-actions .link-btn { min-height: 44px; }
.tag { display: inline-block; background: var(--amber-s); color: var(--amber-d); border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 600; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 12px; }
.image-grid figure { margin: 0; }
.image-grid img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.image-grid figcaption { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.image-grid form { margin: 0; }
.hours-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.hours-row input[type=time] { width: 100%; }
.delivery-row { display: grid; grid-template-columns: 2fr 1.3fr 1fr 1.5fr auto; gap: 8px; align-items: center; }
.rounded { border-radius: 16px; }
.cover-preview { width: 100%; max-height: 160px; object-fit: cover; border-radius: 16px; }
@media (max-width: 700px) {
  .delivery-row { grid-template-columns: 1fr 1fr; padding-bottom: 12px; border-bottom: 1px solid var(--line2); }
  .delivery-row input[name$=".Ad"] { grid-column: 1 / -1; }
}

/* Müşteri sitesi (M6) — Obsidian/tasarim.md: kart 16px, büyük kart 20–24px, buton 12–14px, rozet 999px, dokunma ≥44px */
h1, h2, .h2 { font-family: var(--font-head); font-weight: 600; color: var(--green-d); }
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.15; margin: 8px 0; }
h2, .h2 { font-size: 1.5rem; margin: 0; }
.lead { font-size: 1.05rem; }
.xs { font-size: .8rem; }
.stack { display: flex; flex-direction: column; gap: 16px; margin: 24px 0; }
.stack.tight { gap: 6px; margin: 0; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.link { color: var(--green-d); font-weight: 600; text-decoration: none; }
.topnav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 16px; align-items: center; }
.topnav a { color: var(--green-d); font-weight: 600; text-decoration: none; }
.hero { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 24px; display: grid; gap: 12px; }
.hero > .tag { justify-self: start; }
.steps { display: flex; flex-wrap: wrap; gap: 12px 20px; font-weight: 500; }
.num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--green); color: #fff; font-style: normal; font-size: .8rem; margin-right: 6px; }
.sec-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 8px 16px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.cat-tile { display: grid; gap: 4px; padding: 16px; border-radius: 16px; text-decoration: none; min-height: 96px; }
.cat-tile span { font-size: .85rem; opacity: .85; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.shop-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); }
.shop-card img, .shop-band { width: 100%; height: 110px; object-fit: cover; display: grid; place-items: center; font-family: var(--font-head); font-size: 2rem; }
.shop-card-body { display: grid; gap: 4px; padding: 12px; }
.shop-card .name { font-weight: 700; }
.search-form { display: flex; gap: 8px; margin: 24px 0 0; }
.search-form input { flex: 1; }
.sort-form { margin: 0 0 12px; }
.sort-form select { width: auto; min-width: 150px; }
.hint { background: var(--soft); border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px; font-size: .9rem; margin: 0; }
.sgroup { display: grid; gap: 12px; }
.sgroup-h { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; }
.sgroup-name { font-size: 1.1rem; font-weight: 700; color: var(--ink); text-decoration: none; margin-right: 6px; }
.avatar-sm { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #fff; font-weight: 700; flex: none; }
.tag.white { background: #fff; }
.muted-tag { background: var(--line2); color: var(--ink2); }
.cpill { background: #fff; border-radius: 999px; padding: 8px 12px; font-size: .85rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.pcard-img { position: relative; display: block; aspect-ratio: 1; background: var(--type-bg, var(--line2)); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.placeholder { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--font-head); font-size: 2rem; color: var(--type-fg, var(--ink2)); }
.badge { position: absolute; left: 8px; top: 8px; background: #fff; border-radius: 999px; padding: 2px 10px; font-size: .75rem; font-weight: 700; }
.pcard-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; flex: 1; }
.seller { font-size: .8rem; font-weight: 600; color: var(--ink2); text-decoration: none; }
.pname { font-weight: 600; color: var(--ink); text-decoration: none; }
.stock { font-size: .8rem; font-weight: 600; color: var(--amber-d); }
.pcard-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.pcard-foot form { margin: 0; }
.price { font-weight: 700; }
.price.big, .big { font-size: 1.5rem; }
.unit { font-weight: 400; color: var(--ink2); font-size: .85rem; }
.addbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--green); background: var(--surface); color: var(--green-d); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.addbtn.in { background: var(--green-s); }
.empty { display: grid; justify-items: start; gap: 8px; background: var(--surface); border: 1px dashed var(--line); border-radius: 16px; padding: 24px; }
.store-head { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; margin: 12px 0; }
.cover { width: 100%; height: 180px; object-fit: cover; display: block; }
.cover-band { height: 96px; }
.store-id { display: flex; gap: 16px; align-items: center; padding: 16px; flex-wrap: wrap; }
.avatar { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 16px; font-family: var(--font-head); font-size: 1.6rem; object-fit: cover; flex: none; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink2); }
.facts .open { color: var(--green-d); font-weight: 600; }
.facts .closed { color: var(--amber-d); font-weight: 600; }
/* flex-wrap: dar ekranda sekmeler alt satıra geçer (satıcı siparişlerinde 6 sekme 390px'e sığmıyordu). */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin: 16px 0; }
.tab { padding: 12px 14px; min-height: 44px; text-decoration: none; color: var(--ink2); font-weight: 600; border-bottom: 3px solid transparent; }
.tab.on { color: var(--green-d); border-color: var(--green); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.panel-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: grid; gap: 10px; }
.panel-card.sticky { position: sticky; top: 12px; }
.panel-title { font-size: 1.1rem; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.kv.invalid, .line.invalid { opacity: .6; }
.hr { height: 1px; background: var(--line2); margin: 6px 0; }
.minbar { height: 8px; border-radius: 999px; background: var(--amber-s); overflow: hidden; }
.minbar i { display: block; height: 100%; background: var(--amber); }
.warn { color: var(--amber-d); font-weight: 600; font-size: .9rem; }
.warn-notice { background: var(--amber-s); color: var(--amber-d); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 999px; margin-right: 6px; }
.ok { color: var(--green-d); }
.box { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 12px 0; }
.pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin: 12px 0; }
.main-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 20px; display: grid; place-items: center; font-family: var(--font-head); font-size: 3rem; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.thumbs img { border-radius: 12px; object-fit: cover; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.opt { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 500; }
.opt input { width: 18px; height: 18px; min-height: 0; accent-color: var(--green); }
.add-row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.add-row .btn { margin-top: 0; }
.qty input { width: 90px; }
.info-box { display: grid; gap: 4px; background: var(--soft); border: 1px solid var(--line2); border-radius: 16px; padding: 12px 14px; }
.cart { display: grid; gap: 10px; }
.cart-h { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.line { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line2); }
.line a { color: var(--ink); }
.line form { margin: 0; }
.lt { min-width: 90px; text-align: right; }
.stepper { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 0 4px; }
.stepper form { margin: 0; }
.stepper button { min-width: 36px; min-height: 40px; border: 0; background: none; font: inherit; font-size: 1.2rem; cursor: pointer; color: var(--green-d); }
.cart-f { display: grid; gap: 10px; border-top: 1px solid var(--line2); padding-top: 10px; }
.cart-f form { margin: 0; }
.label { font-weight: 600; font-size: .9rem; }
.dopts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.dopt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.dopt.on { border-color: var(--green); background: var(--green-s); }
.dopt input { width: 18px; height: 18px; min-height: 0; margin-top: 3px; accent-color: var(--green); }
.cart-total { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.cart-total > div { display: grid; }
.btn:disabled { background: var(--line); color: var(--ink2); cursor: not-allowed; }
@media (max-width: 860px) {
  .two, .pd { grid-template-columns: 1fr; }
  .panel-card.sticky { position: static; }
}
@media (max-width: 420px) {
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .addbtn { padding: 0 10px; }
  .sgroup-h .cpill { width: 100%; text-align: center; }
}

/* Sipariş (M7) — durum renkleri: Obsidian/tasarim.md (demo STATUS) */
.status-received { background: var(--amber-s); color: var(--amber-d); }
.status-preparing { background: #DDE9F1; color: #25506E; }
.status-ontheway, .status-readyforpickup { background: var(--green-s); color: var(--green-d); }
.status-delivered { background: #ECEAE4; color: var(--ink2); }
.status-cancelled { background: var(--red-s); color: #8E2F22; }
.timeline { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 10px; }
.timeline li { display: flex; gap: 10px; align-items: center; color: var(--ink2); }
.timeline li.done { color: var(--ink); font-weight: 600; }
.tdot { width: 14px; height: 14px; border-radius: 999px; border: 2px solid var(--line); flex: none; }
.timeline li.done .tdot { background: var(--green); border-color: var(--green); }

.error { color: var(--red); margin-top: 8px; }
.error ul { margin: 0; padding-left: 18px; }
.notice { background: var(--green-s); color: var(--green-d); padding: 10px 12px; border-radius: 12px; }
.dev-banner { background: var(--amber-s); color: var(--amber-d); padding: 10px 12px; border-radius: 12px; }

/* Paylaş sayfası ve yazdırılabilir QR kart (M8). Baskıda ölçüler mm; ekranda önizleme dar ekrana sığar. */
.qr-preview { max-width: 240px; margin: 16px 0; }
.qr-preview svg, .qr-card-code svg { display: block; width: 100%; height: auto; }
.share-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.print-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; max-width: calc(210mm + 32px); margin: 0 auto; padding: 12px 16px; }
.print-toolbar a { color: var(--green-d); font-weight: 600; }
.print-toolbar p { flex-basis: 100%; margin: 0; }
.sheet-a6, .sheet-a4 { margin: 0 auto 24px; padding: 0 16px; }
.sheet-a6 { max-width: calc(105mm + 32px); }
.sheet-a4 { max-width: calc(210mm + 32px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(105mm, 100%), 1fr)); }
.qr-card {
  aspect-ratio: 105 / 148; background: #fff; border: 1px dashed var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.5mm;
  padding: 8mm 7mm; text-align: center; overflow: hidden;
}
.qr-card p { margin: 0; }
.qr-card-market { color: var(--green); font-weight: 600; font-size: 9pt; letter-spacing: .06em; text-transform: uppercase; }
.qr-card-name { margin: 0; font-size: 20pt; line-height: 1.15; color: var(--ink); overflow-wrap: anywhere; }
.qr-card-code { width: 62mm; max-width: 85%; }
.qr-card-url { font-weight: 600; font-size: 10pt; overflow-wrap: anywhere; }
.qr-card-tagline { font-size: 11pt; color: var(--green-d); }

@media print {
  .print-page { background: #fff; }
  .print-toolbar { display: none; }
  .sheet-a6, .sheet-a4 { margin: 0; padding: 0; max-width: none; }
  .qr-card { aspect-ratio: auto; }
  /* Tam sayfa yüksekliği yuvarlamayla ikinci boş sayfa açabilir; 1 mm pay bırakılır. */
  .sheet-a6 .qr-card { width: 105mm; height: 147mm; border: 0; }
  .sheet-a4 { grid-template-columns: 105mm 105mm; width: 210mm; }
  .sheet-a4 .qr-card { width: 105mm; height: 148mm; border: .2mm dashed #999; }
}

/* Satış raporu (Faz 1): özet kutuları; dar ekranda 2, genişte 4 sütun. */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; min-width: 0; }
.stat b { font-size: 1.15rem; overflow-wrap: anywhere; }
