:root {
  color-scheme: dark;
  --bg: #0e1116;
  --sf: #151a21;
  --sf2: #1b222b;
  --sf3: #222b36;
  --ln: #262f3a;
  --ln2: #334050;
  --tx: #e9edf2;
  --tx2: #b3bdc9;
  --mu: #808c9a;
  --ac: #f2a33a;
  --ac-ink: #1d1305;
  --ac-soft: rgba(242, 163, 58, .14);
  --ok: #4cc38a;
  --ok-soft: rgba(76, 195, 138, .14);
  --warn: #e5b437;
  --warn-soft: rgba(229, 180, 55, .14);
  --bad: #ef6461;
  --bad-soft: rgba(239, 100, 97, .14);
  --info: #5aa4f0;
  --info-soft: rgba(90, 164, 240, .14);
  --vio: #a68cf2;
  --vio-soft: rgba(166, 140, 242, .15);
  --series: #cf7a1d;
  --r: 10px;
  --r-sm: 7px;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--tx);
  font: 14.5px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--ac); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 22px; }
h3 { font-size: 15.5px; margin-bottom: 4px; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .92em; }
code { background: var(--sf3); border: 1px solid var(--ln); border-radius: 5px; padding: 1px 6px; color: var(--tx); white-space: nowrap; }
em { font-style: normal; color: var(--mu); }
.muted { color: var(--mu); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }

