/* Sade stok / bakim ekrani: buyuk karolar, buyuk dugmeler. Telefon once (375px), her dokunma alani >= 48px. */
:root {
  --inv-on: #ffffff;           /* dolu renkli dugme ustundeki yazi */
  --inv-orange: #d2601a;       /* "Kullandim" */
  --inv-orange-soft: #fdebdc;
  --inv-yellow: #e5a800;       /* trafik isigi sarisi (nokta, cubuk, cerceve) */
  --inv-yellow-soft: #fff4c7;
  --inv-yellow-ink: #7a5000;   /* sari zemin ustunde okunur yazi */
}
@media (prefers-color-scheme: dark) {
  :root {
    --inv-on: #14151a;
    --inv-orange: #ff9f5a;
    --inv-orange-soft: #43301f;
    --inv-yellow: #f2c033;
    --inv-yellow-soft: #3d3420;
    --inv-yellow-ink: #f6d064;
  }
}

/* durum renkleri: yesil / sari / kirmizi / gri  (--lv: nokta/cubuk, --lv-soft: zemin, --lv-ink: yazi) */
.lv-ok { --lv: var(--ok); --lv-soft: var(--ok-soft); --lv-ink: var(--ok); }
.lv-warn { --lv: var(--inv-yellow); --lv-soft: var(--inv-yellow-soft); --lv-ink: var(--inv-yellow-ink); }
.lv-danger { --lv: var(--danger); --lv-soft: var(--danger-soft); --lv-ink: var(--danger); }
.lv-off { --lv: var(--faint); --lv-soft: var(--surface-2); --lv-ink: var(--muted); }

/* ---------- sayfa ---------- */
.inv { max-width: 1120px; }
.inv-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.inv-head h1 { font-size: 26px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.inv-add {
  margin-left: auto; min-height: 52px; padding: 0 20px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--ok); color: var(--inv-on); font-size: 17px; font-weight: 800; white-space: nowrap;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--ok) 30%, transparent);
}
.inv-add:active { transform: scale(.97); }
.inv-tip { font-size: 15px; color: var(--muted); margin: 4px 0 12px; }
.inv-tip b { color: var(--text); white-space: nowrap; }

.inv-filter { display: flex; gap: 8px; margin-bottom: 12px; max-width: 520px; }
.inv-filter button {
  flex: 1; min-height: 52px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--text);
  font-size: 17px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.inv-filter button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.inv-filter b { min-width: 30px; height: 30px; border-radius: 15px; padding: 0 8px; display: inline-grid; place-items: center; background: var(--surface-2); color: var(--text); font-size: 15px; }
.inv-filter b.warn { background: var(--inv-yellow-soft); color: var(--inv-yellow-ink); }
.inv-search { height: 48px !important; font-size: 16px; border-radius: 12px; margin-bottom: 12px; max-width: 520px; }
.inv-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

/* ---------- karolar ---------- */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.inv-tile {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-height: 206px; padding: 14px 14px 0;
  text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 2px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); cursor: pointer; overflow: hidden; transition: transform .08s;
}
.inv-tile:active { transform: scale(.97); }
.inv-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.inv-tile.lv-warn { border-color: color-mix(in srgb, var(--lv) 75%, var(--line)); }
.inv-tile.lv-danger { border-color: var(--danger); }
.inv-tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.inv-ico { font-size: 42px; line-height: 1; }
.inv-who { display: flex; padding-left: 6px; }
.inv-who .av { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.inv-name {
  font-size: 17px; font-weight: 700; line-height: 1.22; min-height: 2.44em; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere;
}
.inv-qty { display: flex; align-items: baseline; gap: 6px; margin-top: auto; }
.inv-qty b { font-size: 42px; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.inv-qty small { font-size: 17px; font-weight: 700; color: var(--muted); }
.lv-danger .inv-qty b { color: var(--danger); }
.inv-gauge { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.inv-gauge i { display: block; height: 100%; border-radius: inherit; background: var(--lv); }
.inv-word {
  display: flex; align-items: center; gap: 8px; margin: 6px -14px 0; padding: 11px 14px;
  background: var(--lv-soft); color: var(--lv-ink); font-size: 18px; font-weight: 800;
}
.inv-word::before, .inv-pill::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--lv); flex: none; }
.inv-tile.dev { min-height: 186px; }
.inv-next { margin-top: auto; font-size: 15px; color: var(--muted); }
.inv-next b { color: var(--text); }
.inv-next.soon b, .sh-facts .soon { color: var(--inv-yellow-ink); }
.inv-next.late b, .sh-facts .late { color: var(--danger); }

.inv-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px;
  background: var(--lv-soft); color: var(--lv-ink); font-size: 16px; font-weight: 800; white-space: nowrap;
}
.inv-pill.sm { padding: 3px 10px; font-size: 14px; }
.inv-pill.sm::before { width: 10px; height: 10px; }
.inv-pill.big { font-size: 20px; padding: 9px 16px; margin-top: 2px; }

