/* VMDesk - estilos de la web (portal, inicio de sesion y visor).
   Tema oscuro de "vidrio": fondo casi negro con brillos de color, paneles translucidos con borde fino,
   botones redondeados y un acento en degradado (rosa, violeta, celeste, verde, ambar). */

/* ---------- tipografia: Geist y Geist Mono (SIL OFL 1.1, ver /fonts/OFL.txt) ---------- */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/Geist-Variable.woff2) format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/GeistMono-Variable.woff2) format("woff2"); }

:root {
  --bg: #050507;
  --bg-2: #0b0b0e;
  --panel: rgba(16, 16, 20, .72);
  --glass: rgba(255, 255, 255, .035);
  --glass-2: rgba(255, 255, 255, .06);
  --glass-3: rgba(255, 255, 255, .1);
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --line-3: rgba(255, 255, 255, .2);
  --text: #f2f2f4;
  --muted: #9b9ba5;
  --dim: #6f6f79;
  --pink: #ff3d9a;
  --violet: #8a5cff;
  --cyan: #2fd6ff;
  --green: #3dffa8;
  --amber: #ffb340;
  --red: #ff5c6c;
  --ok: var(--green);
  --warn: var(--amber);
  --danger: var(--red);
  --accent: var(--violet);
  --spectrum: linear-gradient(90deg, #ff3d9a, #8a5cff 30%, #2fd6ff 55%, #3dffa8 75%, #ffb340);
  --spectrum-loop: linear-gradient(90deg, #ff3d9a, #8a5cff, #2fd6ff, #3dffa8, #ffb340, #ff3d9a);
  --ui: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.2, .9, .1, 1);
  --radius: 20px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .85);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--ui); -webkit-font-smoothing: antialiased; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-weight: 500; letter-spacing: -.02em; }