/* ---------- controles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--ln2); background: var(--sf2); color: var(--tx);
  font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--sf3); border-color: #43515f; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.primary { background: var(--ac); border-color: var(--ac); color: var(--ac-ink); }
.btn.primary:hover { background: #f5b25a; border-color: #f5b25a; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--tx2); }
.btn.ghost:hover { background: var(--sf2); color: var(--tx); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: rgba(239, 100, 97, .5); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger.solid:hover { background: #f27a77; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.icon { width: 36px; padding: 0; }
.btn.sm.icon { width: 30px; }
.btn.block { width: 100%; }

input, select, textarea {
  font: inherit; color: var(--tx); background: var(--bg);
  border: 1px solid var(--ln2); border-radius: var(--r-sm);
  height: 36px; padding: 0 11px; width: 100%; min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac-soft); }
input::placeholder, textarea::placeholder { color: #5f6b78; }
select { appearance: none; padding-right: 30px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--mu) 50%), linear-gradient(135deg, var(--mu) 50%, transparent 50%);
  background-position: calc(100% - 16px) 15px, calc(100% - 11px) 15px; background-size: 5px 5px; background-repeat: no-repeat; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 550; color: var(--tx2); }
.input-group { display: flex; gap: 8px; }
.input-group input { flex: 1; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.form-err { color: var(--bad); min-height: 1.5em; margin-top: 10px; font-size: 13.5px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--bg); border: 1px solid var(--ln2); border-radius: var(--r-sm); padding: 3px; gap: 3px; }
.seg button { height: 30px; border: 0; border-radius: 5px; background: transparent; color: var(--tx2); font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer; }
.seg button:hover { color: var(--tx); background: var(--sf2); }
.seg button.on { background: var(--sf3); color: var(--tx); box-shadow: inset 0 0 0 1px var(--ln2); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--ln2); background: transparent; color: var(--tx2); font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; }
.chips button:hover { color: var(--tx); border-color: #4a5868; }
.chips button.on { background: var(--ac-soft); border-color: var(--ac); color: var(--ac); }
.chips + input { margin-top: 8px; }

.tabs { display: inline-flex; gap: 2px; background: var(--bg); border: 1px solid var(--ln); border-radius: var(--r-sm); padding: 3px; }
.tabs button { height: 28px; padding: 0 12px; border: 0; border-radius: 5px; background: transparent; color: var(--mu); font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; }
.tabs button.on { background: var(--sf3); color: var(--tx); }

.search { position: relative; display: block; width: 260px; max-width: 100%; }
.search .i { position: absolute; left: 10px; top: 9px; color: var(--mu); width: 17px; height: 17px; pointer-events: none; }
.search input { padding-left: 34px; }
.search.sm { width: 180px; }
.search.sm input { height: 30px; }
.search.sm .i { top: 6.5px; }

.switch-label { display: inline-flex; align-items: center; gap: 8px; color: var(--tx2); font-size: 13px; cursor: pointer; user-select: none; }
.switch { appearance: none; width: 34px; height: 20px; padding: 0; border-radius: 999px; background: var(--sf3); border: 1px solid var(--ln2); position: relative; cursor: pointer; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--tx2); transition: transform .15s, background .15s; }
.switch:checked { background: var(--ac); border-color: var(--ac); }
.switch:checked::after { transform: translateX(14px); background: var(--ac-ink); }
.switch:focus { box-shadow: 0 0 0 3px var(--ac-soft); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(900px 500px at 50% -10%, rgba(242, 163, 58, .10), transparent 70%), var(--bg); }
.login-card { width: 100%; max-width: 360px; background: var(--sf); border: 1px solid var(--ln); border-radius: 14px; padding: 28px 24px 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.login-card .brand { margin-bottom: 24px; }

/* ---------- estructura ---------- */
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--ac); background: var(--ac-soft); border: 1px solid rgba(242, 163, 58, .35); }
.brand-mark .i { width: 22px; height: 22px; }
.brand-name { font-weight: 700; font-size: 15.5px; }
.brand-sub { font-size: 12.5px; color: var(--mu); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 20px 14px; background: var(--sf); border-right: 1px solid var(--ln); }
.side .brand { padding: 0 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 11px; border-radius: var(--r-sm); color: var(--tx2); font-weight: 550; text-decoration: none; position: relative; }
.nav a:hover { background: var(--sf2); color: var(--tx); }
.nav a.on { background: var(--sf3); color: var(--tx); }
.nav a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ac); }
.nav a.on .i { color: var(--ac); }
.nav-count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--sf3); color: var(--tx2); font-size: 12px; font-weight: 650; display: grid; place-items: center; }
.nav-count:empty { display: none; }
.nav a.on .nav-count { background: var(--ac-soft); color: var(--ac); }
.nav-count.warn, .nav a.on .nav-count.warn { background: var(--warn-soft); color: var(--warn); }
.side-note { margin-top: auto; padding: 0 6px; font-size: 12px; color: var(--mu); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 28px; background: rgba(14, 17, 22, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ln); }
.top-info { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; flex-wrap: wrap; }
.top h1 { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.status { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 11px 0 10px; border-radius: 999px; font-size: 13px; font-weight: 650; background: var(--sf2); border: 1px solid var(--ln); color: var(--tx2); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mu); }
.status.on { color: var(--ok); background: var(--ok-soft); border-color: rgba(76, 195, 138, .35); }
.status.on .dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(76, 195, 138, .6); animation: pulse 2s infinite; }
.status.off { color: var(--bad); background: var(--bad-soft); border-color: rgba(239, 100, 97, .35); }
.status.off .dot { background: var(--bad); }
.status.warn { color: var(--warn); background: var(--warn-soft); border-color: rgba(229, 180, 55, .35); }
.status.warn .dot { background: var(--warn); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(76, 195, 138, .55); } 70% { box-shadow: 0 0 0 7px rgba(76, 195, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(76, 195, 138, 0); } }
@media (prefers-reduced-motion: reduce) { .status.on .dot { animation: none; } * { transition: none !important; } }
.addr { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 10px; border-radius: var(--r-sm); border: 1px dashed var(--ln2); background: transparent; color: var(--tx2); font: 13px var(--mono); cursor: pointer; }
.addr:hover { color: var(--tx); border-color: var(--ac); }
.addr .i { width: 15px; height: 15px; }