.inv-empty { text-align: center; padding: 40px 16px; color: var(--muted); font-size: 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.inv-empty b { font-size: 20px; color: var(--text); }
.inv-empty p { margin: 0 0 10px; }
.inv-empty-ico { font-size: 64px; line-height: 1.1; }
.inv-empty .inv-add { margin-left: 0; }

/* ---------- alt sayfa (pencere) ---------- */
.inv-sheet .modal-head { padding: 8px 8px 8px 16px; }
.inv-sheet .modal-head h2 { font-size: 20px; font-weight: 800; overflow-wrap: anywhere; }
.inv-sheet .modal-head .btn.icon { width: 48px; height: 48px; }
.inv-sheet .modal-head .btn.icon svg { width: 22px; height: 22px; }
.inv-sheet .modal-body { gap: 14px; font-size: 16px; }
.inv-sheet .input { height: 52px; font-size: 18px; border-radius: 12px; }
.inv-sheet textarea.input { height: auto; min-height: 64px; padding-top: 12px; }
.inv-sheet .field.big > span { font-size: 17px; font-weight: 700; color: var(--text); }
.inv-sheet .field > span { font-size: 14px; }
.inv-sheet .modal-foot { padding-top: 10px; }
.inv-sheet .modal-foot .btn { flex: 1; height: 56px; font-size: 18px; font-weight: 700; border-radius: 14px; }

.sh-hero { display: flex; align-items: center; gap: 14px; }
.sh-ico { font-size: 56px; line-height: 1; }
.sh-now { font-size: 14px; color: var(--muted); }
.sh-qty { font-size: 20px; font-weight: 700; color: var(--muted); }
.sh-qty b { font-size: 50px; font-weight: 800; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.sh-faint { color: var(--muted); font-size: 15px; margin: 0; }
.sh-lock { margin: 0; padding: 14px; border-radius: 14px; background: var(--surface-2); font-size: 16px; font-weight: 600; text-align: center; }
.sh-facts { display: flex; flex-direction: column; gap: 6px; font-size: 16px; }

.sh-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sh-kind { position: relative; display: block; }
.sh-kind input { position: absolute; inset: 0; opacity: 0; margin: 0; pointer-events: none; }
.sh-kind span {
  display: flex; align-items: center; justify-content: center; min-height: 76px; padding: 6px; text-align: center; cursor: pointer;
  border-radius: 18px; border: 3px solid transparent; background: var(--k-soft); color: var(--k); font-size: 21px; font-weight: 800;
}
.sh-kind.in { --k: var(--ok); --k-soft: var(--ok-soft); }
.sh-kind.out { --k: var(--inv-orange); --k-soft: var(--inv-orange-soft); }
.sh-kind.bad { --k: var(--danger); --k-soft: var(--danger-soft); }
.sh-kind.count { grid-column: 1 / -1; --k: var(--muted); --k-soft: var(--surface-2); }
.sh-kind.count span { min-height: 50px; font-size: 16px; font-weight: 700; }
.sh-kind input:checked + span { background: var(--k); border-color: var(--k); color: var(--inv-on); box-shadow: 0 4px 14px color-mix(in srgb, var(--k) 35%, transparent); }
.sh-kind.count input:checked + span { background: var(--text); border-color: var(--text); color: var(--bg); }
.sh-kind input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.sh-kind input:disabled + span { opacity: .38; cursor: not-allowed; }

.sh-amount { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 18px; background: var(--surface-2); --k: var(--accent); --k-soft: var(--accent-soft); }
.sh-amount[hidden] { display: none; }
.sh-amount[data-kind="giris"], .sh-amount[data-kind="bakim"] { --k: var(--ok); --k-soft: var(--ok-soft); }
.sh-amount[data-kind="cikis"] { --k: var(--inv-orange); --k-soft: var(--inv-orange-soft); }
.sh-amount[data-kind="ariza"] { --k: var(--danger); --k-soft: var(--danger-soft); }
.sh-ask { font-size: 20px; font-weight: 800; text-align: center; }
.sh-stepper { display: grid; grid-template-columns: 68px 1fr 68px; align-items: center; gap: 8px; }
.sh-step {
  height: 68px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); color: var(--text);
  font-size: 36px; font-weight: 700; line-height: 1; cursor: pointer;
}
.sh-val { text-align: center; font-size: 22px; font-weight: 700; color: var(--muted); }
.sh-val b { font-size: 64px; font-weight: 800; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.sh-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sh-nums button {
  min-height: 58px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--text);
  font-size: 26px; font-weight: 800; cursor: pointer; font-variant-numeric: tabular-nums;
}
.sh-nums button.on { border-color: var(--k); background: var(--k-soft); color: var(--k); }
.sh-step:disabled, .sh-nums button:disabled { opacity: .3; cursor: default; }
.sh-step:active:not(:disabled), .sh-nums button:active:not(:disabled), .sh-ok:active:not(:disabled) { transform: scale(.96); }
.sh-result { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 10px; font-size: 19px; font-weight: 700; min-height: 34px; text-align: center; }
.sh-result b { font-size: 26px; color: var(--lv-ink); }
.sh-ok {
  min-height: 62px; border-radius: 18px; border: 0; cursor: pointer; background: var(--k); color: var(--inv-on);
  font-size: 22px; font-weight: 800; box-shadow: 0 4px 14px color-mix(in srgb, var(--k) 30%, transparent);
}
.sh-ok:disabled { opacity: .4; cursor: default; box-shadow: none; }
.sh-more > summary, details.more > summary {
  display: flex; align-items: center; min-height: 48px; cursor: pointer; list-style: none; font-size: 16px; font-weight: 700; color: var(--accent);
}
.sh-more > summary::-webkit-details-marker, details.more > summary::-webkit-details-marker { display: none; }
.sh-more[open] > summary { margin-bottom: 6px; }

.sh-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-quick button {
  min-height: 48px; padding: 0 16px; border-radius: 24px; border: 2px solid var(--line); background: var(--surface); color: var(--text);
  font-size: 16px; font-weight: 600; cursor: pointer;
}
.sh-quick button.on { border-color: var(--k); background: var(--k-soft); color: var(--k); }

.sh-sec h3 { font-size: 17px; font-weight: 800; margin: 4px 0 8px; }
.sh-people { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-person { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 14px 4px 5px; border-radius: 999px; background: var(--surface-2); font-size: 16px; font-weight: 600; }
.sh-hist ul { list-style: none; margin: 0; padding: 0; }
.hist { display: flex; align-items: flex-start; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.35; }
.hist[hidden] { display: none; }
.hist:last-child { border-bottom: 0; }
.hist-ico { width: 24px; flex: none; text-align: center; font-size: 18px; line-height: 24px; }
.hist .av { margin-top: 0; }
.hist-t { font-weight: 600; }
.hist-when { color: var(--faint); font-size: 14px; white-space: nowrap; }
.hist-note { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.sh-all, .sh-plain {
  width: 100%; min-height: 48px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--text);
  font-size: 16px; font-weight: 700; cursor: pointer; margin-top: 6px;
}
.sh-plain.danger { color: var(--danger); border-color: var(--danger-soft); }
.sh-admin { border-top: 1px solid var(--line); padding-top: 8px; }

/* ---------- formlar (yeni / duzenle) ---------- */
.chips3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.chips3 label, .pp-i { position: relative; display: block; }
.chips3 input, .pp-i input { position: absolute; inset: 0; opacity: 0; margin: 0; pointer-events: none; }
.chips3 span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px; padding: 6px 4px; text-align: center;
  border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; color: var(--text); cursor: pointer;
  overflow-wrap: break-word; word-break: normal; hyphens: manual; line-height: 1.2; font-size: 14px;
}
.chips3 span i { font-style: normal; font-size: 24px; line-height: 1.1; }
.chips3 input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.chips3 input:focus-visible + span, .pp-i input:focus-visible + .pp-card { outline: 3px solid var(--accent); outline-offset: 2px; }

.nf { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 56px; align-items: center; gap: 8px; }
.nf-b { height: 52px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font-size: 30px; font-weight: 700; line-height: 1; cursor: pointer; }
.inv-sheet .nf-in { text-align: center; font-size: 24px; font-weight: 800; }
.nf-u { font-size: 16px; font-weight: 700; color: var(--muted); min-width: 32px; }
.nf-hint { color: var(--muted); font-size: 14px; }
.quick-set { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-set button {
  min-height: 48px; padding: 0 16px; border-radius: 24px; border: 2px solid var(--line); background: var(--surface); color: var(--text);
  font-size: 16px; font-weight: 600; cursor: pointer;
}

.pp { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.pp-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 92px; padding: 10px 4px;
  border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 700; text-align: center; cursor: pointer;
}
.pp-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pp-ok {
  position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; display: none; place-items: center;
  background: var(--ok); color: var(--inv-on); font-style: normal; font-size: 14px; font-weight: 800;
}
.pp-i input:checked + .pp-card { border-color: var(--ok); background: var(--ok-soft); }
.pp-i input:checked + .pp-card .pp-ok { display: grid; }

details.more { border-top: 1px solid var(--line); }
details.more > summary { color: var(--muted); }
details.more > summary::after { content: "▾"; margin-left: 8px; }
details.more[open] > summary::after { content: "▴"; }
.more-in { display: flex; flex-direction: column; gap: 12px; padding-bottom: 6px; }

/* ---------- malzeme bilgisi: renk noktalari, karo cipleri, filtre satirlari ---------- */
.sw {
  display: inline-block; flex: none; width: 16px; height: 16px; border-radius: 50%; vertical-align: middle; background: var(--surface-2);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--text) 24%, transparent);
}
.sw.xs { width: 12px; height: 12px; }
.sw.sm { width: 18px; height: 18px; }
.sw.md { width: 30px; height: 30px; }
.sw.lg { width: 44px; height: 44px; }
.sw-clear { background: repeating-conic-gradient(#cfd5dc 0 25%, #ffffff 0 50%) 50% / 10px 10px; }
.sw-rainbow { background: conic-gradient(#e53935, #fb8c00, #fdd835, #43a047, #1e88e5, #8e24aa, #e53935); }
.sw-plus { display: inline-grid; place-items: center; background: var(--surface); color: var(--accent); font-size: 24px; font-weight: 800; box-shadow: inset 0 0 0 2px var(--accent); }

.inv-tile[hidden] { display: none; }
.inv-tile .inv-stripe {
  position: absolute; top: 0; left: 0; right: 0; width: auto; height: 9px; border-radius: 0;
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--text) 18%, transparent);
}
.inv-tile:has(.inv-stripe) { padding-top: 20px; }
.inv-chips {
  display: flex; gap: 4px; overflow: hidden; white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent);
}
.inv-chip {
  flex: none; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 12px;
  background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 700;
}

.inv-chiprow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.inv-rowlabel { flex: none; font-size: 15px; font-weight: 700; color: var(--muted); }
.inv-fchip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 24px; white-space: nowrap;
  border: 2px solid var(--line); background: var(--surface); color: var(--text); font-size: 16px; font-weight: 700; cursor: pointer;
}
.inv-fchip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.inv-fchip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.inv-empty .inv-clear { max-width: 280px; }

