/* ═══════════════════════════════════════════
   CatMap – Login / Registrazione (stili)
   Layout fullscreen indipendente, niente sidebar
   ═══════════════════════════════════════════ */

:root { --error: #C44545; }

/* ═══ AUTH BODY ═══ */
.auth-body {
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(160deg, var(--terra-pale) 0%, var(--cream-mid) 55%, var(--cream) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow-x: hidden;
}

/* Decorazione 🐾 in background (come hero chisiamo) */
.auth-body::before {
  content: '🐾';
  position: fixed;
  font-size: 320px;
  opacity: .05;
  top: -40px;
  right: -60px;
  line-height: 1;
  pointer-events: none;
  z-index: 0;
}
.auth-body::after {
  content: '🐾';
  position: fixed;
  font-size: 220px;
  opacity: .04;
  bottom: -30px;
  left: -40px;
  line-height: 1;
  pointer-events: none;
  z-index: 0;
}

/* ═══ AUTH CARD ═══ */
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 28px 28px;
  animation: authIn .4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══ AUTH LOGO ═══ */
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 6px;
}
.auth-logo-icon {
  width: 56px; height: 56px;
  background: var(--terra);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  box-shadow: var(--shadow-md);
}
.auth-logo-text {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--brown);
  line-height: 1;
}
.auth-logo-text span { color: var(--terra); }

.auth-tagline {
  text-align: center;
  font-size: 13px;
  color: var(--brown-mid);
  font-weight: 500;
  margin-bottom: 24px;
}

/* ═══ TABS ═══ */
.auth-tabs {
  display: flex;
  background: var(--cream-mid);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  margin-bottom: 22px;
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 11px 8px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  color: var(--brown-mid);
  cursor: pointer;
  transition: all .18s;
  border: none;
  background: transparent;
  font-family: var(--font-ui);
}
.auth-tab.active {
  background: var(--white);
  color: var(--terra);
  box-shadow: var(--shadow-sm);
}

/* ═══ FORM PANELS ═══ */
.auth-panel { display: none; animation: panelIn .3s ease; }
.auth-panel.active { display: block; }
@keyframes panelIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }

/* ═══ FORM FIELDS ═══ */
.auth-field { margin-bottom: 16px; }
.auth-field label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--sand-dark);
  margin-bottom: 7px;
}
.auth-field input {
  width: 100%;
  padding: 13px 16px;
  background: var(--white);
  border: 1.5px solid var(--sand);
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  color: var(--brown);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.auth-field input:focus {
  border-color: var(--terra);
  box-shadow: 0 0 0 3px rgba(196,112,79,0.12);
}
.auth-field input::placeholder { color: var(--sand-dark); }
.auth-field input.error { border-color: var(--error); }
.auth-field-err {
  font-size: 11px;
  color: var(--error);
  font-weight: 600;
  margin-top: 5px;
  display: none;
}
.auth-field-err.show { display: block; }

/* ═══ PASSWORD TOGGLE ═══ */
.auth-pass-wrap { position: relative; }
.auth-pass-wrap input { padding-right: 44px; }
.auth-pass-wrap button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--sand-dark);
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  line-height: 1;
}

/* ═══ PASSWORD STRENGTH ═══ */
.auth-strength {
  margin-top: 8px;
  display: flex;
  gap: 4px;
}
.auth-strength-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--cream-mid);
  transition: background .3s;
}
.auth-strength-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--sand-dark);
  margin-top: 5px;
}

/* ═══ CHECKBOX PRIVACY ═══ */
.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  cursor: pointer;
}
.auth-check input { display: none; }
.auth-check-box {
  width: 20px; height: 20px;
  border-radius: 5px;
  border: 1.5px solid var(--sand);
  background: var(--white);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.auth-check input:checked + .auth-check-box {
  background: var(--terra);
  border-color: var(--terra);
}
.auth-check input:checked + .auth-check-box::after {
  content: '✓';
  color: white;
  font-size: 13px;
  font-weight: 800;
}
.auth-check-text {
  font-size: 12px;
  color: var(--brown-mid);
  font-weight: 500;
  line-height: 1.5;
}
.auth-check-text a { color: var(--terra); font-weight: 700; text-decoration: none; }
.auth-check-text a:hover { text-decoration: underline; }

/* ═══ SUBMIT BUTTON ═══ */
.auth-submit {
  width: 100%;
  background: var(--terra);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(196,112,79,0.35);
  transition: all .15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-submit:hover { background: var(--terra-dark); transform: translateY(-1px); }
.auth-submit:active { transform: translateY(0); }
.auth-submit:disabled { background: var(--sand); box-shadow: none; cursor: not-allowed; transform: none; }

/* ═══ LINK SECONDARI ═══ */
.auth-forgot {
  text-align: right;
  margin-top: -8px;
  margin-bottom: 16px;
}
.auth-forgot a {
  font-size: 12px;
  font-weight: 700;
  color: var(--brown-mid);
  text-decoration: none;
}
.auth-forgot a:hover { color: var(--terra); }

/* ═══ DIVIDER + GUEST LINK ═══ */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  color: var(--sand-dark);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cream-mid);
}

.auth-guest {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--sand);
  background: var(--white);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--brown-mid);
  text-decoration: none;
  transition: all .15s;
}
.auth-guest:hover { border-color: var(--terra); color: var(--terra); }
