@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --bg: #050407;
  --bg-2: #0b080d;
  --card: rgba(18, 13, 18, .78);
  --card-2: rgba(28, 20, 27, .9);
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --text: #f4f2f6;
  --muted: #8f8797;
  --red: #ff2340;
  --red-d: #a1001a;
  --rose: #ff6b81;
  --sky: #5cc8ff;
  --sky-d: #1e8fd6;
  --amber: #ffb547;
  --ok: #3ddc97;
  --grad: linear-gradient(135deg, #ff2340 0%, #a1001a 55%, #2a0008 100%);
  --grad-soft: linear-gradient(160deg, rgba(255,35,64,.22), rgba(161,0,26,.08) 45%, transparent 75%);
  --radius: 18px;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html { color-scheme: dark; scrollbar-width: none; }
html::-webkit-scrollbar, *::-webkit-scrollbar { width: 0; height: 0; }
* { scrollbar-width: none; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 14.5px/1.5 var(--body); -webkit-font-smoothing: antialiased; display: flex; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { flex: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: .92em; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.block { display: block; }
.r { text-align: right; justify-content: flex-end; }
.ok { color: var(--ok) !important; } .red { color: var(--rose) !important; } .amber { color: var(--amber) !important; }
::selection { background: rgba(92,200,255,.35); }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 8px; }

.bg-glow { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 0% 0%, rgba(255,35,64,.20), transparent 70%),
    radial-gradient(40% 40% at 100% 0%, rgba(161,0,26,.16), transparent 70%),
    radial-gradient(35% 35% at 85% 100%, rgba(92,200,255,.07), transparent 70%),
    linear-gradient(180deg, #0a0609 0%, #050407 60%); }

/* ---------- Logo ---------- */
.logo { display: flex; align-items: center; gap: 11px; font: 700 16px var(--display); letter-spacing: .08em; }
.logo b { background: linear-gradient(90deg, var(--red), var(--rose)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 18px; letter-spacing: 0; position: relative; box-shadow: 0 10px 26px -10px rgba(255,35,64,.9), inset 0 1px 0 rgba(255,255,255,.2); }
.logo-mark::after { content: ""; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 10px var(--sky); }
.logo.big { justify-content: center; font-size: 20px; }
.logo.big .logo-mark { width: 46px; height: 46px; border-radius: 14px; font-size: 22px; }

/* ---------- Barra lateral ---------- */
.sidebar { position: sticky; top: 0; height: 100vh; width: 250px; flex: none; display: flex; flex-direction: column; gap: 26px; padding: 24px 16px; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(40,4,12,.55), rgba(8,5,9,.85) 40%); backdrop-filter: blur(16px); }
.sidebar .logo { padding: 0 8px; }
.nav { display: grid; gap: 4px; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 12px; color: #a59dab; font-weight: 600; transition: background .15s, color .15s; }
.nav a svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav a.active { color: #fff; background: linear-gradient(90deg, rgba(255,35,64,.22), rgba(255,35,64,.04)); box-shadow: inset 0 0 0 1px rgba(255,35,64,.25); }
.nav a.active::before { content: ""; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); box-shadow: 0 0 12px var(--red); }
.nav a.active svg { color: var(--sky); }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: var(--red); color: #fff; font: 700 11px var(--body); font-style: normal; }
.nav-badge.blue { background: var(--sky); color: #04131d; }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.host-card { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.host-card b { display: block; font-size: 13.5px; }
.host-card small { color: var(--muted); font-size: 12px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(61,220,151,.6); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(61,220,151,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,151,0); } }

/* ---------- Principal ---------- */
.main { flex: 1; min-width: 0; padding: 26px 34px 60px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.kicker { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--sky); }
.topbar h1 { margin: 4px 0 0; font: 700 34px/1.1 var(--display); letter-spacing: -1px; }
.top-right { display: flex; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); font-size: 12.5px; font-weight: 600; color: #cfc8d4; }
.view { display: grid; gap: 18px; }
.view.in { animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.lead { margin: 0; color: var(--muted); max-width: 760px; }

.card { position: relative; padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: 0 20px 50px -30px #000; backdrop-filter: blur(10px); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; font: 700 16px var(--display); letter-spacing: -.2px; }
.link { color: var(--sky); font-weight: 600; font-size: 13px; }
.link:hover { text-decoration: underline; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.push { margin-left: auto; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 16px; }
.empty.in-table { border: 0; }
.loading-block { display: grid; place-items: center; min-height: 160px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--red); border-right-color: var(--sky); animation: spin .8s linear infinite; }
.spinner.sm { width: 22px; height: 22px; border-width: 2px; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line-2); background: rgba(255,255,255,.05); font-weight: 650; font-size: 13.5px; white-space: nowrap; transition: transform .12s, filter .15s, background .15s, border-color .15s; position: relative; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.22); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { border: 0; background: var(--grad); color: #fff; box-shadow: 0 10px 24px -12px rgba(255,35,64,.9), inset 0 1px 0 rgba(255,255,255,.18); }
.btn.primary:hover { filter: brightness(1.12); }
.btn.ghost { background: transparent; }
.btn.danger { border: 0; background: linear-gradient(135deg, #ff2340, #c0001f); color: #fff; }
.btn.danger:hover { filter: brightness(1.1); }
.btn.ok { border-color: rgba(61,220,151,.35); color: var(--ok); background: rgba(61,220,151,.08); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.btn.wide { width: 100%; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin .7s linear infinite; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; position: relative; }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { color: var(--text); background: rgba(255,255,255,.07); border-color: var(--line); }
.icon-btn.danger:hover { color: var(--rose); background: rgba(255,35,64,.1); }
.icon-btn.ok { color: var(--ok); }
.icon-btn.wide-txt { width: auto; padding: 0 8px; font-size: 12px; }
.icon-btn.loading { color: transparent; }
.icon-btn.loading::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); border-top-color: var(--sky); animation: spin .7s linear infinite; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar.tight { margin-bottom: 10px; }
select, .small-input, .toolbar input[type="search"] { height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); outline: 0; font-size: 13px; }
select:focus, input:focus, textarea:focus { border-color: rgba(92,200,255,.55) !important; }

/* ---------- Etiquetas ---------- */
.tag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 99px; font: 700 11px var(--body); font-style: normal; background: rgba(255,35,64,.13); color: #ff9aa9; text-transform: lowercase; }
.tag.sky { background: rgba(92,200,255,.14); color: var(--sky); }
.tag.dim { background: rgba(255,255,255,.06); color: var(--muted); margin-left: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: rgba(61,220,151,.1); }
.pill.red { color: var(--rose); background: rgba(255,35,64,.12); }
.pill.dim { color: var(--muted); background: rgba(255,255,255,.06); }
.pill.sky { color: var(--sky); background: rgba(92,200,255,.12); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.dot.ok { background: var(--ok); } .dot.red { background: var(--red); }

/* ---------- Alertas ---------- */
.alerts { display: grid; gap: 8px; }
.alert { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-weight: 550; }
.alert .link { margin-left: auto; }
.a-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.alert.good { border-color: rgba(61,220,151,.22); background: linear-gradient(90deg, rgba(61,220,151,.08), transparent 60%); }
.alert.good .a-dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.alert.error { border-color: rgba(255,35,64,.35); background: linear-gradient(90deg, rgba(255,35,64,.14), transparent 70%); }
.alert.error .a-dot { background: var(--red); box-shadow: 0 0 10px var(--red); animation: blink 1.2s infinite; }
.alert.warn { border-color: rgba(255,181,71,.3); background: linear-gradient(90deg, rgba(255,181,71,.1), transparent 70%); }
.alert.warn .a-dot { background: var(--amber); }
.alert.info { border-color: rgba(92,200,255,.28); background: linear-gradient(90deg, rgba(92,200,255,.1), transparent 70%); }
.alert.info .a-dot { background: var(--sky); }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- Indicadores ---------- */
.gauge { display: grid; gap: 12px; overflow: hidden; }
.gauge::before { content: ""; position: absolute; inset: 0; background: var(--grad-soft); pointer-events: none; opacity: .7; }
.gauge > * { position: relative; }
.gauge-top { display: flex; align-items: center; gap: 14px; }
.gauge-meta { display: grid; gap: 1px; min-width: 0; }
.gauge-meta b { font: 700 15px var(--display); }
.gauge-meta span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ring { position: relative; width: 84px; height: 84px; flex: none; }
.ring svg { width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: rgba(255,255,255,.07); stroke-width: 9; }
.ring-fg { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dasharray .6s ease; filter: drop-shadow(0 0 6px currentColor); }
.ring-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.05; }
.ring-txt b { font: 700 21px var(--display); }
.ring-txt b small { font-size: 12px; color: var(--muted); }
.ring-txt span { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.spark { display: block; width: 100%; height: 46px; }
.meter { height: 7px; border-radius: 7px; background: rgba(255,255,255,.07); overflow: hidden; margin-top: auto; }
.meter i { display: block; height: 100%; width: 0; border-radius: 7px; background: linear-gradient(90deg, var(--sky-d), var(--sky)); box-shadow: 0 0 12px rgba(92,200,255,.5); transition: width .6s ease; }
.meter.sm { height: 5px; flex: 1; }
.net-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.net-nums span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.net-nums b { font: 700 19px var(--display); }
.net-nums div:first-child b { color: var(--sky); }
.net-nums div:last-child b { color: var(--rose); }
.gauge.net .spark + .spark { margin-top: -8px; opacity: .85; }

.kv { list-style: none; margin: 0; padding: 0; display: grid; }
.kv li { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.kv li:first-child { border-top: 0; padding-top: 0; }
.kv span { color: var(--muted); flex: none; }
.kv b { font-weight: 600; text-align: right; min-width: 0; }

.sites-mini { display: grid; gap: 6px; }
.site-mini { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; background: rgba(255,255,255,.025); border: 1px solid var(--line); transition: border-color .15s, background .15s; }
.site-mini:hover { border-color: rgba(92,200,255,.35); background: rgba(92,200,255,.04); }
.site-mini b { display: block; font-size: 14px; }
.site-mini small { display: block; color: var(--muted); font-size: 12px; }
.site-mini .ms { margin-left: auto; font: 600 12.5px var(--mono); color: var(--muted); }
.status { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.status.up { background: var(--ok); box-shadow: 0 0 0 3px rgba(61,220,151,.15), 0 0 10px var(--ok); }
.status.warn { background: var(--amber); box-shadow: 0 0 0 3px rgba(255,181,71,.15); }
.status.down { background: var(--red); box-shadow: 0 0 0 3px rgba(255,35,64,.18), 0 0 12px var(--red); animation: blink 1.2s infinite; }
.status.big { width: 14px; height: 14px; }

/* ---------- Tablas ---------- */
.table { display: grid; font-size: 13.5px; }
.tr { display: grid; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line); min-width: 0; }
.tr:first-child { border-top: 0; }
.tr.th { color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(255,255,255,.02); padding-top: 10px; padding-bottom: 10px; }
.tr:not(.th):hover { background: rgba(255,255,255,.025); }
.card:not(.flush) .table .tr { padding-left: 4px; padding-right: 4px; }
.procs .tr { grid-template-columns: minmax(0, 2fr) 100px 70px 90px 90px; }
.svc .tr { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr) 130px 90px 130px; }
.acts { display: flex; gap: 2px; justify-content: flex-end; }
.sess .tr { grid-template-columns: minmax(0, 1.4fr) 140px 170px 120px; }
.audit .tr { grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1.4fr) 120px; }
.audit .tr.bad { background: rgba(255,35,64,.04); }
.trash .tr { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) 100px 110px; padding-left: 4px; padding-right: 4px; }

/* ---------- Webs ---------- */
.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr)); gap: 16px; }
.site { display: grid; gap: 16px; overflow: hidden; }
.site::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--ok), transparent); opacity: .8; }
.site.down::before { background: linear-gradient(90deg, var(--red), transparent); }
.site.warn::before { background: linear-gradient(90deg, var(--amber), transparent); }
.site.down { border-color: rgba(255,35,64,.35); }
.site-head { display: flex; align-items: center; gap: 14px; }
.site-head h3 { margin: 0; font: 700 19px var(--display); letter-spacing: -.3px; }
.site-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.site-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.site-stats > div { display: grid; gap: 2px; padding: 11px 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); min-width: 0; }
.site-stats span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.site-stats b { font: 700 15px var(--display); }
.site-stats small { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Archivos ---------- */
.roots { display: flex; flex-wrap: wrap; gap: 8px; }
.root-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); font: 600 13px var(--mono); color: #cfc8d4; }
.root-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.root-btn:hover { border-color: rgba(92,200,255,.4); }
.root-btn.active { border-color: var(--sky); color: var(--sky); background: rgba(92,200,255,.08); }
#openTrash { font-family: var(--body); margin-left: auto; }
.fm { position: relative; }
.fm-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; font: 600 13px var(--mono); min-width: 0; }
.crumbs a { padding: 4px 7px; border-radius: 7px; cursor: pointer; color: #cfc8d4; }
.crumbs a:hover { background: rgba(255,255,255,.06); color: var(--sky); }
.crumbs a:last-child { color: #fff; }
.crumbs i { color: #4c4652; font-style: normal; }
.fm-sel { display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: rgba(255,35,64,.07); border-bottom: 1px solid rgba(255,35,64,.2); font-weight: 600; font-size: 13px; }
.files .tr { grid-template-columns: 26px minmax(0, 1fr) 90px 165px 60px 190px; padding-top: 7px; padding-bottom: 7px; cursor: default; }
.files .tr.is-dir, .files .up-row, .files .tr[data-file] { cursor: pointer; }
.files .tr.sel { background: rgba(92,200,255,.07); }
.files input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--sky); }
.fname { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fname svg { width: 19px; height: 19px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.is-dir .fname svg, .up-row .fname svg { stroke: var(--sky); fill: rgba(92,200,255,.12); }
.fname b { font-weight: 600; }
.files .acts { opacity: .25; transition: opacity .12s; }
.files .tr:hover .acts { opacity: 1; }
.uploads { display: grid; }
.upload { display: grid; grid-template-columns: minmax(0, 1fr) 160px 120px; align-items: center; gap: 12px; padding: 9px 16px; border-bottom: 1px solid var(--line); font-size: 13px; background: rgba(92,200,255,.04); }
.upload.done { background: rgba(61,220,151,.06); }
.upload.err { background: rgba(255,35,64,.08); }
.upload.err .up-pct { color: var(--rose); }
.drop-hint { position: absolute; inset: 0; display: none; place-items: center; background: rgba(5,4,7,.82); border: 2px dashed var(--sky); border-radius: var(--radius); color: var(--sky); font: 700 17px var(--display); pointer-events: none; }
.fm.dragging .drop-hint { display: grid; }

/* ---------- Mantenimiento ---------- */
.maint { display: grid; gap: 8px; align-content: start; overflow: hidden; }
.maint::before { content: ""; position: absolute; inset: 0; background: var(--grad-soft); opacity: .6; pointer-events: none; }
.maint > * { position: relative; }
.maint h2 { margin: 6px 0 0; font: 700 17px var(--display); }
.maint .row { margin-top: 8px; }
.maint.attn { border-color: rgba(255,181,71,.35); }
.maint-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.maint-ico svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.maint-ico.sky { color: var(--sky); background: rgba(92,200,255,.12); }
.maint-ico.rose { color: var(--rose); background: rgba(255,107,129,.12); }
.maint-ico.red { color: #fff; background: var(--grad); }
.big-num { margin: 0; font: 700 28px/1.1 var(--display); letter-spacing: -.5px; }
.big-num small { font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.pkg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; max-height: 280px; overflow: auto; }
.pkg { display: grid; padding: 8px 11px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line); min-width: 0; }
.pkg b, .pkg span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console { margin: 0; padding: 14px 16px; max-height: 420px; overflow: auto; border-radius: 12px; background: #070508; border: 1px solid var(--line); font: 12.5px/1.55 var(--mono); color: #d7d1dc; white-space: pre-wrap; word-break: break-word; }
.console.short { max-height: none; margin: 6px 0 12px; color: var(--sky); }
.console .l-err { color: #ff8b9b; }
.console .l-warn { color: var(--amber); }
.stat-card { display: grid; gap: 4px; }
.stat-card span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat-card b { font: 700 26px var(--display); }

/* ---------- Ventanas modales ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-back { position: absolute; inset: 0; background: rgba(3,2,4,.74); backdrop-filter: blur(6px); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal-card { position: relative; width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 22px; border-radius: 20px; background: linear-gradient(180deg, #160d13, #0d090d); border: 1px solid var(--line-2); box-shadow: 0 40px 100px -30px #000, 0 0 0 1px rgba(255,35,64,.06); animation: rise .25s ease; }
.modal-card.small { width: min(440px, 100%); }
.modal-card.wide { width: min(860px, 100%); }
.modal-card.xwide { width: min(1100px, 100%); }
body.modal-open { overflow: hidden; }
.m-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.m-head h3 { margin: 4px 0 0; font: 700 22px var(--display); letter-spacing: -.4px; word-break: break-all; }
.m-head .kicker { word-break: break-all; text-transform: none; letter-spacing: .02em; }
.m-text { margin: 0 0 14px; color: var(--muted); }
.m-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.m-actions.spread { justify-content: space-between; align-items: center; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.field input { height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); outline: 0; }
.code-input { font: 700 20px var(--mono) !important; letter-spacing: .3em; text-align: center; }
.code-input.bad { border-color: var(--red) !important; animation: shake .3s; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.check input { accent-color: var(--sky); }
.editor-wrap { border-radius: 12px; border: 1px solid var(--line-2); overflow: hidden; background: #070508; }
.code-area { display: block; width: 100%; min-height: 56vh; padding: 14px 16px; border: 0; outline: 0; resize: vertical; background: transparent; font: 13px/1.6 var(--mono); color: #e9e4ee; tab-size: 4; white-space: pre; overflow: auto; }
.msg { margin-top: 10px; padding: 10px 13px; border-radius: 10px; font: 12.5px/1.5 var(--mono); white-space: pre-wrap; }
.msg.ok { background: rgba(61,220,151,.08); color: var(--ok); }
.msg.error { background: rgba(255,35,64,.1); color: #ff9aa9; }
.msg.info { background: rgba(92,200,255,.08); color: var(--sky); }
.reboot { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 10px; }
.reboot h3 { margin: 8px 0 0; font: 700 20px var(--display); }
.reboot p { margin: 0; }

/* ---------- Avisos ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 8px; }
.toast { max-width: 380px; padding: 12px 16px; border-radius: 12px; background: #150d13; border: 1px solid var(--line-2); border-left: 3px solid var(--ok); box-shadow: 0 20px 40px -18px #000; font-weight: 600; font-size: 13.5px; animation: rise .25s ease; transition: opacity .4s, transform .4s; }
.toast.error { border-left-color: var(--red); }
.toast.out { opacity: 0; transform: translateX(20px); }

/* ---------- Login ---------- */
.login-body { display: block; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 390px; padding: 34px 30px 26px; border-radius: 24px; background: linear-gradient(180deg, rgba(30,10,16,.92), rgba(12,8,12,.95)); border: 1px solid var(--line-2); box-shadow: 0 40px 120px -40px rgba(255,35,64,.45), 0 30px 80px -30px #000; animation: rise .4s ease; position: relative; overflow: hidden; }
.login-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--red), var(--sky)); }
.login-sub { text-align: center; color: var(--muted); margin: 8px 0 26px; font-size: 13.5px; }
.login-error { min-height: 20px; margin-top: 12px; text-align: center; color: #ff9aa9; font-size: 13px; font-weight: 600; }
.login-foot { margin: 8px 0 0; text-align: center; color: #5f5865; font-size: 12px; }
.login-card .btn.wide { height: 46px; margin-top: 6px; font-size: 15px; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

/* ---------- Pantallas medianas ---------- */
@media (max-width: 1250px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .files .tr { grid-template-columns: 26px minmax(0, 1fr) 80px 150px 170px; }
  .files .hide-m { display: none; }
}
@media (max-width: 1000px) {
  .grid-main, .grid-3 { grid-template-columns: 1fr; }
  .sidebar { width: 76px; padding: 20px 10px; }
  .sidebar .logo span:last-child, .nav a span, .host-card div, .side-foot .btn { font-size: 0; }
  .sidebar .logo span:last-child, .host-card div { display: none; }
  .nav a { justify-content: center; padding: 0; }
  .nav a span { display: none; }
  .nav-badge { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
  .nav a.active::before { left: -10px; }
  .host-card { justify-content: center; }
  .side-foot .btn { padding: 0; }
  .side-foot .btn svg { width: 18px; height: 18px; }
  .svc .tr { grid-template-columns: minmax(0, 1fr) 120px 110px; }
  .svc .tr > :nth-child(3), .svc .tr > :nth-child(4) { display: none; }
  .audit .tr { grid-template-columns: 140px minmax(0, 1fr) 110px; }
  .audit .tr > :nth-child(3) { display: none; }
}
/* ---------- Móvil ---------- */
@media (max-width: 700px) {
  body { display: block; padding-bottom: 76px; }
  .sidebar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 50; height: auto; width: auto; flex-direction: row; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); background: rgba(10,6,9,.94); }
  .sidebar .logo, .side-foot { display: none; }
  .nav { display: flex; width: 100%; justify-content: space-around; gap: 0; }
  .nav a { flex: 1; height: 50px; border-radius: 12px; }
  .nav a.active::before { left: 30%; right: 30%; top: auto; bottom: -8px; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
  .main { padding: 18px 14px 30px; }
  .topbar { margin-bottom: 16px; }
  .topbar h1 { font-size: 27px; }
  .top-right .chip.live { display: none; }
  .grid-4 { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .procs .tr { grid-template-columns: minmax(0, 1fr) 60px 80px; }
  .procs .tr > :nth-child(2), .procs .tr > :nth-child(5) { display: none; }
  .files .tr { grid-template-columns: 24px minmax(0, 1fr) 70px; }
  .files .tr > :nth-child(4) { display: none; }
  .files .acts { grid-column: 2 / -1; justify-content: flex-start; opacity: 1; margin-top: -4px; }
  .fm-bar .row { margin-left: 0; }
  #openTrash { margin-left: 0; }
  .sess .tr { grid-template-columns: minmax(0, 1fr) 110px; }
  .sess .tr > :nth-child(3), .sess .tr > :nth-child(4) { display: none; }
  .audit .tr { grid-template-columns: minmax(0, 1fr) 100px; }
  .audit .tr > :nth-child(1) { grid-column: 1 / -1; font-size: 12px; }
  .upload { grid-template-columns: minmax(0, 1fr) 70px; }
  .upload .meter { display: none; }
  .toasts { left: 14px; right: 14px; bottom: 86px; }
  .modal { padding: 10px; }
  .modal-card { padding: 16px; }
  .code-area { min-height: 50vh; font-size: 12.5px; }
  .trash .tr { grid-template-columns: minmax(0, 1fr) 100px; }
  .trash .tr > :nth-child(2), .trash .tr > :nth-child(3) { display: none; }
}
