:root {
  --bg: #0b1016; --panel: #121a23; --panel2: #18222d; --line: #243241; --text: #e6edf3; --muted: #8b9bab;
  --accent: #14b8a6; --accent-ink: #042f2b; --ok: #22c55e; --bad: #ef4444; --warn: #f59e0b; --info: #38bdf8;
  --radius: 10px; font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
code, pre, .mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }

.layout { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; padding: 4px 8px 16px; }
.brand .logo { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; color: white; font-weight: 800; }
.side .group { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 14px 10px 4px; }
.side a { color: var(--text); padding: 8px 10px; border-radius: 8px; display: block; }
.side a:hover { background: var(--panel2); }
.side a.active { background: rgba(20,184,166,.14); color: var(--accent); }
.side .foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.main { padding: 24px 28px 48px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.topbar h1 { margin: 0; font-size: 22px; }
.sub { color: var(--muted); margin-top: 4px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card .n { font-size: 28px; font-weight: 700; }
.card .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.panel h2 { font-size: 15px; margin: 0 0 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:hover td { background: rgba(255,255,255,.02); }
.table-wrap { overflow-x: auto; }

.btn { background: var(--panel2); border: 1px solid var(--line); padding: 8px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 5px 9px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

input, select, textarea { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--text); font-size: 13px; }
.check input { width: auto; }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px; margin-bottom: 12px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: var(--panel2); border: 1px solid var(--line); }
.badge.ok { color: var(--ok); border-color: rgba(34,197,94,.35); }
.badge.bad { color: var(--bad); border-color: rgba(239,68,68,.35); }
.badge.warn { color: var(--warn); border-color: rgba(245,158,11,.35); }
.badge.info { color: var(--info); border-color: rgba(56,189,248,.35); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.online { background: var(--ok); box-shadow: 0 0 0 3px rgba(34,197,94,.15); }
.dot.offline { background: var(--bad); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.empty { text-align: center; color: var(--muted); padding: 32px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 9px 14px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--text); border-color: var(--accent); }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; width: min(720px, 100%); max-height: 92vh; overflow-y: auto; padding: 20px; }
.modal h3 { margin: 0 0 8px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

#toast { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--panel2); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 8px; max-width: 380px; }
.toast.err { border-left-color: var(--bad); }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 30% 20%, rgba(20,184,166,.12), transparent 50%), var(--bg); }
.login .box { width: min(380px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.login h1 { margin: 0 0 4px; font-size: 22px; }

pre.config, pre.diff { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow: auto; max-height: 65vh; margin: 0; white-space: pre; }
pre.diff .add { color: var(--ok); }
pre.diff .del { color: var(--bad); }
pre.diff .hunk { color: var(--info); }
.terminal-page { position: fixed; inset: 0; background: #000; display: flex; flex-direction: column; }
.terminal-bar { background: var(--panel); border-bottom: 1px solid var(--line); padding: 8px 14px; display: flex; align-items: center; gap: 12px; }
.terminal-bar .rec { color: var(--bad); font-size: 12px; }
#term { flex: 1; padding: 6px; min-height: 0; }
.banner { background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.35); color: var(--warn); padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.copy { background: var(--bg); border: 1px solid var(--line); padding: 10px; border-radius: 8px; word-break: break-all; }

/* switches */
.sw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.sw-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--text); display: block; }
.sw-card:hover { border-color: var(--accent); }
.sw-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); text-align: center; }
.sw-stats b { display: block; font-size: 18px; }
.sw-stats span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }


/* painel do switch */
.fp { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; padding: 14px 16px 10px; border-radius: 8px;
  background: linear-gradient(180deg, #2a3644, #1c2631); border: 1px solid #344456; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); overflow-x: auto; }
.fp-group { display: flex; flex-direction: column; gap: 4px; }
.fp-label { font-size: 10px; color: #9fb0c2; text-transform: uppercase; letter-spacing: .06em; }
.fp-chunks { display: flex; gap: 10px; }
.fp-chunk { display: flex; gap: 3px; padding: 4px; background: #121a23; border-radius: 4px; }
.fp-col { display: flex; flex-direction: column; gap: 3px; align-items: center; min-width: 30px; }
.fp-num { font-size: 9px; color: #7d8fa2; font-family: 'JetBrains Mono', monospace; white-space: nowrap; }
.fp-port { width: 30px; height: 22px; border-radius: 3px; padding: 3px; cursor: pointer; background: #0b1016; border: 1px solid #3a4a5c; }
.fp-port.big { width: 44px; height: 26px; }
.fp-port span { display: block; width: 100%; height: 100%; border-radius: 2px; background: #2b3746; }
.fp-port.up span { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,.55); }
.fp-port.warn span { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,.5); }
.fp-port.down span { background: #3b4756; }
.fp-port.off span { background: repeating-linear-gradient(45deg, #2b3746 0 3px, #1a232d 3px 6px); }
.fp-port:hover { border-color: var(--accent); }
.fp-leds { margin-left: auto; display: flex; gap: 6px; align-items: center; font-size: 9px; color: #7d8fa2; }
.fp-leds i { width: 6px; height: 6px; border-radius: 50%; background: #3b4756; display: inline-block; }
.fp-leds i.on { background: var(--ok); }
.fp-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.fp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fp-key { width: 12px; height: 9px; border-radius: 2px; display: inline-block; background: #3b4756; }
.fp-key.up { background: #22c55e; } .fp-key.warn { background: #f59e0b; }
.fp-key.off { background: repeating-linear-gradient(45deg, #2b3746 0 3px, #1a232d 3px 6px); border: 1px solid #3a4a5c; }
.fp-tip { position: fixed; z-index: 70; background: #0b1016; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12px; white-space: pre-line; pointer-events: none; max-width: 380px; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.hl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.hl { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hl-t { align-self: flex-start; font-weight: 600; font-size: 13px; }
.hl-row { width: 100%; display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; }
.ring { width: 92px; height: 92px; }
.ring-bg { fill: none; stroke: #243241; stroke-width: 8; }
.ring-fg { fill: none; stroke-width: 8; stroke-linecap: round; stroke: var(--muted); }
.ring-fg.ok { stroke: var(--ok); } .ring-fg.warn { stroke: var(--warn); } .ring-fg.bad { stroke: var(--bad); }
.ring-txt { fill: var(--text); font-size: 19px; font-weight: 700; } .ring-unit { font-size: 10px; fill: var(--muted); font-weight: 500; }
.spark { width: 100%; height: 26px; } .spark polyline { fill: none; stroke: var(--muted); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.spark.ok polyline { stroke: var(--ok); } .spark.warn polyline { stroke: var(--warn); } .spark.bad polyline { stroke: var(--bad); }
div.spark { height: auto; text-align: center; }
.fans { display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: center; margin-top: 8px; }
.fan { display: flex; flex-direction: column; align-items: center; font-size: 11px; gap: 2px; }
.fan svg { width: 22px; height: 22px; fill: currentColor; }
.fan svg.spin { animation: fanspin 2.4s linear infinite; }
@keyframes fanspin { to { transform: rotate(360deg); } }
.hl.uptime { border-color: rgba(20,184,166,.45); background: linear-gradient(160deg, rgba(20,184,166,.10), var(--panel)); align-items: flex-start; }
.up-n { font-size: 30px; font-weight: 700; margin-top: 10px; }
.ok-t { color: var(--ok); } .bad-t { color: var(--bad); } .warn-t { color: var(--warn); }
.traffic { display: grid; grid-template-columns: 1fr 300px; gap: 14px; margin-top: 12px; }
.chart-box { position: relative; min-height: 280px; }
.chart .grid { stroke: #1f2a36; } .chart .axis { fill: var(--muted); font-size: 11px; }
.chart .ln { fill: none; stroke-width: 1.6; } .chart .ln.dash { stroke-dasharray: 4 3; opacity: .85; }
.chart .cursor { stroke: var(--muted); stroke-dasharray: 2 2; }
.chart-tip { position: absolute; top: 8px; background: #0b1016; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12px; pointer-events: none; min-width: 240px; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.chart-tip div { display: flex; align-items: center; gap: 6px; margin-top: 4px; } .chart-tip span { margin-left: auto; padding-left: 10px; font-family: 'JetBrains Mono', monospace; white-space: nowrap; }
.chart-tip i, .lg i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.legend { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.legend-list { max-height: 250px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.lg { display: flex; align-items: center; gap: 7px; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 12px; color: var(--muted); margin: 0; }
.lg:hover { background: var(--panel2); } .lg.on { color: var(--text); }
.lg input { width: auto; margin: 0; } .lg-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-v { font-family: 'JetBrains Mono', monospace; font-size: 11px; text-align: right; white-space: nowrap; }
.st { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.st.up { background: rgba(34,197,94,.14); color: var(--ok); } .st.down { background: rgba(239,68,68,.16); color: var(--bad); } .st.off { background: var(--panel2); color: var(--muted); }
tr.hl-row-on td { background: rgba(20,184,166,.14) !important; transition: background .3s; }
@media (max-width: 1100px) { .traffic { grid-template-columns: 1fr; } }

/* CGNAT */
.cg-mets { display: grid; grid-template-columns: 1fr; gap: 6px 12px; margin-top: 10px; font-size: 12px; }
.cg-mets div { display: flex; justify-content: space-between; gap: 6px; min-width: 0; } .cg-mets b { white-space: nowrap; } .cg-mets span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.cg-calc div { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.cg-calc b { display: block; font-size: 20px; } .cg-calc span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.cg-res { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 10px; }
.cg-res div { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.cg-res span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; } .cg-res b { font-size: 17px; }
.met-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.met-n { font-size: 26px; font-weight: 700; margin: 6px 0 4px; } .met-n small { font-size: 12px; color: var(--muted); margin-left: 4px; font-weight: 500; }
.met-chart { margin-top: 6px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
  .side .group, .side .foot { display: none; }
  .main { padding: 16px; }
  .grid2, .form-grid, .filters { grid-template-columns: 1fr; }
}
/* BGP */
.tbl-wrap { overflow-x: auto; }
.bgp-tbl td { vertical-align: middle; }
.bgp-row td:first-child { border-left: 3px solid var(--line); padding-left: 10px; }
.bgp-row.ok td:first-child { border-left-color: var(--ok); }
.bgp-row.bad td:first-child { border-left-color: var(--bad); } .bgp-row.bad { background: rgba(239,68,68,.06); }
.bgp-row.warn td:first-child { border-left-color: var(--warn); }
.bgp-row.off { opacity: .6; }
.bgp-sum .card.alert { border-color: rgba(239,68,68,.45); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: none; border: 0; color: var(--muted); padding: 5px 10px; cursor: pointer; font: inherit; font-size: 12px; }
.seg button.on { background: rgba(20,184,166,.16); color: var(--accent); }
.chart-box.sm { min-height: 220px; }
.bgp-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.bgp-legend span { display: inline-flex; align-items: center; gap: 6px; } .bgp-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.bgp-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.bar { height: 6px; border-radius: 4px; background: var(--panel2); margin: 8px 0 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok); } .bar i.warn { background: var(--warn); } .bar i.bad { background: var(--bad); }
@media (max-width: 1100px) { .bgp-2 { grid-template-columns: 1fr; } }
.bgp-2 > * { min-width: 0; }
.bgp-tbl td, .bgp-tbl th { white-space: nowrap; }
.bgp-tbl td .muted.small { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.btn.icon { padding: 2px 8px; } .bgp-tbl td, .bgp-tbl th { padding-left: 8px; padding-right: 8px; }
/* FTTX */
.nowrap { white-space: nowrap; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: var(--panel2); }
table.kv td { padding: 7px 8px; } table.kv td:first-child { width: 130px; }
.ft-tabs { overflow-x: auto; }
.ft-tabs a { white-space: nowrap; }
.ft-occ { display: grid; grid-template-columns: 80px 1fr 70px; align-items: center; gap: 10px; margin: 8px 0; }
.ft-occ .bar { margin: 0; } .ft-occ span { text-align: right; }
.ft-ranges { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.ft-rg { display: grid; grid-template-columns: 70px 1fr 48px; align-items: center; gap: 10px; }
.ft-rg span.small { text-align: right; }
.ft-track { position: relative; height: 10px; background: var(--panel2); border-radius: 5px; }
.ft-zone { position: absolute; top: 0; bottom: 0; background: rgba(245,158,11,.18); }
.ft-span { position: absolute; top: 3px; height: 4px; background: rgba(56,189,248,.55); border-radius: 2px; }
.ft-avg { position: absolute; top: -1px; width: 4px; height: 12px; border-radius: 2px; margin-left: -2px; background: var(--ok); }
.ft-avg.warn, .ft-avg.high { background: var(--warn); } .ft-avg.bad { background: var(--bad); }
.ft-tpl textarea { margin-top: 10px; }
@media (max-width: 860px) { .filters.ft-filters { grid-template-columns: 1fr 1fr; } .filters.ft-filters input { grid-column: 1 / -1; } }
.bgp-desc { font-weight: 600; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
/* CRM */
.crm-tabs { overflow-x: auto; white-space: nowrap; }
.seg button.active { background: rgba(20,184,166,.16); color: var(--accent); }
.crm-filter { display: flex; width: 100%; }
.crm-filter button { flex: 1; padding: 6px 2px; font-size: 12px; white-space: nowrap; }
.crm-n { display: inline-block; margin-left: 4px; font-size: 10.5px; background: var(--warn); color: #000; border-radius: 999px; padding: 0 5px; line-height: 15px; }
.crm-inbox { display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px; height: calc(100vh - 230px); min-height: 480px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.crm-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; padding: 10px; min-height: 0; }
.crm-items { overflow-y: auto; flex: 1; margin: 0 -10px -10px; }
.crm-item { display: flex; gap: 10px; padding: 10px 12px; color: var(--text); border-bottom: 1px solid var(--line); position: relative; }
.crm-item:hover { background: var(--panel2); } .crm-item.active { background: rgba(20,184,166,.12); }
.crm-av { width: 36px; height: 36px; border-radius: 50%; background: var(--panel2); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; flex: none; }
.crm-it-main { min-width: 0; flex: 1; }
.crm-it-top { display: flex; justify-content: space-between; gap: 6px; } .crm-it-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-it-prev { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; margin: 2px 0; }
.crm-it-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crm-chip { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); }
.crm-unread { position: absolute; right: 12px; bottom: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 11px; border-radius: 999px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; }
.crm-chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; }
.crm-pick { margin: auto; }
.crm-chat-head { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.crm-back, .crm-info-btn { display: none; }
.crm-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.crm-msg { max-width: min(560px, 80%); padding: 7px 10px 5px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); align-self: flex-start; overflow-wrap: anywhere; }
.crm-msg.out { align-self: flex-end; background: rgba(20,184,166,.16); border-color: rgba(20,184,166,.35); }
.crm-msg.note { align-self: flex-end; background: rgba(245,158,11,.10); border: 1px dashed rgba(245,158,11,.5); }
.crm-who { font-size: 11px; color: var(--muted); margin-bottom: 2px; } .crm-msg.note .crm-who { color: var(--warn); }
.crm-body { white-space: pre-wrap; }
.crm-meta { font-size: 11px; color: var(--muted); text-align: right; margin-top: 2px; } .crm-read { color: var(--info); }
.crm-err { color: var(--bad); font-size: 12px; margin-top: 4px; }
.crm-img { max-width: 100%; max-height: 300px; border-radius: 8px; display: block; margin-bottom: 4px; }
.crm-msg audio { max-width: 100%; height: 40px; }
.crm-doc { display: inline-block; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 4px; }
.crm-sys { text-align: center; } .crm-sys span { display: inline-block; font-size: 11.5px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.crm-compose { border-top: 1px solid var(--line); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.crm-compose.note { background: rgba(245,158,11,.06); }
.crm-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .crm-hint { margin-left: auto; }
.crm-file { margin: 0; display: inline-block; color: var(--text); font-size: 12.5px; }
.crm-input { display: flex; gap: 8px; align-items: flex-end; } .crm-input textarea { resize: none; max-height: 160px; }
.crm-winban { margin: 8px 10px 0; font-size: 12.5px; }
.crm-qr-pop { position: absolute; bottom: 110px; left: 10px; right: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; max-height: 240px; overflow-y: auto; z-index: 5; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.crm-qr-it { padding: 8px 10px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .crm-qr-it.sel, .crm-qr-it:hover { background: var(--panel2); }
.crm-side { border-left: 1px solid var(--line); overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.crm-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--bg); }
.crm-card table.kv td:first-child, .crm-cd table.kv td:first-child { width: 92px; color: var(--muted); }
.crm-net { border-left: 3px solid var(--line); padding: 6px 8px; margin-top: 8px; background: var(--panel); border-radius: 6px; }
.crm-net.ok { border-left-color: var(--ok); } .crm-net.bad { border-left-color: var(--bad); }
.crm-mini { display: block; padding: 5px 0; border-bottom: 1px solid var(--line); color: var(--text); font-size: 12.5px; } .crm-mini.cur { color: var(--accent); }
.crm-nc a { display: block; padding: 6px 8px; border-bottom: 1px solid var(--line); color: var(--text); } .crm-nc a:hover { background: var(--panel2); }
.crm-nc { max-height: 220px; overflow-y: auto; }
.crm-tpl-prev { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-top: 10px; font-size: 13px; }
.crm-tpl-prev:empty { display: none; }
.crm-late td:first-child { border-left: 3px solid var(--bad); }
.card.alert { border-color: rgba(239,68,68,.45); }
.crm-timeline { border-left: 2px solid var(--line); padding-left: 12px; display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.crm-ev.comment div { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin-top: 2px; white-space: pre-wrap; }
.crm-kanban { display: grid; grid-template-columns: repeat(6, minmax(165px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.crm-col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 300px; }
.crm-col-h { padding: 10px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.crm-col-b { padding: 8px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.crm-deal { background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--info); border-radius: 8px; padding: 8px 10px; cursor: pointer; position: relative; display: flex; flex-direction: column; gap: 3px; }
.crm-deal.ganho { border-left-color: var(--ok); } .crm-deal.perdido { border-left-color: var(--bad); opacity: .75; }
.crm-deal.dragging { opacity: .4; }
.crm-x { position: absolute; top: 4px; right: 6px; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; display: none; } .crm-deal:hover .crm-x { display: block; }
.crm-task { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.crm-task input[type=checkbox] { width: 18px; height: 18px; } .crm-task.done b { text-decoration: line-through; color: var(--muted); }
.crm-h3 { font-size: 15px; margin: 8px 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.crm-bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; }
.crm-bar { flex: 1; max-width: 36px; display: flex; align-items: flex-end; gap: 1px; height: 100%; position: relative; }
.crm-bar i { flex: 1; min-height: 1px; border-radius: 2px 2px 0 0; } .crm-bar i.rcv { background: var(--info); } .crm-bar i.snt { background: var(--accent); }
.crm-bars.hours { padding-bottom: 16px; } .crm-bars.hours span { position: absolute; bottom: -16px; left: 0; font-size: 10px; color: var(--muted); }
.crm-cfg { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; }
.crm-cfg-nav { display: flex; flex-direction: column; gap: 2px; }
.crm-cfg-nav a { padding: 8px 10px; border-radius: 8px; color: var(--text); } .crm-cfg-nav a.active { background: rgba(20,184,166,.14); color: var(--accent); }
.crm-chcard table.kv td:first-child { width: 190px; color: var(--muted); }
.crm-botopt { display: grid; grid-template-columns: 56px 1fr 1fr 1fr auto; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; }
.crm-botopt textarea { grid-column: 1 / -1; }
.crm-qrbox { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.crm-qrimg { background: #fff; border-radius: 10px; min-width: 250px; min-height: 250px; display: grid; place-items: center; }
.crm-qrimg .muted { color: #555; } .crm-qrimg svg { display: block; }
.crm-qr-ok { font-size: 90px; color: var(--ok); }
.crm-qrbox ol { flex: 1; min-width: 220px; line-height: 1.6; }
@media (max-width: 1280px) {
  .crm-inbox { grid-template-columns: 280px minmax(0, 1fr); }
  .crm-side { display: none; }
  .crm-info-btn { display: inline-block; }
  .crm-inbox.show-side { grid-template-columns: 280px minmax(0, 1fr) 300px; }
  .crm-inbox.show-side .crm-side { display: flex; }
}
@media (max-width: 860px) {
  .crm-inbox, .crm-inbox.show-side { grid-template-columns: 1fr; }
  .crm-inbox.has-conv .crm-list { display: none; }
  .crm-inbox:not(.has-conv) .crm-chat { display: none; }
  .crm-inbox.show-side .crm-chat { display: none; }
  .crm-back { display: inline-block; }
  .crm-hint { display: none; }
  .crm-cfg { grid-template-columns: 1fr; } .crm-cfg-nav { flex-direction: row; overflow-x: auto; white-space: nowrap; }
  .crm-botopt { grid-template-columns: 56px 1fr auto; } .crm-botopt select { grid-column: span 3; }
  .crm-msg { max-width: 90%; }
}
.crm-side-close { display: none; align-self: flex-start; }
@media (max-width: 1280px) { .crm-side-close { display: inline-block; } }

/* alertas */
.al-tpl { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.al-list { max-height: calc(100vh - 220px); overflow: auto; padding: 10px; position: sticky; top: 10px; }
.al-list input { margin-bottom: 6px; }
.al-list .al-g { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 6px 4px; }
.al-list a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; color: var(--text); font-size: 13px; }
.al-list a:hover { background: var(--panel2); }
.al-list a.active { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.al-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.al-dot.ok { background: var(--ok); } .al-dot.warn { background: var(--warn); } .al-dot.bad { background: var(--bad); }
.al-msg { background: #0f2a22; border: 1px solid #1f4d3f; border-radius: 10px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; max-width: 560px; }
.al-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.al-vars button { cursor: pointer; font-family: ui-monospace, monospace; }
.al-mute { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.al-groups { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; max-height: 180px; overflow: auto; }
.al-groups a { padding: 6px 10px; color: var(--text); font-size: 13px; }
.al-groups a:hover { background: var(--panel2); }
@media (max-width: 900px) { .al-tpl { grid-template-columns: 1fr; } .al-list { position: static; max-height: 260px; } }

/* segurança */
.sec-find { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.sec-find:last-child { border-bottom: 0; }
.sec-bar { height: 6px; background: var(--panel2); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.sec-bar div { height: 100%; background: var(--accent); transition: width .4s; }
.sec-devlist { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; }
.sec-devlist label { margin: 6px 0; }
.sec-score { text-align: center; min-width: 90px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); }
.sec-score .n { font-size: 30px; font-weight: 700; }
.sec-score .l { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sec-score.bad { border-color: var(--bad); } .sec-score.bad .n { color: var(--bad); }
.sec-score.warn { border-color: var(--warn); } .sec-score.warn .n { color: var(--warn); }
.sec-score.ok .n { color: var(--ok); }
.sec-fix { white-space: pre-wrap; word-break: break-word; font-size: 11.5px; color: var(--text); background: var(--panel2); padding: 2px 6px; border-radius: 4px; display: inline-block; }
.sec-search { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; margin-top: 16px; }
.sec-facet { margin-bottom: 14px; display: flex; flex-direction: column; }
.sec-facet a { display: flex; justify-content: space-between; padding: 3px 6px; border-radius: 6px; color: var(--text); font-size: 13px; }
.sec-facet a:hover { background: var(--panel2); }
.sec-protos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 16px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; }
.sec-gap { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; }
.sec-cmd { background: #0a0f14; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: 12px; white-space: pre-wrap; margin: 8px 0 0; }
tr.sel td { background: color-mix(in srgb, var(--accent) 10%, transparent); }
@media (max-width: 900px) { .sec-search { grid-template-columns: 1fr; } }
@media print { .side, .topbar .row, .tabs, .btn { display: none !important; } .main { padding: 0 !important; } }

/* ---------- painel CGNAT A10 */
.cg-head { display: flex; gap: 16px; align-items: stretch; margin-bottom: 16px; flex-wrap: wrap; }
.cg-id { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 20px; min-width: 0; }
.cg-id div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cg-id span, .cg-status span, .cg-sess-grid span, .cg-lat span, .cg-err-n span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.cg-id b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-status { min-width: 170px; border-radius: 10px; padding: 14px 18px; display: flex; flex-direction: column; justify-content: center; gap: 4px; background: var(--panel2); border: 1px solid var(--line); }
.cg-status b { font-size: 26px; }
.cg-status small { color: var(--muted); }
.cg-status.up { background: rgba(34,197,94,.10); border-color: rgba(34,197,94,.45); } .cg-status.up b { color: var(--ok); }
.cg-status.down { background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.45); } .cg-status.down b { color: var(--bad); }
.cg-row2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 16px; }
.cg-sess-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 10px; }
.cg-sess-grid div { display: flex; flex-direction: column; gap: 6px; background: var(--panel2); border-radius: 10px; padding: 14px; }
.cg-sess-grid b { font-size: 30px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.cg-sec { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 0 10px; font-weight: 600; }
.cg-t { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-bottom: 8px; }
.cg-health { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cg-gcard { display: flex; flex-direction: column; }
.cg-gauge { width: 150px; margin: 0 auto; display: block; }
.cg-g-bg { fill: none; stroke: var(--panel2); stroke-width: 12; stroke-linecap: round; }
.cg-g-fg { fill: none; stroke-width: 12; stroke-linecap: round; }
.cg-g-txt { fill: var(--text); font-size: 22px; font-weight: 700; } .cg-g-unit { fill: var(--muted); font-size: 12px; }
.cg-gsub { text-align: center; min-height: 18px; }
.cg-mini { position: relative; margin-top: auto; padding-top: 8px; min-height: 70px; min-width: 0; }
.cg-stat, .cg-gcard { min-width: 0; display: flex; flex-direction: column; }
.cg-empty-chart { color: var(--muted); font-size: 12px; padding: 16px 8px; text-align: center; }
.cg-tip { min-width: 140px; }
.cg-lat { display: flex; justify-content: space-around; padding: 14px 0 6px; }
.cg-lat div { display: flex; flex-direction: column; align-items: center; gap: 4px; } .cg-lat b { font-size: 26px; }
.cg-q-row { padding: 8px 0; border-bottom: 1px solid var(--line); } .cg-q-row:last-child { border-bottom: 0; }
.cg-q-top { display: flex; align-items: center; gap: 10px; } .cg-q-top b { margin-left: auto; font-variant-numeric: tabular-nums; }
.cg-q-pos { width: 20px; height: 20px; border-radius: 50%; background: var(--panel2); display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.cg-q-bar { height: 6px; background: var(--panel2); border-radius: 4px; margin: 6px 0 4px; overflow: hidden; }
.cg-q-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--warn) 70%, var(--bad)); }
.cg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cg-big { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cg-chart-lg { position: relative; min-height: 200px; margin-top: 10px; }
.cg-if-err { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 12px; }
.cg-err.bad { border-color: rgba(239,68,68,.5); }
.cg-err-n { display: flex; gap: 16px; margin-bottom: 6px; } .cg-err-n div { display: flex; flex-direction: column; gap: 2px; } .cg-err-n b { font-size: 20px; }
.cg-if-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 8px; }
.cg-tile { border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); background: var(--panel); }
.cg-tile.up { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.4); } .cg-tile.up b { color: var(--ok); }
.cg-tile.down { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.4); } .cg-tile.down b { color: var(--bad); }
.cg-tile.off b, .cg-tile.unk b { color: var(--muted); }
.cg-hw { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 12px; margin-bottom: 16px; }
.cg-list div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); } .cg-list div:last-child { border-bottom: 0; }
.cg-temp #cg-temp { position: relative; margin-top: 6px; }
.cg-pre { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 0 0 14px 26px; }
.cg-cli summary { cursor: pointer; }
@media (max-width: 900px) { .cg-head { flex-direction: column; } .cg-row2, .cg-hw { grid-template-columns: 1fr; } .cg-sess-grid b { font-size: 24px; } }

/* ---------- IRR */
.irr-cards { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.irr-card { color: var(--text); text-align: center; } .irr-card:hover { border-color: var(--accent); }
.irr-filters { gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.irr-type { display: inline-block; font-size: 11px; font-family: 'JetBrains Mono', monospace; padding: 2px 8px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); }
.irr-type.t-route, .irr-type.t-route6 { color: #f472b6; border-color: rgba(244,114,182,.35); }
.irr-type.t-autnum { color: var(--accent); border-color: rgba(20,184,166,.35); }
.irr-type.t-asset, .irr-type.t-routeset { color: var(--warn); border-color: rgba(245,158,11,.35); }
.irr-type.t-person, .irr-type.t-role, .irr-type.t-mntner { color: var(--info); border-color: rgba(56,189,248,.35); }
.irr-act .btn { padding: 4px 10px; }
.irr-edit { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; }
.irr-fields textarea { min-height: 40px; }
.irr-f-multi textarea { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; }
.irr-edit-r { position: sticky; top: 0; align-self: start; }
.irr-pre { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow: auto; margin: 8px 0; }
.irr-whois { min-height: 260px; max-height: 620px; }
.irr-hint { margin-top: 8px; }
.irr-diff { background: var(--panel2); border-radius: 8px; padding: 10px 12px; margin-top: 10px; } .irr-diff .add { color: var(--ok); } .irr-diff .del { color: var(--bad); }
.irr-rpki { margin-top: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.irr-prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 12px; }
.irr-kv { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; } .irr-kv span { color: var(--muted); } .irr-kv b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.irr-val { border-left: 3px solid var(--line); padding: 6px 10px; margin-bottom: 8px; } .irr-val.ok { border-color: var(--ok); } .irr-val.bad { border-color: var(--bad); }
@media (max-width: 900px) { .irr-edit { grid-template-columns: 1fr; } }

/* ---------- FTTX: busca global e migração */
.ftg-card { color: var(--text); text-align: center; cursor: pointer; } .ftg-card:hover { border-color: var(--accent); }
.ftg-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; margin-bottom: 12px; }
.ftg-filters label { margin-top: 0; }
.ftg-q { grid-column: 1 / -1; }
.ftm-steps { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.ftm-steps > div { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.ftm-steps > div b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--panel2); font-size: 11px; }
.ftm-steps > div.on { border-color: var(--accent); color: var(--text); } .ftm-steps > div.on b { background: var(--accent); color: #fff; }
.ftm-steps > div.done { color: var(--ok); } .ftm-steps > div.done b { background: rgba(34,197,94,.18); }
.ftm-steps .btn { margin-left: auto; }
.ftm-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 12px; }
.ftm-sum > div { background: var(--panel2); border-radius: 8px; padding: 8px 12px; } .ftm-sum span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ftm-job { margin-top: 12px; }

/* ---------- FTTX: mapa da rede */
.geo-empty { max-width: 720px; }
.geo-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.geo-bar input, .geo-bar select { padding: 6px 9px; font-size: 13px; }
.geo-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.geo-main { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 12px; height: calc(100vh - 250px); min-height: 460px; }
.geo-mapwrap { position: relative; isolation: isolate; z-index: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-height: 0; }
#geo-map { position: absolute; inset: 0; background: #e5e7eb; }
#geo-map.geo-cross { cursor: crosshair; }
#geo-map.geo-cross .leaflet-interactive { cursor: crosshair; }
.geo-hint { position: absolute; z-index: 800; top: 10px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 120px); display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.geo-side { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; overflow: auto; min-height: 0; }
.geo-tabs { display: flex; gap: 4px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.geo-tabs a { padding: 6px 8px; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.geo-tabs a.active { color: var(--text); border-color: var(--accent); }
.geo-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 6px; }
.geo-layer { display: flex !important; align-items: center; gap: 8px; padding: 5px 0; margin: 0 !important; font-size: 13px; cursor: pointer; }
.geo-layer input { width: auto; margin: 0; } .geo-layer span:not(.geo-pin):not(.geo-line):not(.geo-cdot) { flex: 1; } .geo-layer b { font-weight: 500; color: var(--muted); }
.geo-leg div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 3px 0; }
.geo-line { display: inline-block; width: 22px; height: 0; }
.geo-cdot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #0b1220; margin: 0 3px; }
.geo-pin { display: grid; place-items: center; border-radius: 50%; background: var(--c); color: #fff; font: 700 11px/1 Inter, system-ui, sans-serif; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); box-sizing: border-box; }
.geo-pin.geo-k-pop { border-radius: 6px; }
.geo-pin.geo-k-ceo { border-radius: 4px; transform: rotate(45deg); } .geo-pin.geo-k-ceo { font-size: 0; }
.geo-pin.high { box-shadow: 0 0 0 3px #f59e0b, 0 1px 4px rgba(0,0,0,.45); }
.geo-pin.full { box-shadow: 0 0 0 3px #ef4444, 0 1px 4px rgba(0,0,0,.45); }
.geo-pin.geo-moving, .geo-moving .geo-pin { outline: 3px dashed #f472b6; outline-offset: 2px; }
.geo-pop { font: 13px/1.4 Inter, system-ui, sans-serif; min-width: 230px; }
.geo-pop-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .geo-pop-h b { font-size: 14px; }
.geo-chip { font-size: 10.5px; padding: 2px 7px; border-radius: 6px; color: #fff; background: var(--c); white-space: nowrap; }
.geo-kv { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px solid rgba(148,163,184,.18); font-size: 12.5px; }
.geo-kv span { color: var(--muted); } .geo-kv b { font-weight: 500; text-align: right; }
.geo-pop-a { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; } .geo-pop-a .btn { padding: 4px 8px; font-size: 12px; }
.geo-cl { margin-top: 8px; font-size: 12.5px; } .geo-cl summary { cursor: pointer; color: var(--accent); } .geo-cl a { display: block; padding: 2px 0; }
.geo-res { display: flex; flex-direction: column; padding: 7px 8px; border-radius: 8px; color: var(--text); } .geo-res:hover { background: var(--panel2); } .geo-res span { font-size: 12px; }
.geo-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.geo-stats div { background: var(--panel2); border-radius: 8px; padding: 8px 10px; } .geo-stats b { display: block; font-size: 18px; } .geo-stats span { font-size: 11.5px; color: var(--muted); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.leaflet-popup-content { margin: 12px 14px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-tooltip { font-size: 12px; }
@media (max-width: 900px) { .geo-main { grid-template-columns: 1fr; height: auto; } .geo-mapwrap { height: 65vh; } .geo-side { max-height: none; } .geo-hint { max-width: calc(100% - 20px); } }

/* ---------- Virtualização */
.vz-empty { max-width: 680px; }
.vz-bar-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; }
.vz-bar-top .sp, .vz-nh .sp { flex: 1; }
.vz-seg { display: inline-flex; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.vz-seg button { background: none; border: 0; color: var(--muted); padding: 4px 10px; border-radius: 6px; font: inherit; font-size: 12.5px; cursor: pointer; }
.vz-seg button.on { background: var(--accent); color: #fff; }
.vz-cards { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.vz-cards .n small { font-size: 15px; color: var(--muted); font-weight: 500; }
.vz-gcard { display: flex; align-items: center; gap: 10px; text-align: left; }
.vz-gcard .cg-gauge { width: 96px; flex: none; }
.vz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.vz-main { min-width: 0; }
.vz-row2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.vz-chart { margin-top: 10px; min-height: 180px; position: relative; }
.vz-donut { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.vz-dn { font-size: 26px; font-weight: 700; fill: var(--text); } .vz-dl { font-size: 11px; fill: var(--muted); }
.vz-leg { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; min-width: 130px; } .vz-leg i { width: 10px; height: 10px; border-radius: 3px; } .vz-leg b { margin-left: auto; }
.vz-st { padding: 7px 0; border-bottom: 1px solid var(--line); } .vz-st:last-child { border-bottom: 0; }
.vz-bar { display: flex; align-items: center; gap: 8px; min-width: 130px; } .vz-bar .bar { flex: 1; margin: 0; min-width: 50px; } .vz-bar span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.vz-tops { display: grid; gap: 12px; }
.vz-top h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 4px; }
.vz-topi { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; font-size: 13px; color: var(--text); border-bottom: 1px dashed var(--line); } .vz-topi b { font-weight: 500; color: var(--muted); white-space: nowrap; }
.vz-node { border: 1px solid var(--line); border-radius: 10px; margin-top: 10px; overflow: hidden; }
.vz-nh { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--panel2); color: var(--text); flex-wrap: wrap; }
.vz-car { width: 12px; color: var(--muted); }
.vz-t td { vertical-align: middle; } .vz-t th { white-space: nowrap; }
.vz-tpl { opacity: .6; }
.vz-side .panel h2 { margin-bottom: 8px; }
.vz-al { border-left: 3px solid var(--muted); padding: 5px 10px; margin-bottom: 6px; } .vz-al.critico { border-color: var(--bad); } .vz-al.aviso { border-color: var(--warn); } .vz-al.info { border-color: var(--info); }
.vz-h { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; } .vz-h .dot { margin-top: 6px; }
.vz-act { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; } .vz-act:last-child { border-bottom: 0; } .vz-act.fail div:first-child { color: var(--bad); }
.vz-vmhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.vz-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin-bottom: 12px; }
.vz-kv div { background: var(--panel2); border-radius: 8px; padding: 8px 10px; } .vz-kv span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; } .vz-kv b { font-weight: 500; }
.vz-help { line-height: 1.6; }
@media (max-width: 1200px) { .vz-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .vz-row2 { grid-template-columns: 1fr; } }
.dot.warn { background: var(--warn); } .dot.unknown { background: var(--muted); }
.vz-inv-panel { margin-top: 0; } .vz-net { white-space: nowrap; } .vz-t td:first-child { min-width: 160px; }
.vz-snadd { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; } @media (max-width: 700px) { .vz-snadd { grid-template-columns: 1fr; } }
.login-lang { margin-top: 14px; display: flex; justify-content: center; } .login-lang select { width: auto; font-size: 12.5px; padding: 4px 8px; background: transparent; }

/* ping (ICMP) */
.ic-card { cursor: pointer; }
.ic-card.sel { outline: 2px solid var(--accent); }
.ic-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.ic-filters input { max-width: 260px; }
.ic-filters select { max-width: 220px; }
.ic-table td { vertical-align: middle; }
.ic-spark { display: block; }
.ic-err { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic-batchbar { gap: 10px; flex-wrap: wrap; padding: 8px 10px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(20,184,166,.06); }
.ic-batchbar select { width: auto; }
.ic-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.ib-list { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.ib-item { display: block; padding: 4px 0; }
.ic-unit { flex-wrap: nowrap; gap: 6px; align-items: center; }
.ic-unit input { flex: 1; min-width: 0; }
.ic-unit span { white-space: nowrap; }

/* chave liga/desliga */
.tgl { position: relative; display: inline-block; width: 34px; height: 19px; vertical-align: middle; cursor: pointer; }
.tgl input { opacity: 0; width: 0; height: 0; position: absolute; }
.tgl span { position: absolute; inset: 0; background: var(--line); border-radius: 19px; transition: background .15s; }
.tgl span::before { content: ''; position: absolute; width: 15px; height: 15px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.tgl input:checked + span { background: var(--ok); }
.tgl input:checked + span::before { transform: translateX(15px); }
.tgl input:disabled + span { opacity: .5; cursor: default; }
.tgl input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.id-tbl { width: 100%; }
.id-tbl td, .id-tbl th { padding: 6px 8px; text-align: left; }

/* MikroTik Manager */
.mk-tabs { flex-wrap: wrap; }
.mk-sub { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; }
.mk-sub a { padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line); color: var(--text); font-size: 13px; }
.mk-sub a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.mk-table td { vertical-align: middle; }
.mk-table tr.mk-invalid td { color: var(--bad); }
.mk-ov { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-top: 16px; }
.mk-ov h3 { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.mk-kv { width: 100%; }
.mk-kv td { padding: 5px 8px; border-bottom: 1px solid var(--line); }
.mk-card .dot { margin-right: 4px; }
@media (max-width: 800px) { .mk-ov { grid-template-columns: 1fr; } }
