/* ==========================================================================
   INTRANET LIGG — TEMA CHROME DARK LUXURY & RESPONSIVE METALLIC UI
   Cromado reflexivo (grafite escuro polido + titânio escovado)
   Acentos Vibrantes: Vermelho Ligg (#FF1E27) & Azul Elétrico (#0066FF)
   Efeitos: Glassmorphism fosco, iluminação ambiente radial e reflexos metálicos
   Totalmente responsivo em todas as resoluções (Mobile / Tablet / Ultra-Wide)
   Preserva 100% da UX, IDs, rotas e funcionamento original.
   ========================================================================== */

:root {
    /* Cores de Acento Vibrantes */
    --chr-red: #FF2B35;
    --chr-red-bright: #FF4D56;
    --chr-red-glow: rgba(255, 43, 53, 0.45);
    --chr-red-dim: rgba(255, 43, 53, 0.12);

    --chr-blue: #0070F3;
    --chr-blue-bright: #38BDF8;
    --chr-blue-glow: rgba(0, 112, 243, 0.45);
    --chr-blue-dim: rgba(0, 112, 243, 0.12);

    /* Paleta Metálica & Grafite */
    --chr-bg: #0A0D12;
    --chr-surface: #11141B;
    --chr-surface-raised: #161A23;
    --chr-surface-highlight: #1E2330;
    
    /* Bordas de Alta Definição & Cromado */
    --chr-border: rgba(255, 255, 255, 0.12);
    --chr-border-light: rgba(255, 255, 255, 0.22);
    --chr-border-chrome: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.3) 100%);
    --chr-accent-line: linear-gradient(90deg, #FF2B35 0%, #FF5A60 30%, #38BDF8 70%, #0070F3 100%);

    /* Tipografia Metálica & Prata */
    --chr-text-white: #FFFFFF;
    --chr-text-silver: #F1F5F9;
    --chr-text-body: #CBD5E1;
    --chr-text-muted: #8E9BAE;

    /* Sombras & Profundidade Tridimensional */
    --chr-shadow-lux: 0 20px 45px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.1);
    --chr-shadow-card: 0 14px 34px -10px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.09);
    --chr-inner-reflection: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -1px 0 rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   FUNDO COM DEGRADÊ CHARMOSO: AZUL & VERMELHO SUTIS NO ESCURO PROFUNDO
   ========================================================================== */
