/* Centro de control: estética de panel futurista con neones.
   Regla de legibilidad: el brillo (glow) solo en acentos (bordes, botones, chips, contador); nunca en texto largo. */

@font-face { font-family: "Orbitron"; src: url("/fuentes/orbitron-latin-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fuentes/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fuentes/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --fondo: #05060a;
  --sup: rgba(13, 18, 30, .78);
  --sup-solida: #0b1019;
  --sup2: rgba(34, 230, 255, .06);
  --borde: rgba(120, 200, 255, .16);
  --borde-fuerte: rgba(120, 200, 255, .32);
  --texto: #e8f1ff;
  --suave: #a3b3cc;
  --tenue: #8292ad;

  --cian: #22e6ff;
  --magenta: #ff4fd8;
  --violeta: #a77bff;
  --verde: #3dffa8;
  --ambar: #ffc84a;
  --peligro: #ff5c7a;

  --acento: var(--cian);
  --acento-txt: #00141a;
  --glow-cian: 0 0 0 1px rgba(34, 230, 255, .55), 0 0 14px rgba(34, 230, 255, .35), 0 0 34px rgba(34, 230, 255, .12);
  --glow-magenta: 0 0 0 1px rgba(255, 79, 216, .55), 0 0 14px rgba(255, 79, 216, .35);
  --sombra: 0 18px 40px rgba(0, 0, 0, .55);

  --f-tit: "Orbitron", "Inter", system-ui, sans-serif;
  --f-txt: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --r: 14px;
  --sa-t: env(safe-area-inset-top, 0px);
  --sa-b: env(safe-area-inset-bottom, 0px);
  --sa-l: env(safe-area-inset-left, 0px);
  --sa-r: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--fondo); }
html, body { margin: 0; }
body {
  background: var(--fondo);
  color: var(--texto);
  font: 16px/1.5 var(--f-txt);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
  position: relative;
}
/* Rejilla y halos de fondo (capa fija aparte: iOS no admite background-attachment: fixed). */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 85% -10%, rgba(167, 123, 255, .16), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(34, 230, 255, .12), transparent 60%),
    linear-gradient(rgba(120, 200, 255, .045) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(90deg, rgba(120, 200, 255, .045) 1px, transparent 1px) 0 0 / 36px 36px,
    var(--fondo);
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--cian); text-underline-offset: 3px; }
::selection { background: rgba(34, 230, 255, .3); }
[hidden] { display: none !important; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--cian); outline-offset: 2px; }

/* ---------- Barra superior ---------- */
.barra {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + var(--sa-t)) max(16px, var(--sa-r)) 10px max(16px, var(--sa-l));
  background: rgba(5, 6, 10, .82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--borde);
}
.barra::after { /* línea de neón inferior */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 230, 255, .7) 30%, rgba(255, 79, 216, .7) 70%, transparent);
  opacity: .55;
}
.marca {
  display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0;
  font: 700 15px/1 var(--f-tit); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
.marca img { width: 30px; height: 30px; border-radius: 9px; filter: drop-shadow(0 0 6px rgba(34, 230, 255, .45)); }
.barra h1 { font: 600 16px/1.2 var(--f-txt); margin: 0; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-i {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none;
  border: 1px solid transparent; background: transparent; color: var(--suave); cursor: pointer; position: relative;
  transition: color .15s, border-color .15s, box-shadow .15s, background .15s;
}
.btn-i:hover { color: var(--cian); border-color: rgba(34, 230, 255, .35); background: rgba(34, 230, 255, .06); box-shadow: 0 0 12px rgba(34, 230, 255, .18); }
.punto {
  position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--magenta); color: #1a0016; font: 700 11px/18px var(--f-mono); text-align: center; box-shadow: var(--glow-magenta);
}

.contenedor { max-width: 860px; margin: 0 auto; padding: 14px max(16px, var(--sa-r)) calc(110px + var(--sa-b)) max(16px, var(--sa-l)); }

/* ---------- Búsqueda y filtros ---------- */
.buscar { position: relative; display: block; margin: 4px 0 12px; }
.buscar svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--cian); opacity: .8; }
.buscar input {
  width: 100%; padding: 12px 12px 12px 42px; border-radius: 12px; border: 1px solid var(--borde);
  background: var(--sup); outline: none; transition: border-color .15s, box-shadow .15s;
}
.buscar input::placeholder { color: var(--tenue); }
.buscar input:focus { border-color: var(--cian); box-shadow: var(--glow-cian); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--borde); background: var(--sup);
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; color: var(--suave);
  transition: color .15s, border-color .15s, box-shadow .15s, background .15s;
}
.chip:hover { color: var(--texto); border-color: var(--borde-fuerte); }
.chip[aria-pressed="true"] {
  color: var(--cian); border-color: var(--cian); background: rgba(34, 230, 255, .1); box-shadow: var(--glow-cian); font-weight: 600;
}
.filtros2 { display: flex; gap: 8px; margin-bottom: 14px; }
.filtros2 select, .controles select {
  flex: 1; min-width: 0; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--borde); background: var(--sup-solida);
  color: var(--suave); font-size: 14px; outline: none;
}
.filtros2 select:focus, .controles select:focus { border-color: var(--cian); }

