/* login.css - CSS semplice per la pagina di login */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-container {
  background: white;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

/* Logo */
.logo {
  margin-bottom: 30px;
}

.logo img {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  margin-bottom: 15px;
}

.auth-container h2 {
  color: #0c4a6e;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 30px;
}

/* Form */
.auth-form {
  text-align: left;
}

.auth-form input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 15px;
  transition: border-color 0.3s;
}

.auth-form input:focus {
  outline: none;
  border-color: #0ea5e9;
}

.auth-form button {
  width: 100%;
  padding: 12px;
  background: #0ea5e9;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.auth-form button:hover {
  background: #0284c7;
}

.auth-form button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

/* Error messages */
.error-box,
.error-message {
  background: #fef2f2;
  color: #dc2626;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 14px;
  border-left: 4px solid #dc2626;
}

/* Success messages */
.success-message {
  background: #f0fdf4;
  color: #16a34a;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 14px;
  border-left: 4px solid #16a34a;
}

/* Auth switch */
.auth-switch {
  text-align: center;
  margin-top: 20px;
  color: #64748b;
}

.auth-switch a {
  color: #0ea5e9;
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Link homepage */
.back-home {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  color: #0c4a6e;
  font-weight: 600;
  font-size: 14px;
}

.back-home:hover {
  background: white;
}

/* Mobile */
@media (max-width: 480px) {
  body {
    padding: 60px 10px 10px 10px; /* Spazio in alto per il link */
    align-items: flex-start;
    padding-top: 80px; /* Più spazio per il link */
  }
  
  .auth-container {
    padding: 30px 20px;
    margin-top: 0;
  }
  
  .logo img {
    width: 60px;
    height: 60px;
  }
  
  .auth-container h2 {
    font-size: 1.5rem;
  }
  
  .back-home {
    position: fixed; /* Fixed invece di absolute */
    top: 20px;
    left: 20px;
    z-index: 100; /* Sopra tutto */
  }
}