.sh-mat {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface-2); font-size: 17px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere;
}

/* ---------- yeni / duzenle: Ne tur malzeme? + secim cipleri ---------- */
.kind-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.kind-tiles label, .pick { position: relative; display: block; }
.kind-tiles input, .pick input, .swp input { position: absolute; inset: 0; opacity: 0; margin: 0; pointer-events: none; }
.kind-tiles span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 92px; cursor: pointer;
  border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font-size: 17px; font-weight: 800;
}
.kind-tiles span i { font-style: normal; font-size: 36px; line-height: 1; }
.kind-tiles input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.mat-rest, .mat-sec { display: flex; flex-direction: column; gap: 14px; }
.mat-rest[hidden] { display: none; }

.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick span, .pick-add {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 24px; cursor: pointer;
  border: 2px solid var(--line); background: var(--surface); color: var(--text); font-size: 16px; font-weight: 700; font-family: inherit;
}
.pick input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
.pick input:checked + span::before { content: "✓"; margin-right: 6px; }
.pick-add { border-style: dashed; border-color: var(--accent); background: transparent; color: var(--accent); }

.swatch-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
.swp { position: relative; display: block; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.swp > span { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 86px; padding: 8px 2px 6px; border-radius: 14px; border: 2px solid transparent; }
.swp small { font-size: 13px; font-weight: 700; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.swp input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.swp input:checked + span .sw { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.swp-add small { color: var(--accent); }
.kind-tiles input:focus-visible + span, .pick input:focus-visible + span, .swp input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.add-box { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.add-box[hidden] { display: none; }
.add-btns { display: flex; gap: 8px; }
.add-btns button {
  flex: 1; min-height: 48px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--text);
  font-size: 16px; font-weight: 800; cursor: pointer;
}
.add-btns .add-ok { border-color: var(--ok); background: var(--ok); color: var(--inv-on); }
.add-btns button:disabled { opacity: .5; }
.hue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; justify-items: center; }
.hue {
  position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; overflow: hidden;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--text) 24%, transparent);
}
.hue.on { box-shadow: 0 0 0 3px var(--surface-2), 0 0 0 5px var(--accent); }
.hue-any { background: var(--surface); }
.hue-any input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.hue-any span { font-size: 22px; pointer-events: none; }

