/* =====================================================================
   Che Venite — Design System
   Paleta extraída del logo oficial:
     navy #042548 · celeste #5EA6E1 · naranja sol #F1A02D · sol claro #FFC564
   Todos los pares texto/fondo verificados con contraste WCAG AA.
   ===================================================================== */

/* ------------------------------------------------------------- tokens */
[data-theme="light"] {
  --bg-primary:     #FFFFFF;
  --bg-secondary:   #F4F8FC;
  --bg-tertiary:    #E7EFF8;
  --surface:        #FFFFFF;
  --surface-raised: #FFFFFF;

  --text-primary:   #042548;   /* navy del logo — 15.4:1 sobre blanco */
  --text-secondary: #44566F;   /* 7.5:1 */
  --text-muted:     #5A6B84;   /* 5.4:1 */
  --text-invert:    #FFFFFF;

  --border:         #D3E0EE;
  --border-strong:  #B6CCE2;

  --accent:         #1B6FBF;   /* celeste del logo llevado a contraste AA */
  --accent-hover:   #14568F;
  --accent-soft:    #E8F2FB;
  --accent-text:    #FFFFFF;

  --celeste:        #5EA6E1;   /* celeste puro del logo — solo decorativo */
  --navy:           #042548;
  --navy-soft:      #0B2E52;

  --sol:            #F1A02D;   /* naranja del sol — decorativo / fondos */
  --sol-strong:     #9A5B00;   /* misma familia, apto para texto (5.4:1) */
  --sol-soft:       #FDF1DE;

  --danger:         #B4291B;
  --danger-soft:    #FBEAE8;
  --success:        #10693D;
  --success-soft:   #E4F4EB;
  --warning:        #9A5B00;
  --warning-soft:   #FDF1DE;

  --shadow-sm:      0 1px 2px rgba(4,37,72,.06), 0 1px 3px rgba(4,37,72,.08);
  --shadow-md:      0 4px 12px rgba(4,37,72,.09), 0 2px 4px rgba(4,37,72,.06);
  --shadow-lg:      0 12px 32px rgba(4,37,72,.13), 0 4px 8px rgba(4,37,72,.07);
  --ripple-color:   rgba(255,255,255,.45);
  --scrim:          rgba(4,37,72,.55);
}

[data-theme="dark"] {
  --bg-primary:     #0A1B2D;
  --bg-secondary:   #11273E;
  --bg-tertiary:    #16324F;
  --surface:        #11273E;
  --surface-raised: #16324F;

  --text-primary:   #E8F1FA;
  --text-secondary: #A9BDD3;
  --text-muted:     #7A8EA6;
  --text-invert:    #04203C;

  --border:         #1F3E5C;
  --border-strong:  #2C5580;

  --accent:         #6DB2E8;
  --accent-hover:   #8AC3EF;
  --accent-soft:    #14324F;
  --accent-text:    #04203C;

  --celeste:        #5EA6E1;
  --navy:           #E8F1FA;
  --navy-soft:      #0A1B2D;

  --sol:            #F3AE4A;
  --sol-strong:     #F3AE4A;
  --sol-soft:       #33260F;

  --danger:         #F0736A;
  --danger-soft:    #3A1C1A;
  --success:        #4BC98A;
  --success-soft:   #10301F;
  --warning:        #F3AE4A;
  --warning-soft:   #33260F;

  --shadow-sm:      0 1px 2px rgba(0,0,0,.35);
  --shadow-md:      0 4px 14px rgba(0,0,0,.45);
  --shadow-lg:      0 14px 36px rgba(0,0,0,.55);
  --ripple-color:   rgba(255,255,255,.28);
  --scrim:          rgba(2,10,20,.72);
}

/* --------------------------------------------------------------- base */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg-secondary);
  color: var(--text-primary);
  overscroll-behavior-y: none;
  transition: background .22s ease, color .22s ease;
}

h1, h2, h3, h4 { margin: 0 0 .5rem; font-weight: 650; line-height: 1.22; letter-spacing: -.01em; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 15px; }
p  { margin: 0 0 1rem; }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.label {
  font-size: 12px; text-transform: uppercase; letter-spacing: .07em;
  font-weight: 650; color: var(--text-muted); margin: 0 0 .35rem;
}
.muted { color: var(--text-muted); }
.text-sec { color: var(--text-secondary); }
.center { text-align: center; }
.hidden { display: none !important; }

