* { margin:0; padding:0; box-sizing:border-box; }
:root {
  --red:#e6203f;
  --red-dark:#c11130;
  --black:#0a0a0c;
  --drawer:#19191d;
  --drawer-line:#2c2c33;
  --page:#f3f3f6;
  --card:#ffffff;
  --line:#e4e4ea;
  --text:#17171c;
  --muted:#6b6b76;
}
body { font-family:-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif; background:var(--page); color:var(--text); min-height:100vh; }
#app { max-width:640px; margin:0 auto; min-height:100vh; display:flex; flex-direction:column; background:var(--page); }

/* ---------- LOGIN (pantalla oscura) ---------- */
.login-wrap { min-height:100vh; background:radial-gradient(120% 90% at 50% 0%, #3d1214 0%, #1c0a0c 45%, #0b0506 100%); display:flex; flex-direction:column; align-items:center; padding:56px 22px 40px; }
.login-wrap .brand { color:#fff; font-size:34px; font-weight:800; letter-spacing:.5px; margin-bottom:6px; }
.login-wrap .brand b { color:var(--red); }
.login-wrap .tag { color:#c9a6a6; font-size:14px; margin-bottom:34px; text-align:center; }
.login-form { width:100%; max-width:420px; }
.login-form label { display:block; color:#e8dcdc; font-size:15px; margin:0 2px 8px; }
.login-form input { width:100%; background:#fff; border:none; border-radius:10px; color:#111; padding:14px 16px; font-size:16px; margin-bottom:18px; }
.login-form input:focus { outline:3px solid rgba(230,32,63,.35); }
.btn-red { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; background:var(--red); color:#fff; border:none; border-radius:10px; padding:15px 20px; font-size:17px; font-weight:800; letter-spacing:1.5px; cursor:pointer; text-transform:uppercase; }
.btn-red:active { background:var(--red-dark); }
.btn-red:disabled { opacity:.55; }
.btn-red svg { width:20px; height:20px; flex:none; }
.btn-upload svg, .btn-gray svg, .logout svg, .tip-icon svg { flex:none; }
.btn-upload svg { width:18px; height:18px; }
.btn-gray svg { width:20px; height:20px; }
.logout svg { width:16px; height:16px; }
.badge-privada svg { width:16px; height:16px; flex:none; }
.btn-back svg { width:18px; height:18px; }
.login-note { color:#c9a6a6; font-size:13px; text-align:center; margin-top:22px; line-height:1.5; }
.login-note .devcode { display:block; font-size:34px; letter-spacing:10px; color:#fff; font-weight:800; margin:12px 0 4px; }
.error { color:#ff7d8f; font-size:14px; margin:-8px 0 12px; text-align:center; }
.badge-privada { display:flex; align-items:center; gap:8px; border:1px solid rgba(230,32,63,.55); color:#e8b8c0; border-radius:999px; padding:9px 16px; font-size:13px; margin-top:38px; }

/* ---------- HEADER negro ---------- */
header.topbar { position:sticky; top:0; z-index:30; background:var(--black); display:flex; align-items:center; justify-content:space-between; padding:14px 18px; }
header.topbar .brand { color:#fff; font-size:21px; font-weight:800; letter-spacing:.3px; }
header.topbar .brand b { color:var(--red); }
header.topbar .icons { display:flex; align-items:center; gap:22px; }
header.topbar .icons button { background:none; border:none; padding:2px; cursor:pointer; color:#fff; display:flex; }
header.topbar .icons svg { width:23px; height:23px; }

/* ---------- MENU lateral oscuro ---------- */
.drawer-backdrop { position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:40; opacity:0; pointer-events:none; transition:opacity .2s; }
.drawer-backdrop.open { opacity:1; pointer-events:auto; }
.drawer { position:fixed; top:0; left:0; bottom:0; width:78%; max-width:330px; background:var(--drawer); z-index:50; transform:translateX(-102%); transition:transform .22s ease; display:flex; flex-direction:column; padding:26px 22px; overflow-y:auto; }
.drawer.open { transform:translateX(0); }
.drawer .me-row { display:flex; align-items:center; gap:14px; margin-bottom:6px; }
.drawer .avatar { width:56px; height:56px; border-radius:50%; background:#33333a; border:2px solid #3d3d45; object-fit:cover; display:flex; align-items:center; justify-content:center; color:#9a9aa4; font-size:24px; font-weight:700; flex:none; }
.drawer .me-name { color:#fff; font-size:18px; font-weight:700; }
.drawer .logout { background:none; border:none; color:#9a9aa4; font-size:14px; cursor:pointer; display:flex; align-items:center; gap:6px; padding:4px 0; margin:2px 0 18px 70px; }
.btn-upload { display:flex; align-items:center; justify-content:center; gap:8px; background:var(--red); color:#fff; border:none; border-radius:8px; padding:13px; font-size:14px; font-weight:800; letter-spacing:1px; cursor:pointer; margin-bottom:22px; }
.drawer nav { display:flex; flex-direction:column; }
.drawer nav button { display:flex; align-items:center; gap:16px; background:none; border:none; border-top:1px solid var(--drawer-line); color:#cfcfd6; font-size:17px; padding:15px 4px; cursor:pointer; text-align:left; }
.drawer nav button:last-child { border-bottom:1px solid var(--drawer-line); }
.drawer nav button.active { color:#fff; }
.drawer nav svg { width:22px; height:22px; flex:none; }

/* ---------- CONTENIDO ---------- */
main { flex:1; padding:18px 16px 30px; }
.page-title { display:flex; align-items:center; gap:10px; font-size:22px; font-weight:800; margin:4px 2px 16px; }
.page-title svg { width:24px; height:24px; color:var(--red); }

/* Banner rojo de inicio */
.banner { border-radius:4px; background:linear-gradient(135deg,#d81f34 0%, #ef4b3f 55%, #f2785c 100%); color:#fff; padding:26px 22px 30px; margin-bottom:18px; box-shadow:0 2px 10px rgba(216,31,52,.25); }
.banner .b-home { display:flex; align-items:center; gap:12px; font-size:26px; font-weight:800; margin-bottom:18px; }
.banner .b-home svg { width:30px; height:30px; }
.banner .pill { display:inline-block; background:#fff; color:var(--red); border-radius:999px; padding:8px 18px; font-size:17px; font-weight:800; letter-spacing:1px; margin-bottom:16px; }
.banner p { font-size:16.5px; line-height:1.55; color:#ffe9e9; }

/* Tarjetas blancas */
.card { background:var(--card); border:1px solid var(--line); border-radius:6px; padding:20px; margin-bottom:16px; }
.card .tag-pill { display:inline-block; background:var(--red); color:#fff; border-radius:999px; padding:4px 14px; font-size:12px; font-weight:800; letter-spacing:1px; margin-bottom:12px; text-transform:uppercase; }
.card h3 { font-size:17px; margin-bottom:6px; }
.card p, .card .body { color:#4a4a54; font-size:15px; line-height:1.5; }
.card .tip-icon { display:flex; justify-content:center; margin-bottom:8px; }
.card .tip-icon svg { width:40px; height:40px; color:#2f6fed; }
.card.center { text-align:center; }

/* ---------- MIEMBROS ---------- */
.members { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:14px; }
.member { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:18px 12px; text-align:center; cursor:pointer; }
.member img, .member .avatar { width:84px; height:84px; border-radius:50%; object-fit:cover; margin:0 auto 10px; background:#ececf0; display:flex; align-items:center; justify-content:center; color:#a0a0aa; font-size:30px; font-weight:700; }
.member .nm { font-weight:700; font-size:15px; }
.member .ab { font-size:12.5px; color:var(--muted); margin-top:4px; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; min-height:2em; }

/* ---------- PERFIL de miembro ---------- */
.profile-top { text-align:center; padding:8px 0 4px; }
.profile-top .who { display:flex; align-items:center; justify-content:center; gap:8px; color:#3a3a44; font-size:19px; font-weight:600; margin-bottom:14px; }
.profile-top .who svg { width:22px; height:22px; }
.profile-top img.big, .profile-top .avatar.big { width:min(72vw,340px); height:min(72vw,340px); border-radius:50%; object-fit:cover; background:#e6e6eb; display:flex; align-items:center; justify-content:center; color:#a0a0aa; font-size:90px; font-weight:700; margin:0 auto; }
.btn-row { display:flex; flex-direction:column; gap:12px; margin:18px 0; }
.btn-gray { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; background:#8f8f98; color:#fff; border:none; border-radius:8px; padding:14px; font-size:16px; font-weight:700; letter-spacing:2px; cursor:pointer; text-transform:uppercase; }
.btn-gray.primary { background:var(--red); }
.btn-gray svg { width:20px; height:20px; }
.btn-back { background:none; border:none; color:var(--muted); font-size:15px; cursor:pointer; display:flex; align-items:center; gap:6px; padding:4px 0 12px; }
.info-card { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:18px 20px; margin-bottom:16px; }
.info-card h4 { font-size:17px; margin-bottom:4px; }
.info-card p { color:#4a4a54; font-size:15px; line-height:1.5; }
.gallery { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.gallery img { width:100%; aspect-ratio:1; object-fit:cover; border-radius:8px; background:#e6e6eb; }

/* ---------- SEGUIR / VISITAS / BLOQUEAR ---------- */
.stat-row { display:flex; justify-content:center; gap:34px; margin:16px 0 4px; }
.stat { text-align:center; }
.stat b { display:block; font-size:21px; }
.stat span { font-size:12.5px; color:var(--muted); text-transform:uppercase; letter-spacing:1px; }
.btn-block { background:#5a5a63; }
.blocked-note { display:flex; align-items:center; gap:10px; background:#fff; border:1px solid var(--line); border-radius:8px; padding:14px 16px; color:#5a5a63; font-size:14.5px; line-height:1.45; }
.blocked-note svg { width:22px; height:22px; flex:none; color:var(--red); }
.info-card h4 svg { width:18px; height:18px; vertical-align:-3px; color:var(--red); margin-right:4px; }
.mini-list { margin-top:8px; }
.mini-row { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; background:#fff; border:none; border-top:1px solid var(--line); padding:11px 4px; font-size:15px; cursor:pointer; text-align:left; }
.mini-row:first-child { border-top:none; }
.mini-row .when { font-size:12px; color:var(--muted); }

.mini-row.static { cursor:default; }
.btn-unblock { background:#5a5a63; color:#fff; border:none; border-radius:8px; padding:7px 14px; font-size:13px; font-weight:700; cursor:pointer; flex:none; }

/* ---------- CHAT ---------- */
.msgs { display:flex; flex-direction:column; gap:8px; margin-bottom:78px; }
.msg { background:#fff; border:1px solid var(--line); border-radius:12px; padding:10px 14px; max-width:85%; font-size:15px; }
.msg.mine { align-self:flex-end; background:#fde8ec; border-color:#f4b9c4; }
.msg .who { font-size:12px; color:var(--red); font-weight:700; margin-bottom:2px; }
.msg .when { font-size:11px; color:var(--muted); margin-top:3px; }
.composer { position:fixed; bottom:0; left:0; right:0; z-index:20; background:var(--page); padding:10px 16px; }
.composer .row { max-width:608px; margin:0 auto; display:flex; gap:8px; }
.composer input { flex:1; background:#fff; border:1px solid var(--line); border-radius:10px; color:var(--text); padding:12px 14px; font-size:16px; }
.composer input:focus { outline:none; border-color:var(--red); }
.composer button { background:var(--red); color:#fff; border:none; border-radius:10px; padding:12px 20px; font-size:15px; font-weight:700; cursor:pointer; }
.thread-head { display:flex; align-items:center; gap:10px; background:#fff; border:1px solid var(--line); border-radius:10px; padding:12px 14px; margin-bottom:12px; font-size:16px; }
.thread-head b { color:var(--red); }

/* Lista de conversaciones */
.dm-row { display:flex; align-items:center; gap:14px; background:#fff; border:1px solid var(--line); border-radius:10px; padding:12px 14px; margin-bottom:10px; cursor:pointer; width:100%; text-align:left; font-size:16px; }
.dm-row img, .dm-row .avatar { width:46px; height:46px; border-radius:50%; object-fit:cover; background:#ececf0; display:flex; align-items:center; justify-content:center; color:#a0a0aa; font-size:18px; font-weight:700; flex:none; }
.dm-row .nm { font-weight:700; }
.dm-row .ab { font-size:13px; color:var(--muted); }

/* ---------- MI PERFIL ---------- */
.myphotos { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.myphotos .ph { position:relative; width:calc(33.3% - 6px); aspect-ratio:1; }
.myphotos img { width:100%; height:100%; object-fit:cover; border-radius:8px; }
.myphotos .del { position:absolute; top:-6px; right:-6px; width:26px; height:26px; border-radius:50%; background:var(--red); color:#fff; border:2px solid #fff; padding:0; font-size:15px; line-height:1; cursor:pointer; }
.photo-count { font-size:13.5px; color:var(--muted); margin:10px 0 4px; }
form.edit label { display:block; font-size:14px; color:var(--muted); margin:14px 0 6px; }
form.edit input, form.edit textarea { width:100%; background:#fff; border:1px solid var(--line); border-radius:10px; color:var(--text); padding:12px 14px; font-size:16px; font-family:inherit; }
form.edit input:focus, form.edit textarea:focus { outline:none; border-color:var(--red); }
.empty { color:var(--muted); text-align:center; padding:34px 12px; font-size:15px; }
#nl-badge-frame { display:none !important; } /* la insignia de Netlify tapa el botón Enviar en móvil */
