/*
 * ipam-scoped.css — Estilos do módulo IPAM/DCIM, TODOS escopados sob `.ipam-scope`
 * para NÃO vazar no NexusAtlas (o host usa Tailwind e classes próprias). Baseado
 * em ipam/css/ipam.css, mas sem seletores globais (body/html/*) e com o shell
 * nativo da aba (layout de sidebar + topbar em fluxo, respeitando o header).
 * Paleta NexusAtlas: sky #0EA5E9 · orange #F97316 · navy #0C1426 · slate.
 */
.ipam-scope {
  --primary: #0ea5e9; --primary-dark: #0284c7; --accent: #f97316; --success: #22c55e;
  --danger: #ef4444; --bg: #0c1426; --surface: #1e293b; --surface-light: #334155;
  --text: #f8fafc; --muted: #94a3b8; --border: rgba(148, 163, 184, 0.15);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 14px;
}
.ipam-scope, .ipam-scope * { box-sizing: border-box; }
.ipam-scope .hidden { display: none !important; }
.ipam-scope button { font-family: inherit; cursor: pointer; }
.ipam-scope input, .ipam-scope select, .ipam-scope textarea {
  font-family: inherit; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 9px 12px; outline: none; width: 100%;
}
.ipam-scope input:focus, .ipam-scope select:focus, .ipam-scope textarea:focus { border-color: var(--primary); }
.ipam-scope label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 4px; }
.ipam-scope option { background: var(--surface); color: var(--text); }

.ipam-scope .glass { background: rgba(30, 41, 59, 0.6); backdrop-filter: blur(10px); border: 1px solid var(--border); }

/* Botões */
.ipam-scope .btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent; border-radius: 8px; padding: 8px 14px; font-weight: 600; font-size: 13px; color: var(--text); background: var(--surface-light); transition: filter .15s, background .15s; }
.ipam-scope .btn:hover { filter: brightness(1.15); }
.ipam-scope .btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.ipam-scope .btn-accent { background: var(--accent); }
.ipam-scope .btn-danger { background: var(--danger); }
.ipam-scope .btn-ghost { background: transparent; border-color: var(--border); }
.ipam-scope .btn-sm { padding: 5px 10px; font-size: 12px; }

/* ── Shell NATIVO da aba (sidebar + topbar em fluxo) ── */
.ipam-scope .ipam-layout { display: grid; grid-template-columns: 232px 1fr; gap: 16px; align-items: start; }
.ipam-scope .ipam-side { position: sticky; top: 0; align-self: start; max-height: calc(100vh - 130px); overflow-y: auto; background: rgba(10,16,31,.5); border: 1px solid var(--border); border-radius: 16px; padding: 10px; }
.ipam-scope .ipam-side::-webkit-scrollbar { width: 6px; }
.ipam-scope .ipam-side::-webkit-scrollbar-thumb { background: var(--surface-light); border-radius: 3px; }
.ipam-scope .ipam-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ipam-scope .ipam-bar .ttl { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.ipam-scope .ipam-host { min-height: 300px; }
.ipam-scope .ipam-mobsel { display: none; }
.ipam-scope .nav-group { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; padding: 12px 10px 5px; opacity: .7; }
.ipam-scope .nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 13px; margin-bottom: 2px; border: none; background: transparent; width: 100%; text-align: left; cursor: pointer; }
.ipam-scope .nav-item:hover { background: rgba(148,163,184,.08); color: var(--text); }
.ipam-scope .nav-item.active { background: rgba(14,165,233,.14); color: var(--primary); }
.ipam-scope .nav-item i { width: 18px; text-align: center; }
.ipam-scope .nav-item span { flex: 1; }