::selection { background: rgba(138, 92, 255, .45); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); }
.spec { background: var(--spectrum-loop); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: slide 8s linear infinite; }
@keyframes slide { to { background-position: 200% 0; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(61, 255, 168, .06), 0 0 14px var(--green); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- cielo de fondo ---------- */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background:
  radial-gradient(55% 45% at 15% 0%, rgba(138, 92, 255, .22), transparent 70%),
  radial-gradient(45% 40% at 90% 5%, rgba(47, 214, 255, .14), transparent 70%),
  radial-gradient(60% 45% at 55% 110%, rgba(255, 61, 154, .12), transparent 70%),
  var(--bg); }
.sky::after { content: ""; position: absolute; inset: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- botones ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 99px; border: 0; cursor: pointer; white-space: nowrap;
  background: var(--glass-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2);
  font: 500 14px var(--ui); text-decoration: none !important;
  transition: transform .3s var(--ease), background .2s, box-shadow .3s, opacity .2s;
}
.btn:hover { background: var(--glass-3); box-shadow: inset 0 0 0 1px var(--line-3); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: default; transform: none; }
.btn.primary { background: #f4f4f6; color: #060608; box-shadow: 0 0 0 1px rgba(255, 255, 255, .55), 0 10px 34px -12px rgba(138, 92, 255, .75); }
.btn.primary:disabled { background: var(--glass-2); color: var(--dim); box-shadow: inset 0 0 0 1px var(--line); opacity: 1; }
.btn.primary:hover:not(:disabled) { background: #fff; box-shadow: 0 0 0 1px #fff, 0 14px 40px -10px rgba(47, 214, 255, .75); transform: translateY(-1px); }
.btn.danger { color: #ffb4bc; background: rgba(255, 92, 108, .08); box-shadow: inset 0 0 0 1px rgba(255, 92, 108, .28); }
.btn.danger:hover { background: rgba(255, 92, 108, .16); box-shadow: inset 0 0 0 1px rgba(255, 92, 108, .5); }
.btn.ghost { background: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { background: var(--glass-2); color: var(--text); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn.block { width: 100%; }
.btn.icon { width: 32px; padding: 0; }
.btn.icon.lg { width: 46px; }
.btn svg.i { width: 16px; height: 16px; }

/* ---------- formularios ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field label, .label { font: 500 11px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .12em; }
.input, select.input {
  height: 42px; padding: 0 14px; border-radius: 14px; border: 0; width: 100%; outline: none;
  background: rgba(255, 255, 255, .04); color: var(--text); font: 15px var(--ui);
  box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .2s, background .2s;
}
.input::placeholder { color: var(--dim); }
.input:hover { box-shadow: inset 0 0 0 1px var(--line-3); }
.input:focus { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(47, 214, 255, .7), 0 0 0 4px rgba(47, 214, 255, .12); }
.input.mono { font-family: var(--mono); letter-spacing: .04em; }
select.input { appearance: none; padding-right: 30px; cursor: pointer;
  background: rgba(255, 255, 255, .04) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b9ba5' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px; }
select.input option { background: #141418; color: var(--text); }
textarea.input { height: auto; padding: 10px 14px; resize: vertical; min-height: 90px; }

.check { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin-bottom: 16px; cursor: pointer; user-select: none; }
.check input { appearance: none; width: 34px; height: 20px; border-radius: 99px; background: rgba(255, 255, 255, .1); position: relative; cursor: pointer; flex: none; margin: 0; transition: background .25s; box-shadow: inset 0 0 0 1px var(--line-2); }
.check input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #d8d8de; transition: transform .3s var(--ease), background .25s; }
.check input:checked { background: linear-gradient(90deg, var(--pink), var(--violet)); box-shadow: none; }
.check input:checked::after { transform: translateX(14px); background: #fff; }

.alert { padding: 11px 14px; border-radius: 14px; font-size: 13px; margin-bottom: 14px; line-height: 1.45; }
.alert.error { background: rgba(255, 92, 108, .1); box-shadow: inset 0 0 0 1px rgba(255, 92, 108, .3); color: #ffc2c8; }
.alert.info { background: rgba(47, 214, 255, .08); box-shadow: inset 0 0 0 1px rgba(47, 214, 255, .25); color: #c4f1ff; }
.alert.info b { color: #fff; }

/* ---------- estados ---------- */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #4a4a54; flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(61, 255, 168, .16), 0 0 10px var(--green); animation: pulse 2.4s ease-in-out infinite; }
.dot.warn { background: var(--amber); box-shadow: 0 0 0 3px rgba(255, 179, 64, .16); }
.dot.busy { background: var(--violet); box-shadow: 0 0 0 3px rgba(138, 92, 255, .25), 0 0 12px var(--violet); }
.dot.off { background: #4a4a54; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12px; color: var(--muted);
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--line-2); white-space: nowrap; }
.chip svg.i { width: 13px; height: 13px; }
.chip.live { color: #e7dcff; background: rgba(138, 92, 255, .14); box-shadow: inset 0 0 0 1px rgba(138, 92, 255, .45); }
.chip.ok { color: #c8ffe6; background: rgba(61, 255, 168, .08); box-shadow: inset 0 0 0 1px rgba(61, 255, 168, .3); }

kbd { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 7px; font: 500 11px var(--mono); color: var(--muted);
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- marca ---------- */
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -.02em; color: var(--text); }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; position: relative;
  background: linear-gradient(135deg, #ff3d9a, #8a5cff 40%, #2fd6ff 75%, #3dffa8); box-shadow: 0 6px 20px -6px rgba(138, 92, 255, .8); }
.logo-mark::after { content: ""; position: absolute; inset: 1px; border-radius: 8px; background: linear-gradient(180deg, rgba(255,255,255,.28), transparent 55%); }
.logo-mark svg { width: 17px; height: 17px; position: relative; z-index: 1; }

/* ---------- inicio de sesion ---------- */
.auth-wrap { min-height: 100%; display: grid; place-items: center; padding: 32px 16px; }
.auth-box { width: 100%; max-width: 420px; animation: rise .6s var(--ease); }
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head .logo { justify-content: center; font-size: 22px; }
.auth-head .logo-mark { width: 40px; height: 40px; border-radius: 12px; }
.auth-head .logo-mark svg { width: 22px; height: 22px; }
.auth-head h1 { margin-top: 22px; font-size: 30px; line-height: 1.15; letter-spacing: -.035em; }
.auth-head .subtitle { margin-top: 8px; color: var(--muted); font-size: 15px; }
.auth-card { width: 100%; padding: 26px; border-radius: 26px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow);
  -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3); }
.auth-card .btn.primary { height: 44px; font-size: 15px; }
.tabs { display: flex; padding: 4px; margin-bottom: 20px; border-radius: 99px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line); }
.tabs button { flex: 1; height: 34px; border: 0; background: transparent; color: var(--muted); border-radius: 99px; font: 500 14px var(--ui); cursor: pointer; transition: background .25s, color .25s; }
.tabs button:hover { color: var(--text); }
.tabs button.active { background: rgba(255, 255, 255, .1); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--dim); font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .12em; margin: 20px 0 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.social { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-title { font-size: 18px; margin-bottom: 8px; }
.note { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0 0 16px; }
.note b { color: var(--text); font-weight: 500; }
.auth-links { text-align: center; margin-top: 16px; font-size: 13px; }
.auth-foot { text-align: center; margin-top: 18px; color: var(--dim); font-size: 12px; }
.link { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.link:hover { color: var(--text); }

/* ---------- portal: estructura ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100%; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 18px 14px;
  background: rgba(8, 8, 10, .6); box-shadow: inset -1px 0 0 var(--line); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.side .logo { padding: 4px 8px 18px; }
.nav-label { padding: 14px 10px 6px; font: 500 10.5px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .14em; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border-radius: 12px; border: 0; background: transparent; width: 100%;
  color: var(--muted); font: 450 14px var(--ui); text-decoration: none !important; cursor: pointer; text-align: left; transition: background .2s, color .2s, box-shadow .2s; }
.nav-item:hover { color: var(--text); background: var(--glass); }
.nav-item.active { color: var(--text); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(138, 92, 255, .45), 0 0 24px -10px rgba(138, 92, 255, .8); }
.nav-item .count { margin-left: auto; font: 500 11px var(--mono); color: var(--dim); }
.nav-item .dot { margin-left: auto; }
.side .grow { flex: 1; }
.me-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line-2); }
.me-card .who { min-width: 0; flex: 1; }
.me-card .who b { display: block; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-card .who span { display: block; color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; flex: none; position: relative; background: #0d0d10; }
.avatar::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; padding: 2px; background: conic-gradient(from 200deg, #ff3d9a, #8a5cff, #2fd6ff, #3dffa8, #ffb340, #ff3d9a);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }

.main { min-width: 0; padding: 0 clamp(16px, 3vw, 36px) 140px; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; height: 64px; margin: 0 calc(-1 * clamp(16px, 3vw, 36px)); padding: 0 clamp(16px, 3vw, 36px);
  background: linear-gradient(180deg, rgba(5, 5, 7, .92), rgba(5, 5, 7, .6)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.crumb { color: var(--muted); font-size: 14px; }
.crumb b { color: var(--text); font-weight: 500; }
.top .spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 13px; border-radius: 99px; font-size: 13px; color: var(--muted); white-space: nowrap;
  background: rgba(14, 14, 17, .6); box-shadow: inset 0 0 0 1px var(--line-2); }
.pill b { color: var(--text); font: 600 13px var(--mono); }
button.pill { border: 0; cursor: pointer; font-family: var(--ui); }
button.pill:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-3); }
.mobile-only { display: none; }

.hero { text-align: center; padding: 34px 0 30px; }
.hero .greet { color: var(--muted); font-size: 15px; }
.hero h1 { margin-top: 8px; font-size: clamp(30px, 4.4vw, 48px); line-height: 1.1; letter-spacing: -.045em; font-weight: 450; }

.section-label { display: flex; align-items: center; gap: 14px; margin: 34px 0 14px; font: 500 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .14em; scroll-margin-top: 80px; }
.section-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.section-label .act { order: 2; text-transform: none; letter-spacing: 0; font-family: var(--ui); }

.glass { position: relative; border-radius: var(--radius); background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.card { padding: 22px; }
.card h2 { font-size: 17px; margin-bottom: 4px; }
.card .desc { color: var(--muted); font-size: 13px; margin-bottom: 18px; line-height: 1.5; }
.card .desc b { color: var(--text); font-weight: 500; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }

/* ---------- tarjetas de equipos ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { width: 240px; height: 36px; border-radius: 99px; font-size: 14px; padding-left: 38px;
  background: rgba(255, 255, 255, .04) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f6f79' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center / 15px; }
.devices { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.device { padding: 14px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; transition: transform .4s var(--ease), box-shadow .3s; animation: rise .5s var(--ease) both; }
.device::before { content: ""; position: absolute; left: 0; right: 0; bottom: -40px; height: 80px; opacity: 0; filter: blur(30px); transition: opacity .4s;
  background: var(--spectrum); pointer-events: none; }
.device.online::before { opacity: .16; }
.device:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line-3), var(--shadow); }
.device:hover::before { opacity: .3; }
.device-head { display: flex; align-items: center; gap: 12px; }
.device-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; color: #d7d7de;
  background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line-2); }
.device-icon svg.i { width: 18px; height: 18px; }
.device-name { font-weight: 500; font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-sub { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-metric { display: flex; align-items: baseline; gap: 6px; min-height: 32px; white-space: nowrap; }
.device-metric b { font-size: 30px; font-weight: 300; letter-spacing: -.04em; line-height: 1; }
.device-metric span { color: var(--muted); font-size: 13px; }
.device-metric b.word { font-size: 19px; font-weight: 400; letter-spacing: -.02em; }
.device-metric b.word.dim { color: var(--dim); }
.device-metric span.mono, .chip.mono { font-family: var(--mono); }
.device-metric .id { margin-left: auto; font: 500 13px var(--mono); color: var(--muted); cursor: pointer; background: none; border: 0; padding: 4px 8px; border-radius: 8px; }
.device-metric .id:hover { color: var(--text); background: var(--glass-2); }
.device-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.device-actions { display: flex; gap: 6px; position: relative; z-index: 1; }
.device-actions .btn.primary { flex: 1; }

/* selector tarjetas / lista */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 99px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg button { width: 32px; height: 28px; border: 0; border-radius: 99px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: background .2s, color .2s; }
.seg button:hover { color: var(--text); }
.seg button.active { background: rgba(255, 255, 255, .1); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg svg.i { width: 15px; height: 15px; }

/* vista de lista */
.devices.list { display: block; padding: 6px; }
.devices.list .device { display: grid; grid-template-columns: 8px minmax(0, 1.7fr) 112px 104px minmax(0, .7fr) auto; align-items: center; gap: 14px;
  padding: 8px 10px; border-radius: 12px; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; animation: none; overflow: visible; }
.devices.list .device::before { display: none; }
.devices.list .device:hover { transform: none; background: var(--glass-2); box-shadow: none; }
.devices.list .device + .device { box-shadow: 0 -1px 0 var(--line); }
.devices.list .device:hover + .device, .devices.list .device + .device:hover { box-shadow: none; }
.drow-name { min-width: 0; }
.drow-name b { display: block; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drow-name span { display: block; color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drow .id { font: 500 13px var(--mono); color: var(--muted); background: none; border: 0; padding: 4px 6px; border-radius: 8px; cursor: pointer; text-align: left; white-space: nowrap; }
.drow .id:hover { color: var(--text); background: var(--glass-2); }
.drow-state { font-size: 12.5px; white-space: nowrap; }
.drow-state .lat { color: var(--muted); }
.drow-state .lat b { font: 500 15px var(--mono); color: var(--text); }
.ok-text { color: var(--green); }
.drow-extra { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.devices.list .device-actions .btn.primary { flex: none; }
@media (max-width: 1100px) { .devices.list .device { grid-template-columns: 8px minmax(0, 1fr) 104px auto; } .drow .id, .drow-extra { display: none; } }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line-2); background: var(--glass); grid-column: 1 / -1; }
.empty b { display: block; color: var(--text); font-size: 16px; font-weight: 500; margin-bottom: 6px; }

/* ---------- actividad ---------- */
.activity { display: flex; flex-direction: column; }
.act-row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.act-row:last-child { border-bottom: 0; }
.act-ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; color: var(--muted); background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); }
.act-ico svg.i { width: 16px; height: 16px; }
.act-main { flex: 1; min-width: 0; }
.act-main b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-main span { color: var(--dim); font-size: 12.5px; }
.act-when { color: var(--muted); font: 500 12px var(--mono); white-space: nowrap; }

/* ---------- administracion ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat-head { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.stat-head svg.i { width: 15px; height: 15px; }
.stat b { font-size: 34px; font-weight: 300; letter-spacing: -.04em; line-height: 1.1; }
.stat-sub { color: var(--dim); font-size: 12px; }
.table-wrap { overflow-x: auto; padding: 4px 6px; }
/* IA en la nube: claves y direcciones para copiar */
.keybox { display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 14px; border-radius: 14px; background: rgba(255, 255, 255, .035);
  box-shadow: inset 0 0 0 1px var(--line-2); margin: 6px 0 4px; }
.keybox code { flex: 1; min-width: 0; font: 13px var(--mono); color: var(--text); word-break: break-all; }
.keybox.secret code { color: #c8ffe6; }
.row-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.ia-help { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 12px 0 4px; }
.ia-help b { color: var(--text); font-weight: 500; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; padding: 12px 10px 10px; font: 500 10.5px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .12em; white-space: nowrap;
  border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, .025); }
.table tr.off td { opacity: .6; }
.table tr.warn .ev { color: #ffc7a0; }
.table td.actions { white-space: nowrap; text-align: right; }
.table td.actions .btn { margin-left: 4px; }
.table .chip { height: 24px; font-size: 11.5px; }
.table td.mono, .table .mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.cell-main b { display: block; font-weight: 500; white-space: nowrap; }
.cell-main span { display: block; color: var(--dim); font-size: 12px; white-space: nowrap; }
.ev { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.ev svg.i { width: 14px; height: 14px; color: var(--muted); }
.menu-list button:disabled { color: var(--dim); cursor: default; background: transparent; }

/* ---------- descargas ---------- */
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.download { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.download .t { font-weight: 500; font-size: 16px; }
.download .s { color: var(--muted); font-size: 13px; line-height: 1.5; }
.download .meta { color: var(--dim); font: 500 12px var(--mono); }
.download .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }

/* ---------- barra de comandos ---------- */
.cmdbar { position: fixed; left: calc(50% + 124px); bottom: 22px; transform: translateX(-50%); z-index: 40; width: min(620px, calc(100% - 300px)); }
.cmdbar .glow { position: absolute; left: 8%; right: 8%; bottom: -18px; height: 46px; border-radius: 50%; background: var(--spectrum-loop); background-size: 200% 100%;
  filter: blur(26px); opacity: .45; animation: slide 9s linear infinite; pointer-events: none; transition: opacity .3s; }
.cmdbar.open .glow { opacity: .7; }
.cmd-box { position: relative; border-radius: 24px; background: rgba(16, 16, 20, .9); box-shadow: inset 0 0 0 1px var(--line-2), 0 30px 70px -20px #000;
  -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3); overflow: hidden; }
.cmd-input-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; }
.cmd-input-row svg.i { color: var(--dim); }
.cmd-input { flex: 1; height: 40px; border: 0; outline: none; background: transparent; color: var(--text); font: 15.5px var(--ui); }
.cmd-input::placeholder { color: var(--dim); }
.cmd-go { width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; background: #f4f4f6; color: #060608; cursor: pointer; flex: none; transition: transform .3s var(--ease); }
.cmd-go:hover { transform: scale(1.06); }
.cmd-go svg.i { width: 17px; height: 17px; stroke-width: 2; }
.cmd-list { max-height: min(46vh, 380px); overflow-y: auto; padding: 6px 8px 0; border-bottom: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .16) transparent; }
.cmd-list:empty { display: none; }
.cmd-group { padding: 10px 10px 6px; font: 500 10.5px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .14em; }
.cmd-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--text);
  font: 14px var(--ui); text-align: left; cursor: pointer; }
.cmd-item .ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; color: var(--muted); background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); }
.cmd-item .ico svg.i { width: 15px; height: 15px; }
.cmd-item .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-item .txt small { color: var(--dim); font-size: 12.5px; margin-left: 8px; }
.cmd-item .hint { color: var(--dim); font: 500 11px var(--mono); }
.cmd-item.sel, .cmd-item:hover { background: rgba(255, 255, 255, .07); }
.cmd-item.sel .ico { color: var(--text); box-shadow: inset 0 0 0 1px rgba(138, 92, 255, .5); }
.cmd-item:disabled { opacity: .45; cursor: default; }
.cmd-empty { padding: 18px 12px 20px; color: var(--muted); font-size: 13px; text-align: center; }
.cmd-suggest { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.cmd-suggest button { height: 32px; padding: 0 14px; border-radius: 99px; border: 0; cursor: pointer; font: 13px var(--ui); color: var(--muted);
  background: rgba(14, 14, 17, .8); box-shadow: inset 0 0 0 1px var(--line-2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: color .2s, box-shadow .2s; }
.cmd-suggest button:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-3); }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 60; left: 0; top: 0; width: 260px; transform: translateX(-105%); transition: transform .35s var(--ease); background: rgba(8, 8, 10, .96); }
  body.nav-open .side { transform: none; }
  .mobile-only { display: inline-flex; }
  .grid-2 { grid-template-columns: 1fr; }
  .cmdbar { left: 50%; width: calc(100% - 32px); bottom: 14px; }
  .top .pill.hide-sm { display: none; }
  .search { width: 100%; }
}

/* ---------- modales ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(2, 2, 4, .66); display: grid; place-items: center; z-index: 80; padding: 16px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .2s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 440px; padding: 26px; border-radius: 26px; background: rgba(18, 18, 22, .94); box-shadow: inset 0 0 0 1px var(--line-2), 0 40px 90px -30px #000;
  animation: rise .35s var(--ease); }
.modal h3 { font-size: 20px; margin-bottom: 6px; }
.modal .desc { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; line-height: 1.5; }
.modal .desc b { color: var(--text); font-weight: 500; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---------- avisos ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 100; max-width: 380px; }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 12px 12px 16px; border-radius: 16px; font-size: 13.5px;
  background: rgba(20, 20, 24, .94); box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 50px -20px #000; animation: rise .3s var(--ease);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.toast::before { content: ""; width: 3px; align-self: stretch; border-radius: 3px; background: var(--cyan); flex: none; }
.toast.error::before { background: var(--red); }
.toast.ok::before { background: var(--green); }
.toast .body { flex: 1; }
.toast .actions { display: flex; gap: 6px; margin-top: 8px; }
.toast progress { width: 100%; height: 6px; margin-top: 6px; accent-color: var(--violet); }
.toast > .btn { height: 26px; width: 26px; padding: 0; }

/* ---------- visor ---------- */
body.viewer { overflow: hidden; background: #020203; }
.vbar {
  height: 54px; display: flex; align-items: center; gap: 8px; padding: 0 12px; position: relative; z-index: 10; overflow-x: auto; scrollbar-width: none;
  background: rgba(10, 10, 13, .92); box-shadow: inset 0 -1px 0 var(--line); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.vbar::-webkit-scrollbar { display: none; }
.vbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--spectrum); opacity: .35; }
.vbar > * { flex-shrink: 0; }
.vbar .title { display: flex; flex-direction: column; line-height: 1.2; margin: 0 6px 0 2px; }
.vbar .title b { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.vbar .title span { font: 500 11px var(--mono); color: var(--dim); white-space: nowrap; }
.vbar .sep { width: 1px; height: 24px; background: var(--line-2); margin: 0 4px; flex: none; }
.vbar select.input { height: 32px; width: auto; padding: 0 30px 0 12px; border-radius: 99px; font-size: 13px; }
.vbar .spacer { flex: 1; }
.vbar .pill { height: 30px; font-size: 12.5px; background: rgba(255, 255, 255, .04); }
.pill.secure { color: #ffe2b0; background: rgba(255, 179, 64, .1); box-shadow: inset 0 0 0 1px rgba(255, 179, 64, .35); }
.pill.lat b { font-weight: 600; }
.pill.lat.good b { color: var(--green); }
.pill.lat.mid b { color: var(--amber); }
.pill.lat.bad b { color: var(--red); }
.menu { position: relative; }
.menu-list { position: fixed; min-width: 240px; padding: 6px; border-radius: 16px; z-index: 60; background: rgba(18, 18, 22, .96);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 24px 60px -20px #000; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); animation: rise .2s var(--ease); }
.menu-list button { display: flex; width: 100%; justify-content: space-between; gap: 16px; text-align: left; background: transparent; border: 0; color: var(--text);
  font: 14px var(--ui); padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.menu-list button:hover { background: rgba(255, 255, 255, .07); }
.menu-list button kbd { height: auto; padding: 0; background: none; box-shadow: none; color: var(--dim); }
.menu-list hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }

/* selector de monitores del equipo remoto */
.mon-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 99px; flex: none; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line-2); }
.mon-switch button { height: 26px; min-width: 30px; padding: 0 9px; border: 0; border-radius: 99px; background: transparent; color: var(--muted); font: 600 13px var(--ui);
  cursor: pointer; display: inline-flex; align-items: center; gap: 2px; transition: background .2s, color .2s; }
.mon-switch button:hover { background: var(--glass-2); color: var(--text); }
.mon-switch button.active { background: #f4f4f6; color: #060608; }
.mon-switch button small { font-size: 9px; opacity: .8; }
.mon-switch .map-btn { font-size: 14px; }
.mon-map { position: fixed; z-index: 60; padding: 16px; border-radius: 18px; background: rgba(18, 18, 22, .96); box-shadow: inset 0 0 0 1px var(--line-2), 0 24px 60px -20px #000; }
.mon-map h4 { margin: 0 0 12px; font: 500 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.mon-map .layout { position: relative; }
.mon-map .scr { position: absolute; border-radius: 6px; display: grid; place-items: center; cursor: pointer; color: var(--text); font-size: 12px; text-align: center; line-height: 1.2;
  background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1.5px var(--line-3); transition: box-shadow .2s, background .2s; }
.mon-map .scr:hover { box-shadow: inset 0 0 0 1.5px var(--cyan); }
.mon-map .scr.active { background: rgba(138, 92, 255, .2); box-shadow: inset 0 0 0 1.5px var(--violet), 0 0 20px -6px var(--violet); }
.mon-map .scr b { font-size: 16px; font-weight: 500; }
.mon-map .scr span { color: var(--muted); font-size: 10px; }
.mon-map .all { margin-top: 12px; width: 100%; }

.stage { position: absolute; top: 54px; left: 0; right: 0; bottom: 0; display: grid; place-items: center; overflow: hidden; }
.stage.scroll { place-items: start; overflow: auto; }
body.fs .stage { top: 0; }
body.fs .vbar { position: fixed; top: 0; left: 50%; transform: translate(-50%, -100%); width: min(1180px, 100%); border-radius: 0 0 18px 18px; transition: transform .3s var(--ease);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 50px -20px #000; }
body.fs .vbar.show { transform: translate(-50%, 0); }
.fs-handle { display: none; position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 120px; height: 5px; border-radius: 0 0 6px 6px; background: var(--spectrum); opacity: .7; z-index: 9; }
body.fs .fs-handle { display: block; }
#screen { display: block; background: #000; outline: none; image-rendering: auto; touch-action: none; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; z-index: 5; background:
  radial-gradient(50% 40% at 50% 40%, rgba(138, 92, 255, .14), transparent 70%), rgba(3, 3, 5, .9); }
.overlay .box { text-align: center; max-width: 440px; padding: 24px; }
.overlay .box h3 { font-size: 24px; letter-spacing: -.03em; margin-bottom: 8px; }
.overlay .box p { color: var(--muted); margin-bottom: 18px; }
.spinner { width: 44px; height: 44px; margin: 0 auto 20px; border-radius: 50%; animation: spin 1s linear infinite;
  background: conic-gradient(from 0deg, transparent 10%, #ff3d9a, #8a5cff, #2fd6ff, #3dffa8);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); }
.drop-hint { position: absolute; inset: 14px; border-radius: 22px; display: grid; place-items: center; font-size: 18px; font-weight: 500; z-index: 6; pointer-events: none;
  border: 2px dashed rgba(47, 214, 255, .7); background: rgba(47, 214, 255, .08); }
