:root {
  --bg: #f3f5ef;
  --ink: #17211b;
  --muted: #6b756d;
  --line: #e2e6dc;
  --green: #0a7d4f;
  --green-dark: #075c3b;
  --danger: #b42318;
  --danger-soft: #fdecec;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 420px at 50% -180px, #dcecdf 0%, rgba(220, 236, 223, 0) 70%),
    var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.4;
}

.login-wrap {
  width: min(420px, calc(100% - 32px));
  padding: 36px 0;
}

.login-card {
  position: relative;
  padding: 30px 30px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(23, 33, 27, 0.04), 0 18px 50px rgba(23, 33, 27, 0.08);
}

.login-mark {
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.5), transparent 38%),
    linear-gradient(135deg, #0d8f5a, #075c3b);
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.login-mark::after {
  content: "";
  position: absolute;
  inset: 12px 9px 13px;
  border: 2.5px solid #fff;
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-12deg);
}

.login-kicker {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.login-sub {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 13.5px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 650;
}

input[type="password"] {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #cfd6cb;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="password"]:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(10, 125, 79, 0.14);
}

/* Campo utente nascosto ma presente: serve ai password manager per salvare la coppia. */
.login-user {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

button {
  width: 100%;
  margin-top: 16px;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

button:hover {
  background: var(--green-dark);
}

button:active {
  transform: translateY(1px);
}

.login-error {
  margin: 0 0 14px;
  padding: 9px 11px;
  border: 1px solid #f3b8b8;
  border-radius: 9px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12.5px;
}

.login-note {
  margin: 18px 0 0;
  color: #98a198;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 480px) {
  .login-card {
    padding: 24px 20px 18px;
  }

  h1 {
    font-size: 20px;
  }
}
