/* ═══════════════════════════════════════════════
   Guía FYO — perfil.css
   Página Mi Perfil (usuario visitante)
   ═══════════════════════════════════════════════ */

/* ── Variables (mismos que el resto del sitio) ── */
:root {
  --navy: #0f172a;
  --navy2: #1a2340;
  --orange: #f97316;
  --yellow: #fbbf24;
  --gold: #f59e0b;
  --teal: #2dd4bf;
  --cream: #fef3c7;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Nunito', sans-serif;
  background: var(--navy);
  color: var(--text);
  min-height: 100vh;
}

/* ══════════════ NAV ══════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: white;
}
.nav-paw { font-size: 28px; }
.logo-text { font-family: 'Fredoka One', cursive; font-size: 20px; display: block; }
.nav-logo small { font-size: 11px; color: var(--text-muted); }
.nav-right { display: flex; align-items: center; gap: 12px; position: relative; }
.nav-back {
  color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 13px;
  transition: color 0.2s;
}
.nav-back:hover { color: var(--yellow); }
/* user-btn, user-avatar, user-menu → auth.css */

/* ══════════════ LOGIN REQUIRED ══════════════ */
.login-required {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 100px 20px;
}
.login-req-icon { font-size: 64px; margin-bottom: 16px; }
.login-required h2 { font-size: 24px; margin-bottom: 8px; }
.login-required p { color: var(--text-muted); margin-bottom: 24px; max-width: 400px; }
.login-req-btn {
  display: inline-block; padding: 14px 32px; border-radius: 50px;
  background: var(--orange); color: white; text-decoration: none;
  font-weight: 800; font-size: 15px; transition: transform 0.2s;
}
.login-req-btn:hover { transform: scale(1.04); }

/* ══════════════ PERFIL CONTAINER ══════════════ */
.perfil-container {
  max-width: 800px; margin: 0 auto;
  padding: 100px 20px 60px;
}

/* ── Header ── */
.perfil-header {
  display: flex; align-items: center; gap: 20px;
  padding: 24px; margin-bottom: 24px;
  background: var(--navy2); border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
}
.perfil-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  color: white; display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; flex-shrink: 0;
}
.perfil-info h1 { font-size: 22px; font-weight: 900; }
.perfil-info p { color: var(--text-muted); font-size: 14px; }

/* ── Tabs ── */
.perfil-tabs {
  display: flex; gap: 4px; margin-bottom: 24px;
  background: var(--navy2); border-radius: 12px; padding: 4px;
  border: 1px solid rgba(255,255,255,0.06);
}
.tab-btn {
  flex: 1; padding: 12px 16px; border: none; border-radius: 10px;
  background: transparent; color: var(--text-muted);
  font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 14px;
  cursor: pointer; transition: all 0.2s;
}
.tab-btn:hover { color: white; background: rgba(255,255,255,0.05); }
.tab-btn.active {
  background: var(--orange); color: white;
}

/* ── Tab content ── */
.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-desc { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }

/* ── Loading ── */
.loading-mini { text-align: center; padding: 40px; color: var(--text-muted); font-size: 15px; }

/* ── Empty state ── */
.empty-state {
  text-align: center; padding: 48px 20px;
  background: var(--navy2); border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
.empty-btn {
  display: inline-block; padding: 12px 28px; border-radius: 50px;
  background: var(--orange); color: white; text-decoration: none;
  font-weight: 700; font-size: 14px; transition: transform 0.2s;
}
.empty-btn:hover { transform: scale(1.04); }

/* ══════════════ VOUCHERS ══════════════ */
.voucher-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; margin-bottom: 12px;
  background: var(--navy2); border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.2s;
}
.voucher-card:hover { border-color: rgba(255,255,255,0.12); }
.voucher-card-info { flex: 1; min-width: 0; }
.voucher-card-local {
  font-size: 12px; font-weight: 800; color: var(--orange);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;
}
.voucher-card-text { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.voucher-card-fecha { font-size: 12px; color: var(--text-muted); }
.voucher-card-fecha.expired { color: #ff6b6b; }
.voucher-card-actions { display: flex; gap: 8px; flex-shrink: 0; }
.voucher-download-btn {
  padding: 8px 16px; border: none; border-radius: 8px;
  background: var(--teal); color: var(--navy); font-weight: 800; font-size: 13px;
  cursor: pointer; transition: transform 0.2s;
}
.voucher-download-btn:hover { transform: scale(1.05); }
.voucher-view-btn {
  padding: 8px 16px; border: 1.5px solid rgba(255,255,255,0.12); border-radius: 8px;
  background: transparent; color: white; font-weight: 700; font-size: 13px;
  cursor: pointer; text-decoration: none; transition: all 0.2s;
}
.voucher-view-btn:hover { border-color: var(--orange); color: var(--orange); }

/* ══════════════ FAVORITOS ══════════════ */
.favoritos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
}
.fav-card {
  background: var(--navy2); border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.2s, border-color 0.2s;
  text-decoration: none; color: white; display: block;
}
.fav-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.15); }
.fav-card-img {
  width: 100%; height: 140px; object-fit: cover;
  background: rgba(255,255,255,0.04);
}
.fav-card-img-placeholder {
  width: 100%; height: 140px;
  background: rgba(255,255,255,0.04);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}