/* --------------------------------------------------------- contenedores */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.container-narrow { max-width: 860px; margin: 0 auto; padding: 2rem 1.5rem; }
@media (max-width: 768px) {
  .container, .container-narrow { padding: 1.25rem 1rem; }
}

.seccion-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.seccion-head h2 { margin: 0; }
.seccion-head p  { margin: .15rem 0 0; color: var(--text-muted); font-size: 14px; }

/* ------------------------------------------------------------- botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .7rem 1.25rem;
  border: 1px solid transparent; border-radius: 12px;
  font-size: 15px; font-weight: 600; line-height: 1;
  position: relative; overflow: hidden;
  transition: background .16s ease, border-color .16s ease, transform .1s ease, color .16s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn i, .btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary   { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }

.btn-sol       { background: var(--sol); color: #042548; }
.btn-sol:hover:not(:disabled) { filter: brightness(.94); }

.btn-secondary { background: var(--bg-primary); color: var(--text-primary); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-tertiary); }

.btn-ghost     { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-tertiary); color: var(--text-primary); }

.btn-danger    { background: var(--danger); color: #fff; }
.btn-block     { width: 100%; }
.btn-sm        { min-height: 38px; padding: .5rem .9rem; font-size: 13.5px; border-radius: 10px; }
.btn-lg        { min-height: 52px; padding: .9rem 1.75rem; font-size: 16px; border-radius: 14px; }

/* ------------------------------------------------------------- ripple */
.ripple { position: relative; overflow: hidden; }
.ripple-wave {
  position: absolute; border-radius: 50%; background: var(--ripple-color);
  transform: scale(0); animation: ripple-anim .6s linear; pointer-events: none;
}
@keyframes ripple-anim { to { transform: scale(4); opacity: 0; } }
.btn-secondary .ripple-wave,
.btn-ghost .ripple-wave,
.ripple-dark .ripple-wave { background: rgba(4,37,72,.13); }
[data-theme="dark"] .btn-secondary .ripple-wave,
[data-theme="dark"] .btn-ghost .ripple-wave,
[data-theme="dark"] .ripple-dark .ripple-wave { background: rgba(255,255,255,.16); }

/* ------------------------------------------------------------ tarjetas */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 1.25rem; }

/* Tarjeta de experiencia — recorte asimétrico, no es una card genérica */
.exp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px 18px 18px 4px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
  text-decoration: none; color: inherit;
}
.exp-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.exp-foto {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: linear-gradient(140deg, var(--celeste) 0%, var(--accent) 55%, var(--navy-soft) 100%);
  display: flex; align-items: center; justify-content: center;
}
.exp-foto img { width: 100%; height: 100%; object-fit: cover; }
.exp-foto .exp-foto-icono { color: rgba(255,255,255,.9); }
.exp-foto .exp-foto-icono i, .exp-foto .exp-foto-icono svg { width: 46px; height: 46px; }
.exp-precio {
  position: absolute; right: .7rem; bottom: .7rem;
  background: var(--bg-primary); color: var(--text-primary);
  padding: .35rem .7rem; border-radius: 10px;
  font-weight: 700; font-size: 14.5px; box-shadow: var(--shadow-md);
}
.exp-body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.exp-titulo { font-size: 16px; font-weight: 650; margin: 0; line-height: 1.3; }
.exp-meta { display: flex; align-items: center; gap: .35rem; font-size: 13px; color: var(--text-muted); }
.exp-meta i, .exp-meta svg { width: 14px; height: 14px; flex-shrink: 0; }
.exp-foot {
  margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.exp-anfitrion { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.exp-grid {
  display: grid; gap: 1.15rem;
  grid-template-columns: repeat(auto-fill, minmax(266px, 1fr));
}

/* --------------------------------------------------------------- chips */
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .28rem .65rem; border-radius: 999px;
  font-size: 12px; font-weight: 650; letter-spacing: .01em;
  background: var(--bg-tertiary); color: var(--text-secondary);
  border: 1px solid transparent; white-space: nowrap;
}
.chip i, .chip svg { width: 13px; height: 13px; }
.chip-accent  { background: var(--accent-soft);  color: var(--accent); }
.chip-sol     { background: var(--sol-soft);     color: var(--sol-strong); }
.chip-success { background: var(--success-soft); color: var(--success); }
.chip-danger  { background: var(--danger-soft);  color: var(--danger); }
.chip-warning { background: var(--warning-soft); color: var(--warning); }

.estrellas { display: inline-flex; align-items: center; gap: .15rem; color: var(--sol); }
.estrellas i, .estrellas svg { width: 14px; height: 14px; }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }

