/* =====================================================================
   Conecta+ · Estilos principales (sobre Bootstrap 5.3)
   ===================================================================== */
:root {
  --cp-rose: #e8346b;
  --cp-coral: #ff5f6d;
  --cp-violet: #7b3ff2;
  --cp-amber: #ffb547;
  --cp-gradient: linear-gradient(135deg, #ff5f6d 0%, #e8346b 42%, #7b3ff2 100%);
  --cp-gradient-soft: linear-gradient(135deg, rgba(255, 95, 109, .12), rgba(123, 63, 242, .12));
  --cp-bg: #f7f5fb;
  --cp-surface: #ffffff;
  --cp-surface-2: #f1eef8;
  --cp-border: rgba(30, 20, 60, .08);
  --cp-text-soft: #6b6580;
  --cp-shadow: 0 10px 30px -12px rgba(60, 20, 90, .22);
  --cp-shadow-lg: 0 24px 60px -20px rgba(60, 20, 90, .35);
  --cp-radius: 1.25rem;
  --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-primary: #e8346b;
  --bs-primary-rgb: 232, 52, 107;
  --bs-link-color: #d42a62;
  --bs-link-color-rgb: 212, 42, 98;
  --bs-link-hover-color: #7b3ff2;
  --bs-body-bg: var(--cp-bg);
}
[data-bs-theme="dark"] {
  --cp-bg: #0e0c15;
  --cp-surface: #17141f;
  --cp-surface-2: #201c2b;
  --cp-border: rgba(255, 255, 255, .08);
  --cp-text-soft: #a9a3bd;
  --cp-shadow: 0 10px 30px -12px rgba(0, 0, 0, .7);
  --cp-shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .8);
  --bs-body-bg: var(--cp-bg);
  --bs-link-color: #ff7a9c;
  --bs-link-color-rgb: 255, 122, 156;
  --bs-link-hover-color: #b493ff;
}

