/* Velico — pagine di accesso e nuova password (login.html, reset.html).
   Caricato dopo style.css e solo da queste due pagine: tutto è sotto
   body.auth-page. Stessa palette dell'app e del pannello admin. */

body.auth-page {
  --navy: #0F3D6E;
  --navy-dark: #0B2F55;
  --navy-50: #EEF3F9;
  --border: #E1E7EF;
  --border-strong: #CBD5E1;
  --text: #16202E;
  --text-muted: #5B6B80;
  --red: #B42318;

  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: #F5F7FA;
  background-image: none;
  -webkit-font-smoothing: antialiased;
}

.auth-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
}
.auth-card {
  width: 100%; max-width: 400px;
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 28px 24px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 24px rgba(16, 24, 40, 0.05);
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-brand img { height: 36px; width: auto; display: block; }
.auth-brand span { font-size: 1.2rem; font-weight: 700; color: var(--navy); letter-spacing: -0.01em; }
.auth-card h1, .auth-card h2 { margin: 0; font-size: 1.4rem; font-weight: 700; letter-spacing: -0.015em; color: var(--text); text-align: left; }
.auth-sub { margin: 4px 0 20px; color: var(--text-muted); font-size: 0.92rem; text-align: left; }

.auth-page label { display: block; margin: 14px 0 6px; font-size: 0.84rem; font-weight: 600; color: #344054; }
.auth-page input {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; color: var(--text);
  font-family: inherit; font-size: 16px;
}
.auth-page input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15, 61, 110, 0.15); }
.auth-page :focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.auth-page input:focus-visible { outline: none; }

.auth-page button[type="submit"], .auth-page .auth-btn {
  display: flex; align-items: center; justify-content: center; width: 100%;
  min-height: 48px; margin-top: 22px; padding: 12px 16px;
  border: 0; border-radius: 10px; background: var(--navy); color: #fff;
  font-family: inherit; font-size: 0.98rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background 0.15s;
}
.auth-page button[type="submit"]:hover, .auth-page .auth-btn:hover { background: var(--navy-dark); color: #fff; }
.auth-page button[type="submit"]:disabled { opacity: 0.6; cursor: wait; }

.auth-page a { color: var(--navy); font-weight: 600; text-underline-offset: 2px; }
.auth-link { text-align: center; margin: 18px 0 0; font-size: 0.9rem; }
.auth-link a { display: inline-block; padding: 10px 6px; }

.auth-page .error-msg {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px;
  background: #FEF3F2; border: 1px solid #FECDCA; color: var(--red); font-size: 0.88rem; font-weight: 600;
}
.auth-ok {
  margin: 16px 0 0; padding: 12px 14px; border-radius: 10px;
  background: #ECFDF3; border: 1px solid #ABEFC6; color: #067647; font-size: 0.9rem;
}
.auth-page .hidden { display: none !important; }

.auth-foot { margin: 0; font-size: 0.8rem; color: var(--text-muted); text-align: center; }
.auth-foot a { font-weight: 500; color: var(--text-muted); }

@media (max-width: 420px) {
  .auth-card { padding: 24px 18px; border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-page * { transition: none !important; }
}
