/* Karar 620, Dalga 4-a: sayım, devir, açılış ve gün sonu ön kontrolü.
   Yerleşim ve dokunma ölçüleri korunur; gün sonu gövdesi ayrı pakettedir. */
@media screen {
  .tezgah-pos #modal :is(.carry-box,.devir-gun > div,.auth-box,.count-sum):not(:where(.gun-sonu-uc *)) {
    border-radius:var(--kose-o);
    background:var(--yuzey-1);
    box-shadow:var(--golge-kart);
  }
  /* Sol anlam çizgisi ve kutunun ölçüsü değişmez. */
  .tezgah-pos #modal .carry-box:not(:where(.gun-sonu-uc *)) {
    outline:var(--kenar-ince);
    outline-offset:-1px;
  }
  .tezgah-pos #modal :is(.count-line,.count-sum):not(:where(.gun-sonu-uc *)) {
    border-radius:var(--kose-o);
    background:var(--yuzey-1);
  }
  .tezgah-pos #modal .count-line:not(:where(.gun-sonu-uc *)) {
    outline:var(--kenar-ince);
    outline-offset:-1px;
    box-shadow:var(--golge-kart);
  }
  .tezgah-pos #modal .count-line.counted:not(:where(.gun-sonu-uc *)) {
    box-shadow:inset 4px 0 0 var(--olumlu),var(--golge-kart);
  }
  /* Satırın içinde ikinci kart oluşmaz; tutar sütunları eski yerinde. */
  .tezgah-pos #modal .count-line .count-sum:not(:where(.gun-sonu-uc *)) {
    border-color:var(--cizgi);
    border-radius:var(--kose-k);
    background:var(--yuzey-2);
    box-shadow:none;
  }
  .tezgah-pos #modal :is(details.kupur > summary,.kupur-sayac button),
  .tezgah-pos #modal :is(#opening-count-form,#count-row-form,#handover-form,#cash-approve-form) .numpad button {
    border:var(--kenar-ince);
    border-radius:var(--kose-k);
    background:var(--yuzey-1);
    color:var(--siyah);
    box-shadow:var(--golge-kart);
  }
  .tezgah-pos #modal details.kupur[open] > summary {
    border-color:var(--cizgi-koyu);
    background:var(--yuzey-2);
  }
  .tezgah-pos #modal .kupur-sayac button:disabled,
  .tezgah-pos #modal :is(#opening-count-form,#count-row-form,#handover-form,#cash-approve-form) .numpad button:disabled {
    background:var(--pasif-zemin);
    color:var(--pasif-metin);
    box-shadow:none;
  }
  .tezgah-pos #modal :is(#opening-count-form,#count-row-form,#handover-form,#cash-approve-form) :is(.field,input[data-sayi]) {
    border:var(--kenar-ince);
    border-radius:var(--kose-k);
  }
  .tezgah-pos #modal :is(#opening-count-form,#count-row-form,#handover-form) [aria-invalid='true'] {
    border-color:var(--hata-cizgi);
  }
  .tezgah-pos #modal :is(.devir-serit,.devir-onay,.devir-uyari-kutu):not(:where(.gun-sonu-uc *)) {
    border-radius:var(--kose-o);
    box-shadow:var(--golge-kart);
  }
  .tezgah-pos #modal .devir-cift .devir-ana {
    border-radius:var(--kose-o);
    box-shadow:var(--golge-kart);
  }
  .tezgah-pos #modal .devir-cift .devir-ana.devir-kilitli {
    background:var(--yuzey-1);
    box-shadow:none;
  }
  /* Altın işaret, bugün yapılacak iş anlamını korur. */
  .tezgah-pos #modal :is(.devir-cift .devir-ana,.devir-serit).devir-dogru {
    box-shadow:var(--golge-kart);
    outline:3px solid var(--altin);
    outline-offset:0;
  }
  .tezgah-pos #modal .devir-cift .devir-yol {
    border-radius:var(--kose-k);
    background:var(--yuzey-2);
    color:var(--siyah);
  }
  .tezgah-pos #modal .devir-cift .devir-uyari-yazi {
    background:var(--uyari-zemin);
  }
  .tezgah-pos #modal :is(.count-diff,.handover-stale,#handover-mismatch,.devir-cift .devir-kilit-yazi,.devir-serit-ret,[class~="devir-durum-gecti"]):not(:where(.gun-sonu-uc *)),
  .tezgah-pos #modal #opening-stock-differences[data-hata='evet']:not(:empty) {
    border-radius:var(--kose-k);
    background:var(--hata-zemin);
    color:var(--siyah);
    box-shadow:inset 3px 0 0 var(--hata-cizgi);
  }
  .tezgah-pos #modal .devir-serit.devir-serit-ret > span {
    color:var(--siyah);
  }
  .tezgah-pos #modal #opening-stock-differences:not(:empty) {
    padding-inline:var(--b-3);
  }
  .tezgah-pos #modal .gun-sonu-on-kontrol {
    border-radius:var(--kose-o);
    background:var(--yuzey-1);
    outline:var(--kenar-ince);
    outline-offset:-1px;
    box-shadow:var(--golge-kart);
  }
  .tezgah-pos #modal .on-kontrol-satir {
    padding-inline:var(--pos-kart-ic);
  }
  .tezgah-pos #modal :is(details.kupur > summary,.kupur-sayac button,
    :is(#opening-count-form,#count-row-form,#handover-form,#cash-approve-form) .numpad button,
    #opening-count-form .field,#count-row-form .field,#handover-form .field,
    #cash-approve-form .field,.sayim-farki-actions button,#count-cancel-no,#count-cancel-yes,
    .devir-cift button,.devir-serit button):focus-visible {
    outline:3px solid var(--odak-halka);
    outline-offset:3px;
  }
}

