:root {
  color-scheme: light dark;
  --sfondo: #f4f5f7;
  --carta: #ffffff;
  --testo: #1c2330;
  --bordo: #b8bfcc;
  --accento: #1f6f4a;
  --accento-testo: #ffffff;
  --errore: #b3261e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sfondo: #14181f;
    --carta: #1e242e;
    --testo: #eef1f6;
    --bordo: #4a5466;
    --accento: #3fae7c;
    --accento-testo: #0b1a12;
    --errore: #ff8a80;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--sfondo);
  color: var(--testo);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.4;
}

.accesso {
  width: 100%;
  max-width: 24rem;
  padding: 24px 20px;
  background: var(--carta);
  border: 1px solid var(--bordo);
  border-radius: 12px;
}

h1 {
  margin: 0 0 20px;
  font-size: 1.4rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  font-weight: 600;
}

input {
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  font: inherit; /* almeno 16px: evita lo zoom automatico su iPhone */
  color: inherit;
  background: var(--sfondo);
  border: 2px solid var(--bordo);
  border-radius: 8px;
}

input:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accento);
  outline-offset: 2px;
}

button {
  min-height: 56px;
  margin-top: 4px;
  font: inherit;
  font-weight: 700;
  color: var(--accento-testo);
  background: var(--accento);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.errore {
  margin: 0;
  color: var(--errore);
  font-weight: 600;
}
