/* ANTHRES Live · panel. Estilo claro de crypto.anthres.pro (docs/marca.md). */

@font-face { font-family: Archivo; font-weight: 400; font-display: swap; src: url(/marca/fuentes/Archivo-400-latin.woff2) format('woff2'); }
@font-face { font-family: Archivo; font-weight: 500; font-display: swap; src: url(/marca/fuentes/Archivo-500-latin.woff2) format('woff2'); }
@font-face { font-family: Archivo; font-weight: 600; font-display: swap; src: url(/marca/fuentes/Archivo-600-latin.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url(/marca/fuentes/JetBrainsMono-500-latin.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 700; font-display: swap; src: url(/marca/fuentes/JetBrainsMono-700-latin.woff2) format('woff2'); }
@font-face { font-family: Spectral; font-weight: 300; font-display: swap; src: url(/marca/fuentes/Spectral-300-latin.woff2) format('woff2'); }

:root {
  --papel: #F4F2ED; --papel2: #ECE9E1; --blanco: #FFFFFF; --tinta: #1F201B;
  --gris: #6B6A62; --gris2: #9A988E; --linea: #E3DFD5;
  --verde: #1B5E43; --verde-v: #23A06B; --verde2: #E3F1E8; --menta: #CDEBDB;
  --oxido: #C2492D; --oxido2: #FBE6DF; --ambar: #A87510; --ambar2: #F7EDD5;
  --sombra-1: 0 1px 2px rgba(31,32,27,.06), 0 2px 8px -2px rgba(31,32,27,.08);
  --sombra-2: 0 2px 4px rgba(31,32,27,.06), 0 16px 32px -14px rgba(31,32,27,.22);
  --sombra-boton: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 16px -6px rgba(27,94,67,.55);
  --radio: 14px; --suave: cubic-bezier(.2,.8,.2,1);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--tinta); font: 16px/1.55 Archivo, system-ui, sans-serif;
  background: radial-gradient(1200px 500px at 85% -10%, #E3F1E8 0, transparent 60%),
              radial-gradient(900px 420px at -10% 10%, #ECEBFB 0, transparent 55%), var(--papel);
  background-attachment: fixed; min-height: 100vh;
}
.mono { font-family: var(--mono); }
a { color: var(--verde); }
[hidden] { display: none !important; }

/* --- cabecera --- */
header {
  position: sticky; top: 0; z-index: 20; background: rgba(244,242,237,.82);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(217,213,202,.7);
}
.barra { max-width: 960px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.marca { font: 700 14px/1 var(--mono); letter-spacing: .12em; color: var(--tinta); text-decoration: none;
  display: flex; align-items: center; gap: 10px; }
.marca img { width: 30px; height: 30px; }
.marca small { display: block; font-weight: 500; font-size: 9.5px; letter-spacing: .2em; color: var(--gris); margin-top: 5px; }
.esp { flex: 1; }
nav.pest { max-width: 960px; margin: 0 auto; padding: 0 10px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
nav.pest::-webkit-scrollbar { display: none; }
nav.pest a { padding: 10px 14px 12px; font: 500 14px Archivo, sans-serif; color: var(--gris); text-decoration: none;
  white-space: nowrap; border-bottom: 2px solid transparent; transition: color .2s; }
nav.pest a[aria-current=page] { color: var(--verde); border-bottom-color: var(--verde); }

main { max-width: 960px; margin: 0 auto; padding: 18px 16px 60px; }
section.vista { display: none; }
section.vista.activa { display: block; }

/* --- tarjetas --- */
.tarjeta { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio);
  box-shadow: var(--sombra-1); padding: 18px; margin-bottom: 14px; }
.tarjeta h2 { font: 600 15px Archivo, sans-serif; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.et { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gris); }
.rejilla { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* --- héroe (estado del directo) --- */
.heroe { position: relative; overflow: hidden; border-radius: 20px; padding: 24px 22px 22px; margin-bottom: 14px;
  color: #fff; background: linear-gradient(135deg, #15513A 0%, #1B5E43 45%, #23845C 100%);
  box-shadow: 0 24px 50px -24px rgba(27,94,67,.7); }
.heroe.apagado { background: linear-gradient(135deg, #3A3B35 0%, #4A4B44 60%, #5A5B53 100%);
  box-shadow: 0 24px 50px -24px rgba(31,32,27,.6); }
.heroe:before { content: ""; position: absolute; width: 300px; height: 300px; right: -90px; top: -150px;
  border-radius: 50%; background: #fff; opacity: .12; }
.heroe .et { color: rgba(255,255,255,.75); }
.heroe .valor { margin: 6px 0 2px; font: 300 clamp(40px, 9vw, 60px)/1.05 Spectral, serif; }
.heroe .detalle { font-size: 14.5px; opacity: .9; margin: 4px 0 18px; }
.vivo { display: inline-flex; align-items: center; gap: 8px; font: 700 12px var(--mono); letter-spacing: .12em; }
.vivo i { width: 9px; height: 9px; border-radius: 50%; background: #7CF0B5;
  box-shadow: 0 0 0 0 rgba(124,240,181,.7); animation: pulso 1.8s infinite; }
.apagado .vivo i { background: #C9C7BE; animation: none; }
@keyframes pulso { 70% { box-shadow: 0 0 0 9px rgba(124,240,181,0); } 100% { box-shadow: 0 0 0 0 rgba(124,240,181,0); } }

/* --- botones --- */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  font: 600 15px Archivo, sans-serif; padding: 13px 20px; border-radius: 999px; text-decoration: none;
  background: var(--verde); color: #fff; box-shadow: var(--sombra-boton); transition: transform .2s var(--suave), opacity .2s; }
.boton:hover { transform: translateY(-1px); }
.boton:active { transform: translateY(0); }
.boton:disabled { opacity: .55; cursor: default; transform: none; }
.boton.grande { width: 100%; padding: 17px 22px; font-size: 17px; }
.boton.blanco { background: #fff; color: var(--verde); box-shadow: 0 10px 24px -10px rgba(0,0,0,.45); }
.boton.claro { background: var(--blanco); color: var(--tinta); border: 1.5px solid var(--linea); box-shadow: var(--sombra-1); }
.boton.peligro { background: var(--oxido); box-shadow: 0 6px 16px -6px rgba(194,73,45,.55); }
.boton.chico { padding: 8px 14px; font-size: 13.5px; }
.botones { display: flex; gap: 10px; flex-wrap: wrap; }

/* --- vista previa --- */
.previa { position: relative; border-radius: 12px; overflow: hidden; background: var(--papel2);
  aspect-ratio: 16 / 9; box-shadow: inset 0 0 0 1px var(--linea); }
.previa img, .previa video { width: 100%; height: 100%; object-fit: contain; display: block; }
.previa .sin-previa { position: absolute; inset: 0; margin: 0; display: grid; place-items: center;
  color: var(--gris2); font-size: 14px; }
.previa .sello { position: absolute; left: 10px; top: 10px; background: rgba(255,255,255,.9);
  border-radius: 999px; padding: 4px 10px; font: 500 11px var(--mono); color: var(--gris); box-shadow: var(--sombra-1); }

/* --- estado (lista) --- */
.lista { list-style: none; padding: 0; margin: 0; }
.lista li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid var(--linea); font-size: 14.5px; }
.lista li:last-child { border-bottom: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font: 600 12px var(--mono); white-space: nowrap; }
.chip.ok { background: var(--verde2); color: var(--verde); }
.chip.mal { background: var(--oxido2); color: var(--oxido); }
.chip.aviso { background: var(--ambar2); color: var(--ambar); }
.chip.neutro { background: var(--papel2); color: var(--gris); }

/* --- formularios --- */
label { display: block; font-size: 13.5px; color: var(--gris); margin: 0 0 6px; }
input[type=text], input[type=password], input[type=number], input[type=datetime-local], input[inputmode=numeric] {
  width: 100%; font: 16px Archivo, sans-serif; color: var(--tinta); background: #fff;
  border: 1.5px solid var(--linea); border-radius: 12px; padding: 12px 14px; outline: none;
  transition: border-color .2s, box-shadow .2s; }
input:focus { border-color: var(--verde-v); box-shadow: 0 0 0 4px rgba(35,160,107,.15); }
.campo { margin-bottom: 12px; }
.fila { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.fila > .campo { flex: 1; min-width: 140px; }

/* --- sesiones --- */
.sesion { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 12px 0; border-bottom: 1px solid var(--linea); }
.sesion:last-child { border-bottom: 0; }
.sesion .t { font-weight: 600; }
.sesion .m { font-size: 13px; color: var(--gris); }
.vacio { color: var(--gris); font-size: 14.5px; padding: 6px 0; }

/* --- aviso flotante --- */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--tinta); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14.5px;
  box-shadow: var(--sombra-2); transition: all .3s var(--suave); z-index: 50; max-width: calc(100% - 32px); }
.toast.ver { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --- entrar --- */
.entrar { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.entrar .tarjeta { width: 100%; max-width: 380px; padding: 28px 24px; box-shadow: var(--sombra-2); }
.entrar .logo { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center;
  background: var(--papel); box-shadow: var(--sombra-1); }
.entrar .logo img { width: 56px; height: 56px; }
.entrar h1 { text-align: center; font: 700 16px var(--mono); letter-spacing: .14em; margin: 0 0 4px; }
.entrar p.sub { text-align: center; color: var(--gris); font-size: 14px; margin: 0 0 20px; }
.error { color: var(--oxido); font-size: 14px; min-height: 20px; margin: 4px 0 10px; }

/* --- pantalla remota --- */
.pantalla-remota { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--papel); }
.pantalla-remota .barra { max-width: none; }
#vnc { flex: 1; min-height: 0; background: #1F201B; }

.centro { text-align: center; }
#qr svg { width: 100%; height: auto; display: block; border-radius: 12px; box-shadow: var(--sombra-2); }
details summary { cursor: pointer; }
