/* Ekran sprzedaży towaru (SklepSprzedajView) - ten sam język wizualny co invoice-form-v2.css */

.mytheme .sale-form-view {
  box-sizing: border-box;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 22px 34px;
}

.mytheme .sale-page-header {
  box-sizing: border-box;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid #ead8b8;
  border-radius: 12px;
  background: linear-gradient(115deg, #fff7e8, #fffdf8 58%, #fff);
}

.mytheme .v-label.sale-page-title {
  color: #282828;
  font-size: 27px !important;
  font-weight: 700;
  line-height: 1.25;
}

.mytheme .v-label.sale-page-subtitle {
  margin-top: 4px;
  color: #666;
  font-size: 13px;
  font-weight: 400;
}

.mytheme .sale-workspace {
  width: 100%;
}

.mytheme .sale-form-column > .v-spacing {
  height: 14px;
}

.mytheme .v-panel.sale-step-card,
.mytheme .v-panel.sale-summary-card {
  overflow: hidden;
  border: 1px solid #dedede;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.mytheme .v-panel.sale-step-card {
  border-top: 2px solid rgba(213, 155, 53, 0.62);
}

.mytheme .v-panel.sale-step-card > .v-panel-content,
.mytheme .v-panel.sale-summary-card > .v-panel-content {
  border: 0;
  background: transparent;
}

.mytheme .sale-step-card .v-margin-top {
  padding-top: 17px;
}

.mytheme .sale-step-card .v-margin-right {
  padding-right: 19px;
}

.mytheme .sale-step-card .v-margin-bottom {
  padding-bottom: 19px;
}

.mytheme .sale-step-card .v-margin-left {
  padding-left: 19px;
}

.mytheme .sale-step-header {
  box-sizing: border-box;
  padding-bottom: 13px;
  border-bottom: 1px solid #e8e8e8;
}

.mytheme .v-label.sale-step-number {
  box-sizing: border-box;
  width: 34px !important;
  height: 34px;
  padding-top: 6px;
  border-radius: 50%;
  background: #d59b35;
  color: #17130c;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 0 0 4px rgba(213, 155, 53, 0.12);
}

.mytheme .v-label.sale-step-title,
.mytheme .v-label.sale-summary-title {
  color: #303030;
  font-size: 18px !important;
  font-weight: 700;
  line-height: 1.3;
}

.mytheme .v-label.sale-step-description {
  margin-top: 2px;
  color: #6e6e6e;
  font-size: 12px;
  font-weight: 400;
}

/* "Nowe - stawka 23%" - informacyjny, zablokowany checkbox w ramce (jak invoice-private-toggle) */
.mytheme .v-checkbox.sale-info-toggle {
  box-sizing: border-box;
  min-width: 260px;
  padding: 8px 12px;
  border: 1px solid #d8d8d8;
  border-radius: 7px;
  background: #fafafa;
}

:root .mytheme .v-checkbox.sale-info-toggle {
  padding-left: 12px;
}

.mytheme .v-checkbox.sale-info-toggle > label {
  position: relative;
  padding-left: 29px;
}

.mytheme .v-checkbox.sale-info-toggle.v-disabled {
  opacity: 1;
}

.mytheme .v-checkbox.sale-info-toggle.v-disabled > label {
  color: #555;
  opacity: 1;
}

/* Rodzaj sprzedaży - duże kafelki do wyboru zamiast gołych radio */
.mytheme .v-select-optiongroup.sale-receipt-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.mytheme .sale-receipt-choice .v-radiobutton {
  box-sizing: border-box;
  display: block;
  flex: 1 1 240px;
  margin: 0;
  padding: 0;
  white-space: normal;
}

:root .mytheme .sale-receipt-choice .v-radiobutton {
  padding-left: 0;
}

/* Valo daje opcjom grupy różne marginesy (pierwsza 6px u góry, kolejne 9px u góry i 6px u dołu, do tego 16px
   z prawej) i wygrywa specyficznością z margin:0 wyżej - bez tego drugi kafelek stoi 3px niżej. Odstępy daje gap. */
:root .mytheme .v-select-optiongroup.sale-receipt-choice .v-select-option.v-radiobutton {
  margin: 0;
}

/* GTU: kafelki 2x2, bo po prawej stoi legenda (4 w rzędzie się nie mieszczą, zawijało 3+1);
   kafelki w jednym rzędzie równej wysokości, gdy opis jednego zawija się do dwóch linii (jak etykiety-choice) */
.mytheme .sale-receipt-choice.sale-receipt-choice-2x2 .v-radiobutton {
  flex-basis: calc(50% - 6px);
}

.mytheme .sale-receipt-choice.sale-receipt-choice-2x2 .v-radiobutton > label {
  height: 100%;
}

/* opcjonalny opis pod nazwą kafelka (caption w HTML, np. kody GTU) */
.mytheme .sale-receipt-choice .sale-choice-description {
  display: block;
  margin-top: 2px;
  color: #666;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
}

.mytheme .sale-receipt-choice .v-radiobutton > label {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 14px 16px 14px 48px;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: #fafafa;
  color: #303030;
  font-size: 15px;
  font-weight: 700;
  line-height: 20px;
  transition: border-color 120ms, background-color 120ms, box-shadow 120ms;
}

:root .mytheme .sale-receipt-choice .v-radiobutton > input ~ label:before,
:root .mytheme .sale-receipt-choice .v-radiobutton > input ~ label:after {
  top: 14px;
  left: 16px;
}

.mytheme .sale-receipt-choice .v-radiobutton > label:hover {
  border-color: #d59b35;
  background: #fffaf0;
}

:root .mytheme .sale-receipt-choice .v-radiobutton > input:checked ~ label {
  border-color: #d59b35;
  background: #fff3dc;
  box-shadow: 0 0 0 3px rgba(213, 155, 53, 0.18);
}

/* Valo pozycjonuje kropkę zaznaczenia osobną regułą (:checked, top/left 6px) -
   bez tego nadpisania ląduje w rogu kafelka zamiast w środku kółka */
:root .mytheme .sale-receipt-choice .v-radiobutton > input:checked ~ label:after {
  top: 20px;
  left: 22px;
  background: #d59b35;
}

:root .mytheme .sale-receipt-choice .v-radiobutton > input:focus ~ label {
  border-color: #d59b35;
}

.mytheme .sale-receipt-choice .v-radiobutton.v-disabled > label {
  color: #9a9a9a;
  background: #f3f3f3;
  cursor: not-allowed;
}

.mytheme .sale-receipt-choice .v-radiobutton.v-disabled > label:hover {
  border-color: #d8d8d8;
  background: #f3f3f3;
}

/* Cena - wyróżniona suma do zapłaty */
.mytheme .v-textfield.sale-total-field {
  border-color: #d59b35;
  background: #fffaf0;
  font-weight: 700;
}

.mytheme .sale-payment-row .v-filterselect {
  min-width: 0;
}

.mytheme .sale-courier-block {
  margin-top: 3px;
}

.mytheme .sale-courier-block .v-caption {
  padding-top: 16px;
}

.mytheme .v-label.sale-stock-badge {
  width: auto !important;
  margin-bottom: 3px;
  padding: 7px 12px;
  border-radius: 16px;
  border: 1px solid #e0e0e0;
  background: #f4f4f4;
  color: #565656;
  font-size: 12px;
}

.mytheme .sale-actions {
  box-sizing: border-box;
  padding-top: 2px;
}

.mytheme .v-button.sale-save-button {
  height: 46px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
}

.mytheme .v-button.sale-cancel-button {
  height: 46px;
  border-radius: 7px;
  font-size: 14px;
}

/* Panel podsumowania - towar i podpowiedzi */
.mytheme .v-panel.sale-summary-card {
  position: sticky;
  top: 14px;
  border-top: 2px solid rgba(213, 155, 53, 0.62);
}

.mytheme .v-label.sale-summary-eyebrow {
  color: #d59b35;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.mytheme .v-label.sale-summary-title {
  white-space: normal;
  word-wrap: break-word;
}

.mytheme .v-label.sale-summary-contract {
  box-sizing: border-box;
  padding: 13px 14px;
  border-left: 3px solid #d59b35;
  border-radius: 5px;
  background: #fff8ec;
  color: #3d3d3d;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

.mytheme .v-label.sale-help-title {
  margin-top: 6px;
  padding-top: 15px;
  border-top: 1px solid #e4e4e4;
  color: #3f3f3f;
  font-size: 14px;
  font-weight: 700;
}

.mytheme .v-label.sale-context-help {
  color: #666;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
}

/* --- Pre-sklep: pozycje umowy (wiersze buduje widok: checkbox+opis, pod spodem 3 pola cen) --- */
.mytheme .sale-items > .v-slot > .v-verticallayout {
  box-sizing: border-box;
  width: 100% !important;
  padding: 10px 14px 12px;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  background: #fafafa;
}

.mytheme .sale-items .v-checkbox > label {
  font-weight: 700;
}

.mytheme .sale-items .v-textfield {
  margin-top: 2px;
}

.mytheme .v-label.sale-total-badge {
  width: auto !important;
  padding: 9px 16px;
  border-radius: 18px;
  border: 1px solid #d59b35;
  background: #fff3dc;
  color: #17130c;
  font-size: 16px;
  font-weight: 800;
}

/* --- Zwrot zaliczki: kafelki kwot --- */
.mytheme .sale-stat-row {
  margin-top: 2px;
}

.mytheme .sale-stat-tile {
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #f7f7f7;
}

.mytheme .sale-stat-tile-accent {
  border-color: #d59b35;
  background: #fff3dc;
}

.mytheme .v-label.sale-stat-label {
  color: #6e6e6e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mytheme .v-label.sale-stat-value {
  margin-top: 3px;
  color: #282828;
  font-size: 22px !important;
  font-weight: 800;
  line-height: 1.2;
}

.mytheme .v-label.sale-operator {
  padding: 0 4px 8px;
  color: #8a8a8a;
  font-size: 22px !important;
  font-weight: 700;
}

/* ostrzeżenie dokładane przez widok na górze (np. "kara umowna wyłączona") */
.mytheme .sale-form-view > .v-slot > .v-label-h3 {
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 14px;
  padding: 12px 16px;
  border: 1px solid #f0c36d;
  border-left: 4px solid #d59b35;
  border-radius: 10px;
  background: #fff8ec;
  color: #5a3d05;
  font-size: 14px !important;
  font-weight: 700;
  line-height: 1.4;
}

/* --- wiersz akcji po zapisie (Generuj / Pobierz / Nowa umowa) --- */
.mytheme .sale-post-actions .v-button {
  height: 40px;
  border-radius: 7px;
  font-weight: 700;
}

/* --- panel podsumowania: daty i towar --- */
.mytheme .sale-summary-dates {
  margin-top: 2px;
}

.mytheme .v-label.sale-summary-meta {
  margin-top: 2px;
  color: #303030;
  font-size: 14px;
  font-weight: 700;
  white-space: normal;
  word-wrap: break-word;
}

/* --- Wybór dokumentu (SklepSprzedajWstepView): kafelki-przyciski w tonach kafelków Dniówki
       (zielony = Paragon jak "Gotówka", niebieski = Faktura jak "Bank"). Bez lewej krawędzi 4px - ta jest
       dla paneli informacyjnych, nie przycisków. Świadomy wyjątek od tabeli: ok. 138px wysokości,
       ikona 48px, napis 22px (jedyna decyzja na ekranie, ma się trafiać bez celowania) --- */
.mytheme .sale-doc-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.mytheme .v-button.sale-doc-tile {
  box-sizing: border-box;
  display: block;
  flex: 1 1 240px;
  height: auto;
  margin: 0;
  padding: 44px 16px;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: #fafafa;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  color: #303030;
  text-shadow: none;
  white-space: normal;
  transition: border-color 120ms, background-color 120ms, box-shadow 120ms;
}

/* Valo: :before = rozpórka do centrowania w 37px, :after = niebieska ramka focusu - w kafelku zbędne */
.mytheme .v-button.sale-doc-tile:before,
.mytheme .v-button.sale-doc-tile:after {
  content: none;
  display: none;
}

.mytheme .sale-doc-tile .v-button-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* ikona w kółku - kształt jak numer kroku (sale-step-number), kolor z tonu kafelka */
.mytheme .sale-doc-tile .sale-doc-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  line-height: 48px;
  text-align: center;
}

.mytheme .sale-doc-tile .sale-doc-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.mytheme .v-button.sale-doc-tile-paragon {
  border-color: #cfe3cf;
  background: #f0f8ef;
  color: #2f5a2b;
}

.mytheme .sale-doc-tile-paragon .sale-doc-icon {
  background: #579250;
  box-shadow: 0 0 0 4px rgba(87, 146, 80, 0.12);
}

.mytheme .v-button.sale-doc-tile-paragon:hover,
.mytheme .v-button.sale-doc-tile-paragon:focus {
  border-color: #579250;
  box-shadow: 0 0 0 3px rgba(87, 146, 80, 0.18);
}

.mytheme .v-button.sale-doc-tile-faktura {
  border-color: #caddea;
  background: #f1f7fb;
  color: #36566c;
}

.mytheme .sale-doc-tile-faktura .sale-doc-icon {
  background: #5f8eae;
  box-shadow: 0 0 0 4px rgba(95, 142, 174, 0.12);
}

.mytheme .v-button.sale-doc-tile-faktura:hover,
.mytheme .v-button.sale-doc-tile-faktura:focus {
  border-color: #5f8eae;
  box-shadow: 0 0 0 3px rgba(95, 142, 174, 0.18);
}

@media (max-width: 1240px) {
  .mytheme .sale-form-view {
    padding-right: 14px;
    padding-left: 14px;
  }

  .mytheme .sale-workspace {
    display: block;
  }

  .mytheme .sale-workspace > .v-expand > .v-slot,
  .mytheme .sale-workspace > .v-slot {
    display: block;
    width: 100% !important;
    margin-bottom: 14px;
  }

  .mytheme .v-panel.sale-summary-card {
    position: static;
    width: 100% !important;
  }
}
