/* ==== Inwentura (inw-*): InwenturaView - ekran główny (nowa / trwające / historia) i ekran spisu ====
   Wartości 1:1 z tabeli „Wartości kanoniczne” (docs/UI_STYLE_VAADIN8.md): widok, nagłówek, karty i lista jak
   etykiety-* (etykiety-v1.css), pastylki jak klient-badge (klient-v1.css), kafelki radio jak sale-receipt-choice,
   kafelki checkbox jak umowa-check-tile (umowa-form-v1.css), kafelki liczników w tonach pulpit-tile (pulpit-v1.css). */

/* ---- widok ---- */
.mytheme .inw-view {
  box-sizing: border-box;
  /* na niskim ekranie (1366x768) przewija się strona, zamiast ściskać listę do kilku wierszy */
  min-height: 720px;
  padding: 14px 18px 12px;
  background: #f7f7f8;
}

.mytheme .inw-view > .v-spacing,
.mytheme .inw-screen > .v-spacing,
.mytheme .inw-stack > .v-spacing {
  height: 12px;
}

.mytheme .inw-columns > .v-spacing {
  width: 12px;
}

/* ---- nagłówek strony ---- */
.mytheme .inw-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.inw-page-title {
  color: #282828;
  font-size: 27px !important;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
}

.mytheme .inw-page-header .v-button {
  height: 37px;
  border-radius: 6px;
  font-weight: 700;
}

