/*
 * Login e registrazione (visitatori anonimi) — stesso linguaggio visivo nero
 * minimale di home.css, scoped sotto .auth-root. Pagine a se stanti, non usano
 * i token di styles.css: qui e' il proseguimento della home, non l'app-shell.
 */

:root {
  --auth-bg: #000000;
  --auth-card: #131313;
  --auth-field: rgba(255, 255, 255, 0.05);
  --auth-ink: #f5f5f5;
  --auth-ink-dim: rgba(245, 245, 245, 0.6);
  --auth-ink-faint: rgba(245, 245, 245, 0.4);
  --auth-line: rgba(255, 255, 255, 0.1);
  --auth-line-strong: rgba(255, 255, 255, 0.22);
  --auth-danger: #ff6b6b;
  --auth-radius-lg: 20px;
  --auth-sans: -apple-system, "Segoe UI", system-ui, sans-serif;
}

.auth-root, .auth-root * { box-sizing: border-box; }
.auth-root { background: var(--auth-bg); color: var(--auth-ink); font-family: var(--auth-sans); min-height: 100vh; -webkit-font-smoothing: antialiased; }
.auth-root a { color: inherit; text-decoration: none; }
.auth-root h1, .auth-root h2 { margin: 0; font-weight: 400; }
.auth-root p { margin: 0; }

.auth-topbar { display: flex; justify-content: center; padding: 26px 28px 0; }
a.auth-back { font-size: 0.84rem; color: var(--auth-ink-faint); display: inline-flex; align-items: center; gap: 6px; }
a.auth-back:hover { color: var(--auth-ink-dim); }
.auth-topbar-inner { width: 100%; max-width: 420px; }

.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px 60px; }
.auth-card { width: 100%; max-width: 420px; border: 1px solid var(--auth-line); border-radius: var(--auth-radius-lg); background: var(--auth-card); padding: 36px 32px; }
.auth-card.auth-card-wide { max-width: 480px; }

.auth-brand { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.92rem; margin-bottom: 26px; }
.auth-brand .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--auth-ink); }

.auth-heading { text-align: center; margin-bottom: 22px; }
.auth-heading h2 { font-size: 1.3rem; letter-spacing: -0.01em; }
.auth-heading p { margin-top: 6px; font-size: 0.86rem; color: var(--auth-ink-faint); }

.auth-error { background: rgba(255, 107, 107, 0.12); border: 1px solid rgba(255, 107, 107, 0.28); color: var(--auth-danger); padding: 10px 14px; border-radius: 10px; font-size: 0.85rem; margin-bottom: 16px; display: none; }

.auth-field { margin-bottom: 18px; }
.auth-field label { display: block; font-size: 0.82rem; color: var(--auth-ink-dim); margin-bottom: 7px; }
.auth-field input {
  width: 100%; background: var(--auth-field); border: 1px solid var(--auth-line); border-radius: 10px;
  padding: 11px 14px; font-size: 0.92rem; color: var(--auth-ink); font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.auth-field input::placeholder { color: var(--auth-ink-faint); }
.auth-field input:focus { outline: none; border-color: var(--auth-line-strong); background: rgba(255, 255, 255, 0.07); }
.auth-field .auth-hint { display: block; margin-top: 6px; font-size: 0.78rem; color: var(--auth-ink-faint); }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Picker palestra in /registrati-cliente: input di ricerca + lista risultati cliccabili. */
.gym-results { position: relative; margin-top: 6px; border: 1px solid var(--auth-line); border-radius: 10px; overflow: hidden; display: none; }
.gym-results.open { display: block; }
.gym-result { padding: 10px 14px; cursor: pointer; font-size: 0.88rem; border-top: 1px solid var(--auth-line); }
.gym-result:first-child { border-top: none; }
.gym-result:hover { background: var(--auth-field); }
.gym-result .city { color: var(--auth-ink-faint); font-size: 0.78rem; margin-left: 6px; }
.gym-result.empty { color: var(--auth-ink-faint); cursor: default; }
.gym-result.empty:hover { background: none; }
.gym-selected { margin-top: 8px; font-size: 0.84rem; color: var(--auth-ink-dim); display: none; align-items: center; gap: 8px; }
.gym-selected.open { display: flex; }
.gym-selected button { font-size: 0.78rem; color: var(--auth-ink-faint); text-decoration: underline; background: none; border: none; cursor: pointer; font-family: inherit; }

button.auth-submit {
  width: 100%; margin-top: 6px; background: rgba(255, 255, 255, 0.92); color: #000; border: none; border-radius: 100px;
  padding: 13px 20px; font-size: 0.92rem; font-weight: 500; font-family: inherit; cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
button.auth-submit:hover:not(:disabled) { background: #fff; transform: translateY(-1px); }
button.auth-submit:disabled { opacity: 0.6; cursor: default; transform: none; }

.auth-footnote { text-align: center; margin-top: 20px; font-size: 0.84rem; color: var(--auth-ink-faint); }

/* Selezione piano / attivazione (register.js gestisce .plan-card/.active, qui solo lo stile) */
.plan-card {
  display: block; cursor: pointer; text-align: center; border: 1px solid var(--auth-line); border-radius: 12px;
  padding: 14px 12px; background: var(--auth-field); transition: border-color 0.15s ease, background 0.15s ease;
}
.plan-card:hover { border-color: var(--auth-line-strong); }
.plan-card.active { border-color: var(--auth-ink); background: rgba(255, 255, 255, 0.09); }
.plan-card input { margin: 0 0 8px 0; accent-color: var(--auth-ink); }
.plan-card .plan-name { font-weight: 500; font-size: 0.88rem; color: var(--auth-ink); }
.plan-card .plan-price { font-weight: 500; font-size: 1.08rem; color: var(--auth-ink); margin-top: 4px; }
.plan-card .plan-price span { font-size: 0.72rem; font-weight: 400; color: var(--auth-ink-faint); }
.plan-card .plan-desc { margin-top: 4px; font-size: 0.76rem; color: var(--auth-ink-faint); }