/* Cards / KPIs */
.ipam-scope .kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.ipam-scope .kpi { padding: 16px; border-radius: 13px; }
.ipam-scope .kpi .v { font-size: 26px; font-weight: 800; }
.ipam-scope .kpi .l { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ipam-scope .card { border-radius: 13px; padding: 16px; }

/* Árvore de sub-redes */
.ipam-scope .tree { list-style: none; margin: 0; padding: 0; }
.ipam-scope .tree .row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.ipam-scope .tree .row:hover { background: rgba(148,163,184,.07); }
.ipam-scope .tree .row.sel { background: rgba(14,165,233,.14); border-color: rgba(14,165,233,.3); }
.ipam-scope .tree .caret { width: 14px; color: var(--muted); transition: transform .12s; }
.ipam-scope .tree .caret.open { transform: rotate(90deg); }
.ipam-scope .tree .cidr { font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 700; }
.ipam-scope .tree .children { margin-left: 16px; border-left: 1px solid var(--border); padding-left: 4px; list-style: none; }
.ipam-scope .badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px; text-transform: uppercase; letter-spacing: .4px; }
.ipam-scope .badge.v4 { background: rgba(14,165,233,.18); color: var(--primary); }
.ipam-scope .badge.v6 { background: rgba(249,115,22,.18); color: var(--accent); }
.ipam-scope .badge.danger { background: rgba(239, 68, 68, .18); color: #fca5a5; }
.ipam-scope .badge.muted { background: rgba(148, 163, 184, .15); color: var(--muted); }
.ipam-scope .pill { font-size: 11px; color: var(--muted); }

/* Barra de utilização */
.ipam-scope .util-bar { height: 8px; border-radius: 5px; background: var(--surface-light); overflow: hidden; }
.ipam-scope .util-fill { height: 100%; background: linear-gradient(90deg, var(--success), var(--primary)); }
.ipam-scope .util-fill.high { background: linear-gradient(90deg, var(--accent), var(--danger)); }

/* Grade de ocupação de IPs */
.ipam-scope .ip-grid { display: grid; grid-template-columns: repeat(auto-fill, 34px); gap: 4px; }
.ipam-scope .ip-cell { width: 34px; height: 26px; border-radius: 5px; font-size: 9px; display: grid; place-items: center; cursor: pointer; user-select: none; background: rgba(34,197,94,.14); color: #86efac; border: 1px solid transparent; }
.ipam-scope .ip-cell.used { background: rgba(239,68,68,.18); color: #fca5a5; }
.ipam-scope .ip-cell.reserved { background: rgba(249,115,22,.18); color: #fdba74; }
.ipam-scope .ip-cell.gateway { background: rgba(14,165,233,.22); color: #7dd3fc; font-weight: 700; }
.ipam-scope .ip-cell:hover { border-color: var(--primary); }

/* Tabela */
.ipam-scope table.tbl { width: 100%; border-collapse: collapse; }
.ipam-scope .tbl th, .ipam-scope .tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); }
.ipam-scope .tbl th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.ipam-scope .tbl tr:hover td { background: rgba(148,163,184,.05); }
.ipam-scope .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* Modal (montado em #modal-root.ipam-scope no body) */
.ipam-scope .modal-backdrop { position: fixed; inset: 0; background: rgba(2,6,23,.72); display: grid; place-items: center; z-index: 100000; padding: 20px; }
.ipam-scope .modal { width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; max-height: 90vh; overflow: auto; }
.ipam-scope .modal h3 { margin: 0 0 16px; font-size: 17px; }
.ipam-scope .modal .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ipam-scope .modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.ipam-scope .field { margin-bottom: 12px; }
.ipam-scope .hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.ipam-scope .err { color: var(--danger); font-size: 12px; margin-top: 6px; }
.ipam-scope .auto-badge { font-size: 9px; font-weight: 700; color: var(--accent); background: rgba(249, 115, 22, .14); padding: 1px 5px; border-radius: 5px; margin-left: 6px; }
.ipam-scope .form-grid { display: grid; gap: 12px; }
.ipam-scope .form-grid .field { margin-bottom: 0; }

/* Toast (montado em #toast-wrap.ipam-scope no body) */
#toast-wrap.ipam-scope { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100001; }
.ipam-scope .toast { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--primary); padding: 12px 18px; border-radius: 10px; margin-top: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.4); font-size: 13px; min-width: 260px; color: var(--text); }
.ipam-scope .toast.ok { border-left-color: var(--success); }
.ipam-scope .toast.err { border-left-color: var(--danger); }

.ipam-scope .empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.ipam-scope .spinner { width: 22px; height: 22px; border: 3px solid var(--surface-light); border-top-color: var(--primary); border-radius: 50%; animation: ipam-spin .7s linear infinite; }
@keyframes ipam-spin { to { transform: rotate(360deg); } }

/* Rack (DCIM) */
.ipam-scope .rack { display: inline-block; background: #0a101f; border: 1px solid var(--border); border-radius: 8px; padding: 8px; width: 180px; vertical-align: top; }
.ipam-scope .rack-u { height: 20px; border: 1px solid var(--border); border-radius: 3px; margin-bottom: 2px; font-size: 9px; display: flex; align-items: center; padding: 0 4px; color: var(--muted); background: rgba(148,163,184,.04); }
.ipam-scope .rack-u.filled { background: linear-gradient(90deg, rgba(14,165,233,.25), rgba(14,165,233,.1)); color: var(--text); font-weight: 600; }
.ipam-scope .topo-canvas { width: 100%; height: 520px; background: #0a101f; border: 1px solid var(--border); border-radius: 12px; }

/* ═══════════════════════ Painel (Dashboard) ═══════════════════════ */
.ipam-scope .dash { display: flex; flex-direction: column; gap: 20px; }
.ipam-scope .dash-sec-h { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 800; letter-spacing: .3px; color: var(--text); margin-bottom: 12px; }
.ipam-scope .dash-sec-h i { color: var(--primary); }
.ipam-scope .dash-sec-h .sp { flex: 1; }
.ipam-scope .hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.ipam-scope .hero-card { position: relative; overflow: hidden; border-radius: 18px; padding: 18px 20px; color: #fff; box-shadow: 0 12px 34px rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.10); min-height: 118px; }
.ipam-scope .hero-card .hero-ic { position: absolute; right: -8px; bottom: -14px; font-size: 82px; opacity: .14; transform: rotate(-8deg); }
.ipam-scope .hero-card .hero-v { font-size: 34px; font-weight: 900; line-height: 1.05; letter-spacing: -.02em; }
.ipam-scope .hero-card .hero-l { font-size: 12.5px; font-weight: 800; opacity: .95; margin-top: 4px; text-transform: uppercase; letter-spacing: .4px; }
.ipam-scope .hero-card .hero-s { font-size: 11.5px; opacity: .85; margin-top: 5px; font-weight: 600; }
.ipam-scope .dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.ipam-scope .dash-grid.two { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.ipam-scope .chart-card { border-radius: 16px; padding: 18px; }
.ipam-scope .chart-card h4 { margin: 0 0 14px; font-size: 13.5px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.ipam-scope .chart-card h4 i { color: var(--primary); font-size: 13px; }
.ipam-scope .chart-card h4 .cnt { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted); }

/* IPs públicos — seção de destaque (topo do painel) */
.ipam-scope .pub-card { border: 1px solid rgba(14,165,233,.35); background: linear-gradient(135deg, rgba(14,165,233,.10), rgba(249,115,22,.06)); }
.ipam-scope .pub-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ipam-scope .pub-stat { flex: 1 1 130px; min-width: 120px; background: rgba(2,6,23,.35); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.ipam-scope .pub-stat-v { font-size: 22px; font-weight: 900; letter-spacing: -.02em; line-height: 1.1; }
.ipam-scope .pub-stat-l { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 3px; text-transform: uppercase; letter-spacing: .3px; }
.ipam-scope .pub-table-wrap { overflow-x: auto; border-radius: 12px; }
.ipam-scope .pub-table-wrap .tbl { min-width: 720px; }
.ipam-scope .pub-util { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.ipam-scope .pub-util .util-bar { flex: 1; }
.ipam-scope .pub-util-pct { font-size: 12px; font-weight: 800; min-width: 34px; text-align: right; }
.ipam-scope .donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ipam-scope .donut { width: 148px; height: 148px; border-radius: 50%; position: relative; display: grid; place-items: center; flex-shrink: 0; }
.ipam-scope .donut::after { content: ''; position: absolute; width: 63%; height: 63%; border-radius: 50%; background: #0b1322; box-shadow: inset 0 0 0 1px var(--border); }
.ipam-scope .donut-c { position: relative; z-index: 1; text-align: center; }
.ipam-scope .donut-c .big { font-size: 26px; font-weight: 900; letter-spacing: -.02em; }
.ipam-scope .donut-c .small { font-size: 10.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.ipam-scope .legend { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 130px; }
.ipam-scope .legend-item { display: flex; align-items: center; gap: 9px; font-size: 12.5px; }
.ipam-scope .legend-item .dot { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.ipam-scope .legend-item .lg-l { color: var(--text); font-weight: 600; }
.ipam-scope .legend-item .lg-v { margin-left: auto; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.ipam-scope .bars { display: flex; flex-direction: column; gap: 12px; }
.ipam-scope .bar-row .bar-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.ipam-scope .bar-row .bar-name { font-size: 12.5px; font-weight: 700; color: var(--text); }
.ipam-scope .bar-row .bar-sub { font-size: 11px; color: var(--muted); }
.ipam-scope .bar-row .bar-val { margin-left: auto; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ipam-scope .bar-track { height: 9px; border-radius: 6px; background: var(--surface-light); overflow: hidden; }
.ipam-scope .bar-fill { height: 100%; border-radius: 6px; transition: width .5s ease; }
.ipam-scope .prov-card { border: 1px solid var(--border); border-radius: 13px; padding: 14px; background: rgba(148,163,184,.04); }
.ipam-scope .prov-card .pc-h { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.ipam-scope .prov-card .pc-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-size: 13px; flex-shrink: 0; }
.ipam-scope .prov-card .pc-name { font-weight: 800; font-size: 13.5px; }
.ipam-scope .prov-card .pc-asn { font-size: 10.5px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.ipam-scope .prov-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.ipam-scope .alert-row { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.20); margin-bottom: 8px; }
.ipam-scope .alert-row.warn { background: rgba(249,115,22,.08); border-color: rgba(249,115,22,.22); }
.ipam-scope .alert-row .al-ic { color: var(--danger); font-size: 15px; }
.ipam-scope .alert-row.warn .al-ic { color: var(--accent); }
.ipam-scope .alert-row .al-body { flex: 1; }
.ipam-scope .alert-row .al-t { font-weight: 700; font-size: 12.5px; }
.ipam-scope .alert-row .al-s { font-size: 11px; color: var(--muted); }
.ipam-scope .alert-row .al-pct { font-weight: 900; font-size: 15px; font-variant-numeric: tabular-nums; }
.ipam-scope .stat-inline { display: flex; gap: 22px; flex-wrap: wrap; }
.ipam-scope .stat-inline .si-v { font-size: 20px; font-weight: 900; letter-spacing: -.02em; }
.ipam-scope .stat-inline .si-l { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }

/* Painel de validação do cadastro de IP (não invasivo, inline) */
.ipam-scope .ip-chk-row { display: flex; gap: 10px; align-items: stretch; margin: 6px 0 2px; }
.ipam-scope .ip-chk-row > .ip-chk { flex: 1; }
.ipam-scope .ip-chk, .ipam-scope .ip-reach.ip-chk { border-radius: 9px; padding: 8px 11px; font-size: 12px; border: 1px solid; display: flex; flex-direction: column; gap: 4px; }
.ipam-scope .ip-reach { margin-bottom: 4px; font-weight: 600; }
.ipam-scope .ip-chk .ln { display: flex; align-items: center; gap: 8px; }
.ipam-scope .ip-chk .ln i { width: 14px; text-align: center; flex-shrink: 0; }
.ipam-scope .ip-chk.ok { color: #86efac; background: rgba(34,197,94,.10); border-color: rgba(34,197,94,.28); }
.ipam-scope .ip-chk.warn { color: #fdba74; background: rgba(249,115,22,.10); border-color: rgba(249,115,22,.28); }
.ipam-scope .ip-chk.err { color: #fca5a5; background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.28); }
.ipam-scope .ip-chk.info { color: #7dd3fc; background: rgba(14,165,233,.10); border-color: rgba(14,165,233,.28); }
.ipam-scope .ip-chk a { color: inherit; text-decoration: underline; font-weight: 700; }
.ipam-scope #i-probe { white-space: nowrap; align-self: flex-start; }

/* Chip Modo Exemplo (dados fictícios) */
.ipam-scope .ipam-demo-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; color: #f59e0b; background: rgba(245,158,11,.14); border: 1px solid rgba(245,158,11,.35); padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .4px; }

/* Indicador AO VIVO (real-time) */
.ipam-scope .ipam-live { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; color: #22c55e; text-transform: uppercase; letter-spacing: .5px; }
.ipam-scope .ipam-live .pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: ipam-pulse 1.8s infinite; }
@keyframes ipam-pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); } 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

/* ═══════════════ Mapa de Prefixos (árvore em blocos) ═══════════════ */
.ipam-scope .ipmap-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; font-size: 15px; }
.ipam-scope .ipmap-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--muted); font-weight: 600; }
.ipam-scope .ipmap-legend .dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 4px; }
.ipam-scope .ipmap-crumb { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 12px 0; }
.ipam-scope .ipmap-crumb button { background: transparent; border: 1px solid var(--border); color: var(--muted); padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; }
.ipam-scope .ipmap-crumb button.on { color: var(--primary); border-color: rgba(14,165,233,.4); background: rgba(14,165,233,.1); }
.ipam-scope .ipmap-crumb .sep { font-size: 9px; color: var(--muted); opacity: .5; }
.ipam-scope .ipmap-sum { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.ipam-scope .ipmap-schip { display: flex; align-items: center; gap: 9px; background: rgba(148,163,184,.05); border: 1px solid var(--border); border-radius: 12px; padding: 8px 13px; }
.ipam-scope .ipmap-schip .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; }
.ipam-scope .ipmap-schip .v { font-size: 17px; font-weight: 900; letter-spacing: -.02em; }
.ipam-scope .ipmap-schip .l { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.ipam-scope .ipmap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 12px; }
.ipam-scope .ipmap-block { position: relative; overflow: hidden; border-radius: 14px; padding: 13px 14px; cursor: pointer; background: rgba(15,23,42,.6); border: 1px solid rgba(148,163,184,.14); border-top: 2px solid var(--c); transition: transform .12s, box-shadow .12s, border-color .12s; }
.ipam-scope .ipmap-block:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.42), 0 0 0 1px var(--c); border-color: var(--c); }
.ipam-scope .ipmap-block::after { content: ''; position: absolute; inset: 0; background: radial-gradient(130px 70px at 100% 0, var(--c), transparent 70%); opacity: .1; pointer-events: none; }
.ipam-scope .ipmap-b-top { display: flex; align-items: center; justify-content: space-between; }
.ipam-scope .ipmap-kids { font-size: 11px; color: var(--muted); font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.ipam-scope .ipmap-kids.leaf { opacity: .45; }
.ipam-scope .ipmap-cidr { font-size: 15px; font-weight: 800; margin-top: 9px; letter-spacing: -.01em; }
.ipam-scope .ipmap-name { font-size: 11.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ipam-scope .ipmap-bar { height: 6px; border-radius: 4px; background: var(--surface-light); overflow: hidden; margin-top: 11px; }
.ipam-scope .ipmap-bar > div { height: 100%; border-radius: 4px; transition: width .5s ease; }
.ipam-scope .ipmap-pct { font-size: 12px; font-weight: 900; margin-top: 6px; font-variant-numeric: tabular-nums; }

/* ═══════════════ Inteligência RIR/BGP ═══════════════ */
.ipam-scope .intel-search { display: flex; gap: 10px; flex-wrap: wrap; }
.ipam-scope .intel-search input { flex: 1; min-width: 220px; }
.ipam-scope .chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(148,163,184,.08); border: 1px solid var(--border); color: var(--text); padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color .12s, color .12s; }
.ipam-scope .chip:hover { border-color: var(--primary); color: var(--primary); }
.ipam-scope .chip-wrap { display: flex; gap: 7px; flex-wrap: wrap; max-height: 260px; overflow: auto; }
.ipam-scope .st-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; border: 1px solid; }
.ipam-scope .intel-hero { position: relative; overflow: hidden; border-radius: 18px; padding: 22px; background: linear-gradient(135deg, rgba(14,165,233,.14), rgba(9,14,24,.6)); border: 1px solid rgba(14,165,233,.25); }
.ipam-scope .intel-hero-glow { position: absolute; top: -50px; right: -50px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(14,165,233,.35), transparent 70%); pointer-events: none; }
.ipam-scope .ttl2 { font-size: 13px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.ipam-scope .ttl2 i { color: var(--primary); }
.ipam-scope .kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.ipam-scope .kv { display: flex; flex-direction: column; gap: 2px; background: rgba(148,163,184,.04); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.ipam-scope .kv span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
.ipam-scope .kv b { font-size: 13px; word-break: break-word; }

/* Responsivo: em telas pequenas some a sidebar, aparece o seletor de módulo */
@media (max-width: 900px) {
  .ipam-scope .ipam-layout { grid-template-columns: 1fr; }
  .ipam-scope .ipam-side { display: none; }
  .ipam-scope .ipam-mobsel { display: block; width: 100%; margin-bottom: 12px; }
}
