/* ═══════════════════════════════════════════════════════════════════
   auth.css — Modal popup d'autenticació (login / registre)
   Anhelo · Disseny extret de styles.css
   ═══════════════════════════════════════════════════════════════════ */

/* ─── VARIABLES LOCALS (copiades de styles.css per fer el fitxer autònom) ── */
:root {
  --auth-color-primary:   #880b0b;   /* vermell fosc */
  --auth-color-gold:      #dbb90f;   /* or fosc      */
  --auth-color-text:      #3a2a10;
  --auth-color-bg:        #fff8e5;
  --auth-font:            'parabolica', 'parabolica';
  --auth-radius-card:     20px;
  --auth-radius-input:    8px;
  --auth-radius-btn:      10px;
}

/* ─── OVERLAY ────────────────────────────────────────────────────────────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(30, 16, 4, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.auth-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ─── MODAL CONTAINER ────────────────────────────────────────────────────── */
.auth-modal {
  width: 100%;
  max-width: 820px;
  background: var(--auth-color-bg);
  border-radius: var(--auth-radius-card);
  overflow: hidden;
  display: flex;
  min-height: 520px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(.22, .68, 0, 1.1);
}
.auth-overlay.is-open .auth-modal {
  transform: translateY(0) scale(1);
}

/* ─── PANELS (login / registre) ─────────────────────────────────────────── */
.auth-panel {
  display: none;
  flex: 1;
  min-width: 0;
}
.auth-panel.active {
  display: flex;
}

/* ─── FORMULARI ──────────────────────────────────────────────────────────── */
.auth-form {
  flex: 1;
  padding: 44px 44px 40px;
  display: flex;
  flex-direction: column;
}

/* ─── BOTÓ ENRERE / TANCA ────────────────────────────────────────────────── */
.auth-back {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(58, 42, 16, 0.45);
  transition: color 0.2s;
  width: fit-content;
}
.auth-back svg  { width: 18px; height: 18px; }
.auth-back:hover { color: var(--auth-color-primary); }

/* ─── TÍTOL ──────────────────────────────────────────────────────────────── */
.auth-title {
  font-family: var(--auth-font);
  font-weight: 600;
  font-size: 34px;
  color: var(--auth-color-primary);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 26px;
}

/* ─── CAMPS ──────────────────────────────────────────────────────────────── */
.auth-field { margin-bottom: 14px; }

.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--auth-color-primary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.auth-input {
  width: 100%;
  height: 44px;
  background: transparent;
  border: 1.5px solid var(--auth-color-gold);
  border-radius: var(--auth-radius-input);
  padding: 0 14px;
  font-family: var(--auth-font);
  font-size: 14px;
  color: var(--auth-color-text);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-input::placeholder { color: rgba(58, 42, 16, 0.28); }
.auth-input:focus {
  border-color: var(--auth-color-primary);
  box-shadow: 0 0 0 3px rgba(136, 11, 11, 0.08);
}

/* ─── FILA RECORDA + CONTRASENYA OBLIDADA ────────────────────────────────── */
.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 20px;
}
.auth-remember {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: rgba(58, 42, 16, 0.55);
  cursor: pointer;
}
.auth-remember input[type="checkbox"] {
  accent-color: var(--auth-color-gold);
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.auth-forgot {
  font-size: 13px;
  color: var(--auth-color-gold);
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: none;
}
.auth-forgot:hover { color: var(--auth-color-primary); }

/* ─── BOTÓ PRINCIPAL ─────────────────────────────────────────────────────── */
.auth-btn-primary {
  width: 100%;
  height: 46px;
  background: var(--auth-color-primary);
  border: none;
  border-radius: var(--auth-radius-btn);
  color: var(--auth-color-gold);
  font-family: var(--auth-font);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: filter 0.2s, transform 0.15s;
  margin-bottom: 16px;
}
.auth-btn-primary:hover  { filter: brightness(1.12); transform: translateY(-1px); }
.auth-btn-primary:active { transform: translateY(0); }

/* ─── DIVISOR "o" ────────────────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.auth-divider-line {
  flex: 1;
  height: 1px;
  background: rgba(58, 42, 16, 0.13);
}
.auth-divider-text {
  font-size: 12px;
  color: rgba(58, 42, 16, 0.38);
}

/* ─── BOTÓ GOOGLE ────────────────────────────────────────────────────────── */
.auth-btn-google {
  width: 100%;
  height: 44px;
  background: #fff;
  border: 1.5px solid rgba(58, 42, 16, 0.14);
  border-radius: var(--auth-radius-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--auth-font);
  font-size: 14px;
  color: var(--auth-color-text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.auth-btn-google:hover {
  background: #f5f0e8;
  border-color: rgba(58, 42, 16, 0.28);
}

/* ─── TEXT "Ja tens compte?" ─────────────────────────────────────────────── */
.auth-switch {
  margin-top: 18px;
  font-size: 13px;
  color: rgba(58, 42, 16, 0.48);
  text-align: center;
}
.auth-switch-link {
  color: var(--auth-color-primary);
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
}
.auth-switch-link:hover { text-decoration: underline; }

/* ─── FILA 2 COLUMNES (nom + cognoms en registre) ────────────────────────── */
.auth-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ─── PANEL IMATGE DRETA ─────────────────────────────────────────────────── */
.auth-image {
  width: 320px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: #c8b89a;
}
.auth-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.auth-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(136, 11, 11, 0.18) 0%, transparent 55%);
  pointer-events: none;
}
.auth-image-badge {
  position: absolute;
  bottom: 28px;
  left: 20px;
  right: 20px;
  background: rgba(42, 22, 6, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 16px 20px;
}
.auth-image-badge-title {
  font-family: 'parabolica';
  font-style: italic;
  font-size: 18px;
  color: var(--auth-color-gold);
  line-height: 1.15;
  margin: 0 0 5px 0;
}
.auth-image-badge-sub {
  font-size: 11px;
  color: rgba(255, 248, 229, 0.55);
  line-height: 1.4;
  margin: 0;
}

/* ─── ALERTES D'ERROR ────────────────────────────────────────────────────── */
.auth-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}
.auth-alert--error {
  background: rgba(136, 11, 11, 0.08);
  color: var(--auth-color-primary);
  border: 1px solid rgba(136, 11, 11, 0.2);
}
.auth-alert--success {
  background: rgba(34, 120, 56, 0.08);
  color: #1a6632;
  border: 1px solid rgba(34, 120, 56, 0.2);
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .auth-image  { display: none; }
  .auth-form   { padding: 32px 24px; }
  .auth-title  { font-size: 26px; }
  .auth-row-2  { grid-template-columns: 1fr; }
}
