/* YAYLACIK OMS — tek stil dosyası. Telefon önce; tablet ve masaüstü genişletmeleri aşağıda. */
:root {
  --bg: #F4F2EE; --surface: #FFFFFF; --surface-2: #F9F8F5; --line: #E3DFD7; --line-strong: #CFC9BD;
  --text: #1C1B19; --text-2: #5C5952; --text-3: #8A867D;
  --brand: #1F5135; --brand-ink: #FFFFFF; --brand-soft: #E3EFE7;
  --ok: #1E7A45; --ok-soft: #E2F3E8; --warn: #A15C00; --warn-soft: #FFF1D6; --bad: #B42318; --bad-soft: #FDE7E4; --info: #1D5FA8; --info-soft: #E3EEFA;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 2px 8px rgb(0 0 0 / .05);
  --r: 14px; --r-sm: 10px;
  --tap: 52px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #121412; --surface: #1C1F1C; --surface-2: #232723; --line: #2F342F; --line-strong: #3F463F;
  --text: #F1F0EC; --text-2: #B9B6AE; --text-3: #8C8981;
  --brand: #5FBF86; --brand-ink: #0B1A11; --brand-soft: #1F3A2A;
  --ok: #5FD08E; --ok-soft: #173826; --warn: #F2B35B; --warn-soft: #3A2B12; --bad: #FF8A80; --bad-soft: #401C19; --info: #7DB5F5; --info-soft: #18304A;
  --shadow: 0 1px 2px rgb(0 0 0 / .4);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121412; --surface: #1C1F1C; --surface-2: #232723; --line: #2F342F; --line-strong: #3F463F;
    --text: #F1F0EC; --text-2: #B9B6AE; --text-3: #8C8981;
    --brand: #5FBF86; --brand-ink: #0B1A11; --brand-soft: #1F3A2A;
    --ok: #5FD08E; --ok-soft: #173826; --warn: #F2B35B; --warn-soft: #3A2B12; --bad: #FF8A80; --bad-soft: #401C19; --info: #7DB5F5; --info-soft: #18304A;
    --shadow: 0 1px 2px rgb(0 0 0 / .4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Butonlar ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: var(--surface); font-weight: 600; touch-action: manipulation; user-select: none;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-accept { background: var(--ok); border-color: var(--ok); color: #fff; font-size: 18px; letter-spacing: .02em; }
:root[data-theme="dark"] .btn-accept { color: #08180E; }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-block { width: 100%; }
.btn-xl { min-height: 60px; font-size: 18px; }
.btn-sm { min-height: 40px; padding: 0 12px; font-size: 14px; }
.icon-btn { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 12px; }
.spin { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Kabuk ── */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line);
  padding: calc(var(--safe-t) + 8px) calc(var(--safe-r) + 12px) 8px calc(var(--safe-l) + 12px);
  display: flex; align-items: center; gap: 10px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand small { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); letter-spacing: .08em; }
.brand-text { display: none; }
.topbar .spacer { flex: 1; }
.branch-select { min-height: 44px; max-width: 46vw; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-2); padding: 0 10px; font-weight: 600; }
.conn-pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.conn-pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.conn-ok { background: var(--ok-soft); color: var(--ok); }
.conn-warn { background: var(--warn-soft); color: var(--warn); }
.conn-bad { background: var(--bad-soft); color: var(--bad); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .55; } }
.topnav { display: none; }

.banner { padding: 8px calc(var(--safe-r) + 12px) 8px calc(var(--safe-l) + 12px); font-weight: 600; font-size: 14px; line-height: 1.3; display: flex; gap: 10px; align-items: center; }
.banner > span { flex: 1; min-width: 0; }
.banner .btn { min-height: 38px; flex: 0 0 auto; }
.banner-bad { background: var(--bad); color: #fff; }
.banner-warn { background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.banner-info { background: var(--info-soft); color: var(--info); }
.banner-demo { background: repeating-linear-gradient(-45deg, var(--warn-soft) 0 12px, var(--surface-2) 12px 24px); color: var(--text); font-size: 13px; padding-top: 6px; padding-bottom: 6px; }

main { flex: 1; padding: 12px calc(var(--safe-r) + 12px) calc(var(--safe-b) + 84px) calc(var(--safe-l) + 12px); width: 100%; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line);
  display: flex; padding: 4px calc(var(--safe-r) + 4px) calc(var(--safe-b) + 4px) calc(var(--safe-l) + 4px);
}
.bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 56px; justify-content: center; text-decoration: none; color: var(--text-3); font-size: 12px; font-weight: 600; border-radius: 12px; position: relative; }
.bottomnav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
.bottomnav svg, .topnav svg { width: 24px; height: 24px; }
.nav-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 20px; height: 20px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 12px; display: grid; place-items: center; padding: 0 5px; }

