/* SiriusCore · panel web. Sin dependencias externas (la CSP solo permite recursos del propio panel). */
:root {
    --bg: #0a0e15;
    --panel: #111823;
    --panel-2: #172029;
    --panel-3: #1d2833;
    --line: rgba(151, 178, 210, .13);
    --line-strong: rgba(151, 178, 210, .24);
    --text: #e7edf5;
    --text-2: #b9c6d6;
    --muted: #8496ab;
    --accent: #5fb9ff;
    --accent-2: #2f8fd0;
    --accent-3: #8b7dff;
    --accent-glow: rgba(95, 185, 255, .32);
    --ok: #3fd99a;
    --warn: #f3b950;
    --err: #ff6b6b;
    --radius: 14px;
    --radius-sm: 10px;
    --top-h: 58px;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 32px -18px rgba(0, 0, 0, .7);
    --shadow-2: 0 24px 70px -24px rgba(0, 0, 0, .8), 0 2px 6px rgba(0, 0, 0, .3);
    --font: "Inter", "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "JetBrains Mono", "Cascadia Mono", "Fira Code", Consolas, "Liberation Mono", monospace;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
    background:
        radial-gradient(900px 520px at -10% -10%, rgba(95, 185, 255, .10), transparent 60%),
        radial-gradient(800px 600px at 110% 110%, rgba(139, 125, 255, .08), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    font: 14px/1.5 var(--font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; font-weight: 700; letter-spacing: -.015em; }
h2 { font-size: 15px; margin: 0 0 14px; font-weight: 650; color: var(--text); display: flex; align-items: center; gap: 10px; letter-spacing: -.005em; }
.card > h2::before { content: ""; width: 3px; height: 15px; border-radius: 3px; background: linear-gradient(180deg, var(--accent), var(--accent-3)); flex: none; }
h3 { font-size: 14px; margin: 18px 0 10px; font-weight: 650; color: var(--text); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
p.muted { max-width: 100ch; line-height: 1.55; }
strong { font-weight: 650; }
details > summary { cursor: pointer; color: var(--text-2); font-weight: 500; padding: 8px 10px; border-radius: var(--radius-sm); user-select: none; margin-top: 8px; }
details > summary:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
details[open] > summary { color: var(--text); margin-bottom: 8px; }
::selection { background: rgba(95, 185, 255, .35); }
* { scrollbar-width: thin; scrollbar-color: rgba(151, 178, 210, .28) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(151, 178, 210, .22); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(151, 178, 210, .38); border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); gap: 14px; grid-auto-flow: row; align-content: center; }
.boot::before { content: ""; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--accent); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ── layout ── */
.shell { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.side {
    background: linear-gradient(180deg, rgba(17, 24, 35, .92), rgba(11, 15, 22, .96));
    border-right: 1px solid var(--line);
    padding: 18px 12px 24px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 16px; font-weight: 750; font-size: 16px; letter-spacing: -.01em; }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line-strong), 0 10px 24px -10px var(--accent-glow); }
.brand small { display: block; font-weight: 450; color: var(--muted); font-size: 11.5px; letter-spacing: 0; margin-top: 1px; }
.nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px; border-radius: 10px; color: var(--text-2); margin-bottom: 1px;
    font-weight: 480; position: relative; transition: background .15s, color .15s;
}
.nav a > span:first-child { width: 24px; height: 24px; display: inline-grid; place-items: center; font-size: 13px; color: var(--muted); border-radius: 7px; flex: none; transition: color .15s, background .15s; }
.nav a:hover { background: rgba(255, 255, 255, .045); color: var(--text); text-decoration: none; }
.nav a:hover > span:first-child { color: var(--text-2); }
.nav a.active { background: linear-gradient(90deg, rgba(95, 185, 255, .18), rgba(95, 185, 255, .05)); color: #fff; font-weight: 600; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.nav a.active > span:first-child { color: var(--accent); background: rgba(95, 185, 255, .14); }
.nav .group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #5f7189; padding: 15px 10px 6px; font-weight: 600; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    height: var(--top-h); padding: 0 28px; border-bottom: 1px solid var(--line);
    background: rgba(10, 14, 21, .72);
    position: sticky; top: 0; z-index: 5; backdrop-filter: blur(14px) saturate(1.3);
}
.top > .muted { font-size: 13px; letter-spacing: .01em; }
.top .who { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.top .who > span { font-size: 13px; padding: 5px 11px; border-radius: 99px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--text-2); }
.content { padding: 28px 28px 70px; max-width: 1400px; width: 100%; animation: rise .25s ease-out; }
.content > p.muted { margin: -8px 0 20px; font-size: 13.5px; }
.menu-btn { display: none; }

