/* Stili condivisi per le pagine di autenticazione admin */
:root {
  --bg: #F3F0EA;
  --bg-card: #FFFFFF;
  --bg-dark: #073D78;
  --bg-dark-2: #0a4a8f;
  --fg: #222222;
  --fg-2: #2B2B2B;
  --muted: #6B6762;
  --warm: #E9E6E1;
  --sage: #C8DDBF;
  --sage-dark: #6EA362;
  --danger: #B33A3A;
  --border: #DCD8D2;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 16px 50px rgba(34, 34, 34, 0.10);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  color: var(--fg-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--sage); color: var(--sage-dark);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
  margin-bottom: 20px;
}
h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 36px;
  line-height: 1.15;
  color: var(--fg);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
  line-height: 1.6;
}
form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12px; font-weight: 700;
  color: var(--fg);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.input-wrap { position: relative; }
.input-wrap input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--fg);
  background: var(--bg-card);
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}
.input-wrap input:hover { border-color: #c4beb8; }
.input-wrap input:focus {
  border-color: var(--sage-dark);
  box-shadow: 0 0 0 3px rgba(110, 163, 98, 0.18);
}
.input-wrap.has-toggle input { padding-right: 48px; }
.input-wrap .toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; cursor: pointer;
  color: var(--muted); padding: 8px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em;
}
.input-wrap .toggle:hover { color: var(--fg); }

button.submit {
  width: 100%;
  padding: 14px 20px;
  border: none; border-radius: 999px;
  background: #050505;
  color: #fff;
  font-family: var(--sans); font-size: 14px; font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 200ms, transform 100ms;
  margin-top: 8px;
}
button.submit:hover { background: var(--fg); }
button.submit:active { transform: scale(0.99); }
button.submit:disabled { background: var(--muted); cursor: not-allowed; }

.alert {
  background: #FCEDED;
  color: #8A2A2A;
  border: 1px solid #F2C9C9;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  display: none;
  margin-bottom: 12px;
}
.alert.visible { display: block; }

.spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
button.submit.loading .spinner { display: inline-block; }
button.submit.loading .label { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