@media screen {
/* Nakit ve ürün sayımlarında Beklenen / Sayılan aynı sütunları kullanır. */
.tezgah-pos #modal .count-sum.count-sum-2 > :nth-child(odd) { grid-column:2; text-align:right; }
.tezgah-pos #modal .count-sum.count-sum-2 > :nth-child(even) { grid-column:3; text-align:right; }
.tezgah-pos #modal .count-list-row { display:grid; grid-template-columns:minmax(12em,1fr) auto; align-items:center; gap:8px; }
.tezgah-pos #modal .count-list-row > .warning { grid-column:1 / -1; }
}

@media screen {
  .tezgah-pos #modal #opening-reason { scroll-margin-bottom:90px; }
  .tezgah-pos #modal #opening-count-form { padding-bottom:12px; }
}

@media screen {
  .tezgah-pos #modal details.kupur .kupur-sayac {
    grid-template-columns:84px 48px 112px 48px 64px minmax(0,1fr);
    gap:8px;
  }
  .tezgah-pos #modal details.kupur .kupur-sayac label {
    font-size:var(--y-18);
    font-weight:700;
    color:var(--siyah);
  }
  .tezgah-pos #modal details.kupur .kupur-sayac .field { width:112px; }
  .tezgah-pos #modal details.kupur .kupur-satir-tutar {
    text-align:right;
    white-space:nowrap;
    font-size:var(--y-16);
    font-weight:700;
    font-variant-numeric:tabular-nums;
  }
  .tezgah-pos #modal details.kupur [data-kupur-durum='bos'],
  .tezgah-pos #modal details.kupur [data-kupur-durum='sifir'] { color:var(--soluk); }
  .tezgah-pos #modal details.kupur .kupur-satir-tutar[aria-invalid='true'] { color:var(--hata-metin); }
  .tezgah-pos #modal :is(#count-row-preview,.count-shift-cash) .cash-preview {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    margin-block:12px;
    font-variant-numeric:tabular-nums;
  }
  .tezgah-pos #modal :is(#count-row-preview,.count-shift-cash) .cash-preview > * {
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:flex-start;
    gap:4px;
    min-width:0;
    margin:0;
    padding:8px;
    position:relative;
    border:0;
  }
  .tezgah-pos #modal :is(#count-row-preview,.count-shift-cash) .cash-preview > * > span {
    white-space:nowrap;
    font-size:var(--y-14);
    line-height:1.4;
  }
  .tezgah-pos #modal :is(#count-row-preview,.count-shift-cash) .cash-preview > .warning::before {
    position:absolute;
    top:8px;
    right:8px;
    margin:0;
  }
  .tezgah-pos #modal #count-row-preview .cash-preview b,
  .tezgah-pos #modal .count-shift-cash .cash-preview b {
    font-size:var(--y-24);
    line-height:1.3;
    white-space:nowrap;
  }
  .tezgah-pos #modal :is(#count-row-preview,.count-shift-cash) .cash-preview small {
    display:inline;
    font-size:var(--y-14);
    line-height:1.3;
  }
  .tezgah-pos #modal #count-row-preview .cash-preview > p > b {
    display:flex;
    flex-wrap:wrap;
    align-items:baseline;
    column-gap:4px;
    max-width:100%;
  }
  .tezgah-pos #modal details.kupur > [id$='-kupur-total'] { font-size:var(--y-24); }
  .tezgah-pos #modal .count-shift-cash .cash-preview b { font-size:var(--y-28); }
  .tezgah-pos #modal #count-shift-products .count-go { min-height:48px; min-width:48px; }
  .tezgah-pos #modal #count-shift-products :is(th,td) { box-sizing:border-box; padding-block:calc(var(--b-1) / 2); }
  .tezgah-pos #modal #count-shift-products thead th { height:40px; position:sticky; top:0; z-index:1; background:var(--yuzey-2); }
  .tezgah-pos #modal:not([data-kasa-pencere='gun-sonu']) #count-shift-products thead th { position:static; }
  .tezgah-pos #modal #count-shift-products tbody td { height:56px; }
  .tezgah-pos #modal #count-shift-products .count-ok { display:block; width:max-content; max-width:100%; }
  .tezgah-pos #modal #count-shift-products [data-hiza-sutun='urun'],
  .tezgah-pos #modal #count-shift-products .count-stale { white-space:normal; }
  .tezgah-pos #modal #count-shift-products .count-stale[data-hata="evet"] { display:block; width:0; min-width:100%; color:var(--hata-metin); font-size:var(--y-14); white-space:normal; }
}

@media screen {
  .tezgah-pos #modal .on-kontrol-satir:last-child { border-bottom:0; }
  .tezgah-pos #modal .gun-sonu-uc #day-methods { grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); grid-template-rows:none; grid-auto-flow:row; align-items:stretch; }
  .tezgah-pos #modal .gun-sonu-uc #day-methods .detail { display:grid; grid-template-rows:auto auto; border-right:1px solid var(--cizgi); }
  .tezgah-pos #modal .gun-sonu-uc #day-methods .detail:last-child { border-right:0; }
  .tezgah-pos #modal .gun-sonu-uc #day-methods .detail > span { padding:5px 10px 0; }
  .tezgah-pos #modal .gun-sonu-uc #day-methods .detail > b { padding:0 10px 5px; font-size:var(--y-20); line-height:1.4; }
  .tezgah-pos #modal .gun-sonu-uc #day-methods .day-end-total > b { font-size:var(--y-24); line-height:1.05; }
  .tezgah-pos #modal .gun-sonu-uc #day-methods .detail.day-end-total > :is(span,b) { padding-inline:8px; }
  .tezgah-pos #modal .gun-sonu-uc #day-methods .day-end-total > * { background:var(--krem-acik); }
}