html { -webkit-tap-highlight-color: transparent; }
body { background: var(--cp-bg); min-height: 100vh; display: flex; flex-direction: column; }
.cp-main { flex: 1 0 auto; }
body.has-bottom-nav .cp-main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (min-width: 992px) { body.has-bottom-nav .cp-main { padding-bottom: 0; } }
.fw-800 { font-weight: 800; }
.min-w-0 { min-width: 0; }
.opacity-85 { opacity: .85; }
.text-gradient { background: var(--cp-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Botones ---------- */
.btn { font-weight: 600; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
.btn:active { transform: scale(.97); }
.btn-gradient { background: var(--cp-gradient); color: #fff; border: 0; box-shadow: 0 8px 22px -10px rgba(232, 52, 107, .8); }
.btn-gradient:hover, .btn-gradient:focus { color: #fff; filter: brightness(1.06); box-shadow: 0 12px 28px -10px rgba(123, 63, 242, .8); }
.btn-gradient:disabled { opacity: .55; color: #fff; }
.btn-icon { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--cp-surface-2); color: var(--bs-body-color); border: 0; font-size: 1.15rem; }
.btn-icon:hover { background: var(--cp-gradient-soft); color: var(--cp-rose); }
.btn-like { background: var(--cp-surface-2); color: var(--cp-rose); border: 2px solid transparent; }
.btn-like.is-on, .btn-like:hover { background: var(--cp-gradient); color: #fff; }
.js-fav.is-on { color: var(--cp-violet); border-color: var(--cp-violet); }
.form-control, .form-select { border-color: var(--cp-border); background-color: var(--cp-surface); }
.form-control:focus, .form-select:focus { border-color: rgba(232, 52, 107, .5); box-shadow: 0 0 0 .25rem rgba(232, 52, 107, .15); }
.form-check-input:checked { background-color: var(--cp-rose); border-color: var(--cp-rose); }

/* ---------- Barra superior ---------- */
.cp-topbar { background: color-mix(in srgb, var(--cp-surface) 82%, transparent); backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--cp-border); padding: .55rem 0; }
.cp-brand { font-weight: 800; font-size: 1.35rem; display: flex; align-items: center; gap: .5rem; }
.cp-logo { width: 36px; height: 36px; border-radius: 12px; background: var(--cp-gradient); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; font-size: 1rem; box-shadow: 0 6px 16px -6px rgba(232, 52, 107, .8); }
.cp-logo-lg { width: 64px; height: 64px; border-radius: 20px; font-size: 1.8rem; }
.cp-navlink { border-radius: 999px; padding: .45rem .95rem !important; font-weight: 600; color: var(--cp-text-soft) !important; }
.cp-navlink:hover { background: var(--cp-surface-2); color: var(--bs-body-color) !important; }
.cp-navlink.active { background: var(--cp-gradient-soft); color: var(--cp-rose) !important; }
.cp-badge { background: var(--cp-rose); font-size: .65rem; vertical-align: top; }
.cp-dot { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--cp-rose); color: #fff; font-size: .65rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  font-style: normal; border: 2px solid var(--cp-surface); }
.cp-avatar-btn::after { display: none; }
.cp-avatar-sm { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid transparent;
  background: var(--cp-gradient) border-box; }
.cp-avatar-md { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }

/* ---------- Menú inferior móvil ---------- */
.cp-bottom-nav { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 1030;
  background: color-mix(in srgb, var(--cp-surface) 90%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--cp-border); border-radius: 26px; box-shadow: var(--cp-shadow-lg); display: flex; justify-content: space-around;
  align-items: center; height: 66px; }
.cp-bottom-nav a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--cp-text-soft); text-decoration: none; font-size: .68rem; font-weight: 600; }
.cp-bottom-nav a i { font-size: 1.3rem; }
.cp-bottom-nav a.active { color: var(--cp-rose); }
.cp-bottom-nav .cp-dot { top: -4px; right: calc(50% - 22px); }
.cp-bottom-fab { width: 54px; height: 54px; border-radius: 18px; background: var(--cp-gradient); color: #fff; display: flex;
  align-items: center; justify-content: center; font-size: 1.5rem; margin-top: -26px; box-shadow: 0 12px 24px -8px rgba(232, 52, 107, .9); }
.cp-bottom-center.active .cp-bottom-fab { outline: 3px solid color-mix(in srgb, var(--cp-rose) 30%, transparent); }

/* ---------- Pantalla de carga ---------- */
.cp-loader { position: fixed; inset: 0; z-index: 2000; background: color-mix(in srgb, var(--cp-bg) 70%, transparent);
  backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; }
.cp-loader.show { display: flex; }
.cp-loader-heart { width: 72px; height: 72px; border-radius: 24px; background: var(--cp-gradient); color: #fff; display: flex;
  align-items: center; justify-content: center; font-size: 2rem; animation: cpBeat 1s ease-in-out infinite; box-shadow: var(--cp-shadow-lg); }
@keyframes cpBeat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.15); } 60% { transform: scale(.95); } }