body.intranet-body {
    background-color: #080A0F !important;
    background-image: 
        /* Glow sutil vermelho no canto superior esquerdo */
        radial-gradient(circle 800px at 12% 15%, rgba(255, 30, 45, 0.085) 0%, transparent 70%),
        /* Glow sutil azul elétrico no canto superior direito */
        radial-gradient(circle 900px at 88% 22%, rgba(0, 112, 243, 0.11) 0%, transparent 72%),
        /* Fusão suave de tons no centro inferior */
        radial-gradient(circle 750px at 50% 90%, rgba(14, 165, 233, 0.06) 0%, transparent 70%),
        /* Degradê angular/linear base rico em tons carbono/grafite escuro */
        linear-gradient(135deg, #0D1017 0%, #08090D 45%, #0A0D14 100%) !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    color: var(--chr-text-body) !important;
    min-height: 100vh;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Camada de vídeo sutil com fusão de luz */
.video-background-container {
    opacity: 0.18 !important;
    filter: saturate(1.1) contrast(1.1) !important;
}

/* Overlay sofisticado com degradê híbrido azul e vermelho para um charme noturno */
.video-overlay {
    background: 
        radial-gradient(ellipse 950px 550px at 15% 10%, rgba(255, 43, 53, 0.07) 0%, transparent 65%),
        radial-gradient(ellipse 1000px 650px at 85% 20%, rgba(0, 102, 255, 0.09) 0%, transparent 65%),
        linear-gradient(180deg, rgba(8, 10, 15, 0.72) 0%, rgba(6, 8, 12, 0.92) 100%) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    position: fixed !important;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    pointer-events: none;
}

/* ==========================================================================
   CONTAINER RESPONSIVO PRINCIPAL
   ========================================================================== */
.intranet-container {
    max-width: 1440px !important;
    width: 95% !important;
    margin: 0 auto !important;
    padding: 24px 16px 80px !important;
    box-sizing: border-box !important;
}

/* ==========================================================================
   HEADER SUPERIOR CROMADO VIP
   ========================================================================== */
.intranet-header {
    background: linear-gradient(180deg, rgba(28, 33, 44, 0.94) 0%, rgba(15, 18, 24, 0.96) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid var(--chr-border) !important;
    box-shadow: var(--chr-inner-reflection), 0 10px 30px rgba(0, 0, 0, 0.75) !important;
    padding: 12px 24px !important;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.intranet-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--chr-accent-line) !important;
    box-shadow: 0 0 16px var(--chr-red-glow), 0 0 20px var(--chr-blue-glow);
}

.intranet-header-left, .intranet-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.intranet-title-tag {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    border-radius: 24px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 15px rgba(56, 189, 248, 0.15) !important;
    padding: 6px 14px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: #F8FAFC !important;
}

.user-session-badge {
    background: linear-gradient(180deg, #1E2430 0%, #131720 100%) !important;
    border: 1px solid var(--chr-border) !important;
    box-shadow: var(--chr-inner-reflection) !important;
    border-radius: 20px !important;
    padding: 5px 12px !important;
}

.btn-portal-link {
    background: linear-gradient(180deg, #0070F3 0%, #0052BA 100%) !important;
    color: #FFFFFF !important;
    border: 1px solid #38BDF8 !important;
    border-radius: 9px !important;
    font-weight: 800 !important;
    padding: 7px 16px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 15px var(--chr-blue-glow) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
}
.btn-portal-link:hover {
    filter: brightness(1.15) !important;
    transform: translateY(-1px) scale(1.02) !important;
    box-shadow: 0 0 25px var(--chr-blue-glow) !important;
}

.btn-voltar-home {
    background: linear-gradient(180deg, #232834 0%, #151821 100%) !important;
    color: #E2E8F0 !important;
    border: 1px solid var(--chr-border) !important;
    box-shadow: var(--chr-inner-reflection) !important;
    border-radius: 9px !important;
    font-weight: 700 !important;
    padding: 7px 14px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}
.btn-voltar-home:hover {
    border-color: var(--chr-red) !important;
    color: #FFFFFF !important;
    box-shadow: 0 0 15px var(--chr-red-glow) !important;
}

/* ==========================================================================
   NAVEGAÇÃO POR ABAS SUPERIORES (DOCK FLUTUANTE LUXURY VIP & TITÂNIO POLIDO)
   ========================================================================== */
.intranet-tabs {
    background: linear-gradient(180deg, rgba(20, 24, 33, 0.75) 0%, rgba(11, 14, 20, 0.88) 100%) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    padding: 6px 8px !important;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.8),
        0 16px 36px -10px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(0, 112, 243, 0.05) !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 24px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    position: relative !important;
}

.intranet-tabs::-webkit-scrollbar {
    display: none !important;
}

.tab-btn {
    background: transparent !important;
    border: 1px solid transparent !important;
    color: #94A3B8 !important;
    border-radius: 11px !important;
    font-weight: 600 !important;
    font-size: 0.84rem !important;
    letter-spacing: -0.2px !important;
    padding: 10px 16px !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    position: relative !important;
}

.tab-btn .tab-icon {
    font-size: 0.95rem !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    transition: transform 0.2s ease !important;
}

.tab-btn:hover {
    color: #F8FAFC !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.tab-btn:hover .tab-icon {
    transform: scale(1.15) !important;
}

/* Aba Ativa: Placa de Titânio com Brilho Neon Nobre */
.tab-btn.active {
    color: #FFFFFF !important;
    font-weight: 800 !important;
    background: linear-gradient(180deg, rgba(34, 41, 56, 0.9) 0%, rgba(18, 22, 31, 0.95) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.7),
        0 8px 20px -4px rgba(0, 0, 0, 0.7),
        0 0 20px rgba(0, 112, 243, 0.25) !important;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 18px;
    right: 18px;
    height: 3px;
    background: linear-gradient(90deg, #FF2B35 0%, #FF6068 35%, #38BDF8 70%, #0070F3 100%) !important;
    box-shadow: 0 0 12px rgba(255, 43, 53, 0.8), 0 0 12px rgba(0, 112, 243, 0.8) !important;
    border-radius: 4px !important;
}

/* Badges das Abas: Micro-pills translúcidos com bordas brilhantes */
.tab-btn-badge {
    border-radius: 20px !important;
    font-size: 0.64rem !important;
    font-weight: 900 !important;
    padding: 2px 7px !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 2px 6px rgba(0,0,0,0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* ==========================================================================
   PAINEL PRINCIPAL (CARD DE LUXO CROMADO COM DEBRUM DUPLO)
   ========================================================================== */
.panel-card,
.contract-card,
.modal-dialog {
    background: linear-gradient(180deg, rgba(22, 26, 35, 0.95) 0%, rgba(13, 16, 22, 0.98) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid var(--chr-border) !important;
    border-radius: 18px !important;
    box-shadow: var(--chr-shadow-lux), var(--chr-inner-reflection) !important;
    color: var(--chr-text-body) !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 22px 24px !important;
}

.panel-card::before,
.modal-dialog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--chr-accent-line) !important;
    box-shadow: 0 0 15px rgba(0, 112, 243, 0.4), 0 0 15px rgba(255, 43, 53, 0.4);
}

.panel-header {
    background: transparent !important;
    border-bottom: 1px solid var(--chr-border) !important;
    padding-bottom: 16px !important;
    margin-bottom: 22px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
}

.panel-header h2,
.modal-header h3 {
    color: var(--chr-text-white) !important;
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.4px !important;
    margin: 0 0 4px 0 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.panel-header p {
    color: var(--chr-text-muted) !important;
    font-size: 0.85rem !important;
    margin: 0 !important;
    line-height: 1.45 !important;
}

/* ==========================================================================
   SUB-KPIS / CARDS DE TELEMETRIA VIP (SOBRESCREVENDO ESTILOS INLINE)
   ========================================================================== */
/* Container Grid dos KPIs */
div[style*="grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))"] {
    gap: 16px !important;
    margin-bottom: 24px !important;
}

/* KPI 1: Consultas de Documentos (Acento Azul Neon) */
div[onclick*="switchSubTabAuditoria('consultas')"] {
    background: linear-gradient(145deg, rgba(16, 27, 46, 0.85) 0%, rgba(9, 14, 24, 0.95) 100%) !important;
    border: 1px solid rgba(0, 112, 243, 0.5) !important;
    border-radius: 14px !important;
    padding: 16px 20px !important;
    box-shadow: var(--chr-inner-reflection), 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 112, 243, 0.12) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    position: relative !important;
}
div[onclick*="switchSubTabAuditoria('consultas')"]::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, #38BDF8 0%, #0070F3 100%);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
    border-radius: 14px 14px 0 0;
}
div[onclick*="switchSubTabAuditoria('consultas')"]:hover {
    border-color: #38BDF8 !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 28px var(--chr-blue-glow) !important;
    transform: translateY(-3px);
}
div[onclick*="switchSubTabAuditoria('consultas')"] div:first-child {
    color: #38BDF8 !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase !important;
}
div[onclick*="switchSubTabAuditoria('consultas')"] div:last-child {
    color: #FFFFFF !important;
    font-size: 2.1rem !important;
    font-weight: 900 !important;
    letter-spacing: -0.5px !important;
    font-family: 'Montserrat', sans-serif !important;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
}

/* KPI 2: Acordos Efetivados (Acento Vermelho Ligg Neon) */
div[onclick*="switchSubTabAuditoria('acordos')"] {
    background: linear-gradient(145deg, rgba(38, 16, 20, 0.85) 0%, rgba(18, 8, 10, 0.95) 100%) !important;
    border: 1px solid rgba(255, 43, 53, 0.55) !important;
    border-radius: 14px !important;
    padding: 16px 20px !important;
    box-shadow: var(--chr-inner-reflection), 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 43, 53, 0.15) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    position: relative !important;
}
div[onclick*="switchSubTabAuditoria('acordos')"]::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, #FF666E 0%, #FF2B35 100%);
    box-shadow: 0 0 10px rgba(255, 43, 53, 0.6);
    border-radius: 14px 14px 0 0;
}
div[onclick*="switchSubTabAuditoria('acordos')"]:hover {
    border-color: #FF4D56 !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 28px var(--chr-red-glow) !important;
    transform: translateY(-3px);
}
div[onclick*="switchSubTabAuditoria('acordos')"] div:first-child {
    color: #FF858B !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase !important;
}
div[onclick*="switchSubTabAuditoria('acordos')"] div:last-child {
    color: #FFFFFF !important;
    font-size: 2.1rem !important;
    font-weight: 900 !important;
    letter-spacing: -0.5px !important;
    font-family: 'Montserrat', sans-serif !important;
    text-shadow: 0 0 20px rgba(255, 43, 53, 0.4);
}

/* KPI 3: Boletos Emitidos/Baixados (Acento Ciano/Prata) */
div[onclick*="switchSubTabAuditoria('boletos')"] {
    background: linear-gradient(145deg, rgba(16, 26, 32, 0.85) 0%, rgba(9, 15, 18, 0.95) 100%) !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
    border-radius: 14px !important;
    padding: 16px 20px !important;
    box-shadow: var(--chr-inner-reflection), 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.12) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    position: relative !important;
}
div[onclick*="switchSubTabAuditoria('boletos')"]::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, #7DD3FC 0%, #0284C7 100%);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
    border-radius: 14px 14px 0 0;
}
div[onclick*="switchSubTabAuditoria('boletos')"]:hover {
    border-color: #38BDF8 !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 28px rgba(56, 189, 248, 0.4) !important;
    transform: translateY(-3px);
}
div[onclick*="switchSubTabAuditoria('boletos')"] div:first-child {
    color: #7DD3FC !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase !important;
}
div[onclick*="switchSubTabAuditoria('boletos')"] div:last-child {
    color: #FFFFFF !important;
    font-size: 2.1rem !important;
    font-weight: 900 !important;
    letter-spacing: -0.5px !important;
    font-family: 'Montserrat', sans-serif !important;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
}

/* ==========================================================================
   SUB-ABAS INTERNAS DA AUDITORIA
   ========================================================================== */
div[style*="border-bottom:2px solid #E2E8F0"] {
    border-bottom: 1px solid var(--chr-border) !important;
    gap: 10px !important;
    padding-bottom: 6px !important;
}

.subtab-auditoria-btn {
    background: transparent !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    color: var(--chr-text-muted) !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    padding: 10px 16px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    border-radius: 8px 8px 0 0 !important;
}

.subtab-auditoria-btn:hover {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

.subtab-auditoria-btn.active {
    color: #FFFFFF !important;
    border-bottom: 3px solid var(--chr-blue) !important;
    background: linear-gradient(180deg, rgba(0, 112, 243, 0.12) 0%, transparent 100%) !important;
    text-shadow: 0 0 12px var(--chr-blue-glow) !important;
}

.subtab-auditoria-btn span[id*="badge-count"] {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #F8FAFC !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
}

/* Título de seção das sub-abas */
.subtab-auditoria-content h3 {
    color: #FFFFFF !important;
    font-size: 1.1rem !important;
    font-weight: 800 !important;
}
.subtab-auditoria-content span {
    color: var(--chr-text-muted) !important;
}

/* ==========================================================================
   TABELAS CROMADAS (ALTO CONTRASTE, LINHAS POLIDAS & ELEGANTES)
   ========================================================================== */
.table-responsive {
    background: linear-gradient(180deg, #11141B 0%, #0C0E14 100%) !important;
    border: 1px solid var(--chr-border) !important;
    border-radius: 14px !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6), 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    overflow-x: auto !important;
    margin-top: 8px !important;
}

/* Scrollbar refinada */
.table-responsive::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}
.table-responsive::-webkit-scrollbar-track {
    background: #0B0E14;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: #252B38;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #384257;
}

.intranet-table,
.parcel-table,
.tabela-descontos-compacta {
    width: 100% !important;
    border-collapse: collapse !important;
    background: transparent !important;
    color: var(--chr-text-body) !important;
    font-size: 0.85rem !important;
}

/* Cabeçalho da Tabela */
.intranet-table thead tr,
.parcel-table thead tr,
.tabela-descontos-compacta thead tr {
    background: linear-gradient(180deg, #1E2330 0%, #151822 100%) !important;
    border-bottom: 1px solid var(--chr-border-light) !important;
}

.intranet-table th,
.parcel-table th,
.tabela-descontos-compacta th {
    background: transparent !important;
    color: #94A3B8 !important;
    font-size: 0.73rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    padding: 14px 16px !important;
    border: none !important;
    border-bottom: 1px solid var(--chr-border-light) !important;
    white-space: nowrap !important;
}

/* Linhas e Células da Tabela */
.intranet-table tbody tr,
.parcel-table tbody tr,
.tabela-descontos-compacta tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: background 0.15s ease !important;
}

.intranet-table tbody tr:hover,
.parcel-table tbody tr:hover,
.tabela-descontos-compacta tbody tr:hover {
    background: linear-gradient(90deg, rgba(0, 112, 243, 0.08) 0%, rgba(255, 255, 255, 0.02) 50%, rgba(255, 43, 53, 0.06) 100%) !important;
}

.intranet-table td,
.parcel-table td,
.tabela-descontos-compacta td {
    padding: 13px 16px !important;
    vertical-align: middle !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    font-size: 0.84rem !important;
    color: #E2E8F0 !important;
}

/* SOBRESCREVENDO ESTILOS INLINE DE CORES INJETADOS DINAMICAMENTE PELO JS */
/* Data/Hora da tabela */
.intranet-table td:first-child,
.intranet-table td[style*="color:#334155"] {
    color: #CBD5E1 !important;
    font-size: 0.81rem !important;
    font-weight: 600 !important;
}

/* Documento Consultado (CPF/CNPJ na aba Consultas) */
.intranet-table td strong[style*="color:#1E293B"],
.intranet-table td strong[style*="font-family:monospace"] {
    color: #F8FAFC !important;
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* Número do acordo (#67128) */
.intranet-table td[style*="color:#2563EB"],
.intranet-table td strong[style*="color:#0284C7"] {
    color: #38BDF8 !important;
    font-weight: 800 !important;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

/* Nome do cliente / titular */
.intranet-table td[style*="color:#0F172A"],
.intranet-table td strong {
    color: #FFFFFF !important;
    font-weight: 700 !important;
}

/* CPF / CNPJ genérico */
.intranet-table td[style*="color:#475569"],
.intranet-table td[style*="font-family:monospace"] {
    color: #CBD5E1 !important;
    font-family: 'Consolas', 'Courier New', monospace !important;
}

/* Resumo / Resultado da Consulta (ex: Cliente não encontrado...) */
.intranet-table td[style*="color:#475569; font-size:0.8rem"],
.intranet-table td:last-child {
    color: #94A3B8 !important;
    font-size: 0.82rem !important;
    line-height: 1.4 !important;
}

/* Valor total monetário */
.intranet-table td[style*="color:#059669"],
.intranet-table td strong[style*="color:#059669"] {
    color: #34D399 !important;
    font-weight: 800 !important;
    text-shadow: 0 0 10px rgba(52, 211, 153, 0.25);
}

/* Tag de Condição (ex: 6x de R$ 256,73) */
.intranet-table td .tag-status[style*="background:#EFF6FF"] {
    background: rgba(0, 112, 243, 0.16) !important;
    color: #60A5FA !important;
    border: 1px solid rgba(0, 112, 243, 0.45) !important;
    border-radius: 8px !important;
    padding: 3px 10px !important;
    font-weight: 800 !important;
}

/* IP de Origem / Acesso (Pill moderno grafite + ciano de alta legibilidade) */
.intranet-table td code,
.intranet-table td strong[style*="background:#EFF6FF"],
.intranet-table td strong[style*="background:#E0F2FE"],
.intranet-table td strong[style*="color:#2563EB"],
.intranet-table td strong[style*="color:#0284C7"] {
    background: linear-gradient(180deg, #1C2333 0%, #111622 100%) !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    color: #38BDF8 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 6px rgba(0, 0, 0, 0.4) !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    font-family: 'Consolas', monospace !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    display: inline-block !important;
}

/* TAGS DE SITUAÇÃO DA TABELA (ENCONTRADO, NÃO ENCONTRADO, PENDENTE, LIQUIDADO) */
.tag-status,
.intranet-table td span[style*="border-radius:6px"],
.intranet-table td span.tag-status {
    padding: 4px 10px !important;
    border-radius: 8px !important;
    font-size: 0.74rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

/* ✓ ENCONTRADO / LIQUIDADO */
.tag-status[style*="background:#DCFCE7"],
.intranet-table td span[style*="color:#166534"],
.intranet-table td span[style*="color:#10B981"] {
    background: rgba(16, 185, 129, 0.16) !important;
    color: #34D399 !important;
    border: 1px solid rgba(16, 185, 129, 0.45) !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.2) !important;
}

/* ✕ NÃO ENCONTRADO / CANCELADO */
.tag-status[style*="background:#FEE2E2"],
.intranet-table td span[style*="color:#991B1B"],
.intranet-table td span[style*="color:#EF4444"] {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #FF8A8A !important;
    border: 1px solid rgba(239, 68, 68, 0.45) !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.2) !important;
}

/* Pendente / Aberto */
.tag-status[style*="background:#FEF3C7"],
.intranet-table td span[style*="color:#92400E"],
.intranet-table td span[style*="color:#F59E0B"] {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #FBBF24 !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.15) !important;
}

/* ==========================================================================
   BOTÃO "CANCELAR ACORDO" CHIQUE & FROSTED GLASS (NÃO MAIS BLOCO VERMELHO)
   ========================================================================== */
.btn-action-danger,
button[onclick*="cancelarAcordoIntranet"] {
    background: linear-gradient(180deg, rgba(220, 38, 38, 0.22) 0%, rgba(185, 28, 28, 0.35) 100%) !important;
    border: 1px solid rgba(255, 68, 77, 0.6) !important;
    color: #FFA3A7 !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.3px !important;
    cursor: pointer !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 8px rgba(220, 38, 38, 0.25) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
}

.btn-action-danger:hover,
button[onclick*="cancelarAcordoIntranet"]:hover {
    background: linear-gradient(180deg, #DC2626 0%, #B91C1C 100%) !important;
    color: #FFFFFF !important;
    border-color: #FF666E !important;
    box-shadow: 0 0 16px var(--chr-red-glow), 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-1px);
}

/* ==========================================================================
   INPUTS, SELECTS, DROPDOWNS E PAINEL DE CONTROLE DE DESCONTOS
   ========================================================================== */
input[type="text"],
input[type="password"],
input[type="number"],
select.custom-select,
.custom-select {
    background: linear-gradient(180deg, #171B24 0%, #0F1218 100%) !important;
    border: 1px solid var(--chr-border) !important;
    color: #FFFFFF !important;
    border-radius: 10px !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5) !important;
    padding: 10px 14px !important;
    font-size: 0.86rem !important;
    transition: all 0.2s ease !important;
    outline: none !important;
}

/* Opções do Dropdown / Select (Elimina o bloco branco estourado do navegador) */
select.custom-select option,
.custom-select option,
select option {
    background-color: #12151D !important;
    color: #F8FAFC !important;
    padding: 10px 14px !important;
}

select.custom-select option:hover,
select.custom-select option:checked,
.custom-select option:checked {
    background: #0070F3 !important;
    color: #FFFFFF !important;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select.custom-select:focus,
.custom-select:focus {
    border-color: #38BDF8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3), inset 0 2px 6px rgba(0, 0, 0, 0.5) !important;
}

input::placeholder {
    color: #64748B !important;
}

/* Banner de Faixas de Desconto (Antes verde claro #F0FDF4 -> Dark Satin Esmeralda Nobre) */
div[style*="background:#F0FDF4; border:1px solid #BBF7D0"] {
    background: linear-gradient(145deg, rgba(16, 32, 24, 0.85) 0%, rgba(9, 18, 14, 0.95) 100%) !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    box-shadow: var(--chr-inner-reflection), 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    border-radius: 12px !important;
}
div[style*="background:#F0FDF4; border:1px solid #BBF7D0"] strong {
    color: #34D399 !important;
}
div[style*="background:#F0FDF4; border:1px solid #BBF7D0"] div {
    color: #A7F3D0 !important;
}
div[style*="background:#F0FDF4; border:1px solid #BBF7D0"] code {
    background: rgba(0, 0, 0, 0.4) !important;
    color: #6EE7B7 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
}

/* Label da Carteira */
label[for="select-carteira-descontos"] {
    color: #CBD5E1 !important;
}

/* TABELA DE DESCONTOS: Caixas de Porcentagem (.input-pct-box) Dark Chrome */
.tabela-descontos-compacta td[style*="background:#F0FDF4"],
.tabela-descontos-compacta td[style*="background:#F8FAFC"],
.tabela-descontos-compacta th[style*="background:#F0FDF4"],
.tabela-descontos-compacta th[style*="background:#EFF6FF"] {
    background: rgba(255, 255, 255, 0.02) !important;
}

/* Coluna de Destaque "% Taxa Parc (Mora/Op)" em tom esmeralda noturno elegante, não verde claro */
.tabela-descontos-compacta td[style*="background:#F0FDF4"] {
    background: rgba(16, 185, 129, 0.05) !important;
    border-left: 1px solid rgba(16, 185, 129, 0.15) !important;
    border-right: 1px solid rgba(16, 185, 129, 0.15) !important;
}

.tabela-descontos-compacta .input-pct-box,
.input-pct-box {
    background: linear-gradient(180deg, #181C26 0%, #11141D 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    padding: 3px 6px !important;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.6) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.tabela-descontos-compacta .input-pct-box:focus-within,
.input-pct-box:focus-within {
    border-color: #38BDF8 !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.4), inset 0 2px 5px rgba(0, 0, 0, 0.6) !important;
}

/* Box Geral (Destaque Azul Vibrante Elegante) */
.tabela-descontos-compacta .input-pct-box.box-geral,
.input-pct-box.box-geral {
    background: linear-gradient(180deg, rgba(0, 112, 243, 0.22) 0%, rgba(10, 25, 48, 0.95) 100%) !important;
    border: 1.5px solid rgba(56, 189, 248, 0.7) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 14px rgba(0, 112, 243, 0.25) !important;
}

/* Box Taxa Parc (% Taxa de Operação em Esmeralda Escovado) */
.tabela-descontos-compacta .input-pct-box[style*="background:#DCFCE7"] {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.18) 0%, rgba(8, 28, 20, 0.95) 100%) !important;
    border: 1.5px solid rgba(52, 211, 153, 0.6) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 12px rgba(16, 185, 129, 0.2) !important;
}
.tabela-descontos-compacta .input-pct-box[style*="background:#DCFCE7"] input[type="number"],
.tabela-descontos-compacta .input-pct-box[style*="background:#DCFCE7"] .pct-symbol {
    color: #34D399 !important;
    font-weight: 800 !important;
}

/* Box Mora / Multa (Suave azul noturno) */
.tabela-descontos-compacta .input-pct-box[style*="background:#EFF6FF"] {
    background: linear-gradient(180deg, #181D29 0%, #111520 100%) !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

/* Inputs numéricos dentro das caixas */
.tabela-descontos-compacta input[type="number"],
.input-pct-box input[type="number"] {
    background: transparent !important;
    border: none !important;
    color: #F8FAFC !important;
    font-weight: 800 !important;
    font-size: 0.86rem !important;
    text-align: right !important;
    width: 44px !important;
    box-shadow: none !important;
    padding: 0 2px !important;
    outline: none !important;
    font-family: 'Montserrat', sans-serif !important;
}

.tabela-descontos-compacta .input-pct-box.box-geral input[type="number"] {
    color: #60A5FA !important;
    font-weight: 900 !important;
}

/* Símbolo % */
.tabela-descontos-compacta .pct-symbol,
.input-pct-box .pct-symbol {
    color: #94A3B8 !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    margin-left: 2px !important;
}
.tabela-descontos-compacta .input-pct-box.box-geral .pct-symbol {
    color: #60A5FA !important;
}

/* Faixa de atraso (dias, subtítulos de fase) */
.tabela-descontos-compacta td strong {
    color: #FFFFFF !important;
    font-weight: 800 !important;
}
.tabela-descontos-compacta td span,
.tabela-descontos-compacta td div {
    color: #94A3B8 !important;
}
.tabela-descontos-compacta .sub-limite {
    color: #38BDF8 !important;
    font-weight: 700 !important;
}

/* Painel de busca com fundo cinza original -> Transformado em titânio escuro */
div[style*="background:#F8FAFC; border:1px solid #E2E8F0"] {
    background: linear-gradient(180deg, rgba(23, 27, 36, 0.9) 0%, rgba(15, 18, 24, 0.95) 100%) !important;
    border: 1px solid var(--chr-border) !important;
    box-shadow: var(--chr-inner-reflection), 0 8px 24px rgba(0,0,0,0.4) !important;
    border-radius: 14px !important;
}

div[style*="background:#F8FAFC; border:1px solid #E2E8F0"] label,
div[style*="background:#F8FAFC; border:1px solid #E2E8F0"] h4 {
    color: #E2E8F0 !important;
}

/* ==========================================================================
   BOTÕES DE AÇÃO E PAGINAÇÃO
   ========================================================================== */
.btn-refresh,
.btn-action-table,
.btn-login-submit {
    background: linear-gradient(180deg, #0070F3 0%, #0052BA 100%) !important;
    color: #FFFFFF !important;
    border: 1px solid #38BDF8 !important;
    border-radius: 10px !important;
    font-weight: 800 !important;
    padding: 9px 18px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 15px var(--chr-blue-glow) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.btn-refresh:hover,
.btn-action-table:hover,
.btn-login-submit:hover {
    filter: brightness(1.15) !important;
    box-shadow: 0 0 24px var(--chr-blue-glow) !important;
    transform: translateY(-1px);
}

.btn-action-secondary {
    background: linear-gradient(180deg, #242A38 0%, #151822 100%) !important;
    color: #E2E8F0 !important;
    border: 1px solid var(--chr-border) !important;
    border-radius: 9px !important;
    box-shadow: var(--chr-inner-reflection) !important;
    font-weight: 700 !important;
    padding: 8px 14px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.btn-action-secondary:hover:not(:disabled) {
    border-color: var(--chr-red) !important;
    color: #FFFFFF !important;
    box-shadow: 0 0 14px var(--chr-red-glow) !important;
}

.btn-action-secondary:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
}

/* Linha de paginação */
div[style*="border-top:1px solid #E2E8F0"] {
    border-top: 1px solid var(--chr-border) !important;
}
div[style*="border-top:1px solid #E2E8F0"] span {
    color: var(--chr-text-muted) !important;
}

/* ==========================================================================
   RESPONSIVIDADE PREMIUM (MOBILE, TABLET & DESKTOP)
   ========================================================================== */
@media (max-width: 1024px) {
    .intranet-header {
        padding: 12px 16px !important;
    }
    .intranet-container {
        width: 100% !important;
        padding: 16px 12px 60px !important;
    }
    .panel-card {
        padding: 18px 16px !important;
        border-radius: 14px !important;
    }
}

@media (max-width: 768px) {
    .intranet-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    .intranet-header-right {
        justify-content: space-between !important;
    }
    .intranet-tabs {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        padding: 4px !important;
        scrollbar-width: none;
    }
    .intranet-tabs::-webkit-scrollbar {
        display: none;
    }
    .tab-btn {
        white-space: nowrap !important;
        padding: 8px 14px !important;
        font-size: 0.8rem !important;
    }
    .panel-header {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .panel-header h2 {
        font-size: 1.15rem !important;
    }
    div[style*="grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
    .table-responsive {
        border-radius: 10px !important;
    }
}