@media (max-width: 420px) {
  .kind-tiles { grid-template-columns: 1fr 1fr; }
  .kind-tiles span { min-height: 80px; }
}

/* ---------- geri al cubugu ---------- */
#inv-undo {
  position: fixed; left: 50%; bottom: 24px; z-index: 72; transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 10px; width: min(560px, calc(100vw - 24px)); min-height: 64px; padding: 8px 8px 8px 16px;
  border-radius: 16px; background: var(--text); color: var(--bg); font-size: 16px; font-weight: 600; box-shadow: var(--shadow);
  transition: opacity .2s, transform .2s;
}
#inv-undo.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#inv-undo button {
  flex: none; min-height: 48px; padding: 0 16px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--bg); color: var(--text); font-size: 16px; font-weight: 800;
}

@media (max-width: 860px) {
  .inv-head h1 { font-size: 24px; }
  .inv-add { min-height: 48px; padding: 0 16px; font-size: 16px; }
  #inv-undo { bottom: calc(70px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
  .inv-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .inv-tile { padding: 12px 12px 0; min-height: 196px; }
  .inv-word { margin: 6px -12px 0; padding: 10px 12px; font-size: 17px; }
  .inv-ico { font-size: 38px; }
  .inv-qty b { font-size: 38px; }
  .inv-name { font-size: 16px; }
}