/* ---------- Tarjetas del muro (cristal oscuro) ---------- */
.lista { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.tarjeta {
  display: block; text-decoration: none; color: inherit; position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(22, 30, 48, .82), rgba(10, 13, 22, .82));
  border: 1px solid var(--borde); border-radius: var(--r); padding: 15px 15px 12px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.tarjeta::before { /* esquina luminosa */
  content: ""; position: absolute; left: 0; top: 0; width: 46px; height: 2px;
  background: linear-gradient(90deg, var(--cian), transparent); opacity: .7;
}
.tarjeta:hover { border-color: rgba(34, 230, 255, .45); box-shadow: 0 0 22px rgba(34, 230, 255, .12); }
.tarjeta:active { transform: scale(.995); }
.tarjeta.nueva { border-color: rgba(255, 79, 216, .55); box-shadow: 0 0 20px rgba(255, 79, 216, .14); }
.tarjeta.nueva::before { background: linear-gradient(90deg, var(--magenta), transparent); width: 70px; }
.tarjeta.nueva::after {
  content: "Nuevo"; position: absolute; top: 12px; right: 12px; font: 700 10.5px/1 var(--f-tit); letter-spacing: .12em;
  text-transform: uppercase; color: #1a0016; background: var(--magenta); padding: 5px 9px; border-radius: 999px; box-shadow: var(--glow-magenta);
}
.tarjeta h3 { margin: 8px 0 4px; font: 650 16.5px/1.3 var(--f-txt); padding-right: 70px; word-break: break-word; }
.tarjeta p { margin: 0; color: var(--suave); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }

/* Etiquetas de proyecto y estados */
.etqs { display: flex; gap: 6px; flex-wrap: wrap; }
.etq {
  font: 600 11px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px;
  border: 1px solid var(--borde); color: var(--suave); background: rgba(255, 255, 255, .03);
}
.etq.proyecto { color: var(--cian); border-color: rgba(34, 230, 255, .5); background: rgba(34, 230, 255, .08); box-shadow: 0 0 10px rgba(34, 230, 255, .18); }
.etq.idea { color: var(--violeta); border-color: rgba(167, 123, 255, .5); background: rgba(167, 123, 255, .1); box-shadow: 0 0 10px rgba(167, 123, 255, .2); }
.etq.en_marcha { color: var(--ambar); border-color: rgba(255, 200, 74, .5); background: rgba(255, 200, 74, .08); box-shadow: 0 0 10px rgba(255, 200, 74, .18); }
.etq.hecho { color: var(--verde); border-color: rgba(61, 255, 168, .5); background: rgba(61, 255, 168, .08); box-shadow: 0 0 10px rgba(61, 255, 168, .18); }
.etq.idea::before, .etq.en_marcha::before, .etq.hecho::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 1px;
  background: currentColor; box-shadow: 0 0 6px currentColor;
}