/* ------------------------------------------------------------ métricas */
.kpi-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.1rem 1.15rem;
  position: relative; overflow: hidden;
}
.kpi::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent);
}
.kpi.kpi-sol::before     { background: var(--sol); }
.kpi.kpi-success::before { background: var(--success); }
.kpi.kpi-warning::before { background: var(--warning); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.kpi-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 650; color: var(--text-muted); }
.kpi-icono { color: var(--text-muted); display: flex; }
.kpi-icono i, .kpi-icono svg { width: 18px; height: 18px; }
.kpi-valor { font-size: 27px; font-weight: 700; letter-spacing: -.02em; margin-top: .3rem; line-height: 1.1; }
.kpi-nota { font-size: 12.5px; color: var(--text-muted); margin-top: .15rem; }

/* ------------------------------------------------------------ formularios */
.form-group { margin-bottom: 1.05rem; }
.form-group > label {
  display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  font-weight: 650; color: var(--text-muted); margin-bottom: .4rem;
}
.form-control {
  width: 100%; min-height: 46px; padding: .65rem .85rem;
  background: var(--bg-primary); color: var(--text-primary);
  border: 1px solid var(--border-strong); border-radius: 11px;
  font-size: 15px; font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-control::placeholder { color: var(--text-muted); opacity: .8; }
textarea.form-control { min-height: 110px; resize: vertical; line-height: 1.55; }
select.form-control { appearance: none; background-image: none; }
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-hint { font-size: 12.5px; color: var(--text-muted); margin-top: .35rem; }
.form-error { font-size: 13px; color: var(--danger); margin-top: .35rem; }

/* Campo de contraseña con ojo mostrar/ocultar */
.password-field { position: relative; }
.password-field .form-control { padding-right: 46px; }
.toggle-password {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--text-muted); border-radius: 9px;
}
.toggle-password:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.toggle-password i, .toggle-password svg { width: 18px; height: 18px; }

/* Selector de rol en el registro */
.rol-selector { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
@media (max-width: 520px) { .rol-selector { grid-template-columns: 1fr; } }
.rol-opcion {
  position: relative; overflow: hidden; text-align: left;
  padding: 1.05rem; border-radius: 14px; border: 2px solid var(--border);
  background: var(--bg-primary); color: var(--text-primary);
  display: flex; flex-direction: column; gap: .3rem;
  transition: border-color .16s ease, background .16s ease, transform .12s ease;
}
.rol-opcion:hover { border-color: var(--border-strong); }
.rol-opcion.activa { border-color: var(--accent); background: var(--accent-soft); }
.rol-opcion .rol-icono { color: var(--accent); display: flex; margin-bottom: .15rem; }
.rol-opcion .rol-icono i, .rol-opcion .rol-icono svg { width: 24px; height: 24px; }
.rol-opcion strong { font-size: 15px; }
.rol-opcion span { font-size: 13px; color: var(--text-muted); line-height: 1.45; }

/* -------------------------------------------------------------- header */
.app-header {
  position: sticky; top: 0; z-index: 900;
  background: color-mix(in srgb, var(--bg-primary) 92%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
@supports not (backdrop-filter: blur(4px)) { .app-header { background: var(--bg-primary); } }
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: .7rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
}
@media (max-width: 768px) { .header-inner { padding: .6rem 1rem; } }
.brand { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.brand img { height: 40px; width: auto; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand-txt strong { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.brand-txt span { font-size: 10.5px; color: var(--text-muted); letter-spacing: .04em; text-transform: uppercase; }
@media (max-width: 420px) { .brand-txt span { display: none; } }

.nav-desktop { display: flex; align-items: center; gap: .2rem; margin-left: auto; }
@media (max-width: 900px) { .nav-desktop { display: none; } }
.nav-link {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .8rem; border-radius: 10px;
  font-size: 14px; font-weight: 550; color: var(--text-secondary);
  position: relative; overflow: hidden;
}
.nav-link:hover { background: var(--bg-tertiary); color: var(--text-primary); text-decoration: none; }
.nav-link.activo { color: var(--accent); background: var(--accent-soft); font-weight: 650; }
.nav-link i, .nav-link svg { width: 16px; height: 16px; }

.header-acciones { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
@media (min-width: 901px) { .header-acciones { margin-left: .5rem; } }
.icon-btn {
  width: 42px; height: 42px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; color: var(--text-secondary);
  position: relative; overflow: hidden;
}
.icon-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.icon-btn i, .icon-btn svg { width: 19px; height: 19px; }
.icon-btn .badge {
  position: absolute; top: 5px; right: 5px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-primary);
}
#theme-toggle .icon-dark  { display: none; }
[data-theme="dark"] #theme-toggle .icon-light { display: none; }
[data-theme="dark"] #theme-toggle .icon-dark  { display: inline-flex; }

/* ------------------------------------------------------- footer mobile */
.app-footer-nav { display: none; }
@media (max-width: 900px) {
  .app-footer-nav {
    position: fixed; bottom: 0; left: 0; right: 0; height: 64px;
    background: var(--bg-primary); border-top: 1px solid var(--border);
    display: flex; z-index: 950;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 12px rgba(4,37,72,.07);
  }
  .app-footer-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; font-size: 10px; font-weight: 600; color: var(--text-muted);
    text-decoration: none; position: relative; overflow: hidden; min-height: 44px;
  }
  .app-footer-nav a i, .app-footer-nav a svg { width: 21px; height: 21px; }
  .app-footer-nav a.activo { color: var(--accent); }
  .app-footer-nav a .badge {
    position: absolute; top: 8px; right: 50%; margin-right: -20px;
    min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
    background: var(--danger); color: #fff; font-size: 9.5px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
  }
  body.con-footer-nav { padding-bottom: 72px; }
}

/* Modal "Ver más": todas las opciones del desktop, accesibles en mobile */
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
@media (max-width: 400px) { .menu-grid { grid-template-columns: repeat(2, 1fr); } }
.menu-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .45rem; padding: 1rem .5rem; border-radius: 14px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 12.5px; font-weight: 600; text-align: center;
  position: relative; overflow: hidden; min-height: 84px; text-decoration: none;
}
.menu-item:hover { text-decoration: none; border-color: var(--accent); }
.menu-item i, .menu-item svg { width: 22px; height: 22px; color: var(--accent); }
.menu-item.danger i, .menu-item.danger svg { color: var(--danger); }

/* -------------------------------------------------------------- modales */
.modal-wrapper {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--scrim);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  animation: fadeIn .16s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: 18px; width: 100%; max-width: 560px; max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  animation: modalIn .2s cubic-bezier(.2,.9,.3,1);
}
@keyframes modalIn { from { transform: translateY(14px) scale(.985); opacity: 0; } }
.modal-header {
  padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-shrink: 0;
}
.modal-header h3 { margin: 0; }
.modal-body { flex: 1; overflow-y: auto; padding: 1.35rem; -webkit-overflow-scrolling: touch; }
.modal-footer {
  padding: 1rem 1.35rem; border-top: 1px solid var(--border);
  display: flex; gap: .75rem; justify-content: flex-end; flex-shrink: 0;
  background: var(--bg-primary); border-radius: 0 0 18px 18px;
}
@media (max-width: 640px) {
  .modal-wrapper { align-items: flex-end; padding: 0; }
  .modal { max-width: 100%; border-radius: 20px 20px 0 0; max-height: 92vh; }
  .modal-footer { border-radius: 0; }
  .modal-footer .btn { flex: 1; }
}

/* --------------------------------------------------------------- toast */
#toast-zona {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 88px; z-index: 9999;
  display: flex; flex-direction: column; gap: .5rem; align-items: center;
  pointer-events: none; width: calc(100% - 2rem); max-width: 420px;
}
@media (min-width: 901px) { #toast-zona { bottom: 24px; } }
.toast {
  display: flex; align-items: center; gap: .55rem;
  padding: .75rem 1.1rem; border-radius: 12px;
  font-size: 14px; font-weight: 550; color: #fff;
  box-shadow: var(--shadow-lg); animation: toastIn .22s ease;
  max-width: 100%; text-align: left;
}
.toast i, .toast svg { width: 17px; height: 17px; flex-shrink: 0; }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } }
.toast-error   { background: #B4291B; }
.toast-success { background: #10693D; }
.toast-warning { background: #9A5B00; }
.toast-info    { background: #0B2E52; }

/* ------------------------------------------------------------- estados */
.empty-state, .error-state {
  text-align: center; padding: 2.75rem 1.5rem;
  border: 1px dashed var(--border-strong); border-radius: 16px;
  background: var(--bg-primary);
}
.empty-icon {
  width: 62px; height: 62px; margin: 0 auto 1rem; border-radius: 18px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.empty-icon i, .empty-icon svg { width: 27px; height: 27px; }
.error-state .empty-icon { background: var(--danger-soft); color: var(--danger); }
.empty-state h3, .error-state h3 { margin: 0 0 .35rem; font-size: 17px; }
.empty-state p, .error-state p { color: var(--text-muted); margin: 0 0 1.15rem; font-size: 14px; }

.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 12px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skeleton-card { height: 296px; border-radius: 18px 18px 18px 4px; }

.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: girar .7s linear infinite; display: inline-block;
}
@keyframes girar { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------- splash */
#splash {
  position: fixed; inset: 0; z-index: 9998;
  background: linear-gradient(165deg, #0B2E52 0%, #0A2A4B 55%, #061C34 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem; transition: opacity .5s ease;
}
#splash .splash-glow {
  position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(241,160,45,.22) 0%, rgba(94,166,225,.10) 45%, transparent 70%);
  animation: latir 4s ease-in-out infinite;
}
@keyframes latir { 0%,100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.12); opacity: 1; } }
#splash .splash-inner { position: relative; text-align: center; max-width: 420px; }
#splash img { width: min(260px, 62vw); margin: 0 auto 1.25rem; filter: brightness(0) invert(1); }
#splash h1 { color: #fff; font-size: 1.35rem; margin: 0 0 .4rem; letter-spacing: -.01em; }
#splash p  { color: rgba(232,241,250,.72); font-size: .88rem; margin: 0 0 1.9rem; line-height: 1.5; }
#splash .splash-barra {
  width: 210px; height: 4px; margin: 0 auto; border-radius: 3px;
  background: rgba(255,255,255,.16); overflow: hidden;
}
#splash-bar {
  height: 100%; width: 0%; border-radius: 3px;
  background: linear-gradient(90deg, #5EA6E1, #F1A02D);
  transition: width .1s linear;
}
#splash .splash-pie {
  position: absolute; bottom: 2rem; left: 0; right: 0; text-align: center;
  color: rgba(232,241,250,.5); font-size: 11.5px; letter-spacing: .05em;
}

/* ---------------------------------------------------------------- HOME */
.hero {
  position: relative; overflow: hidden;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
}
.hero-fondo {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(760px 400px at 88% -8%, rgba(94,166,225,.20), transparent 62%),
    radial-gradient(560px 320px at 4% 108%, rgba(241,160,45,.16), transparent 60%);
}
.hero-inner {
  position: relative; max-width: 1200px; margin: 0 auto;
  padding: 3.75rem 1.5rem 3.25rem;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.5rem; align-items: center;
}
@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; padding: 2.5rem 1rem 2.25rem; gap: 1.75rem; }
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .35rem .8rem; border-radius: 999px; margin-bottom: 1.1rem;
  background: var(--sol-soft); color: var(--sol-strong);
  font-size: 12.5px; font-weight: 650;
}
.hero-badge i, .hero-badge svg { width: 14px; height: 14px; }
.hero h1 {
  font-size: clamp(2rem, 5.2vw, 3.15rem); line-height: 1.06;
  letter-spacing: -.03em; margin: 0 0 1rem; font-weight: 750;
}
.hero h1 .resalte {
  background: linear-gradient(100deg, var(--accent) 15%, var(--celeste) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: clamp(1rem, 2.1vw, 1.14rem); color: var(--text-secondary); max-width: 30rem; margin: 0 0 1.75rem; }
.hero-ctas { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-datos { display: flex; gap: 2rem; margin-top: 2.25rem; flex-wrap: wrap; }
.hero-dato strong { display: block; font-size: 1.6rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.hero-dato span { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* Collage asimétrico del hero */
.hero-collage { position: relative; min-height: 340px; }
@media (max-width: 940px) { .hero-collage { min-height: 280px; } }
.collage-pieza {
  position: absolute; border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-lg); border: 3px solid var(--bg-primary);
  display: flex; align-items: flex-end; padding: .85rem;
  color: #fff; font-weight: 650; font-size: 13.5px;
}
.collage-pieza::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(4,37,72,.68) 100%);
}
.collage-pieza span { position: relative; z-index: 1; display: flex; align-items: center; gap: .35rem; }
.collage-pieza i, .collage-pieza svg { width: 15px; height: 15px; }
.collage-1 { left: 0;    top: 4%;   width: 56%; height: 54%; background: linear-gradient(145deg, #F1A02D, #C97A12); transform: rotate(-2deg); }
.collage-2 { right: 2%;  top: 0;    width: 40%; height: 40%; background: linear-gradient(145deg, #5EA6E1, #1B6FBF); transform: rotate(2.5deg); }
.collage-3 { right: 6%;  bottom: 4%; width: 48%; height: 46%; background: linear-gradient(145deg, #0B2E52, #16324F); transform: rotate(-1.5deg); }
.collage-4 { left: 8%;   bottom: 0;  width: 34%; height: 30%; background: linear-gradient(145deg, #1B6FBF, #0B2E52); transform: rotate(3deg); }

/* Franja de categorías */
.cat-scroll { display: flex; gap: .7rem; overflow-x: auto; padding: .25rem .1rem 1rem; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-item {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: .45rem;
  padding: .9rem 1.1rem; border-radius: 15px; min-width: 96px;
  background: var(--bg-primary); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 12.5px; font-weight: 650;
  position: relative; overflow: hidden; transition: border-color .16s, transform .16s;
}
.cat-item:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.cat-item.activa { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.cat-item i, .cat-item svg { width: 22px; height: 22px; color: var(--sol); }
.cat-item .cat-total { font-size: 11px; color: var(--text-muted); font-weight: 600; }

/* Bloque "cómo funciona" */
.pasos { display: grid; gap: 1.15rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.paso {
  padding: 1.35rem; border-radius: 16px; background: var(--bg-primary);
  border: 1px solid var(--border); position: relative;
}
.paso-num {
  width: 34px; height: 34px; border-radius: 11px; margin-bottom: .8rem;
  background: var(--navy-soft); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
[data-theme="dark"] .paso-num { background: var(--accent); color: var(--accent-text); }
.paso h4 { margin: 0 0 .3rem; font-size: 15.5px; }
.paso p  { margin: 0; font-size: 13.5px; color: var(--text-muted); line-height: 1.55; }

.cta-final {
  border-radius: 22px; padding: 2.75rem 2rem; text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0B2E52 0%, #14446F 52%, #1B6FBF 100%);
  color: #fff;
}
.cta-final::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(420px 220px at 82% 12%, rgba(241,160,45,.30), transparent 62%);
}
.cta-final > * { position: relative; }
.cta-final h2 { color: #fff; font-size: clamp(1.4rem, 3.4vw, 2rem); margin: 0 0 .6rem; }
.cta-final p  { color: rgba(232,241,250,.85); max-width: 34rem; margin: 0 auto 1.6rem; }

/* ------------------------------------------------------ layout paneles */
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem;
}
.panel-saludo h1 { margin: 0 0 .2rem; font-size: 25px; }
.panel-saludo p  { margin: 0; color: var(--text-muted); font-size: 14px; }

.lista-limpia { list-style: none; margin: 0; padding: 0; }
.fila {
  display: flex; align-items: center; gap: .85rem;
  padding: .8rem 0; border-bottom: 1px solid var(--border);
}
.fila:last-child { border-bottom: none; }
.fila-txt { flex: 1; min-width: 0; }
.fila-txt strong { display: block; font-size: 14.5px; font-weight: 600; }
.fila-txt span { font-size: 12.5px; color: var(--text-muted); }
.fila-monto { font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.truncar { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.aviso {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: 1rem 1.15rem; border-radius: 14px; margin-bottom: 1.5rem;
  background: var(--warning-soft); border: 1px solid transparent;
}
.aviso i, .aviso svg { width: 20px; height: 20px; color: var(--warning); flex-shrink: 0; margin-top: 2px; }
.aviso strong { display: block; font-size: 14.5px; margin-bottom: .15rem; }
.aviso p { margin: 0; font-size: 13.5px; color: var(--text-secondary); }
.aviso-accent { background: var(--accent-soft); }
.aviso-accent i, .aviso-accent svg { color: var(--accent); }

.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: 1.35fr 1fr; align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* ------------------------------------------------------ auth (login/registro) */
.auth-wrap { min-height: calc(100vh - 62px); display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; min-height: auto; } }
.auth-visual {
  position: relative; overflow: hidden; padding: 3rem 2.5rem;
  background: linear-gradient(160deg, #0B2E52 0%, #123C64 48%, #1B6FBF 100%);
  color: #fff; display: flex; flex-direction: column; justify-content: center;
}
@media (max-width: 900px) { .auth-visual { display: none; } }
.auth-visual::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(460px 320px at 78% 18%, rgba(241,160,45,.28), transparent 62%);
}
.auth-visual > * { position: relative; }
.auth-visual img { width: 190px; margin-bottom: 2rem; filter: brightness(0) invert(1); }
.auth-visual h2 { color: #fff; font-size: 1.85rem; line-height: 1.15; margin-bottom: .85rem; }
.auth-visual p { color: rgba(232,241,250,.82); max-width: 25rem; }
.auth-lista { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-direction: column; gap: .85rem; }
.auth-lista li { display: flex; align-items: center; gap: .7rem; font-size: 14.5px; color: rgba(232,241,250,.92); }
.auth-lista i, .auth-lista svg { width: 18px; height: 18px; color: #F1A02D; flex-shrink: 0; }
.auth-form-zona { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; }
.auth-form { width: 100%; max-width: 400px; }
.auth-form .logo-mobile { display: none; }
@media (max-width: 900px) {
  .auth-form .logo-mobile { display: block; width: 150px; margin: 0 auto 1.5rem; }
}
.auth-sep {
  display: flex; align-items: center; gap: .8rem; margin: 1.4rem 0;
  color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
}
.auth-sep::before, .auth-sep::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ------------------------------------------------------------ utilidades */
.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.row   { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.75rem; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.75rem; }

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

/* =====================================================================
   FASE 3 — filtros, subida de fotos, mapa, perfil de anfitrión, tabs
   ===================================================================== */

/* ------------------------------------------------------------- filtros */
.filtros-barra {
  display: flex; gap: .7rem; flex-wrap: wrap; align-items: center;
  margin-bottom: 1.35rem; padding: .9rem 1rem; background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: 14px;
}
.filtros-barra .form-control { min-height: 42px; font-size: 13.5px; }
.filtros-buscador { position: relative; flex: 1; min-width: 180px; }
.filtros-buscador i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 16px; height: 16px; }
.filtros-buscador input { padding-left: 36px; }
.filtro-select { min-width: 140px; flex: 0 0 auto; }
.filtros-chip {
  display: inline-flex; align-items: center; gap: .3rem; padding: .5rem .85rem;
  border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg-primary);
  font-size: 13px; cursor: pointer; color: var(--text-secondary); white-space: nowrap;
}
.filtros-chip.activa { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.filtros-chip i, .filtros-chip svg { width: 14px; height: 14px; }

.paginacion { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: 1.75rem; }
.paginacion .icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.paginacion-pag { font-size: 13.5px; color: var(--text-muted); min-width: 90px; text-align: center; }

/* ------------------------------------------------------- dropzone fotos */
.foto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .6rem; margin-top: .5rem; }
.foto-item {
  position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden;
  background: var(--bg-tertiary); border: 1px solid var(--border);
}
.foto-item img { width: 100%; height: 100%; object-fit: cover; }
.foto-item .foto-principal-tag {
  position: absolute; left: 4px; bottom: 4px; background: rgba(4,37,72,.78); color: #fff;
  font-size: 9.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em;
  padding: .18rem .4rem; border-radius: 5px;
}
.foto-item .foto-quitar {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(4,37,72,.78); color: #fff; border: none; display: flex; align-items: center;
  justify-content: center; cursor: pointer;
}
.foto-item .foto-quitar i, .foto-item .foto-quitar svg { width: 14px; height: 14px; }
.foto-dropzone {
  aspect-ratio: 1; border-radius: 12px; border: 1.5px dashed var(--border-strong);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .3rem; color: var(--text-muted); cursor: pointer; background: var(--bg-secondary);
  font-size: 11.5px; text-align: center; padding: .5rem;
}
.foto-dropzone:hover { border-color: var(--accent); color: var(--accent); }
.foto-dropzone i, .foto-dropzone svg { width: 22px; height: 22px; }
.foto-dropzone input { display: none; }
.foto-dropzone.subiendo { pointer-events: none; opacity: .6; }

/* --------------------------------------------------------- foto de perfil */
.perfil-foto-picker { display: flex; align-items: center; gap: 1.1rem; }
.perfil-foto-picker .avatar { width: 76px; height: 76px; font-size: 26px; flex-shrink: 0; }
.perfil-foto-picker label {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
}
.perfil-foto-picker input { display: none; }

/* -------------------------------------------------------------------- mapa */
.mapa-caja { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-tertiary); }
.mapa-alto-detalle  { height: 260px; }
.mapa-alto-editor   { height: 220px; }
.mapa-alto-completo { height: calc(100vh - 210px); min-height: 420px; }
.mapa-caja .leaflet-popup-content-wrapper { border-radius: 12px; }
.mapa-caja .leaflet-popup-content { margin: .7rem .85rem; font-family: inherit; }
.mapa-pin-popup { min-width: 170px; }
.mapa-pin-popup strong { display: block; font-size: 13.5px; margin-bottom: .2rem; }
.mapa-pin-popup span { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: .5rem; }
.mapa-pin-popup a { font-size: 12.5px; font-weight: 650; }
.mapa-hint { font-size: 12.5px; color: var(--text-muted); margin: .5rem 0 0; display: flex; align-items: center; gap: .35rem; }
.mapa-hint i, .mapa-hint svg { width: 14px; height: 14px; flex-shrink: 0; }
[data-theme="dark"] .mapa-caja { filter: brightness(.88) contrast(1.08) saturate(.9); }

/* --------------------------------------------------------- perfil anfitrión */
.perfil-hero {
  display: flex; gap: 1.4rem; align-items: center; padding: 1.75rem;
  background: linear-gradient(150deg, var(--bg-secondary), var(--bg-tertiary));
  border: 1px solid var(--border); border-radius: 18px; margin-bottom: 1.5rem;
}
.perfil-hero .avatar { width: 84px; height: 84px; font-size: 30px; flex-shrink: 0; }
.perfil-hero h1 { margin: 0 0 .25rem; font-size: 22px; display: flex; align-items: center; gap: .4rem; }
.perfil-hero h1 i, .perfil-hero h1 svg { width: 19px; height: 19px; color: var(--success); }
.perfil-hero-meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 13.5px; color: var(--text-muted); margin-top: .4rem; }
.perfil-hero-meta span { display: flex; align-items: center; gap: .3rem; }
.perfil-hero-meta i, .perfil-hero-meta svg { width: 14px; height: 14px; }
@media (max-width: 640px) { .perfil-hero { flex-direction: column; text-align: center; } .perfil-hero-meta { justify-content: center; } }

/* ------------------------------------------------------------- galería detalle */
.galeria-hero { display: grid; grid-template-columns: 2fr 1fr; gap: .6rem; border-radius: 18px; overflow: hidden; height: 360px; margin-bottom: 1.5rem; }
.galeria-hero .galeria-principal { grid-row: 1 / 3; }
.galeria-hero img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--bg-tertiary); }
.galeria-secundaria { display: grid; grid-template-rows: 1fr 1fr; gap: .6rem; }
.galeria-vacia {
  height: 360px; border-radius: 18px; margin-bottom: 1.5rem; background: var(--bg-tertiary);
  display: flex; align-items: center; justify-content: center; color: var(--text-muted);
}
.galeria-vacia i, .galeria-vacia svg { width: 56px; height: 56px; opacity: .5; }
@media (max-width: 720px) { .galeria-hero { grid-template-columns: 1fr; grid-template-rows: 220px repeat(2, 100px); height: auto; } .galeria-hero .galeria-principal { grid-row: 1; } }

/* ---------------------------------------------------------------------- tabs */
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--border); margin-bottom: 1.35rem; overflow-x: auto; }
.tab-btn {
  padding: .75rem 1.1rem; font-size: 13.5px; font-weight: 600; color: var(--text-muted);
  border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent;
  white-space: nowrap; display: flex; align-items: center; gap: .4rem;
}
.tab-btn i, .tab-btn svg { width: 15px; height: 15px; }
.tab-btn.activa { color: var(--accent); border-color: var(--accent); }
.tab-btn .badge-num {
  background: var(--bg-tertiary); color: var(--text-muted); font-size: 10.5px; font-weight: 700;
  padding: .1rem .4rem; border-radius: 999px; min-width: 17px; text-align: center;
}
.tab-btn.activa .badge-num { background: var(--accent-soft); color: var(--accent); }

/* --------------------------------------------------------- doc verificación */
.doc-preview {
  border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-tertiary);
  height: 170px; display: flex; align-items: center; justify-content: center; position: relative;
}
.doc-preview img { width: 100%; height: 100%; object-fit: cover; }
.doc-preview .doc-vacio { color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: .4rem; font-size: 12px; }
.doc-preview .doc-vacio i, .doc-preview .doc-vacio svg { width: 26px; height: 26px; }
.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .doc-grid { grid-template-columns: 1fr; } }
.badge-estado-verif { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border-radius: 999px; font-size: 12.5px; font-weight: 650; }
.badge-estado-verif.pendiente { background: var(--warning-soft); color: var(--warning); }
.badge-estado-verif.aprobado  { background: var(--success-soft); color: var(--success); }
.badge-estado-verif.rechazado { background: var(--danger-soft);  color: var(--danger); }
