:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --white: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
}

/* 1. RESET TOTALE: Rimuove margini che spostano la pagina */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

/* 2. BODY COME CONTENITORE FLEX: Forza la centratura matematica */
body {
  font-family: "Inter", sans-serif;
  background: var(--bg-gradient);
  display: flex;
  align-items: center; /* Centra verticalmente */
  justify-content: center; /* Centra orizzontalmente */
}

/* 3. WRAPPER: Assicura che la card non tocchi i bordi su mobile */
.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

/* 4. LA CARD: Larghezza fissa e ombreggiatura */
.login-card {
  background: var(--white);
  width: 100%;
  max-width: 400px; /* Dimensione ottimale della card */
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  text-align: center; /* Allinea testi e pulsanti internamente */
  box-sizing: border-box;
}

/* 5. FIX PER INPUT E BOTTONI */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left; /* Le etichette dei campi restano a sinistra */
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-dark);
}

input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  box-sizing: border-box; /* Evita che l'input esca dalla card */
}

.btn-submit {
  width: 100%;
  background: var(--primary);
  color: white;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}

.btn-submit:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* 6. FOOTER DELLA CARD */
.login-footer {
  margin-top: 25px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.login-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.back-home {
  display: block;
  margin-top: 15px;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
}