/* ---------- Paneles y genéricos ---------- */
.cp-panel { background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: var(--cp-radius); box-shadow: var(--cp-shadow); }
.cp-chip { background: var(--cp-gradient-soft); color: var(--cp-rose); font-weight: 600; padding: .45em .9em; }
.cp-alert-soft { background: var(--cp-gradient-soft); border: 1px solid var(--cp-border); }
.badge-premium { background: linear-gradient(135deg, #ffcf6b, #ff9f2e); color: #3a2300; border-radius: 999px; font-weight: 700; }
.badge-featured { background: var(--cp-gradient); color: #fff; border-radius: 999px; font-weight: 700; }
.badge-boost { background: #2bd4a0; color: #04382a; border-radius: 999px; }
.cp-empty { text-align: center; padding: 4rem 1rem; max-width: 460px; margin: 0 auto; }
.cp-empty-icon { width: 84px; height: 84px; margin: 0 auto 1rem; border-radius: 28px; background: var(--cp-gradient-soft); color: var(--cp-rose);
  display: flex; align-items: center; justify-content: center; font-size: 2.2rem; }
.cp-pills .nav-link { border-radius: 999px; color: var(--cp-text-soft); font-weight: 600; }
.cp-pills .nav-link.active { background: var(--cp-gradient); color: #fff; }
.cp-footer { border-top: 1px solid var(--cp-border); padding: 1.5rem 0; color: var(--cp-text-soft); margin-top: 2rem; }
.cp-footer a { color: var(--cp-text-soft); text-decoration: none; }
.cp-footer a:hover { color: var(--cp-rose); }
.cp-toasts { z-index: 2100; padding-top: 80px !important; }
.cp-toast { border: 0; border-radius: 18px; box-shadow: var(--cp-shadow-lg); background: var(--cp-surface); overflow: hidden; }
.cp-toast .toast-body { display: flex; gap: .75rem; align-items: center; }
.cp-toast-icon { width: 36px; height: 36px; border-radius: 12px; flex: 0 0 36px; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--cp-gradient); }
.cp-toast.toast-danger .cp-toast-icon { background: #dc3545; }
.cp-toast.toast-success .cp-toast-icon { background: #20b486; }
.pagination .page-link { border: 0; background: var(--cp-surface-2); color: var(--bs-body-color); }
.pagination .active .page-link { background: var(--cp-gradient); color: #fff; }

/* ---------- Landing ---------- */
.cp-hero { position: relative; overflow: hidden; }
.cp-hero-glow { position: absolute; inset: -30% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 95, 109, .35), transparent 60%), radial-gradient(circle at 70% 60%, rgba(123, 63, 242, .35), transparent 60%);
  filter: blur(30px); pointer-events: none; }
.cp-hero-stack { position: relative; height: 440px; max-width: 460px; margin: 0 auto; }
.cp-hero-card { position: absolute; width: 260px; background: var(--cp-surface); border-radius: 28px; box-shadow: var(--cp-shadow-lg); overflow: hidden; }
.cp-hero-card.c1 { left: 0; top: 30px; transform: rotate(-7deg); animation: cpFloat 6s ease-in-out infinite; }
.cp-hero-card.c2 { right: 0; top: 70px; transform: rotate(6deg); animation: cpFloat 6s ease-in-out infinite 1.5s; }
.cp-hero-ph { height: 260px; display: flex; align-items: center; justify-content: center; font-size: 5rem; color: rgba(255, 255, 255, .9); }
.cp-hero-ph.g1 { background: linear-gradient(160deg, #ff8a9a, #e8346b); }
.cp-hero-ph.g2 { background: linear-gradient(160deg, #9b7bff, #5a2bd8); }
.cp-hero-bubble { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--cp-surface); padding: .8rem 1.3rem;
  border-radius: 999px; box-shadow: var(--cp-shadow-lg); font-weight: 800; white-space: nowrap; animation: cpPop 2.4s ease-in-out infinite; }
@keyframes cpFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes cpPop { 0%, 100% { scale: 1; } 50% { scale: 1.06; } }
.cp-feature { background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: var(--cp-radius); padding: 1.5rem; transition: transform .2s; }
.cp-feature:hover { transform: translateY(-4px); box-shadow: var(--cp-shadow); }
.cp-feature-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--cp-gradient); color: #fff; display: flex;
  align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 1rem; }
.cp-cta, .cp-banner { background: var(--cp-gradient); position: relative; overflow: hidden; }
.cp-banner::after, .cp-cta::after { content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -160px; border-radius: 50%;
  background: rgba(255, 255, 255, .12); pointer-events: none; }
.cp-banner-premium { background: linear-gradient(135deg, #2a1052 0%, #7b3ff2 45%, #e8346b 100%); }
.cp-glass { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(8px); position: relative; z-index: 1; }
.cp-benefits li { padding: .2rem 0; } .cp-benefits i { color: #ffd36b; margin-right: .35rem; }

/* ---------- Autenticación ---------- */
.cp-auth { min-height: calc(100vh - 140px); display: flex; align-items: center; justify-content: center; padding: 2rem 1rem;
  background: radial-gradient(circle at 10% 20%, rgba(255, 95, 109, .12), transparent 40%), radial-gradient(circle at 90% 80%, rgba(123, 63, 242, .12), transparent 40%); }
.cp-auth-card { width: 100%; max-width: 440px; background: var(--cp-surface); border-radius: 28px; padding: 2rem; box-shadow: var(--cp-shadow-lg); border: 1px solid var(--cp-border); }
.cp-auth-wide { max-width: 720px; }
.cp-pass-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); z-index: 5; color: var(--cp-text-soft); }
.cp-choice-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.cp-choice { border: 2px solid var(--cp-border); border-radius: 999px; padding: .55rem 1.1rem; cursor: pointer; font-weight: 600;
  display: inline-flex; gap: .4rem; align-items: center; transition: all .15s; user-select: none; }
.btn-check:checked + .cp-choice { border-color: var(--cp-rose); background: var(--cp-gradient-soft); color: var(--cp-rose); }

/* ---------- Tarjetas de perfil ---------- */
.cp-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .cp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }
@media (min-width: 1200px) { .cp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cp-card { position: relative; border-radius: 24px; overflow: hidden; background: var(--cp-surface); box-shadow: var(--cp-shadow);
  transition: transform .25s ease, opacity .35s ease, box-shadow .25s ease; animation: cpIn .4s ease both; }
.cp-card:hover { transform: translateY(-4px); box-shadow: var(--cp-shadow-lg); }
.cp-card.is-leaving { opacity: 0; transform: scale(.9) translateY(10px); }
.cp-card.is-leaving.to-right { transform: translateX(60px) rotate(8deg); }
.cp-card.is-leaving.to-left { transform: translateX(-60px) rotate(-8deg); }
@keyframes cpIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.cp-card-photo { display: block; position: relative; aspect-ratio: 3 / 4; color: #fff; text-decoration: none; }
.cp-card-photo img { width: 100%; height: 100%; object-fit: cover; background: var(--cp-surface-2); }
.cp-card-photo::after { content: ""; position: absolute; inset: 40% 0 0 0; background: linear-gradient(transparent, rgba(10, 5, 20, .85)); }
.cp-card-info { position: absolute; left: 0; right: 0; bottom: 56px; padding: 0 .9rem; z-index: 1; text-shadow: 0 1px 8px rgba(0, 0, 0, .3); }
.cp-card-badges { position: absolute; top: .6rem; left: .6rem; right: .6rem; display: flex; gap: .3rem; z-index: 2; flex-wrap: wrap; }
.cp-card-actions { position: absolute; left: 0; right: 0; bottom: .6rem; display: flex; justify-content: center; gap: .6rem; z-index: 2; }
.cp-action { width: 44px; height: 44px; border-radius: 50%; border: 0; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; background: rgba(255, 255, 255, .95); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .5); transition: transform .15s; }
.cp-action:hover { transform: scale(1.12); } .cp-action:active { transform: scale(.92); }
.cp-action-pass { color: #8a8398; }
.cp-action-like { color: var(--cp-rose); width: 52px; height: 52px; font-size: 1.35rem; margin-top: -4px; }
.cp-action-like.is-on { background: var(--cp-gradient); color: #fff; }
.cp-action-fav { color: var(--cp-violet); }
.cp-action-fav.is-on { background: var(--cp-violet); color: #fff; }
.cp-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.cp-tags span { background: rgba(255, 255, 255, .2); backdrop-filter: blur(4px); border-radius: 999px; padding: .1rem .55rem; font-size: .72rem; }
.cp-tags-lg span { background: var(--cp-gradient-soft); color: var(--cp-rose); font-size: .85rem; padding: .35rem .8rem; font-weight: 600; }
.cp-tags-alt span { color: var(--cp-violet); }
.cp-online { display: inline-block; width: 9px; height: 9px; background: #2bd47e; border-radius: 50%; margin-left: 4px; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
@media (max-width: 575px) {
  .cp-card-info h3 { font-size: 1rem; }
  .cp-action { width: 38px; height: 38px; font-size: .95rem; }
  .cp-action-like { width: 46px; height: 46px; }
  .cp-card-info { bottom: 50px; }
}

/* Historias de destacados */
.cp-stories { display: flex; gap: .9rem; overflow-x: auto; padding: .25rem .1rem .5rem; scrollbar-width: none; }
.cp-stories::-webkit-scrollbar { display: none; }
.cp-story { text-align: center; text-decoration: none; color: inherit; flex: 0 0 auto; width: 74px; }
.cp-story-ring { display: block; width: 70px; height: 70px; border-radius: 50%; padding: 3px; background: var(--cp-gradient); }
.cp-story-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--cp-bg); }
.cp-story small { display: block; margin-top: .3rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Perfil ---------- */
.cp-gal-img { aspect-ratio: 4 / 5; object-fit: cover; }
.cp-gal-empty { aspect-ratio: 4 / 5; background: var(--cp-surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--cp-text-soft); }
.cp-gal-empty img { width: 40%; opacity: .6; }
.cp-info { display: flex; align-items: center; gap: .75rem; background: var(--cp-surface-2); border-radius: 16px; padding: .8rem 1rem; }
.cp-info i { font-size: 1.3rem; color: var(--cp-rose); }
.cp-info small { display: block; color: var(--cp-text-soft); font-size: .75rem; }
.cp-bio { white-space: normal; line-height: 1.65; }
.cp-stat { background: var(--cp-surface-2); border-radius: 18px; padding: 1rem .5rem; }
.cp-stat strong { display: block; font-size: 1.6rem; font-weight: 800; }
.cp-stat small { color: var(--cp-text-soft); }
.cp-mini-bars { display: flex; gap: 6px; align-items: flex-end; height: 120px; }
.cp-mini-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.cp-mini-bar span { width: 100%; border-radius: 6px 6px 2px 2px; background: var(--cp-gradient); min-height: 4px; }
.cp-mini-bar small { font-size: .65rem; color: var(--cp-text-soft); }

/* Gestión de fotos */
.cp-photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.cp-photo-item, .cp-photo-add { position: relative; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; }
.cp-photo-item img { width: 100%; height: 100%; object-fit: cover; }
.cp-photo-item.is-main { outline: 3px solid var(--cp-amber); outline-offset: -3px; }
.cp-photo-item.is-main .js-photo-main { color: #ff9f2e; }
.cp-photo-tools { position: absolute; bottom: .4rem; left: 0; right: 0; display: flex; justify-content: center; gap: .4rem; }
.cp-photo-tools .btn { width: 32px; height: 32px; padding: 0; display: flex; align-items: center; justify-content: center; }
.cp-photo-add { border: 2px dashed color-mix(in srgb, var(--cp-rose) 45%, transparent); display: flex; flex-direction: column; align-items: center;
  justify-content: center; color: var(--cp-rose); cursor: pointer; font-weight: 600; background: var(--cp-gradient-soft); }
.cp-photo-add i { font-size: 1.8rem; }
.cp-upload-progress { position: absolute; left: 10%; right: 10%; bottom: 12px; height: 6px; }
.cp-upload-progress .progress-bar { background: var(--cp-gradient); }

/* ---------- Matches ---------- */
.cp-match-item { background: var(--cp-surface); border-radius: 22px; overflow: hidden; box-shadow: var(--cp-shadow); height: 100%; }
.cp-match-item.is-removed { opacity: .6; filter: grayscale(.6); }
.cp-match-thumb { display: block; position: relative; aspect-ratio: 1; }
.cp-match-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cp-blur-stack { display: flex; justify-content: center; }
.cp-blur-stack span { width: 64px; height: 64px; border-radius: 50%; background: var(--cp-gradient); filter: blur(3px); margin-left: -14px; border: 3px solid var(--cp-surface); }

/* Modal de match */
.cp-match-modal { background: linear-gradient(160deg, #ff5f6d 0%, #e8346b 45%, #6b2fe0 100%); }
.cp-match-title { font-weight: 800; font-size: 2.6rem; font-style: italic; animation: cpZoom .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.cp-match-photo { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
.cp-match-left { animation: cpSlideL .7s cubic-bezier(.2, 1.4, .4, 1) .1s both; }
.cp-match-right { animation: cpSlideR .7s cubic-bezier(.2, 1.4, .4, 1) .1s both; }
.cp-match-heart { font-size: 2.2rem; animation: cpBeat 1s ease-in-out infinite .6s; }
.cp-hearts { position: absolute; inset: 0; pointer-events: none; }
.cp-hearts i { position: absolute; bottom: -30px; color: rgba(255, 255, 255, .6); animation: cpRise linear forwards; }
@keyframes cpZoom { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes cpSlideL { from { transform: translateX(-120px) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cpSlideR { from { transform: translateX(120px) rotate(20deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cpRise { to { transform: translateY(-120vh) rotate(25deg); opacity: 0; } }

/* ---------- Chat ---------- */
.cp-chat { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - 140px); min-height: 520px; background: var(--cp-surface);
  border-radius: 28px; border: 1px solid var(--cp-border); box-shadow: var(--cp-shadow); overflow: hidden; }
.cp-chat-list { border-right: 1px solid var(--cp-border); display: flex; flex-direction: column; min-height: 0; }
.cp-chat-list-head { padding: 1.25rem 1.25rem .75rem; }
.cp-search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--cp-text-soft); }
.cp-chat-items { flex: 1; overflow-y: auto; padding: 0 .5rem; }
.cp-chat-privacy { padding: .75rem 1.25rem; border-top: 1px solid var(--cp-border); font-size: .72rem; }
.cp-conv { display: flex; gap: .75rem; align-items: center; padding: .7rem .75rem; border-radius: 18px; cursor: pointer; text-decoration: none; color: inherit; }
.cp-conv:hover { background: var(--cp-surface-2); }
.cp-conv.active { background: var(--cp-gradient-soft); }
.cp-conv img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: 0 0 52px; }
.cp-conv .cp-conv-avatar { position: relative; }
.cp-conv-unread { background: var(--cp-rose); color: #fff; font-size: .7rem; border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.cp-conv.has-unread .cp-conv-preview { color: var(--bs-body-color); font-weight: 600; }
.cp-conv-preview { color: var(--cp-text-soft); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-online-dot { position: absolute; right: 1px; bottom: 1px; width: 12px; height: 12px; border-radius: 50%; background: #2bd47e; border: 2px solid var(--cp-surface); }
.cp-chat-conv { display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative;
  background: radial-gradient(circle at 15% 10%, rgba(255, 95, 109, .06), transparent 40%), radial-gradient(circle at 85% 90%, rgba(123, 63, 242, .06), transparent 40%); }
.cp-chat-empty { margin: auto; text-align: center; padding: 2rem; }
.cp-chat-pane { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.cp-chat-head { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; border-bottom: 1px solid var(--cp-border);
  background: color-mix(in srgb, var(--cp-surface) 85%, transparent); backdrop-filter: blur(10px); }
.cp-chat-request { text-align: center; padding: 1rem; background: var(--cp-gradient-soft); border-bottom: 1px solid var(--cp-border); }
.cp-chat-messages { flex: 1; overflow-y: auto; padding: 1rem 1rem .5rem; display: flex; flex-direction: column; gap: .25rem; overscroll-behavior: contain; }
.cp-day { align-self: center; font-size: .72rem; color: var(--cp-text-soft); background: var(--cp-surface-2); padding: .2rem .75rem; border-radius: 999px; margin: .75rem 0 .4rem; }
.cp-msg { max-width: min(78%, 520px); display: flex; flex-direction: column; animation: cpMsg .2s ease both; }
.cp-msg.mine { align-self: flex-end; align-items: flex-end; }
.cp-msg.theirs { align-self: flex-start; align-items: flex-start; }
@keyframes cpMsg { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.cp-bubble { padding: .55rem .9rem; border-radius: 20px; line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; position: relative; }
.cp-msg.theirs .cp-bubble { background: var(--cp-surface-2); border-bottom-left-radius: 6px; }
.cp-msg.mine .cp-bubble { background: var(--cp-gradient); color: #fff; border-bottom-right-radius: 6px; }
.cp-bubble.is-removed { font-style: italic; opacity: .7; background: transparent !important; border: 1px dashed var(--cp-border); color: var(--cp-text-soft) !important; }
.cp-bubble-img { padding: 4px; }
.cp-bubble-img img { display: block; max-width: 100%; width: 280px; max-height: 340px; object-fit: cover; border-radius: 16px; cursor: zoom-in; background: rgba(0,0,0,.08); }
.cp-bubble-img .cp-caption { padding: .35rem .5rem .15rem; }
.cp-msg-meta { font-size: .68rem; color: var(--cp-text-soft); margin: .15rem .4rem .35rem; display: flex; gap: .35rem; align-items: center; }
.cp-msg-meta .bi-check2-all.read { color: #3aa0ff; }
.cp-msg-meta button { border: 0; background: none; padding: 0; color: var(--cp-text-soft); opacity: 0; transition: opacity .15s; font-size: .72rem; }
.cp-msg:hover .cp-msg-meta button, .cp-msg:focus-within .cp-msg-meta button { opacity: 1; }
@media (hover: none) { .cp-msg-meta button { opacity: .7; } }
.cp-msg.is-pending { opacity: .6; }
.cp-chat-notice { margin: 0 1rem .5rem; padding: .6rem .9rem; border-radius: 14px; background: var(--cp-surface-2); color: var(--cp-text-soft); text-align: center; }
.cp-chat-compose { padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--cp-border); background: var(--cp-surface); }
.cp-chat-input { resize: none; border-radius: 22px; max-height: 140px; padding: .65rem 1rem; background: var(--cp-surface-2); border: 0; }
.cp-chat-send { width: 46px; height: 46px; flex: 0 0 46px; display: flex; align-items: center; justify-content: center; padding: 0; }
.cp-chat-attach { flex: 0 0 42px; cursor: pointer; }
.cp-chat-preview { position: relative; display: inline-block; margin: 0 0 .5rem 3rem; }
.cp-chat-preview img { height: 90px; border-radius: 14px; }
.cp-chat-preview button { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; padding: 0; }
@media (max-width: 991px) {
  body.cp-chat-page .cp-footer { display: none !important; }
  body.cp-chat-page.has-bottom-nav .cp-main { padding-bottom: 0; }
  .cp-chat { grid-template-columns: 1fr; border-radius: 0; border: 0; height: calc(100dvh - 61px); box-shadow: none; }
  .cp-chat .cp-chat-conv { display: none; }
  .cp-chat.show-conversation .cp-chat-list { display: none; }
  .cp-chat.show-conversation .cp-chat-conv { display: flex; }
  .cp-chat .cp-chat-items { padding-bottom: 96px; }
  body.cp-chat-page:has(.cp-chat.show-conversation) .cp-bottom-nav { display: none; }
}

/* ---------- Notificaciones ---------- */
.cp-notif { display: flex; gap: .85rem; align-items: center; padding: .85rem 1rem; border-radius: 16px; text-decoration: none; color: inherit; }
.cp-notif:hover { background: var(--cp-surface-2); }
.cp-notif.is-unread { background: var(--cp-gradient-soft); }
.cp-notif-icon { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 14px; background: var(--cp-surface-2); display: flex; align-items: center; justify-content: center; font-size: 1.15rem; }

/* ---------- Planes y pagos ---------- */
.cp-plan { position: relative; background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: 24px; padding: 1.5rem;
  box-shadow: var(--cp-shadow); height: 100%; display: flex; flex-direction: column; transition: transform .2s; }
.cp-plan:hover { transform: translateY(-4px); }
.cp-plan-hot { border: 2px solid transparent; background: linear-gradient(var(--cp-surface), var(--cp-surface)) padding-box, var(--cp-gradient) border-box; }
.cp-plan-ribbon { position: absolute; top: -12px; right: 18px; background: var(--cp-gradient); color: #fff; font-size: .72rem; font-weight: 700; padding: .25rem .75rem; border-radius: 999px; }
.cp-price { font-size: 1.9rem; font-weight: 800; margin-bottom: .5rem; }
.cp-paybox { background: var(--cp-gradient-soft); border: 1px solid var(--cp-border); }
.cp-steps { list-style: none; display: flex; padding: 0; gap: .5rem; counter-reset: s; }
.cp-steps li { flex: 1; text-align: center; font-size: .8rem; color: var(--cp-text-soft); font-weight: 600; }
.cp-steps li span { display: flex; margin: 0 auto .35rem; width: 32px; height: 32px; border-radius: 50%; align-items: center; justify-content: center; background: var(--cp-surface-2); }
.cp-steps li.done { color: var(--bs-body-color); }
.cp-steps li.done span { background: var(--cp-gradient); color: #fff; }
.cp-reply { background: var(--cp-gradient-soft); border-radius: 14px; padding: .75rem 1rem; }
.cp-legal { max-width: 860px; }
.cp-legal h2 { margin-top: 1.5rem; }

/* Modal */
.modal-content { background: var(--cp-surface); }
.offcanvas { background: var(--cp-surface); }
.dropdown-menu { background: var(--cp-surface); }
.dropdown-item:active { background: var(--cp-rose); }

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

/* Mientras una foto carga se ve un fondo suave en lugar de un hueco vacío */
.cp-avatar-sm, .cp-avatar-md, .cp-story-ring img, .cp-gal-img, .cp-photo-item img,
.cp-match-thumb img, .cp-match-photo, .cp-conv img { background: var(--cp-surface-2, #eee); }
.cp-gal-img { height: auto; }

/* ---------- Tamaño de las fotos en pantalla (PC y teléfono) ---------- */
/* Tarjetas: más columnas y algo menos altas */
.cp-grid { gap: .75rem; }
@media (min-width: 576px)  { .cp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 992px)  { .cp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; } }
@media (min-width: 1200px) { .cp-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1600px) { .cp-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.cp-card-photo { aspect-ratio: 4 / 5; }
@media (max-width: 575px) {
  .cp-card { border-radius: 18px; }
  .cp-card-info { padding: 0 .6rem; }
  .cp-tags { display: none; }
}

/* Galería del perfil: tamaño contenido y centrada */
.cp-profile-gallery { max-width: 400px; margin-inline: auto; }
@media (max-width: 991px) { .cp-profile-gallery { max-width: 340px; } }
.cp-gal-img { width: 100%; }
.cp-gal-img, .cp-gal-empty { max-height: 65vh; }

/* Matches: cuadrados más pequeños */
.cp-match-item { border-radius: 18px; }

/* Fotos en el chat */
.cp-bubble-img img { width: 220px; max-height: 260px; }
@media (max-width: 575px) { .cp-bubble-img img { width: 180px; max-height: 220px; } }
.js-viewer-img { max-height: 80vh; width: auto; object-fit: contain; }

/* Mis fotos (editar perfil) */
.cp-photo-grid { max-width: 520px; }
@media (min-width: 768px) { .cp-photo-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 576px) and (max-width: 767px) {
  .cp-action { width: 36px; height: 36px; font-size: .9rem; }
  .cp-action-like { width: 44px; height: 44px; }
  .cp-card-info { bottom: 48px; }
  .cp-card-info h3 { font-size: 1rem; }
}
