/* =====================================================================
   SISTEMA DE AUDITORIA DE OLT - WORKSTATION PREMIUM
   ===================================================================== */

.audit-workstation {
    display: flex;
    height: 100%; /* 🚨 O SEGREDO: Preenche 100% do espaço livre do modal, sem estourar! */
    gap: 15px;
    background-color: #f8fafc;
    padding: 15px;
    overflow: hidden; 
}

/* --- COLUNAS DA WORKSTATION --- */
.col-source {
    width: 320px;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.col-resolutions {
    width: 540px;      /* 🚨 Aumentado de 480px para 540px: Mais espaço para as resoluções! */
    min-width: 540px;  /* 🚨 Acompanha o aumento */
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 🚨 MÁGICA ANTI-SCROLL HORIZONTAL NAS SANFONAS 🚨 */
#auditoria-olt-results-table, 
#auditoria-olt-nao-encontrados-table, 
#auditoria-olt-troca-table, 
#auditoria-olt-offline-table {
    overflow-x: hidden !important; /* Mata a barra de rolagem horizontal na raiz */
}

/* Força badges muito grandes (ex: "Utilizado em Cliente (Auditoria)") a quebrarem linha em vez de esticar a tela */
#accordionAuditoriaOlt .badge {
    white-space: normal !important;
    line-height: 1.2;
    text-align: center;
    max-width: 100%;
    word-wrap: break-word;
}

/* Ajusta as tabelinhas geradas lá dentro para respeitarem o limite de 540px */
#accordionAuditoriaOlt table {
    width: 100%;
    table-layout: fixed; /* Força a tabela a não vazar o container */
}

#accordionAuditoriaOlt table td {
    padding: 8px 5px !important; /* Diminui a gordura entre os itens listados nas sanfonas */
    vertical-align: middle;
}

.col-scanner {
    flex-grow: 1;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    height: 100%;
}

/* --- CARDS BRANCOS --- */
.audit-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 15px; /* 🚨 Reduzido para dar mais espaço interno */
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden; 
}

.audit-dropzone {
    border: 2px dashed #bae6fd;
    background: #f0f9ff;
    border-radius: 12px;
    transition: all 0.3s;
    cursor: pointer;
    flex-shrink: 0;
}
.audit-dropzone:hover { background: #e0f2fe; border-color: #38bdf8; }

/* --- SANFONAS (ACCORDIONS) --- */
.audit-accordion {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 5px;
}
.audit-accordion .accordion-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px !important;
    margin-bottom: 10px; /* 🚨 Mais compacto */
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.audit-accordion .accordion-button {
    background: #f8fafc;
    color: #334155;
    font-weight: 800;
    box-shadow: none !important;
    padding: 12px 15px; /* 🚨 Mais compacto */
}
.audit-accordion .accordion-button:not(.collapsed) {
    background: #ffffff;
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9;
}
.audit-accordion .accordion-body {
    background: #ffffff;
    color: #475569;
    padding: 0;
}

/* --- TABELA DO SCANNER --- */
.audit-table-container {
    flex-grow: 1;
    overflow-y: auto;
}
.audit-table { width: 100%; border-collapse: collapse; color: #334155; font-size: 0.85rem; }
.audit-table th {
    position: sticky; top: 0;
    background: #f8fafc; color: #64748b;
    font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase;
    padding: 15px 10px; border-bottom: 2px solid #e2e8f0;
    z-index: 10;
}
.audit-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.audit-table tbody tr:hover { background: #f8fafc; }

/* 🚨 AJUSTES DE LARGURA E TEXTOS DA TABELA 🚨 */
.audit-table th:nth-child(2), .audit-table td:nth-child(2) {
    max-width: 180px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
}

/* DESTAQUE ABSOLUTO NO SERIAL (Coluna 3) */
.audit-table td:nth-child(3) {
    font-weight: 900 !important;
    color: #0f172a;
    font-family: monospace;
    font-size: 0.95rem;
}

/* --- BADGES E SCROLL --- */
.badge-glow-green { background: #dcfce7; color: #059669; border: 1px solid #bbf7d0; }
.badge-glow-red { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }

.custom-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.custom-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }