/* ============================================
   /css/styles_login.css
   BilancioFacile — Login / Registrazione
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap');

:root {
  --accent: #4f6ef7;
  --accent-dark: #3b56d4;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ---- Slideshow Background ---- */
.slideshow {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.slideshow img.active {
  opacity: 1;
}

.slideshow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 48, 0.55);
  backdrop-filter: blur(2px);
}

/* ---- Login Card ---- */
.login-container {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 18px;
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 480px;
}

.login-container .logo-wrap {
  text-align: center;
  margin-bottom: 28px;
}

.login-container .logo-wrap img {
  height: 48px;
}

.login-container h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1d2e;
  margin-bottom: 6px;
  letter-spacing: -.02em;
  text-align: center;
}

.login-container .subtitle {
  font-size: .88rem;
  color: #8b90a8;
  margin-bottom: 28px;
}

/* ---- Form ---- */
.login-container form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-container input[type="email"],
.login-container input[type="password"],
.login-container input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e8eaf2;
  border-radius: 10px;
  font-family: var(--font);
  font-size: .9rem;
  color: #1a1d2e;
  background: #fafbfe;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.login-container input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 110, 247, .1);
}

.login-container input::placeholder {
  color: #c0c4d6;
}

.login-container button[type="submit"] {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font);
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 2px 8px rgba(79, 110, 247, .3);
  margin-top: 4px;
}

.login-container button[type="submit"]:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 110, 247, .35);
}

.login-container button[type="submit"]:active {
  transform: scale(.98);
}

.login-container p {
  text-align: center;
  font-size: .84rem;
  color: #8b90a8;
  margin-top: 20px;
}

.login-container p a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.login-container p a:hover {
  text-decoration: underline;
}

/* ---- Messaggi ---- */
.msg-success {
  background: #eafaf2;
  border: 1px solid #22b573;
  color: #166639;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .84rem;
  margin-bottom: 14px;
}

.msg-error {
  background: #fef0f0;
  border: 1px solid #f04e4e;
  color: #a52222;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .84rem;
  margin-bottom: 14px;
}

/* ============================================
   HONEYPOT — visivamente nascosto ma
   accessibile ai bot (NON usare display:none
   o visibility:hidden — i bot li ignorano)
   ============================================ */

/* Vecchia classe (compatibilità) */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  tab-index: -1;
  overflow: hidden;
}

/* Nuova classe per il blocco multi-campo (.hp-trap) */
.hp-trap {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Input e label all'interno del trap: azzerati */
.hp-trap input,
.hp-trap label {
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  font-size: 1px !important;
  line-height: 1 !important;
  overflow: hidden !important;
}

/* ---- Checkbox GDPR ---- */
.gdpr-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 6px 0 4px;
  padding: 14px 14px;
  background: #fafbfe;
  border: 1px solid #eef0f7;
  border-radius: 10px;
}

.gdpr-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .8rem;
  color: #4a4f68;
  line-height: 1.5;
  text-align: left;
}

.gdpr-field input[type="checkbox"] {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

.gdpr-field label {
  cursor: pointer;
  flex: 1;
}

.gdpr-field a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.gdpr-field a:hover { text-decoration: underline; }

.gdpr-field.required label::after {
  content: ' *';
  color: #f04e4e;
  font-weight: 700;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .login-container {
    margin: 16px;
    padding: 32px 24px;
  }
}
