/* ============================================================
   VISIT GUBBIO — Reset Password Page
   Palette coerente con lib/theme/app_colors.dart
   ============================================================ */

:root {
  --rosso-gubbio: #b13b2e;
  --blu-notte: #162b3d;
  --tortora: #b8a48f;
  --avorio: #f7f4ef;
  --grigio-chiaro: #e5e1db;
  --verde-salvia: #7d8f7a;
  --text-muted: #8c857d;
  --error: #b71c1c;
  --success: #2e7d32;

  --radius: 16px;
  --shadow: 0 10px 30px rgba(22, 43, 61, 0.12);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(180deg, var(--avorio) 0%, var(--grigio-chiaro) 100%);
  color: var(--blu-notte);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.page {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.card {
  width: 100%;
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo {
  width: 148px;
  height: auto;
  margin-bottom: 12px;
}

.state {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.state.hidden {
  display: none;
}

.icon-badge {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 8px;
}

.icon-badge.success {
  color: var(--success);
}

.icon-badge.error {
  color: var(--error);
}

h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 4px 0 8px;
  color: var(--blu-notte);
}

.subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

.muted {
  color: var(--text-muted);
  font-size: 14px;
}

form {
  width: 100%;
  text-align: left;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--blu-notte);
  margin: 12px 0 6px;
}

.input-wrap {
  position: relative;
  width: 100%;
}

.input-wrap input {
  width: 100%;
  padding: 12px 78px 12px 14px;
  border: 1px solid var(--grigio-chiaro);
  border-radius: 10px;
  font-size: 15px;
  color: var(--blu-notte);
  background: var(--avorio);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-wrap input:focus {
  border-color: var(--rosso-gubbio);
  box-shadow: 0 0 0 3px rgba(177, 59, 46, 0.12);
}

.toggle-visibility {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--rosso-gubbio);
  padding: 6px 4px;
  line-height: 1;
}

.toggle-visibility:hover {
  text-decoration: underline;
}

.error-text {
  min-height: 18px;
  font-size: 12.5px;
  color: var(--error);
  margin: 4px 2px 0;
}

.form-error {
  min-height: 20px;
  text-align: center;
  font-weight: 600;
}

.btn-primary {
  width: 100%;
  margin-top: 20px;
  padding: 13px 16px;
  border: none;
  border-radius: 10px;
  background: var(--rosso-gubbio);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.btn-primary:hover:not(:disabled) {
  background: #9a3226;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--grigio-chiaro);
  border-top-color: var(--rosso-gubbio);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.footer-note {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

@media (max-width: 420px) {
  .card {
    padding: 28px 20px 24px;
  }

  h1 {
    font-size: 20px;
  }
}