.minis { display: flex; gap: 6px; margin-top: 11px; overflow: hidden; }
.mini { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--sup-solida); flex: none; border: 1px solid var(--borde); }
.mini-arch {
  height: 32px; padding: 0 10px; border-radius: 9px; background: rgba(34, 230, 255, .05); border: 1px solid var(--borde); color: var(--suave);
  font-size: 13px; display: inline-flex; align-items: center; gap: 6px; max-width: 220px; flex: none;
}
.mini-arch svg.i { width: 15px; height: 15px; color: var(--cian); }
.mini-arch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pie { display: flex; align-items: center; gap: 12px; margin-top: 11px; color: var(--tenue); font: 12.5px/1.2 var(--f-mono); }
.pie .cont { display: inline-flex; align-items: center; gap: 4px; }
.pie svg.i { width: 14px; height: 14px; }
.avatar {
  width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font: 700 11px/1 var(--f-tit);
  background: var(--sup-solida); color: var(--texto); flex: none; border: 1px solid var(--borde-fuerte);
}
.avatar.a1 { color: var(--cian); border-color: var(--cian); box-shadow: 0 0 8px rgba(34, 230, 255, .4); }
.avatar.a2 { color: var(--magenta); border-color: var(--magenta); box-shadow: 0 0 8px rgba(255, 79, 216, .4); }
.vacio { text-align: center; color: var(--suave); padding: 64px 16px; border: 1px dashed var(--borde); border-radius: var(--r); }
.vacio strong { display: block; color: var(--texto); font: 700 15px/1.4 var(--f-tit); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.mas { display: flex; margin: 18px auto 0; }

/* Destello breve al llegar una publicación en tiempo real */
@keyframes destello {
  0% { box-shadow: 0 0 0 1px var(--cian), 0 0 36px rgba(34, 230, 255, .6); border-color: var(--cian); transform: translateY(-6px); opacity: .4; }
  40% { opacity: 1; transform: none; }
  100% { box-shadow: 0 0 20px rgba(255, 79, 216, .14); }
}
.tarjeta.recien { animation: destello 1.4s ease-out; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; border: 1px solid var(--borde-fuerte);
  background: rgba(255, 255, 255, .03); padding: 10px 16px; cursor: pointer; font-weight: 600; text-decoration: none; color: var(--texto);
  transition: border-color .15s, box-shadow .15s, background .15s, filter .15s;
}
.btn:hover { border-color: var(--cian); box-shadow: 0 0 14px rgba(34, 230, 255, .2); }
.btn.prim {
  background: linear-gradient(135deg, #22e6ff, #4fb8ff); border-color: transparent; color: var(--acento-txt);
  font-family: var(--f-tit); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; box-shadow: var(--glow-cian);
}
.btn.prim:hover { filter: brightness(1.08); box-shadow: 0 0 0 1px rgba(34, 230, 255, .8), 0 0 22px rgba(34, 230, 255, .5); }
.btn.peligro { color: var(--peligro); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ancho { width: 100%; padding: 14px; }
.btn.peq { text-transform: none; letter-spacing: 0; padding: 6px 12px; font: 600 13px/1.2 var(--f-txt); }
.fab {
  position: fixed; right: max(18px, calc(var(--sa-r) + 12px), calc(50vw - 430px + 18px)); bottom: calc(20px + var(--sa-b)); z-index: 30;
  height: 56px; padding: 0 22px 0 18px; border-radius: 16px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--cian), var(--magenta)); color: #0a0412;
  font: 700 14px/1 var(--f-tit); letter-spacing: .12em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .15), 0 0 24px rgba(34, 230, 255, .35), 0 0 40px rgba(255, 79, 216, .25), var(--sombra);
  transition: transform .15s, box-shadow .15s;
}
.fab:hover { transform: translateY(-2px); }
.fab svg.i { width: 22px; height: 22px; stroke-width: 2.6; }

/* ---------- Formularios ---------- */
.campo { margin-bottom: 16px; }
.campo > label, .lbl {
  display: block; font: 600 11px/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--tenue); margin-bottom: 8px;
}
.entrada {
  width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--borde); background: var(--sup-solida); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.entrada::placeholder { color: var(--tenue); }
.entrada:focus { border-color: var(--cian); box-shadow: var(--glow-cian); }
textarea.entrada { min-height: 120px; resize: vertical; }
.segmento { display: flex; gap: 6px; flex-wrap: wrap; }
.adjuntar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.adjuntar label {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; border-radius: 12px; cursor: pointer;
  border: 1px dashed rgba(34, 230, 255, .4); background: rgba(34, 230, 255, .04); font-weight: 600; color: var(--suave);
  transition: border-color .15s, box-shadow .15s, color .15s;
}
.adjuntar label svg.i { color: var(--cian); }
.adjuntar label:hover { border-color: var(--cian); color: var(--texto); box-shadow: 0 0 16px rgba(34, 230, 255, .2); }
.seleccion { display: grid; gap: 6px; margin-top: 10px; grid-template-columns: minmax(0, 1fr); }
.sel-arch { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 10px; background: var(--sup); border: 1px solid var(--borde); }
.sel-arch img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.sel-arch .n { flex: 1; min-width: 0; }
.sel-arch .n div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.sel-arch .t { color: var(--tenue); font: 12px var(--f-mono); }
.progreso { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .06); overflow: hidden; margin-top: 12px; }
.progreso div { height: 100%; width: 0; background: linear-gradient(90deg, var(--cian), var(--magenta)); box-shadow: 0 0 10px var(--cian); transition: width .2s; }
.error { color: var(--peligro); font-size: 14px; min-height: 20px; margin: 4px 0 8px; }