/* ── bloques ── */
.card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 50%), var(--panel);
    border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px;
    box-shadow: var(--shadow-1);
}
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat {
    background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 55%), var(--panel);
    border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-1);
    position: relative; overflow: hidden;
}
.stat::after { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-3)); opacity: .55; }
.stat .label { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.stat .value { font-size: 27px; font-weight: 720; margin-top: 6px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat .sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.bar { height: 6px; background: rgba(255, 255, 255, .06); border-radius: 99px; margin-top: 10px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 10px var(--accent-glow); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 0 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv dt, .kv dd { padding: 7px 0; border-bottom: 1px solid var(--line); }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: none; }
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.pagehead .title { display: flex; align-items: center; gap: 12px; }

/* ── tablas ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; background: rgba(255, 255, 255, .025); white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: rgba(255, 255, 255, .025); }
tr.click { cursor: pointer; }
tr.click:hover td { background: rgba(95, 185, 255, .06); }
td.actions { white-space: nowrap; text-align: right; }
td.actions button + button, td.actions button + a { margin-left: 4px; }
.empty { color: var(--muted); padding: 26px 16px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); }

/* ── controles ── */
button, .btn {
    font: inherit; font-weight: 500; color: var(--text); background: var(--panel-2); border: 1px solid var(--line-strong);
    padding: 7px 13px; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; line-height: 1.35;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .08s, color .15s;
}
button:hover, a.btn:hover { background: var(--panel-3); border-color: rgba(151, 178, 210, .38); text-decoration: none; }
button:active { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: default; transform: none; }
button.primary { background: linear-gradient(135deg, #5db6ff, #2f7fd6); border-color: transparent; color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .2); box-shadow: 0 8px 20px -10px var(--accent-glow); }
button.primary:hover { background: linear-gradient(135deg, #74c2ff, #3a8be0); box-shadow: 0 10px 24px -10px var(--accent-glow); }
button.danger { color: #ffb8b8; border-color: rgba(255, 107, 107, .35); background: rgba(255, 107, 107, .10); }
button.danger:hover { background: rgba(255, 107, 107, .18); border-color: rgba(255, 107, 107, .55); }
button.ok { color: #b6f5d8; border-color: rgba(63, 217, 154, .35); background: rgba(63, 217, 154, .10); }
button.ok:hover { background: rgba(63, 217, 154, .18); border-color: rgba(63, 217, 154, .55); }
button.small, .btn.small { padding: 4px 10px; font-size: 12.5px; border-radius: 8px; }
button.link { background: none; border: none; color: var(--accent); padding: 0; box-shadow: none; }
button.link:hover { text-decoration: underline; background: none; }
button.on { background: rgba(95, 185, 255, .14); color: var(--accent); border-color: rgba(95, 185, 255, .45); }
input, select, textarea {
    font: inherit; color: var(--text); background: #0b1119; border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm); padding: 8px 12px; min-width: 0; line-height: 1.35;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: rgba(132, 150, 171, .75); }
input:hover, select:hover, textarea:hover { border-color: rgba(151, 178, 210, .36); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(95, 185, 255, .22); background-color: #0c131d; }
select {
    appearance: none; padding-right: 32px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%238496ab' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5l3.5 3.5 3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center;
}
select.small { padding: 4px 28px 4px 9px; font-size: 12.5px; background-position: right 9px center; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; padding: 0; margin: 0; border: none; background: none; box-shadow: none; accent-color: var(--accent); cursor: pointer; }
input[type=range] { padding: 0; border: none; background: none; box-shadow: none; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: .01em; }
label.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-2); }
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; align-items: end; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.5; }

/* ── estado ── */
.badge {
    display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 650; letter-spacing: .02em;
    padding: 3px 9px; border-radius: 99px; background: rgba(255, 255, 255, .05); color: var(--muted); border: 1px solid var(--line);
    line-height: 1.4; white-space: nowrap;
}
.badge.ONLINE::before, .badge.ok::before, .badge.STARTING::before, .badge.STOPPING::before, .badge.warn::before, .badge.ERROR::before, .badge.err::before, .badge.STOPPED::before, .badge.CREATED::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none;
}
.badge.ONLINE::before, .badge.STARTING::before, .badge.STOPPING::before { box-shadow: 0 0 8px currentColor; }
.badge.ONLINE, .badge.ok { color: var(--ok); border-color: rgba(63, 217, 154, .35); background: rgba(63, 217, 154, .10); }
.badge.STARTING, .badge.STOPPING, .badge.warn { color: var(--warn); border-color: rgba(243, 185, 80, .35); background: rgba(243, 185, 80, .10); }
.badge.ERROR, .badge.err { color: var(--err); border-color: rgba(255, 107, 107, .35); background: rgba(255, 107, 107, .10); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.ONLINE { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot.ERROR { background: var(--err); }
.dot.STARTING, .dot.STOPPING { background: var(--warn); }

/* ── pestañas ── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: none; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); padding: 10px 15px; font-weight: 500; margin-bottom: -1px; box-shadow: none; }
.tabs button:hover { color: var(--text); background: none; }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

/* ── consola ── */
.console {
    background: #070b11; border: 1px solid var(--line); border-radius: var(--radius);
    font: 12.5px/1.55 var(--mono); height: 58vh; overflow-y: auto; padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere;
    box-shadow: inset 0 1px 12px rgba(0, 0, 0, .5); color: var(--text-2);
}
.console .l-warn { color: var(--warn); }
.console .l-err { color: var(--err); }
.console .l-cmd { color: var(--accent); font-weight: 600; }
.console-input { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.console-input::before { content: "❯"; color: var(--accent); font: 600 14px var(--mono); padding-left: 4px; }
.console-input input { flex: 1; font-family: var(--mono); }
.output {
    background: #070b11; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font: 12.5px/1.55 var(--mono);
    white-space: pre-wrap; overflow-x: auto; max-height: 50vh; overflow-y: auto; margin-top: 12px; color: var(--text-2);
}

/* ── ficheros ── */
.crumbs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.files td:first-child { font-family: var(--mono); color: var(--accent); }
.editor { width: 100%; min-height: 60vh; font: 13px/1.55 var(--mono); tab-size: 2; resize: vertical; white-space: pre; background: #070b11; }
.dirty { color: var(--warn); }

/* ── avisos y modales ── */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 50; max-width: min(460px, calc(100vw - 36px)); }
.toast {
    background: rgba(23, 32, 41, .92); border: 1px solid var(--line-strong); border-left: 3px solid var(--accent);
    padding: 11px 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow-2); backdrop-filter: blur(10px);
    font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; animation: pop .22s ease-out;
}
.toast.err { border-left-color: var(--err); }
.toast.ok { border-left-color: var(--ok); }
.modal-back { position: fixed; inset: 0; background: rgba(4, 7, 12, .66); display: grid; place-items: center; z-index: 40; padding: 16px; backdrop-filter: blur(8px); animation: fade .15s ease-out; }
.modal {
    background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 40%), var(--panel);
    border: 1px solid var(--line-strong); border-radius: 18px; width: min(640px, 100%); max-height: 90vh; overflow-y: auto; padding: 24px;
    box-shadow: var(--shadow-2); animation: pop .2s ease-out;
}
.modal h2 { margin-bottom: 16px; font-size: 17px; }
.modal .row.end { justify-content: flex-end; margin-top: 20px; }
.perm-list { display: grid; grid-template-columns: 1fr; gap: 6px; max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: rgba(0, 0, 0, .18); }
.perm-list .node { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ── login ── */
.login {
    min-height: 100vh; display: grid; place-items: center; padding: 16px;
    background:
        radial-gradient(700px 480px at 18% 12%, rgba(95, 185, 255, .16), transparent 62%),
        radial-gradient(640px 520px at 86% 92%, rgba(139, 125, 255, .16), transparent 62%),
        linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px) 0 0 / 44px 44px,
        linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px) 0 0 / 44px 44px;
}
.login form {
    width: min(410px, 100%); background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 45%), var(--panel);
    border: 1px solid var(--line-strong); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 16px;
    box-shadow: var(--shadow-2); animation: pop .3s ease-out;
}
.login .brand { padding: 0 0 10px; font-size: 20px; }
.login .brand img { width: 44px; height: 44px; border-radius: 13px; }
.login .brand small { font-size: 12.5px; }
.login input { padding: 10px 13px; }
.login button.primary { padding: 11px 14px; font-size: 15px; font-weight: 600; margin-top: 4px; }
.login .hint { text-align: center; margin-top: 2px; }
.error-text { color: var(--err); font-size: 13px; min-height: 18px; }

@media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; }
    .side { position: fixed; left: 0; top: 0; width: 260px; z-index: 30; transform: translateX(-100%); transition: transform .2s ease; background: var(--bg); }
    .side.open { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .7); }
    .menu-btn { display: inline-block; }
    .content { padding: 18px 16px 60px; }
    .top { padding: 0 16px; }
    .top > .muted { display: none; }
    .kv { grid-template-columns: 1fr; }
    .kv dt { margin-top: 6px; border-bottom: none; padding-bottom: 0; }
    .kv dt:last-of-type { border-bottom: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Mapa en Vivo 3º Persona ── */
/* hidden tiene que ganar a los display de abajo (HUD, paneles). */
.lv [hidden] { display: none !important; }
.content.full { max-width: none; padding: 0; height: calc(100vh - var(--top-h)); display: flex; flex-direction: column; animation: none; }
.lv { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.lv-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.lv-seg { display: flex; gap: 0; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.lv-seg button { border: none; border-radius: 0; background: transparent; }
.lv-seg button + button { border-left: 1px solid var(--line); }
.lv-seg button.on, .lv-head button.on { background: rgba(95, 185, 255, .16); color: var(--accent); border-color: rgba(95, 185, 255, .45); }
.lv-status { font-size: 12px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text-2); }
.lv-status.ok { color: var(--ok); border-color: rgba(63, 217, 154, .35); background: rgba(63, 217, 154, .10); }
.lv-status.err { color: var(--err); border-color: rgba(255, 107, 107, .35); background: rgba(255, 107, 107, .10); }
.lv-status.muted { color: var(--muted); }
.lv-status:empty { display: none; }
.lv-stage { position: relative; flex: 1; min-height: 320px; background: #000; overflow: hidden; }
.lv-canvas, .lv-overlay { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lv-overlay { pointer-events: none; }
.lv-views { position: absolute; inset: 0; }
.lv-view { position: absolute; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6); overflow: hidden; user-select: none; }
.lv-head { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; z-index: 3; }
.lv-head select, .lv-head button { background-color: rgba(10, 14, 21, .82); backdrop-filter: blur(4px); border-color: rgba(151, 178, 210, .3); }
.lv-info { color: #fff; font: 12px var(--mono); text-shadow: 0 1px 2px #000; margin-left: auto; background: rgba(0, 0, 0, .4); padding: 3px 9px; border-radius: 6px; }
.lv-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, 40px); color: #fff; background: rgba(8, 12, 18, .78);
    border: 1px solid rgba(255, 255, 255, .12); padding: 7px 14px; border-radius: 99px; font-size: 12px; pointer-events: none; text-align: center; max-width: 90%; }
.lv-hint:empty { display: none; }
.lv-cross { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #fff; font: 20px monospace; text-shadow: 0 0 3px #000; pointer-events: none; }
.lv-banner { position: absolute; top: 48px; left: 8px; background: rgba(255, 107, 107, .88); color: #fff; font-size: 12px; font-weight: 500;
    padding: 6px 12px; border-radius: 8px; pointer-events: none; max-width: calc(100% - 390px); min-width: 200px; z-index: 2; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.lv-banner:not(.mine) { background: rgba(243, 185, 80, .9); color: #111; }
.lv-cmds, .lv-log { position: absolute; right: 8px; top: 48px; width: min(360px, 45%); max-height: 45%; overflow-y: auto; background: rgba(8, 12, 17, .88);
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 10px; font: 12px var(--mono); z-index: 2; }
.lv-log { top: 8px; max-height: calc(100% - 16px); width: min(460px, 60%); z-index: 4; }
.lv-cmd { padding: 1px 0; overflow-wrap: anywhere; }
.lv-cmd.cmd { color: #ffd479; }
.lv-cmd.chat { color: #e8eef5; }
.lv-cmd.cancelled { text-decoration: line-through; opacity: .6; }
.lv-hud { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 2; pointer-events: none; }
.lv-hud button { pointer-events: auto; }
.lv-stats { display: flex; gap: 12px; font-size: 12px; color: #fff; text-shadow: 0 1px 2px #000; background: rgba(0, 0, 0, .45); padding: 3px 12px; border-radius: 99px; }
.lv-stats .hp { color: #ff8a8a; }
.lv-stats .hp small { letter-spacing: -1px; }
.lv-stats .food { color: #f0c27a; }
.lv-stats .xp { color: #9cff6a; }
.lv-hotbar { display: flex; gap: 2px; background: rgba(0, 0, 0, .55); padding: 3px; border-radius: 6px; }
.lv-slot { position: relative; width: 36px; height: 36px; background: rgba(139, 139, 139, .35); border: 1px solid rgba(0, 0, 0, .5); border-radius: 3px;
    display: grid; place-items: center; }
.lv-slot.sel { outline: 2px solid #fff; z-index: 1; }
.lv-slot.click { cursor: pointer; }
.lv-slot.click:hover { background: rgba(200, 200, 200, .4); }
.lv-slot.glint canvas { filter: drop-shadow(0 0 3px #b77cff) saturate(1.4); }
.lv-slot canvas { width: 32px; height: 32px; image-rendering: pixelated; }
.lv-count { position: absolute; right: 2px; bottom: 0; color: #fff; font: 700 11px var(--mono); text-shadow: 1px 1px 0 #333; }
.lv-slot-name { font-size: 8px; color: #ddd; text-align: center; line-height: 1; }
.lv-inv { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(20, 26, 34, .96); border: 1px solid var(--line-strong);
    border-radius: var(--radius); padding: 12px 14px; z-index: 4; max-height: 92%; overflow-y: auto; box-shadow: var(--shadow-2); }
.lv-inv-title { font-size: 12px; color: var(--muted); margin: 6px 0 4px; }
.lv-grid { display: grid; grid-template-columns: repeat(9, 36px); gap: 2px; }
.lv-grid.hot { margin-top: 6px; }
.lv-armor { display: flex; gap: 2px; }
.lv-inv-foot { margin-top: 8px; font-size: 12px; }
.lv-chat { position: absolute; left: 8px; right: 8px; bottom: 90px; z-index: 5; background: rgba(0, 0, 0, .78); color: #fff; }
@media (max-width: 800px) {
    .content.full { height: calc(100vh - var(--top-h)); }
    .lv-cmds { width: 60%; }
}

/* ── Grabaciones ── */
.btn.small { padding: 4px 10px; font-size: 12.5px; display: inline-block; }
.rc-body { display: grid; grid-template-columns: 250px 1fr 360px; flex: 1; min-height: 0; }
.rc-left, .rc-right { background: var(--panel); overflow-y: auto; padding: 10px; min-height: 0; }
.rc-left { border-right: 1px solid var(--line); }
.rc-right { border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.rc-stage { min-height: 0; }
.rc-view { inset: 0; left: 0; top: 0; width: 100%; height: 100%; }
.rc-sec { margin-bottom: 10px; }
.rc-info { position: absolute; top: 8px; right: 10px; color: #fff; font: 12px var(--mono); text-shadow: 0 1px 2px #000; background: rgba(0, 0, 0, .4); padding: 3px 9px; border-radius: 6px; }
.rc-timeline { padding: 8px 14px 10px; border-top: 1px solid var(--line); background: var(--panel); }
.rc-slider { width: 100%; margin: 0; accent-color: var(--accent); }
.rc-activity { display: block; width: 100%; height: 18px; }
.rc-clock { font-size: 12px; min-width: 190px; font-variant-numeric: tabular-nums; }
.rc-play { min-width: 38px; }
.rc-players { display: flex; flex-direction: column; gap: 4px; }
.rc-player { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 7px 9px; background: var(--panel-2); transition: border-color .15s; }
.rc-player:hover { border-color: var(--line-strong); }
.rc-player.sel { border-color: rgba(95, 185, 255, .5); box-shadow: inset 3px 0 0 var(--accent); }
.rc-player.off { opacity: .55; }
.rc-pname { cursor: pointer; font-size: 13px; overflow-wrap: anywhere; }
.rc-pbtns { gap: 4px; margin-top: 4px; }
.rc-pbtns button.on, .rc-tabs button.on, .rc-left button.on { background: rgba(95, 185, 255, .16); color: var(--accent); border-color: rgba(95, 185, 255, .45); }
.rc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #56606b; margin-right: 6px; }
.rc-dot.on { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.rc-lvl { font-size: 11px; font-weight: 700; color: #9cff6a; background: rgba(0, 0, 0, .35); border-radius: 4px; padding: 0 4px; margin-right: 4px; }
.rc-colored { font-weight: 600; text-shadow: 0 1px 1px rgba(0, 0, 0, .6); }
.rc-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.rc-panel { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.rc-who { font-size: 15px; }
.small-text { font-size: 12px; }
.rc-stats { flex-wrap: wrap; justify-content: flex-start; }
.rc-inv .lv-grid { grid-template-columns: repeat(9, 34px); }
.rc-inv .lv-slot { width: 34px; height: 34px; }
.rc-dura { position: absolute; left: 3px; bottom: 2px; height: 2px; }
.rc-list { display: flex; flex-direction: column; gap: 2px; font-size: 12px; overflow-y: auto; }
.rc-list .lv-cmd { cursor: pointer; }
.rc-list .lv-cmd.future { opacity: .35; }
.rc-ev { display: grid; grid-template-columns: 58px 18px 1fr auto; gap: 4px; align-items: start; padding: 3px 0; border-bottom: 1px solid var(--line); }
.rc-ev > span { cursor: pointer; overflow-wrap: anywhere; }
.rc-ev-icon { text-align: center; }
.rc-ev.cat-bloques .rc-ev-icon { color: #c9a26b; }
.rc-ev.cat-cofres .rc-ev-icon { color: #f0c27a; }
.rc-ev.cat-combate .rc-ev-icon { color: var(--err); }
.rc-ev.cat-comandos .rc-ev-text { color: #ffd479; }
.rc-ev.cat-conexion .rc-ev-icon { color: var(--ok); }
.rc-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.rc-chip { font-size: 11px; border: 1px solid var(--line-strong); border-radius: 99px; padding: 2px 9px; cursor: pointer; color: var(--muted); user-select: none; transition: background .15s, color .15s, border-color .15s; }
.rc-chip:hover { color: var(--text); }
.rc-chip.on { color: var(--accent); border-color: rgba(95, 185, 255, .45); background: rgba(95, 185, 255, .14); }
.rc-chip input { display: none; }
@media (max-width: 1100px) {
    .rc-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(320px, 1fr) auto; }
    .rc-left, .rc-right { max-height: 260px; border: none; border-top: 1px solid var(--line); }
    .rc-left { order: 2; }
    .rc-stage { order: 1; }
    .rc-right { order: 3; }
}

/* ── curva de EXP (Progresión) ── */
.chart-wrap { position: relative; margin: 8px 0 12px; }
svg.curve { width: 100%; height: auto; display: block; background: #0b1119; border: 1px solid var(--line); border-radius: var(--radius); }
svg.curve .grid { stroke: rgba(151, 178, 210, .12); stroke-width: 1; }
svg.curve .axis { fill: var(--muted); font-size: 11px; }
svg.curve .series { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.curve .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
svg.curve .dot { fill: var(--accent); stroke: #0b1119; stroke-width: 2; }
.chart-tip { position: absolute; pointer-events: none; background: rgba(23, 32, 41, .96); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 12px; width: 210px; box-shadow: var(--shadow-2); }

input.num { width: 6em; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; color: var(--muted, #9b92b8); }