/* ── Sipariş panosu ── */
.board-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; position: sticky; top: calc(var(--safe-t) + 61px); z-index: 20; background: var(--bg); padding: 4px 0 10px; margin: -4px 0 0; }
.board-tabs::-webkit-scrollbar { display: none; }
.board-tab { flex: 0 0 auto; min-height: 46px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 700; display: inline-flex; gap: 8px; align-items: center; }
.board-tab[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.board-tab .count { min-width: 26px; height: 26px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); color: var(--text); font-size: 14px; padding: 0 6px; }
.board-tab[data-col="new"] .count.has { background: var(--bad); color: #fff; }
.board-tab[aria-selected="true"] .count { background: color-mix(in srgb, var(--bg) 20%, transparent); color: var(--bg); }

.toolbar { display: flex; gap: 8px; margin-bottom: 10px; }
.toolbar .filter-select { flex: 0 1 auto; max-width: 46%; }
.search { flex: 1 1 0; min-width: 0; min-height: 46px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 14px; }
.filter-select { min-height: 46px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 10px; }

.board { display: block; }
.col { display: none; }
.col.active { display: block; }
.col-head { display: none; }
.col-body { display: flex; flex-direction: column; gap: 10px; }
.empty { text-align: center; color: var(--text-3); padding: 40px 16px; border: 2px dashed var(--line); border-radius: var(--r); }

.card {
  background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--line);
  border-left: 7px solid var(--pf, var(--line-strong)); padding: 12px 12px 12px 14px; position: relative;
}
.card.fresh { animation: fresh 1s ease-out 3; }
@keyframes fresh { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 70%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.card.urgent { border-color: var(--warn); border-left-color: var(--pf); background: linear-gradient(var(--warn-soft), var(--warn-soft)) top / 100% 4px no-repeat, var(--surface); }
.card.critical { border-color: var(--bad); background: linear-gradient(var(--bad), var(--bad)) top / 100% 5px no-repeat, var(--surface); }
.card-open { all: unset; display: block; cursor: pointer; width: 100%; }
.card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-chip { font-size: 12px; font-weight: 800; color: #fff; background: var(--pf); padding: 3px 8px; border-radius: 6px; letter-spacing: .02em; }
.card-no { font-size: 22px; font-weight: 800; letter-spacing: .01em; }
.card-elapsed { margin-left: auto; font-size: 20px; font-weight: 800; }
.card.urgent .card-elapsed { color: var(--warn); }
.card.critical .card-elapsed { color: var(--bad); }
.card-meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--text-2); font-size: 14px; margin-top: 4px; }
.card-branch { font-weight: 800; color: var(--text); }
.card-items { margin: 8px 0 0; padding: 0; list-style: none; font-size: 16px; }
.card-items li { display: flex; gap: 8px; padding: 2px 0; }
.card-items .q { font-weight: 800; min-width: 64px; }
.card-items .more { color: var(--text-3); }
.card-note { margin-top: 8px; background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 6px 10px; font-weight: 600; font-size: 14px; }
.card-foot { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.card-foot .btn-accept { flex: 1 1 100%; }
.progress { flex: 1; height: 10px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--ok); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge-info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge-test { background: repeating-linear-gradient(-45deg, var(--warn-soft) 0 6px, transparent 6px 12px); color: var(--warn); border-color: var(--warn); }
.unsupported { font-size: 14px; background: var(--info-soft); color: var(--info); border-radius: 10px; padding: 10px 12px; font-weight: 600; width: 100%; }

/* ── Sipariş detayı (telefonda tam ekran, masaüstünde sağ panel) ── */
.sheet-backdrop { position: fixed; inset: 0; background: rgb(0 0 0 / .45); z-index: 50; }
.sheet {
  position: fixed; inset: 0; z-index: 51; background: var(--bg); display: flex; flex-direction: column;
  padding-top: var(--safe-t); animation: slideup .18s ease-out;
}
@keyframes slideup { from { transform: translateY(24px); opacity: 0; } }
.sheet-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px calc(var(--safe-r) + 12px) 10px calc(var(--safe-l) + 12px); display: flex; gap: 10px; align-items: flex-start; border-left: 7px solid var(--pf); }
.sheet-title { flex: 1; min-width: 0; }
.sheet-title h2 { margin: 2px 0 0; font-size: 26px; line-height: 1.1; }
.sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px calc(var(--safe-r) + 12px) 16px calc(var(--safe-l) + 12px); }
.sheet-foot { background: var(--surface); border-top: 1px solid var(--line); padding: 10px calc(var(--safe-r) + 12px) calc(var(--safe-b) + 10px) calc(var(--safe-l) + 12px); display: flex; flex-direction: column; gap: 8px; }
.sheet-foot .row { display: flex; gap: 8px; }
.sheet-foot .row > * { flex: 1; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 15px; margin: 0 0 12px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 600; }
.note-box { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 12px 14px; font-weight: 700; margin-bottom: 12px; font-size: 16px; }
.claim-box { border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.claim-mine { background: var(--ok-soft); color: var(--ok); }
.claim-other { background: var(--warn-soft); color: var(--warn); }
.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.item {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; min-height: 72px;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 10px 12px; cursor: pointer; touch-action: manipulation; user-select: none;
}
.item[aria-disabled="true"] { cursor: default; }
.item.checked { border-color: var(--ok); background: color-mix(in srgb, var(--ok-soft) 70%, var(--surface)); }
.item.busy { opacity: .6; }
.box { width: 40px; height: 40px; border-radius: 10px; border: 3px solid var(--line-strong); display: grid; place-items: center; background: var(--surface); }
.item.checked .box { background: var(--ok); border-color: var(--ok); color: #fff; }
.box svg { width: 26px; height: 26px; }
.item-name { font-size: 18px; font-weight: 700; line-height: 1.2; }
.item-sub { font-size: 14px; color: var(--text-2); margin-top: 2px; }
.item-note { font-size: 14px; color: var(--warn); font-weight: 700; margin-top: 4px; }
.item-qty { text-align: right; font-size: 20px; font-weight: 800; white-space: nowrap; }
.item-qty small { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); }
.missing-hint { text-align: center; font-weight: 700; color: var(--warn); }
.result { border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.result-ok { background: var(--ok-soft); color: var(--ok); }
.result-bad { background: var(--bad-soft); color: var(--bad); }
.result-info { background: var(--info-soft); color: var(--info); }
.history { font-size: 14px; color: var(--text-2); margin: 16px 0 0; padding-left: 18px; }

/* ── Modal ── */
.modal { position: fixed; inset: auto 0 0 0; z-index: 61; background: var(--surface); border-radius: 18px 18px 0 0; max-height: 92dvh; display: flex; flex-direction: column; padding-bottom: var(--safe-b); animation: slideup .18s ease-out; }
.modal-backdrop { position: fixed; inset: 0; background: rgb(0 0 0 / .5); z-index: 60; }
.modal header { padding: 16px 16px 8px; font-size: 20px; font-weight: 800; }
.modal .body { padding: 0 16px; overflow-y: auto; }
.modal footer { padding: 12px 16px 16px; display: flex; gap: 8px; }
.modal footer > * { flex: 1; }
.radio-list { display: flex; flex-direction: column; gap: 6px; }
.radio-list label { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border: 2px solid var(--line); border-radius: 12px; font-weight: 600; }
.radio-list input { width: 22px; height: 22px; accent-color: var(--brand); }
.radio-list label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
textarea, .input { width: 100%; border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px; background: var(--surface-2); min-height: 48px; }

/* ── Toast ── */
.toasts { position: fixed; left: 12px; right: 12px; bottom: calc(var(--safe-b) + 84px); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; max-width: 560px; width: 100%; background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-weight: 600; box-shadow: 0 6px 24px rgb(0 0 0 / .25); }
.toast.bad { background: var(--bad); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }
.toast.new { background: var(--brand); color: var(--brand-ink); font-size: 18px; cursor: pointer; }

/* ── Giriş ── */
.login { min-height: 100dvh; display: grid; place-items: center; padding: calc(var(--safe-t) + 20px) 16px calc(var(--safe-b) + 20px); }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 20px; padding: 28px 22px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.login-card img { width: 64px; height: 64px; border-radius: 16px; }
.login-card h1 { margin: 12px 0 2px; font-size: 26px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; font-weight: 600; }
.field input, .field select { min-height: 52px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-2); padding: 0 14px; font-size: 17px; }
.error { color: var(--bad); font-weight: 600; margin-top: 12px; }

/* ── Raporlar ── */
.page-title { font-size: 22px; font-weight: 800; margin: 4px 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-title .spacer { flex: 1; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; width: 100%; }
.chip { flex: 0 0 auto; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.date-input { min-height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 10px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.kpi .label { font-size: 13px; color: var(--text-2); font-weight: 600; }
.kpi .value { font-size: 26px; font-weight: 800; margin-top: 2px; }
.kpi .delta { font-size: 12px; font-weight: 700; margin-top: 2px; }
.delta.good { color: var(--ok); } .delta.bad { color: var(--bad); } .delta.flat { color: var(--text-3); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 14px; }
.panel h3 { margin: 0 0 10px; font-size: 17px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: right; font-size: 12px; color: var(--text-2); font-weight: 700; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { text-align: right; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data tbody tr { cursor: pointer; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tfoot td { font-weight: 800; }
.mcards { display: flex; flex-direction: column; gap: 8px; }
.mcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface-2); }
.mcard-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 17px; margin-bottom: 8px; gap: 8px; }
.mcard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 10px; font-size: 13px; }
.mcard-grid b { display: block; font-size: 17px; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; font-size: 14px; }
.bar-track { grid-column: 1 / -1; height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.bar-track > i { display: block; height: 100%; border-radius: 5px; }
.na { color: var(--text-3); font-style: italic; font-weight: 600; }
.defs { font-size: 13px; color: var(--text-2); margin: 0; padding-left: 18px; }
.stamp { font-size: 12px; color: var(--text-3); }
.chart svg { width: 100%; height: auto; display: block; }

/* ── Ayarlar ── */
.settings { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row .t { font-weight: 700; }
.set-row .d { font-size: 13px; color: var(--text-2); }
.switch { appearance: none; width: 52px; height: 32px; border-radius: 16px; background: var(--line-strong); position: relative; flex: 0 0 auto; cursor: pointer; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgb(0 0 0 / .3); }
.switch:checked { background: var(--ok); }
.switch:checked::after { transform: translateX(20px); }
input[type="range"] { width: 160px; accent-color: var(--brand); }
.limits { font-size: 14px; color: var(--text-2); padding-left: 18px; margin: 8px 0 0; }
.limits li { margin-bottom: 4px; }
.health { display: flex; flex-direction: column; gap: 6px; }
.health-row { display: flex; gap: 8px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }

/* ── Telefon yatay / küçük tablet ── */
@media (min-width: 560px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modal { inset: auto 50% 50% auto; transform: translate(50%, 50%); width: min(520px, 94vw); border-radius: 18px; animation: none; }
  .brand-text { display: block; }
}

/* ── Tablet: yatay kaydırmalı sütunlar ── */
@media (min-width: 720px) {
  main { padding-bottom: calc(var(--safe-b) + 24px); }
  .bottomnav { display: none; }
  .topnav { display: flex; gap: 4px; }
  .topnav a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 12px; text-decoration: none; color: var(--text-2); font-weight: 700; position: relative; }
  .topnav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
  .topnav .nav-badge { top: -2px; left: auto; right: -4px; }
  .toasts { bottom: calc(var(--safe-b) + 20px); }
  .board-tabs .board-tab[data-col] { display: none; }
  .board-tabs { position: static; padding: 0 0 10px; }
  .board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(330px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; align-items: start; }
  .board.show-cancelled .col { display: none; }
  .board.show-cancelled .col[data-col="cancelled"] { display: block; }
  .col { display: block; scroll-snap-align: start; background: color-mix(in srgb, var(--surface-2) 60%, var(--bg)); border-radius: 16px; padding: 8px; min-height: 60vh; }
  .col[data-col="cancelled"] { display: none; }
  .col-head { display: flex; align-items: center; gap: 8px; font-weight: 800; padding: 6px 6px 10px; font-size: 15px; letter-spacing: .03em; text-transform: uppercase; }
  .col-head .count { min-width: 28px; height: 28px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; font-size: 14px; border: 1px solid var(--line); }
  .col[data-col="new"] .col-head .count.has { background: var(--bad); color: #fff; border-color: var(--bad); }
  .sheet { inset: 0 0 0 auto; width: min(620px, 92vw); box-shadow: -10px 0 40px rgb(0 0 0 / .25); }
  .mcards.responsive { display: none; }
}
@media (max-width: 719.98px) {
  .table-wrap.responsive { display: none; }
  .toolbar [data-demo] { display: none; }
  .board-tab[data-view="cancelled"] { display: none; }
}

/* ── Masaüstü: 4 sütun ekrana sığar ── */
@media (min-width: 1280px) {
  .board { grid-auto-columns: minmax(0, 1fr); overflow: visible; }
  .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  main { padding-left: 20px; padding-right: 20px; }
}

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

/* ── Yazdırma: yalnızca fiş veya rapor ── */
#print-root { display: none; }
@media print {
  body.printing-receipt > *:not(#print-root) { display: none !important; }
  body.printing-receipt #print-root { display: block; }
  body.printing-report .topbar, body.printing-report .bottomnav, body.printing-report .banner, body.printing-report .filters, body.printing-report .no-print, body.printing-report .toasts { display: none !important; }
  body.printing-report { background: #fff; color: #000; }
  body.printing-report .mcards.responsive { display: none !important; }
  body.printing-report .table-wrap.responsive { display: block !important; }
  body.printing-report .panel, body.printing-report .kpi { break-inside: avoid; border-color: #999; }
}

/* ── Çoklu adet uyarısı: aynı üründen birden fazla ── */
.qty-badge { display: inline-block; background: var(--bad); color: #fff; font-weight: 900; font-size: 15px; letter-spacing: .03em; padding: 3px 8px; border-radius: 8px; margin-right: 6px; vertical-align: middle; }
.qty-badge-plain { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); }
.item.multi { border-color: var(--bad); box-shadow: inset 6px 0 0 var(--bad); }
.item.multi.checked { border-color: var(--ok); box-shadow: inset 6px 0 0 var(--bad); }
.item-qty.qty-multi { color: var(--bad); display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 22px; }
.item-qty.qty-multi .qty-badge { margin: 0; font-size: 18px; padding: 5px 10px; animation: qtypulse 1.4s ease-in-out 3; }
@keyframes qtypulse { 50% { transform: scale(1.12); } }
.card-items li.multi .q { color: var(--bad); }
.card-items li.multi .qty-badge { font-size: 13px; padding: 1px 6px; }
.card-multi { margin-top: 6px; color: var(--bad); font-weight: 800; font-size: 14px; }
/* ── Ürün yok / alternatif ── */
.issue { font-size: 14px; font-weight: 700; margin-top: 4px; border-radius: 6px; padding: 3px 8px; display: inline-block; }
.issue-cancel { background: var(--bad-soft); color: var(--bad); }
.issue-alt { background: var(--info-soft); color: var(--info); }
.item.cancelled { opacity: .6; border-style: dashed; }
.item.cancelled .item-name { text-decoration: line-through; }
.item-issue-btn { margin-top: 8px; min-height: 36px; font-size: 13px; }
.issue-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 4px; }
.issue-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.alt-results { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-height: 40dvh; overflow-y: auto; }
.alt-item { all: unset; cursor: pointer; display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; padding: 8px; border: 2px solid var(--line); border-radius: 10px; }
.alt-item span { display: flex; flex-direction: column; }
.alt-item.sel { border-color: var(--brand); background: var(--brand-soft); }
.alt-item img, .alt-noimg { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
/* ── İadeler ── */
.claim-items { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.claim-items li { display: flex; gap: 8px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.claim-items input { width: 22px; height: 22px; accent-color: var(--brand); }
.courier-return { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-weight: 700; margin: 8px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.received-box { background: var(--ok-soft); color: var(--ok); border-radius: 10px; padding: 8px 12px; font-weight: 600; margin-top: 8px; font-size: 14px; }
.received-box img { max-width: 160px; border-radius: 8px; display: block; margin-top: 6px; }
.refund-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.sheet-foot .foot-row .btn { min-height: 48px; padding: 0 10px; }
.sheet-foot .result.small { padding: 6px 10px; }
@media (max-width: 559.98px) { .claim-box { padding: 8px 12px; font-size: 14px; } .claim-box .btn { min-height: 36px; } }

/* ── Logo ── */
.brand-logo { height: 34px !important; width: auto !important; border-radius: 0 !important; display: block; }
.login-logo { width: 100% !important; height: auto !important; max-width: 320px; border-radius: 0 !important; display: block; margin: 0 auto 6px; }
.login-card h1 { text-align: center; font-size: 20px; margin-top: 4px; color: var(--text-2); font-weight: 700; }
:root[data-theme="dark"] .brand-logo, :root[data-theme="dark"] .login-logo, :root[data-theme="dark"] .about img { filter: invert(1) brightness(1.15); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo, :root:not([data-theme="light"]) .login-logo, :root:not([data-theme="light"]) .about img { filter: invert(1) brightness(1.15); } }
.brand-text small { font-size: 11px; }
@media (max-width: 559.98px) {
  .brand-logo { height: 26px !important; max-width: 34vw; object-fit: contain; }
  .topbar { gap: 6px; }
  .branch-select { max-width: 38vw; font-size: 15px; padding: 0 6px; }
  .conn-pill { font-size: 0; padding: 0 9px; gap: 0; }
  .conn-pill::before { width: 12px; height: 12px; }
}
.credit { text-align: center; font-size: 12px; color: var(--text-3); margin: 10px 0 0; letter-spacing: .02em; }
.app-credit { text-align: center; font-size: 11px; color: var(--text-3); padding: 4px 12px calc(var(--safe-b) + 76px); }
@media (min-width: 720px) { .app-credit { padding-bottom: 10px; } }
.about { display: flex; gap: 16px; align-items: center; padding: 8px 4px 16px; color: var(--text-2); font-size: 14px; }
.about img { width: 150px; height: auto; }
/* ── Hazırlık süresi ── */
.card-prep { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-prep:empty { display: none; }
.prep-timer { font-weight: 800; font-size: 15px; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.prep-timer.urgent { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.prep-timer.over { background: var(--bad); color: #fff; border-color: var(--bad); }
.prep-priority { font-weight: 900; color: var(--bad); font-size: 15px; letter-spacing: .03em; animation: blink 1s steps(2) infinite; }
.prep-banner { border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); }
.prep-banner.near { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.prep-banner.over { background: var(--bad); color: #fff; border-color: var(--bad); font-size: 17px; }
/* ── Hassas ürün ── */
.fragile-badge { display: inline-block; margin-top: 6px; background: #FFF0C2; color: #7A4B00; border: 2px dashed #D08A00; border-radius: 8px; padding: 3px 8px; font-weight: 800; font-size: 14px; }
:root[data-theme="dark"] .fragile-badge { background: #3A2B12; color: #F2B35B; border-color: #A86F00; }
.fragile-summary { background: #FFF0C2; color: #7A4B00; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-weight: 600; border: 2px dashed #D08A00; }
:root[data-theme="dark"] .fragile-summary { background: #3A2B12; color: #F2B35B; }
.card-fragile { margin-top: 6px; color: #9A5B00; font-weight: 800; font-size: 14px; }
:root[data-theme="dark"] .card-fragile { color: #F2B35B; }

/* Satış durumu */
.store-st { font-weight: 700; }
.store-st.open { color: var(--ok); }
.store-st.closed { color: var(--bad); }
.store-st.unknown { color: var(--text-3); }

/* Ödemeler */
.pay-hero { background: var(--surface); border: 2px solid var(--border); border-radius: 16px; padding: 18px 20px; margin-bottom: 14px; }
.pay-hero.ok { border-color: var(--ok); }
.pay-hero .lbl { font-weight: 700; color: var(--text-2); }
.pay-hero .amt { font-size: 40px; font-weight: 800; letter-spacing: -0.5px; margin: 4px 0; font-variant-numeric: tabular-nums; }
.pay-hero .sub { font-size: 13px; color: var(--text-3); }
.table-wrap { overflow-x: auto; }
.pay-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pay-table th, .pay-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.pay-table th { font-size: 12px; color: var(--text-2); font-weight: 700; }
.pay-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.pay-table tr.next td { background: color-mix(in srgb, var(--ok) 10%, transparent); font-weight: 700; }
.pay-table tr.total td { border-bottom: 2px solid var(--border); }
.pay-table.small { font-size: 13px; }
.pay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin-bottom: 14px; }
.pay-acc h4 { margin: 14px 0 6px; font-size: 13px; color: var(--text-2); }
.pay-amt { font-size: 20px; font-variant-numeric: tabular-nums; }
.pay-branches { display: grid; gap: 2px; margin: 4px 0 8px; font-size: 13px; }
.pay-branches div { display: flex; justify-content: space-between; color: var(--text-2); }
.pay-warn { color: var(--warn); margin-top: 4px; }
@media (max-width: 600px) { .pay-hero .amt { font-size: 32px; } .pay-grid { grid-template-columns: 1fr; } }

.pay-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 14px; }
.pay-group { background: var(--bg); border-radius: 12px; padding: 10px 14px; }
.pay-group .amt { font-size: 24px; margin: 2px 0; }
.pay-sub { margin: 16px 0 6px; font-size: 13px; color: var(--text-2); }

/* En çok satan ürünler */
.cat-list { display: grid; gap: 6px; }
.cat { border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; }
.cat summary { display: grid; grid-template-columns: 150px 1fr auto auto 56px; gap: 10px; align-items: center; padding: 9px 0; cursor: pointer; list-style: none; font-size: 14px; }
.cat summary::-webkit-details-marker { display: none; }
.cat-name { font-weight: 700; }
.cat-bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.cat-bar span { display: block; height: 100%; background: var(--ok); }
.cat-qty { color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.cat-rev, .cat-share { text-align: right; font-variant-numeric: tabular-nums; }
.cat-share { color: var(--text-3); font-size: 12px; }
.cat[open] { padding-bottom: 8px; }
@media (max-width: 600px) { .cat summary { grid-template-columns: 1fr auto; } .cat-bar, .cat-share { display: none; } .cat-qty { grid-column: 1; } }

.prod-brand { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; color: var(--text-2); background: var(--bg); border-radius: 6px; padding: 1px 6px; margin-right: 4px; }

.prod-search { max-width: 320px; min-height: 40px; }
.prod-found { background: var(--bg); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; font-size: 14px; }

.preparer { margin-top: 6px; font-size: 15px; color: var(--text); }

/* Ürün görseli ve fiyatı */
.item-img { width: 64px; height: 64px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--line); cursor: zoom-in; }
.item-img-none { display: block; background: var(--bg); border-style: dashed; cursor: default; }
.item-price { display: block; font-size: 15px; font-weight: 700; color: var(--text-2); margin-top: 4px; }
.item-price small { display: block; font-size: 12px; font-weight: 600; }
.zoom-img { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: #fff; border-radius: 12px; }
.item.with-img { grid-template-columns: 44px 64px 1fr auto; }
@media (max-width: 480px) { .item.with-img { grid-template-columns: 36px 52px 1fr auto; gap: 8px; } .item-img { width: 52px; height: 52px; } .item.with-img .box { width: 34px; height: 34px; } }

.pay-table tr.subtotal td { background: var(--bg); }

.item-barcode { font-size: .82em; color: var(--text-3); font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.item-barcode b { color: var(--text); font-family: ui-monospace, Consolas, monospace; }

/* Ürünler (satışa aç / kapat) */
.prod-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.prod-filters .chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.prod-filters .input { max-width: 260px; }
.ps-list { display: flex; flex-direction: column; gap: 6px; }
.ps-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line, #ddd); border-radius: 10px; background: var(--surface); }
.ps-row.off { opacity: .85; border-left: 4px solid var(--bad); }
.ps-row.mixed { border-left: 4px solid var(--warn, #c80); }
.ps-main { flex: 1; min-width: 0; }
.ps-name { font-weight: 700; }
.ps-panels { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ps-chip { font-size: .78em; padding: 1px 7px; border-radius: 999px; border: 1px solid currentColor; }
.ps-chip.ok { color: var(--ok); } .ps-chip.bad { color: var(--bad); } .ps-chip.warn { color: var(--warn, #c80); }
.ps-state { font-size: .85em; font-weight: 700; white-space: nowrap; }
.ps-state.ok { color: var(--ok); } .ps-state.bad { color: var(--bad); } .ps-state.warn { color: var(--warn, #c80); }
@media (max-width: 560px) { .ps-row { flex-wrap: wrap; } .ps-state { order: 3; } .prod-filters .input { max-width: none; width: 100%; } }

.ps-img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex: 0 0 52px; background: var(--surface-2); border: 1px solid var(--line); }
.ps-img-none { display: inline-block; }
.call-number { font-size: 30px; font-weight: 800; letter-spacing: .03em; text-align: center; padding: 14px; margin: 8px 0 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ps-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ps-missing { font-size: 12px; color: var(--warn, #b45309); margin-top: 2px; }
.pay-table .pay-parts { white-space: normal; max-width: 520px; line-height: 1.35; }

/* ── Ödemeler (sade) ── */
.pz-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.pz-card { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--info); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.pz-card.ok { border-left-color: var(--ok); } .pz-card.warn { border-left-color: var(--warn); } .pz-card.bad { border-left-color: var(--bad); }
.pz-l { font-size: 14px; font-weight: 700; color: var(--text-2); }
.pz-a { font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-card.ok .pz-a { color: var(--ok); } .pz-card.warn .pz-a { color: var(--warn); } .pz-card.bad .pz-a { color: var(--bad); }
.pz-h { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.pz-filters { display: grid; grid-template-columns: 1.2fr .9fr .9fr .9fr 1.6fr; gap: 10px; align-items: end; margin-bottom: 12px; }
.pz-filters .input { min-height: 46px; font-size: 15px; width: 100%; }
.pz-date { display: grid; gap: 3px; font-size: 12px; color: var(--text-2); font-weight: 600; }
.pz-panel { padding: 6px 10px 10px; }
.pz-table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.pz-table th { text-align: left; font-size: 13px; color: var(--text-2); font-weight: 700; padding: 10px 10px; border-bottom: 1px solid var(--line); }
.pz-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pz-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pz-table tbody tr { cursor: pointer; }
.pz-table tbody tr:hover td { background: var(--surface-2); }
.pz-table tr.today td { background: var(--info-soft); }
.pz-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pz-badge.ok { background: var(--ok-soft); color: var(--ok); } .pz-badge.warn { background: var(--warn-soft); color: var(--warn); } .pz-badge.bad { background: var(--bad-soft); color: var(--bad); }
.pz-est { color: var(--text-3); font-weight: 700; margin-right: 2px; }
.pz-foot { padding: 10px 6px 2px; color: var(--text-2); font-size: 14px; }
.pz-empty { padding: 24px 8px; text-align: center; }
.pz-cards-list { display: none; }
.pz-item { display: grid; gap: 6px; width: 100%; text-align: left; background: var(--surface); border: 0; border-bottom: 1px solid var(--line); padding: 12px 4px; font: inherit; color: inherit; cursor: pointer; }
.pz-item-top, .pz-item-sub { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pz-item-top b { font-size: 16px; } .pz-item-amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pz-item-sub { color: var(--text-2); font-size: 13.5px; }
.pz-dl { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.pz-dl span { color: var(--text-2); } .pz-dl b { text-align: right; }
.pz-h4 { margin: 16px 0 4px; font-size: 13px; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; }
.pz-detail-amt { font-size: 34px; font-weight: 800; margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.pz-detail-amt.ok { color: var(--ok); } .pz-detail-amt.warn { color: var(--warn); } .pz-detail-amt.bad { color: var(--bad); }
@media (max-width: 1000px) { .pz-cards { grid-template-columns: repeat(2, 1fr); } .pz-filters { grid-template-columns: 1fr 1fr; } .pz-filters [data-f=q] { grid-column: 1 / -1; } }
@media (max-width: 700px) {
  .pz-table { display: none; } .pz-cards-list { display: block; }
  .pz-a { font-size: 20px; white-space: normal; overflow-wrap: anywhere; } .pz-card { padding: 12px; } .pz-l { font-size: 13px; }
}
@media (max-width: 380px) { .pz-cards { grid-template-columns: 1fr; } }
.pz-up { padding: 12px 14px; margin-bottom: 14px; }
.pz-up-title { margin: 2px 0 6px; font-size: 17px; }
.pz-up-table tbody tr { cursor: pointer; }
.pz-up-total { font-size: 17px; }
.pz-up-note { margin-top: 8px; }
.pz-up-cards { display: none; }
.pz-up-card { display: grid; gap: 6px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 2px; font: inherit; color: inherit; cursor: pointer; }
.pz-up-card.today { background: var(--info-soft); border-radius: 8px; padding: 10px 8px; }
.pz-up-parts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; color: var(--text-2); }
@media (max-width: 700px) { .pz-up-table { display: none; } .pz-up-cards { display: block; } }

/* ── İadeler ── */
.rf-tabs { margin-bottom: 8px; }
.rf-range { margin-bottom: 10px; align-items: center; }
.rf-custom { display: inline-flex; gap: 6px; align-items: center; }
.rf-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.6fr) auto; gap: 8px; margin-bottom: 12px; align-items: center; }
.rf-filters .input { min-height: 44px; font-size: 15px; }
.rf-more { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rf-export { min-height: 38px; font-size: 14px; padding: 6px 10px; width: auto; }
.rf-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.rf-tile { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); }
.rf-tile.ok { border-top-color: var(--ok); } .rf-tile.bad { border-top-color: var(--bad); } .rf-tile.warn { border-top-color: var(--warn); } .rf-tile.info { border-top-color: var(--info); } .rf-tile.mute { border-top-color: var(--text-3); }
.rf-tl { font-size: 13px; font-weight: 700; color: var(--text-2); }
.rf-tv { font-size: 26px; font-weight: 800; line-height: 1.2; margin-top: 2px; }
.rf-tv-money { font-size: 22px; }
.rf-ta { font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rf-th { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.rf-listbar { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; }
.rf-panel { padding: 4px 8px; overflow-x: auto; }
.rf-table, .rf-atable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.rf-table th, .rf-atable th { text-align: left; font-size: 12.5px; color: var(--text-2); font-weight: 700; padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rf-table td, .rf-atable td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rf-table .num, .rf-atable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rf-table tbody tr, .rf-atable tr.clickable { cursor: pointer; }
.rf-table tbody tr:hover td { background: var(--surface-2); }
.rf-tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.rf-tag.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; } .rf-tag.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.rf-tag.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; } .rf-tag.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.bad-text { color: var(--bad); } .ok-text { color: var(--ok); }
.rf-cards { display: none; }
.rf-card { display: grid; gap: 4px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 8px; font: inherit; color: inherit; cursor: pointer; }
.rf-card-top { display: flex; justify-content: space-between; gap: 8px; font-size: 16px; }
.rf-card-sub { font-size: 13.5px; color: var(--text-2); }
.rf-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.rf-error { color: var(--bad); }
.rf-colpick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rf-colpick label { display: flex; gap: 8px; align-items: center; min-height: 40px; }
.modal.modal-wide { width: min(860px, 96vw); }
.rf-dhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.rf-dnum { font-size: 20px; }
.rf-sec { border-top: 1px solid var(--line); padding: 10px 0 12px; }
.rf-sec h4 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-2); }
.rf-dl { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14.5px; }
.rf-dl > span { color: var(--text-2); } .rf-dl > b { text-align: right; font-weight: 600; }
.rf-person { font-weight: 800; }
.rf-items { list-style: none; padding: 0; margin: 6px 0 0; font-size: 14px; }
.rf-items li { display: grid; grid-template-columns: 70px 1fr auto; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.rf-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 6px; }
.rf-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.rf-form .rf-wide { grid-column: 1 / -1; }
.rf-form .rf-check { display: flex; align-items: center; gap: 8px; }
.rf-ev { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; font-size: 14px; }
.rf-ev img { max-width: 220px; border-radius: 8px; display: block; margin-top: 6px; }
.rf-hist { margin: 0; padding-left: 18px; font-size: 14px; } .rf-hist li { margin-bottom: 6px; }
.rf-details summary { cursor: pointer; font-size: 13.5px; color: var(--text-2); margin-top: 4px; }
.rf-bar { display: inline-block; width: 50px; height: 6px; background: var(--surface-2); border-radius: 4px; vertical-align: middle; overflow: hidden; }
.rf-bar i { display: block; height: 100%; background: var(--text-3); } .rf-bar.bad i { background: var(--bad); }
.rf-stack { display: flex; height: 18px; border-radius: 8px; overflow: hidden; background: var(--surface-2); margin: 6px 0; }
.rf-stack i, .rf-legend i { display: block; } .rf-stack .bad, .rf-legend .bad { background: var(--bad); } .rf-stack .ok, .rf-legend .ok { background: var(--ok); }
.rf-stack .ok2, .rf-legend .ok2 { background: #3f9e6b; } .rf-stack .ok3, .rf-legend .ok3 { background: #86c5a0; } .rf-stack .mute, .rf-legend .mute { background: var(--text-3); }
.rf-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; } .rf-legend span { display: inline-flex; align-items: center; gap: 6px; } .rf-legend i { width: 10px; height: 10px; border-radius: 3px; }
.rf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rf-note { margin: -4px 4px 12px; }
@media (max-width: 1000px) { .rf-filters { grid-template-columns: 1fr 1fr; } .rf-q { grid-column: 1 / -1; } .rf-more { grid-template-columns: 1fr 1fr; } .rf-two { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .rf-panel { display: none; } .rf-cards { display: block; }
  .rf-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rf-tv { font-size: 22px; }
  .rf-form { grid-template-columns: 1fr; } .rf-colpick { grid-template-columns: 1fr; }
}
@media print {
  .topbar, .nav, .sidebar, .rf-range, .rf-filters, .rf-tabs, [data-export], .bottom-nav { display: none !important; }
  .panel { break-inside: avoid; box-shadow: none; }
}

/* ── Ürünler (yeni tablo) ── */
.pr-branch { max-width: 220px; font-size: 15px; font-weight: 600; min-height: 40px; padding: 6px 10px; }
.pr-stk { line-height: 1.35; margin-top: 2px; white-space: nowrap; }
.pr-sum, .rp-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.pr-s, .rp-s { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pr-s > span, .rp-s > span { font-size: 13px; color: var(--text-2); }
.pr-s > b, .rp-s > b { font-size: 22px; font-weight: 800; overflow-wrap: anywhere; }
.rp-s > small { font-size: 12.5px; color: var(--text-3); }
.pr-s.ok > b { color: var(--ok); } .pr-s.bad > b { color: var(--bad); } .pr-s.warn > b { color: var(--warn); }
.pr-filters, .rp-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; align-items: center; }
.pr-filters .input, .rp-row .input { flex: 1 1 170px; max-width: 260px; min-height: 40px; }
.pr-filters [data-q], .rp-row [data-pq] { flex: 2 1 240px; max-width: none; }
.pr-bulk { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--brand-soft); border: 1px solid var(--brand); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.pr-panel { padding: 0; overflow-x: auto; }
.pr-table, .rp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pr-table th, .rp-table th { text-align: left; font-size: 12.5px; color: var(--text-2); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.pr-table td, .rp-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pr-table th.num, .pr-table td.num, .rp-table th.num, .rp-table td.num { text-align: right; white-space: nowrap; }
.pr-table tr.off td { background: color-mix(in srgb, var(--bad-soft) 35%, transparent); }
.pr-table tbody tr, .rp-click { cursor: pointer; }
.pr-table tbody tr:hover, .rp-click:hover { background: var(--surface-2); }
.pr-chk { width: 34px; } .pr-chk input { width: 20px; height: 20px; }
.pr-imgc { width: 60px; }
.pr-name { font-weight: 700; }
.pr-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.pr-chip { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.pr-chip.ok { color: var(--ok); } .pr-chip.bad { color: var(--bad); } .pr-chip.warn { color: var(--warn); } .pr-chip.mute { color: var(--text-3); }
.pr-act { white-space: nowrap; text-align: right; } .pr-act .btn { margin-left: 4px; }
.pr-foot { padding: 8px 12px; }
.pr-dhead { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 10px; }
.pr-dimg { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); flex: 0 0 96px; }
.pr-dname { font-size: 18px; font-weight: 800; }
.pr-dact { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.warn-text { color: var(--warn); }
@media (max-width: 900px) { .pr-bar, .pr-cat { display: none; } }
@media (max-width: 640px) {
  .pr-filters .input, .rp-row .input { max-width: none; flex-basis: 45%; }
  .pr-filters [data-q], .rp-row [data-pq] { flex-basis: 100%; }
  .pr-table thead { display: none; }
  .pr-table, .pr-table tbody { display: block; }
  .pr-table tr { display: grid; grid-template-columns: auto 56px minmax(0, 1fr) auto; grid-auto-rows: auto; gap: 4px 8px; padding: 10px; border-bottom: 1px solid var(--line); }
  .pr-table td { padding: 0; border: 0; }
  .pr-table td:nth-child(3) { grid-column: 3 / -1; }
  .pr-table .pr-chk { grid-row: 1; }
  .pr-table td.num, .pr-table td:nth-last-child(3), .pr-table td:nth-last-child(2) { grid-column: 3 / -1; text-align: left; }
  .pr-table td.num div { display: inline; margin-left: 4px; }
  .pr-table .pr-act { grid-column: 1 / -1; text-align: left; display: flex; flex-wrap: wrap; gap: 6px; } .pr-act .btn { margin: 0; }
  .pr-table:not(:has(.pr-chk)) tr { grid-template-columns: 56px minmax(0, 1fr); }
  .pr-table:not(:has(.pr-chk)) td:nth-child(2), .pr-table:not(:has(.pr-chk)) td.num, .pr-table:not(:has(.pr-chk)) td:nth-last-child(3), .pr-table:not(:has(.pr-chk)) td:nth-last-child(2) { grid-column: 2; }
  .pr-s > b, .rp-s > b { font-size: 18px; }
  .pr-dimg { width: 64px; height: 64px; flex-basis: 64px; }
}

/* ── Raporlar (yeni) ── */
.rp-filters .chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; }
.rp-custom { display: flex; gap: 6px; flex: 1 1 100%; } .rp-custom .input { max-width: 180px; }
.rp-range { font-size: 14px; margin: 2px 0 10px; }
.rp-chart h3 { margin-top: 0; }
.rp-days { display: flex; align-items: flex-end; gap: 3px; height: 170px; padding-bottom: 20px; border-bottom: 1px solid var(--line-strong); margin-bottom: 6px; }
.rp-day { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.rp-day > i { display: block; width: min(70%, 48px); background: var(--brand); border-radius: 3px 3px 0 0; }
.rp-day:hover > i { opacity: .8; }
.rp-day > span { position: absolute; bottom: -19px; font-size: 11px; color: var(--text-3); white-space: nowrap; }
.rp-warn summary { cursor: pointer; } .rp-warn { font-size: 13.5px; }
.rp-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line-strong); margin: 4px 0 12px; }
.rp-tab { flex: 0 0 auto; border: 0; background: none; padding: 10px 14px; font-weight: 700; color: var(--text-2); border-bottom: 3px solid transparent; min-height: 44px; }
.rp-tab[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.rp-ctrl .chips { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 8px; }
.rp-ctrl { margin-bottom: 10px; }
.rp-check { flex: 0 0 auto; padding-right: 6px; display: inline-flex; gap: 6px; align-items: center; font-size: 14px; min-height: 40px; }
.rp-sort { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 0; }
.rp-prod .ps-img { width: 40px; height: 40px; flex-basis: 40px; }
.rp-bars { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 14px; }
.rp-bar { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; gap: 8px; align-items: center; font-size: 13.5px; cursor: pointer; }
.rp-bar > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-bar > i { display: block; height: 14px; border-radius: 4px; background: var(--brand); }
.rp-bar > b { white-space: nowrap; font-size: 12.5px; }
.rp-share { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin-bottom: 10px; background: var(--surface-2); }
.rp-share > i { display: block; height: 100%; }
.rp-sum-in { margin: 0 0 8px; } .rp-sum-in .rp-s { background: var(--surface-2); }
.rp-det { margin-bottom: 8px; } .rp-det .bars { margin: 4px 0 10px; }
.rp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-notes { margin: 0; padding-left: 18px; }
.rp-rules { margin: 12px 0 24px; font-size: 13.5px; color: var(--text-2); } .rp-rules ul { padding-left: 18px; }
@media (max-width: 640px) { .rp-table { font-size: 13px; } .rp-table th, .rp-table td { padding: 7px 6px; } .rp-bar { grid-template-columns: minmax(80px, 38%) 1fr auto; } }
@media print { body.printing-report .rp-tabs, body.printing-report .rp-filters { display: none !important; } body.printing-report .rp-rules { display: block; } body.printing-report .rp-rules[open], body.printing-report .rp-rules ul { display: block; } }

.rp-more { margin-top: 8px; } .rp-more summary { cursor: pointer; font-weight: 600; color: var(--brand); padding: 6px 0; }
@media print { body.printing-report details.rp-more { display: block; } }

/* Ödemeler: en yakın ödeme */
.pz-next { margin-bottom: 14px; }
.pz-next-in { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: center; width: 100%; text-align: left; padding: 16px 20px; border-radius: 14px;
  background: var(--brand); color: var(--brand-ink); border: 0; cursor: pointer; font: inherit; }
.pz-next-d { font-size: 20px; font-weight: 800; }
.pz-next-l { grid-column: 1; font-size: 14px; opacity: .85; }
.pz-next-a { grid-column: 2; grid-row: 1 / span 2; font-size: 32px; font-weight: 900; white-space: nowrap; }
.pz-next-p { grid-column: 1 / -1; font-size: 13px; opacity: .85; margin-top: 4px; }
div.pz-next-in.muted { background: var(--surface); color: var(--text-2); border: 1px solid var(--line); cursor: default; }
@media (max-width: 560px) { .pz-next-in { grid-template-columns: 1fr; } .pz-next-a { grid-column: 1; grid-row: auto; font-size: 28px; } .pz-next-d { font-size: 18px; } }

/* Raporlar v2 */
.rp-sum4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .rp-sum4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rp-fixed { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.rp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rp-grid2 > .panel { margin: 0 0 12px; min-width: 0; }
@media (max-width: 900px) { .rp-grid2 { grid-template-columns: 1fr; } }
.rp-empty { padding: 18px; text-align: center; color: var(--text-2); background: var(--surface-2); border-radius: 10px; }
.rp-share-bar { height: 4px; background: var(--surface-2); border-radius: 2px; margin-top: 3px; } .rp-share-bar i { display: block; height: 100%; background: var(--brand); border-radius: 2px; }
.rp-cat td:first-child b::before { content: '▸ '; color: var(--text-3); } .rp-cat.open td:first-child b::before { content: '▾ '; }
.rp-cat-items > td { background: var(--surface-2); padding: 8px; }
.rp-inner { background: var(--surface); border-radius: 8px; margin-bottom: 8px; }
.rp-mres { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.rp-mitem { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 10px; cursor: pointer; font: inherit; }
.rp-mitem:hover { border-color: var(--brand); }
button.link { border: 0; background: none; color: var(--brand); cursor: pointer; padding: 0 2px; font: inherit; text-decoration: underline; }
.input-sm { min-height: 34px; padding: 4px 8px; font-size: 14px; }
@media (max-width: 640px) { .rp-hide-s { display: none; } .rp-fixed { flex-basis: 100%; } }
.branch-fixed { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; font-size: 14px; white-space: nowrap; }
/* Geniş olmayan masaüstünde üst menü taşmasın */
@media (min-width: 720px) and (max-width: 1500px) {
  .topbar .brand-text { display: none; }
  .topnav { gap: 2px; }
  .topnav a { padding: 0 8px; font-size: 14.5px; }
}
@media (min-width: 720px) and (max-width: 1180px) { .topnav a span:not(.nav-badge) { display: none; } .topnav a { padding: 0 10px; } .conn-pill { font-size: 0; padding: 6px; } }
/* Raporlar v3: işletme grubu, görsel büyütme */
.rp-group { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 12px; }
.rp-group button { border: 0; background: none; font: inherit; font-weight: 800; padding: 10px 18px; border-radius: 10px; color: var(--text-2); cursor: pointer; min-height: 44px; }
.rp-group button[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); }
.rp-zoom { cursor: zoom-in; }
.rp-big { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 12px; object-fit: contain; }
.rp-pname { display: flex; align-items: center; gap: 8px; } .rp-pname .ps-img { width: 40px; height: 40px; flex-basis: 40px; }
.rp-prod .ps-img, .rp-table .pr-imgc .ps-img { width: 48px; height: 48px; flex-basis: 48px; }
.rp-act { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rp-show-s, .rp-show-m { display: none; }
@media (max-width: 1000px) { .rp-hide-m { display: none; } .rp-show-m { display: inline; } }
@media (max-width: 640px) { .rp-show-s { display: inline; } .rp-group { display: flex; } .rp-group button { flex: 1; padding: 10px 8px; } }
.rp-sub { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: center; } .rp-sub > span:empty { display: none; }
@media (max-width: 640px) { .rp-prod .ps-img, .rp-table .pr-imgc .ps-img { width: 38px; height: 38px; flex-basis: 38px; } .rp-table .pr-imgc { width: 42px; padding-right: 0; } div.rp-show-s { display: block; } }
.rp-total td { border-top: 2px solid var(--line-strong); background: var(--surface-2); }