/* ---------- Login ---------- */
.login {
  min-height: 100dvh; display: grid; place-items: center;
  padding: max(24px, var(--sa-t)) max(16px, var(--sa-r)) max(24px, var(--sa-b)) max(16px, var(--sa-l));
}
.login form {
  width: 100%; max-width: 380px; position: relative; padding: 32px 24px 26px; border-radius: 20px;
  background: linear-gradient(160deg, rgba(22, 30, 48, .85), rgba(8, 10, 18, .9));
  border: 1px solid rgba(34, 230, 255, .3);
  box-shadow: 0 0 0 1px rgba(255, 79, 216, .08), 0 0 50px rgba(34, 230, 255, .12), var(--sombra);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.login form::before { /* marcas de esquina tipo visor */
  content: ""; position: absolute; inset: -1px; border-radius: 20px; pointer-events: none;
  background:
    linear-gradient(var(--cian), var(--cian)) top left / 22px 2px no-repeat,
    linear-gradient(var(--cian), var(--cian)) top left / 2px 22px no-repeat,
    linear-gradient(var(--magenta), var(--magenta)) bottom right / 22px 2px no-repeat,
    linear-gradient(var(--magenta), var(--magenta)) bottom right / 2px 22px no-repeat;
}
.login .logo { width: 76px; height: 76px; border-radius: 20px; display: block; margin: 0 auto 18px; filter: drop-shadow(0 0 14px rgba(34, 230, 255, .45)); }
.login h1 {
  text-align: center; margin: 0 0 6px; font: 800 21px/1.25 var(--f-tit); letter-spacing: .14em; text-transform: uppercase;
  color: #f2fbff; text-shadow: 0 0 18px rgba(34, 230, 255, .45);
}
.login p.sub { text-align: center; color: var(--suave); margin: 0 0 26px; font: 12px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Detalle ---------- */
.det-cab { margin: 8px 0 14px; }
.det-cab h2 { margin: 8px 0 8px; font: 700 22px/1.25 var(--f-txt); letter-spacing: -.01em; word-break: break-word; }
.meta { color: var(--tenue); font: 12.5px/1.4 var(--f-mono); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cuerpo { white-space: pre-wrap; word-break: break-word; margin: 0 0 18px; color: #d7e2f5; line-height: 1.6; }
.controles { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.controles select { flex: 0 1 auto; }
.seccion {
  margin: 26px 0 12px; display: flex; align-items: center; gap: 8px;
  font: 700 12px/1 var(--f-tit); letter-spacing: .16em; text-transform: uppercase; color: var(--cian);
}
.seccion::before { content: "//"; color: var(--magenta); }
.seccion > label, .seccion > .btn.peq { margin-left: auto; }
.anadir-enlace { margin-top: 10px; }
.anadir-enlace > summary { list-style: none; display: inline-flex; }
.anadir-enlace > summary::-webkit-details-marker { display: none; }
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 8px; }
.galeria button { padding: 0; border: 1px solid var(--borde); background: var(--sup-solida); border-radius: 12px; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; transition: border-color .15s, box-shadow .15s; }
.galeria button:hover { border-color: var(--cian); box-shadow: 0 0 14px rgba(34, 230, 255, .25); }
.galeria img { width: 100%; height: 100%; object-fit: cover; display: block; }
.archivos { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.archivo { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--sup); border: 1px solid var(--borde); }
.archivo .ic {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: rgba(34, 230, 255, .06); border: 1px solid rgba(34, 230, 255, .35); color: var(--cian); font: 700 9.5px/1 var(--f-mono);
}
.archivo .n { flex: 1; min-width: 0; }
.archivo .n div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14.5px; }
.archivo .n small { color: var(--tenue); font: 12px var(--f-mono); }
.archivo.media { flex-wrap: wrap; }
.archivo.media .reproductor { flex-basis: 100%; }
.archivo audio, .archivo video { width: 100%; margin-top: 6px; }
.archivo video { max-height: 60vh; border-radius: 10px; background: #000; }
.borrar-fotos { margin-top: 8px; }
.borrar-fotos summary { cursor: pointer; }
.borrar-fotos .archivos { margin-top: 8px; }
.comentarios { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.com { display: flex; gap: 10px; }
.com .burbuja { background: var(--sup); border: 1px solid var(--borde); border-radius: 4px 14px 14px 14px; padding: 10px 12px; flex: 1; min-width: 0; }
.com .burbuja header { display: flex; gap: 8px; align-items: baseline; font-size: 13px; margin-bottom: 3px; }
.com .burbuja header b { font-size: 13.5px; }
.com .burbuja header time { color: var(--tenue); font: 11.5px var(--f-mono); }
.com .burbuja header button { margin-left: auto; border: 0; background: none; color: var(--tenue); cursor: pointer; font-size: 12px; }
.com .burbuja header button:hover { color: var(--peligro); }
.com .burbuja p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.redactar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: rgba(5, 6, 10, .88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--borde);
  padding: 10px max(16px, var(--sa-r)) calc(10px + var(--sa-b)) max(16px, var(--sa-l));
}
.redactar form { max-width: 828px; margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; }
.redactar textarea {
  flex: 1; min-height: 44px; max-height: 160px; resize: none; padding: 11px 12px; border-radius: 14px;
  border: 1px solid var(--borde); background: var(--sup-solida); outline: none;
}
.redactar textarea::placeholder { color: var(--tenue); }
.redactar textarea:focus { border-color: var(--cian); box-shadow: var(--glow-cian); }
.redactar .btn { height: 44px; width: 50px; padding: 0; }

/* ---------- Visor ---------- */
.visor { position: fixed; inset: 0; z-index: 50; background: rgba(2, 3, 6, .96); display: flex; flex-direction: column; }
.visor header { display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--sa-t)) max(10px, var(--sa-r)) 8px max(16px, var(--sa-l)); color: var(--texto); border-bottom: 1px solid var(--borde); }
.visor header span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 14px var(--f-mono); }
.visor .contenido { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 0 var(--sa-b); }
.visor img { max-width: 100%; max-height: 100%; object-fit: contain; }
.visor iframe { width: 100%; height: 100%; border: 0; background: #fff; }

/* ---------- Menú ---------- */
.menu-fondo { position: fixed; inset: 0; z-index: 40; }
.menu {
  position: fixed; z-index: 41; top: calc(58px + var(--sa-t)); right: max(12px, var(--sa-r), calc(50vw - 430px)); min-width: 250px;
  background: rgba(11, 16, 25, .96); border: 1px solid rgba(34, 230, 255, .35); border-radius: 14px; padding: 6px;
  box-shadow: 0 0 30px rgba(34, 230, 255, .15), var(--sombra); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 11px 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: left; }
.menu button svg.i { color: var(--cian); }
.menu button:hover { background: rgba(34, 230, 255, .08); }
.menu .quien { padding: 10px 12px 9px; color: var(--tenue); font: 12px var(--f-mono); border-bottom: 1px solid var(--borde); margin-bottom: 4px; }

/* ---------- iPhone ---------- */
.ios { margin: 0 0 16px; }
.ios p { margin: 8px 2px 0; color: var(--suave); font-size: 13.5px; }

/* ---------- Aviso flotante y arrastrar ---------- */
#aviso {
  position: fixed; left: 50%; bottom: calc(92px + var(--sa-b)); transform: translate(-50%, 20px); z-index: 60;
  background: rgba(11, 16, 25, .96); color: var(--texto); border: 1px solid var(--cian); box-shadow: var(--glow-cian);
  padding: 10px 16px; border-radius: 12px; font-size: 14.5px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px);
}
#aviso.ver { opacity: 1; transform: translate(-50%, 0); }
#soltar { position: fixed; inset: 0; z-index: 70; background: rgba(5, 6, 10, .82); display: grid; place-items: center; pointer-events: none; }
#soltar div {
  border: 2px dashed var(--cian); border-radius: 20px; padding: 40px 32px; background: var(--sup-solida); box-shadow: var(--glow-cian);
  font: 700 15px/1.4 var(--f-tit); letter-spacing: .08em; text-transform: uppercase; text-align: center; max-width: calc(100vw - 32px);
}

