/* Fuar İade Sayım — depo ve muhasebe için sade, okunaklı arayüz */
:root {
  --bg: #f3f4f1;
  --surface: #ffffff;
  --surface-2: #f8f9f6;
  --ink: #1b2230;
  --muted: #5b6372;
  --line: #d8dbd2;
  --accent: #1d5a86;
  --accent-ink: #ffffff;
  --accent-soft: #e3edf5;
  --brand: #b3261e;
  --ok: #1d7444;
  --ok-soft: #e2f2e8;
  --warn: #a96300;
  --warn-soft: #fbefd9;
  --bad: #b3261e;
  --bad-soft: #fbe4e2;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --radius: 8px;
  color-scheme: light;
}
/* Uygulama her zaman koyu temada açılır (tarayıcı/Chrome ayarından bağımsız) */
@media all {
  :root {
    --bg: #14181f;
    --surface: #1c222b;
    --surface-2: #222934;
    --ink: #e7eaee;
    --muted: #9aa3b0;
    --line: #333c49;
    --accent: #5fa3d6;
    --accent-ink: #0d1520;
    --accent-soft: #1f3243;
    --ok: #5cc48a;
    --ok-soft: #173326;
    --warn: #e7a945;
    --warn-soft: #3a2c14;
    --bad: #f07b72;
    --bad-soft: #3d1c1a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; margin: 0; text-wrap: balance; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.pad { padding: 24px 0; }
.small { font-size: 0.85rem; }

/* Üst bar */
.topbar { background: var(--ink); color: var(--bg); }
@media all { .topbar { background: #0c0f14; color: var(--ink); } }
.topbar-in {
  max-width: 1200px; margin: 0 auto;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.brand { color: inherit; text-decoration: none; font-weight: 700; letter-spacing: 0.01em; display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 22px; height: 16px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 4px, currentColor 4px 5px, transparent 5px 8px);
}
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a, .nav button {
  color: inherit; text-decoration: none; background: none; border: 0; font: inherit;
  padding: 6px 10px; border-radius: 6px; cursor: pointer; opacity: 0.85;
}
.nav a:hover, .nav button:hover, .nav a.on { opacity: 1; background: rgba(255, 255, 255, 0.12); }
.nav .who { opacity: 0.7; font-size: 0.85rem; padding: 6px 10px; }

.wrap {
  max-width: 1200px; margin: 0 auto;
  padding-block: 24px 64px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.crumbs { font-size: 0.85rem; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* Kart/panel */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel-flush { padding: 0; overflow: hidden; }
.panel h2 + * { margin-top: 12px; }

/* Butonlar ve form */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; padding: 9px 16px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); border-color: var(--bad); background: transparent; }
.btn.danger.solid { background: var(--bad); color: #fff; }
.btn.big { padding: 14px 22px; font-size: 1.05rem; }
.btn.sm { padding: 5px 10px; font-size: 0.85rem; font-weight: 600; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible, input:focus-visible, select:focus-visible, .chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

textarea { resize: vertical; line-height: 1.5; font: inherit; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=email], input[type=tel], input[type=date], select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 7px; padding: 9px 11px; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.alert { padding: 12px 14px; border-radius: 7px; border: 1px solid; }
.alert.bad { background: var(--bad-soft); border-color: var(--bad); color: var(--ink); }
.alert.warn { background: var(--warn-soft); border-color: var(--warn); color: var(--ink); }
.alert.ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ink); }
.alert.info { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }

.pill { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; letter-spacing: 0.03em; text-transform: uppercase; }
.pill.open { background: var(--ok-soft); color: var(--ok); }
.pill.closed { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }

/* Tablolar */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--surface-2); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
tr.detail td { background: var(--surface-2); font-size: 0.85rem; }
td.boxes { white-space: nowrap; }
.bx { display: inline-block; white-space: nowrap; font-size: 0.85rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 7px; margin: 1px 4px 1px 0; }
.bx b { font-variant-numeric: tabular-nums; }
tr.tot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--line); }
tr.sec td { background: var(--bad-soft); color: var(--ink); font-weight: 700; border-top: 2px solid var(--line); }
tr.sec td small { font-weight: 400; color: var(--muted); }
tr.unk td.mono { color: var(--bad); }
tfoot td { font-weight: 700; background: var(--surface-2); border-top: 2px solid var(--line); border-bottom: 0; }
td.pos { color: var(--warn); font-weight: 700; }
td.neg { color: var(--bad); font-weight: 700; }
td.zero { color: var(--ok); font-weight: 700; }

/* İlerleme */
.bar { height: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; min-width: 90px; }
.bar > span { display: block; height: 100%; background: var(--accent); }

/* Özet kutuları */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tile .k { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.tile .v { font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 4px; }
.tile .s { font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tile.hl { border-color: var(--warn); box-shadow: inset 4px 0 0 var(--warn); }

/* Filtre çipleri */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 5px 12px; border-radius: 999px;
}
.chip .c { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 4px; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.on .c { color: inherit; opacity: 0.7; }

/* Giriş */
.login { max-width: 380px; margin: 8vh auto 0; }

/* Dosya seçme alanı */
.drop {
  border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 36px 20px; text-align: center; cursor: pointer; display: block;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* ===== Okutma ekranı ===== */
.scan-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .scan-grid { grid-template-columns: minmax(0, 1fr); } }
.scan-input-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.scan-input {
  flex: 1 1 260px; min-width: 0;
  font: 700 1.8rem/1.2 var(--mono) !important; letter-spacing: 0.04em;
  padding: 14px 16px !important; border-width: 2px !important;
}
.mul { width: 110px; text-align: center; font-size: 1.4rem !important; font-weight: 700; }
.mul-wrap { display: flex; flex-direction: column; gap: 4px; font-size: 0.75rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

.feedback {
  border-radius: var(--radius); border: 2px solid var(--line); background: var(--surface);
  padding: 20px; min-height: 170px; display: flex; flex-direction: column; justify-content: center; gap: 6px;
}
.feedback .fb-title { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.feedback .fb-name { font-size: 1.5rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.feedback .fb-meta { font-size: 1rem; font-variant-numeric: tabular-nums; }
.feedback .fb-meta b { font-size: 1.15rem; }
.feedback.ok { border-color: var(--ok); background: var(--ok-soft); }
.feedback.ok .fb-title { color: var(--ok); }
.feedback.warn { border-color: var(--warn); background: var(--warn-soft); }
.feedback.warn .fb-title { color: var(--warn); }
.feedback.bad { border-color: var(--bad); background: var(--bad-soft); }
.feedback.bad .fb-title { color: var(--bad); }
.feedback.flash { animation: flash 0.35s ease-out; }
@keyframes flash { from { transform: scale(1.015); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .feedback.flash { animation: none; } }

.counter { text-align: center; padding: 18px; }
.counter .v { font-size: 3.4rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.counter .k { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; margin-top: 6px; }

.recent { list-style: none; margin: 0; padding: 0; max-height: 52vh; overflow-y: auto; }
.recent li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.recent li:last-child { border-bottom: 0; }
.recent .q { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 2.5em; }
.recent .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent .t small { display: block; color: var(--muted); font-family: var(--mono); }
.recent li.unk .t { color: var(--bad); }
.recent li.pending { opacity: 0.55; }

.netbar { position: sticky; top: 0; z-index: 5; }

/* Bildirim */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 8px; font-weight: 600;
  max-width: calc(100% - 32px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); z-index: 50;
}
.toast.bad { background: var(--bad); color: #fff; }

.confirm-box { border: 1px solid var(--bad); background: var(--bad-soft); border-radius: var(--radius); padding: 14px; }

@media (max-width: 560px) {
  h1 { font-size: 1.25rem; }
  .tile .v { font-size: 1.4rem; }
  .scan-input { font-size: 1.4rem !important; }
  .counter .v { font-size: 2.6rem; }
}

/* İşlem geçmişi ve kapanış kontrolü */
details.act > summary { cursor: pointer; padding: 12px 16px; list-style: revert; }
details.act[open] > summary { border-bottom: 1px solid var(--line); }
.checklist { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.checklist li { padding-left: 26px; position: relative; }
.checklist li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.checklist li.chk-ok::before { content: "✓"; color: var(--ok); }
.checklist li.chk-warn::before { content: "!"; color: var(--warn); border: 2px solid var(--warn); border-radius: 50%; width: 16px; height: 16px; font-size: 11px; line-height: 13px; text-align: center; top: 3px; }

/* ===== Giriş ekranı ===== */
body.login-mode .topbar { display: none; }
body.login-mode #app { max-width: none; padding: 0; }
.lg { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; }
.lg-brand {
  position: relative; overflow: hidden; background: var(--brand); color: #fff;
  padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
}
.lg-brand::before {
  content: ""; position: absolute; inset: 0; opacity: 0.13;
  background: repeating-linear-gradient(90deg, #fff 0 3px, transparent 3px 7px, #fff 7px 8px, transparent 8px 13px, #fff 13px 17px, transparent 17px 20px, #fff 20px 21px, transparent 21px 27px);
}
.lg-brand::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.35)); }
.lg-brand > * { position: relative; z-index: 1; }
.lg-mark { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: 0.02em; }
.lg-mark i { width: 34px; height: 24px; border-radius: 3px; background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 4px, #fff 4px 5px, transparent 5px 8px); }
.lg-hero h1 { font-size: 2.9rem; line-height: 1.08; margin: 0 0 14px; font-weight: 800; letter-spacing: -0.01em; max-width: 12ch; }
.lg-hero p { margin: 0; font-size: 1.1rem; opacity: 0.92; max-width: 38ch; line-height: 1.5; }
.lg-steps { display: flex; gap: 10px; flex-wrap: wrap; }
.lg-steps span { font-size: 0.85rem; font-weight: 600; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.28); padding: 6px 12px; border-radius: 999px; }
.lg-side { display: flex; align-items: center; justify-content: center; padding: 40px max(24px, env(safe-area-inset-right, 0px)) 40px max(24px, env(safe-area-inset-left, 0px)); background: var(--bg); }
.lg-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.lg-form h2 { margin: 0; font-size: 1.7rem; }
.lg-sub { margin: -8px 0 8px; color: var(--muted); }
.lg-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.lg-field input { width: 100%; font-size: 1rem; padding: 12px 14px; border-radius: 9px; }
.lg-pw { position: relative; display: block; }
.lg-pw input { padding-right: 76px; }
.lg-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.lg-eye:hover { color: var(--ink); background: var(--surface-2); }
.lg-caps { font-size: 0.8rem; color: var(--warn); font-weight: 700; margin-top: -6px; }
.lg-go { font: inherit; font-weight: 700; font-size: 1rem; padding: 13px; border: 0; border-radius: 9px; background: var(--ink); color: var(--bg); cursor: pointer; margin-top: 4px; }
.lg-go:hover { filter: brightness(1.15); }
.lg-go:disabled { opacity: 0.6; cursor: wait; }
.lg-go:focus-visible, .lg-eye:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lg-foot { font-size: 0.78rem; color: var(--muted); text-align: center; margin-top: 8px; }
@media (max-width: 820px) {
  .lg { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .lg-brand { padding: 28px 24px 42px; gap: 20px; }
  .lg-hero h1 { font-size: 1.9rem; }
  .lg-hero p { font-size: 0.95rem; }
  .lg-steps { display: none; }
  .lg-side { align-items: flex-start; padding-top: 28px; }
}

/* Koşan kedi (imza) */
.lg-run { position: absolute; left: 0; right: 0; bottom: 96px; height: 54px; overflow: hidden; pointer-events: none; z-index: 1; }
.lg-cat { position: absolute; left: 0; bottom: 0; width: 90px; height: 54px; animation: lg-cross 11s linear infinite, lg-bob 0.36s ease-in-out infinite alternate; opacity: 0.95; }
.lg-cat .legs line { stroke: #fff; stroke-width: 5; stroke-linecap: round; transform-box: fill-box; transform-origin: 50% 0; }
.lg-cat .legs .l1 { animation: lg-leg 0.36s ease-in-out infinite alternate; }
.lg-cat .legs .l2 { animation: lg-leg 0.36s ease-in-out infinite alternate-reverse; }
.lg-cat .front .l1 { animation-direction: alternate-reverse; }
.lg-cat .front .l2 { animation-direction: alternate; }
.lg-cat .tail { transform-box: fill-box; transform-origin: 100% 100%; animation: lg-tail 0.72s ease-in-out infinite alternate; }
@keyframes lg-cross { from { transform: translateX(-110px); } to { transform: translateX(calc(50vw + 40px)); } }
@keyframes lg-bob { from { margin-bottom: 0; } to { margin-bottom: 4px; } }
@keyframes lg-leg { from { transform: rotate(38deg); } to { transform: rotate(-38deg); } }
@keyframes lg-tail { from { transform: rotate(-8deg); } to { transform: rotate(10deg); } }
@media (max-width: 820px) {
  .lg-run { bottom: 4px; height: 30px; }
  .lg-cat { width: 50px; height: 30px; animation-duration: 8s, 0.36s; }
  @keyframes lg-cross { from { transform: translateX(-60px); } to { transform: translateX(calc(100vw + 20px)); } }
}
@media (prefers-reduced-motion: reduce) {
  .lg-cat, .lg-cat .legs line, .lg-cat .tail { animation: none; }
  .lg-cat { left: auto; right: 56px; }
}

/* Koli sınırı */
.counter .lim { font-size: 1.4rem; color: var(--muted); font-weight: 700; }
.counter .v.near { color: var(--warn); }
.counter .v.full { color: var(--bad); }
.cqty { margin-top: 6px; font-size: 0.95rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.cbar { margin: 10px auto 0; max-width: 220px; height: 8px; }
.cbar.near > span { background: var(--warn); }
.cbar.full > span { background: var(--bad); }
.full-box { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  border: 2px solid var(--warn); background: var(--warn-soft); border-radius: var(--radius); padding: 14px 16px; }
.full-box > div { flex: 1 1 280px; min-width: 0; }

/* Eski fuarlar bölümü */
table.fairs { table-layout: fixed; min-width: 860px; }
table.fairs td:first-child { overflow-wrap: anywhere; }
.oldsec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 700; }
.oldsec > summary::-webkit-details-marker { display: none; }
.oldsec > summary:hover { border-color: var(--muted); }
.oldsec > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.oldsec .chev { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.8rem; transition: transform 0.15s; }
.oldsec[open] .chev { transform: rotate(90deg); }
.oldsec[open] > summary { border-radius: var(--radius) var(--radius) 0 0; border-bottom: 0; }
.oldsec .cnt { font-weight: 600; color: var(--muted); font-size: 0.85rem; }
.oldsec .hint { margin-left: auto; font-weight: 500; color: var(--muted); font-size: 0.85rem; }
.oldsec .panel { border-top-left-radius: 0; border-top-right-radius: 0; }
@media (prefers-reduced-motion: reduce) { .oldsec .chev { transition: none; } }

.lay { white-space: nowrap; line-height: 1.35; margin-top: 2px; }

/* Fuarlar listesi yenileme */
.rf { gap: 8px; }
.rf-c { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; font-size: 0.85rem; }
.rf-ico { display: inline-block; font-size: 1.05rem; line-height: 1; }
.rf.spin .rf-ico { animation: rfspin 0.8s linear infinite; }
@keyframes rfspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rf.spin .rf-ico { animation: none; } }

.auto-box { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  border: 2px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 14px 16px; font-size: 1.05rem; }
.auto-box > div { flex: 1 1 280px; min-width: 0; }

/* Stok kartları */
.checkline { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.checkline input { margin-top: 3px; flex: none; }
.sc-form { flex-wrap: wrap; align-items: flex-end; }
.sc-form .field { min-width: 160px; }
.sc-form .field.grow { min-width: 260px; }

/* Fuarlar listesi: sayımı açık fuar sarı; açık kolisi olan (okutulan) fuar ayrıca yanıp söner */
.pill.live { background: #ffd43b; color: #3d2e00; border: 1px solid #e0b400; }
.pill.live.blink { animation: live-blink 1.2s ease-in-out infinite; }
@keyframes live-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .pill.live.blink { animation-duration: 2.4s; } }

/* Koli kilidi: başkası okutuyor / devralındı / koli kapandı */
.lock-box { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  border: 2px solid var(--warn); background: var(--warn-soft); border-radius: var(--radius); padding: 14px 16px; }
.lock-box.bad { border-color: var(--bad); background: var(--bad-soft); }
.lock-box > div:first-child { flex: 1 1 320px; min-width: 0; }
.lock-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lock-actions .confirm-box { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }

/* ===================== Fuar Satış ===================== */
.net { font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-left: 14px; white-space: nowrap; }
.net.ok { background: var(--ok-soft); color: var(--ok); }
.net.warn { background: var(--warn-soft); color: var(--warn); }
.net.bad { background: var(--bad-soft); color: var(--bad); animation: live-blink 1.4s ease-in-out infinite; }
.toast.warn { background: #ffd43b; color: #3d2e00; }
.pad { padding: 10px 14px; }
.b { font-weight: 700; }
.neg { color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); border-color: var(--line); }
.btn.danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.kbd { font-size: 0.72rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: rgba(0,0,0,0.18); margin-left: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg button { background: var(--surface-2); color: var(--ink); border: 0; padding: 7px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.seg button.on.bad { background: var(--bad); color: #fff; }
.seg.sm button { padding: 2px 9px; font-size: 0.85rem; }
.field.inline { flex-direction: row; align-items: center; gap: 8px; }
.tiles.mini .tile { padding: 10px 12px; }
.tiles.mini .v { font-size: 1.2rem; }
.tile.accent { border-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1000px) { .grid2 { grid-template-columns: 1fr; } }
.fair-card h2 { font-size: 1.25rem; }
.fair-card.closed { opacity: 0.85; }
ul.plain { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
tr.cancelled td { text-decoration: line-through; color: var(--muted); }
tr.cancelled td:last-child { text-decoration: none; }
.sumgrid { display: grid; grid-template-columns: auto auto; justify-content: end; gap: 4px 24px; text-align: right; }
.sumgrid .big { font-size: 1.2rem; }
.rangebar { gap: 14px; }

/* Satış ekranı */
body.pos-mode .wrap { max-width: none; padding: 14px 18px; }
.pos-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pos-head h1 { font-size: 1.3rem; }
.pos-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .pos-grid { grid-template-columns: 1fr; } }
.pos.iade .scan-input { border-color: var(--bad); }
.pos.iade .pos-head h1::after { content: '  · İADE MODU'; color: var(--bad); }
.scanbar { position: relative; margin-bottom: 12px; }
.scanbar .scan-input { width: 100%; }
.hits { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 12px 30px rgba(0,0,0,0.4); max-height: 360px; overflow: auto; }
.hits button { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 9px 14px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.hits button:hover, .hits button:focus { background: var(--accent-soft); outline: none; }
.hits small { display: block; color: var(--muted); font-size: 0.8rem; }
.modal-in { border: 2px solid var(--bad); margin-bottom: 12px; }
.cart-wrap { max-height: calc(100vh - 230px); overflow: auto; }
table.cart { width: 100%; }
table.cart th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; }
table.cart td { vertical-align: middle; }
table.cart .cname { font-weight: 600; }
table.cart td.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
table.cart tr.flash td { animation: rowflash 0.9s ease-out; }
@keyframes rowflash { from { background: var(--accent-soft); } to { background: transparent; } }
.qtybox { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.qtybox button { width: 30px; height: 30px; background: var(--surface-2); border: 0; color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.qtybox input { width: 46px; height: 30px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; padding: 0; border-radius: 0; }
.totals .trow { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 30px; }
.totals .trow.muted { color: var(--muted); }
.totals .rnd { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.totals .trow > span:first-child { white-space: nowrap; }
.totals input { padding: 5px 8px; }
.bigtotal { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--line); padding-top: 10px; margin-top: 4px; }
.bigtotal span { font-weight: 700; letter-spacing: 0.04em; color: var(--muted); }
.bigtotal b { font-size: 2.1rem; font-variant-numeric: tabular-nums; }
.bigtotal.bad b { color: var(--bad); }
.seg.pay { display: flex; }
.seg.pay button { flex: 1; padding: 10px; }
.change { font-size: 1.1rem; }
.done-btn { width: 100%; font-size: 1.2rem; padding: 16px; }
.done-panel { border: 2px solid var(--ok); background: var(--ok-soft); border-radius: var(--radius); padding: 14px 16px; text-align: center; }
.done-panel.bad { border-color: var(--bad); background: var(--bad-soft); }
.done-panel .t { font-weight: 800; color: var(--ok); }
.done-panel.bad .t { color: var(--bad); }
.done-panel .v { font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.done-panel .chg { font-size: 1.4rem; margin-top: 6px; }
.recent-h { padding: 10px 14px; border-bottom: 1px solid var(--line); }
ul.recent li { display: grid; grid-template-columns: 46px 1fr auto auto; gap: 10px; align-items: center; padding: 7px 14px; border-bottom: 1px solid var(--line); }

/* Satış ekranı: müşteri, işlem butonları, pencereler */
.cust .k, .pay-top .k { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 86px; border-radius: var(--radius); border: 0;
  font: inherit; font-weight: 800; letter-spacing: 0.03em; color: #fff; cursor: pointer; padding: 10px; text-align: center; }
.act .ico { font-size: 1.5rem; line-height: 1; }
.act small { font-weight: 600; font-size: 0.85rem; opacity: 0.9; }
.act:disabled { opacity: 0.4; cursor: not-allowed; }
.act:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.act.info { background: #2b3a55; }
.act.info:hover { background: #34476a; }
.act.info.set { background: #7a5b00; }
.act.cancel { background: #c0392b; }
.act.cancel:hover { background: #d4473a; }
.act.pay { background: #1f9d4c; min-height: 110px; font-size: 1.25rem; }
.act.pay:hover { background: #24b358; }
.act.refund { background: #c0392b; min-height: 110px; font-size: 1.25rem; }
.act[data-sure="1"] { background: #ffd43b; color: #3d2e00; }
.ov { position: fixed; inset: 0; z-index: 50; background: rgba(5, 8, 12, 0.72); display: flex; align-items: center; justify-content: center; padding: 20px; }
.ov-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; width: min(640px, 100%); max-height: 94vh; overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.ov-box.wide { width: min(1100px, 100%); }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-form .span2 { grid-column: span 2; }
.grid-form textarea { resize: vertical; }
.pay-box { width: min(820px, 100%); display: flex; flex-direction: column; gap: 18px; }
.pay-box.refund { border-color: var(--bad); }
.pay-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pay-total { font-size: 3.2rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pay-box.refund .pay-total { color: var(--bad); }
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.methods .m { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 110px; border-radius: 10px;
  border: 3px solid transparent; font: inherit; font-size: 1.15rem; font-weight: 800; color: #fff; cursor: pointer; opacity: 0.55; }
.methods .m span { font-size: 1.7rem; }
.methods .m.on { opacity: 1; border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,0.15); }
.methods .m:hover { opacity: 0.85; }
.methods .cash { background: #1f9d4c; }
.methods .card { background: #2563c9; }
.methods .mix { background: #7c3aed; }
.pay-body { min-height: 120px; display: flex; flex-direction: column; gap: 12px; }
.big-field input { font-size: 1.8rem; padding: 10px 14px; font-weight: 700; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.quick button { flex: 1; min-width: 90px; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.quick button:hover { border-color: var(--accent); }
.change-big { font-size: 1.3rem; font-weight: 700; color: var(--muted); display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 10px; }
.change-big b { font-size: 2.4rem; color: var(--ok); font-variant-numeric: tabular-nums; }
.change-big.neg b { color: var(--bad); }
.pay-note { font-size: 1.3rem; padding: 16px; border-radius: var(--radius); background: var(--surface-2); }
.act.confirm { min-height: 84px; font-size: 1.4rem; }
.big-stock { font-size: 1.4rem; font-weight: 800; }
@media (max-width: 700px) { .methods { grid-template-columns: 1fr; } .grid-form { grid-template-columns: 1fr; } .grid-form .span2 { grid-column: auto; } }

ul.recent li.muted { display: block; }
