:root {
            --primary: #2c3e50;
            --secondary: #3498db;
            --success: #27ae60;
            --warning: #f39c12;
            --danger: #e74c3c;
            --light: #ecf0f1;
            --dark: #34495e;
            --sidebar-width: 260px;
            --header-height: 80px;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            background-color: #f8f9fa;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }
        
        /* Layout Principal */
        .app-container {
            display: flex;
            min-height: 100vh;
            padding-top: var(--header-height);
        }
        
        /* Sidebar de Navegação */
        .sidebar {
            width: var(--sidebar-width);
            background: linear-gradient(180deg, var(--primary), var(--dark));
            color: white;
            position: fixed;
            left: 0;
            top: var(--header-height);
            bottom: 0;
            overflow-y: auto;
            z-index: 100;
            transition: transform 0.3s ease;
            box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        }
        
        .sidebar-header {
            padding: 1.5rem;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            text-align: center;
        }
        
        .sidebar-nav {
            padding: 1rem 0;
        }
        
        .nav-item {
            margin-bottom: 0.25rem;
        }
        
        .nav-link {
            color: rgba(255,255,255,0.8);
            padding: 0.75rem 1.5rem;
            display: flex;
            align-items: center;
            transition: all 0.3s;
            text-decoration: none;
            border-left: 4px solid transparent;
        }
        
        .nav-link:hover {
            color: white;
            background: rgba(255,255,255,0.1);
            border-left-color: var(--secondary);
        }
        
        .nav-link.active {
            color: white;
            background: rgba(255,255,255,0.15);
            border-left-color: var(--secondary);
            font-weight: 600;
        }
        
        .nav-icon {
            width: 24px;
            margin-right: 12px;
            text-align: center;
        }
        
        /* Conteúdo Principal */
        .main-content {
            flex: 1;
            margin-left: var(--sidebar-width);
            padding: 2rem;
            transition: margin-left 0.3s ease;
        }
        
        /* Header Fixo */
        .dashboard-header {
            background: linear-gradient(135deg, var(--primary), var(--dark));
            color: white;
            height: var(--header-height);
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            display: flex;
            align-items: center;
            padding: 0 2rem;
        }
        
        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
        }
        
        .header-title {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        
        .menu-toggle {
            display: none;
            background: none;
            border: none;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
        }
        
        /* Conteúdo das Abas */
        .tab-content {
            display: none;
            animation: fadeIn 0.5s ease;
        }
        
        .tab-content.active {
            display: block;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        /* Cards e Componentes */
        .card {
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.05);
            border: none;
            margin-bottom: 1.5rem;
            transition: transform 0.3s;
        }
        
        .card:hover {
            transform: translateY(-5px);
        }
        
        .card-header {
            background-color: white;
            border-bottom: 1px solid rgba(0,0,0,0.05);
            font-weight: 600;
            padding: 1rem 1.25rem;
        }
        
        .kpi-advanced {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 10px;
            padding: 1.5rem;
            margin-bottom: 1rem;
            text-align: center;
        }
        
        .kpi-advanced-value {
            font-size: 2rem;
            font-weight: bold;
            margin-bottom: 0.5rem;
        }
        
        .kpi-advanced-label {
            font-size: 0.9rem;
            opacity: 0.9;
        }
        
        .kpi-advanced-trend {
            font-size: 0.8rem;
            margin-top: 0.5rem;
        }
        
        .kpi-advanced-trend.positive {
            color: #4ade80;
        }
        
        .kpi-advanced-trend.negative {
            color: #f87171;
        }
        
        .score-card {
            background: white;
            border-radius: 10px;
            padding: 1.5rem;
            margin-bottom: 1rem;
            border-left: 4px solid #3498db;
        }
        
        .score-value {
            font-size: 2rem;
            font-weight: bold;
            margin-bottom: 0.5rem;
        }
        
        .score-label {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 0.25rem;
        }
        
        .score-details {
            font-size: 0.85rem;
            color: #6c757d;
        }
        
        .status-badge {
            padding: 0.35rem 0.75rem;
            border-radius: 50px;
            font-size: 0.8rem;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        .status-completo {
            background-color: rgba(39, 174, 96, 0.15);
            color: var(--success);
        }
        
        .status-pendente {
            background-color: rgba(243, 156, 18, 0.15);
            color: var(--warning);
        }
        
        .status-nao-iniciado {
            background-color: rgba(231, 76, 60, 0.15);
            color: var(--danger);
        }

        .status-em-andamento {
            background-color: rgba(52, 152, 219, 0.15);
            color: #3498db;
        }
        
        .status-aguardando-fase {
            background-color: rgba(155, 89, 182, 0.15);
            color: #9b59b6;
        }
        
        .status-recurso {
            background-color: rgba(241, 196, 15, 0.15);
            color: #f1c40f;
        }
        
        .status-recurso-favoravel {
            background-color: rgba(46, 204, 113, 0.15);
            color: #2ecc71;
        }
        
        .status-recurso-desfavoravel {
            background-color: rgba(231, 76, 60, 0.15);
            color: #e74c3c;
        }

        /* Badges */
        .badge-disputa {
            font-size: 0.7rem;
            padding: 0.3rem 0.6rem;
            margin-top: 0.25rem;
        }
        
        .badge-aberto {
            background-color: #d4edda;
            color: #155724;
        }
        
        .badge-fechado {
            background-color: #e2e3e5;
            color: #383d41;
        }
        
        .badge-aberto-fechado {
            background-color: #cce7ff;
            color: #004085;
        }
        
        .badge-fechado-aberto {
            background-color: #fff3cd;
            color: #856404;
        }
        
        .badge-fase-documental {
            font-size: 0.7rem;
            padding: 0.3rem 0.6rem;
            border-radius: 10px;
        }
        
        .badge-fase-proposta {
            background-color: #e7f3ff;
            color: #007bff;
        }
        
        .badge-fase-habilitacao {
            background-color: #fff3cd;
            color: #856404;
        }
        
        .badge-fase-julgamento {
            background-color: #d4edda;
            color: #155724;
        }
        
        .badge-fase-contratacao {
            background-color: #d1ecf1;
            color: #0c5460;
        }
        
        .badge-fase-recurso {
            background-color: #fef9e7;
            color: #9b870c;
        }

        /* Quadros específicos */
        .quadro-aguardando {
            border-left: 4px solid #17a2b8 !important;
        }

        .quadro-hoje {
            border-left: 4px solid #28a745 !important;
        }

        .quadro-amanha {
            border-left: 4px solid #ffc107 !important;
        }

        .quadro-andamento {
            border-left: 4px solid #e74c3c !important;
        }
        
        .quadro-recurso {
            border-left: 4px solid #9b59b6 !important;
        }

        /* Alertas */
        .alertas-container {
            position: fixed;
            top: calc(var(--header-height) + 20px);
            left: 50%;
            transform: translateX(-50%);
            z-index: 1060;
            width: 90%;
            max-width: 600px;
        }
        
        .alerta-card {
            background: white;
            border-radius: 10px;
            padding: 1rem;
            margin-bottom: 0.75rem;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            border-left: 4px solid #007bff;
            animation: slideIn 0.3s ease-out;
            display: flex;
            align-items: flex-start;
            border: 1px solid #dee2e6;
        }
        
        .alerta-content {
            flex: 1;
        }
        
        .alerta-title {
            font-weight: bold;
            margin-bottom: 0.25rem;
        }
        
        .alerta-description {
            font-size: 0.9rem;
            color: #6c757d;
            margin-bottom: 0.5rem;
        }
        
        .alerta-actions {
            display: flex;
            gap: 0.5rem;
        }
        
        .alerta-dismiss {
            background: none;
            border: none;
            color: #6c757d;
            cursor: pointer;
            padding: 0 0.5rem;
        }
        
        /* Calculadora */
        .calculadora-rapida {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 1000;
        }
        
        .calculadora-btn {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .calculadora-modal {
            position: fixed;
            bottom: 90px;
            right: 20px;
            width: 320px;
            background: white;
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            z-index: 1001;
            display: none;
            overflow: hidden;
        }
        
        .calculadora-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .calculadora-body {
            padding: 20px;
        }
        
        .calculadora-display {
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 5px;
            padding: 15px;
            margin-bottom: 15px;
            text-align: right;
            font-size: 1.5rem;
            font-weight: bold;
            min-height: 60px;
            word-break: break-all;
        }
        
        .calculadora-botoes {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
        }
        
        .calculadora-botao {
            padding: 15px;
            border: none;
            background: #f8f9fa;
            border-radius: 5px;
            cursor: pointer;
            font-size: 1.1rem;
            transition: all 0.2s ease;
        }
        
        .calculadora-botao:hover {
            background: #e9ecef;
        }
        
        .calculadora-botao.operador {
            background: #e7f3ff;
            color: #007bff;
        }
        
        .calculadora-botao.igual {
            background: #007bff;
            color: white;
            grid-column: span 2;
        }
        
        .calculadora-botao.limpar {
            background: #f8d7da;
            color: #dc3545;
        }
        
        /* Dashboard Grid - AJUSTADO PARA 5 COLUNAS */
        .dashboard-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 1rem;
            margin-bottom: 2rem;
        }
        
        /* Contadores Destaque */
        .contador-destaque {
            font-size: 1.8rem;
            font-weight: bold;
            margin-bottom: 0.5rem;
        }
        
        .destaque-hoje {
            color: #28a745;
        }
        
        .destaque-amanha {
            color: #ffc107;
        }
        
        .destaque-aguardando {
            color: #17a2b8;
        }
        
        .destaque-andamento {
            color: #e74c3c;
        }
        
        .destaque-recurso {
            color: #9b59b6;
        }
        
        /* Toast */
        .toast {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 1055;
            min-width: 250px;
        }
        
        /* Calendário */
        .calendar {
            padding: 1rem;
        }
        
        .calendar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }
        
        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 5px;
        }
        
        .calendar-day-header {
            text-align: center;
            font-weight: bold;
            font-size: 0.8rem;
            color: #6c757d;
            padding: 0.5rem 0;
        }
        
        .calendar-day {
            text-align: center;
            padding: 0.5rem;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.2s;
            position: relative;
            min-height: 60px;
            border: 1px solid #dee2e6;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
        }
        
        .calendar-day:hover {
            background-color: #f8f9fa;
        }
        
        .calendar-day.today {
            background-color: #007bff;
            color: white;
        }
        
        .calendar-day.other-month {
            color: #adb5bd;
        }
        
        .calendar-day.has-event {
            background-color: #e7f3ff;
            border: 2px solid #007bff;
        }
        
        .event-dots {
            display: flex;
            gap: 2px;
            margin-top: 2px;
        }
        
        .event-dot {
            display: inline-block;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background-color: #007bff;
        }
        
        .event-dot.urgent {
            background-color: #dc3545;
        }
        
        .event-dot.normal {
            background-color: #28a745;
        }
        
        .event-dot.warning {
            background-color: #ffc107;
        }
        
        /* Nome da Empresa Editável */
        .editable-empresa {
            cursor: pointer;
            transition: all 0.3s ease;
            padding: 2px 8px;
            border-radius: 5px;
            display: inline-flex;
            align-items: center;
        }
        
        .editable-empresa:hover {
            background-color: rgba(255,255,255,0.1);
        }
        
        .edit-icon {
            opacity: 0.5;
            transition: opacity 0.3s ease;
            margin-left: 8px;
            font-size: 0.8rem;
        }
        
        .editable-empresa:hover .edit-icon {
            opacity: 1;
        }
        
        /* Recomendações */
        .recommendation-card {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 1rem;
            border-left: 4px solid #007bff;
        }
        
        .recommendation-card.success {
            border-left-color: #28a745;
        }
        
        .recommendation-card.warning {
            border-left-color: #ffc107;
        }
        
        .recommendation-card.info {
            border-left-color: #17a2b8;
        }
        
        .recommendation-icon {
            font-size: 1.2rem;
            margin-right: 0.75rem;
            margin-top: 0.25rem;
        }
        
        .recommendation-title {
            font-weight: 600;
            margin-bottom: 0.25rem;
        }
        
        .recommendation-description {
            font-size: 0.9rem;
            color: #6c757d;
        }
        
        /* Fases Documentais */
        .fase-documental {
            padding: 0.5rem;
            margin-bottom: 0.5rem;
            border-radius: 5px;
            border-left: 4px solid #6c757d;
        }
        
        .fase-documental.completa {
            background-color: rgba(39, 174, 96, 0.1);
            border-left-color: #27ae60;
        }
        
        .fase-documental.pendente {
            background-color: rgba(243, 156, 18, 0.1);
            border-left-color: #f39c12;
        }
        
        .fase-documental.nao-aplicavel {
            background-color: rgba(108, 117, 125, 0.1);
            border-left-color: #6c757d;
        }
        
        .fase-documental.aguardando {
            background-color: rgba(52, 152, 219, 0.1);
            border-left-color: #3498db;
        }
        
        .fase-label {
            font-weight: 600;
            font-size: 0.9rem;
            margin-bottom: 0.25rem;
        }
        
        .fase-status {
            font-size: 0.8rem;
            color: #6c757d;
        }
        
        .fase-requisito {
            font-size: 0.75rem;
            color: #6c757d;
            margin-top: 0.25rem;
        }
        
        /* Botão de Visualizar Detalhes */
        .btn-visualizar {
            background-color: #6f42c1;
            color: white;
            border: none;
        }
        
        .btn-visualizar:hover {
            background-color: #5a32a3;
            color: white;
        }
        
        /* Estilos para o link na tabela */
        .link-licitacao {
            max-width: 200px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            display: block;
        }
        
        .badge-portal {
            background-color: #e8f4fd;
            color: #0d6efd;
            font-size: 0.75rem;
        }
        
        /* Estilos do modal de visualização */
        .info-item {
            margin-bottom: 15px;
            padding-bottom: 15px;
            border-bottom: 1px solid #eee;
        }
        
        .info-label {
            font-weight: 600;
            color: #495057;
            margin-bottom: 5px;
            font-size: 0.9rem;
        }
        
        .info-value {
            color: #212529;
            font-size: 1rem;
        }
        
        .info-section {
            background-color: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 20px;
        }
        
        .info-section-title {
            color: #495057;
            font-weight: 600;
            margin-bottom: 15px;
            padding-bottom: 8px;
            border-bottom: 2px solid #dee2e6;
        }
        
        /* Responsividade */
        @media (max-width: 1200px) {
            .dashboard-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }
        
        @media (max-width: 992px) {
            .sidebar {
                transform: translateX(-100%);
            }
            
            .sidebar.active {
                transform: translateX(0);
            }
            
            .main-content {
                margin-left: 0;
            }
            
            .menu-toggle {
                display: block;
            }
            
            .dashboard-header {
                padding: 0 1rem;
            }
            
            .dashboard-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            /* Ajustar tabelas para mobile */
            .table-responsive {
                font-size: 0.85rem;
            }
        }
        
        @media (max-width: 768px) {
            .main-content {
                padding: 1rem;
            }
            
            .dashboard-grid {
                grid-template-columns: 1fr;
            }
            
            /* Ajustar largura das colunas das tabelas */
            th, td {
                padding: 0.5rem !important;
            }
        }
        
        /* Animações */
        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* Estilos para impressão */
        @media print {
            .sidebar, .dashboard-header, .calculadora-rapida, .no-print {
                display: none !important;
            }
            
            .main-content {
                margin-left: 0;
                padding: 0;
            }
            
            .card {
                box-shadow: none;
                border: 1px solid #dee2e6;
            }
        }
        
        /* Estilos para busca */
        .search-container {
            margin-bottom: 1rem;
        }
        
        .search-wrapper {
            position: relative;
        }
        
        .search-icon {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: #6c757d;
        }
        
        .search-input {
            padding-left: 40px;
            border-radius: 8px;
        }
        
        /* Estilos para botões de exportação */
        .export-buttons {
            display: flex;
            gap: 5px;
            flex-wrap: wrap;
        }
        
        .btn-export {
            min-width: 100px;
        }
        
        /* Estilos para gráficos */
        .chart-container {
            position: relative;
            height: 300px;
            margin-bottom: 20px;
        }
        
        /* Modal de exportação */
        .export-modal-options {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .export-option {
            padding: 15px;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .export-option:hover {
            background-color: #f8f9fa;
            border-color: #007bff;
        }
        
        .export-option.active {
            background-color: #e7f3ff;
            border-color: #007bff;
        }
        
        .export-option-icon {
            font-size: 24px;
            margin-bottom: 10px;
            color: #007bff;
        }