.banner { margin: 16px 28px 0; display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r); background: var(--bad-soft); border: 1px solid rgba(239, 100, 97, .4); color: #ffb3b1; font-size: 13.5px; }
.banner .i { color: var(--bad); margin-top: 1px; }

.content { padding: 24px 28px 64px; max-width: 1240px; width: 100%; }
.page { display: flex; flex-direction: column; gap: 18px; animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; max-width: 720px; }

.card { background: var(--sf); border: 1px solid var(--ln); border-radius: var(--r); padding: 18px 20px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card > h3 + .muted, .card > h3 + p { margin-bottom: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head.pad { padding: 14px 18px; margin: 0; border-bottom: 1px solid var(--ln); align-items: center; }
.card-head h3 { margin: 0; }
.card-head p { margin-top: 3px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.span-2 { grid-column: span 2; }
.grid-2.top { align-items: start; }
.tbl td.wrap { white-space: normal; min-width: 260px; word-break: break-word; }
.split { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tile { background: var(--sf); border: 1px solid var(--ln); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tile-label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--mu); font-weight: 550; }
.tile-label .i { width: 16px; height: 16px; }
.tile-value { font-size: 28px; font-weight: 650; line-height: 1.15; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-value small { font-size: 16px; color: var(--mu); font-weight: 550; margin-left: 2px; }
.tile-value.mapname { font-size: 22px; padding: 3px 0 2px; }
.tile-sub { font-size: 12.5px; color: var(--mu); min-height: 1.4em; }
.tile-link { font-size: 13px; font-weight: 550; }
.meter { height: 6px; border-radius: 999px; background: var(--ac-soft); overflow: hidden; margin-top: 6px; }
.meter span { display: block; height: 100%; width: 0; background: var(--ac); border-radius: 999px; transition: width .4s; }

/* ---------- gráfico ---------- */
.chart-wrap { position: relative; height: 230px; }
.chart-wrap svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-wrap svg:focus { outline: none; }
.chart-wrap svg:focus-visible { outline: 2px solid var(--ac); outline-offset: 4px; border-radius: 4px; }
.c-grid { stroke: var(--ln); stroke-width: 1; }
.c-axis { fill: var(--mu); font: 11.5px system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.c-area { fill: var(--series); opacity: .12; }
.c-line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.c-dot { fill: var(--series); stroke: var(--sf); stroke-width: 2; }
.c-cross { stroke: var(--ln2); stroke-width: 1; }
.c-empty { fill: var(--mu); font: 13px system-ui, sans-serif; }
.tip { position: absolute; pointer-events: none; background: var(--sf3); border: 1px solid var(--ln2); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; color: var(--tx2); white-space: nowrap; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); transform: translate(-50%, -100%); }
.tip strong { display: block; color: var(--tx); font-size: 14px; }
.tip .key { display: inline-block; width: 12px; height: 2px; background: var(--series); vertical-align: middle; margin-right: 6px; border-radius: 2px; }

/* ---------- tablas ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--mu); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--ln); white-space: nowrap; background: var(--sf); }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--ln); vertical-align: middle; white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: rgba(255, 255, 255, .018); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.act { text-align: right; width: 1%; }
.tbl td.act .row { justify-content: flex-end; flex-wrap: nowrap; gap: 4px; }
.tbl .nick { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; max-width: 260px; }
.tbl .nick span { overflow: hidden; text-overflow: ellipsis; }
.tbl .note { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.tbl .ip { font-family: var(--mono); font-size: 13px; color: var(--tx2); }
.chart-card .tbl-wrap { margin-top: 12px; border: 1px solid var(--ln); border-radius: var(--r-sm); max-height: 320px; overflow: auto; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; border: 1px solid transparent; }
.b-owner { background: var(--ac-soft); color: var(--ac); border-color: rgba(242, 163, 58, .35); }
.b-admin { background: var(--bad-soft); color: #ff8f8c; border-color: rgba(239, 100, 97, .3); }
.b-mod { background: var(--info-soft); color: #8cc2f7; border-color: rgba(90, 164, 240, .3); }
.b-vip { background: var(--vio-soft); color: #c3b2ff; border-color: rgba(166, 140, 242, .3); }
.b-steam { background: var(--sf3); color: var(--tx2); border-color: var(--ln2); }
.b-nosteam { background: transparent; color: var(--mu); border-color: var(--ln2); border-style: dashed; }
.b-bot { background: transparent; color: var(--mu); border-color: var(--ln); }
.ping { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.ping::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mu); }
.ping.good::before { background: var(--ok); }
.ping.mid::before { background: var(--warn); }
.ping.bad::before { background: var(--bad); }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.exp-soon { color: var(--warn); }
.exp-gone { color: var(--bad); }
.exp-sub { display: block; font-size: 12px; color: var(--mu); }

.empty { padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--mu); text-align: center; }
.empty .i { width: 28px; height: 28px; opacity: .7; }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--ln); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.list .muted-row { color: var(--mu); font-size: 13.5px; padding: 6px 0; border: 0; }

.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 18px; }
.kv div { display: flex; flex-direction: column; gap: 2px; }
.kv span { font-size: 12.5px; color: var(--mu); }
.kv b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- mapas ---------- */
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.map { position: relative; border-radius: var(--r); border: 1px solid var(--ln); overflow: hidden; background: var(--sf); display: flex; flex-direction: column; min-height: 118px; }
.map-art { height: 62px; position: relative; background: linear-gradient(135deg, #2b2a26, #1b1e22); }
.map-art::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 14px 14px; }
.map.de .map-art { background: linear-gradient(135deg, #5a4423, #241d14); }
.map.cs .map-art { background: linear-gradient(135deg, #234a5a, #121f26); }
.map.aim .map-art, .map.awp .map-art { background: linear-gradient(135deg, #5a2a2a, #241414); }
.map.fy .map-art { background: linear-gradient(135deg, #2e5a2a, #142414); }
.map.as .map-art { background: linear-gradient(135deg, #3a2a5a, #191428); }
.map-tag { position: absolute; left: 10px; top: 9px; z-index: 1; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }
.map-body { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; }
.map-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map.current { border-color: var(--ac); box-shadow: 0 0 0 1px var(--ac); }
.map.current .live { font-size: 12px; font-weight: 700; color: var(--ac); white-space: nowrap; }
.hint { font-size: 13px; color: var(--mu); margin: -6px 0 14px; white-space: pre-line; }
#mcWarn { margin: 10px 0 0; }
.hint.warn { color: var(--warn); }

/* ---------- consola ---------- */
.term-card { display: flex; flex-direction: column; }
.term { background: #090b0e; height: 360px; overflow-y: auto; padding: 14px 16px; font: 13px/1.55 var(--mono); }
.t-hint { color: var(--mu); }
.t-cmd { color: var(--ac); margin-top: 10px; }
.t-cmd:first-child { margin-top: 0; }
.t-out { color: #cdd5de; white-space: pre-wrap; word-break: break-word; margin: 2px 0 0; font: inherit; }
.t-err { color: var(--bad); }
.term-input { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--ln); background: var(--sf); }
.term-input .prompt { color: var(--ac); font: 600 14px var(--mono); }
.term-input input { border: 0; background: transparent; font-family: var(--mono); height: 32px; padding: 0 4px; }
.term-input input:focus { box-shadow: none; }
.quick { margin-top: -6px; }
.log { margin: 0; height: 340px; overflow: auto; padding: 12px 16px; background: #090b0e; color: #aeb8c3; font: 12.5px/1.55 var(--mono); white-space: pre-wrap; word-break: break-word; }

/* ---------- ajustes ---------- */
.set-groups { display: flex; flex-direction: column; gap: 22px; }
.set-group h4 { margin: 0 0 12px; font-size: 12px; font-weight: 650; color: var(--mu); text-transform: uppercase; letter-spacing: .05em; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 18px; }
.set-grid .field { margin-bottom: 10px; }
.set-grid .field small { color: var(--mu); font-size: 12px; }
.set-bool { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--ln); border-radius: var(--r-sm); background: var(--bg); margin-bottom: 10px; cursor: pointer; font-weight: 550; color: var(--tx2); }
.set-bool:hover { border-color: var(--ln2); }

/* ---------- toasts y diálogos ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r); background: var(--sf3); border: 1px solid var(--ln2); box-shadow: 0 12px 32px rgba(0, 0, 0, .4); font-size: 13.5px; animation: toastIn .2s ease-out; }
.toast .i { margin-top: 1px; }
.toast.ok .i { color: var(--ok); }
.toast.bad { border-color: rgba(239, 100, 97, .5); }
.toast.bad .i { color: var(--bad); }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

dialog { padding: 0; border: 1px solid var(--ln2); border-radius: 14px; background: var(--sf); color: var(--tx); width: min(460px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
dialog::backdrop { background: rgba(5, 7, 10, .65); backdrop-filter: blur(2px); }
.dlg { padding: 20px 22px 18px; }
.dlg h3 { font-size: 17px; margin-bottom: 10px; }
.dlg-body { color: var(--tx2); font-size: 14px; display: flex; flex-direction: column; gap: 12px; }
.dlg-body .field { margin: 0; }
.dlg-actions { display: flex; flex-direction: row-reverse; gap: 8px; margin-top: 20px; }
.copybox { display: flex; gap: 8px; align-items: center; background: var(--bg); border: 1px solid var(--ln2); border-radius: var(--r-sm); padding: 6px 6px 6px 12px; }
.copybox code { flex: 1; background: none; border: 0; padding: 0; white-space: normal; word-break: break-all; color: var(--ac); }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.steps code { white-space: normal; }
.alerts { display: flex; flex-direction: column; gap: 10px; }
.alert-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--warn-soft); border: 1px solid rgba(229, 180, 55, .35); }
.alert-card > .i { color: var(--warn); margin-top: 2px; }
.alert-card .grow { flex: 1; min-width: 0; }
.alert-card p { margin-top: 4px; font-size: 13.5px; color: var(--tx2); }
.alert-card code { white-space: normal; word-break: break-all; }
.alert-card .row { flex-wrap: nowrap; }
@media (max-width: 700px) { .alert-card { flex-wrap: wrap; } .alert-card .row { width: 100%; } }
.note-box { padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-soft); border: 1px solid rgba(229, 180, 55, .35); color: #f0d48a; font-size: 13.5px; }

/* ---------- responsive ---------- */
.monitor-chart { height: 230px; margin-top: 14px; }
.monitor-chart svg { width: 100%; height: 100%; }
.monitor-chart .monitor-line { fill: none; stroke-width: 2; }
.monitor-tiles { margin-top: 16px; }
#monitorAlerts:empty { display: none; }
@media (max-width: 1280px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 6; height: auto; flex-direction: row; align-items: center; gap: 10px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--ln); overflow-x: auto; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .side .brand { padding: 0; }
  .side .brand > div, .side-note { display: none; }
  .nav { flex-direction: row; gap: 4px; }
  .nav a { height: 34px; padding: 0 10px; white-space: nowrap; }
  .nav a.on::before { display: none; }
  .top { position: static; padding: 12px 16px; }
  .top h1 { max-width: 100%; }
  .top-actions { width: 100%; }
  .top-actions .btn:not(.icon) { flex: 1; }
  .banner { margin: 12px 16px 0; }
  .content { padding: 18px 16px 48px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .search { width: 100%; }
  .page-head > div { width: 100%; }
}
@media (max-width: 520px) {
  .tiles { gap: 10px; }
  .tile { padding: 13px 14px; }
  .tile-value { font-size: 23px; }
  .tile-value.mapname { font-size: 18px; }
  .card { padding: 16px; }
  .map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .term { height: 300px; }
}
