/* ============================================
   DASHBOARD ESTILOS
   ============================================ */

.stat-card {
    border: none;
    border-radius: 0.75rem;
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.clickable-card {
    transition: all 0.3s ease !important;
}

.clickable-card:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2) !important;
}

.stat-card .card-body {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-icon.bg-warning {
    background: linear-gradient(135deg, #ff9966 0%, #ff6b6b 100%);
}

.stat-icon.bg-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.stat-card .card-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #2c3e50;
    line-height: 1.2;
}

/* Charts */
.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
    margin-bottom: 1rem;
}

/* Altura maior para gráficos com muitas secretarias */
.chart-container.chart-large {
    height: 500px;
}

/* Melhorar legibilidade de labels em gráficos */
.chart-container canvas {
    max-height: 100% !important;
}

/* Tables */
.table-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table tbody tr {
    vertical-align: middle;
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    color: #495057;
    padding: 1rem 0.75rem;
}

/* Status Badges */
.badge-ativo {
    background-color: #d4edda;
    color: #155724;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

.badge-vencido {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

.badge-vencendo {
    background-color: #fff3cd;
    color: #856404;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

.badge-suspenso {
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

/* Action Buttons */
.btn-action {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    margin: 0 0.25rem;
}

.btn-action i {
    margin-right: 0.25rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state h4 {
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    height: 120px;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.skeleton-line {
    height: 12px;
    border-radius: 2px;
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .stat-card .card-body {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table td,
    .table th {
        padding: 0.5rem 0.25rem;
    }
    
    .btn-action {
        margin: 0.25rem 0;
        display: block;
        width: 100%;
    }
}

/* Animações */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: slideInUp 0.3s ease;
}

/* Print Styles */
@media print {
    .stat-card {
        page-break-inside: avoid;
        box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .table {
        font-size: 10pt;
    }
}

/* Botão Novo Contrato */
.row.mb-4 .btn-primary {
    background-color: #0d6efd;
    color: white;
    border: none;
}

.row.mb-4 .btn-primary:hover {
    background-color: #0b5ed7;
    color: white;
}

/* Modal do Dashboard - Estilo Roxa */
#processoModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

#processoModal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

#processoModal .modal-title {
    font-weight: 600;
}

/* Botões Modernos */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Cards Modernos */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Stat Card - Cores Gradientes Modernas */
.stat-card.border-info {
    border-left: 4px solid #667eea;
}

.stat-card .stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

/* Responsividade melhorada */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .stat-card .card-body {
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
}
