/* ============================================================
   Page: kasa_sayim — Gün Sonu / Kasa Sayım & Mutabakat
   Kasa seçici chip + kupür sayım ızgarası (stepper) + KPI + fark.
   Mobil-öncelikli: kupür kartları auto-fit, dokunması rahat stepper.
   ============================================================ */

/* — Kasa seçici chip'leri — */
.ks-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.ks-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-full);
  background: var(--surface); color: var(--text); font-size: var(--fs-sm); font-weight: 600;
  cursor: pointer; transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.ks-chip:hover { border-color: var(--brand); color: var(--brand); }
.ks-chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.ks-chip-cur { font-size: var(--fs-xs); font-weight: 700; opacity: .8; }

/* — KPI ızgarası: görünür kart sayısına göre toparlanır (3 kart) — */
.ks-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }

/* — Yöntem geçişi (Kupür / Manuel) — */
.ks-mode { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: var(--space-4); }
.ks-mode-btn {
  padding: 8px var(--space-4); background: var(--surface); color: var(--text-muted);
  border: 0; font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
.ks-mode-btn + .ks-mode-btn { border-left: 1px solid var(--border); }
.ks-mode-btn.is-active { background: var(--brand-tint); color: var(--brand); }

/* — Kupür ızgarası — */
.ks-denoms {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.ks-denom {
  display: flex; flex-direction: column; gap: 6px; padding: var(--space-3);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.ks-denom-face { font-weight: 800; font-size: var(--fs-md); color: var(--text); }
.ks-denom-sub { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }

/* — Stepper (−  input  +) — */
.ks-stepper { display: flex; align-items: stretch; gap: 6px; }
.ks-step {
  flex: 0 0 auto; width: 34px; display: grid; place-items: center;
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 18px; font-weight: 700; color: var(--text); cursor: pointer; line-height: 1;
}
.ks-step:hover { border-color: var(--brand); color: var(--brand); }
.ks-count {
  flex: 1 1 auto; min-width: 0; width: 100%; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 4px;
  font-size: var(--fs-sm); font-variant-numeric: tabular-nums; background: var(--surface); color: var(--text);
}
.ks-count:focus { outline: none; border-color: var(--brand); }
/* number input ok'larını gizle (dokunmatik dostu) */
.ks-count::-webkit-outer-spin-button, .ks-count::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ks-count { -moz-appearance: textfield; }

/* — Manuel toplam + not alanı — */
.ks-manual { max-width: 320px; margin-bottom: var(--space-4); }
.ks-field { display: block; margin-bottom: var(--space-4); }
.ks-field-lbl { display: block; font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }

/* — "Farkı kasaya işle" satırı — */
.ks-adjrow {
  background: var(--brand-tint); border: 1px solid var(--brand); border-radius: var(--radius);
  padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4);
}
.ks-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: var(--fs-sm); }
.ks-check input { width: 18px; height: 18px; accent-color: var(--brand); margin-top: 1px; flex-shrink: 0; }

/* — Kaydet eylemi — */
.ks-actions { display: flex; justify-content: flex-end; }

@media (max-width: 768px) {
  .ks-denoms { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .ks-actions .btn { width: 100%; justify-content: center; }
  .ks-mode { display: flex; width: 100%; }
  .ks-mode-btn { flex: 1; }
}
