/* =====================================================
   PELLET SERVICE REPORT
   NUOVO RAPPORTO - LAYOUT MOBILE
   ===================================================== */

.psr-form-page {
  min-height: 100dvh;
  background: #ffffff;
  color: #1d2623;
  padding-bottom: 96px;
}

/* HEADER */

.psr-form-header {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 16px;
  background: #104d40;
  color: #ffffff;
}

.psr-form-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 27px;
  cursor: pointer;
}

.psr-form-title {
  margin: 0;
  color: #ffffff;
  font: 700 18px/1.3 "Segoe UI", Roboto, sans-serif;
}

/* AVANZAMENTO */

.psr-form-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
  padding: 18px 10px;
  border-bottom: 1px solid #edf0ed;
}

.psr-form-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #3d4945;
  cursor: pointer;
}

.psr-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 33px;
  border: 1.5px solid #c6cfca;
  border-radius: 50%;
  background: #fff;
  color: #283b34;
  font-size: 14px;
  font-weight: 700;
}

.psr-form-step.active .psr-step-number {
  background: #105542;
  border-color: #105542;
  color: #ffffff;
}

.psr-step-label {
  max-width: 100%;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
}

/* CONTENUTO */

.psr-form-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px;
}

.psr-form-section-title {
  margin: 0 0 24px;
  color: #1d2623;
  font-family: "Segoe UI", Roboto, sans-serif;
  font-size: 21px;
  font-weight: 750;
}

/* SELEZIONE CLIENTE */

.psr-customer-label {
  display: block;
  margin-bottom: 8px;
  color: #24352e;
  font-size: 14px;
  font-weight: 650;
}

.psr-customer-select {
  width: 100%;
  min-height: 54px;
  padding: 12px 15px;
  border: 1px solid #d3dbd6;
  border-radius: 10px;
  background: #ffffff;
  color: #1d2623;
  font-size: 16px;
}

/* SCHEDA CLIENTE */

.psr-customer-card {
  margin-top: 16px;
  padding: 18px;
  background: #eaf0f6;
  border-radius: 11px;
}

.psr-customer-detail {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 9px 0;
  color: #27312f;
  font-size: 15px;
  line-height: 1.5;
}

.psr-customer-detail svg {
  flex-shrink: 0;
  width: 21px;
  height: 21px;
  color: #253b35;
}

/* NAVIGAZIONE INFERIORE */

.psr-form-footer {
  position: fixed;
  z-index: 25;
  left: 0;
  right: 0;
  bottom: 0;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;

  min-height: 76px;
  padding: 12px 20px
    calc(12px + env(safe-area-inset-bottom));

  background: #ffffff;
  border-top: 1px solid #e1e7e3;
}

.psr-form-next {
  margin-left: auto;
  min-width: 122px;
  min-height: 46px;
  padding: 11px 20px;
  border: 0;
  border-radius: 9px;
  background: #105542;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.psr-form-next:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.psr-form-previous {
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid #d2d9d5;
  border-radius: 9px;
  background: #ffffff;
  color: #24483c;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}

@media (max-width: 360px) {
  .psr-form-steps {
    padding-inline: 6px;
    gap: 1px;
  }

  .psr-step-number {
    width: 29px;
    height: 29px;
  }

  .psr-step-label {
    font-size: 9px;
  }

  .psr-form-content {
    padding: 20px 12px;
  }
}


/* =====================================================
   NAVIGAZIONE E AZIONI SERVICE REPORT
   ===================================================== */

/* Indicatore dei passaggi completati */

.psr-form-step.completed .psr-step-number {
  background: #e0eee7;
  border-color: #a4c8b7;
  color: #105542;
}

/* Linee di collegamento tra i passaggi */

.psr-form-step {
  position: relative;
}

.psr-form-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 16px;
  left: calc(50% + 18px);
  width: calc(100% - 33px);
  height: 2px;
  background: #cad3ce;
  pointer-events: none;
}

.psr-form-step.completed:not(:last-child)::after {
  background: #105542;
}

/* Azioni di gestione del rapporto */

.psr-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  padding: 20px 0;
  border-top: 1px solid #e1e7e3;
}

.psr-form-actions .btn {
  flex: 1 1 135px;
  min-height: 44px;
}

/* Chiusura definitiva */

.psr-finalize-actions {
  margin-top: 20px;
  padding: 20px 0;
  border-top: 1px solid #e1e7e3;
}

.psr-finalize-actions .btn {
  width: 100%;
}

/* Spazio per la barra inferiore */

.psr-form-page {
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
}

/* Barra inferiore entro schermi desktop */

@media (min-width: 768px) {
  .psr-form-footer {
    padding-left: max(20px, calc((100% - 600px) / 2));
    padding-right: max(20px, calc((100% - 600px) / 2));
  }
}


/* =====================================================
   PANNELLO AZIONI DEL RAPPORTO
   ===================================================== */

