:root {
  --bg: #0f172a; --panel: #111827; --panel-2: #1f2937; --line: #334155;
  --text: #e5e7eb; --muted: #94a3b8; --accent: #f97316; --accent-2: #06b6d4;
  --ok: #22c55e; --warn: #eab308; --bad: #ef4444;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-size: 14px; }
button, select, input { font: inherit; color: inherit; }
button, select { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; cursor: pointer; }
button:hover { border-color: var(--muted); }

.topbar { height: 52px; display: flex; align-items: center; gap: 16px; padding: 0 14px; background: var(--panel); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.brand { font-weight: 700; letter-spacing: .3px; white-space: nowrap; }
.search { position: relative; flex: 1; max-width: 520px; }
.search input { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; }
.search-results { position: absolute; top: 38px; left: 0; right: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; max-height: 60vh; overflow: auto; box-shadow: 0 10px 30px #0008; }
.search-results div { padding: 7px 10px; cursor: pointer; border-bottom: 1px solid #1e293b; }
.search-results div:hover { background: var(--panel-2); }
.search-results small { color: var(--muted); margin-right: 6px; text-transform: uppercase; font-size: 10px; }
.toggles { display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.toggles label { color: var(--muted); cursor: pointer; }
.status { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }

main { position: absolute; top: 52px; bottom: 0; left: 0; right: 0; }
#map { position: absolute; inset: 0; }

.panel { position: absolute; top: 10px; right: 10px; bottom: 10px; width: 420px; max-width: calc(100% - 20px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: auto; padding: 16px; z-index: 4; box-shadow: 0 10px 40px #0009; }
.panel-close { position: absolute; top: 8px; right: 8px; border: none; background: none; font-size: 22px; line-height: 1; }
.panel h2 { margin: 0 24px 4px 0; font-size: 17px; }
.panel h3 { margin: 18px 0 8px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.panel .sub { color: var(--muted); font-size: 12px; }
.panel a { color: #7dd3fc; } /* links sem cor própria (ex.: CTOs/cabos da simulação) ficavam no azul padrão, ilegível no fundo escuro */
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); margin-right: 4px; }
.bar { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; margin: 6px 0 2px; }
.bar > span { display: block; height: 100%; }
.actions { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.actions button.primary { background: var(--accent); border-color: var(--accent); color: #111; font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
td, th { padding: 5px 4px; border-bottom: 1px solid #1e293b; text-align: left; }
th { color: var(--muted); font-weight: 500; }
tr.click { cursor: pointer; }
tr.click:hover { background: var(--panel-2); }
.on { color: var(--ok); } .off { color: var(--bad); } .muted { color: var(--muted); }
.list-item { padding: 6px 0; border-bottom: 1px solid #1e293b; font-size: 13px; }
.alert { padding: 10px 12px; border-radius: 8px; background: #422006; border: 1px solid #a16207; margin: 10px 0; font-size: 13px; }
.okbox { padding: 10px 12px; border-radius: 8px; background: #052e16; border: 1px solid #15803d; margin: 10px 0; font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; margin: 10px 0; }
.kpi { background: var(--panel-2); border-radius: 8px; padding: 8px; }
.kpi b { display: block; font-size: 16px; }
.kpi span { color: var(--muted); font-size: 11px; }

.steps { list-style: none; padding: 0; margin: 0; position: relative; }
.steps li { position: relative; padding: 4px 0 8px 22px; font-size: 13px; }
.steps li::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.steps li::after { content: ""; position: absolute; left: 2px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); border: 1px solid #000a; }
.steps li .sub { display: block; }
.steps li.box-link { cursor: pointer; }
.steps li.box-link:hover { color: #fff; }
.fiber-chip { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1px solid #000; vertical-align: middle; margin: 0 2px; }

.legend { position: absolute; left: 10px; bottom: 30px; background: #111827e6; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 11px; color: var(--muted); z-index: 3; }
.legend div { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.sq { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.ln { width: 16px; height: 3px; display: inline-block; }

.modal { position: fixed; inset: 0; background: #0b1120; z-index: 20; display: flex; flex-direction: column; }
.modal[hidden] { display: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); gap: 12px; }
.modal-head #diagram-title { font-weight: 600; }
.modal-actions { display: flex; gap: 8px; align-items: center; }
.modal-actions label { color: var(--muted); }
.modal-hint { font-size: 12px; color: var(--muted); padding: 6px 16px; }
.diagram-wrap { flex: 1; overflow: auto; background: #f8fafc; touch-action: pan-x pan-y; } /* pinça tratada no JS (zoom do diagrama) */
.diagram-wrap svg { display: block; }
.dg-tip { position: fixed; pointer-events: none; background: #111827; color: #e5e7eb; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 12px; z-index: 30; max-width: 320px; }
.dg-click { cursor: pointer; }
.dg-click:hover { opacity: .75; }
.fusion-path:hover { stroke-width: 6; }

.mapboxgl-popup-content { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.mapboxgl-popup-tip { border-top-color: var(--panel) !important; border-bottom-color: var(--panel) !important; }



.legend img { width: 18px; height: 18px; }
.tree { font-size: 13px; }
.tree-node { border-left: 2px solid var(--line); padding: 4px 0 6px 8px; margin-top: 2px; }
.tree-node.tree-sel { border-left-color: #facc15; background: #facc1512; }
.tree-via { font-size: 11px; color: var(--muted); }
.tree a { color: #c4b5fd; text-decoration: none; }
.tree a:hover { text-decoration: underline; }
.tree .tag { margin-top: 3px; }

.status.offline { color: #fbbf24; font-weight: 600; }

.focus-bar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 3; background: #111827ee; border: 1px solid #facc15; color: #fde68a; border-radius: 20px; padding: 6px 8px 6px 14px; font-size: 13px; display: flex; gap: 10px; align-items: center; box-shadow: 0 6px 20px #0008; }
.focus-bar[hidden] { display: none; }
.focus-bar button { border-radius: 14px; padding: 3px 10px; }
.route { margin-top: 8px; }
.rt-pt { display: flex; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.rt-pt:hover { background: var(--panel-2); }
.rt-pt.rt-on { border-color: #facc15; background: #facc1514; }
.rt-num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #111827; border: 2px solid #facc15; color: #fff; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.rt-mud .rt-num { background: #dc2626; border-color: #fecaca; }
.rt-body { flex: 1; min-width: 0; }
.rt-body a { color: var(--text); text-decoration: none; }
.rt-body a:hover { text-decoration: underline; }
.rt-badge { display: inline-block; margin: 3px 0; padding: 1px 8px; border-radius: 10px; background: #7f1d1d; color: #fecaca; font-size: 11px; font-weight: 600; }
.rt-cabo { position: relative; margin: 0 0 0 20px; padding: 6px 0 6px 18px; font-size: 12px; border-left: 4px solid var(--cor); }
.rt-cabo a { color: #c4b5fd; text-decoration: none; font-weight: 600; }
.rt-cabo.rt-sel { background: #facc1510; }
.rt-pass { margin-left: 20px; padding: 2px 0 2px 18px; border-left: 4px dotted var(--line); font-size: 11px; color: var(--muted); }

.dg-tip { white-space: pre-line; }
#dg-compact-wrap[hidden] { display: none; }

.legend-cabos { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.ln-cabo { width: 18px; height: 4px; display: inline-block; background: var(--c); box-shadow: 0 0 0 1px #0008; border-radius: 2px; }
.ln-cabo.pont { background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 7px); box-shadow: none; }

.legend[hidden], .legend [hidden] { display: none !important; }
.legend-title { color: var(--text); font-weight: 600; font-size: 12px; margin-bottom: 4px; }
.leg-num { width: 16px; height: 16px; border-radius: 50%; background: #111827; border: 2px solid #facc15; color: #fff; font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.leg-num.mud { background: #dc2626; border-color: #fecaca; }
.leg-num.lac { background: #b45309; border-color: #fde68a; }

.down { margin-top: 6px; font-size: 12px; }
.dn-row { padding: 4px 0 4px 8px; border-left: 2px solid var(--line); }
.dn-cabo { display: inline-block; width: 14px; height: 4px; border-radius: 2px; background: var(--cor); box-shadow: 0 0 0 1px #06b6d4; vertical-align: middle; margin-right: 4px; }
.dn-link { color: #c4b5fd; text-decoration: none; font-weight: 600; }
.dn-box a { color: var(--text); text-decoration: none; }
.dn-box a:hover, .dn-link:hover { text-decoration: underline; }

/* ---- painel da caixa (versão mais legível) ---- */
.bx-head { display: flex; gap: 10px; align-items: center; margin-right: 24px; }
.bx-ico { width: 34px; height: 34px; flex: none; }
.bx-resumo { margin-top: 6px; }
.h3-sub { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 11px; }
.sum { padding: 10px 12px; border-radius: 8px; margin: 10px 0 4px; font-size: 13px; line-height: 1.45; }
.sum.ok { background: #0b2a1a; border: 1px solid #166534; }
.sum.warn { background: #422006; border: 1px solid #a16207; }
.sum .muted { font-size: 12px; }
.ico { width: 18px; height: 18px; vertical-align: -4px; margin-right: 5px; }
.fo { display: inline-block; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); vertical-align: 1px; }
.rt-title { font-size: 13px; font-weight: 600; }
.rt-title a { color: var(--text); }
.rt-line { font-size: 12px; color: #cbd5e1; margin-top: 3px; line-height: 1.4; }
.rt-here { color: #7dd3fc; font-weight: 600; }
.rt-self { background: #0ea5e914; }
.rt-det { font-size: 11px; color: var(--muted); margin-top: 3px; }
.rt-badge { background: #7f1d1d; color: #fecaca; }
.rt-cabo { font-size: 12px; }
.rt-pass { font-style: italic; }
.dn-row { line-height: 1.5; }
.dn-box { margin: 1px 0 0 18px; }

.cli-wrap { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.cli-btn { width: 100%; text-align: left; font-weight: 600; }
.cli-hint { margin: 8px 0 4px; }
#cli-list[hidden] { display: none; }

.mini-btn { font-size: 10px; padding: 1px 7px; margin-left: 8px; border-radius: 10px; vertical-align: 1px; font-weight: 600; background: #1e3a8a; border-color: #3b82f6; color: #dbeafe; }
.mini-btn:hover { background: #1d4ed8; border-color: #93c5fd; }

/* ---- continuidade da fibra ---- */
.fb-cadeia { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.fb-step { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 1px 8px; font-size: 11px; font-weight: 600; }
.fb-step.sel { border-color: #facc15; color: #fde68a; }
.fb-arrow { color: var(--muted); font-size: 11px; }
.fb-cabo { margin: 0 0 0 20px; padding: 6px 0 8px 18px; border-left: 4px solid var(--cor); font-size: 12px; }
.fb-cabo a { color: #c4b5fd; text-decoration: none; }
.fb-cabo.sel { background: #facc1510; }
.fb-fibra { font-size: 13px; font-weight: 600; margin: 4px 0 2px; color: #f8fafc; }
.fb-tag { font-size: 10px; background: #713f12; color: #fde68a; border-radius: 8px; padding: 1px 6px; }
.fb-warn { color: #fbbf24; }
.fb-ponta .rt-num { background: #b45309; border-color: #fde68a; }

.fb-dist { font-size: 10px; color: #7dd3fc; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 1px; }

/* ---- topo: chips de elementos, estilo do mapa e recarregar ---- */
.chips { display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 8px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-size: 12.5px; cursor: pointer; user-select: none; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:hover { border-color: var(--muted); }
.chip:has(input:checked) { background: #1e293b; color: var(--text); border-color: #475569; }
.chip:has(input:focus-visible) { outline: 2px solid #38bdf8; outline-offset: 2px; }
.chip-img { width: 18px; height: 18px; opacity: .45; }
.chip:has(input:checked) .chip-img { opacity: 1; }
.chip-ico { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; opacity: .45; }
.chip:has(input:checked) .chip-ico { opacity: 1; }
.ico-cabo::before { content: ''; width: 16px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #077d2b 0 33%, #003df5 33% 66%, #9512af 66%); }
.ico-cli::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px #0f172a, 0 0 0 3px #22c55e55; }
.ico-dir { color: #facc15; font-size: 13px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: none; }
.seg button { border: none; border-radius: 0; background: transparent; color: var(--muted); padding: 5px 10px; font-size: 12.5px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover { color: var(--text); }
.seg button.on { background: #1e293b; color: var(--text); font-weight: 600; }
.icon-btn { width: 32px; height: 32px; padding: 0; border-radius: 8px; font-size: 17px; line-height: 1; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn.girando { animation: girar 1s linear infinite; }
a.icon-btn { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
a.icon-btn:hover { border-color: var(--muted); }
.icon-btn[hidden] { display: none; }
@keyframes girar { to { transform: rotate(360deg); } }
.status:empty { display: none; }
@media (max-width: 1100px) and (min-width: 761px) { .brand { display: none; } .chip { padding: 5px 9px; } }

/* ======================= Celular / tela estreita ======================= */
.sheet-handle, .legend-btn { display: none; }
@media (max-width: 760px) {
  html, body { font-size: 15px; }
  /* topo em duas linhas: busca + recarregar / chips + estilo */
  .topbar { height: auto; flex-wrap: wrap; gap: 8px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); }
  .brand { display: none; }
  .search { order: 1; flex: 1 1 calc(100% - 50px); max-width: none; min-width: 0; }
  .search input { padding: 10px 12px; font-size: 16px; } /* 16px evita o zoom automático do iPhone */
  input, select, textarea { font-size: 16px !important; } /* idem para todos os campos (formulário de solicitação, diagrama) */
  #btn-reload { order: 2; width: 40px; height: 40px; }
  .chips { order: 3; flex: 1 1 0; min-width: 0; padding-bottom: 2px; }
  .chip { padding: 7px 12px 7px 9px; font-size: 13px; gap: 6px; }
  .seg { display: inline-flex; order: 4; flex: none; }
  .seg button { padding: 7px 8px; }
  .seg button { padding: 7px 10px; font-size: 13px; }
  .status { order: 5; flex: 1 1 100%; margin: 0; white-space: normal; }
  .search-results { position: fixed; left: 10px; right: 10px; top: auto; max-height: 55vh; }
  main { top: var(--topbar-h, 104px); }

  /* painel vira gaveta de baixo */
  .panel { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; border-radius: 16px 16px 0 0; border-bottom: none;
    padding: 4px 14px calc(14px + env(safe-area-inset-bottom)); transition: height .2s ease; overscroll-behavior: contain; }
  .panel[data-sheet="half"] { height: 50%; }
  .panel[data-sheet="full"] { height: calc(100% - 8px); }
  .panel[data-sheet="min"] { height: 76px; overflow: hidden; }
  .sheet-handle { display: flex; justify-content: center; align-items: center; width: 100%; height: 26px; border: none; background: none; padding: 0; position: sticky; top: 0; z-index: 2; cursor: grab; }
  .sheet-handle span { width: 44px; height: 5px; border-radius: 3px; background: #64748b; }
  .panel-close { top: 4px; right: 6px; font-size: 26px; width: 40px; height: 40px; }
  .panel h2 { font-size: 16px; }
  .actions button { padding: 9px 12px; }
  .mini-btn { padding: 4px 9px; font-size: 11px; }
  .rt-pt { padding: 10px 6px; }
  td, th { padding: 7px 4px; }

  /* legenda: botão que abre/fecha */
  .legend-btn { display: block; position: absolute; left: 10px; top: 10px; z-index: 3; border-radius: 999px; padding: 6px 12px; font-size: 13px; background: #111827e6; }
  .legend-btn[hidden] { display: none; }
  .legend { display: none; left: 10px; top: 48px; bottom: auto; max-height: 45vh; overflow: auto; }
  .legend.aberta:not([hidden]) { display: block; }
  .focus-bar { top: auto; bottom: calc(50% + 10px); font-size: 12px; max-width: calc(100% - 20px); }

  /* diagrama de fusão em tela cheia, com botões quebrando linha */
  .modal-head { flex-wrap: wrap; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); }
  .modal-head #diagram-title { flex: 1 1 100%; font-size: 14px; }
  .modal-actions { flex-wrap: wrap; gap: 6px; }
  .modal-actions button, .modal-actions select { padding: 8px 10px; }
  .modal-hint { font-size: 11px; padding: 4px 10px; }
  .dg-tip { display: none !important; } /* sem mouse: dica não aparece */

  .mapboxgl-ctrl-top-right { top: 0; }
  .mapboxgl-ctrl-group button { width: 38px; height: 38px; }
}

.btn-sair { color: var(--muted); }
.btn-sair:hover { color: #fca5a5; border-color: #7f1d1d; }
@media (max-width: 760px) { #btn-sair, #btn-admin { order: 2; width: 40px; height: 40px; } .search { flex-basis: calc(100% - 100px); } }

/* ======================= Solicitações ======================= */
.sol-btn { display: inline-flex; align-items: center; gap: 6px; flex: none; background: #2f4fc9; border-color: #2f4fc9; color: #fff; font-weight: 600; font-size: 12.5px; padding: 6px 12px; border-radius: 8px; }
.sol-btn:hover { background: #3b5fe0; border-color: #3b5fe0; }
.sol-lista-btn { position: relative; }
.badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #f59e0b; color: #111; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.badge[hidden] { display: none; }
.sol-modal { align-items: center; justify-content: center; background: #020617cc; padding: 16px; }
.sol-card { width: 100%; max-width: 560px; max-height: 100%; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px #000a; }
.sol-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); position: relative; }
.sol-head h2 { margin: 0; font-size: 17px; }
.sol-head .panel-close { position: static; }
.sol-body { padding: 6px 16px 14px; overflow: auto; }
.sol-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.sol-foot .primary, .sol-st-form .primary { background: #2f4fc9; border-color: #2f4fc9; color: #fff; font-weight: 600; }
.sol-l { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 5px; }
.sol-body input[type=search], .sol-body input[type=url], .sol-body input[type=number], .sol-body input[type=text], .sol-body select, .sol-body textarea {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; color: var(--text); font-size: 14px; }
.sol-body textarea { resize: vertical; min-height: 90px; }
.sol-caixa { position: relative; }
.sol-res { top: 42px; z-index: 5; }
.sol-caixa-sel { padding: 9px 10px; border: 1px solid #2f4fc9; border-radius: 8px; background: #2f4fc91a; }
.sol-row { display: flex; gap: 6px; }
.sol-mini { flex: none; display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: #93c5fd; text-decoration: none; font-size: 12px; }
.sol-link-btn { background: none; border: none; color: #93c5fd; padding: 6px 0; font-size: 12.5px; cursor: pointer; }
.sol-set { border: 1px solid var(--line); border-radius: 10px; margin: 14px 0 0; padding: 4px 12px 12px; }
.sol-set legend { font-size: 12px; color: var(--text); font-weight: 600; padding: 0 6px; }
.sol-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.sol-grid2 { grid-template-columns: 1fr 1fr; }
.sol-cor { font-size: 12px; margin-top: 8px; color: #cbd5e1; min-height: 4px; }
.sol-aviso { color: #fbbf24; }
.sol-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.sol-thumb { position: relative; width: 74px; height: 74px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); display: block; }
.sol-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sol-thumb button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; padding: 0; border-radius: 50%; background: #000a; border: none; color: #fff; line-height: 1; }
.sol-erro { color: #f87171; font-size: 13px; margin-top: 10px; min-height: 18px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40; background: #111827; border: 1px solid #22c55e; color: #dcfce7; padding: 10px 16px; border-radius: 10px; box-shadow: 0 10px 30px #000a; font-size: 14px; max-width: calc(100% - 32px); }
.toast[hidden] { display: none; }
.sol-abas { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.sol-aba { font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.sol-aba.on { background: #2f4fc9; border-color: #2f4fc9; color: #fff; }
.sol-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 13px; background: #0f172a; }
.sol-item-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sol-st { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; color: #111; background: var(--c); text-transform: uppercase; }
.sol-item-cx { margin-top: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sol-item-cx a[data-openbox] { color: var(--text); font-weight: 600; text-decoration: none; }
.sol-item-fb { margin-top: 6px; font-size: 12px; color: #cbd5e1; line-height: 1.5; }
.sol-item-desc { margin-top: 6px; white-space: pre-wrap; }
.sol-item-autor { margin-top: 6px; font-size: 11px; }
.sol-hist { margin-top: 6px; font-size: 12px; color: var(--muted); }
.sol-hist summary { cursor: pointer; color: #93c5fd; }
.sol-st-form { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.sol-st-form select, .sol-st-form input { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 6px; color: var(--text); }
.sol-st-form input { flex: 1; min-width: 120px; }
@media (max-width: 760px) {
  .topbar .sol-btn span { display: none; }
  .topbar .sol-btn { order: 2; width: 40px; height: 40px; padding: 0; justify-content: center; }
  .sol-lista-btn { order: 2; width: 40px; height: 40px; }
  .search { flex-basis: calc(100% - 196px); }
  .sol-modal { padding: 0; align-items: stretch; }
  .sol-card { max-width: none; border-radius: 0; border: none; }
  .sol-grid { grid-template-columns: 1fr 1fr; }
  .sol-grid > div:first-child { grid-column: 1 / -1; }
  .sol-grid2 > div:first-child { grid-column: auto; }
  .sol-body input, .sol-body select, .sol-body textarea { font-size: 16px; }
}
.sol-body textarea { font-family: inherit; line-height: 1.45; }
.sol-body input[type=file] { color: var(--muted); font-size: 13px; width: 100%; }
.sol-body input[type=file]::file-selector-button { margin-right: 10px; padding: 9px 14px; border-radius: 8px; border: 1px dashed #3b82f6; background: #2f4fc91a; color: #bfdbfe; font-weight: 600; cursor: pointer; }

.sol-modal { z-index: 30; } /* abre por cima do diagrama de fusão */

.sol-item.sol-foco { border-color: #3b82f6; box-shadow: 0 0 0 2px #3b82f655; }

/* ---------- simulador de manutenção ---------- */
.actions button.sim-btn { background: #450a0a; border-color: #b91c1c; color: #fecaca; }
.actions button.sim-btn:hover { background: #7f1d1d; border-color: #f87171; }
.sum.sim-sum { background: #2a0a0a; border: 1px solid #b91c1c; }
.sim-big { margin-top: 6px; font-size: 15px; }
.sim-big b { font-size: 22px; color: #fca5a5; }
.sim-prov { display: inline-block; font-size: 10px; font-weight: 600; padding: 0 6px; border-radius: 9px; background: #431407; border: 1px dashed #f97316; color: #fdba74; vertical-align: 1px; }
.sim-nota { margin: 4px 0 8px; }
.sim-tab td { vertical-align: top; }
.sim-tab td.num, .sim-list .num { text-align: right; white-space: nowrap; }
.sim-list { list-style: none; margin: 0; padding: 0; }
.sim-list li { display: flex; align-items: flex-start; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.sim-list li.sim-cto { cursor: pointer; }
.sim-list li.sim-cto:hover { background: var(--panel-2); }
.sim-list .ico { width: 18px; height: 18px; flex: none; }
.sim-cto-nome { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sim-list .num { margin-left: auto; font-weight: 600; }
.ln.sim-ln-corte { background: repeating-linear-gradient(90deg, #111827 0 4px, #facc15 4px 8px); }
.ln.sim-ln-prov { background: repeating-linear-gradient(90deg, #f97316 0 6px, transparent 6px 10px); }

.sim-form { background: var(--panel-2); border: 1px solid #b91c1c; border-radius: 8px; padding: 10px; margin: 0 0 12px; }
.sim-form select, .sim-form input { width: 100%; box-sizing: border-box; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.sim-form-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-top: 8px; }
.sim-form button.sim-go { background: #b91c1c; border-color: #dc2626; color: #fff; font-weight: 600; padding: 6px 14px; }
.sim-form #sf-cor { margin-top: 6px; min-height: 16px; }
.sim-cor { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1px solid #0008; margin-right: 3px; vertical-align: -1px; }
.sim-erro { color: #fca5a5; }

.sim-caminho { background: var(--panel-2); border-radius: 8px; padding: 8px 10px; margin: 8px 0; font-size: 12px; line-height: 1.5; }
.sim-caminho a { color: inherit; }
.sim-caminho .sim-cam-dio, .sim-caminho .sim-cam-ponta { color: #fcd34d; }
.sim-caminho .mini-btn { margin: 6px 0 0; }

.sim-poss { display: inline-block; font-size: 10px; font-weight: 600; padding: 0 6px; border-radius: 9px; background: #3f2d04; border: 1px dashed #eab308; color: #fde68a; vertical-align: 1px; }
.sim-anel { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #eab308; }
.sim-nota a { color: inherit; }

/* ======================= Painel da caixa (redesenho) ======================= */
:root { --mono: ui-monospace, "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace; --amber: #f59e0b; --diag: #1e3a8a; --diag-b: #3b82f6; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.panel { width: 400px; }
.panel.panel-box { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.panel.panel-box #panel-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.panel.panel-box .panel-close { top: 14px; right: 10px; z-index: 3; }

/* cabeçalho + botões (fixos) */
.bx-fixed { flex: none; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.bx-top { display: flex; align-items: center; gap: 10px; margin-right: 30px; }
.bx-icobox { flex: none; width: 36px; height: 36px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.bx-icobox .bx-ico { width: 26px; height: 26px; }
.bx-tit { min-width: 0; }
.panel .bx-tit h2 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.bx-end { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.bx-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.bx-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: #cbd5e1; }
.bx-tag b { color: var(--text); font-weight: 600; }
.bx-tag-kind { color: var(--text); font-weight: 700; letter-spacing: .3px; }
.bx-tag-off { background: transparent; border-style: dashed; color: #64748b; }
.bx-occ { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11.5px; }
.bx-occ .bar { flex: 1; margin: 0; height: 6px; }
.bx-primary { display: block; width: 100%; margin-top: 12px; padding: 9px 12px; border-radius: 8px; background: var(--accent); border: 1px solid var(--accent); color: #111; font-weight: 700; font-size: 13.5px; }
.bx-primary:hover { background: #fb923c; border-color: #fb923c; }
.bx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.bx-sec { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; color: var(--text); }
.bx-sec:hover { border-color: var(--muted); }
.bx-full { grid-column: 1 / -1; }
.bx-sim { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.bx-sim > span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-right: 2px; }
.bx-sim-btn { background: transparent; border: 1px solid #b91c1c; color: #fca5a5; border-radius: 6px; padding: 3px 9px; font-size: 11.5px; font-weight: 600; }
.bx-sim-btn:hover { background: #450a0a; border-color: #ef4444; }

/* conteúdo (rola) */
.bx-scroll { flex: 1; min-height: 0; overflow: auto; padding: 12px 16px 16px; overscroll-behavior: contain; }
.bx-scroll > * + * { margin-top: 12px; }
.bx-scroll .sim-form { margin: 0 0 12px; }
.bx-aviso, .bx-ok { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border-radius: 8px; font-size: 11.5px; line-height: 1.45; color: #e2e8f0; }
.bx-aviso { background: #2a1d06; border: 1px solid #a16207; }
.bx-aviso b, .bx-ok b { font-size: 13px; }
.bx-aviso a, .bx-ok a { color: #fde68a; }
.bx-ok { background: #0b2a1a; border: 1px solid #166534; }
.bx-excl, .tl-excl { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--amber); color: #111; font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.bx-ok-dot { flex: none; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px #22c55e33; }
.bx-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.bx-sum > div { background: var(--panel-2); padding: 8px 9px; min-width: 0; }
.bx-sum span { display: block; font-size: 10.5px; color: var(--muted); margin-bottom: 2px; }
.bx-sum b { display: block; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }

/* abas (grudam no topo ao rolar) */
.bx-tabs { position: sticky; top: 0; z-index: 2; display: flex; background: var(--panel); border-bottom: 1px solid var(--line); margin-left: -16px; margin-right: -16px; padding: 0 16px; }
.bx-tab { flex: 1; background: none; border: none; border-bottom: 2px solid transparent; border-radius: 0; padding: 10px 4px 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.bx-tab:hover { color: var(--text); }
.bx-tab.on { color: var(--text); border-bottom-color: var(--accent); }
.bx-count { font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: #cbd5e1; }
.bx-tab.on .bx-count { border-color: #f9731688; color: #fdba74; }
.bx-pane[hidden] { display: none; }
.bx-vazio { font-size: 12px; margin: 10px 0; }
.bx-obs { font-size: 11.5px; color: #cbd5e1; background: var(--panel-2); border-radius: 8px; padding: 8px 10px; }
.bx-obs span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 2px; }
.bx-scroll .cli-wrap { margin-top: 16px; }
.tl-fo { font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 6px; border: 1px solid var(--c, var(--line)); color: var(--text); flex: none; }

/* "Para onde vai": um cartão por saída */
.dw { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
.dw-card { background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 8px; padding: 8px 10px; font-size: 12px; }
.dw-l1 { display: flex; align-items: center; gap: 6px; }
.dw-sw { flex: none; width: 14px; height: 4px; border-radius: 2px; background: var(--c); }
.dw-cabo { color: var(--text); font-weight: 600; text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-cabo:hover { text-decoration: underline; }
.dw-m { margin-left: auto; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.dw-l2 { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; font-size: 11.5px; }
.dw-dest { display: inline-flex; align-items: center; min-width: 0; font-weight: 600; }
.dw-dest a { color: var(--text); text-decoration: none; }
.dw-dest a:hover { text-decoration: underline; }
.dw-occ { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); margin-left: auto; }
.dw-occ .bar { width: 46px; height: 5px; margin: 0; }
.dw-occ .mono { color: var(--text); }
.dw-sub { margin-left: auto; }
.dw-l2 .mini-btn { margin-left: 0; background: var(--diag); border-color: var(--diag-b); }

/* "De onde vem o sinal": linha do tempo */
.tl { padding-top: 8px; }
.tl-row { display: grid; grid-template-columns: 28px 1fr; column-gap: 8px; position: relative; }
.tl-rail { position: relative; }
.tl-body { min-width: 0; padding: 6px 0 10px; font-size: 11.5px; color: #cbd5e1; }
/* trecho de cabo: linha contínua na cor do cabo */
.tl-cabo .tl-rail::before { content: ""; position: absolute; left: 12.5px; top: 0; bottom: 0; width: 3px; background: var(--c); }
.tl-l1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tl-cabo-nome { color: #c4b5fd; text-decoration: none; font-weight: 600; font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-cabo-nome:hover { text-decoration: underline; }
.tl-m { margin-left: auto; color: var(--muted); white-space: nowrap; }
.tl-fibra { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
/* sangria */
.tl-pass .tl-rail::before { content: ""; position: absolute; left: 12.5px; top: 0; bottom: 0; width: 3px; background: var(--c); }
.tl-hollow { position: absolute; left: 9px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--panel); border: 2px solid var(--c); box-sizing: border-box; }
.tl-pass .tl-body { color: var(--muted); font-style: italic; padding: 5px 0; }
/* nó: meia linha acima e abaixo, cada uma na cor do seu cabo (a cor muda no nó) */
.tl-node { cursor: pointer; border-radius: 8px; }
.tl-node .tl-rail::before, .tl-node .tl-rail::after { content: ""; position: absolute; left: 12.5px; width: 3px; }
.tl-node .tl-rail::before { top: 0; height: 18px; background: var(--up, transparent); }
.tl-node .tl-rail::after { top: 18px; bottom: 0; background: var(--down, transparent); }
.tl-node.tl-lac .tl-rail::after { background: repeating-linear-gradient(to bottom, var(--down) 0 4px, transparent 4px 8px); }
.tl-dot { position: absolute; z-index: 1; left: 2px; top: 6px; width: 24px; height: 24px; box-sizing: border-box; border-radius: 50%; background: var(--panel); border: 2px solid #facc15; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tl-self .tl-dot { border-color: var(--accent); color: #fdba74; }
.tl-mud .tl-dot { background: #dc2626; border-color: #fecaca; color: #fff; }
.tl-self { background: #f9731612; }
.tl-node:hover { background: var(--panel-2); }
.tl-node.rt-on { background: #facc1514; box-shadow: inset 0 0 0 1px #facc1588; }
.tl-node .tl-body { padding: 8px 8px 12px 0; }
.tl-nome { display: inline-flex; align-items: center; min-width: 0; font-size: 13px; font-weight: 700; color: var(--text); }
.tl-nome a { color: var(--text); text-decoration: none; }
.tl-nome a:hover { text-decoration: underline; }
.tl-perda { margin-left: auto; font-size: 11.5px; font-weight: 600; color: #fdba74; white-space: nowrap; }
.tl-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 5px 0 2px; }
.tl-tags:empty { display: none; }
.tl-tag { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.tl-tag-self { background: #f9731622; border: 1px solid #f97316; color: #fdba74; }
.tl-tag-mud { background: #7f1d1d; border: 1px solid #ef4444; color: #fecaca; }
.tl-tags .mini-btn { margin-left: 0; background: var(--diag); border-color: var(--diag-b); }
.tl-kv { display: grid; grid-template-columns: 58px 1fr; gap: 6px; margin-top: 4px; font-size: 11.5px; line-height: 1.4; }
.tl-kv > span { color: var(--muted); }
.tl-kv > div { color: #e2e8f0; overflow-wrap: anywhere; }
.tl-det { font-size: 10.5px; color: var(--muted); margin-top: 5px; }
/* fim sem documentação: linha tracejada até o "!" */
.tl-end .tl-rail::before { content: ""; position: absolute; left: 12.5px; top: 0; height: 10px; width: 3px; background: repeating-linear-gradient(to bottom, var(--c) 0 4px, transparent 4px 8px); }
.tl-end .tl-excl { position: absolute; left: 4px; top: 10px; }
.tl-end .tl-body { padding: 10px 0 6px; }
.tl-end b { color: #fde68a; font-size: 13px; }
.tl-end-txt { margin: 3px 0 8px; line-height: 1.45; }
.tl-end .bx-sec { font-size: 12px; }

@media (max-width: 760px) {
  /* na gaveta do celular o painel inteiro rola; as abas grudam embaixo da alça */
  .panel.panel-box { display: block; overflow: auto; padding: 0 0 env(safe-area-inset-bottom); }
  .panel.panel-box #panel-body { display: block; }
  .panel.panel-box[data-sheet="min"] { overflow: hidden; }
  .bx-fixed { padding-top: 4px; }
  .bx-scroll { overflow: visible; }
  .bx-tabs { top: 26px; }
  .panel.panel-box .panel-close { top: 4px; }
  .bx-sim-btn { padding: 6px 10px; }
}

/* o atributo hidden sempre esconde o painel (o display do painel da caixa não pode vencer) */
.panel[hidden] { display: none !important; }

/* busca: resultados de endereço (geocodificador) */
.search-results .sr-end { border-top: 1px solid var(--line); }
.search-results .sr-end small { color: #fdba74; }

/* ---------- alerta de PON caída ---------- */
.pon-btn { font-size: 18px; color: #facc15; }
.pon-card { max-width: 640px; }
.pon-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pon-acoes button { padding: 8px 14px; border-radius: 8px; }
.pon-acoes .primary { background: #2f4fc9; border-color: #2f4fc9; color: #fff; font-weight: 600; }
.pon-grupo { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #0f172a; }
.pon-olt { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.pon-item { padding: 8px 0; border-top: 1px solid #1e293b; font-size: 13px; }
.pon-item:first-of-type { border-top: none; }
.pon-condos { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.pon-condo { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: #1e293b; border: 1px solid var(--line); }
.pon-tag-warn { background: #422006; color: #fde68a; }
.pon-pergunta { margin-top: 10px; padding: 12px; border-radius: 10px; background: #172554; border: 1px solid #1d4ed8; font-size: 13.5px; line-height: 1.45; }
.pon-q { margin-top: 6px; font-size: 15px; }
.pon-resultado { margin-top: 10px; padding: 12px; border-radius: 10px; background: #052e16; border: 1px solid #15803d; font-size: 13.5px; line-height: 1.45; }
.pon-resultado ul { margin: 6px 0; padding-left: 18px; }
.pon-aviso { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: #422006; border: 1px solid #a16207; color: #fde68a; font-size: 12.5px; }
.pon-sum { margin-bottom: 10px; }
.pon-sum .mini-btn { margin-top: 6px; }
@media (max-width: 760px) { .topbar .pon-btn { order: 3; width: 40px; height: 40px; } }
.pon-porque { margin-top: 8px; font-size: 12px; line-height: 1.4; }
.pon-q { margin: 0 0 4px; }
.pon-atend { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #111827; border: 1px dashed var(--line); font-size: 12.5px; line-height: 1.5; }
.pon-checks { display: grid; gap: 6px; margin-top: 10px; }
.pon-check { display: flex; gap: 8px; align-items: flex-start; padding: 7px 9px; border-radius: 8px; background: #0f172a; border: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.pon-check input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: #ef4444; }
.pon-check:has(input:checked) { border-color: #ef4444; background: #450a0a66; }
.pon-toggle { cursor: pointer; display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; font-size: 13px; }
.pon-toggle input { width: 16px; height: 16px; margin: 0; accent-color: #ef4444; }
.pon-toggle:has(input:checked) { border-color: #ef4444; background: #450a0a; }
.pon-auto { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.pon-auto input { width: 16px; height: 16px; accent-color: #2f4fc9; }
.sol-body .pon-auto select { width: auto; padding: 3px 6px; font-size: 12.5px; }
.pon-logins { margin-top: 5px; font-size: 12px; }
.pon-autoresp { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #0c1a2e; border: 1px solid #1e40af; font-size: 13px; line-height: 1.5; display: grid; gap: 3px; }
.pon-autoresp .mini-btn { justify-self: start; margin-top: 4px; }
.pon-teste { margin-bottom: 10px; }
.pon-teste-banner { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #2e1065; border: 1px solid #7c3aed; font-size: 13px; line-height: 1.45; }
.pon-ok { margin-top: 6px; color: #86efac; font-weight: 600; }
.pon-ruim { margin-top: 6px; color: #fcd34d; font-weight: 600; }
.pon-simoff { color: #c4b5fd; }
.pon-simoff input { accent-color: #7c3aed; }
.pon-btn { position: relative; }
.pon-zbx { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #450a0a; border: 1px solid #dc2626; font-size: 13px; line-height: 1.5; }
/* aviso de LOS no canto da tela */
.pon-avisos { position: fixed; right: 14px; top: 64px; z-index: 15; display: grid; gap: 8px; width: min(300px, calc(100% - 28px)); pointer-events: none; }
.pon-aviso-card { pointer-events: auto; position: relative; cursor: pointer; padding: 10px 30px 10px 12px; border-radius: 12px; background: #450a0aee; border: 1px solid #dc2626;
  color: #fee2e2; box-shadow: 0 10px 30px #000a; font-size: 12.5px; line-height: 1.45; animation: ponEntra .25s ease-out; }
.pon-aviso-card:hover { background: #5b0d0dee; }
.pon-aviso-tit { font-weight: 700; font-size: 13.5px; margin-bottom: 3px; }
.pon-aviso-acao { margin-top: 5px; color: #fca5a5; font-weight: 600; }
.pon-aviso-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; padding: 0; border: none; background: none; color: #fecaca; font-size: 18px; line-height: 1; }
@keyframes ponEntra { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 760px) { .pon-avisos { top: auto; bottom: 14px; right: 10px; width: calc(100% - 20px); } }
.pon-aviso-card { cursor: default; }
.pon-aviso-st { margin-top: 6px; padding-top: 6px; border-top: 1px solid #7f1d1d; color: #fde68a; }
.pon-aviso-bts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.pon-aviso-bt { font-size: 12.5px; padding: 6px 10px; border-radius: 8px; background: #1f2937; border: 1px solid #7f1d1d; color: #fee2e2; cursor: pointer; }
.pon-aviso-bt.primario { background: #dc2626; border-color: #dc2626; color: #fff; font-weight: 700; }
.pon-aviso-card.mini { cursor: pointer; padding: 7px 12px; font-weight: 700; font-size: 13px; }
.pon-aviso-mais { float: right; opacity: .8; }
@media (max-width: 760px) { .pon-avisos { top: calc(var(--topbar-h, 104px) + 8px); bottom: auto; } }
.pon-demo { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: #7c3aed; color: #fff; vertical-align: 1px; }
.pon-outros { margin-top: 8px; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---------- alerta de PON: ruas afetadas (public/ruas.js) ---------- */
.inc { background: #0b1220; border: 1px solid #7f1d1d; border-radius: 10px; padding: 12px; margin: 0 24px 4px 0; }
.inc-st { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .6px; color: #fca5a5; }
.inc-ponto { width: 9px; height: 9px; border-radius: 50%; background: #dc2626; box-shadow: 0 0 0 0 #dc2626aa; animation: inc-pulso 1.6s infinite; }
@keyframes inc-pulso { 0% { box-shadow: 0 0 0 0 #dc2626aa; } 70% { box-shadow: 0 0 0 8px #dc262600; } 100% { box-shadow: 0 0 0 0 #dc262600; } }
.inc-desde { margin-left: auto; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.inc-olt { font-size: 17px; font-weight: 700; margin: 6px 0 10px; color: var(--text); }
.inc-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.inc-nums div { background: var(--panel-2); border-radius: 8px; padding: 8px; text-align: center; }
.inc-nums b { display: block; font-size: 20px; line-height: 1.1; color: var(--text); }
.inc-nums span { font-size: 11px; color: var(--muted); }
.inc-pons { margin: 10px 0 0; font-size: 12px; color: var(--text); display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.inc-aviso { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: #451a0340; border: 1px solid #b45309; color: #fcd34d; font-size: 12px; }
.inc-bts { display: flex; gap: 8px; margin-top: 10px; }
.inc-bts button { flex: 1; padding: 8px 10px; font-weight: 600; }
.inc-bt-red { background: #dc2626; border-color: #dc2626; color: #fff; }
.inc-bt-red:hover { background: #b91c1c; }
.ruas-lista { list-style: none; margin: 0; padding: 0; }
.rua-li { display: flex; align-items: stretch; gap: 10px; padding: 7px 8px 7px 0; border-radius: 8px; cursor: pointer; transition: opacity .15s, background .15s; }
.rua-li:hover, .rua-li.foco { background: var(--panel-2); }
.rua-li.apagada { opacity: .45; }
.rua-barra { width: 4px; border-radius: 2px; background: var(--c); flex: none; }
.rua-meio { flex: 1; min-width: 0; }
.rua-nome { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rua-prop { height: 4px; border-radius: 2px; background: var(--panel-2); margin: 4px 0 3px; overflow: hidden; }
.rua-li:hover .rua-prop, .rua-li.foco .rua-prop { background: #0f172a; }
.rua-prop span { display: block; height: 100%; background: var(--c); border-radius: 2px; }
.rua-bairro { font-size: 11px; color: var(--muted); }
.rua-n { align-self: center; font-size: 15px; color: var(--c); min-width: 22px; text-align: right; font-variant-numeric: tabular-nums; }
.rua-etq { display: flex; align-items: center; gap: 5px; background: #fff; color: #0f172a; border: 2px solid var(--c); border-radius: 14px; padding: 2px 8px 2px 2px;
  font-size: 11px; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 6px #0004; cursor: pointer; transition: opacity .15s; }
.rua-etq.apagada { opacity: .22; }
.rua-etq-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 9px; background: var(--c); color: #fff; font-size: 11px; }
.rua-dica .mapboxgl-popup-content { padding: 5px 9px; font-size: 12px; }
#ruas-legenda { position: absolute; left: 10px; bottom: 34px; z-index: 3; background: #111827e6; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 11px; color: var(--muted); }
#ruas-legenda[hidden] { display: none; }
#ruas-legenda .rl-tit { color: var(--text); font-weight: 700; letter-spacing: .5px; font-size: 10px; margin-bottom: 5px; }
#ruas-legenda .rl-cores { display: flex; gap: 10px; color: var(--text); }
#ruas-legenda .rl-cores span { display: flex; align-items: center; gap: 4px; }
#ruas-legenda .rl-cores i { width: 16px; height: 4px; border-radius: 2px; box-shadow: 0 0 0 1.5px #fff; }
#ruas-legenda .rl-nota { margin-top: 5px; }
@media (max-width: 760px) { #ruas-legenda { top: 10px; bottom: auto; } }

.inc-fora { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: #451a0340; border: 1px solid #b45309; color: #fcd34d; font-size: 12px; }
.inc-nota { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.rua-outra { color: #fbbf24; }

.rua-seta { align-self: center; color: var(--muted); font-size: 11px; width: 10px; }
.rua-logins { margin: 0 0 6px 14px; padding: 4px 0 4px 10px; border-left: 2px solid var(--line); }
.rua-logins[hidden] { display: none; }
.rl-login { padding: 5px 6px; border-radius: 6px; font-size: 12px; }
.rl-login + .rl-login { border-top: 1px solid #1f2937; }
.rl-l1 { display: flex; align-items: baseline; gap: 2px; color: var(--text); }
.rl-hora { margin-left: auto; color: #fca5a5; font-variant-numeric: tabular-nums; }
.rl-l2 { color: var(--muted); font-size: 11px; margin-top: 1px; }
.rl-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px; border: 1px solid #b45309; color: #fcd34d; font-size: 10px; }

.pon-inc { display: inline-flex; gap: 2px; margin: 2px 4px 2px 0; }
.pon-juntar { color: #7dd3fc; }
.pon-juntos { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: #0c4a6e40; border: 1px solid #0369a1; font-size: 13px; }

.inc-bt-rede { width: 100%; margin-top: 8px; padding: 7px 10px; font-size: 13px; }
.inc-bt-rede.on { border-color: #0369a1; background: #0c4a6e66; }

/* ---------- modal "Alerta de PON caída" (public/pon.js) ---------- */
.pon-card2 { --pm-bg: #0f1726; --pm-line: #1e293b; --pm-red: #ef4444; --pm-amber: #f59e0b; --pm-green: #22c55e; --pm-blue: #2563eb;
  --pm-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  width: 100%; max-width: 600px; max-height: 90vh; display: flex; flex-direction: column; background: var(--pm-bg);
  border: 1px solid var(--pm-line); border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px #000a; }
.pon-card2 .pm-mono { font-family: var(--pm-mono); font-variant-numeric: tabular-nums; }
.pon-card2 .red { color: var(--pm-red); } .pon-card2 .amber { color: var(--pm-amber); } .pon-card2 .green { color: var(--pm-green); }
.pon-card2 .dim { color: #64748b; }
.pm-head { display: flex; align-items: flex-start; gap: 8px; padding: 16px 18px 14px; border-bottom: 1px solid var(--pm-line); flex: none; }
.pm-head-c { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: flex-start; }
.pm-head h2 { margin: 0; font-size: 17px; }
.pm-x { border: none; background: none; font-size: 24px; line-height: 1; padding: 2px 6px; color: var(--muted); }
.pm-x:hover { color: var(--text); }
.pm-ico { width: 36px; height: 36px; flex: none; border-radius: 9px; border: 1px solid #7f1d1d; display: grid; place-items: center; }
.pm-pulso { width: 10px; height: 10px; border-radius: 50%; background: var(--pm-red); animation: inc-pulso 1.6s infinite; }
.pm-tit { min-width: 0; flex: 1; }
.pm-t1 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.pm-olt { margin-top: 3px; font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.pm-sub { margin-top: 2px; font-size: 12px; color: var(--muted); }
.pm-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; padding: 1px 7px; border-radius: 6px; border: 1px solid #334155; color: var(--muted); white-space: nowrap; }
.pm-tag.red { border-color: #7f1d1d; color: #fca5a5; } .pm-tag.amber { border-color: #78350f; color: #fcd34d; }
.pm-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.pm-body { flex: 1; min-height: 0; overflow: auto; padding: 14px 18px; display: grid; gap: 14px; align-content: start; }
#pon-res { display: grid; gap: 14px; align-content: start; }
#pon-res.carregando { opacity: .55; transition: opacity .2s; }
.pm-foot { flex: none; border-top: 1px solid var(--pm-line); }
.pm-foot:empty { display: none; }
.pm-s { font-size: 12px; color: var(--muted); }
.pm-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.pm-sec-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: -6px; }
/* números principais */
.pm-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pm-nums > div { border: 1px solid var(--pm-line); border-radius: 10px; padding: 9px 10px; display: grid; gap: 2px; min-width: 0; }
.pm-k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-n { font-family: var(--pm-mono); font-size: 22px; line-height: 1.15; color: var(--text); font-variant-numeric: tabular-nums; }
.pm-n small { font-size: 13px; color: var(--muted); font-weight: 400; }
.pm-n.red { color: var(--pm-red); } .pm-n.amber { color: var(--pm-amber); }
/* cartões (aviso âmbar, resultado verde, pergunta azul) */
.pm-card { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid #334155; background: #0b1220; font-size: 13px; line-height: 1.45; }
.pm-card.warn { border-color: #92400e; } .pm-card.ok { border-color: #166534; } .pm-card.q { border-color: #1e40af; }
.pm-card-ic { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1.5px solid currentColor; margin-top: 1px; }
.pm-card.warn .pm-card-ic { color: var(--pm-amber); } .pm-card.ok .pm-card-ic { color: var(--pm-green); } .pm-card.q .pm-card-ic { color: #60a5fa; }
.pm-card-c { min-width: 0; flex: 1; display: grid; gap: 4px; }
.pm-card-t { font-weight: 700; color: var(--text); }
.pm-ul { margin: 2px 0; padding-left: 18px; display: grid; gap: 3px; }
.pm-auto { display: grid; gap: 3px; font-size: 12.5px; padding: 8px 12px; border: 1px solid var(--pm-line); border-radius: 10px; }
/* tabela de PONs */
.pm-seg { display: inline-flex; border: 1px solid #334155; border-radius: 7px; overflow: hidden; }
.pm-seg button { border: none; border-radius: 0; background: none; font-size: 11.5px; padding: 3px 9px; color: var(--muted); }
.pm-seg button.on { background: #1e293b; color: var(--text); }
.pm-tab { border: 1px solid var(--pm-line); border-radius: 10px; overflow: hidden; }
.pm-row { display: grid; grid-template-columns: 96px minmax(84px, 1fr) 54px 62px minmax(0, 1.5fr) 12px; gap: 8px; align-items: center; padding: 8px 10px; font-size: 12.5px; border-top: 1px solid var(--pm-line); cursor: pointer; }
.pm-row:first-child { border-top: none; }
.pm-row:hover, .pm-row.aberta { background: #131d31; }
.pm-th { cursor: default; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-top: 6px; padding-bottom: 6px; }
.pm-th:hover { background: none; }
.pm-c-pon { display: grid; }
.pm-mini { font-size: 10.5px; color: var(--muted); }
.pm-c-onus { display: grid; gap: 4px; }
.pm-bar { display: block; height: 4px; border-radius: 2px; background: #1e293b; overflow: hidden; }
.pm-bar span { display: block; height: 100%; border-radius: 2px; background: var(--c, var(--pm-red)); }
.pm-c-loc { display: flex; gap: 4px; min-width: 0; color: var(--text); }
.pm-ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pm-seta { color: var(--muted); transition: transform .15s; font-size: 14px; text-align: center; }
.pm-row.aberta .pm-seta { transform: rotate(90deg); }
.pm-det { padding: 8px 12px 10px 12px; background: #0b1220; border-top: 1px dashed var(--pm-line); display: grid; gap: 6px; }
.pm-det[hidden] { display: none; }
.pm-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.pm-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; border: 1px solid #334155; color: var(--text); }
.pm-chip b { color: var(--muted); font-weight: 600; }
.pm-ic { width: 7px; height: 7px; background: #94a3b8; flex: none; }
.pm-ic.q { border-radius: 1px; } .pm-ic.r { border-radius: 50%; }
/* uma PON: linha do tempo */
.pm-tl { display: grid; gap: 0; }
.pm-step { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.pm-step:last-child { padding-bottom: 0; }
.pm-step:not(:last-child)::before { content: ''; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px; background: var(--pm-line); }
.pm-step-ic { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1.5px solid #334155; color: var(--muted); background: var(--pm-bg); position: relative; }
.pm-step.ok .pm-step-ic { border-color: var(--pm-green); color: var(--pm-green); }
.pm-step.warn .pm-step-ic { border-color: var(--pm-amber); color: var(--pm-amber); }
.pm-step.q .pm-step-ic { border-color: #60a5fa; color: #60a5fa; }
.pm-step-c { flex: 1; min-width: 0; display: grid; gap: 4px; font-size: 13px; padding-top: 2px; }
.pm-step-c .pm-card { margin-top: 2px; }
.pm-step-t { font-weight: 700; color: var(--text); }
.pm-step.dim .pm-step-t { color: var(--muted); font-weight: 600; }
.pm-prog { display: block; height: 4px; border-radius: 2px; background: #1e293b; overflow: hidden; margin-top: 2px; }
.pm-prog span { display: block; height: 100%; width: 0; background: var(--pm-amber); transition: width .9s linear; }
.pm-ruas { display: grid; gap: 6px; border: 1px solid var(--pm-line); border-radius: 10px; padding: 10px 12px; margin-top: -6px; }
.pm-rua { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr 28px; gap: 10px; align-items: center; font-size: 12.5px; }
.pm-rua-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-rua b { text-align: right; color: var(--c); }
/* ação principal */
.pm-acao { padding: 12px 18px; display: grid; gap: 8px; }
.pm-acao-bt { width: 100%; padding: 10px 14px; border-radius: 9px; background: var(--pm-blue); border-color: var(--pm-blue); color: #fff; font-weight: 700; font-size: 14px; }
.pm-acao-bt:hover { background: #1d4ed8; }
/* rodapé: outros alertas */
.pm-outros { border-top: 1px solid var(--pm-line); }
.pm-acao + .pm-outros { border-top: 1px solid var(--pm-line); }
.pm-foot > .pm-outros:first-child { border-top: none; }
.pm-outros-bar { width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 18px; border: none; border-radius: 0; background: none; font-size: 13px; text-align: left; color: var(--text); }
.pm-outros-bar:hover { background: #131d31; }
.pm-outros-bar .dim { font-size: 12px; }
.pm-outros-bar .pm-seta { margin-left: auto; }
.pm-cnt { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #7f1d1d; color: #fecaca; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
.pm-outros-lista { max-height: 22vh; overflow: auto; padding: 0 18px 10px; display: grid; gap: 6px; }
.pm-outros-lista[hidden] { display: none; }
.pm-alr { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--pm-line); border-radius: 9px; }
.pm-alr-t { flex: 1; min-width: 0; font-size: 13px; }
.pm-alr-t[data-inc] { cursor: pointer; }
.pm-alr-t[data-inc]:hover .pm-mono:first-child { text-decoration: underline; }
.pm-btn-j { font-size: 12px; padding: 5px 10px; border-radius: 7px; border-color: #1e40af; color: #bfdbfe; background: none; white-space: nowrap; }
.pm-btn-j:hover { background: #1e3a8a55; }
.pm-juntado { font-size: 12px; font-weight: 700; color: var(--pm-green); white-space: nowrap; }
.pm-link { border: none; background: none; padding: 2px 4px; font-size: 12px; color: var(--muted); text-decoration: underline; }
@media (max-width: 760px) {
  .pon-card2 { max-width: none; max-height: 100%; height: 100%; border-radius: 0; border: none; }
  .pm-nums { grid-template-columns: repeat(2, 1fr); }
  .pm-outros-lista { max-height: 16vh; }
  .pm-outros-bar .dim { display: none; }
  .pm-row { grid-template-columns: 74px minmax(70px, 1fr) 44px 52px 12px; }
  .pm-row > .pm-c-loc, .pm-th > div:nth-child(5) { display: none; }
}

.pon-aviso-res { font-size: 12px; opacity: .85; margin-bottom: 3px; font-variant-numeric: tabular-nums; }

/* ---------- alerta de PON: retirar dos alertas ativos ---------- */
.pon-aviso-rx { margin-left: 4px; width: 20px; height: 18px; padding: 0; border: none; border-radius: 5px; background: none; color: #fca5a5; font-size: 11px; line-height: 1; vertical-align: -1px; cursor: pointer; opacity: .7; }
.pon-aviso-rx:hover { opacity: 1; background: #7f1d1d; }
.pon-aviso-conf { margin-top: 6px; padding-top: 6px; border-top: 1px solid #7f1d1d; color: #fde68a; }
.pon-aviso-causa { margin-top: 6px; padding-top: 6px; border-top: 1px solid #7f1d1d; color: #fde68a; }
.pm-causa { padding: 10px 18px; border-top: 1px solid var(--pm-line); color: #fcd34d; }
.pm-causa .pon-aviso-bt { border-color: #78350f; }
.pm-retirar-atual { padding: 8px 18px; border-top: 1px solid var(--pm-line); text-align: right; }
.pm-link-perigo { color: #fca5a5; font-weight: 700; }
.pm-cnt-cinza { background: #334155; color: #e2e8f0; }

/* ---------- alerta de PON: barra lateral "Alertas ativos" (public/pon.js) ---------- */
.pm-dupla { --pm-bg: #0f1726; --pm-line: #1e293b; --pm-red: #ef4444; --pm-amber: #f59e0b; --pm-green: #22c55e; --pm-blue: #2563eb;
  --pm-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; --ps-cinza: #94a3b8;
  width: 100%; max-width: 600px; max-height: 90vh; display: flex; }
.pm-dupla > .pon-card2 { max-height: none; flex: 1 1 600px; min-width: 0; }
.pm-dupla.com-lateral { max-width: 940px; min-height: min(560px, 90vh); border: 1px solid var(--pm-line); border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px #000a; }
.pm-dupla.com-lateral > .pon-card2 { border: none; border-radius: 0; box-shadow: none; }
.pm-side { flex: 0 0 340px; display: flex; flex-direction: column; min-height: 0; background: #0c1322; border-right: 1px solid var(--pm-line); }
.pm-side[hidden] { display: none; }
.ps-head { flex: none; height: 56px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--pm-line); }
.ps-tit { font-weight: 700; font-size: 14px; }
.ps-cnt { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #334155; color: #e2e8f0; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
.ps-rel { margin-left: auto; font-size: 11px; color: var(--ps-cinza); }
.ps-lista { flex: 1 1 0; min-height: 0; overflow: auto; padding: 12px 12px 14px; display: grid; gap: 14px; align-content: start;
  scrollbar-width: thin; scrollbar-color: #243044 transparent; }
.ps-lista::-webkit-scrollbar { width: 8px; } .ps-lista::-webkit-scrollbar-track { background: transparent; }
.ps-lista::-webkit-scrollbar-thumb { background: #243044; border-radius: 4px; }
.ps-grp { display: grid; gap: 5px; }
.ps-grp-t { display: flex; align-items: baseline; gap: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ps-cinza); margin-bottom: 1px; }
.ps-grp-t.azul { color: #93c5fd; } .ps-grp-t.verde { color: var(--pm-green); } .ps-grp-t.amber { color: var(--pm-amber); }
.ps-grp-x { font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 11px; }
.ps-grp-t.verde .ps-grp-x { color: #86efac; }
/* item */
.ps-it { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; align-items: start; padding: 8px 10px; border: 1px solid var(--pm-line); border-radius: 8px; background: #0f1726; }
.ps-it.prov { border-color: #3a3012; }
.ps-it.sel { border-color: var(--pm-blue); background: #2563eb14; }
.ps-it.aberto { background: #0f1d3a; border-color: var(--pm-blue); box-shadow: inset 3px 0 0 var(--pm-blue); }
.ps-it.juntado { border-color: #166534; }
.ps-c { min-width: 0; }
.ps-c[data-abrir-ev] { cursor: pointer; }
.ps-c[data-abrir-ev]:hover .ps-olt { text-decoration: underline; }
.ps-c:focus-visible { outline: 2px solid var(--pm-blue); outline-offset: 2px; border-radius: 4px; }
.ps-l1 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ps-olt { flex: 1; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-h { flex: none; font-size: 11.5px; color: var(--ps-cinza); }
.ps-l2 { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 12px; color: #cbd5e1; }
.ps-los { color: #fca5a5; }
.ps-l3 { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ps-tag { font-size: 11px; line-height: 1.5; padding: 0 6px; border-radius: 5px; border: 1px solid; white-space: nowrap; }
.ps-l2 .ps-tag { margin-left: auto; }
.ps-tag-azul { color: #93c5fd; border-color: var(--pm-blue); }
.ps-tag-amber { color: var(--pm-amber); border-color: #f59e0b55; }
.ps-tag-cinza { color: var(--ps-cinza); border-color: #334155; }
/* ícone / caixa */
.ps-ico { width: 18px; height: 18px; display: grid; place-items: center; margin-top: 1px; }
.ps-bola { width: 10px; height: 10px; border-radius: 50%; background: var(--pm-blue); box-shadow: 0 0 0 3px #2563eb40; }
.ps-ok { color: var(--pm-green); font-weight: 700; font-size: 13px; }
.ps-chk { width: 18px; height: 18px; margin-top: 1px; padding: 0; border: 1.5px solid #475569; border-radius: 4px; background: none; color: #fff; font-size: 12px; font-weight: 700; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.ps-chk:hover { border-color: #64748b; }
.ps-chk.on { background: var(--pm-blue); border-color: var(--pm-blue); }
.ps-nao { width: 18px; height: 18px; margin-top: 1px; border: 1.5px dashed #475569; border-radius: 4px; cursor: help; }
.ps-sep { margin-left: auto; font-size: 11.5px; padding: 1px 8px; border-radius: 6px; border: 1px solid #334155; background: none; color: #cbd5e1; cursor: pointer; }
.ps-sep:hover { border-color: #475569; color: #fff; }
/* barra de ação */
.ps-barra { flex: none; padding: 10px 12px 12px; border-top: 1px solid var(--pm-line); background: #0c1322; box-shadow: 0 -6px 16px #0006; }
.ps-barra-t { font-size: 13px; }
.ps-barra-d { font-size: 11.5px; color: var(--ps-cinza); margin-top: 1px; }
.ps-barra-b { display: flex; gap: 8px; margin-top: 8px; }
.ps-limpar { font-size: 13px; padding: 7px 12px; border-radius: 8px; border: 1px solid #334155; background: none; color: #cbd5e1; cursor: pointer; }
.ps-juntar { flex: 1; font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 8px; border: none; background: var(--pm-blue); color: #fff; cursor: pointer; }
.ps-juntar:hover { background: #1d4ed8; }
/* estreito: a barra vai para cima do alerta */
@media (max-width: 1040px) {
  .pm-dupla.com-lateral { flex-direction: column; max-width: 600px; min-height: 0; }
  .pm-dupla.com-lateral .pm-side { flex: 0 0 auto; max-height: 320px; border-right: none; border-bottom: 1px solid var(--pm-line); }
  .pm-dupla.com-lateral .ps-lista { flex: 1 1 auto; }
  .pm-dupla.com-lateral > .pon-card2 { flex: 1 1 auto; min-height: 0; }
}
@media (max-width: 760px) {
  .pm-dupla, .pm-dupla.com-lateral { max-width: none; max-height: 100%; height: 100%; border: none; border-radius: 0; }
  .pm-dupla.com-lateral .pm-side { max-height: 38vh; }
}

/* ---------- OTDR → ponto no mapa (public/otdr.js) ---------- */
#otdr-wrap[hidden] { display: none; }
.otdr-form { margin-bottom: 12px; }
.otdr-dica { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.otdr-dist { flex: 1; }
.otdr-aj { margin-top: 8px; font-size: 13px; }
.otdr-aj summary { cursor: pointer; color: var(--muted); }
.otdr-aj .sim-form-row { margin-top: 6px; }
.otdr h2 { margin: 6px 0 2px; }
.otdr-voltar { border: none; background: none; padding: 0; color: #93c5fd; font-size: 13px; cursor: pointer; }
.otdr-voltar:hover { text-decoration: underline; }
.otdr-res { margin: 12px 0 8px; padding: 12px; border-radius: 10px; border: 1px solid; display: grid; gap: 4px; font-size: 13.5px; }
.otdr-res.ok { border-color: #dc2626; background: #450a0a55; }
.otdr-res.falta { border-color: #b45309; background: #451a0355; }
.otdr-res-t { font-weight: 700; font-size: 14.5px; }
.otdr-entre { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto minmax(0, 1fr); align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; }
.otdr-entre > span:first-child { text-align: right; }
.otdr-entre > span { overflow-wrap: anywhere; }
.otdr-entre b { color: #fecaca; }
.otdr-seta { color: #dc2626; font-size: 16px; }
.otdr-faixa { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.otdr-faixa-cor { display: inline-block; width: 18px; height: 8px; border-radius: 4px; background: #f9731673; margin-right: 6px; vertical-align: 1px; }
.otdr-bts { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.otdr-bt { font-size: 13px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: none; color: var(--text); text-decoration: none; cursor: pointer; }
.otdr-bt.primario { background: #2563eb; border-color: #2563eb; color: #fff; font-weight: 700; }
.otdr-avisos { margin: 8px 0; padding: 8px 10px 8px 26px; border-radius: 8px; background: #422006aa; color: #fde68a; font-size: 12.5px; display: grid; gap: 4px; }
.otdr-passos { list-style: none; padding: 0; margin: 6px 0 10px; display: grid; gap: 4px; font-size: 12.5px; }
.otdr-passos li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; }
.otdr-km { color: var(--muted); text-align: right; }
.otdr-extra { color: #fcd34d; }
.otdr-form { border-color: #1d4ed8; }
.otdr-form button.sim-go { background: #2563eb; border-color: #2563eb; }
.otdr-form .sim-form-row.otdr-linha { grid-template-columns: minmax(0, 1fr) auto; }
#ot-fibra-row[hidden] { display: none; }
.otdr-rede { margin: 2px 0 6px; font-size: 12.5px; }