@media (min-width: 720px) {
  .contenedor { padding-top: 22px; }
  .tarjeta { padding: 18px 20px 14px; }
  .det-cab h2 { font-size: 27px; }
  .marca { font-size: 16px; }
}

/* ---------- Pestañas Muro / Clientes ---------- */
.barra.con-pestanas { flex-wrap: wrap; padding-bottom: 0; }
.pestanas { flex-basis: 100%; display: flex; gap: 4px; margin-top: 6px; }
.pestana {
  flex: 1; max-width: 200px; text-align: center; padding: 10px 8px 11px; text-decoration: none; color: var(--suave);
  font: 700 12px/1 var(--f-tit); letter-spacing: .14em; text-transform: uppercase; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.pestana:hover { color: var(--texto); }
.pestana[aria-current="page"] { color: var(--cian); border-bottom-color: var(--cian); box-shadow: 0 6px 12px -8px rgba(34, 230, 255, .8); }

/* ---------- Clientes ---------- */
.etq.cliente { color: var(--magenta); border-color: rgba(255, 79, 216, .5); background: rgba(255, 79, 216, .08); box-shadow: 0 0 10px rgba(255, 79, 216, .18); text-transform: none; letter-spacing: .02em; }
.etq.cli-estado::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: currentColor; box-shadow: 0 0 6px currentColor; }
.etq.cli-prospecto { color: var(--violeta); border-color: rgba(167, 123, 255, .5); background: rgba(167, 123, 255, .1); }
.etq.cli-demo_enviada { color: var(--ambar); border-color: rgba(255, 200, 74, .5); background: rgba(255, 200, 74, .08); }
.etq.cli-visita { color: var(--cian); border-color: rgba(34, 230, 255, .5); background: rgba(34, 230, 255, .08); }
.etq.cli-cliente { color: var(--verde); border-color: rgba(61, 255, 168, .5); background: rgba(61, 255, 168, .08); }
.etq.cli-perdido { color: #ff8da1; border-color: rgba(255, 92, 122, .45); background: rgba(255, 92, 122, .08); }

.tarjeta-cli { display: flex; gap: 14px; align-items: flex-start; }
.tarjeta-cli .cli-cuerpo { flex: 1; min-width: 0; }
.tarjeta-cli h3 { padding-right: 0; }
.logo-cli {
  width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex: none; background: #fff;
  border: 1px solid var(--borde-fuerte); box-shadow: 0 0 14px rgba(34, 230, 255, .15);
}
.logo-cli.sin {
  display: grid; place-items: center; background: rgba(34, 230, 255, .06); color: var(--cian);
  font: 800 18px/1 var(--f-tit); letter-spacing: .06em;
}
.logo-cli.grande { width: 84px; height: 84px; border-radius: 18px; }
.logo-cli.grande.sin { font-size: 26px; }
.ficha-cab { display: flex; gap: 16px; align-items: center; margin: 10px 0 16px; }
.ficha-cab h2 { margin: 0 0 8px; font: 700 24px/1.2 var(--f-txt); word-break: break-word; }
.datos-cli {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 18px; padding: 14px 16px;
  border: 1px solid var(--borde); border-radius: var(--r); background: var(--sup); margin-bottom: 14px;
}
.dato .lbl { margin-bottom: 4px; }
.dato div { word-break: break-word; }
.notas-cli { margin: 6px 0 4px; }
.notas-cli .cuerpo { margin-top: 2px; }
.enlaces { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.enlace {
  display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border-radius: 12px;
  border: 1px solid rgba(34, 230, 255, .35); background: rgba(34, 230, 255, .05); transition: box-shadow .15s, border-color .15s;
}
.enlace:hover { border-color: var(--cian); box-shadow: 0 0 16px rgba(34, 230, 255, .2); }
.enlace a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px 8px; text-decoration: none; color: var(--texto); }
.enlace a svg.i { color: var(--cian); }
.enlace a span { min-width: 0; display: flex; flex-direction: column; }
.enlace a b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.enlace a small { color: var(--tenue); font: 12px var(--f-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-enlace { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
@media (min-width: 720px) { .form-enlace { grid-template-columns: 1fr 1.4fr auto; } }
.mini-boton { padding: 0; border: 1px solid var(--borde); border-radius: 10px; overflow: hidden; width: 40px; height: 40px; flex: none; cursor: zoom-in; background: var(--sup-solida); }
.mini-boton img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fila-logo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.logo-previo { display: flex; align-items: center; gap: 10px; }
.controles select.entrada, .campo select.entrada { padding: 11px 12px; }

/* En pantallas táctiles, campos a 16 px: iOS hace zoom al enfocar si la letra es menor. */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