.psr-form-menu-button {
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.psr-actions-panel {
  position: relative;
  z-index: 15;
  margin: 0;
  padding: 18px 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid #dce4df;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .10);
}

.psr-actions-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.psr-actions-panel-heading h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.psr-actions-close {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #1d2623;
  font-size: 26px;
  cursor: pointer;
}

.psr-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.psr-actions-grid button {
  min-height: 64px;
  padding: 12px 8px;
  border: 1px solid #d7e1db;
  border-radius: 11px;
  background: #f7faf8;
  color: #105542;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.psr-actions-grid button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.psr-actions-grid button:focus-visible,
.psr-form-menu-button:focus-visible {
  outline: 2px solid #e59b3d;
  outline-offset: 2px;
}

/* Pulsante Næste disabilitato */

.psr-form-next:disabled {
  background: #aebdb5;
  color: #ffffff;
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}


/* =====================================================
   SERVICE REPORT — STEP 2: OVN
   ===================================================== */

.psr-oven-section {
  width: 100%;
  padding: 0;
  margin: 0;
}

/* Titolo della scheda */

.psr-oven-section .psr-form-section-title {
  margin: 0 0 24px;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.25;
  color: #182c25;
}

/* Selezione stufa */

.psr-oven-selector {
  margin-bottom: 26px;
}

.psr-oven-selector > label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 650;
  color: #263b32;
}

.psr-oven-selector > select {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #cbd8d0;
  border-radius: 10px;
  background: #fff;
  color: #20352b;
  font-size: 15px;
}

.psr-oven-selector > select:focus {
  outline: 2px solid #aacabc;
  border-color: #105542;
}

.psr-oven-selector > select:disabled {
  background: #f0f3f1;
  color: #87958c;
}

/* Pulsante creazione nuova stufa */

.psr-oven-selector .btn {
  min-height: 42px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 650;
}

/* Campi tecnici */

.psr-oven-section input,
.psr-oven-section select,
.psr-oven-section textarea {
  max-width: 100%;
  box-sizing: border-box;
}

.psr-oven-section .row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.psr-oven-section .row > * {
  min-width: 0;
}

/* Messaggi informativi */

.psr-oven-section .note {
  margin: 14px 0;
  border-radius: 10px;
  line-height: 1.55;
}

/* Sezione fotografica */

.psr-oven-section h3 {
  margin: 28px 0 14px;
  padding-top: 22px;
  border-top: 1px solid #e1e8e3;
  color: #193b2c;
  font-size: 18px;
  font-weight: 700;
}

.psr-oven-section .thumb {
  max-width: 100%;
  border-radius: 9px;
}

.psr-oven-section .part {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e0e8e2;
  border-radius: 12px;
  background: #fafcfb;
}

/* Smartphone stretto */

@media (max-width: 420px) {
  .psr-oven-section .row {
    grid-template-columns: 1fr;
  }

  .psr-oven-section .psr-form-section-title {
    font-size: 21px;
  }
}


/* =====================================================
   SERVICE REPORT — FOTODOKUMENTATION
   ===================================================== */

/* Due fotografie principali affiancate */

.psr-oven-section .psr-photo-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dce6df;
  border-radius: 12px;
  background: #ffffff;
}

/* Intestazione della scheda */

.psr-photo-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
}

.psr-photo-card-title {
  color: #20372c;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.psr-photo-required,
.psr-photo-optional {
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 650;
}

.psr-photo-required {
  background: #fff0dd;
  color: #986018;
}

.psr-photo-optional {
  background: #eef2ef;
  color: #63746a;
}

/* Area fotografia */

.psr-photo-placeholder,
.psr-photo-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 125px;
  overflow: hidden;
  border-radius: 9px;
  background: #f2f5f3;
}

.psr-photo-placeholder {
  gap: 8px;
  padding: 10px;
  color: #778b7e;
  text-align: center;
  font-size: 11px;
}

.psr-photo-placeholder-icon {
  font-size: 28px;
  line-height: 1;
}

.psr-photo-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Controlli Kamera e Galleri */

.psr-photo-controls {
  margin-top: 10px;
}

.psr-photo-controls .btn {
  min-height: 36px;
  padding: 8px;
  font-size: 12px;
  border-radius: 8px;
}

/* Rimozione fotografia */

.psr-photo-delete {
  width: 100%;
  margin-top: 8px;
  padding: 7px;
  border: 1px solid #e6d0d0;
  border-radius: 8px;
  background: #fff5f5;
  color: #a33c3c;
  font-size: 12px;
  cursor: pointer;
}

/* Messaggi di validazione */

.psr-photo-card .err {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.4;
}

/* Evita che i controlli superino la larghezza */

.psr-photo-card,
.psr-photo-card * {
  box-sizing: border-box;
}

.psr-photo-card input,
.psr-photo-card button {
  max-width: 100%;
}


/* =====================================================
   SERVICE REPORT — STEP 3: ARBEJDE
   ===================================================== */

.psr-work-section {
  width: 100%;
  margin: 0;
  padding: 0;
}

.psr-work-section .psr-form-section-title {
  margin: 0 0 18px;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.25;
  color: #182c25;
}

/* Messaggio introduttivo */

.psr-work-section > .note {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  line-height: 1.5;
}

/* Lavorazioni selezionabili */

.psr-work-section .chk {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  margin: 0;
  padding: 9px 6px;
  border-bottom: 1px solid #edf1ee;
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
}

.psr-work-section .chk input[type="checkbox"],
.psr-work-section .chk input[type="radio"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #105542;
}

/* Evidenzia la lavorazione selezionata */

.psr-work-section .chk:has(input:checked) {
  background: #edf6f0;
  border-radius: 8px;
  color: #105542;
  font-weight: 600;
}

/* Campi note tecniche */

.psr-work-section textarea {
  width: 100%;
  min-height: 125px;
  padding: 13px;
  border: 1px solid #cbd8d0;
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  line-height: 1.55;
  resize: vertical;
}

/* Messaggi di validazione */

.psr-work-section .err {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
}

/* Pulsanti */

.psr-work-section > .btn {
  border-radius: 10px;
  min-height: 45px;
}

/* Smartphone */

@media (max-width: 420px) {
  .psr-work-section .psr-form-section-title {
    font-size: 21px;
  }

  .psr-work-section .chk {
    font-size: 14px;
  }
}

/* =========================================
   SERVICE REPORT — STEP 4: RESERVEDELE
   Uniformazione tipografica
   ========================================= */

.psr-form-content .card > h2 {
  font-family: inherit;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  color: #182c25;
  margin: 0 0 18px;
}

