/* ========== SERVIDOR DASHBOARD CSS ========== */
body {
    max-width: 100%;
    padding: 0.5%;
}
.dashboard-container {
    padding-bottom: 2rem;
}

/* ========== SERVIDOR HEADER ========== */
.dadosServidor-header {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.dadosServidor-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.dadosServidor-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-left: 10px;
}

.dadosServidor-nome {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.dadosServidor-matricula,
.dadosServidor-departamento {
    margin-bottom: 0.25rem;
    opacity: 0.9;
    font-size: 0.9rem;
}

.dadosServidor-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* ========== RESUMO CARDS ========== */
.resumo-section {
    margin-bottom: 2rem;
}

.resumo-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.resumo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.resumo-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.resumo-primary .resumo-icon { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.resumo-success .resumo-icon { background: linear-gradient(135deg, #10B981, #059669); }
.resumo-warning .resumo-icon { background: linear-gradient(135deg, #F59E0B, #D97706); }
.resumo-info .resumo-icon { background: linear-gradient(135deg, #06B6D4, #0891B2); }

.resumo-numero {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1F2937;
    line-height: 1;
}

.resumo-label {
    font-size: 0.8rem;
    color: #6B7280;
    margin-top: 0.25rem;
}

/* ========== ANO SELECTOR ========== */
.ano-selector-section {
    margin-bottom: 1.5rem;
}

.ano-selector-card {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #E5E7EB;
}

.btn-ano {
    font-weight: 600;
    padding: 0.375rem 1rem;
}

.btn-ano.active {
    background: #3B82F6;
    color: white;
    border-color: #3B82F6;
}

/* ========== GRÁFICO ========== */
.grafico-section {
    margin-bottom: 2rem;
}

.grafico-card {
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.grafico-card .card-header {
    background: white;
    border-bottom: 1px solid #E5E7EB;
    padding: 1rem 1.5rem;
}

/* ========== ANO CARD ========== */
.ano-card {
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ano-header {
    background: linear-gradient(135deg, #F8FAFC, #F1F5F9);
    border-bottom: 1px solid #E5E7EB;
    padding: 1rem 1.5rem;
}

.ano-titulo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0;
}

.badge-lg {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* ========== CALOR MENSAL ========== */
.mes-card {
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 0.75rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mes-card.ativo {
    background: #EFF6FF;
    border-color: #93C5FD;
}

.mes-card.ativo:hover {
    background: #DBEAFE;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

.mes-card.inativo {
    opacity: 0.5;
}

.mes-label {
    font-weight: 600;
    font-size: 0.75rem;
    color: #6B7280;
    margin-bottom: 0.25rem;
}

.mes-horas {
    font-size: 1rem;
    font-weight: 700;
    color: #3B82F6;
    margin-bottom: 0.25rem;
}

.mes-projetos {
    font-size: 0.7rem;
    color: #9CA3AF;
}

/* ========== TABELA DE PROJETOS ========== */
.projetos-detalhe .table th {
    border-top: none;
    font-size: 0.8rem;
    color: #6B7280;
    font-weight: 600;
}

.projetos-detalhe .table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .dadosServidor-header {
        padding: 1.5rem 0;
    }
    
    .dadosServidor-info {
        flex-direction: column;
        text-align: center;
    }
    
    .dadosServidor-nome {
        font-size: 1.5rem;
    }
    
    .dadosServidor-actions {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .ano-header {
        text-align: center;
    }
    
    .ano-header .text-right,
    .ano-header .text-center {
        text-align: center !important;
        margin-top: 0.5rem;
    }
    
    .resumo-card {
        padding: 1rem;
    }
    
    .resumo-numero {
        font-size: 1.5rem;
    }
    
    .mes-card {
        min-height: 80px;
        padding: 0.5rem;
    }
}

@media (max-width: 576px) {
    .mes-card {
        min-height: 70px;
    }
    
    .mes-horas {
        font-size: 0.875rem;
    }
    
    .ano-titulo {
        font-size: 1.25rem;
    }
    
    .badge-lg {
        font-size: 0.8rem;
        padding: 0.375rem 0.75rem;
    }
}

/* ========== PRINT ========== */
@media print {
    .dadosServidor-header {
        background: #1D4ED8 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .mes-card.ativo {
        background: #EFF6FF !important;
        border-color: #93C5FD !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .btn,
    .dadosServidor-actions {
        display: none !important;
    }
}

/* ========== TABELA DE DISTRIBUIÇÃO MENSAL ========== */

.tabela-carga-mensal {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.5s ease-out;
}

.tabela-carga-mensal thead th {
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    text-align: left;
    border: none;
    position: relative;
}

.tabela-carga-mensal thead th:first-child {
    border-radius: 12px 0 0 0;
}

.tabela-carga-mensal thead th:last-child {
    border-radius: 0 12px 0 0;
}

.tabela-carga-mensal tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #E2E8F0;
    vertical-align: middle;
    font-size: 0.9rem;
}

.tabela-carga-mensal tbody tr:nth-child(even) {
    background-color: #F8FAFC;
}

.tabela-carga-mensal tbody tr:hover {
    background-color: #EFF6FF;
    transition: background-color 0.2s ease;
}

.tabela-carga-mensal tbody tr:last-child td:first-child {
    border-radius: 0 0 0 12px;
}

.tabela-carga-mensal tbody tr:last-child td:last-child {
    border-radius: 0 0 12px 0;
}

.tabela-carga-mensal td.nome-mes {
    font-weight: 600;
    color: #1E293B;
}

.tabela-carga-mensal td.carga-horas {
    font-weight: 700;
    font-size: 1rem;
}

.tabela-carga-mensal td.carga-horas.positiva {
    color: #059669;
}

.tabela-carga-mensal td.carga-horas.zero {
    color: #94A3B8;
}

.tabela-carga-mensal td.semanas-info {
    color: #475569;
}

.tabela-carga-mensal td.projetos-info {
    color: #475569;
}

.tabela-carga-mensal .badge-horas {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.tabela-carga-mensal .badge-horas.ativa {
    background: #DCFCE7;
    color: #059669;
}

.tabela-carga-mensal .badge-horas.inativa {
    background: #F1F5F9;
    color: #94A3B8;
}

.tabela-carga-mensal .badge-projetos {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    background: #DBEAFE;
    color: #2563EB;
}

.tabela-carga-mensal .icone-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #10B981;
    color: #fff;
    font-size: 0.7rem;
    margin-left: 8px;
}

.tabela-carga-mensal .icone-dash {
    color: #CBD5E1;
    font-size: 1.2rem;
    font-weight: 300;
}

/* Tooltip personalizado nos cabeçalhos */
.tabela-carga-mensal .header-com-dica {
    cursor: help;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.5);
}

/* Responsivo */
@media (max-width: 768px) {
    .tabela-carga-mensal thead th,
    .tabela-carga-mensal tbody td {
        padding: 10px 8px;
        font-size: 0.8rem;
    }

    .tabela-carga-mensal thead th:nth-child(3),
    .tabela-carga-mensal tbody td:nth-child(3),
    .tabela-carga-mensal thead th:nth-child(4),
    .tabela-carga-mensal tbody td:nth-child(4) {
        display: none;
    }

    .tabela-carga-mensal .badge-horas {
        font-size: 0.75rem;
        padding: 2px 8px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== DESTAQUE POR ANO ========== */

.ano-bloco {
    margin-bottom: 2.5rem;
    animation: slideUp 0.6s ease-out;
}

.ano-bloco:nth-child(1) { animation-delay: 0s; }
.ano-bloco:nth-child(2) { animation-delay: 0.15s; }
.ano-bloco:nth-child(3) { animation-delay: 0.3s; }
.ano-bloco:nth-child(4) { animation-delay: 0.45s; }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cabeçalho do ano com destaque */
.ano-header-moderno {
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    padding: 1.5rem 2rem;
    border-radius: 16px 16px 0 0;
    position: relative;
    overflow: hidden;
}

.ano-header-moderno::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, #3B82F6, #8B5CF6, #EC4899);
}

.ano-header-moderno::after {
    content: '';
    position: absolute;
    right: -30px;
    top: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.ano-header-moderno .ano-numero {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ano-header-moderno .ano-numero .ano-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #93C5FD;
}

.ano-header-moderno .ano-numero .ano-badge {
    font-size: 1 rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.12);
    color: #E2E8F0;
    padding: 4px 14px;
    border-radius: 20px;
    margin-left: 8px;
}

.ano-header-moderno .ano-metadata {
    color: #94A3B8;
    font-size: 0.85rem;
    display: flex;
    gap: 24px;
    margin-top: 8px;
    padding-left: 60px;
}

.ano-header-moderno .ano-metadata span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ano-header-moderno .ano-metadata i {
    font-size: 0.8rem;
    color: #60A5FA;
}

/* Faixa decorativa abaixo do header */
.ano-divider {
    height: 4px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6, #EC4899, #F59E0B);
    border-radius: 0 0 4px 4px;
}

/* Cartão do ano com borda sutil */
.ano-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.ano-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.ano-card .card-body {
    padding: 1.5rem 2rem 2rem;
}

/* Botão para recolher/expandir ano */
.ano-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #CBD5E1;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ano-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Ano totalmente recolhido (visual fantasma) */
.ano-collapsed .card-body {
    display: none;
}

.ano-collapsed .ano-header-moderno {
    border-radius: 16px;
}

/* Responsivo */
@media (max-width: 768px) {
    .ano-header-moderno {
        padding: 1rem 1.25rem;
    }

    .ano-header-moderno .ano-numero {
        font-size: 1.6rem;
    }

    .ano-header-moderno .ano-numero .ano-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .ano-header-moderno .ano-metadata {
        font-size: 0.75rem;
        gap: 12px;
        padding-left: 50px;
        flex-wrap: wrap;
    }

    .ano-card .card-body {
        padding: 1rem 1.25rem;
    }
}

/* ========== RESUMO 2 COLUNAS ========== */

.resumo-section {
    margin-bottom: 2rem;
}

.resumo-section .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.resumo-section .row > div {
    padding: 0 0.75rem;
    flex: 0 0 20%;
    max-width: 20%;
}

.resumo-card {
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.resumo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.resumo-card.resumo-primary::before {
    background: linear-gradient(90deg, #3B82F6, #60A5FA);
}

.resumo-card.resumo-success::before {
    background: linear-gradient(90deg, #10B981, #34D399);
}

.resumo-card.resumo-warning::before {
    background: linear-gradient(90deg, #F59E0B, #FBBF24);
}

.resumo-card.resumo-info::before {
    background: linear-gradient(90deg, #8B5CF6, #A78BFA);
}

.resumo-card:nth-child(1) { animation-delay: 0s; }
.resumo-card:nth-child(2) { animation-delay: 0.12s; }
.resumo-card:nth-child(3) { animation-delay: 0.24s; }
.resumo-card:nth-child(4) { animation-delay: 0.36s; }

.resumo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.resumo-card .resumo-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.resumo-card.resumo-primary .resumo-icon {
    background: rgba(59, 130, 246, 0.2);
    color: #93C5FD;
}

.resumo-card.resumo-success .resumo-icon {
    background: rgba(16, 185, 129, 0.2);
    color: #6EE7B7;
}

.resumo-card.resumo-warning .resumo-icon {
    background: rgba(245, 158, 11, 0.2);
    color: #FCD34D;
}

.resumo-card.resumo-info .resumo-icon {
    background: rgba(139, 92, 246, 0.2);
    color: #C4B5FD;
}

.resumo-card .resumo-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.resumo-card .resumo-numero {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.resumo-card .resumo-label {
    font-size: 0.85rem;
    color: #94A3B8;
    margin-top: 0.25rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .resumo-section .row > div {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .resumo-card {
        padding: 1.25rem 1.5rem;
        margin-bottom: 1rem;
    }

    .resumo-card .resumo-numero {
        font-size: 1.75rem;
    }

    .resumo-card .resumo-icon {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }
}

/* ========== REFINAMENTOS DE CORES, FONTES E ESPAÇAMENTOS ========== */

.dashboard-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.resumo-card.resumo-primary {
    background: linear-gradient(135deg, #1E3A5F 0%, #2563EB 100%);
}
.resumo-card.resumo-success {
    background: linear-gradient(135deg, #064E3B 0%, #059669 100%);
}
.resumo-card.resumo-warning {
    background: linear-gradient(135deg, #78350F 0%, #D97706 100%);
}
.resumo-card.resumo-info {
    background: linear-gradient(135deg, #312E81 0%, #7C3AED 100%);
}

.resumo-section { margin-bottom: 2.5rem; }
.ano-selector-section { margin-bottom: 2rem; }
.grafico-section { margin-bottom: 2.5rem; }
.calor-mensal { margin-bottom: 2rem; }
.projetos-detalhe { margin-top: 2rem; }

.ano-card .card-body {
    padding: 2rem 2.25rem 2.25rem;
}

.tabela-carga-mensal td.nome-mes {
    font-weight: 600;
    color: #0F172A;
}
.tabela-carga-mensal td.carga-horas.positiva {
    color: #065F46;
    font-weight: 700;
}

.calor-mensal h6, .projetos-detalhe h6 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #475569 !important;
    letter-spacing: 0.3px;
    margin-bottom: 1rem !important;
}

.projetos-detalhe .table td {
    padding: 12px 16px;
}
.projetos-detalhe .table th {
    padding: 10px 16px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748B;
}

.dashboard-footer {
    padding: 1.5rem 0;
    font-size: 0.8rem;
    border-top: 1px solid #E2E8F0;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .ano-card .card-body {
        padding: 1.25rem 1rem 1.5rem;
    }
}

/* ========== SUPORTE A LISTA DE SERVIDORES ========== */
.avatar-sm {
    transition: all 0.2s ease-in-out;
}
tr:hover .avatar-sm {
    background-color: #3B82F6 !important;
    color: #fff !important;
    transform: scale(1.05);
}
.font-weight-500 {
    font-weight: 500;
}