/* =====================================================================================
   GTA VI EXPLORERS — estilos. Móvil primero. Negro/gris con detalles naranja, rojo y blanco.
   Sin recursos gráficos ni logotipos de terceros.
   ===================================================================================== */

:root {
  --bg: #0a0a0c;
  --bg2: #101013;
  --panel: #16161a;
  --panel2: #1d1d23;
  --line: #2a2a32;
  --text: #f4f4f6;
  --muted: #9d9daa;
  --faint: #6d6d79;
  --orange: #ff438b;
  --orange2: #ff80b7;
  --red: #e5322d;
  --green: #3ddc84;
  --radius: 14px;
  --nav-h: 62px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --grad: linear-gradient(135deg, #ff438b 0%, #9254e8 100%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--orange2); }
code { background: var(--panel2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: .01em; }
h2 { font-size: 1.2rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hint { color: var(--faint); font-size: .8rem; margin: .35rem 0 0; }
.ic { flex: none; }

/* ------------------------------------------------------------------ pantallas de acceso */
.screen {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(255,67,139,.16), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(77,227,207,.14), transparent 60%),
    var(--bg);
  overflow: auto;
}
.auth-card { width: 100%; max-width: 400px; }
.auth-card.center { text-align: center; display: grid; justify-items: center; gap: 10px; }
.auth-card h1 { margin: 14px 0 8px; }
.brand-mark {
  width: 64px; height: 64px; border-radius: 18px; background: var(--grad); position: relative;
  box-shadow: 0 10px 34px rgba(255,67,139,.35);
}
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; background: #fff; border-radius: 2px; }
.brand-mark::before { left: 50%; top: 14px; bottom: 14px; width: 4px; transform: translateX(-50%); }
.brand-mark::after { top: 50%; left: 14px; right: 14px; height: 4px; transform: translateY(-50%); }
.brand-mark.ok { background: linear-gradient(135deg, #3ddc84, #1a9d57); box-shadow: 0 10px 34px rgba(61,220,132,.3); }
.brand-mark.bad { background: linear-gradient(135deg, #555, #2a2a2f); box-shadow: none; }
.wordmark { margin-top: 14px; display: flex; flex-direction: column; line-height: 1; text-transform: uppercase; }
.wordmark span { font-size: .8rem; letter-spacing: .4em; color: var(--muted); font-weight: 700; }
.wordmark span b { color: var(--orange); }
.wordmark strong { font-size: 2rem; letter-spacing: .12em; font-weight: 900; margin-top: 4px; }
.admin-access { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }
.admin-access summary { cursor: pointer; color: var(--muted); font-size: .88rem; }
.admin-access form { margin-top: 12px; }

/* ------------------------------------------------------------------ formularios */
.field { display: block; margin: 0 0 12px; }
.field > span { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
input[type=text], input[type=password], input[type=search], textarea, select {
  width: 100%; background: var(--bg2); color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; font: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,67,139,.18); }
textarea { resize: vertical; min-height: 90px; }
#inp-code { text-align: center; font-size: 1.25rem; letter-spacing: .18em; font-weight: 700; text-transform: uppercase; }
.form-error { color: #ff7b72; min-height: 1.2em; font-size: .88rem; margin: 0 0 8px; }
.toggle-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.toggle-row input { width: 20px; height: 20px; accent-color: var(--orange); flex: none; }
.toggle-row small { display: block; color: var(--muted); }

/* ------------------------------------------------------------------ botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--text); padding: 11px 18px; border-radius: 12px; font-weight: 700;
  transition: transform .1s, background .15s, border-color .15s, opacity .15s; min-height: 44px; text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn:hover { border-color: #3b3b45; }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 20px rgba(77,227,207,.28); }
.btn.ghost { background: transparent; }
.btn.danger { background: rgba(77,227,207,.14); border-color: rgba(77,227,207,.5); color: #ff8a84; }
.btn.link { background: none; border: 0; color: var(--muted); min-height: 38px; }
.btn.block { width: 100%; margin-top: 8px; }
.btn.sm { padding: 6px 12px; min-height: 34px; font-size: .85rem; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.busy { position: relative; pointer-events: none; opacity: .75; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  background: var(--panel2); border: 1px solid var(--line);
}
.icon-btn:active { transform: scale(.94); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--orange); animation: spin .8s linear infinite; display: inline-block; }
.spinner.big { width: 38px; height: 38px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ estructura */
#shell { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
#views { position: relative; flex: 1; min-height: 0; }
.view { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
#view-map { overflow: hidden; }
.page { max-width: 760px; margin: 0 auto; padding: calc(var(--safe-t) + 16px) 14px 28px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.page-head h2 { display: flex; align-items: center; gap: 10px; }

#nav {
  display: flex; background: rgba(12,12,15,.97); border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b); height: calc(var(--nav-h) + var(--safe-b)); z-index: 40;
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: 0; color: var(--faint); font-size: .68rem; font-weight: 700; letter-spacing: .04em; position: relative;
}
.nav-btn.active { color: var(--orange2); }
.nav-btn.active::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; background: var(--grad); border-radius: 0 0 4px 4px; }
.nav-badge {
  position: absolute; top: 6px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: .65rem; display: grid; place-items: center; font-weight: 800;
}

@media (min-width: 900px) {
  #shell { flex-direction: row-reverse; }
  #nav { flex-direction: column; width: 88px; height: auto; padding: 14px 0; border-top: 0; border-right: 1px solid var(--line); justify-content: flex-start; gap: 6px; }
  .nav-btn { flex: none; height: 64px; }
  .nav-btn.active::before { top: 18%; bottom: 18%; left: 0; right: auto; width: 3px; height: auto; border-radius: 0 4px 4px 0; }
  .nav-badge { left: calc(50% + 8px); }
}

/* ------------------------------------------------------------------ mapa */
#map { position: absolute; inset: 0; background: #0d0d10; z-index: 1; }
.leaflet-container { background: #0d0d10; font: inherit; outline: none; }
.leaflet-bar a, .leaflet-bar a:hover { background: var(--panel); color: var(--text); border-bottom-color: var(--line); }
.leaflet-bar { border: 1px solid var(--line) !important; box-shadow: none; }
.leaflet-control-attribution { background: rgba(10,10,12,.7) !important; color: var(--faint) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-bottom.leaflet-left { margin-bottom: 8px; }

.map-top { position: absolute; z-index: 500; top: 0; left: 0; right: 0; padding: calc(var(--safe-t) + 8px) 8px 18px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(10,10,12,.88), rgba(10,10,12,0)); }
.filter-bar { display: flex; gap: 6px; overflow-x: auto; pointer-events: auto; scrollbar-width: none; padding: 2px 2px 4px; -webkit-overflow-scrolling: touch; }
.filter-bar::-webkit-scrollbar { display: none; }
.fchip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 7px; border-radius: 999px;
  background: rgba(22,22,26,.94); border: 1.5px solid var(--line); color: var(--muted); font-size: .8rem; font-weight: 700; min-height: 38px;
  transition: all .15s;
}
.fchip .cat-badge { width: 24px; height: 24px; opacity: .45; filter: grayscale(.6); transition: all .15s; }
.fchip .cnt { background: rgba(255,255,255,.08); border-radius: 999px; padding: 0 7px; font-size: .74rem; min-width: 22px; text-align: center; }
.fchip.on { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, #16161a); }
.fchip.on .cat-badge { opacity: 1; filter: none; }
.fchip.all { padding: 6px 13px; color: var(--text); }
.fchip.all.sel { border-color: var(--orange); }
.fchip.sep { width: 1px; padding: 0; min-height: 22px; align-self: center; background: var(--line); border: 0; border-radius: 0; }

.map-tag {
  position: absolute; z-index: 500; left: 10px; top: calc(var(--safe-t) + 64px); background: rgba(77,227,207,.9); color: #fff;
  font-size: .68rem; font-weight: 800; letter-spacing: .12em; padding: 4px 10px; border-radius: 999px; pointer-events: none;
}
.map-fabs { position: absolute; z-index: 600; right: 14px; bottom: calc(16px); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.fab {
  width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(77,227,207,.45), 0 0 0 4px rgba(10,10,12,.55); transition: transform .12s;
}
.fab:active { transform: scale(.92); }
.fab.small { width: 44px; height: 44px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.5); color: var(--text); }
.fab.cancel { background: var(--panel2); border: 1px solid var(--line); }
.add-banner {
  position: absolute; z-index: 650; left: 12px; right: 90px; bottom: 20px; display: flex; align-items: center; gap: 10px;
  background: rgba(22,22,26,.97); border: 1px solid var(--orange); border-radius: 14px; padding: 10px 12px; font-weight: 700; font-size: .88rem;
  box-shadow: 0 8px 28px rgba(0,0,0,.5);
}
.add-banner span { flex: 1; }
#view-map.adding .leaflet-container { cursor: crosshair; }
#view-map.adding::after { content: ""; position: absolute; inset: 0; border: 3px solid var(--orange); pointer-events: none; z-index: 550; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { border-color: rgba(255,67,139,.3); } }

/* marcadores */
.gx-marker { background: none !important; border: 0 !important; }
.mk { position: relative; width: 40px; height: 46px; transform-origin: 50% 92%; transition: transform .15s; filter: drop-shadow(0 3px 5px rgba(0,0,0,.6)); }
.mk-pin { position: absolute; left: 2px; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--c); border: 2.5px solid #fff; display: grid; place-items: center; color: #fff; z-index: 1; }
.mk.on-light .mk-pin { color: #16161a; }
.mk::after { content: ""; position: absolute; left: 14px; top: 26px; width: 12px; height: 12px; background: var(--c); border-right: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(45deg); z-index: 0; }
.mk-eye, .mk-done { position: absolute; top: -4px; width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid #fff; display: grid; place-items: center; z-index: 2; }
.mk-eye { right: -3px; background: #0a0a0c; color: #fff; }
.mk-done { left: -3px; background: var(--green); color: #06210f; }
.mk.hid .mk-pin { background: color-mix(in srgb, var(--c) 55%, #1d1d23); }
.mk.sel { transform: scale(1.22); z-index: 1000; }
.mk.temp .mk-pin { background: #fff; color: var(--orange); animation: bob 1s ease-in-out infinite; }
.mk.temp::after { background: #fff; }
@keyframes bob { 50% { transform: translateY(-4px); } }

.cat-badge { width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; display: inline-grid; place-items: center; flex: none; }
.cat-badge.on-light { color: #16161a; }

/* ------------------------------------------------------------------ hoja inferior / panel lateral */
#sheet-root { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .22s; }
#sheet-root.open .sheet-backdrop { opacity: 1; }
#sheet {
  position: relative; width: 100%; max-width: 620px; max-height: 92dvh; overflow-y: auto; overflow-x: hidden;
  background: var(--panel); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0;
  transform: translateY(102%); transition: transform .26s cubic-bezier(.2,.8,.2,1); padding-bottom: calc(var(--safe-b) + 12px);
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
#sheet-root.open #sheet { transform: none; }
.sheet-grab { position: sticky; top: 0; z-index: 3; height: 22px; background: linear-gradient(var(--panel) 60%, transparent); cursor: pointer; }
.sheet-grab::before { content: ""; position: absolute; left: 50%; top: 8px; width: 42px; height: 4px; margin-left: -21px; background: #3a3a44; border-radius: 4px; }
.sheet-pad { padding: 0 18px 8px; }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sheet-head h3 { flex: 1; font-size: 1.15rem; word-break: break-word; }

@media (min-width: 900px) {
  #sheet-root { justify-content: flex-end; align-items: stretch; pointer-events: none; }
  .sheet-backdrop { display: none; }
  #sheet { pointer-events: auto; max-width: 440px; max-height: none; height: 100%; border-radius: 0; border: 0; border-left: 1px solid var(--line); transform: translateX(102%); box-shadow: -20px 0 50px rgba(0,0,0,.45); }
  #sheet-root.open #sheet { transform: none; }
  .sheet-grab { display: none; }
  .sheet-pad { padding-top: 18px; }
}

/* ------------------------------------------------------------------ ficha de descubrimiento */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 800; letter-spacing: .04em; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); }
.tag.spoiler { color: #ffb4ae; border-color: rgba(77,227,207,.5); background: rgba(77,227,207,.1); }
.tag.mine { color: var(--orange2); border-color: rgba(255,67,139,.5); }
.hidden-box {
  border: 1.5px dashed #3b3b45; border-radius: var(--radius); padding: 22px 16px; text-align: center; display: grid; justify-items: center; gap: 8px;
  background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(255,255,255,.015) 10px 20px); margin: 6px 0 12px;
}
.hidden-box strong { font-size: 1.05rem; }
.desc { white-space: pre-wrap; word-break: break-word; margin: 6px 0 12px; }
.photos { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 4px -18px 12px; padding: 0 18px; scrollbar-width: none; }
.photos::-webkit-scrollbar { display: none; }
.photos button { flex: none; width: 78%; max-width: 300px; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); padding: 0; background: var(--bg2); scroll-snap-align: start; }
.photos button:only-child { width: 100%; max-width: none; }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 6px 0 14px; }
.meta b { color: var(--text); }
.divider { height: 1px; background: var(--line); margin: 14px 0; border: 0; }

.found-btn {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px; border-radius: var(--radius);
  background: var(--bg2); border: 1.5px solid var(--line); transition: all .15s;
}
.found-btn .box { width: 30px; height: 30px; border-radius: 9px; border: 2px solid #4a4a56; display: grid; place-items: center; flex: none; color: transparent; transition: all .15s; }
.found-btn strong { display: block; font-size: 1rem; }
.found-btn small { color: var(--muted); }
.found-btn.done { border-color: var(--green); background: rgba(61,220,132,.08); }
.found-btn.done .box { background: var(--green); border-color: var(--green); color: #06210f; }
.found-btn:disabled { opacity: .6; }
.who h4 { margin: 18px 0 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.who-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.who-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg2); border-radius: 12px; border: 1px solid var(--line); }
.who-list li.me { border-color: rgba(61,220,132,.45); }
.who-list li span:not(.avatar) { flex: 1; font-weight: 700; }
.who-list li time { color: var(--muted); font-size: .82rem; }
.who-count { margin: 10px 2px 0; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.actions .btn { flex: 1 1 auto; }

.avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; font-weight: 800; color: #fff; background: #333; }

/* ------------------------------------------------------------------ formulario */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.cat-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 12px; background: var(--bg2); border: 1.5px solid var(--line); font-size: .74rem; font-weight: 700; text-align: center; line-height: 1.15; color: var(--muted); transition: all .12s; }
.cat-opt .cat-badge { width: 34px; height: 34px; }
.cat-opt[aria-pressed=true] { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, #16161a); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 35%, transparent); }
.loc-box { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.loc-box div { flex: 1; font-size: .85rem; }
.loc-box small { color: var(--muted); display: block; }
.photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo-actions .btn { min-height: 50px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.photo-grid:empty { display: none; }
.ph { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg2); border: 1px solid var(--line); display: grid; place-items: center; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph-x { position: absolute; top: 5px; right: 5px; width: 28px; height: 28px; border-radius: 50%; background: rgba(10,10,12,.85); border: 1px solid rgba(255,255,255,.4); color: #fff; display: grid; place-items: center; padding: 0; }
.ph-state { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(10,10,12,.8); font-size: .7rem; text-align: center; padding: 3px; }
.ph-state.err { color: #ff8a84; }
.form-actions { display: flex; gap: 8px; margin-top: 16px; position: sticky; bottom: 0; padding: 10px 0 2px; background: linear-gradient(transparent, var(--panel) 30%); }
.form-actions .btn { flex: 1; }
.form-actions .btn.primary { flex: 2; }
.section-label { font-size: .78rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; margin: 16px 0 7px; display: block; }

/* ------------------------------------------------------------------ listas */
.search { position: relative; margin-bottom: 10px; }
.search input { padding-left: 42px; }
.search .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.list { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; width: 100%; text-align: left; transition: border-color .15s, background .15s; }
button.row:hover { border-color: #3b3b45; background: var(--panel2); }
.row .grow { flex: 1; min-width: 0; }
.row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .end { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.row .tick { color: var(--green); }
.row.hid strong { color: var(--muted); font-style: italic; }
.empty { display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--muted); padding: 40px 20px; }
.empty strong { color: var(--text); }
.pill-tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.pill-tabs::-webkit-scrollbar { display: none; }
.pill { flex: none; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--panel); color: var(--muted); font-weight: 700; font-size: .85rem; }
.pill.on { color: #fff; border-color: var(--orange); background: rgba(255,67,139,.14); }

/* ------------------------------------------------------------------ actividad */
.day-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin: 18px 4px 8px; font-weight: 800; }
.feed-item .grow { white-space: normal; }
.feed-item strong { display: inline; white-space: normal; }
.feed-item .txt { line-height: 1.35; }
.feed-item .when { color: var(--faint); font-size: .78rem; }
.feed-item.new { border-color: rgba(255,67,139,.6); }

/* ------------------------------------------------------------------ perfil */
.profile-top { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.profile-top .avatar { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--orange); }
.profile-top h2 { text-transform: none; letter-spacing: 0; font-size: 1.5rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; text-align: center; }
.stat b { display: block; font-size: 1.5rem; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.card h3 { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.stack { display: grid; gap: 8px; }
.id-line { color: var(--faint); font-size: .72rem; word-break: break-all; margin-top: 6px; }

/* ------------------------------------------------------------------ administración */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.code-chip { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 800; letter-spacing: .08em; }
.badge { font-size: .68rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; letter-spacing: .05em; text-transform: uppercase; }
.badge.ok { background: rgba(61,220,132,.14); color: var(--green); }
.badge.off { background: rgba(77,227,207,.14); color: #ff8a84; }
.badge.used { background: rgba(157,157,170,.14); color: var(--muted); }
.badge.admin { background: rgba(255,67,139,.16); color: var(--orange2); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 14px; }
.bars { display: grid; gap: 7px; }
.bar-row { display: grid; grid-template-columns: 112px 1fr 34px; align-items: center; gap: 8px; font-size: .82rem; }
.bar-row .track { height: 10px; background: var(--bg2); border-radius: 6px; overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 6px; background: var(--c, var(--orange)); }
.bar-row b { text-align: right; }
.days { display: flex; align-items: flex-end; gap: 6px; height: 90px; }
.days .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 3px; font-size: .68rem; color: var(--muted); }
.days .stackbar { width: 100%; display: flex; flex-direction: column-reverse; gap: 1px; justify-content: flex-start; }
.days .a { background: var(--orange); border-radius: 3px; }
.days .b { background: var(--green); border-radius: 3px; }
.row-actions { display: flex; gap: 6px; }
.blur-hidden { filter: blur(6px); user-select: none; }

/* ------------------------------------------------------------------ diálogos, toasts, visor */
.dialog-root { position: fixed; inset: 0; z-index: 1500; background: rgba(0,0,0,.7); display: grid; place-items: center; padding: 20px; }
.dialog { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.dialog h3 { margin-bottom: 8px; font-size: 1.15rem; }
.dialog p { color: var(--muted); }
.dialog-actions { display: flex; gap: 8px; margin-top: 16px; }
.dialog-actions .btn { flex: 1; }
#toasts { position: fixed; z-index: 1600; left: 0; right: 0; top: calc(var(--safe-t) + 70px); display: grid; gap: 8px; justify-items: center; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; max-width: 420px; width: fit-content; background: rgba(28,28,34,.97); border: 1px solid var(--line); border-left: 4px solid var(--orange); padding: 10px 14px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.55); font-weight: 600; font-size: .9rem; animation: toast-in .22s ease-out; }
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--green); }
.toast.clickable { cursor: pointer; }
.toast.out { opacity: 0; transform: translateY(-8px); transition: all .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } }
.lightbox { position: fixed; inset: 0; z-index: 1700; background: rgba(0,0,0,.94); display: grid; place-items: center; }
.lightbox img { max-width: 100vw; max-height: 100dvh; object-fit: contain; }
.lb-close { position: absolute; top: calc(var(--safe-t) + 12px); right: 12px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.12); border: 0; color: #fff; display: grid; place-items: center; z-index: 2; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 60px; border: 0; background: rgba(255,255,255,.1); color: #fff; border-radius: 12px; display: grid; place-items: center; z-index: 2; }
.lb-nav.prev { left: 8px; transform: translateY(-50%) scaleX(-1); }
.lb-nav.next { right: 8px; }
.lb-count { position: absolute; bottom: calc(var(--safe-b) + 14px); left: 0; right: 0; text-align: center; color: #fff; font-weight: 700; }
.cam-modal { position: fixed; inset: 0; z-index: 1800; background: #000; display: flex; flex-direction: column; }
.cam-modal video { flex: 1; min-height: 0; width: 100%; object-fit: contain; background: #000; }
.cam-bar { display: flex; gap: 10px; padding: 14px; justify-content: center; background: #0a0a0c; }

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

.gx-cluster span{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#a12d79;color:white;border:2px solid #4de3cf;font-weight:800;box-shadow:0 2px 10px #0008}
#comment-text{width:100%;min-height:72px;margin:8px 0}
.category-form label{display:block;margin:8px 0}
