/* Paketleme masası: uzaktan okunur, eldivenle kullanılır, durum renkle bağırır. */
:root {
  --table: #e4e8ec;
  --paper: #ffffff;
  --ink: #12161c;
  --muted: #55606e;
  --rule: #c2c9d2;
  --ok: #0a7a42;
  --ok-soft: #dff3e7;
  --bad: #c41c29;
  --bad-soft: #fbe3e5;
  --warn: #f2b600;
  --warn-soft: #fff4cf;
  --action: #1c3fd1;
  --font: "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 17px; }
body { margin: 0; background: var(--table); color: var(--ink); font: 1rem/1.4 var(--font); }
h1, h2, p, ul { margin: 0; padding: 0; }
main { max-width: 1100px; margin: 0 auto; padding: 20px 20px 64px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; }

/* Üst şerit */
.topbar { display: flex; align-items: center; gap: 14px; padding: 10px 20px; background: var(--ink); color: #fff; }
.topbar form { margin: 0; }
.topbar-brand { color: #fff; font-weight: 800; font-size: 1.1rem; text-decoration: none; }
.topnav { display: flex; gap: 4px; }
.topnav a { padding: 8px 14px; border-radius: 4px; color: #b9c2cd; font-weight: 700; text-decoration: none; white-space: nowrap; }
.topnav a:hover { color: #fff; }
.topnav a[aria-current=page] { background: #fff; color: var(--ink); }
.topbar-user { margin-left: auto; color: #b9c2cd; }
.topbar .btn-quiet { color: #fff; border-color: #55606e; }
.offline { background: var(--bad); color: #fff; font-weight: 700; text-align: center; padding: 10px; }

/* Düğmeler */
.btn { font: inherit; font-weight: 700; padding: 11px 18px; min-height: 46px; border: 2px solid var(--ink);
  border-radius: 4px; background: var(--paper); color: var(--ink); cursor: pointer; }
.btn:hover { background: #f1f3f6; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--action); border-color: var(--action); color: #fff; }
.btn-primary:hover { background: #1734ad; }
.btn-quiet { background: transparent; border-color: var(--rule); font-weight: 600; }
.btn-xl { font-size: 1.35rem; padding: 18px 28px; min-height: 68px; }
.btn-block { width: 100%; margin-top: 18px; }

.notice { padding: 12px 16px; border-left: 8px solid; margin-bottom: 16px; font-weight: 600; }
.notice-bad { background: var(--bad-soft); border-color: var(--bad); }
.field-error { color: var(--bad); font-weight: 600; margin-top: 6px; }

/* Giriş */
.login-page { display: grid; place-items: center; min-height: 100vh; }
.login { width: min(420px, 100%); background: var(--paper); border: 2px solid var(--ink); border-top-width: 12px; padding: 28px; }
.login h1 { font-size: 1.7rem; letter-spacing: -0.01em; }
.login-lede { color: var(--muted); margin: 4px 0 20px; }
.login label, .find label, .scan label, dialog label { display: block; font-weight: 700; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], textarea { width: 100%; font: inherit; padding: 11px 12px;
  border: 2px solid var(--ink); border-radius: 4px; background: #fff; color: var(--ink); }

/* Kuyruk */
.queue-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.queue-next { display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.find label { margin-top: 0; font-weight: 600; color: var(--muted); font-size: 0.9rem; }
.find-row { display: flex; gap: 8px; }
.find-row input { width: 240px; }
.source { text-align: right; }
.source-status { color: var(--muted); margin-bottom: 6px; font-variant-numeric: tabular-nums; }

.tabs { display: flex; gap: 4px; border-bottom: 3px solid var(--ink); overflow-x: auto; }
.tabs button { white-space: nowrap; flex: none; }
.tabs button { font: inherit; font-weight: 700; padding: 12px 18px; border: 0; border-radius: 4px 4px 0 0; background: transparent;
  color: var(--muted); cursor: pointer; }
.tabs button[aria-selected=true] { background: var(--ink); color: #fff; }
.count { display: inline-block; min-width: 1.7em; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--rule);
  color: var(--ink); font-size: 0.85rem; text-align: center; font-variant-numeric: tabular-nums; }
.tabs button[aria-selected=true] .count { background: #fff; }

.queue-page main { max-width: 1320px; }
.order-table { background: var(--paper); border: 2px solid var(--ink); border-top: 0; }
.order-head, .order-row { display: grid; gap: 14px; align-items: center; padding: 14px 18px;
  grid-template-columns: 90px 140px minmax(0, 1.3fr) 150px 112px minmax(0, 1.2fr) 130px; }
.order-head { padding-top: 10px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.empty { padding: 36px 20px; color: var(--muted); }
.order-row { border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.order-row:last-child { border-bottom: 0; }
.order-row:hover { background: #f1f3f6; }
.order-row-no { font-weight: 800; font-size: 1.15rem; letter-spacing: 0.01em; }
.order-row-qty { font-variant-numeric: tabular-nums; }
.order-row-id { color: var(--muted); font-variant-numeric: tabular-nums; }
.order-row-customer { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-row-date { font-variant-numeric: tabular-nums; line-height: 1.25; }
.order-row-date small { display: block; color: var(--muted); font-size: 0.82rem; }
.order-row-flags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-width: 0; }
.order-row-detail, .order-row-carrier { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-row.state-blocked { background: var(--bad-soft); }
.list-tools { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap;
  padding: 10px 0; color: var(--muted); font-size: 0.95rem; }
.list-tools[hidden] { display: none; }
.list-tools:not([hidden]) + .order-table { border-top: 2px solid var(--ink); }
/* Tamamlanan sekmesi: gün başlıkları; tıklanınca o günün siparişleri altında açılır */
.day-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 18px; border: 0;
  border-bottom: 1px solid var(--rule); background: var(--paper); color: var(--ink); font: inherit;
  font-size: 1.05rem; font-weight: 700; text-align: left; cursor: pointer; }
.day-row::before { content: "▸"; color: var(--muted); width: 1em; }
.day-row[aria-expanded="true"] { background: #f1f3f6; border-bottom-color: var(--ink); }
.day-row[aria-expanded="true"]::before { content: "▾"; }
.day-row:hover { background: #f1f3f6; }
.day-row:focus-visible { outline: 3px solid var(--action); outline-offset: -3px; }
.day-row-title { flex: 1; min-width: 0; }
.day-row-count { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); }
.day-orders { border-bottom: 2px solid var(--ink); }
.day-orders .order-row:last-child { border-bottom: 0; }
.flag { padding: 2px 8px; background: var(--warn-soft); border: 1px solid var(--warn); border-radius: 3px; font-size: 0.82rem; font-weight: 700; }
.flag-warn { background: var(--warn); border-color: var(--warn); }
.flag-ok { background: var(--ok-soft); border-color: var(--ok); }
.flag-bad { background: var(--bad); border-color: var(--bad); color: #fff; }

/* İade paneli */
.returns-page main { max-width: 1320px; }
.returns-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 14px; }
.returns-search { flex: 1; min-width: 280px; max-width: 640px; }
.returns-search label { display: block; font-weight: 700; margin-bottom: 6px; }
.returns-search .find-row input { width: auto; flex: 1; font-size: 1.15rem; }
.returns-search .check { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--action); }
.returns-summary { min-height: 1.4em; margin-bottom: 10px; font-weight: 600; }
.returns-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.returns-no small { display: block; color: var(--muted); font-size: 0.8rem; font-weight: 400; }
.returns-table { border-top: 2px solid var(--ink); }
.returns-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 138px 158px 112px; gap: 12px; align-items: center;
  width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; color: var(--ink);
  font: inherit; text-align: left; cursor: pointer; }
.returns-row:hover { background: #f1f3f6; }
.returns-row.is-selected { background: #e3e9fb; box-shadow: inset 6px 0 0 var(--action); }
.returns-headrow { cursor: default; font-size: 0.85rem; font-weight: 700; color: var(--muted); border-bottom: 2px solid var(--ink); }
.returns-headrow:hover { background: transparent; }
.returns-detail { background: var(--paper); border: 2px solid var(--ink); border-top-width: 12px; padding: 16px 18px; position: sticky; top: 12px; }
.detail-head { margin-bottom: 12px; }
.detail-head .ticket-no { font-size: 1.8rem; margin-bottom: 6px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.detail-field { display: flex; flex-direction: column; min-width: 0; }
.detail-value { font-weight: 700; overflow-wrap: anywhere; }
.detail-lines { list-style: none; margin-top: 12px; display: grid; gap: 6px; }
.detail-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid var(--rule); border-left: 6px solid var(--rule); }
.detail-line .line-name { font-size: 1rem; }
.detail-line-returned { border-color: var(--warn); border-left-color: var(--warn); background: var(--warn-soft); }
.detail-line-hit { box-shadow: 0 0 0 3px var(--action); }
.detail-line-state { font-weight: 700; margin-top: 2px; }
.detail-line-qty { font-weight: 800; font-size: 1.1rem; white-space: nowrap; }

/* Önce dağıt, sonra topla: talimat bandı ve raf gözleri */
.sort-band { position: static; margin-bottom: 18px; }
.sort-band small { display: block; margin-top: 6px; font-size: 1.05rem; font-weight: 600; letter-spacing: 0; }
.shelves { margin-bottom: 22px; }
.shelves h2 { font-size: 1.15rem; }
.shelves-hint { color: var(--muted); font-size: 0.9rem; margin: 2px 0 10px; }
.shelf-grid { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.shelf { display: flex; gap: 10px; min-height: 92px; padding: 8px 10px; background: var(--paper); border: 2px solid var(--ink);
  border-top-width: 8px; min-width: 0; }
.shelf-no { font-size: 2.2rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; min-width: 1.2em; }
.shelf-empty { border-color: var(--rule); background: transparent; }
.shelf-empty .shelf-no { color: var(--rule); }
.shelf-free { color: var(--muted); align-self: center; }
.shelf-body { min-width: 0; flex: 1; }
.shelf-order { display: flex; justify-content: space-between; gap: 6px; font-size: 0.95rem; }
.shelf-order strong { overflow: hidden; text-overflow: ellipsis; }
.shelf-progress { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.shelf-status { font-size: 0.82rem; font-weight: 700; margin-top: 2px; }
.shelf-item { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 0.8rem; color: var(--muted); }
.shelf-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shelf-item .btn { min-height: 28px; padding: 2px 8px; font-size: 0.78rem; flex: none; }
.shelf-item-missing { color: var(--ink); font-weight: 700; }
.shelf-item-removed { color: var(--bad); font-weight: 700; }
.shelf-missing { border-color: var(--warn); background: var(--warn-soft); }
.shelf-pull_back { border-color: var(--bad); background: var(--bad-soft); }
.shelf-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.shelf-actions .btn { min-height: 34px; padding: 5px 10px; font-size: 0.82rem; }
.shelf-ready { border-color: var(--ok); background: var(--ok-soft); }
.shelf-blocked { border-color: var(--bad); background: var(--bad-soft); }
.shelf-verify_failed { border-color: var(--warn); background: var(--warn-soft); }

/* Hazırlama: durum bandı ekranın en yüksek sesli öğesi */
.prepare-page main { padding-top: 0; max-width: 1000px; }
.band { position: sticky; top: 0; z-index: 5; margin: 0 0 18px; padding: 20px 24px; font-size: 2.1rem; font-weight: 800;
  line-height: 1.15; letter-spacing: -0.01em; color: #fff; background: var(--ink); }
.band-ok { background: var(--ok); }
.band-bad { background: var(--bad); }
.band-warn { background: var(--warn); color: var(--ink); }

.ticket { display: flex; justify-content: space-between; align-items: stretch; background: var(--paper); border: 2px solid var(--ink);
  border-top-width: 12px; margin-bottom: 14px; }
.ticket-main { padding: 14px 20px 16px; min-width: 0; }
.ticket-label { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.ticket-no { font-size: 2.3rem; font-weight: 800; letter-spacing: 0.01em; line-height: 1.1; overflow-wrap: anywhere; }
.ticket-meta { color: var(--muted); margin-top: 4px; }
.ticket-count { padding: 10px 24px 14px; border-left: 2px dashed var(--ink); text-align: center; font-size: 3.2rem; font-weight: 800;
  line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ticket-count-sep { color: var(--rule); margin: 0 4px; }
.ticket-count .ticket-label { margin-top: 6px; }

.note-box { background: var(--warn-soft); border-left: 8px solid var(--warn); padding: 10px 16px; margin-bottom: 14px; }
.note-box p { font-size: 1.1rem; }

.scan { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.scan label { margin: 0; }
.scan input { flex: 1; font-size: 1.2rem; letter-spacing: 0.04em; }

.lines { list-style: none; display: grid; gap: 8px; }
.line { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 10px 18px 10px 10px;
  background: var(--paper); border: 2px solid var(--ink); border-left-width: 10px; }
.line-img { width: 84px; height: 106px; object-fit: cover; background: var(--table); }
.line-name { font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.line-variant { font-size: 1.05rem; margin-top: 2px; }
.line-codes { color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; white-space: pre-wrap; }
.line-body .btn { margin-top: 8px; }
.line-qty { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.line-qty-done { font-size: 2.6rem; font-weight: 800; }
.line-qty-total { font-size: 1.4rem; color: var(--muted); margin-left: 6px; }
.line-done { border-color: var(--ok); background: var(--ok-soft); }
.line-missing { border-color: var(--warn); background: var(--warn-soft); }
.line-removed { border-color: var(--bad); background: var(--bad-soft); }
.line-flag { font-weight: 700; margin-top: 6px; }
.line-done .line-qty-done { color: var(--ok); }
.line-last { animation: confirm 0.5s ease-out; }
@keyframes confirm { from { box-shadow: 0 0 0 8px var(--ok); } to { box-shadow: 0 0 0 0 transparent; } }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.actions .btn-quiet { margin-left: auto; }

.outcome { margin-top: 18px; padding: 22px 24px; background: var(--paper); border: 2px solid var(--ink); border-left-width: 14px; }
.outcome h2 { font-size: 1.6rem; margin-bottom: 6px; }
.outcome p { font-size: 1.1rem; margin-bottom: 4px; }
.outcome-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.outcome-ok { border-color: var(--ok); }
.outcome-bad { border-color: var(--bad); background: var(--bad-soft); }
.outcome-warn { border-color: var(--warn); }
.is-blocked .lines { opacity: 0.45; }

dialog { width: min(520px, 92vw); border: 2px solid var(--ink); border-top-width: 12px; border-radius: 0; padding: 22px; }
dialog::backdrop { background: rgba(18, 22, 28, 0.6); }
dialog h2 { font-size: 1.4rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

@media (max-width: 760px) {
  html { font-size: 16px; }
  main { padding: 14px 12px 48px; }
  .topbar { padding: 8px 12px; gap: 10px; }
  .topbar { flex-wrap: wrap; }
  .topnav { order: 5; width: 100%; }
  .topnav a { flex: 1; text-align: center; padding: 8px 6px; }
  .returns-layout { grid-template-columns: minmax(0, 1fr); }
  .returns-headrow { display: none; }
  .returns-row { grid-template-columns: 1fr auto; row-gap: 4px; }
  .detail-grid { grid-template-columns: 1fr; }
  .tabs button { padding: 10px 12px; }
  .find-row input { width: auto; flex: 1; min-width: 0; }
  .queue-next, .find { width: 100%; }
  .btn-xl { width: 100%; }
  .shelf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-head { display: none; }
  .order-row { grid-template-columns: 1fr auto; row-gap: 4px; }
  .order-row-no { order: 1; }
  .order-row-qty { order: 2; text-align: right; }
  .order-row-customer { order: 3; }
  .order-row-id { order: 4; text-align: right; }
  .order-row-date { order: 5; }
  .order-row-flags { order: 6; justify-content: flex-end; }
  .order-row-carrier, .order-row-flags:empty { display: none; }
  .order-row-date small { display: inline; margin-left: 6px; }
  .source { text-align: left; }
  .band { font-size: 1.5rem; padding: 14px 20px; }
  .ticket { flex-direction: column; }
  .ticket-count { border-left: 0; border-top: 2px dashed var(--ink); font-size: 2.4rem; }
  .line { grid-template-columns: 60px minmax(0, 1fr) auto; }
  .line-img { width: 60px; height: 76px; }
}
@media (prefers-reduced-motion: reduce) { .line-last { animation: none; } }
.returns-row .order-row-customer { white-space: normal; overflow: visible; overflow-wrap: anywhere; }

/* İade kaydı formu ve günlük */
.subtabs { display: flex; gap: 4px; border-bottom: 3px solid var(--ink); margin-bottom: 16px; }
.subtabs button { font: inherit; font-weight: 700; padding: 10px 16px; border: 0; border-radius: 4px 4px 0 0; background: transparent; color: var(--muted); cursor: pointer; }
.subtabs button[aria-selected=true] { background: var(--ink); color: #fff; }
.detail-title { font-size: 1rem; margin: 14px 0 6px; }
.detail-line { align-items: flex-start; }
.detail-line-body { flex: 1; min-width: 0; }
.detail-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font-size: 0.72rem; font-weight: 700; color: var(--muted); width: 58px; flex: none; text-align: center; }
.detail-pick input { width: 26px; height: 26px; accent-color: var(--action); }
.record-form { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); display: grid; gap: 10px; }
.record-form label { display: grid; gap: 4px; font-weight: 700; }
.record-form .btn { justify-self: start; }
.record-saved { color: var(--muted); font-size: 0.9rem; }
.record-history { margin-top: 6px; border-top: 1px solid var(--rule); }
.record-log { padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 0.9rem; overflow-wrap: anywhere; }
.record-log-head { font-weight: 700; }
.logs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.logs-filter { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.logs-filter label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.logs-filter input { font: inherit; padding: 9px 10px; border: 2px solid var(--ink); border-radius: 4px; background: #fff; }
.logs-actions { display: flex; gap: 8px; }
.logs-actions a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.logs-title { font-size: 1.2rem; margin-bottom: 6px; }
.logs-title span { font-weight: 400; color: var(--muted); }
.logs-table { width: 100%; border-collapse: collapse; background: var(--paper); border: 2px solid var(--ink); font-size: 0.92rem; }
.logs-table th { text-align: left; padding: 9px 10px; border-bottom: 2px solid var(--ink); font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.logs-table td { padding: 9px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .logs-table thead { display: none; }
  .logs-table, .logs-table tbody, .logs-table tr, .logs-table td { display: block; }
  .logs-table tr { border-bottom: 2px solid var(--ink); padding: 6px 0; }
  .logs-table td { border: 0; padding: 3px 10px; }
  .logs-table td:empty { display: none; }
}
@media print {
  .topbar, .offline, .no-print, #view-search, #rcv-view-scan { display: none !important; }
  body { background: #fff; font-size: 10pt; }
  main { max-width: none; padding: 0; }
  .logs-table { border: 0; }
  .logs-table th, .logs-table td { padding: 4px 6px; }
  .logs-table tr { break-inside: avoid; }
}
.returns-row > span:nth-child(4) { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.returns-row .flag { white-space: nowrap; }

/* Ürün kabul */
.receiving-page main { max-width: 1320px; }
.rcv-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
.rcv-scan { flex: 1; min-width: 280px; max-width: 640px; }
.rcv-scan label { display: block; font-weight: 700; margin-bottom: 6px; }
.rcv-scan .find-row input { width: auto; flex: 1; font-size: 1.3rem; letter-spacing: 0.04em; }
.rcv-finish { display: flex; align-items: center; gap: 18px; }
.rcv-count { line-height: 1.1; text-align: right; color: var(--muted); }
.rcv-count strong { display: block; font-size: 2.4rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.rcv-result { background: var(--ok-soft); border: 2px solid var(--ok); border-left-width: 10px; padding: 16px 20px; margin-bottom: 16px; }
.rcv-result h2 { font-size: 1.5rem; margin-bottom: 8px; }
.rcv-result-orders { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 8px; }
.rcv-result-orders a { display: inline-block; padding: 3px 10px; background: var(--paper); border: 1px solid var(--ok); border-radius: 3px;
  color: var(--ink); font-weight: 800; text-decoration: none; }
.rcv-result p { margin-bottom: 12px; }
.rcv-result p:empty { display: none; }
.rcv-result a.btn { display: inline-flex; align-items: center; text-decoration: none; color: #fff; }
.rcv-result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rcv-result-actions [hidden] { display: none; }
.rcv-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.rcv-panel { background: var(--paper); border: 2px solid var(--ink); border-top-width: 12px; }
.rcv-panel h2 { font-size: 1.05rem; padding: 12px 18px; border-bottom: 2px solid var(--ink); }
.rcv-panel-wrong { border-color: var(--bad); }
.rcv-panel-wrong h2 { border-bottom-color: var(--bad); }
.rcv-hint { padding: 10px 18px 0; color: var(--muted); font-size: 0.9rem; }
.rcv-list { list-style: none; margin: 0; padding: 0; }
.rcv-list .empty { padding: 28px 18px; }
.rcv-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--rule); }
.rcv-item:last-child { border-bottom: 0; }
.rcv-item-body { min-width: 0; display: flex; flex-direction: column; }
.rcv-item-name { font-weight: 700; overflow-wrap: anywhere; }
.rcv-item-meta { color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.rcv-item .btn { flex: none; }
.rcv-free { margin-top: 12px; }
@media (max-width: 760px) {
  .rcv-layout { grid-template-columns: 1fr; }
  .rcv-finish { width: 100%; justify-content: space-between; }
  .rcv-count { text-align: left; }
}
.rcv-history-date, .rcv-history-code { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rcv-history-table .flag { white-space: nowrap; }
.rcv-flag-muted { background: var(--table); border-color: var(--rule); color: var(--muted); }
.rcv-row-removed td:nth-child(2), .rcv-row-removed td:nth-child(3) { color: var(--muted); text-decoration: line-through; }

/* Sipariş hazırlama: çok ürünlü sipariş sorusu */
.sort-ask { background: var(--paper); border: 2px solid var(--action); border-top-width: 12px; padding: 18px 22px 20px; margin-bottom: 18px; }
.sort-ask h2 { font-size: 1.7rem; line-height: 1.2; margin-bottom: 6px; }
.sort-ask-order { color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.sort-ask-others { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.sort-ask-others li { display: flex; align-items: center; gap: 14px; padding: 8px 14px 8px 8px; border: 2px solid var(--ink); border-left-width: 8px; background: var(--paper); }
.sort-ask-img { flex: none; width: 72px; height: 92px; object-fit: cover; background: var(--table); }
.sort-ask-item { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sort-ask-name { font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.sort-ask-variant { font-size: 0.95rem; }
.sort-ask-code { color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.sort-ask-qty { margin-left: auto; font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.sort-ask-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sort-ask-actions .btn-quiet { margin-left: auto; }
.sort-ask-note { margin-top: 12px; color: var(--bad); font-weight: 700; }
@media (max-width: 760px) {
  .sort-ask h2 { font-size: 1.3rem; }
  .sort-ask-actions .btn-quiet { margin-left: 0; width: 100%; }
}

/* Rafın içi */
.shelf-grid .shelf:not(.shelf-empty) { cursor: pointer; }
.shelf-grid .shelf:not(.shelf-empty):hover { box-shadow: inset 0 0 0 2px var(--action); }
.shelf-detail { background: var(--paper); border: 2px solid var(--ink); border-top-width: 12px; }
.shelf-detail.shelf-ready, .shelf-detail.shelf-blocked, .shelf-detail.shelf-missing, .shelf-detail.shelf-pull_back,
.shelf-detail.shelf-verify_failed { background: var(--paper); }
.shelf-detail-head { display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-bottom: 2px solid var(--ink); flex-wrap: wrap; }
.shelf-detail-no { font-size: 2.6rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.shelf-detail-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.shelf-detail-title strong { font-size: 1.3rem; overflow-wrap: anywhere; }
.shelf-detail-title span { font-weight: 700; font-size: 0.92rem; color: var(--muted); }
.shelf-detail-progress { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.shelf-detail-lines { list-style: none; margin: 0; padding: 0; }
.shelf-line { display: flex; align-items: center; gap: 14px; padding: 10px 18px 10px 10px; border-bottom: 1px solid var(--rule); border-left: 8px solid var(--rule); }
.shelf-line:last-child { border-bottom: 0; }
.shelf-line .sort-ask-item { flex: 1; }
.shelf-line-side { display: flex; align-items: center; gap: 10px; flex: none; }
.shelf-line-count { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.shelf-line-flag { white-space: nowrap; }
.shelf-line-done { border-left-color: var(--ok); }
.shelf-line-done .shelf-line-flag { background: var(--ok-soft); border-color: var(--ok); }
.shelf-line-missing { border-left-color: var(--warn); background: var(--warn-soft); }
.shelf-line-missing .shelf-line-flag { background: var(--warn); }
.shelf-line-removed { border-left-color: var(--bad); background: var(--bad-soft); }
.shelf-line-removed .shelf-line-flag { background: var(--bad); border-color: var(--bad); color: #fff; }
.shelf-line-waiting .shelf-line-flag { background: var(--table); border-color: var(--rule); }
@media (max-width: 760px) {
  .shelf-line { flex-wrap: wrap; }
  .shelf-line-side { width: 100%; justify-content: flex-end; }
}

/* Ürün toplama: telefonda, mağazada ayakta kullanılır */
.pick-title { font-size: 1.5rem; margin: 6px 0 14px; }
.pick-title small { font-size: 1rem; font-weight: 700; color: var(--muted); margin-left: 8px; font-variant-numeric: tabular-nums; }
.pick-locations { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.pick-loc { font: inherit; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 22px 20px; min-height: 110px;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-top-width: 12px; border-radius: 4px; cursor: pointer; text-align: left; }
.pick-loc strong { font-size: 1.8rem; line-height: 1.1; }
.pick-loc span { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.pick-loc:hover { box-shadow: inset 0 0 0 2px var(--action); }
.pick-loc-done { border-color: var(--ok); background: var(--ok-soft); }
.pick-done { padding: 14px 18px; margin-bottom: 18px; background: var(--ok-soft); border-left: 8px solid var(--ok); font-weight: 700; }
.pick-upload { background: var(--paper); border: 2px solid var(--rule); padding: 14px 18px; }
.pick-upload label { display: block; font-weight: 700; margin-bottom: 6px; }
.pick-upload .rcv-hint { padding: 8px 0 0; }
.pick-upload .returns-summary { margin: 8px 0 0; }
.pick-work-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pick-scan { max-width: none; margin-bottom: 14px; }
.pick-camera-btn { margin-top: 10px; }
.pick-camera-box { background: #000; margin-bottom: 14px; border: 2px solid var(--ink); }
.pick-video { display: block; width: 100%; max-height: 46vh; object-fit: cover; background: #000; }
.pick-camera-status { color: #fff; padding: 8px 12px; font-weight: 600; }
.pick-list { background: var(--paper); border: 2px solid var(--ink); margin-bottom: 16px; }
.pick-item { border-left: 8px solid var(--rule); align-items: flex-start; }
.pick-item.pick-picked { border-left-color: var(--ok); background: var(--ok-soft); }
.pick-item.pick-missing { border-left-color: var(--bad); background: var(--bad-soft); }
.pick-main { display: flex; gap: 12px; align-items: flex-start; min-width: 0; flex: 1; }
.pick-img { flex: none; width: 60px; height: 78px; object-fit: cover; background: var(--table); border: 1px solid var(--rule); border-radius: 3px; }
.pick-img-zoomable { cursor: zoom-in; }
.pick-qty { background: var(--ink); border-color: var(--ink); color: #fff; font-size: 0.95rem; }
.pick-item.pick-partial { border-left-color: var(--warn); }
.pick-zoom { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 16px; background: rgba(0, 0, 0, 0.88); cursor: zoom-out; }
.pick-zoom[hidden] { display: none; }
.pick-zoom-img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; background: #fff; border-radius: 4px; }
.pick-zoom-name { color: #fff; font-weight: 700; text-align: center; margin: 0; }
.pick-flags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.pick-actions { display: flex; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.pick-btn-missing { border-color: var(--bad); color: var(--bad); }
.pick-finish { width: 100%; }
.pick-complete-box { margin-bottom: 18px; }
.pick-complete-box .rcv-hint { padding: 8px 0 0; }
.pick-complete-box .pick-confirm { margin-top: 12px; }
.pick-loc-editing { border-color: var(--warn, #b26a00); }
.pick-locked { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px;
  margin-bottom: 14px; background: var(--ok-soft); border-left: 8px solid var(--ok); font-weight: 700; }
.pick-reset { margin-top: 14px; }
.pick-reset-confirm { margin-top: 12px; border-color: var(--bad); }
.pick-btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.logs-filter select { font: inherit; padding: 9px 10px; border: 2px solid var(--ink); border-radius: 4px; background: #fff; min-height: 44px; }
.pick-confirm { margin-top: 4px; }
@media (max-width: 760px) {
  .topnav { flex-wrap: wrap; }
  .topnav a { flex: 1 1 40%; }
  .pick-locations { grid-template-columns: 1fr; }
  .pick-loc { min-height: 0; padding: 16px 18px; flex-direction: row; align-items: baseline; justify-content: space-between; }
  .pick-item { flex-direction: column; }
  .pick-actions { width: 100%; justify-content: stretch; }
  .pick-actions .btn { flex: 1; }
  .pick-camera-btn { width: 100%; }
  .pick-scan .find-row input { font-size: 1.1rem; }
}
.picking-page .logs-table .flag { white-space: nowrap; }

/* -- fiyatlar ------------------------------------------------------------- */
.line-price, .sort-ask-price { font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.order-total { margin: 12px 0 0; padding: 10px 14px; border: 2px solid var(--ink); background: var(--paper); font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.order-row-qty small { display: block; color: var(--muted); font-size: 0.82rem; white-space: nowrap; }

/* -- iade kaydı: sebep listesi, aksiyon, değişim, para iadesi ---------------- */
.detail-total { margin-top: 8px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.record-field { display: grid; gap: 4px; }
.record-label { font-weight: 700; }
.multi { border: 2px solid var(--ink); background: var(--paper); }
.multi summary { padding: 10px 12px; cursor: pointer; font-weight: 600; }
.multi[open] summary { border-bottom: 1px solid var(--rule); }
.multi-list { display: grid; gap: 2px; padding: 8px 12px; }
.multi-list .check { display: flex; align-items: center; gap: 8px; font-weight: 600; padding: 4px 0; cursor: pointer; }
.record-given { font-weight: 700; font-variant-numeric: tabular-nums; }
.record-actions { border: 2px solid var(--ink); padding: 10px 12px 12px; display: grid; gap: 6px; }
.record-actions legend { font-weight: 800; padding: 0 6px; }
.record-form .action-pick { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--rule); cursor: pointer; font-weight: 700; }
.action-pick input { width: 24px; height: 24px; accent-color: var(--action); flex: none; }
.action-pick:has(input:checked) { border-color: var(--action); box-shadow: inset 6px 0 0 var(--action); background: #e3e9fb; }
.record-hint { color: var(--muted); font-weight: 600; }
.record-hint:empty { display: none; }
.record-error { color: var(--bad); font-weight: 700; }
.record-state { font-weight: 700; }
.exchange { border: 2px solid var(--ink); padding: 12px; display: grid; gap: 8px; }
.exchange > input { width: 100%; }
.exchange-results, .exchange-picked { list-style: none; display: grid; gap: 6px; }
.exchange-results { max-height: 340px; overflow-y: auto; }
.exchange-result { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid var(--rule); background: var(--paper); font: inherit; text-align: left; cursor: pointer; }
.exchange-result:hover, .exchange-result:focus-visible { border-color: var(--action); background: #f1f3f6; }
.exchange-result-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.exchange-result-body small, .exchange-result-side small { color: var(--muted); font-variant-numeric: tabular-nums; }
.exchange-result-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.exchange-result-side .exchange-nostock { color: var(--bad); font-weight: 700; }
.exchange-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--rule); border-left: 6px solid var(--action); }
.exchange-side { display: grid; grid-template-columns: auto 84px; gap: 4px 8px; align-items: center; flex: none; }
.exchange-side input { width: 84px; padding: 6px 8px; font: inherit; font-variant-numeric: tabular-nums; }
.exchange-side .btn { grid-column: 1 / -1; justify-self: end; }
.exchange-sum { border-top: 2px solid var(--ink); padding-top: 8px; display: grid; gap: 4px; }
.exchange-sum p { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.exchange-sum .exchange-diff { font-size: 1.1rem; padding-top: 4px; border-top: 1px solid var(--rule); }
.dialog-text { margin-top: 8px; line-height: 1.4; }
.dialog-error { color: var(--bad); font-weight: 700; min-height: 1.2em; margin-top: 6px; }
dialog input[type=text] { width: 100%; padding: 10px 12px; font: inherit; font-variant-numeric: tabular-nums; }
.dialog-actions { flex-wrap: wrap; }
.refunds-table td:last-child { white-space: nowrap; }
.subtabs .count { background: var(--warn); color: var(--ink); }
.pusula-durum { white-space: nowrap; }
.pusula-durum .flag + .flag, .pusula-durum .flag + button { margin-left: 4px; }
dialog label input { margin-top: 6px; }
.refunds-table td:nth-child(2), .refunds-table td:nth-child(6), .logs-table td.pusula-money { white-space: nowrap; overflow-wrap: normal; }

/* -- iade kayıtları / para iadesi tabloları: sığma düzeltmeleri ---------------- */
.logs-scroll { overflow-x: auto; }
.logs-table td { overflow-wrap: break-word; }
.logs-wide { min-width: 1080px; }
.refunds-table { min-width: 900px; }
.cell-nowrap, .logs-table .flag { white-space: nowrap; }
.cell-nowrap small { display: block; color: var(--muted); }
.cell-money { text-align: right; font-variant-numeric: tabular-nums; }
.cell-list span { display: block; }
.cell-list span + span { margin-top: 3px; padding-top: 3px; border-top: 1px dotted var(--rule); }
.cell-long { max-width: 260px; }
.cell-more { display: block; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.cell-more .clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
.cell-more:hover .clamp, .cell-more:focus-visible .clamp { text-decoration-color: var(--action); color: var(--action); }
.dialog-text { white-space: pre-wrap; overflow-wrap: break-word; max-height: 60vh; overflow-y: auto; }
.toggle { display: inline-flex; }
.toggle .btn { border-radius: 0; }
.toggle .btn:first-child { border-radius: 4px 0 0 4px; }
.toggle .btn:last-child { border-radius: 0 4px 4px 0; margin-left: -2px; }
.toggle .btn[aria-pressed=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (max-width: 760px) {
  .logs-wide, .refunds-table { min-width: 0; }
  .cell-long { max-width: none; }
  .cell-money { text-align: left; }
}
@media print {
  .logs-scroll { overflow: visible; }
  .logs-wide, .refunds-table { min-width: 0; }
  .cell-more .clamp { display: block; -webkit-line-clamp: unset; line-clamp: unset; text-decoration: none; }
}