/* pastylki pod tytułem (jak klient-badge) */
.mytheme .inw-badges {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.mytheme .v-label.inw-badge {
  width: auto !important;
  padding: 7px 12px;
  border-radius: 16px;
  border: 1px solid #e0e0e0;
  background: #f4f4f4;
  color: #565656;
  font-size: 12px;
}

.mytheme .v-label.inw-badge b {
  color: #303030;
}

.mytheme .v-label.inw-badge.inw-badge-zielony {
  border-color: #cfe3cf;
  background: #e8f5e6;
  color: #2f6b2a;
}

.mytheme .v-label.inw-badge.inw-badge-bursztyn {
  border-color: #e5d6bc;
  background: #fff3dc;
  color: #6f4900;
}

.mytheme .v-label.inw-badge.inw-badge-niebieski {
  border-color: #caddea;
  background: #f1f7fb;
  color: #36566c;
}

.mytheme .v-label.inw-badge.inw-badge-zielony b,
.mytheme .v-label.inw-badge.inw-badge-bursztyn b,
.mytheme .v-label.inw-badge.inw-badge-niebieski b {
  color: inherit;
}

/* ---- karta ---- */
.mytheme .inw-card {
  box-sizing: border-box;
  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 .inw-card > .v-spacing {
  height: 12px;
}

.mytheme .inw-card-header {
  box-sizing: border-box;
  padding-bottom: 13px;
  border-bottom: 1px solid #e8e8e8;
}

.mytheme .v-label.inw-card-title {
  color: #303030;
  font-size: 18px !important;
  font-weight: 700;
  line-height: 1.3;
}

.mytheme .v-label.inw-card-description {
  margin-top: 2px;
  color: #6e6e6e;
  font-size: 12px;
  font-weight: 400;
  white-space: normal;
}

/* licznik pozycji obok tytułu karty (jak etykiety-count-badge) */
.mytheme .inw-count-badge {
  display: inline-block;
  min-width: 22px;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fff3dc;
  border: 1px solid #ead8b8;
  color: #6f4900;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  vertical-align: middle;
}

/* podpis sekcji w karcie (jak daily-dialog-label) */
.mytheme .v-label.inw-label {
  color: #6b6b6b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mytheme .v-label.inw-help {
  color: #666;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  white-space: normal;
}

/* informacja w karcie (jak sale-summary-contract) */
.mytheme .v-label.inw-info {
  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;
  white-space: normal;
}

/* ---- pasek narzędzi w karcie ---- */
.mytheme .inw-toolbar .v-button {
  height: 37px;
  border-radius: 6px;
  font-weight: 700;
}

/* "Pokazano X z Y" na wysokości przycisków */
.mytheme .inw-toolbar .v-label {
  line-height: 37px;
}

/* ---- lista w zaokrąglonym kontenerze ---- */
.mytheme .inw-grid-container,
.mytheme .inw-grid-container .v-grid {
  overflow: hidden;
  border-radius: 9px;
}

.mytheme .inw-grid-container {
  border: 1px solid #dedede;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.mytheme .inw-grid-container .v-grid {
  border: 0;
}

/* ---- przyciski kończące operację ---- */
.mytheme .inw-actions .v-button,
.mytheme .v-button.inw-action {
  height: 46px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
}

/* ---- Nowa inwentura: magazyny jako kafelki checkbox (2 w rzędzie, wartości umowa-check-tile) ---- */
.mytheme .v-select-optiongroup.inw-mag-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.mytheme .inw-mag-choice .v-checkbox {
  box-sizing: border-box;
  display: block;
  flex: 1 1 calc(50% - 5px);
  margin: 0;
  white-space: normal;
}

/* Valo: padding-left 25px na kwadrat i różne marginesy opcji grupy (pułapka z docs/UI_STYLE_VAADIN8.md) */
:root .mytheme .v-select-optiongroup.inw-mag-choice .v-select-option.v-checkbox {
  margin: 0;
  padding-left: 0;
}

.mytheme .inw-mag-choice .v-checkbox > 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 .inw-mag-choice .v-checkbox > input ~ label:before,
:root .mytheme .inw-mag-choice .v-checkbox > input ~ label:after {
  top: 8px;
  left: 12px;
}

.mytheme .inw-mag-choice .v-checkbox > label:hover {
  border-color: #d59b35;
  background: #fffaf0;
}

:root .mytheme .inw-mag-choice .v-checkbox > input:checked ~ label {
  border-color: #d59b35;
  background: #fff3dc;
  box-shadow: 0 0 0 3px rgba(213, 155, 53, 0.18);
}

:root .mytheme .inw-mag-choice .v-checkbox > input:checked ~ label:after {
  color: #d59b35;
}

/* Sklep Komis (3.) na cały rząd, żeby Złoto i Srebro stały obok siebie (uwaga usera 2026-10-02) */
.mytheme .inw-mag-choice .v-checkbox:nth-child(3) {
  flex-basis: 100%;
}

/* ---- ekran spisu: panel po prawej ---- */
.mytheme .v-panel.inw-side-scroll,
.mytheme .v-panel.inw-side-scroll > .v-panel-content {
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* pole skanu: duże i wyróżnione jak pole kwoty (sale-total-field) */
.mytheme .v-textfield.inw-scan-field {
  height: 46px;
  border-color: #d59b35;
  background: #fffaf0;
  font-size: 18px;
  font-weight: 700;
}

.mytheme .v-button.inw-scan-button {
  height: 46px;
  border-radius: 7px;
  font-weight: 700;
}

/* kafelek "Ostatni skan" - kafelek informacyjny, więc lewa krawędź 4px w tonie wyniku */
.mytheme .inw-last {
  box-sizing: border-box;
  padding: 10px 14px 11px;
  border: 1px solid #dedede;
  border-left: 4px solid #aaa;
  border-radius: 9px;
  background: #fff;
}

.mytheme .inw-last > .v-spacing {
  height: 0;
}

.mytheme .inw-last.inw-last-ok {
  border-color: #cfe3cf;
  border-left-color: #579250;
  background: #f0f8ef;
}

.mytheme .inw-last.inw-last-czesc {
  border-color: #e5d6bc;
  border-left-color: #c48b2a;
  background: #fff9ef;
}

.mytheme .inw-last.inw-last-nadwyzka {
  border-color: #caddea;
  border-left-color: #5f8eae;
  background: #f1f7fb;
}

.mytheme .inw-last.inw-last-blad {
  border-color: #efc9c9;
  border-left-color: #c65353;
  background: #fff0f0;
}

.mytheme .v-label.inw-last-title {
  margin-top: 3px;
  color: #303030;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
  word-wrap: break-word;
}

.mytheme .v-label.inw-last-sub {
  margin-top: 2px;
  color: #565656;
  font-size: 12px;
  font-weight: 600;
  white-space: normal;
}

/* lista "Błędne skany" pod kafelkiem Ostatni skan: nieudane skany do powtórzenia (tony kafelka inw-last-blad) */
.mytheme .v-label.inw-err-list {
  white-space: normal;
}

.mytheme .inw-err-list .inw-err-row {
  box-sizing: border-box;
  margin-top: 6px;
  padding: 7px 10px;
  border: 1px solid #efc9c9;
  border-left: 4px solid #c65353;
  border-radius: 8px;
  background: #fff0f0;
  color: #303030;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  word-wrap: break-word;
}

.mytheme .inw-err-list .inw-err-row b {
  font-weight: 800;
}

.mytheme .inw-err-list .inw-err-time {
  margin-right: 6px;
  color: #6b6b6b;
  font-size: 12px;
  font-weight: 700;
}

/* liczniki statusów w karcie Postęp: 2x2, pastylka + liczba (ramki jak daily-dialog-rows) */
.mytheme .v-label.inw-status-rows {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mytheme .inw-status-rows .inw-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  background: #fff;
  color: #303030;
  font-size: 15px;
}

/* postęp spisu */
.mytheme .v-label.inw-progress-value {
  color: #282828;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
}

.mytheme .v-progressbar.inw-progress-bar {
  width: 100%;
}

.mytheme .v-progressbar.inw-progress-bar .v-progressbar-wrapper {
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: #e6e6e6;
  box-shadow: none;
}

.mytheme .v-progressbar.inw-progress-bar .v-progressbar-indicator {
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: #d59b35;
  box-shadow: none;
}

/* ---- wiersze spisu: lekkie tinty zamiast pełnych kolorów (decyzja usera 2026-10-02); Brak bez tła ----
   :root - styles.css (Valo) wczytuje się później; :not(selected) - zaznaczony wiersz zostaje złoty z grid-v1.css */
:root .mytheme .v-grid-row.inw-wiersz-ok:not(.v-grid-row-selected) > td {
  background-color: #f1f9f0;
}

:root .mytheme .v-grid-row.inw-wiersz-czesc:not(.v-grid-row-selected) > td {
  background-color: #fff9ef;
}

:root .mytheme .v-grid-row.inw-wiersz-nadwyzka:not(.v-grid-row-selected) > td {
  background-color: #f1f7fb;
}

/* pastylka statusu w tabeli (wartości kanoniczne) */
.mytheme .v-grid-cell.inw-center {
  text-align: center;
}

.mytheme .inw-pill {
  display: inline-block;
  padding: 1px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  white-space: nowrap;
}

.mytheme .inw-pill-brak {
  border-color: #e3a9a9;
  background: #fbe3e3;
  color: #9b2f2f;
}

.mytheme .inw-pill-czesc,
.mytheme .inw-pill-wtoku {
  border-color: #e0c58f;
  background: #fff3dc;
  color: #6f4900;
}

.mytheme .inw-pill-ok,
.mytheme .inw-pill-zakonczona {
  border-color: #a9cfa5;
  background: #e8f5e6;
  color: #2f6b2a;
}

.mytheme .inw-pill-nadwyzka {
  border-color: #a9c6da;
  background: #e6f0f7;
  color: #36566c;
}

.mytheme .inw-pill-anulowana {
  border-color: #d6d6d6;
  background: #f0f0f0;
  color: #666;
}

/* ---- okno potwierdzenia (Zakończ / Przerwij / Twoja niezakończona) - wartości daily-dialog-* ---- */
.mytheme .v-window.inw-dialog-window {
  border-radius: 12px;
}

.mytheme .inw-dialog-content > .v-spacing {
  height: 14px;
}

.mytheme .v-label.inw-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 .inw-dialog-actions .v-button {
  height: 46px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
}
