@font-face { font-family: "IBM Plex Sans"; src: url(fonts/plex-sans-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(fonts/plex-sans-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(fonts/plex-sans-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url(fonts/montserrat-300.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url(fonts/montserrat-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url(fonts/montserrat-700.woff2) format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url(fonts/montserrat-900.woff2) format("woff2"); font-weight: 800 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/plex-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
:root {
  --ink: #0B1220;
  --ink-2: #24303F;
  --muted: #4A5260;
  --faint: #7A828C;
  --pine: #0074D9;
  --pine-2: #005FB3;
  --pine-soft: #E3EFFB;
  --mist: #EEF2F6;
  --paper: #FFFFFF;
  --line: #D5DCE4;
  --line-2: #E6EBF1;
  --ok: #1E7A4F;   --ok-bg: #E4F2EA;
  --warn: #9A6B05; --warn-bg: #FBF0D8;
  --bad: #B23A26;  --bad-bg: #FBE7E2;
  --run: #2C5A7A;  --run-bg: #E3EDF4;
  --idle: #A9B5B1; --idle-bg: #EEF1F5;
  --radius: 10px;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --brand: "Montserrat", "IBM Plex Sans", system-ui, sans-serif;
  --brand-black: #060201;
  --brand-graphite: #313840;
  --link: #005FB3;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--mist); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; border-radius: 4px; }
h1 { font-family: var(--brand); font-size: 26px; line-height: 1.2; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
h2 { font-family: var(--brand); font-size: 18px; font-weight: 700; margin: 0 0 14px; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
p { margin: 0 0 12px; }
code, .mono { font-family: var(--mono); font-size: 13px; }

/* ---------- estructura ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--brand-black) 236px, transparent 236px); }
.side { background: var(--brand-black); color: #C5CCD6; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px;
        position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; color: #fff; font-weight: 600; font-size: 16px; }
.brand svg { flex: none; }
.nav a { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 8px;
         color: #C9D4D0; font-size: 14.5px; }
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav a.on { background: rgba(255,255,255,.1); color: #fff; }
.nav .count { background: var(--bad); color: #fff; font-size: 12px; border-radius: 999px; padding: 0 7px; line-height: 20px; }
.side-foot { margin-top: auto; font-size: 13px; color: #8A9099; padding: 10px 12px; border-top: 1px solid rgba(255,255,255,.08); }
.side-foot form { margin-top: 6px; }
.side-foot button { background: none; border: 0; color: #C9D4D0; padding: 0; font: inherit; cursor: pointer; }
.side-foot button:hover { color: #fff; text-decoration: underline; }
.main { padding: 30px 38px 60px; max-width: 1240px; width: 100%; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.head .sub { color: var(--muted); margin-top: 6px; }
.crumb { font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }

/* ---------- superficies ---------- */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.panel.flush { padding: 0; overflow-x: auto; }
.panel.flush > h2 { padding: 18px 22px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }

/* ---------- cifras ---------- */
.figures { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius);
           background: var(--paper); margin-bottom: 20px; }
.figure { padding: 18px 22px; border-left: 1px solid var(--line-2); }
.figure:first-child { border-left: 0; }
.figure .n { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.figure .l { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.figure .n small { font-size: 15px; color: var(--muted); font-weight: 500; }

/* ---------- franja de vigilancia ---------- */
.watch { display: flex; gap: 3px; align-items: flex-end; height: 26px; }
.watch i { display: block; width: 7px; border-radius: 2px; height: 100%; background: var(--idle-bg); }
.watch i.exito { background: var(--ok); }
.watch i.advertencia { background: #D9A21B; }
.watch i.fallo, .watch i.no_ejecutado { background: var(--bad); }
.watch i.vacio { height: 40%; background: var(--line); }
.watch-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.watch-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px;
                             vertical-align: 0; background: var(--line); }
.watch-legend .l-ok::before { background: var(--ok); }
.watch-legend .l-warn::before { background: #D9A21B; }
.watch-legend .l-bad::before { background: var(--bad); }

/* ---------- tabla de equipos ---------- */
.hosts { width: 100%; border-collapse: collapse; }
.hosts th { text-align: left; font-size: 13px; font-weight: 500; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.hosts td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.hosts tr:last-child td { border-bottom: 0; }
.hosts tr.row:hover td { background: #F7FAF9; }
.hosts .name { font-weight: 600; }
.hosts .meta { color: var(--muted); font-size: 13px; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 13px; font-weight: 500; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); }
table.list td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); font-size: 14.5px; vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- estados ---------- */
.state { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.state::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--idle); flex: none; }
.state.exito::before { background: var(--ok); }
.state.advertencia::before { background: #D9A21B; }
.state.fallo::before, .state.no_ejecutado::before { background: var(--bad); }
.state.ejecutando::before, .state.enviado::before { background: var(--run); animation: pulse 1.4s ease-in-out infinite; }
.state.pendiente::before { background: var(--run); opacity: .45; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .state::before { animation: none !important; } .btn { transition: none; } .btn:active { transform: none; } }
.tag { display: inline-block; font-size: 12.5px; padding: 1px 9px; border-radius: 999px; background: var(--idle-bg); color: var(--ink-2); }
.tag.exito { background: var(--ok-bg); color: var(--ok); }
.tag.advertencia { background: var(--warn-bg); color: var(--warn); }
.tag.fallo, .tag.no_ejecutado { background: var(--bad-bg); color: var(--bad); }
.tag.ejecutando, .tag.enviado, .tag.pendiente { background: var(--run-bg); color: var(--run); }

/* ---------- veredicto ---------- */
.verdict { border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px; border: 1px solid var(--line); background: var(--paper);
           border-left: 5px solid var(--idle); }
.verdict.exito { border-left-color: var(--ok); }
.verdict.advertencia { border-left-color: #D9A21B; }
.verdict.fallo, .verdict.no_ejecutado { border-left-color: var(--bad); }
.verdict.ejecutando, .verdict.enviado, .verdict.pendiente { border-left-color: var(--run); }
.verdict h2 { font-size: 20px; margin-bottom: 8px; }
.verdict .what { font-size: 15.5px; max-width: 75ch; }
.verdict .todo { margin-top: 14px; background: var(--mist); border-radius: 8px; padding: 12px 14px; max-width: 75ch; }
.verdict .todo b { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }

/* ---------- alertas atención ---------- */
.attention { border: 1px solid #EFC9C0; background: #FFF8F6; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; }
.attention h3 { color: var(--bad); }
.attention ul { margin: 0; padding-left: 18px; }
.attention li { margin: 3px 0; }

/* ---------- formularios ---------- */
label { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink-2); margin: 0 0 5px; }
.field { margin-bottom: 14px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=password], input[type=email], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 14.5px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink);
}
textarea { min-height: 84px; font-family: var(--mono); font-size: 13px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--pine); outline: 2px solid var(--pine-soft); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.row5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 14.5px; margin: 6px 0; }
.check input { width: 16px; height: 16px; accent-color: var(--pine); }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { margin: 0; }
.days input { position: absolute; opacity: 0; pointer-events: none; }
.days span { display: inline-block; padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px;
             cursor: pointer; font-weight: 500; color: var(--muted); }
.days input:checked + span { background: var(--pine); border-color: var(--pine); color: #fff; }
.days input:focus-visible + span { outline: 2px solid var(--pine); outline-offset: 2px; }
fieldset { border: 0; padding: 0; margin: 0 0 6px; }
legend { font-size: 13.5px; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.sep { border: 0; border-top: 1px solid var(--line-2); margin: 18px 0; }

.btn { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 14px; font-weight: 500; padding: 9px 16px;
       border-radius: 8px; border: 1px solid var(--pine); background: var(--pine); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--pine-2); text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn { transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), background-color 160ms cubic-bezier(0.23, 1, 0.32, 1); }
.btn.ghost { background: #fff; color: var(--pine); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--pine); background: #fff; }
.btn.danger { background: #fff; color: var(--bad); border-color: #EFC9C0; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.small { padding: 6px 12px; font-size: 13.5px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* ---------- mensajes ---------- */
.flash { padding: 11px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14.5px; background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--bad-bg); color: var(--bad); }
.empty { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 17px; }

/* ---------- comandos ---------- */
.cmd { position: relative; background: var(--ink); color: #DDE7E3; border-radius: 8px; padding: 13px 92px 13px 14px;
       font-family: var(--mono); font-size: 12.5px; line-height: 1.6; word-break: break-all; margin: 6px 0 14px; }
.cmd button { position: absolute; top: 9px; right: 9px; background: rgba(255,255,255,.12); color: #fff; border: 0;
              border-radius: 6px; padding: 5px 10px; font: inherit; font-family: var(--sans); font-size: 12.5px; cursor: pointer; }
.cmd button:hover { background: rgba(255,255,255,.2); }
pre.log { background: #F5F7F6; border: 1px solid var(--line-2); border-radius: 8px; padding: 12px 14px; font-family: var(--mono);
          font-size: 12.5px; white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; margin: 8px 0 0; }

/* ---------- definiciones ---------- */
dl.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 0; font-size: 14.5px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; word-break: break-word; }

/* ---------- políticas ---------- */
.policy { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.policy-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.policy .paths { font-family: var(--mono); font-size: 13px; color: var(--ink-2); margin: 6px 0; }
.policy .facts { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
details.editor > summary { cursor: pointer; color: var(--pine); font-weight: 500; font-size: 14px; list-style: none; margin-top: 10px; }
details.editor > summary::-webkit-details-marker { display: none; }
details.editor[open] > summary { margin-bottom: 14px; }
.finding { padding: 12px 14px; border-radius: 8px; margin-top: 10px; font-size: 14.5px; }
.finding.fallo { background: var(--bad-bg); }
.finding.advertencia { background: var(--warn-bg); }
.finding b { display: block; margin-bottom: 2px; }

/* ---------- eventos ---------- */
.events { list-style: none; margin: 0; padding: 0; }
.events li { padding: 12px 0; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.events li:last-child { border-bottom: 0; }
.events .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; background: var(--idle); }
.events .dot.exito { background: var(--ok); } .events .dot.advertencia { background: #D9A21B; }
.events .dot.fallo { background: var(--bad); } .events .dot.info { background: var(--run); }
.events .t { font-weight: 500; }
.events .m { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.events .when { color: var(--faint); font-size: 12.5px; margin-top: 3px; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: var(--ink); color: #DDE7E3; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art .claim { font-size: 34px; line-height: 1.15; color: #fff; font-weight: 600; max-width: 14ch; letter-spacing: -0.01em; }
.login-art .watch { height: 56px; gap: 6px; }
.login-art .watch i { width: 14px; border-radius: 3px; }
.login-art .watch i.vacio { background: rgba(255,255,255,.12); }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-form form { width: 100%; max-width: 340px; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px; }
  .brand { padding: 4px 8px; }
  .nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .shell { background: none; }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0 8px; display: flex; gap: 10px; align-items: center; }
  .side-foot form { margin: 0; }
  .side-foot .who { display: none; }
  .hide-sm { display: none; }
  .main { padding: 22px 16px 50px; }
  .grid2, .grid-side, .row2, .row3 { grid-template-columns: 1fr; }
  .row5 { grid-template-columns: repeat(3, 1fr); }
  .figures { grid-template-columns: 1fr 1fr; }
  .figure:nth-child(3) { border-left: 0; }
  .figure { border-top: 1px solid var(--line-2); padding: 14px 16px; }
  .figure .n { font-size: 24px; }
  .hosts .hide-sm { display: none; }
  .btn, .nav a, select, input[type=text], input[type=password], input[type=number] { min-height: 44px; }
  .days span { padding: 11px 13px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { padding: 32px; }
  dl.kv { grid-template-columns: 1fr; gap: 2px; }
  dl.kv dd { margin-bottom: 8px; }
}

/* ---------- v1.1: clientes ---------- */
.client-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.client-head h2 a { color: var(--ink); }
.client-head .meta { color: var(--muted); font-size: 13px; }
.client-score { display: flex; gap: 14px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 20px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: block; color: var(--ink); }
a.card:hover { border-color: var(--pine); text-decoration: none; }
.card h3 { font-size: 16px; margin-bottom: 6px; }
.card .meta { color: var(--muted); font-size: 13.5px; }
.card .state { margin-top: 10px; }
.dest { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.dest .where { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); word-break: break-all; margin: 4px 0 6px; }
.secret-box { background: var(--warn-bg); border-radius: 8px; padding: 12px 14px; margin-top: 10px; }
.secret-box code { font-size: 15px; user-select: all; word-break: break-all; }
[hidden] { display: none !important; }
.lockup { display: flex; flex-direction: column; line-height: 1.15; }
.lockup small { font-size: 11.5px; font-weight: 400; color: #8FA19B; margin-top: 2px; letter-spacing: 0.01em; }

/* ---------- marca Sentinel · familia Zero One ---------- */
.brand svg { width: 34px; height: 34px; flex: none; }
.wordmark { display: flex; flex-direction: column; line-height: 1.05; font-family: var(--brand); }
.wordmark .name { font-size: 21px; color: #FFFFFF; letter-spacing: -0.005em; }
.wordmark .name .lt { font-weight: 300; }
.wordmark .name .bk { font-weight: 900; color: #4DA3F0; }
.wordmark small { font-size: 11px; font-weight: 500; color: #8A9099; margin-top: 3px; letter-spacing: 0.02em; }
.made-by { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: #8A9099; }
.made-by img { width: 118px; height: auto; display: block; }
.side-foot .made-by { margin-bottom: 12px; }
.nav a.on { background: rgba(0,116,217,.22); }
.btn { font-family: var(--brand); font-weight: 600; }
.figure .n { font-family: var(--brand); }
.login-art { background: var(--brand-black); }

/* ---------- reportes ---------- */
.report-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 3px solid var(--pine); }
.report-brand { display: flex; align-items: center; gap: 12px; }
.report-brand svg { width: 46px; height: 46px; }
.wordmark.dark .name { color: var(--brand-black); font-size: 26px; }
.wordmark.dark .name .bk { color: var(--pine); }
.wordmark.dark small { color: var(--muted); }
.report-meta { text-align: right; }
.report-meta .sub { color: var(--muted); margin-top: 4px; }
.chart-panel svg { margin-top: 6px; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }
.chart-panel details { margin-top: 10px; }
.chart-panel summary { cursor: pointer; color: var(--link); font-size: 14px; }
.report-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; color: var(--muted); font-size: 12.5px; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.report-foot .made-by { color: var(--muted); align-items: flex-end; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 12px; }
  .shell { display: block; background: none; }
  .side, .no-print, .flash { display: none !important; }
  .main { padding: 0; max-width: none; }
  .panel, .figures { break-inside: avoid; box-shadow: none; }
  .grid2 { grid-template-columns: 1fr 1fr; }
}