.fav-card-body { padding: 14px; }
.fav-card-name { font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.fav-card-type { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.fav-card-loc { font-size: 12px; color: var(--text-muted); }
.fav-card-remove {
  display: block; width: 100%; padding: 10px; border: none;
  background: rgba(255,107,107,0.08); color: #ff6b6b;
  font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 13px;
  cursor: pointer; transition: background 0.2s;
}
.fav-card-remove:hover { background: rgba(255,107,107,0.15); }

/* ══════════════ CUENTA ══════════════ */
.cuenta-card {
  background: var(--navy2); border-radius: 16px; padding: 24px;
  border: 1px solid rgba(255,255,255,0.06); margin-bottom: 16px;
}
.cuenta-card h3 { font-size: 17px; margin-bottom: 16px; }
.cuenta-card p { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }
.cuenta-card.danger { border-color: rgba(255,107,107,0.2); }
.cuenta-field { margin-bottom: 16px; }
.cuenta-field label {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--text-muted); margin-bottom: 6px;
}
.cuenta-field input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04); color: white;
  font-family: 'Nunito', sans-serif; font-size: 14px;
  outline: none; transition: border-color 0.2s;
}
.cuenta-field input:focus { border-color: var(--orange); }
.cuenta-field input:disabled { opacity: 0.5; cursor: not-allowed; }
/* Password toggle */
.pass-input-wrap { position: relative; display: flex; align-items: center; }
.pass-input-wrap input { flex: 1; padding-right: 44px; }
.pass-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1.1rem;
  line-height: 1; padding: 4px; opacity: 0.6; transition: opacity 0.2s;
}
.pass-toggle:hover { opacity: 1; }
.field-note { font-size: 12px; color: var(--text-muted); margin-top: 4px; display: block; }
.save-cuenta-btn {
  padding: 12px 24px; border: none; border-radius: 10px;
  background: var(--orange); color: white;
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 14px;
  cursor: pointer; transition: transform 0.2s;
}
.save-cuenta-btn:hover { transform: scale(1.03); }
.logout-btn {
  padding: 12px 24px; border: 2px solid #ff6b6b; border-radius: 10px;
  background: transparent; color: #ff6b6b;
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 14px;
  cursor: pointer; transition: all 0.2s;
}
.logout-btn:hover { background: rgba(255,107,107,0.1); }

/* ══════════════ AVISO CAMBIO PASS VÍA EMAIL ══════════════ */
.pass-email-notice {
  margin-top: 18px;
  display: flex; gap: 14px;
  background: rgba(245,166,35,0.08);
  border: 1px solid rgba(245,166,35,0.25);
  border-radius: 12px;
  padding: 16px 18px;
}
.pen-icon {
  font-size: 26px; line-height: 1.1; flex-shrink: 0;
}
.pen-body { flex: 1; }
.pen-body strong {
  display: block; color: #F5A623; font-size: 14px;
  font-weight: 800; margin-bottom: 6px;
}
.pen-body p {
  font-size: 13px; color: var(--text-muted);
  line-height: 1.5; margin: 0 0 12px;
}
.pen-btn {
  padding: 10px 18px; border: none; border-radius: 8px;
  background: #F5A623; color: #0D1B2A;
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 13px;
  cursor: pointer; transition: transform 0.2s, background 0.2s;
}
.pen-btn:hover { transform: scale(1.03); background: #E8650A; color: white; }
.pen-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ══════════════ TOAST ══════════════ */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: white; padding: 14px 28px; border-radius: 12px;
  font-weight: 700; font-size: 14px; box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 9999;
}
.toast.show { opacity: 1; pointer-events: auto; }
.toast.error { background: #dc2626; }

/* ══════════════ RESPONSIVE ══════════════ */
@media (max-width: 640px) {
  .perfil-header { flex-direction: column; text-align: center; gap: 12px; }
  .perfil-tabs { flex-direction: column; }
  .tab-btn { text-align: center; }
  .voucher-card { flex-direction: column; align-items: stretch; text-align: center; }
  .voucher-card-actions { justify-content: center; }
  .nav-back { display: none; }
  .favoritos-grid { grid-template-columns: 1fr; }
}
