
/* =====================================================
   PELLET SERVICE REPORT
   LOGIN MOBILE - VERSIONE 1.0
   ===================================================== */

.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  position: relative;
  isolation: isolate;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  align-items: center;

  background:
    radial-gradient(
      ellipse at 50% 85%,
      #377a6b 0%,
      transparent 55%
    ),
    linear-gradient(
      160deg,
      #104d40 0%,
      #07513f 55%,
      #064433 100%
    );

  color: #ffffff;
  padding:
    max(36px, env(safe-area-inset-top))
    20px
    max(90px, env(safe-area-inset-bottom));
}

/* CONTENUTO */

.login-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 390px;
  margin: auto 0;
}

/* INTESTAZIONE */

.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  display: block;
  width: 82px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 12px;
}

.login-title {
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 8vw, 40px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.5px;
  text-align: center;
}

.login-title span {
  display: block;
}

.login-subtitle {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.login-subtitle span {
  display: block;
}

/* SCHEDA LOGIN */

.login-card {
  width: 100%;
  padding: 20px 18px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.20);
}

/* CAMPI */

.login-field {
  margin-bottom: 14px;
}

.login-label {
  display: block;
  margin: 0 0 6px;
  color: #46534e;
  font-size: 12px;
  font-weight: 600;
}

.login-input {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;

  border: 1px solid #cbd3d0;
  border-radius: 11px;

  background: #f8faf9;
  color: #1d2623;

  font-family: inherit;
  font-size: 16px;
}

.login-input:focus {
  outline: 2px solid #1f8069;
  outline-offset: 1px;
  border-color: #1f8069;
}

.login-input::placeholder {
  color: #71807a;
}

/* PULSANTE LOGIN */

.login-submit {
  display: block;
  width: 100%;
  min-height: 54px;
  margin-top: 20px;

  border: none;
  border-radius: 11px;

  background: linear-gradient(
    110deg,
    #08755b,
    #075640
  );

  color: #ffffff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;

  cursor: pointer;
  box-shadow: 0 5px 12px rgba(0, 85, 65, 0.18);
}

.login-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.login-submit:focus-visible {
  outline: 3px solid #e0954a;
  outline-offset: 3px;
}

/* ERRORI */

.login-error {
  margin: 12px 0;
  padding: 11px;
  border-radius: 9px;
  background: #fff0ef;
  color: #a52820;
  font-size: 13px;
  line-height: 1.5;
}

/* =====================================================
   DECORAZIONE INFERIORE - PELLET
   ===================================================== */

.login-decoration {
  position: absolute;
  z-index: 1;

  left: 0;
  right: 0;
  bottom: 0;

  width: 100%;
  height: clamp(160px, 25dvh, 230px);

  background-image: url("/images/warm-pellet-stove-glow.jpg");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;

  pointer-events: none;
}

/* SPAZIO RISERVATO ALLA DECORAZIONE */

.login-page {
  padding-bottom: max(
    145px,
    calc(125px + env(safe-area-inset-bottom))
  );
}

/* SMARTPHONE COMPATTI */

@media (max-height: 700px) {
  .login-page {
    padding-top: 24px;
    padding-bottom: 40px;
  }

  .login-header {
    margin-bottom: 22px;
  }

  .login-logo {
    height: 76px;
    width: 65px;
  }

  .login-title {
    font-size: 30px;
  }

  .login-subtitle {
    margin-top: 12px;
  }
}


/* =====================================================
   LOGIN - ICONE E CAMPI
   ===================================================== */

.login-input-wrap {
  position: relative;
  width: 100%;
}

.login-input-icon {
  padding-left: 46px;
}

.login-input-password {
  padding-right: 72px;
}

.login-field-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Icona lucchetto */

.login-icon-lock {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23364640' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
}

/* Pulsante mostra/nascondi password */

.login-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);

  min-width: 54px;
  min-height: 40px;
  padding: 6px;

  border: 0;
  border-radius: 8px;
  background: transparent;

  color: #245c4c;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.login-password-toggle:focus-visible {
  outline: 2px solid #1f8069;
  outline-offset: 1px;
}


/* =====================================================
   LOGIN - ICONE UTENTE E VISIBILITÀ PASSWORD
   ===================================================== */

/* Icona utente */

.login-icon-user {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23364640' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21v-2a8 8 0 0 1 16 0v2'/%3E%3C/svg%3E");
}

/* Icone mostra/nascondi password */

.login-icon-eye,
.login-icon-eye-off {
  display: block;
  width: 22px;
  height: 22px;
  margin: auto;

  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Password nascosta: mostra occhio */

.login-icon-eye {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23364640' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

/* Password visibile: occhio barrato */

.login-icon-eye-off {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23364640' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.6 5.1A10.8 10.8 0 0 1 12 5c6.5 0 10 7 10 7a14.8 14.8 0 0 1-4 4.7'/%3E%3Cpath d='M6.1 6.1A15.7 15.7 0 0 0 2 12s3.5 7 10 7a10.4 10.4 0 0 0 5.9-1.9'/%3E%3Cpath d='M9.9 9.9a3 3 0 0 0 4.2 4.2'/%3E%3Cpath d='m3 3 18 18'/%3E%3C/svg%3E");
}

/* =========================================
   LOGIN MOBILE — POSIZIONAMENTO VERTICALE
   ========================================= */

@media (max-width: 600px) {

  .login-content {
    transform: translateY(-55px);
  }

}
