/* Dashboard OLT Pro - CSS Profissional COMPLETO */
/* Inclui estilos para login e dashboard */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== ESTILOS DA P�GINA DE LOGIN ===== */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: var(--oltpro-100vh, 100vh);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-box h2 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.login-box .form-group {
    margin-bottom: 25px;
    text-align: left;
}

.login-box .form-label {
    display: block;
    font-weight: 700;
    color: #2d3748;
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-box .form-input {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.login-box .form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.password-field {
    position: relative;
}

.login-box .password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #a0aec0;
    transition: color 0.2s ease;
}

.login-box .password-toggle:hover {
    color: #667eea;
}

.login-box .btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    margin-top: 10px;
}

.login-box .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.error-message {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    margin-top: 20px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.3);
}

/* ===== ESTILOS DO DASHBOARD ===== */
body:not(.login-page) { 
    margin: 0; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    display: flex; 
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #2d3748;
    min-height: var(--oltpro-100vh, 100vh);
}

.sidebar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 280px;
    padding: 0;
    min-height: var(--oltpro-100vh, 100vh);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    transition: width 0.25s ease;
    flex-shrink: 0;
}

/* 2026-08-31 -- FIM DA SAGA DO RODAPE DO SIDEBAR (8 rodadas).
   Todo o CSS que existia aqui (flex-column / sticky / position absoluto /
   padding-bottom magico / as regras do rodape) foi REMOVIDO: o botao
   "Sair" nao mora mais no sidebar. Ele virou o 4o botao da barra de
   icones do parceiro (.pv-notif-logout, ao lado de Novidades, em
   includes/partials/notif_widget.php) -- pedido do usuario pra acabar com
   o problema em vez de corrigi-lo de novo. Sem rodape, nao existe mais
   nada pra ancorar no fim: o sidebar volta ao comportamento simples que
   sempre funcionou (estica via o flex-row do body, pagina rola normal).
   A correcao de zoom x vh/vw (--oltpro-100vh) NAO faz parte disso e
   continua valendo -- ela e global, esta nas regras base. */

.sidebar-header {
    padding: 30px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sidebar-toggle {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: rgba(255,255,255,0.15);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.3);
}