/* siparisler */
.inv-tabs { display: flex; gap: 8px; margin: 0 0 12px; flex-wrap: wrap; }
.inv-tabs a { padding: 10px 16px; border-radius: 999px; border: 2px solid var(--line); color: var(--text); text-decoration: none; font-weight: 700; }
.inv-tabs a.on { border-color: var(--accent); background: var(--accent-soft); }
.inv-tabs a b { font-size: 12px; color: #222; background: #f2c94c; border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.inv-head-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.inv-add.ghost { background: var(--surface); color: var(--text); border: 2px solid var(--line); }
.inv-coming { display: block; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--accent); margin-top: 2px; }
.or-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.or-card { position: relative; border: 2px solid var(--line); border-radius: 18px; background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.or-card.st-kargoda { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.or-card.st-teslim { opacity: .85; }
.or-card.st-iptal { opacity: .55; }
.or-card.late { border-color: var(--warn, #e8a33b); }
.or-top { display: flex; align-items: center; gap: 10px; }
.or-top .inv-ico { font-size: 30px; }
.or-name { font-size: 16px; }
.or-qty { font-size: 13px; color: var(--muted); }
.or-more { border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; padding: 0 4px; }
.or-steps { display: flex; align-items: center; gap: 4px; }
.or-steps.cancel { color: var(--muted); font-weight: 700; }
.or-step { display: flex; flex-direction: column; align-items: center; min-width: 64px; opacity: .45; }
.or-step i { font-style: normal; font-size: 20px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--line); }
.or-step b { font-size: 11.5px; margin-top: 2px; }
.or-step small { font-size: 10.5px; color: var(--muted); min-height: 13px; }
.or-step.done { opacity: 1; }
.or-step.done i { border-color: var(--ok, #3fb37f); }
.or-step.now i { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.or-line { flex: 1; height: 3px; border-radius: 3px; background: var(--line); margin-bottom: 26px; }
.or-track { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.or-track code { font-size: 13px; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.or-track.faint { color: var(--muted); }
.or-late { color: var(--warn, #e8a33b); font-weight: 700; font-size: 13px; }
.or-exp, .or-note { font-size: 13px; color: var(--muted); }
.or-deliver { border: 0; border-radius: 14px; padding: 14px; font: inherit; font-size: 16px; font-weight: 800; color: #fff; background: var(--ok, #3fb37f); cursor: pointer; }
.or-deliver:hover { filter: brightness(1.08); }
.sh-plain.sm { padding: 4px 10px; font-size: 12px; text-decoration: none; }
.or-mini { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.or-carriers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.or-carrier { position: relative; }
.or-carrier input { position: absolute; opacity: 0; pointer-events: none; }
.or-carrier span { display: inline-block; padding: 8px 12px; border-radius: 999px; border: 2px solid var(--line); cursor: pointer; font-size: 13px; font-weight: 600; }
.or-carrier input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 720px) { .or-grid { grid-template-columns: 1fr; } .or-step { min-width: 54px; } }

/* siparis turleri + otomatik takip */
.or-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.or-k { position: relative; }
.or-k input { position: absolute; opacity: 0; pointer-events: none; }
.or-k span { display: inline-block; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line); font-weight: 700; cursor: pointer; }
.or-k input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.or-k input:disabled + span { opacity: .55; cursor: default; }
.or-kind { font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.or-auto { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; background: var(--surface-2); border-radius: 12px; padding: 8px 10px; }
.or-auto small { color: var(--muted); font-size: 11.5px; width: 100%; }
.or-auto.off { color: var(--muted); }
.or-auto.soon { border: 1px solid var(--accent); }
.or-auto.err small { color: var(--warn, #e8a33b); }
/* sirket envanteri */
.as-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-bottom: 12px; }
.as-stat { border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--surface); }
.as-stat b { display: block; font-size: 22px; }
.as-stat span { font-size: 12px; color: var(--muted); }
.as-stat.ok { border-color: color-mix(in srgb, var(--ok, #3fb37f) 60%, var(--line)); }
.as-stat.danger { border-color: color-mix(in srgb, var(--danger, #e5484d) 60%, var(--line)); }
.as-stat.warn { border-color: color-mix(in srgb, var(--warn, #e8a33b) 60%, var(--line)); }
.as-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.as-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 980px; }
.as-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.as-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.as-row { cursor: pointer; }
.as-row:hover { background: var(--surface-2); }
.as-name { white-space: nowrap; }
.as-ico { font-size: 18px; margin-right: 6px; }
.as-qty { font-style: normal; color: var(--accent); font-weight: 700; }
.as-tag { font-size: 12px; }
.as-mono { font-family: ui-monospace, monospace; font-size: 12px; }
.as-num { text-align: right; white-space: nowrap; }
.as-over { color: var(--warn, #e8a33b); font-weight: 700; }
.as-who { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.as-st { border: 0; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.as-st.lv-ok { background: color-mix(in srgb, var(--ok, #3fb37f) 20%, transparent); color: var(--ok, #3fb37f); }
.as-st.lv-warn { background: color-mix(in srgb, var(--warn, #e8a33b) 20%, transparent); color: var(--warn, #e8a33b); }
.as-st.lv-danger { background: color-mix(in srgb, var(--danger, #e5484d) 20%, transparent); color: var(--danger, #e5484d); }
.as-st.lv-off { background: var(--surface-2); color: var(--muted); }
.as-chk { width: 34px; }

/* "+ Ekle" */
.plus-chip { border: 2px dashed var(--accent); background: transparent; color: var(--accent); border-radius: 12px; padding: 8px 12px; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; min-height: 44px; }
.plus-chip:hover { background: var(--accent-soft); }
.kind-tiles .plus-chip { min-height: 88px; }
.plus-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; padding: 8px; border: 2px dashed var(--accent); border-radius: 12px; background: var(--accent-soft); }
.plus-edit .input { flex: 1 1 180px; min-width: 0; }
.plus-emos { display: flex; flex-wrap: wrap; gap: 2px; width: 100%; }
.plus-emos button { border: 1px solid transparent; background: transparent; border-radius: 8px; font-size: 18px; padding: 2px 4px; cursor: pointer; }
.plus-emos button.on { border-color: var(--accent); background: var(--surface); }

/* belgeler */
.docs-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.doc-row { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--surface); }
.doc-open { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--text); text-decoration: none; }
.doc-ico { font-size: 26px; }
.doc-main { display: flex; flex-direction: column; min-width: 0; }
.doc-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-main small { color: var(--muted); font-size: 11.5px; }
.doc-del { border: 0; background: transparent; cursor: pointer; font-size: 16px; opacity: .7; }
.doc-del:hover { opacity: 1; }
.docs-more { margin-top: 6px; }
.docs-more summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.or-docs { align-self: flex-start; }

/* barkod okuma */
.scan-row { display: flex; gap: 6px; align-items: stretch; }
.scan-row .input { flex: 1; min-width: 0; }
.scan-btn { white-space: nowrap; }
.scan-view { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; margin-bottom: 8px; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 22% 10%; border: 3px solid rgba(255,255,255,.9); border-radius: 14px; box-shadow: 0 0 0 9999px rgba(0,0,0,.35); }
.scan-line { position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: #f2c94c; box-shadow: 0 0 8px #f2c94c; animation: scanline 1.6s ease-in-out infinite alternate; }
@keyframes scanline { from { top: 26%; } to { top: 74%; } }
