/* ==== Moduł Klient (klient-*) ====
   Wartości 1:1 z tabeli „Wartości kanoniczne” (docs/UI_STYLE_VAADIN8.md):
   okna jak daily-dialog-* (daily-view.css), kafelki danych jak sale-stat-* (sale-form-v1.css). */

/* ---- KlientSzczegoly: belka u góry (klient-page-*), wartości jak wanted-page-header ---- */
.mytheme .klient-page-header {
  box-sizing: border-box;
  width: 100%;
  padding: 18px 20px;
  border: 1px solid #ead8b8;
  border-radius: 12px;
  background: linear-gradient(115deg, #fff7e8, #fffdf8 58%, #fff);
}

.mytheme .v-label.klient-page-title {
  color: #282828;
  font-size: 27px !important;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
}

.mytheme .klient-badges {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
/* pastylka informacyjna jak sale-stock-badge */
.mytheme .v-label.klient-badge {
  width: auto !important;
  padding: 7px 12px;
  border-radius: 16px;
  border: 1px solid #e0e0e0;
  background: #f4f4f4;
  color: #565656;
  font-size: 12px;
}

.mytheme .v-label.klient-badge b {
  color: #303030;
}

/* status klienta: tony kafelków Dniówki, znaczenia jak kolory wierszy w KlientLista */
.mytheme .v-label.klient-badge.klient-badge-zielony {
  border-color: #cfe3cf;
  background: #e8f5e6;
  color: #2f6b2a;
}

.mytheme .v-label.klient-badge.klient-badge-fioletowy {
  border-color: #ddcbe8;
  background: #f6f0fa;
  color: #8b5ba7;
}

/* Złodziej / Nic nie brać: pełny czerwony ton (#c65353), żeby ostrzegał od pierwszego spojrzenia */
.mytheme .v-label.klient-badge.klient-badge-czerwony {
  border-color: #c65353;
  background: #c65353;
  color: #fff;
  font-weight: 700;
}

.mytheme .v-label.klient-badge.klient-badge-czerwony .v-icon {
  margin-right: 3px;
}

.mytheme .v-label.klient-badge.klient-badge-zielony b,
.mytheme .v-label.klient-badge.klient-badge-fioletowy b,
.mytheme .v-label.klient-badge.klient-badge-czerwony b {
  color: inherit;
}

.mytheme .klient-page-header .v-button.klient-page-action {
  height: 46px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
}

/* ---- okna: Weryfikacja dokumentu (klient-dialog-*) ---- */
.mytheme .v-window.klient-dialog-window {
  border-radius: 12px;
}

.mytheme .klient-dialog-content > .v-spacing {
  height: 14px;
}

.mytheme .klient-dialog-section {
  box-sizing: border-box;
  width: 100%;
  padding: 17px 19px 19px;
  border: 1px solid #dedede;
  border-top: 2px solid rgba(213, 155, 53, 0.62);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.mytheme .klient-dialog-section > .v-spacing {
  height: 8px;
}

.mytheme .v-label.klient-dialog-eyebrow {
  display: block;
  box-sizing: border-box;
  width: 100% !important;
  padding-bottom: 13px;
  border-bottom: 1px solid #e8e8e8;
  color: #303030;
  font-size: 18px !important;
  font-weight: 700;
  line-height: 1.3;
}

.mytheme .v-label.klient-dialog-help {
  color: #666;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  white-space: normal;
}

.mytheme .v-label.klient-dialog-warning {
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid #ead8b8;
  border-left: 4px solid #d59b35;
  border-radius: 7px;
  background: #fff8ec;
  color: #6f4900;
  font-size: 13px;
  line-height: 1.55;
  white-space: normal;
}

.mytheme .klient-dialog-actions .v-button {
  height: 46px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
}

/* ---- kafelki danych (jak sale-stat-*) ---- */
.mytheme .klient-stat-tile {
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #f7f7f7;
}

.mytheme .klient-stat-tile-accent {
  border-color: #d59b35;
  background: #fff3dc;
}

.mytheme .v-label.klient-stat-label {
  color: #6e6e6e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mytheme .v-label.klient-stat-value {
  margin-top: 3px;
  color: #282828;
  font-size: 22px !important;
  font-weight: 800;
  line-height: 1.2;
  white-space: normal;
  word-break: break-word;
}

/* ==== Formularz klienta (FormularzKlienta: KlientDodaj + zakładka Dane w KlientSzczegoly) ====
   karty i kafelki radio z sale-form-v1.css (sale-step-card, sale-receipt-choice); poniżej tylko dodatki */

/* 4 rodzaje dokumentu w jednym rzędzie (sale-receipt-choice ma podstawę 240px - zmieściłyby się 3) */
.mytheme .sale-receipt-choice.klient-choice-4 .v-radiobutton {
  flex-basis: 140px;
}

/* "Nie sprawdzaj PESEL" jako niski kafelek - kopia umowa-check-tile (umowa-form-v1.css) z prefiksem klient- */
.mytheme .v-checkbox.klient-check-tile {
  display: block;
}

:root .mytheme .v-checkbox.klient-check-tile {
  padding-left: 0;
}

.mytheme .v-checkbox.klient-check-tile > label {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 37px;
  padding: 8px 12px 8px 40px;
  overflow: hidden;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: #fafafa;
  color: #303030;
  font-size: 14px;
  font-weight: 700;
  line-height: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 120ms, background-color 120ms, box-shadow 120ms;
}

:root .mytheme .v-checkbox.klient-check-tile > input ~ label:before,
:root .mytheme .v-checkbox.klient-check-tile > input ~ label:after {
  top: 8px;
  left: 12px;
}

.mytheme .v-checkbox.klient-check-tile > label:hover {
  border-color: #d59b35;
  background: #fffaf0;
}

:root .mytheme .v-checkbox.klient-check-tile > input:checked ~ label {
  border-color: #d59b35;
  background: #fff3dc;
  box-shadow: 0 0 0 3px rgba(213, 155, 53, 0.18);
}

:root .mytheme .v-checkbox.klient-check-tile > input:checked ~ label:after {
  color: #d59b35;
}

.mytheme .v-checkbox.klient-check-tile.v-disabled > label,
.mytheme .v-checkbox.klient-check-tile.v-disabled > label:hover {
  border-color: #d8d8d8;
  background: #f3f3f3;
  color: #9a9a9a;
  cursor: not-allowed;
}

/* KlientSzczegoly → Dane przed kliknięciem Edycja (ustawReadOnly): pola w tonie wyłączonego kafelka (#f3f3f3 / #d8d8d8),
   tekst #666 zostaje czytelny i da się go skopiować; kafelki radio i "Nie sprawdzaj PESEL" są wtedy v-disabled */
:root .mytheme .klient-dane-odczyt .v-textfield-readonly,
:root .mytheme .klient-dane-odczyt .v-textarea-readonly,
:root .mytheme .klient-dane-odczyt .v-filterselect.v-readonly [class*="input"] {
  border-color: #d8d8d8;
  background: #f3f3f3;
  color: #666;
  cursor: default;
}

/* panel podglądu KlientDodaj: braki jako pastylki (ton "nowe" z tabeli wartości kanonicznych), komplet = zielona */
.mytheme .v-label.klient-braki {
  white-space: normal;
}

.mytheme .klient-braki .klient-braki-item,
.mytheme .klient-braki .klient-braki-ok {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
}

.mytheme .klient-braki .klient-braki-item {
  background: #fff3dc;
  color: #6f4900;
}

.mytheme .klient-braki .klient-braki-ok {
  background: #e8f5e6;
  color: #2f6b2a;
}

/* panel "Nowy klient" przyklejony do góry przy przewijaniu formularza - lista "Do uzupełnienia" widoczna przy
   przyciskach zapisu. Sticky na slocie panelu (slot jest dzieckiem wiersza o wysokości kolumny formularza) */
.mytheme .klient-dodaj-view .sale-workspace > .v-expand > .v-slot-sale-summary-card,
.mytheme .klient-dodaj-view .sale-workspace > .v-slot-sale-summary-card {
  position: sticky;
  top: 14px;
  vertical-align: top;
}
