/* Kantar sayfası */
#kantar [hidden] { display: none !important; }

.knt-start { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.knt-mode {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 44px 20px; border-radius: 18px; border: 2px solid var(--line); background: #fff;
  cursor: pointer; color: var(--text); transition: transform .08s, border-color .15s, box-shadow .15s;
}
.knt-mode:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(20, 40, 30, .08); }
.knt-mode b { font-size: 40px; line-height: 1; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; }
.knt-mode span { font-size: 22px; font-weight: 900; letter-spacing: .02em; }
.knt-mode small { color: var(--muted); font-size: 13px; }
.knt-mode.in b { background: var(--green2); color: var(--green); }
.knt-mode.in:hover { border-color: var(--green); }
.knt-mode.out b { background: #eaf1fc; color: var(--blue); }
.knt-mode.out:hover { border-color: var(--blue); }

.knt-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.knt-left { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.knt-scale { padding: 18px 20px 20px; text-align: center; }
.knt-scale-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.knt-yon { font-size: 13px; font-weight: 900; color: var(--green); letter-spacing: .03em; }
.knt-work.out .knt-yon { color: var(--blue); }
.knt-conn { font-size: 11px; font-weight: 900; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.knt-conn.on { background: var(--green2); color: var(--green); }
.knt-conn.warn { background: #fff4dd; color: #b16d00; }
.knt-conn.off { background: #f1f3f5; color: var(--muted); }

.knt-big {
  margin: 8px 0 4px; padding: 18px 10px; border-radius: 16px; background: #10151c; color: #e8edf2;
  font-variant-numeric: tabular-nums; display: flex; justify-content: center; align-items: baseline; gap: 12px;
  border: 3px solid transparent; transition: border-color .2s, color .2s;
}
.knt-big span { font-size: clamp(56px, 9vw, 104px); font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.knt-big em { font-style: normal; font-size: 28px; font-weight: 800; color: #8a97a5; }
.knt-big.ready { border-color: #2fc36f; color: #55e391; }
.knt-big.moving { color: #ffd166; }
.knt-big.locked { color: #9fb3c8; }
.knt-big.off, .knt-big.nodata { color: #5b6672; }
.knt-big.over { color: #ff7a7a; }
.knt-big.taken { animation: knt-taken .5s ease-out; }
@keyframes knt-taken { 0% { background: #1f7a49; } 100% { background: #10151c; } }

.knt-hint { min-height: 22px; font-size: 14px; font-weight: 800; color: var(--muted); margin-bottom: 12px; }
.knt-hint[data-code="ready"] { color: var(--green); }
.knt-hint[data-code="moving"] { color: #b16d00; }
.knt-hint[data-code="over"] { color: var(--red); }
.knt-hint.shake { animation: knt-shake .35s; color: var(--red); }
@keyframes knt-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.knt-take {
  width: 100%; border: 0; border-radius: 16px; padding: 26px 10px; font-size: 30px; font-weight: 900; letter-spacing: .04em;
  background: #cfd8d2; color: #fff; cursor: not-allowed; transition: background .15s, transform .06s;
}
.knt-take.ready { background: var(--green); cursor: pointer; box-shadow: 0 8px 20px rgba(19, 138, 75, .28); }
.knt-take.ready:active { transform: scale(.985); }
.knt-work.out .knt-take.ready { background: var(--blue); box-shadow: 0 8px 20px rgba(45, 123, 216, .28); }
.knt-take-sub { margin-top: 8px; font-size: 12px; color: var(--muted); }
.knt-conn-tools { margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.knt-note { width: 100%; font-size: 12px; color: var(--muted); }
.knt-warn { width: 100%; background: #fff4dd; color: #7a4b00; border-radius: 10px; padding: 10px 12px; font-size: 13px; text-align: left; }

.knt-link { border: 0; background: none; color: var(--blue); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; text-decoration: underline; padding: 0 2px; }
.knt-link.red { color: var(--red); }

.knt-totals { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 12px; }
.knt-totals > div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.knt-totals small { display: block; font-size: 11px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.knt-totals strong { display: block; font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; margin-top: 4px; }
.knt-totals .main { background: var(--green2); border-color: #cfe9da; }
.knt-totals .main strong { color: var(--green); }
.knt-totals > div:not(.main) strong { font-size: 24px; }
.knt-work.out .knt-totals .main { background: #eaf1fc; border-color: #d4e3f8; }
.knt-work.out .knt-totals .main strong { color: var(--blue); }
.knt-totals i { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px; }

.knt-info { padding: 14px 16px; }
.knt-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.knt-fields label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-weight: 900; color: var(--muted); text-transform: uppercase; }
.knt-fields label.wide { grid-column: 1 / -1; }
.knt-fields input { border: 1px solid #dce5df; border-radius: 9px; padding: 10px 11px; font-size: 14px; text-transform: none; color: var(--text); min-width: 0; }
.knt-fields input.bad { border-color: var(--red); }

.knt-right { position: sticky; top: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 140px); min-height: 360px; }
.knt-list { flex: 1; overflow: auto; padding: 6px 12px; }
.knt-row { display: grid; grid-template-columns: 44px 1fr auto auto 40px; align-items: center; gap: 8px; padding: 9px 6px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.knt-row.last { background: var(--green3); border-radius: 8px; }
.knt-row .no { color: var(--muted); font-weight: 800; font-size: 13px; }
.knt-row strong { font-size: 18px; }
.knt-row time { color: var(--muted); font-size: 12px; }
.knt-row .src { font-size: 10px; font-weight: 900; padding: 3px 6px; border-radius: 6px; background: #fff4dd; color: #b16d00; }
.knt-del { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 8px; height: 30px; cursor: pointer; font-size: 12px; font-weight: 900; }
.knt-del.sure { background: var(--red); border-color: var(--red); color: #fff; font-size: 10px; }
.knt-empty { padding: 30px 10px; text-align: center; color: var(--muted); line-height: 1.6; }
.knt-manual { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.knt-manual input { flex: 1; min-width: 0; border: 1px solid #dce5df; border-radius: 9px; padding: 10px 11px; font-size: 14px; }
.knt-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
.knt-actions .btn { padding: 15px 10px; font-size: 14px; }
.knt-actions .btn:disabled { opacity: .45; cursor: not-allowed; }

.knt-done { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 18px; border-left: 5px solid var(--green); }
.knt-done-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 24px; font-weight: 900; flex: 0 0 auto; }
.knt-done h3 { margin: 0 0 4px; }
.knt-done h3 span { color: var(--muted); font-weight: 700; font-size: 14px; }
.knt-done p { margin: 0; color: #46525d; }
.knt-done .btn { margin-left: auto; }

.knt-history { margin-top: 18px; }
.knt-table tr[data-open] { cursor: pointer; }
.knt-table tr[data-open]:hover { background: #fafcfb; }
.knt-table tr.cancelled td { color: #9aa4ad; text-decoration: line-through; }
.knt-table tr.cancelled td:nth-child(2) { text-decoration: none; }
.knt-td-act { text-align: right; }
.knt-chip { font-size: 10px; font-weight: 900; padding: 4px 7px; border-radius: 10px; }
.knt-chip.in { background: var(--green2); color: var(--green); }
.knt-chip.out { background: #eaf1fc; color: var(--blue); }
.knt-chip.x { background: #fdeaea; color: var(--red); }
.knt-detail td { background: #fbfcfb; }
.knt-detail-box { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.knt-hooks { display: flex; flex-wrap: wrap; gap: 6px; }
.knt-hooks span { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.knt-hooks i { color: #b16d00; font-style: normal; }
.knt-muted { color: var(--muted); font-size: 13px; }

.knt-confirm { position: fixed; inset: 0; background: rgba(15, 22, 30, .45); display: grid; place-items: center; z-index: 80; padding: 16px; }
.knt-confirm-card { background: #fff; border-radius: 16px; width: min(440px, 100%); padding: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, .2); }
.knt-confirm-card h3 { margin: 0 0 10px; }
.knt-confirm-card p { margin: 0 0 12px; color: #46525d; }
.knt-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.knt-sum div { background: #f6f8f7; border-radius: 10px; padding: 9px 11px; }
.knt-sum small { display: block; font-size: 10px; font-weight: 900; color: var(--muted); text-transform: uppercase; }
.knt-sum b { font-size: 15px; }
.knt-sum .big { grid-column: 1 / -1; background: var(--green2); }
.knt-sum .big b { font-size: 26px; color: var(--green); }
.knt-confirm-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.knt-confirm-actions .btn { padding: 14px; }

@media (max-width: 980px) {
  .knt-grid { grid-template-columns: 1fr; }
  .knt-right { position: static; max-height: none; }
  .knt-list { max-height: 420px; }
}
@media (max-width: 640px) {
  .knt-start { grid-template-columns: 1fr; }
  .knt-mode { padding: 28px 16px; }
  .knt-totals { grid-template-columns: 1fr 1fr; }
  .knt-totals .main { grid-column: 1 / -1; order: -1; }
  .knt-totals strong { font-size: 24px; }
  .knt-fields { grid-template-columns: 1fr; }
  .knt-take { font-size: 24px; padding: 22px 10px; }
  .knt-done { flex-wrap: wrap; }
  .knt-done .btn { margin-left: 0; width: 100%; }
  .knt-table th:nth-child(4), .knt-table td:nth-child(4), .knt-table th:nth-child(7), .knt-table td:nth-child(7) { display: none; }
}

/* Alınmayan tartımlar */
.knt-nav-count[hidden] { display: none !important; }
.knt-nav-count { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 4px; border-radius: 999px; background: #f59e0b; color: #fff; font-size: 11px; font-weight: 900; text-align: center; }
.knt-missed { border: 2px solid #f5c96a; background: #fffaf0; padding: 12px 14px; }
.knt-start + .knt-missed { margin-bottom: 18px; }
.knt-missed-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.knt-missed-head h3 { margin: 0; font-size: 15px; color: #8a5300; }
.knt-missed-head h3 b { display: inline-block; min-width: 22px; padding: 1px 7px; margin-left: 4px; border-radius: 999px; background: #f59e0b; color: #fff; font-size: 12px; text-align: center; }
.knt-missed-head small { display: block; color: #8a6a3a; font-size: 12px; margin-top: 3px; }
.knt-missed-list { max-height: 230px; overflow: auto; }
.knt-missed-row { display: grid; grid-template-columns: auto 1fr auto 34px; align-items: center; gap: 10px; padding: 7px 4px; border-top: 1px solid #f3e2bd; font-variant-numeric: tabular-nums; }
.knt-missed-row strong { font-size: 17px; color: #6b4100; }
.knt-missed-row span { color: #8a6a3a; font-size: 12px; }
.knt-missed-row .btn { padding: 7px 10px; font-size: 11px; }
.knt-missed-row:not(:has(.btn)) { grid-template-columns: auto 1fr 34px; }
@media (max-width: 640px) {
  .knt-missed-row { grid-template-columns: auto 1fr 34px; }
  .knt-missed-row .btn { grid-column: 1 / -1; order: 5; }
}
