[hidden] { display: none !important; }
/* CCN-CTS — estructura de aplicación (barra lateral + espacio de trabajo) */
body.app { display: grid; grid-template-columns: 232px 1fr; grid-template-rows: 100dvh; height: 100dvh; overflow: hidden; background: #F3F6FA; }
@media (prefers-color-scheme: dark) { body.app { background: #0B1726; } }
body.app > main { overflow: auto; min-width: 0; }

.side { display: flex; flex-direction: column; background: var(--panel-solid); border-inline-end: 1px solid rgb(31 78 120 / .08); padding: 1rem .75rem .9rem; gap: .2rem; }
.side-brand { display: flex; gap: .65rem; align-items: center; padding: .1rem .45rem .7rem; }
.side-brand img { height: 30px; width: auto; }
.side-brand b { display: block; color: var(--navy); letter-spacing: .03em; font-size: 1.02rem; }
.side-brand span { font-size: .78rem; color: var(--muted); }
@media (prefers-color-scheme: dark) { .side-brand b { color: #fff; } .side-brand img { background: #fff; border-radius: 6px; padding: 2px 4px; } }
.side .brandbar { border-radius: 4px; margin: 0 .45rem .8rem; height: 3px; }
.side nav { display: grid; gap: .15rem; }
.side nav a, .side-out { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: 10px; color: var(--text);
  text-decoration: none; font-weight: 700; font-size: .96rem; border: 0; background: none; width: 100%; cursor: pointer; font-family: inherit; }
.side nav a svg, .side-out svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.side nav a:hover, .side-out:hover { background: var(--alt); }
.side nav a[aria-current="page"] { background: rgb(0 129 204 / .1); color: var(--blue); }
.side nav a[aria-current="page"] svg { color: var(--blue); }
.side-foot { margin-top: auto; display: grid; gap: .45rem; padding-top: .8rem; border-top: 1px solid rgb(31 78 120 / .08); }
.side-foot form { margin: 0; }
.who { display: flex; align-items: center; gap: .6rem; padding: .3rem .7rem; font-weight: 700; font-size: .92rem; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .85rem;
  background: linear-gradient(135deg, var(--blue), var(--green)); }
.side-sait { height: 18px; width: auto; margin: .3rem .7rem 0; opacity: .85; }
.side-foot .demo-tag { justify-self: start; margin-inline-start: .7rem; }

/* El mapa ocupa todo el espacio de trabajo */
body.app .stage { height: 100dvh; }

/* Páginas de contenido dentro de la aplicación */
body.app .page { padding-top: 1.6rem; }

@media (max-width: 860px) {
  body.app { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .side { order: 2; flex-direction: row; padding: .35rem .5rem; border-inline-end: 0; border-top: 1px solid rgb(31 78 120 / .1); }
  .side-brand, .side .brandbar, .side-foot .who, .side-sait, .side-foot .demo-tag { display: none; }
  .side nav { grid-auto-flow: column; flex: 1; }
  .side nav a, .side-out { flex-direction: column; gap: .15rem; font-size: .72rem; padding: .4rem; justify-content: center; }
  .side-foot { margin: 0; border: 0; padding: 0; }
  body.app .stage { height: calc(100dvh - 64px); }
}

/* ---------- Equipos: dos paneles ---------- */
.ws { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; height: 100dvh; }
.pane { min-height: 0; overflow: auto; }
.list { background: var(--panel-solid); border-inline-end: 1px solid rgb(31 78 120 / .08); display: flex; flex-direction: column; }
.list-head { position: sticky; top: 0; background: var(--panel-solid); z-index: 1; padding: 1.1rem 1rem .6rem; display: grid; gap: .7rem; }
.list-title { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.list-title h1 { margin: 0; font-size: 1.35rem; color: var(--navy); }
@media (prefers-color-scheme: dark) { .list-title h1 { color: #fff; } }
.list-title small { color: var(--muted); font-weight: 400; font-size: .85rem; margin-inline-start: .35rem; }
.btn-primary { display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-weight: 700; border: 0; border-radius: 10px;
  padding: .55rem .9rem; cursor: pointer; color: #fff; background: linear-gradient(135deg, var(--blue), #0A6FB0); box-shadow: 0 4px 14px rgb(0 129 204 / .3); }
.btn-primary svg { width: 18px; height: 18px; }
.btn-primary:disabled { opacity: .5; cursor: default; box-shadow: none; }
.btn-ghost { font: inherit; font-weight: 700; border: 1px solid rgb(31 78 120 / .18); border-radius: 10px; padding: .5rem .85rem; cursor: pointer;
  background: var(--panel-solid); color: var(--text); display: inline-flex; gap: .4rem; align-items: center; text-decoration: none; }
.btn-ghost svg { width: 18px; height: 18px; }
.btn-ghost:hover { background: var(--alt); }
.btn-ghost.danger { color: #B42318; border-color: rgb(214 69 69 / .3); }
.search { position: relative; }
.search svg { position: absolute; left: .7rem; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); }
.search input { width: 100%; padding: .55rem .7rem .55rem 2.2rem; border-radius: 10px; border: 1px solid rgb(31 78 120 / .15); background: var(--alt); }
.chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.chips button { font: inherit; font-size: .82rem; font-weight: 700; padding: .25rem .65rem; border-radius: 999px; border: 1px solid rgb(31 78 120 / .15);
  background: none; color: var(--muted); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.chips b { font-weight: 400; opacity: .8; margin-inline-start: .2rem; }
.tree { padding: .2rem .5rem 1rem; }
.grp { margin-top: .6rem; }
.grp-h { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; font-size: .76rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
.cc { display: inline-grid; place-items: center; min-width: 26px; height: 18px; border-radius: 5px; font-size: .68rem; color: #fff; background: var(--navy); letter-spacing: .02em; }
.site-h { display: flex; align-items: center; justify-content: space-between; padding: .45rem .55rem; font-weight: 700; font-size: .92rem; }
.site-h code { font-size: .72rem; color: var(--muted); font-weight: 400; }
.row { display: grid; grid-template-columns: 34px 1fr auto; gap: .6rem; align-items: center; width: 100%; text-align: left; font: inherit; color: inherit;
  padding: .45rem .55rem; border: 0; border-radius: 10px; background: none; cursor: pointer; }
.row:hover { background: var(--alt); }
.row[aria-selected="true"] { background: rgb(0 129 204 / .1); box-shadow: inset 3px 0 0 var(--blue); }
.row .ic svg { width: 34px; height: 30px; display: block; }
.row b { display: block; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .nm { min-width: 0; }
.row .sub { display: block; font-size: .78rem; color: var(--muted); font-family: Consolas, "Liberation Mono", monospace; }
.sdot { width: 9px; height: 9px; border-radius: 50%; background: var(--unk); }
.sdot.activo { background: var(--ok); box-shadow: 0 0 0 3px rgb(62 177 53 / .18); }
.sdot.por_aprobar { background: var(--warn); box-shadow: 0 0 0 3px rgb(232 163 23 / .2); animation: blink 1.6s ease-in-out infinite; }
.sdot.pendiente { background: #7FA7C9; }
@keyframes blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .sdot.por_aprobar { animation: none; } }
.empty-list { padding: 2rem 1rem; text-align: center; color: var(--muted); }

.detail { padding: 1.6rem clamp(1rem, 3vw, 2.4rem); }
.hero { display: flex; gap: 1.2rem; align-items: center; margin-bottom: 1.3rem; }
.hero .big svg { width: 110px; height: 96px; display: block; filter: drop-shadow(0 12px 18px rgb(15 40 70 / .18)); }
.hero h2 { margin: 0 0 .35rem; font-size: 1.6rem; color: var(--navy); }
@media (prefers-color-scheme: dark) { .hero h2 { color: #fff; } }
.hero .chips span { font-size: .8rem; padding: .2rem .6rem; border-radius: 999px; background: var(--alt); color: var(--muted); font-weight: 700; }
.hero-actions { margin-inline-start: auto; display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; margin-bottom: 1.1rem; }
.tile { background: var(--panel-solid); border-radius: 12px; padding: .75rem .9rem; border: 1px solid rgb(31 78 120 / .07); }
.tile small { display: block; color: var(--muted); font-size: .78rem; margin-bottom: .2rem; }
.tile b { font-size: 1.02rem; font-variant-numeric: tabular-nums; word-break: break-all; }
.tile code { font-size: .95rem; }
.panel { background: var(--panel-solid); border-radius: 14px; border: 1px solid rgb(31 78 120 / .07); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.panel h3 { margin: 0 0 .5rem; font-size: 1.05rem; color: var(--title); display: flex; align-items: center; gap: .5rem; }
.panel p { margin: .3rem 0 .8rem; color: var(--muted); }
.panel.attn { border-color: rgb(232 163 23 / .45); background: linear-gradient(180deg, rgb(255 246 214 / .55), var(--panel-solid) 70%); }
.panel.wait { border-style: dashed; }
.fp { display: grid; grid-template-columns: repeat(8, auto); gap: .3rem .5rem; justify-content: start; font: 1rem Consolas, "Liberation Mono", monospace;
  background: var(--alt); padding: .7rem .9rem; border-radius: 10px; margin: .3rem 0 .9rem; }
.fp span:nth-child(odd) { color: var(--navy); }
@media (prefers-color-scheme: dark) { .fp span:nth-child(odd) { color: #9FD0FF; } }
.mono-line { font: .9rem Consolas, "Liberation Mono", monospace; background: var(--alt); padding: .55rem .8rem; border-radius: 10px; word-break: break-all; margin: .3rem 0 .9rem; }
.tabs { display: flex; gap: .3rem; margin-bottom: .6rem; }
.tabs button { font: inherit; font-weight: 700; font-size: .88rem; border: 0; border-radius: 8px; padding: .4rem .8rem; background: var(--alt); color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--navy); color: #fff; }
.pulse-line { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--title); }
.pulse-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--blue); position: relative; }
.pulse-dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--blue); animation: ring 1.6s ease-out infinite; }
@keyframes ring { from { opacity: .8; transform: scale(.5); } to { opacity: 0; transform: scale(1.4); } }
@media (prefers-reduced-motion: reduce) { .pulse-dot::after { animation: none; } }
.empty { height: 100%; display: grid; place-items: center; text-align: center; color: var(--muted); }
.empty svg { width: 260px; height: auto; margin-bottom: .6rem; }
.empty h2 { color: var(--text); margin: .2rem 0; }
.err-line { color: #B42318; font-weight: 700; margin: .4rem 0; min-height: 1.2em; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--title); }

/* ---------- Asistente (dialog) ---------- */
dialog.wiz { width: min(820px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); border: 0; border-radius: 20px; padding: 0;
  background: var(--panel-solid); color: var(--text); box-shadow: 0 30px 80px rgb(10 30 50 / .35); overflow: hidden; }
dialog.wiz::backdrop { background: rgb(12 30 50 / .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog.wiz[open] { animation: pop .22s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { dialog.wiz[open] { animation: none; } }
.wiz-in { display: grid; grid-template-rows: auto 1fr auto; max-height: calc(100dvh - 2rem); }
.wiz-head { padding: 1.1rem 1.4rem .9rem; border-bottom: 1px solid rgb(31 78 120 / .08); }
.wiz-head h2 { margin: 0 0 .8rem; font-size: 1.25rem; color: var(--navy); display: flex; justify-content: space-between; align-items: center; }
@media (prefers-color-scheme: dark) { .wiz-head h2 { color: #fff; } }
.wiz-head .x { border: 0; background: none; font-size: 1.5rem; cursor: pointer; color: var(--muted); line-height: 1; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; counter-reset: s; }
.steps li { list-style: none; font-size: .78rem; font-weight: 700; color: var(--muted); display: grid; gap: .35rem; }
.steps li::before { content: ""; height: 4px; border-radius: 4px; background: rgb(31 78 120 / .12); }
.steps li[data-on]::before { background: linear-gradient(90deg, var(--blue), var(--green)); }
.steps li[data-cur] { color: var(--text); }
.steps { margin: 0; padding: 0; }
.wiz-body { padding: 1.3rem 1.4rem; overflow: auto; }
.wiz-body h3 { margin: 0 0 .25rem; font-size: 1.1rem; }
.wiz-body > p.lead { margin: 0 0 1rem; color: var(--muted); }
.wiz-foot { padding: .9rem 1.4rem; border-top: 1px solid rgb(31 78 120 / .08); display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.cards.wide { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.pick { position: relative; display: grid; gap: .35rem; align-content: start; text-align: left; font: inherit; color: inherit; cursor: pointer;
  padding: .9rem; border-radius: 14px; border: 1.5px solid rgb(31 78 120 / .14); background: var(--panel-solid); transition: border-color .15s, box-shadow .15s, transform .15s; }
.pick:hover { border-color: rgb(0 129 204 / .5); transform: translateY(-1px); }
.pick[aria-checked="true"] { border-color: var(--blue); box-shadow: 0 0 0 4px rgb(0 129 204 / .15); }
.pick[aria-checked="true"]::after { content: "✓"; position: absolute; top: .55rem; right: .7rem; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; background: var(--blue); color: #fff; font-size: .8rem; font-weight: 700; }
.pick b { font-size: 1rem; }
.pick small { color: var(--muted); font-size: .82rem; line-height: 1.3; }
.pick .ic svg { width: 92px; height: 76px; display: block; margin: 0 auto .2rem; }
.pick .cc { width: max-content; height: 22px; padding: 0 .4rem; font-size: .78rem; }
.pick.new { border-style: dashed; place-content: center; text-align: center; color: var(--blue); font-weight: 700; min-height: 96px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; margin-top: 1rem; }
.fields input { width: 100%; }
.ok-big { text-align: center; padding: 1.5rem 0 .5rem; }
.ok-big .badge { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto .8rem; color: #fff; font-size: 2rem;
  background: linear-gradient(135deg, var(--green), #2C8E25); box-shadow: 0 10px 30px rgb(62 177 53 / .35); }

@media (max-width: 860px) {
  .ws { grid-template-columns: 1fr; height: calc(100dvh - 64px); }
  .ws.has-sel .list { display: none; }
  .ws:not(.has-sel) .detail { display: none; }
  .back-m { display: inline-flex !important; }
}
.back-m { display: none !important; }
.hint.pad { padding: 0 .6rem; margin: 0 0 .4rem; }

/* ---------- Configuración versionada ---------- */
dialog.cfg { width: min(1080px, calc(100vw - 2rem)); }
.cfg-top { display: flex; gap: .7rem; flex-wrap: wrap; }
.ver { background: var(--alt); border-radius: 12px; padding: .55rem .85rem; min-width: 170px; }
.ver small { display: block; color: var(--muted); font-size: .76rem; }
.ver b { font-size: 1.15rem; margin-inline-end: .4rem; }
.ver span { font-size: .8rem; color: var(--muted); font-weight: 700; }
.ver.has { background: rgb(62 177 53 / .1); box-shadow: inset 0 0 0 1px rgb(62 177 53 / .35); }
.ver.has span { color: #23761C; }
.cfg-body { display: grid; grid-template-columns: 300px 1fr; min-height: 0; overflow: hidden; }
.tl { list-style: none; margin: 0; padding: 1rem .8rem 1rem 1.4rem; overflow: auto; border-inline-end: 1px solid rgb(31 78 120 / .08); position: relative; }
.tl::before { content: ""; position: absolute; left: 1.95rem; top: 1.4rem; bottom: 1.4rem; width: 2px; background: rgb(31 78 120 / .12); }
.tl li { position: relative; }
.tl li.none { color: var(--muted); padding: .5rem 0 0 1.5rem; }
.tl button { display: grid; gap: .15rem; width: 100%; text-align: left; font: inherit; color: inherit; border: 0; background: none; cursor: pointer;
  padding: .55rem .6rem .55rem 1.6rem; border-radius: 10px; position: relative; }
.tl button::before { content: ""; position: absolute; left: .32rem; top: .85rem; width: 10px; height: 10px; border-radius: 50%; background: var(--panel-solid);
  box-shadow: 0 0 0 2px var(--line); }
.tl button[aria-current="true"] { background: rgb(0 129 204 / .1); }
.tl button[aria-current="true"]::before { background: var(--blue); }
.tl button:hover { background: var(--alt); }
.tl b { font-size: .9rem; }
.tl .tag { font-size: .72rem; font-weight: 700; color: var(--muted); }
.tl .delta { font-size: .8rem; color: var(--muted); }
.tl .delta i { font-style: normal; font-weight: 700; }
.p { color: #1E7B16; } .m { color: #B42318; }
.cfg-diff { padding: 1rem 1.2rem; overflow: auto; min-height: 380px; }
.diff-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .6rem; color: var(--muted); font-size: .88rem; }
pre.diff { margin: 0; background: #0F2236; color: #C9D6E3; border-radius: 12px; padding: .8rem 0; font: .82rem/1.5 Consolas, "Liberation Mono", monospace;
  overflow: auto; max-height: 56dvh; }
pre.diff span { display: block; padding: 0 .9rem; white-space: pre; }
pre.diff span.p { background: rgb(62 177 53 / .18); color: #B6F0AE; }
pre.diff span.m { background: rgb(214 69 69 / .2); color: #FFC2C2; }
pre.diff span.h { color: #7FC4FF; }
.upd-chip { display: inline-flex; gap: .3rem; align-items: center; font-size: .78rem; font-weight: 700; color: #23761C; background: rgb(62 177 53 / .14);
  border-radius: 999px; padding: .15rem .55rem; }
@media (max-width: 860px) { .cfg-body { grid-template-columns: 1fr; } .tl { max-height: 30dvh; border: 0; } }
.head-actions { display: flex; gap: .4rem; }
.head-actions .btn-ghost { padding: .5rem .7rem; }
dialog.disc { width: min(900px, calc(100vw - 2rem)); }
.dsc-form { display: flex; gap: .6rem; align-items: end; margin-bottom: .4rem; }
.dsc-form label { flex: 1; }
.dsc-form input { width: 100%; }
.dsc-t td { vertical-align: middle; }
.dsc-t .ic svg { width: 46px; height: 38px; display: block; }
.dsc-t tr.known { opacity: .6; }
.icon-btn { border: 0; background: none; cursor: pointer; color: var(--muted); padding: .15rem; margin-inline-start: .3rem; border-radius: 6px; vertical-align: middle; }
.icon-btn svg { width: 15px; height: 15px; display: block; }
.icon-btn:hover { background: var(--alt); color: var(--blue); }
dialog.sed { width: min(620px, calc(100vw - 2rem)); }

/* ---------- Clientes ---------- */
.cl { display: grid; grid-template-rows: auto 1fr; height: 100dvh; }
.cl-head { padding: 1.2rem clamp(1rem, 2.5vw, 2rem) .8rem; display: grid; gap: .8rem; background: var(--panel-solid); border-bottom: 1px solid rgb(31 78 120 / .08); }
.cl-title { display: flex; align-items: baseline; gap: .8rem; }
.cl-title h1 { margin: 0; font-size: 1.35rem; color: var(--navy); }
@media (prefers-color-scheme: dark) { .cl-title h1 { color: #fff; } }
.cl-title small { color: var(--muted); font-weight: 400; font-size: .85rem; margin-inline-start: .35rem; }
.cats { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: thin; }
.cat { --c: var(--navy); display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: .55rem; align-items: center; text-align: left;
  font: inherit; color: inherit; cursor: pointer; padding: .55rem .85rem; border-radius: 14px; border: 1.5px solid rgb(31 78 120 / .12);
  background: var(--panel-solid); min-width: 128px; flex: none; transition: border-color .15s, box-shadow .15s; }
.cat .g { grid-row: span 2; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-size: 1.05rem;
  color: #fff; background: var(--c); }
.cat b { font-size: 1.2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cat span { font-size: .76rem; color: var(--muted); white-space: nowrap; }
.cat[aria-pressed="true"] { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 20%, transparent); }
.cat[data-cat=""] { grid-template-columns: auto; }
.cl-tools { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.cl-tools .search { flex: 1; min-width: 240px; }
.cl-body { display: grid; grid-template-columns: 1fr auto; min-height: 0; }
.cl-table-wrap { overflow: auto; padding: 0 clamp(.5rem, 2vw, 1.5rem) 1rem; }
.cl-t { border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.cl-t thead th { position: sticky; top: 0; z-index: 1; background: #F3F6FA; border: 0; border-bottom: 1px solid rgb(31 78 120 / .12); color: var(--muted);
  font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; padding: .8rem .6rem .5rem; }
@media (prefers-color-scheme: dark) { .cl-t thead th { background: #0B1726; } }
.cl-t td { border: 0; border-bottom: 1px solid rgb(31 78 120 / .06); padding: .5rem .6rem; background: var(--panel-solid); }
.cl-t tbody tr:nth-child(even) td { background: var(--panel-solid); }
.cl-t tbody tr { cursor: pointer; }
.cl-t tbody tr:hover td { background: var(--alt); }
.cl-t tbody tr[aria-selected="true"] td { background: rgb(0 129 204 / .08); }
.cl-t td b { display: block; }
.cl-t .sub { font-size: .78rem; color: var(--muted); }
.cl-t code.mac { font-size: .8rem; color: var(--muted); }
.catchip { --c: var(--navy); display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.catchip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.where { font-size: .85rem; white-space: nowrap; }
.bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; vertical-align: -1px; }
.bars i { width: 3px; background: rgb(31 78 120 / .2); border-radius: 1px; }
.bars i:nth-child(1) { height: 4px; } .bars i:nth-child(2) { height: 6px; } .bars i:nth-child(3) { height: 9px; } .bars i:nth-child(4) { height: 12px; }
.bars i.on { background: var(--green); }
.cl-side { width: min(420px, 92vw); overflow: auto; background: var(--panel-solid); border-inline-start: 1px solid rgb(31 78 120 / .08); padding: 1.2rem 1.3rem; position: relative; }
.cl-side h2 { margin: 0 2rem .2rem 0; color: var(--navy); font-size: 1.25rem; word-break: break-word; }
@media (prefers-color-scheme: dark) { .cl-side h2 { color: #fff; } }
.cl-side .sub { color: var(--muted); margin: 0 0 .8rem; font-size: .88rem; }
.cl-side .close { position: absolute; top: .7rem; right: .8rem; border: 0; background: none; font-size: 1.5rem; cursor: pointer; color: var(--muted); }
.cl-side h3 { color: var(--title); font-size: 1rem; margin: 1.2rem 0 .3rem; }
details.act { border: 1px solid rgb(31 78 120 / .1); border-radius: 12px; padding: .55rem .75rem; margin: .45rem 0; }
details.act summary { cursor: pointer; display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
details.act .code { margin: .5rem 0; }
details.act .code pre { font-size: .76rem; max-height: 200px; white-space: pre-wrap; word-break: break-all; }
@media (max-width: 860px) { .cl { height: calc(100dvh - 64px); } .cl-body { grid-template-columns: 1fr; } .cl-side { position: fixed; inset: 0 0 64px auto; z-index: 5; box-shadow: var(--shadow); } }
.dsc-form .ports { flex: 0 0 200px; }
.cl-t td b { white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.fields label.wide { grid-column: 1 / -1; }
.bar { height: 8px; border-radius: 8px; background: rgb(31 78 120 / .12); overflow: hidden; margin: .6rem 0; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--green)); transition: width .4s; }
.dsc-other { margin-top: 1rem; }
.dsc-other summary { cursor: pointer; color: var(--muted); padding: .4rem 0; }
.dsc-other .dsc-t { margin-top: .5rem; }
.pchk { margin-top: 1.1rem; border-top: 1px solid var(--border); padding-top: .9rem; }
.pchk-h { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.pchk-t { margin: .4rem 0; }
.pchk-n { list-style: none; padding: 0; margin: .6rem 0; display: grid; gap: .4rem; }
.pchk-n li { display: flex; align-items: baseline; gap: .5rem; font-size: .9rem; }

/* ---------- Vista del equipo ---------- */
.devview { max-width: 1500px; }
.dv-crumbs { display: flex; gap: .5rem; align-items: center; font-size: .88rem; color: var(--muted); margin-bottom: .6rem; }
.dv-crumbs a { color: var(--blue); text-decoration: none; font-weight: 700; }
.dv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.dv-head h1 { margin: 0; }
.dv-actions { display: flex; gap: .6rem; align-items: center; }
.dv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .dv-grid { grid-template-columns: 1fr; } }
.dv-chassis { padding: 1rem 1.1rem; }
.dv-chassis-h { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .4rem; }
#chassis { width: 100%; height: auto; display: block; min-height: 180px; }
#chassis .ch-model { fill: #DCE8F5; font-weight: 700; font-size: 13px; letter-spacing: .04em; }
#chassis .ch-num { fill: #B7C8DA; font-size: 9px; font-weight: 700; }
#chassis .port { cursor: pointer; outline: none; }
#chassis .port-hit { fill: transparent; stroke: transparent; stroke-width: 2; }
#chassis .port:hover .port-hit, #chassis .port:focus-visible .port-hit { stroke: rgb(255 255 255 / .55); }
#chassis .port.sel .port-hit { stroke: #39B3FF; stroke-width: 2.6; fill: rgb(57 179 255 / .12); }
#chassis .port.dis { opacity: .75; }
.led { display: inline-block; width: 12px; height: 6px; border-radius: 2px; }
#chassis rect.led.on, .led.on { fill: #3EB135; background: #3EB135; filter: drop-shadow(0 0 3px #3EB135); }
#chassis rect.led.poe, .led.poe { fill: #F2A31B; background: #F2A31B; filter: drop-shadow(0 0 3px #F2A31B); }
#chassis rect.led.off, .led.off { fill: #26323F; background: #3A4A5B; }
#chassis rect.led.dis, .led.dis { fill: #6B2A2A; background: #8A3434; }
.dv-legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .8rem; color: var(--muted); margin-top: .4rem; }
.dv-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.dv-side { padding: 1rem 1.1rem; }
.dv-side h3 { margin: .2rem 0 .6rem; }
.meter { margin-bottom: .7rem; }
.meter-h { display: flex; justify-content: space-between; font-size: .86rem; }
.meter-b { height: 7px; border-radius: 99px; background: rgb(46 115 180 / .18); overflow: hidden; margin: .25rem 0 .15rem; }
.meter-b i { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 99px; transition: width .4s; }
.meter-b i.warn { background: var(--warn); } .meter-b i.bad { background: var(--bad); }
.power-big { display: flex; gap: 1.2rem; margin-bottom: .6rem; }
.power-big b { font-size: 1.8rem; line-height: 1; display: block; color: var(--blue); }
.power-big span { font-size: .78rem; color: var(--muted); }
.dv-port { margin-top: 1rem; padding: 1rem 1.2rem; }
.port-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.port-h h2, .port-h h3 { margin: 0; }
.port-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .4rem 1.4rem; margin: .6rem 0 .8rem; }
.port-grid h3 { margin: .4rem 0 .3rem; font-size: .95rem; }
.neigh { margin: .2rem 0 .7rem; padding-left: 1.1rem; }
.acts-l { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: .7rem; }
.act b { display: block; font-size: .88rem; margin-bottom: .25rem; }
.act pre { white-space: pre-wrap; word-break: break-all; }

/* Menú RouterOS */
.ros { display: grid; grid-template-columns: 230px minmax(0, 1fr) auto; gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .ros { grid-template-columns: 1fr; } }
.ros-menu { background: var(--panel-solid); border-radius: var(--radius); padding: .5rem; max-height: calc(100dvh - 220px); overflow: auto; position: sticky; top: 0; }
.ros-menu summary { cursor: pointer; font-weight: 700; padding: .4rem .5rem; border-radius: 8px; }
.ros-menu summary:hover { background: var(--alt); }
.ros-menu button { display: block; width: 100%; text-align: start; font: inherit; font-size: .88rem; border: 0; background: none; color: var(--text);
  padding: .3rem .5rem .3rem 1.2rem; border-radius: 7px; cursor: pointer; }
.ros-menu button:hover { background: var(--alt); }
.ros-menu button[aria-current="true"] { background: rgb(0 129 204 / .14); color: var(--blue); font-weight: 700; }
.ros-main { padding: .9rem 1rem; min-width: 0; }
.ros-bar { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.ros-bar h2 { margin: 0; margin-inline-end: auto; font-size: 1.15rem; }
.ros-bar input[type="search"] { min-width: 220px; }
.ros-table { overflow: auto; max-height: calc(100dvh - 300px); }
.ros-t td { white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; font-size: .84rem; }
.ros-t tr[data-i] { cursor: pointer; }
.ros-t tr.dim td { opacity: .5; }
.ros-t tr.dyn td:first-child { font-style: italic; }
.ros-detail { width: 340px; padding: .9rem 1rem; max-height: calc(100dvh - 220px); overflow: auto; position: sticky; top: 0; }
.ros-detail dd { word-break: break-all; }
#chassis .ch-model.dark { fill: #1F4E78; }
#chassis .ch-wan { fill: #F2A31B; font-size: 8.5px; font-weight: 700; letter-spacing: .06em; }
#chassis .radio { cursor: pointer; outline: none; }
#chassis .radio-card { fill: rgb(18 38 59 / .85); stroke: rgb(46 115 180 / .45); stroke-width: 1.2; }
#chassis .radio:hover .radio-card, #chassis .radio:focus-visible .radio-card { stroke: rgb(255 255 255 / .6); }
#chassis .radio.sel .radio-card { stroke: #39B3FF; stroke-width: 2.4; fill: rgb(57 179 255 / .14); }
#chassis .radio-t { fill: #E6EEF7; font-size: 12px; font-weight: 700; }
#chassis .radio-s { fill: #9FB3C8; font-size: 10.5px; }
.dv-wifi { margin-top: 1rem; }
.dv-wifi h3 { margin: 0 0 .6rem; }
.radio-list { display: flex; flex-wrap: wrap; gap: .6rem; }
.radio-pill { font: inherit; text-align: start; border: 1px solid var(--border); background: var(--alt); color: var(--text); border-radius: 12px; padding: .55rem .8rem; cursor: pointer; display: grid; gap: .1rem; }
.radio-pill span { font-size: .8rem; color: var(--muted); }
.radio-pill.sel { border-color: var(--blue); box-shadow: 0 0 0 2px rgb(0 129 204 / .3); }
#dv-route h3 { margin: 1rem 0 .4rem; }
@media (prefers-color-scheme: dark) {
  .chip.up { color: #7BE06F; } .chip.warn { color: #FFD27A; background: rgb(232 163 23 / .18); } .chip.down { color: #FF9C9C; }
}
.sec-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-start: .3rem; vertical-align: middle; }
.sec-dot.bad { background: var(--bad); } .sec-dot.warn { background: var(--warn); } .sec-dot.ok, .sec-dot.info { background: var(--ok); }
.findings { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .6rem; }
.findings li { display: grid; grid-template-columns: 110px 1fr; gap: .8rem; align-items: start; padding: .7rem .8rem; border-radius: 10px; background: var(--alt); }
.findings li.f-bad { box-shadow: inset 3px 0 0 var(--bad); } .findings li.f-warn { box-shadow: inset 3px 0 0 var(--warn); }
.findings li .chip { justify-self: start; }
.findings p { margin: .25rem 0 .4rem; font-size: .88rem; color: var(--muted); word-break: break-word; }
.fix-cmd { margin: .4rem 0 0; white-space: pre-wrap; font-size: .82rem; }
.code-btns { display: flex; gap: .35rem; justify-content: flex-end; }
.act .inl { display: flex; align-items: center; gap: .4rem; font-size: .84rem; margin: .2rem 0 .35rem; }
.act .inl input { max-width: 220px; padding: .25rem .45rem; }
dialog.wiz.confirm { width: min(560px, calc(100vw - 2rem)); }
.cf-in { padding: 1.2rem 1.3rem; display: grid; gap: .7rem; }
.cf-in h2 { margin: 0; }
.cf-in pre { white-space: pre-wrap; word-break: break-all; }
.cf-btns { display: flex; justify-content: space-between; gap: .6rem; }
.warn-box { background: var(--warn-bg); color: var(--warn-tx); border: 1px solid var(--warn-bd); border-radius: 10px; padding: .55rem .75rem; margin: 0; font-size: .9rem; }
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: .7rem 1.1rem; border-radius: 12px; box-shadow: var(--shadow); z-index: 50; font-weight: 700; max-width: 90vw; }