.sidebar-toggle-icon {
    display: inline-block;
    transition: transform 0.25s ease;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.sidebar-header .icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.sidebar ul { 
    list-style: none; 
    padding: 25px 0 80px 0;
    margin: 0;
}

.sidebar li {
    margin: 0;
}

.sidebar .nav-section-label {
    padding: 18px 25px 6px 25px;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar li:first-child .nav-section-label {
    margin-top: 0;
    border-top: none;
}

.sidebar a {
    color: rgba(255,255,255,0.9); 
    text-decoration: none; 
    display: block;
    padding: 16px 25px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-weight: 500;
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

.sidebar a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    transition: width 0.3s ease;
    z-index: 1;
}

.sidebar a:hover::before, .sidebar a.active::before {
    width: 100%;
}

.sidebar a:hover, .sidebar a.active {
    color: white;
    border-left-color: #4facfe;
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

/* Accordion "VLANs" (2026-08-12) -- faltava regra base pro <summary> e pro
   <ul> filho, entao o navegador usava o estilo padrao de <details>/<summary>
   (marcador/recuo proprios) e os itens do submenu herdavam o mesmo
   padding-esquerdo dos links de topo (.sidebar a), ficando desalinhados
   com o icone do "VLANs" pai e sem indentacao visual de hierarquia. */
.sidebar details.nav-vlan-group > summary {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 16px 25px;
    cursor: pointer;
    list-style: none;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    font-size: 15px;
    user-select: none;
}

.sidebar details.nav-vlan-group > summary::-webkit-details-marker {
    display: none;
}

.sidebar details.nav-vlan-group > summary:hover {
    background: rgba(255,255,255,0.1);
}

.sidebar details.nav-vlan-group > summary .nav-label {
    flex: 1;
}

.sidebar details.nav-vlan-group > summary .nav-vlan-arrow {
    transition: transform 0.2s ease;
}

.sidebar details.nav-vlan-group[open] > summary .nav-vlan-arrow {
    transform: rotate(180deg);
}

.sidebar .nav-vlan-submenu {
    padding: 0;
    margin: 0;
    background: rgba(0,0,0,0.14);
}

.sidebar .nav-vlan-submenu li a {
    padding: 12px 25px 12px 50px;
    font-size: 14px;
}

.logout {
    display: inline-block;
    position: fixed;
    bottom: 20px;
    left: 25px;
    width: 230px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border: none;
    color: white;
    padding: 14px 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    z-index: 10;
}

.logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

/* Botao "Sair" do admin -- 2026-08-11, rodada 8. Renderizado via
   includes/partials/admin_identity_widget.php, no topo do conteudo de
   toda tela admin (dentro de <div class="main">, antes de tudo). Rodada
   7: o avatar saiu daqui (foi pro topo da sidebar, .sidebar-avatar-box).
   Rodada 8: deixou de ser position:fixed -- sobrepunha os cards de KPI
   do Dashboard da OLT ao rolar a tela. Agora rola junto com a pagina,
   dentro do wrapper .admin-top-widget (alinha a direita).
   Rodada 9: era um circulo boiando sozinho sem cartao ao redor -- agora
   .admin-logout-card e o mesmo cartao branco com sombra do .pv-notif-row
   do parceiro, com o botao em formato pilula (icone + texto) dentro. */
.admin-top-widget {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 24px 0;
}
.admin-logout-card {
    display: flex;
    background: #fff;
    padding: 8px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}
.admin-fixed-logout-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px 9px 12px;
    border-radius: 10px;
    background: transparent;
    color: #ee5a24;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease;
    white-space: nowrap;
}
.admin-fixed-logout-btn:hover {
    background: rgba(238, 90, 36, 0.1);
}
.admin-logout-icon {
    font-size: 22px;
    line-height: 1;
}

.main {
    flex: 1;
    padding: 30px 40px;
    max-width: calc(var(--oltpro-100vw, 100vw) - 280px);
    overflow-x: auto;
    transition: max-width 0.25s ease;
}

/* ===== Sidebar recolhível ===== */
.sidebar.collapsed {
    width: 78px;
}

.sidebar.collapsed ~ .main {
    max-width: calc(var(--oltpro-100vw, 100vw) - 78px);
}

.sidebar.collapsed .sidebar-header {
    flex-direction: column;
    padding: 20px 10px;
    gap: 12px;
}

.sidebar.collapsed .sidebar-toggle-icon {
    transform: rotate(180deg);
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-vlan-arrow,
.sidebar.collapsed .user-box {
    display: none;
}

.sidebar.collapsed .nav-section-label {
    padding: 12px 0 6px 0;
    text-align: center;
    font-size: 0;
}

.sidebar.collapsed .nav-section-label::after {
    content: '';
    display: block;
    width: 24px;
    height: 1px;
    margin: 0 auto;
    background: rgba(255,255,255,0.25);
}

.sidebar.collapsed a {
    padding: 16px 0;
    text-align: center;
}

.sidebar.collapsed details.nav-vlan-group > summary {
    padding: 12px 0;
    justify-content: center;
}

.sidebar.collapsed .nav-vlan-submenu li a {
    padding-left: 0;
}

.sidebar.collapsed .logout {
    width: 48px;
    left: 15px;
    padding: 14px 0;
}

.page-header {
    margin-bottom: 35px;
    text-align: center;
}

.page-header h1 {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* Bug pego 2026-08-11: -webkit-text-fill-color:transparent (acima) e
   pensado pro texto do titulo virar o gradiente roxo, mas o navegador
   aplica a MESMA regra no emoji que vem junto (ex. "📊 Visao geral") --
   sem cor propria pra clicar, o emoji perde a cor nativa e vira so um
   bloco solido preenchido pelo gradiente (ex. "📊" virando um quadrado
   roxo liso, sem o desenho do grafico dentro). Reseta so o emoji, que
   deve ficar dentro de <span class="header-icon">EMOJI</span> em vez de
   solto no <h1> -- volta a mostrar o emoji colorido de verdade, o resto
   do titulo continua com o gradiente normalmente (background nao e
   herdado por filho, so precisa resetar o fill-color). */
.page-header h1 .header-icon {
    -webkit-text-fill-color: initial;
    color: initial;
}

.page-header p {
    color: #718096;
    font-size: 16px;
    margin: 0;
    font-weight: 500;
}

.card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    overflow: hidden;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
}

.card-header {
    padding: 25px 30px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-content {
    padding: 0;
    overflow-x: auto;
}
/* Sem isso, uma tabela mais larga que o card (ex.: Nome/IP/Modelo/Status/
   Coleta/Acoes com 3 botoes) nao encolhe (table-layout:auto respeita a
   largura minima do conteudo) -- ela vaza pra fora do .card-content e o
   .card, que tem overflow:hidden pra arredondar os cantos, corta o excesso
   sem nem mostrar barra de rolagem. Com overflow-x:auto aqui, o proprio
   .card-content vira a area de rolagem: cabe o quanto couber, o resto
   fica acessivel arrastando/scrollando pro lado, em qualquer resolucao. */

/* Paginas standalone (blacklist.php/cto.php/parceiros.php/auditoria.php)
   precisam do .card-content com respiro -- o padrao acima (padding:0) e
   pensado pros paineis carregados via AJAX dentro de dashboard.php, que
   controlam o proprio espacamento interno. Ate 2026-08-12 cada uma dessas
   4 paginas repetia esse mesmo par de regras (padding:20px 24px e
   form-label com margin-bottom:6px) no seu <style> inline -- consolidado
   aqui numa unica regra, gatilhada por <body class="standalone-page">,
   pra nao correr o risco de uma pagina ficar pra tras se esse valor mudar. */
body.standalone-page .card-content { padding: 20px 24px; }
body.standalone-page .form-label { margin-bottom: 6px; }

.status-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 2026-08-06: controle de atualização automática (Desligado/10s/30s/60s)
   da lista de OLTs -- substitui o refresh fixo de 30s antigo. */
.auto-refresh-control {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.auto-refresh-label {
    font-size: 12px;
    color: #6b7280;
    margin-right: 2px;
}

.btn-autorefresh {
    background: #edf2f7;
    color: #4a5568;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-autorefresh:hover {
    background: #e2e8f0;
}

.btn-autorefresh.active {
    background: #4a5568;
    color: white;
}

.btn-refresh {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-refresh:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

.btn-refresh:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

/* 2026-08-15: estado de "aguarde" reutilizavel -- telas que disparam uma
   busca de verdade na hora (ex: ONUs Nao Autorizadas ao abrir a secao)
   mostram isto em vez de so um texto "Carregando...". */
.oltpro-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px;
    color: #475569;
    font-weight: 500;
}

.oltpro-spinner {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 3px solid rgba(79, 172, 254, 0.25);
    border-top-color: #4facfe;
    animation: oltproSpin 0.8s linear infinite;
}

@keyframes oltproSpin {
    to { transform: rotate(360deg); }
}

/* Estat�sticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    padding: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 10px 30px rgba(67, 233, 123, 0.3);
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 10px 30px rgba(250, 112, 154, 0.3);
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tabelas */
table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 0;
}

/* 2026-08-28: sem white-space:nowrap, cabecalho com icone+2 palavras
   ("Endereco IP", "Modelo") quebrava no meio em coluna estreita (ex.:
   "ENDERECO" numa linha, "IP" sozinho embaixo) -- feio e inconsistente.
   .card-content ja tem overflow-x:auto pra tabela larga (comentario logo
   abaixo), entao nowrap so ativa o scroll horizontal que ja existia pra
   esse caso, em vez de quebrar o texto no meio. */
th {
    padding: 18px 15px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
    font-weight: 700;
    color: #4a5568;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

td { 
    padding: 18px 15px; 
    border-bottom: 1px solid #f7fafc;
    vertical-align: middle;
    transition: all 0.2s ease;
}

tr:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    transform: scale(1.01);
}

/* Badges de status */
/* 2026-08-28: sem display:inline-block, o navegador quebrava "✅ ONLINE"
   em 2 linhas dentro da celula (zoom 100%, coluna estreita) e desenhava o
   fundo arredondado SEPARADO por linha -- parecia 2 badges empilhados (so
   o icone, e "ONLINE" embaixo) quando era 1 span so quebrando mal. */
.status-badge {
    display: inline-block;
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.status-online {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.status-offline {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.status-unknown {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
}

/* Bot�es de a��o */
.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-edit, .btn-delete {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-edit {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

/* 2026-08-06: dropdown "Opções" por OLT na lista principal (atalhos pra
   ONUs não/autorizadas, sinal, autorizar, status de hardware). O menu em
   si (`.olt-options-menu`) agora é um elemento único anexado direto em
   document.body (via JS), não mais um <div> dentro de cada <tr> -- por
   isso não precisa mais desligar nenhum `transform`/`filter` de ancestral
   da tabela (nem `tr:hover`, nem o `backdrop-filter` do `.card`): body não
   tem nenhum dos dois, então `position:fixed` calculado relativo à
   viewport sempre bate. Ver dashboard.js (getOltOptionsMenu/toggleOltOptions). */
.btn-options {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-options:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 55, 72, 0.4);
}

.olt-options-wrap {
    position: relative;
    display: inline-block;
}

/* position:fixed com top/left calculados via JS (toggleOltOptions) --
   evita brigar de z-index com "tr:hover { transform: scale(...) }" da
   tabela, que cria containing block novo pra descendentes absolute. */
.olt-options-menu {
    display: none;
    position: fixed;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    width: 210px;
    z-index: 9999;
    overflow: hidden;
}

.olt-options-menu.open {
    display: block;
}

.olt-options-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: #2d3748;
    transition: background 0.15s ease;
}

.olt-options-menu button:hover {
    background: #f7fafc;
}

.olt-options-divider {
    border-top: 1px solid #edf2f7;
    margin: 4px 0;
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.5);
}

.btn-delete {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

/* Formul�rios */
.form-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 25px; 
    padding: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-label {
    font-weight: 700;
    color: #2d3748;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 2026-08-28: sem width:100%, cada <input>/<select> assumia uma largura
   "natural" diferente (tamanho varia com o conteudo/fonte -- .mono
   principalmente, por ter largura media de caractere diferente da fonte
   normal) mesmo dentro do .form-group (flex column) -- inputs de
   texto/select ignoram o stretch do flexbox por padrao, precisam do
   width explicito. Deixava campos lado a lado com tamanhos bem diferentes
   (ex.: card de Notificacoes do Admin). box-sizing:border-box pra
   padding+border nao estourarem o container com width:100%. */
.form-input {
    width: 100%;
    box-sizing: border-box;
    padding: 15px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.form-input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
    transform: translateY(-1px);
}

.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #a0aec0;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #4facfe;
}

/* Bot�es principais */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-secondary:hover {
    transform: translateY(-2px);
}

/* 2026-08-20: .btn-small e usada em varias telas (parceiro.php, parceiros.php,
   configuracoes.php, cto.php) pra encolher botao de acao de linha em tabela,
   mas nunca tinha sido definida aqui -- so existia um .btn-small local dentro
   de vlan_pendentes.php. Em qualquer outra tela ela nao tinha efeito nenhum,
   entao o botao "grande" de .btn-primary/.btn-secondary vazava puro (uppercase,
   padding 15px 30px), ficando maior e desalinhado dos vizinhos que usam botao
   de acao pequeno (.btn-refresh/.btn-options). Mesmo valor que ja funcionava
   em vlan_pendentes.php, agora valendo em qualquer tela que usar a classe. */
.btn-small {
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
}

/* 2026-08-29: botao so-icone (Desautorizar/Reiniciar/Verificar Sinal na
   coluna "Acao" da tabela "Analise Detalhada") -- pedido do usuario:
   "colocar apenas icone, ao passar mouse da a legenda" (legenda =
   atributo title nativo, sem CSS extra pra tooltip). Sem isso o botao
   herdava o padding largo (10px 18px) pensado pra texto, ficando
   desproporcional pro emoji sozinho. */
.btn-icon-only {
    padding: 8px 12px;
    font-size: 15px;
    line-height: 1;
    min-width: 36px;
    text-align: center;
}

/* Se��es */
section {
    display: none;
}

section.active {
    display: block;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 3% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
    overflow-x: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #2d3748;
}

.close {
    color: #a0aec0;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close:hover {
    color: #4a5568;
}

.modal-body {
    padding: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.modal-footer {
    padding: 25px 30px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Responsividade */
/* Breakpoint intermediario (2026-08-12) -- antes so existia o
   @media(max-width:768px) abaixo, pensado pra celular. Notebooks/telas
   comuns (1366-1440px de CSS px, ex.: zoom 100% numa janela normal)
   usavam os MESMOS valores fixos de uma tela bem larga (sidebar 280px,
   padding 30-40px, titulo 36px) e ficavam desproporcionais/espremidos --
   ficava evidente comparando com zoom 75% (que simula uma viewport bem
   mais larga que a janela real). Este bloco reduz sidebar/padding/fonte
   nessa faixa intermediaria, sem mexer no layout mobile de baixo. */
@media (max-width: 1440px) {
    .sidebar {
        width: 230px;
    }

    .main {
        max-width: calc(var(--oltpro-100vw, 100vw) - 230px);
        padding: 24px 28px;
    }

    .page-header {
        margin-bottom: 26px;
    }

    .page-header h1 {
        font-size: 30px;
    }

    .stats-grid,
    .form-grid {
        gap: 18px;
        padding: 22px;
    }

    .card-header {
        padding: 20px 24px;
    }

    th, td {
        padding: 14px 12px;
    }
}

@media (max-width: 768px) {
    body:not(.login-page) {
        flex-direction: column;
    }
    
    .sidebar,
    .sidebar.collapsed {
        width: 100%;
        min-height: auto;
    }

    .sidebar.collapsed ~ .main {
        max-width: 100%;
    }

    .sidebar.collapsed .sidebar-header {
        flex-direction: row;
        padding: 30px 25px;
    }

    .sidebar.collapsed .brand-text,
    .sidebar.collapsed .nav-label,
    .sidebar.collapsed .user-box {
        display: block;
    }

    .sidebar.collapsed a {
        padding: 16px 25px;
        text-align: left;
    }

    .logout,
    .sidebar.collapsed .logout {
        position: relative;
        width: auto;
        left: auto;
        bottom: auto;
        margin: 20px 25px;
        padding: 14px 20px;
    }

    /* .pv-corner-widget/.admin-top-widget/.admin-fixed-logout-btn deixaram
       de ser position:fixed na rodada 8 (ver regras base acima) -- ja
       rolam junto com a pagina em qualquer largura, entao nao precisam
       mais de um fallback proprio aqui pra tela estreita. */

    .main {
        max-width: 100%;
        padding: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-header h1 {
        font-size: 28px;
    }
    
    .login-box {
        padding: 30px 25px;
    }
}

/* Notifica��es */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 18px 25px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 10000;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.notification-error {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.notification-warning {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.notification-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Tabela de VLANs */
.vlan-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.vlan-table th,
.vlan-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.vlan-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vlan-table tr:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
}

/* Anima��es globais */
* {
    transition: all 0.2s ease;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}


/* ===== OLT Pro Integrado ===== */
.user-box {
    margin: 16px 18px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.12);
    color: white;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}
.user-box small { opacity: .75; font-weight: 600; }

/* Avatar (2026-08-11): circulo com foto real (se o usuario ja subiu uma,
   ver avatar_upload.php) ou gradiente + inicial do nome como fallback --
   generalizado do que "Meus tecnicos" (parceiro.php) ja usava so pra
   tecnico, agora compartilhado com .user-box do admin e do parceiro. */
.avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-weight: 800;
    flex-shrink: 0;
    vertical-align: middle;
}
/* Modal "Meu perfil" (upload/remocao de avatar) -- compartilhado entre
   dashboard.php (admin) e parceiro.php (parceiro/tecnico), por isso mora
   no CSS compartilhado em vez de <style> escopado por pagina. */
.avatar-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.55);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}
.avatar-modal-overlay.open { display: flex; }
.avatar-modal {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    width: 320px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.avatar-modal h3 { margin: 0 0 6px; font-size: 17px; color: #1a202c; }
.avatar-modal p { margin: 0 0 18px; font-size: 13px; color: #718096; }
.avatar-modal .avatar-modal-preview { display: flex; justify-content: center; margin-bottom: 18px; }
.avatar-modal .avatar-modal-preview .avatar-circle { width: 72px; height: 72px; font-size: 28px; }
.avatar-modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.avatar-modal-close { position: absolute; top: 14px; right: 16px; cursor: pointer; color: #a0aec0; font-size: 20px; background: none; border: none; }

/* Icones de notificacao do parceiro/tecnico (2026-08-11), renderizados
   via includes/partials/notif_widget.php em parceiro.php/blacklist.php/
   cto.php (todo lugar que o parceiro/tecnico navega). So admin nao ve
   isso, ele so escreve mensagens/novidades, nao consome. Dropdown de
   Mensagens/Novidades e anexado a document.body via JS (assets/js/
   notif_bar.js), nao aqui -- mesma licao do dropdown "Opcoes" e do
   filtro por coluna (preso num container com overflow, fica cortado).
   Rodada 7: o avatar saiu daqui (foi pro topo da sidebar,
   ver .sidebar-avatar-box) -- agora e so os 3 botoes de icone. Rodada 8:
   deixou de ser position:fixed -- sobrepunha os cards de KPI do
   Dashboard da OLT ao rolar a tela. Agora e renderizado no topo do
   conteudo (dentro de <div class="main">, antes de tudo) e rola junto
   com a pagina -- some ao rolar pra baixo, volta quando rola pro topo. */
.pv-corner-widget { display: flex; flex-direction: row; justify-content: flex-end; align-items: center; gap: 10px; margin: 0 0 24px 0; }
.pv-notif-row { display: flex; justify-content: flex-end; gap: 8px; margin: 0; background: #fff; padding: 8px 10px; border-radius: 14px; box-shadow: 0 8px 24px rgba(15,23,42,.14); }
.pv-notif-btn { position: relative; width: 38px; height: 38px; border-radius: 11px; border: none; background: #f3f4f6; color: #4b5563; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .15s; }
.pv-notif-btn:hover { background: #e5e7eb; }
/* 2026-08-31: "Sair" como 4o botao da barra. Separador + tom vermelho pra
   nao ser lido como mais um icone de notificacao. Especificidade de 2
   classes vence o :hover generico de 1 classe, sem !important. */
.pv-notif-sep { width: 1px; height: 24px; background: #e5e7eb; flex-shrink: 0; }
.pv-notif-btn.pv-notif-logout { background: #fef2f2; color: #dc2626; text-decoration: none; }
.pv-notif-btn.pv-notif-logout:hover { background: #fee2e2; color: #b91c1c; }
.pv-notif-badge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 800; align-items: center; justify-content: center; display: none; }
.pv-notif-badge.show { display: flex; }
.pv-notif-dropdown { position: fixed; width: 320px; max-width: calc(100vw - 20px); max-height: 400px; overflow: auto; background: #fff; border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.25); z-index: 2500; display: none; }
.pv-notif-dropdown.open { display: block; }
.pv-notif-dropdown-header { padding: 14px 16px; font-weight: 800; color: #1a202c; border-bottom: 1px solid #eef0f4; font-size: 14px; }
.pv-notif-item { padding: 12px 16px; border-bottom: 1px solid #f2f3f6; cursor: pointer; }
.pv-notif-item:hover { background: #f8fafc; }
.pv-notif-item.unread { background: #eef2ff; }
.pv-notif-item .pv-notif-title { font-weight: 700; color: #1a202c; font-size: 13.5px; margin-bottom: 3px; }
.pv-notif-item .pv-notif-body { color: #6b7280; font-size: 12.5px; line-height: 1.4; }
.pv-notif-item .pv-notif-date { color: #a0aec0; font-size: 11px; margin-top: 4px; }
.pv-notif-empty { padding: 24px 16px; text-align: center; color: #a0aec0; font-size: 13px; }

/* Avatar grande no topo da sidebar (2026-08-11, rodada 7) -- logo abaixo
   do cabecalho, antes da lista de menu. Renderizado via includes/
   partials/sidebar_avatar.php em toda pagina com sidebar (admin e
   parceiro/tecnico). Nome/cargo ja aparecem no primeiro item da lista de
   menu logo abaixo ("TENANT (dono da conta)"/"admin"), entao aqui e so o
   avatar, sozinho e maior que o antigo (era 34px dentro do card fixo). */
.sidebar-avatar-box {
    display: flex;
    justify-content: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.sidebar-avatar-trigger {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    transition: transform .15s;
}
.sidebar-avatar-trigger:hover { transform: scale(1.06); }
.sidebar-avatar-trigger .avatar-circle {
    width: 64px;
    height: 64px;
    font-size: 24px;
    border: 3px solid rgba(255,255,255,0.5);
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.sidebar-avatar-trigger img.avatar-circle { object-fit: cover; }
.sidebar.collapsed .sidebar-avatar-box { display: none; }

.card-content table td, .card-content table th { vertical-align: middle; }
.btn-delete { cursor: pointer; }


/* 2026-08-17: reforco visual pra "ONUs Nao Autorizadas" -- pedido do
   usuario ("css mais profissional, seguindo padrao do painel"). Antes
   usava paragrafo solto com style inline pros avisos e "Qtd: N" como
   texto puro -- trocado por caixas de alerta e selo, mesma linguagem
   visual do resto do painel (gradiente suave, cantos arredondados,
   sombra leve). Comportamento/dados inalterados, so marcacao/CSS. */
.unauth-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 14px;
    line-height: 1.5;
}

.unauth-banner-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.unauth-banner-warn {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #92400e;
    border: 1px solid #fde68a;
}

.unauth-banner-empty {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
    border: 1px solid #bbf7d0;
    padding: 22px 18px;
    border-radius: 14px;
    font-weight: 600;
    text-align: center;
    font-size: 15px;
}

.unauth-total-line {
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.unauth-olt-card.card {
    margin-bottom: 18px;
}

.unauth-olt-card .card-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
}

.unauth-olt-card .card-header h4::before {
    content: '\1F4E1';
    font-size: 15px;
}

.unauth-count-badge {
    display: inline-block;
    white-space: nowrap;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.35);
}

.unauth-table td.unauth-sn {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    color: #334155;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.unauth-pon-badge {
    display: inline-block;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    white-space: nowrap;
}

.unauth-modelo-vazio {
    color: #94a3b8;
}

/* 2026-08-24: checagem de conflito de cliente (dono x parceiro) antes de
   provisionar -- form compacto inline na propria celula da tabela de ONUs
   nao autorizadas, e bloco de bloqueio quando acha conflito. */
.unauth-conflito-form {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.unauth-conflito-form input {
    padding: 5px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
}

.unauth-conflito-bloqueado {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.5;
}


/* 2026-08-17: popup pos-autorizacao de ONU -- pedido do usuario ("ao
   provisionar depois de retornar ok, exibia popup no meio da tela com
   sinal/descricao/PON, cadastre no bd este cliente, se tiver api pode
   executar pra ele"). Modal centralizado generico (overlay + card),
   reutilizavel se precisar de outro popup no futuro. */
.oltpro-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.oltpro-modal-card {
    background: white;
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
    max-width: 460px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.oltpro-modal-header {
    padding: 20px 26px 16px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border-radius: 18px 18px 0 0;
}

.oltpro-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.oltpro-modal-body {
    padding: 20px 26px 24px;
}

.oltpro-modal-info-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 14px;
    margin-bottom: 6px;
    font-size: 14px;
}

.oltpro-modal-info-grid dt { color: #64748b; font-weight: 600; }
.oltpro-modal-info-grid dd { color: #1e293b; font-weight: 600; margin: 0; }

.oltpro-modal-signal.good { color: #16a34a; }
.oltpro-modal-signal.warn { color: #d97706; }
.oltpro-modal-signal.bad { color: #dc2626; }
.oltpro-modal-signal.unknown { color: #94a3b8; }

.oltpro-modal-divider { border: none; border-top: 1px solid #e2e8f0; margin: 16px 0; }

.oltpro-modal-subtitle {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 10px;
}

.oltpro-modal-form-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.oltpro-modal-form-row label { font-size: 12px; font-weight: 700; color: #475569; }
.oltpro-modal-form-row input {
    padding: 9px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.oltpro-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
    flex-wrap: wrap;
}

.oltpro-modal-erp-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }

.oltpro-modal-signal-warning {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    margin-top: 10px;
}
.oltpro-modal-signal-warning.warn {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #92400e;
    border: 1px solid #fde68a;
}
.oltpro-modal-signal-warning.bad {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    border: 1px solid #fecaca;
}
/* 2026-08-31: variante de sucesso, pro resultado "nenhum conflito" do
   "Verificar cliente". Mesmo padrao das .warn/.bad ja existentes -- o
   estilo base nao define cor nenhuma, so espacamento. */
.oltpro-modal-signal-warning.ok {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
    border: 1px solid #bbf7d0;
}


/* 2026-08-17: overlay de espera pra autorizar/desautorizar ONU -- pedido
   do usuario ("css de espera escurecendo a tela e depois confirmar").
   Reaproveita .oltpro-modal-overlay (ja existe pro popup pos-
   autorizacao) so pro fundo escurecido; o cartao aqui e mais simples
   (so spinner + texto, sem formulario). */
.oltpro-wait-card {
    background: white;
    border-radius: 16px;
    padding: 34px 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
}

.oltpro-spinner-lg {
    width: 36px;
    height: 36px;
    border-width: 4px;
}

.oltpro-wait-text {
    font-weight: 700;
    color: #334155;
    font-size: 14px;
    text-align: center;
}

.oltpro-modal-header.oltpro-modal-header-neutral {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

/* 2026-08-28: secao "Saude Scripts" migrada de saude_scripts.php (pagina
   standalone) pra inline -- classes escopadas com prefixo saude- pra nao
   colidir com .card/.ok/.err/.warn ja usados em outros lugares do painel. */
.saude-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.saude-kpi {
    background: #f8fafc;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    padding: 14px;
}

.saude-kpi b {
    font-size: 25px;
    display: block;
    color: #111827;
}

.saude-kpi small {
    color: #64748b;
}

.saude-small {
    font-size: 12px;
    color: #64748b;
}

.saude-subhead {
    margin: 18px 0 8px;
    font-size: 15px;
    color: #334155;
}

.saude-table {
    width: 100%;
    border-collapse: collapse;
}

.saude-table th, .saude-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 13px;
    vertical-align: top;
}

.saude-table th {
    background: #f8fafc;
    color: #475569;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .04em;
}

.saude-ok { color: #047857; font-weight: 700; }
.saude-err { color: #b91c1c; font-weight: 700; }
.saude-warn { color: #b45309; font-weight: 700; }

/* 2026-08-28: .mono estava duplicada (definicao identica) em 6 paginas
   avulsas (configuracoes/auditoria/blacklist/cto/parceiros + parceiro.php)
   -- centralizada aqui. Usada pra SN/token/IP/chat_id (dado tecnico que
   deve alinhar em coluna, fonte monoespacada). */
.mono {
    font-family: Consolas, monospace;
    font-size: 12.5px;
}

/* 2026-08-28: .pv-checkline so existia dentro do <style> local de
   parceiro.php -- configuracoes.php usa a MESMA classe (2 grupos de
   checkbox de alerta, admin e tenant) mas sem nenhum CSS aplicado (linhas
   sem espacamento/alinhamento/separador, cru). Centralizada aqui, valor
   identico ao que ja existia em parceiro.php. */
.pv-checkline {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.pv-checkline:last-child {
    border-bottom: none;
}

/* 2026-08-28: paragrafo de descricao dentro de card (texto de apoio
   abaixo do titulo de uma secao) -- repetido como style inline
   (color:#6b7280;font-size:12.5px) sem line-height em varios arquivos
   (configuracoes.php, parceiro.php, parceiros.php). Sem line-height, texto
   de 2-3 linhas em fonte pequena ficava visualmente apertado -- usuario
   perguntou "esse texto mal formatado?". margin-bottom continua inline
   por instancia (varia: 0/12px/16px conforme o que vem depois). */
.card-description {
    color: #6b7280;
    font-size: 12.5px;
    line-height: 1.6;
}

/* 2026-09-03: teste de conexao da OLT (SNMP + CLI Telnet/SSH) no cadastro e
   na edicao -- ver testarConexaoOlt() em dashboard.js e a action
   includes/actions/test_olt_conn.php. Classes novas, nada aqui redefine
   estilo existente. */
.olt-conn-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.olt-conn-test {
    margin-top: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    padding: 12px 14px;
}

.olt-conn-resumo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-weight: 700;
    font-size: 13.5px;
    margin-bottom: 10px;
}

.olt-conn-resumo .olt-conn-vendor {
    font-weight: 500;
    font-size: 12px;
    color: #6b7280;
}

.olt-conn-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid #eef2f7;
}

.olt-conn-row:first-of-type { border-top: none; }

.olt-conn-ico {
    flex: 0 0 auto;
    font-size: 15px;
    line-height: 1.4;
}

.olt-conn-txt { flex: 1 1 auto; min-width: 0; }

.olt-conn-titulo {
    font-weight: 700;
    font-size: 13px;
    color: #1f2937;
}

/* Latencia em coluna: tabular-nums pra os numeros nao "dancarem" entre
   linhas quando o teste roda de novo. */
.olt-conn-ms {
    font-family: Consolas, monospace;
    font-size: 11.5px;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
    margin-left: 6px;
}

/* Saida crua do equipamento (sysDescr, resposta de comando) -- pode ser
   longa e sem espaco, entao quebra em qualquer ponto em vez de esticar o
   formulario na horizontal. */
.olt-conn-detalhe {
    font-family: Consolas, monospace;
    font-size: 11.5px;
    color: #374151;
    margin-top: 3px;
    overflow-wrap: anywhere;
}

.olt-conn-dica {
    font-size: 11.5px;
    color: #b45309;
    margin-top: 3px;
}

.olt-conn-row--ok    .olt-conn-titulo { color: #15803d; }
.olt-conn-row--falha .olt-conn-titulo { color: #b91c1c; }
.olt-conn-row--aviso .olt-conn-titulo { color: #b45309; }
.olt-conn-row--pulado { opacity: 0.72; }

.olt-conn-test--ok    { border-color: #86efac; background: #f0fdf4; }
.olt-conn-test--falha { border-color: #fca5a5; background: #fef2f2; }

/* 2026-09-03: o modal "Editar OLT" nao cabia mais na tela -- o usuario so
   conseguia ver o conteudo inteiro com o navegador em 50% de zoom. O modal
   nunca teve max-height nem rolagem propria (.modal-body era padding:0 e
   .modal nao rola), entao ele simplesmente crescia pra fora da viewport; o
   formulario ja era longo e o painel de resultado do teste de conexao passou
   do limite. Escopado em #editModal de proposito -- os outros modais do
   painel sao curtos e nao precisam mudar de comportamento. */
#editModal .modal-content {
    display: flex;
    flex-direction: column;
    /* Casa com o `margin: 3% auto` de .modal-content (3% em cima + 3% embaixo).
       var(--oltpro-100vh) em vez de 100vh puro porque o CSS `zoom` dos botoes
       100%/90%/80% NAO altera vh -- zoom_control.js mantem essa variavel
       corrigida (mesmo motivo do rodape, ver style.css:161). */
    max-height: calc(var(--oltpro-100vh, 100vh) * 0.94);
}

#editModal .modal-header,
#editModal .modal-footer {
    flex: 0 0 auto;
}

#editModal .modal-body {
    overflow-y: auto;
    /* min-height:0 e obrigatorio: filho flex nasce com min-height:auto e
       simplesmente NAO encolhe abaixo do conteudo -- sem isso o overflow-y
       nao rola nada e o modal volta a estourar a tela. */
    min-height: 0;
    padding: 0 0 6px;
}

/* Com 3 botoes o rodape ficou apertado e o texto quebrava no meio
   ("TESTAR / CONEXAO" em 2 linhas). Nao quebra mais dentro do botao; se
   faltar largura de verdade, quebra a LINHA de botoes. */
#editModal .modal-footer {
    flex-wrap: wrap;
    gap: 10px;
}

#editModal .modal-footer .btn-primary,
#editModal .modal-footer .btn-secondary {
    white-space: nowrap;
}

/* Estado "parcial": nenhuma etapa falhou, mas alguma nao chegou a ser testada
   (semaforo de sessoes cheio, credencial em branco). Ambar em vez de verde --
   verde aqui seria mentira por omissao. */
.olt-conn-test--parcial { border-color: #fcd34d; background: #fffbeb; }
