/* ───────────────────────────────────────────────────────────
   PROWIK HOSTING · base compartida (web pública y paneles)
   Tipos: Unbounded (titulares), Geist (texto), Geist Mono (datos técnicos)
   ─────────────────────────────────────────────────────────── */
@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --void: #050806;        /* fondo */
  --chassis: #0b110d;     /* superficies */
  --panel: #101914;       /* superficies elevadas */
  --rail: #1a2a20;        /* bordes neutros */
  --reactor: #39ff14;     /* verde radiactivo: energía, foco */
  --phosphor: #00ff66;    /* verde luminoso: interacción */
  --ice: #f5fff7;         /* texto principal */
  --mist: #9db3a3;        /* texto secundario (contraste AA sobre --void) */
  --amber: #ffb347;       /* simulado / demo */
  --alert: #ff5c7a;
  --glow: 0 0 0 1px rgba(57,255,20,.55), 0 0 28px rgba(57,255,20,.28);
  --line: rgba(57,255,20,.16);
  --radius-s: 6px;
  --radius-m: 12px;
  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--void);
  color: var(--ice);
  font: 400 1.0625rem/1.6 var(--font-body);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--phosphor); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--reactor); }
::selection { background: var(--reactor); color: var(--void); }

:focus-visible { outline: 2px solid var(--reactor); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--reactor); color: var(--void); padding: .6rem 1rem; font-weight: 600; }
.skip:focus { left: 1rem; top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.04; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; }
h2 { font-weight: 600; font-size: clamp(1.7rem, 3.1vw, 2.65rem); }
h3 { font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; line-height: 1.2; }
p { margin: 0 0 1em; max-width: 68ch; text-wrap: pretty; }
.lead { font-size: 1.2rem; color: var(--mist); max-width: 54ch; }
.muted { color: var(--mist); }
.mono { font-family: var(--font-mono); font-feature-settings: "zero"; }
small, .small { font-size: .875rem; }

/* Botones */
.btn {
  --b: var(--reactor);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 46px; padding: .7rem 1.35rem;
  border: 1px solid var(--b); border-radius: 999px;
  background: var(--b); color: var(--void);
  font: 600 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), background-color .2s;
  will-change: transform;
}
.btn:hover { color: var(--void); background: var(--phosphor); box-shadow: 0 0 32px rgba(0,255,102,.35); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ice); border-color: var(--rail); }
.btn.ghost:hover { border-color: var(--reactor); color: var(--reactor); box-shadow: none; }
.btn.small { min-height: 36px; padding: .45rem .95rem; font-size: .9rem; }
.btn.danger { --b: var(--alert); }
.btn[disabled], .btn.is-busy { opacity: .55; pointer-events: none; }

/* Formularios */
label { display: block; font-size: .9rem; font-weight: 500; margin: 0 0 .35rem; color: var(--ice); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: .65rem .85rem;
  background: var(--chassis); color: var(--ice);
  border: 1px solid var(--rail); border-radius: var(--radius-s);
  font: 400 1rem/1.4 var(--font-body);
  transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--reactor); box-shadow: 0 0 0 3px rgba(57,255,20,.18); }
input::placeholder, textarea::placeholder { color: #6f8576; }
.field { margin-bottom: 1rem; }
.field-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; color: var(--mist); }
.check input { width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--reactor); flex: none; }
.hint { font-size: .85rem; color: var(--mist); margin-top: .3rem; }

/* Avisos */
.flash { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .5rem; }
.flash li { padding: .85rem 1rem; border-radius: var(--radius-s); border: 1px solid; background: var(--chassis); font-size: .95rem; }
.flash .ok { border-color: rgba(57,255,20,.45); }
.flash .error { border-color: var(--alert); color: #ffd0d9; }
.flash .info { border-color: rgba(255,179,71,.5); color: #ffe3bf; }

/* Estado */
.pill { display: inline-flex; align-items: center; gap: .4em; padding: .2rem .6rem; border-radius: 999px; font: 500 .78rem/1.3 var(--font-mono); white-space: nowrap; border: 1px solid; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--reactor); border-color: rgba(57,255,20,.35); background: rgba(57,255,20,.06); }
.pill.wait { color: var(--amber); border-color: rgba(255,179,71,.35); background: rgba(255,179,71,.06); }
.pill.bad { color: var(--alert); border-color: rgba(255,92,122,.4); background: rgba(255,92,122,.07); }
.pill.off { color: var(--mist); border-color: var(--rail); }
.sim { display: inline-block; padding: .1rem .45rem; border-radius: 4px; background: rgba(255,179,71,.12); color: var(--amber); font: 500 .72rem/1.4 var(--font-mono); border: 1px dashed rgba(255,179,71,.5); }

/* Barra de modo demo */
.modebar { position: relative; z-index: 60; background: repeating-linear-gradient(-45deg, #1c1407 0 14px, #231909 14px 28px); color: #ffd9a6; border-bottom: 1px solid rgba(255,179,71,.35); font-size: .86rem; }
.modebar .wrap { display: flex; gap: .75rem; align-items: center; padding: .5rem 0; flex-wrap: wrap; }
.modebar strong { color: var(--amber); font-family: var(--font-mono); font-weight: 500; }
.modebar.sandbox { background: #0b1220; color: #cfe0ff; border-color: #2c4a80; }
.modebar.sandbox strong { color: #8fb6ff; }

.wrap { width: min(1200px, 100% - 2rem); margin-inline: auto; }

/* Tablas */
.table-wrap { overflow-x: auto; border: 1px solid var(--rail); border-radius: var(--radius-m); background: var(--chassis); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { padding: .75rem .9rem; text-align: left; border-bottom: 1px solid var(--rail); vertical-align: top; }
th { font-weight: 500; color: var(--mist); font-size: .82rem; background: rgba(255,255,255,.015); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
tbody tr:hover { background: rgba(57,255,20,.025); }
.empty { padding: 2rem; text-align: center; color: var(--mist); }

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