/* Estilos para os filtros do dashboard */

/* Aumentar largura dos filtros de hierarquia */
.w-200px {
    width: 200px !important;
}

/* Melhorar aparência dos selects */
.select2-container--default .select2-selection--single {
    height: 38px !important;
    border: 1px solid #e1e3ea !important;
    border-radius: 6px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
    padding-left: 12px !important;
    padding-right: 30px !important;
    font-size: 0.875rem !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
    right: 8px !important;
}

/* Estilo para o dropdown */
.select2-dropdown {
    border: 1px solid #e1e3ea !important;
    border-radius: 6px !important;
    box-shadow: 0 0.5rem 1.5rem 0.5rem rgba(0, 0, 0, 0.075) !important;
}

/* Estilo para as opções */
.select2-results__option {
    padding: 8px 12px !important;
    font-size: 0.875rem !important;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: #009ef7 !important;
    color: white !important;
}

/* Campo de pesquisa */
.select2-search--dropdown .select2-search__field {
    padding: 8px 12px !important;
    border: 1px solid #e1e3ea !important;
    border-radius: 4px !important;
    font-size: 0.875rem !important;
}

/* Placeholder */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #a1a5b7 !important;
    font-size: 0.875rem !important;
}

/* Botão de limpar */
.select2-container--default .select2-selection--single .select2-selection__clear {
    color: #a1a5b7 !important;
    font-size: 1.2rem !important;
    line-height: 36px !important;
    padding-right: 25px !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover {
    color: #f1416c !important;
}

/* Botão de inadimplência no dashboard */
.inadimplencia-header .btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3) !important;
}

.inadimplencia-header .btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4) !important;
}

.inadimplencia-header .btn-danger:active {
    transform: translateY(0) !important;
}

.inadimplencia-header .btn-danger i {
    font-size: 1.1rem !important;
}

/* Estilos para o card de faturamento melhorado */
.faturamento-modern-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%) !important;
    border: 2px solid #e8f0ff !important;
    border-radius: 1rem !important;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15) !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
}

.faturamento-modern-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 15px 35px rgba(0, 123, 255, 0.25) !important;
    border-color: #007bff !important;
}

.faturamento-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white !important;
    border-bottom: 3px solid #004085 !important;
    padding: 1.5rem !important;
}

.faturamento-icon {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4) !important;
    animation: pulse-primary 2s infinite !important;
}

.faturamento-title {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    letter-spacing: 1px !important;
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.faturamento-subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
}

.faturamento-badge .badge-light-primary {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
    color: #007bff !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3) !important;
}

.faturamento-body {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%) !important;
    padding: 2rem !important;
}

.faturamento-valor {
    color: #007bff !important;
    text-shadow: 0 2px 4px rgba(0, 123, 255, 0.1) !important;
    font-size: 2.5rem !important;
}

.faturamento-sparkle {
    animation: sparkle 1.5s ease-in-out infinite alternate !important;
}

.faturamento-meta {
    color: #6c757d !important;
    font-weight: 600 !important;
}

.faturamento-progress-container {
    margin-top: 1rem !important;
}

.faturamento-progress {
    background: rgba(0, 123, 255, 0.1) !important;
    border-radius: 1rem !important;
    overflow: hidden !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.faturamento-progress .progress-bar {
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%) !important;
    border-radius: 1rem !important;
    transition: width 0.8s ease-in-out !important;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3) !important;
}

.faturamento-progress-text {
    margin-top: 0.5rem !important;
    text-align: center !important;
}

.faturamento-percentage {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

.faturamento-trend {
    color: #6c757d !important;
    font-weight: 600 !important;
}

.faturamento-footer {
    border-top: 1px solid rgba(0, 123, 255, 0.1) !important;
    padding-top: 1rem !important;
    margin-top: 1rem !important;
}

/* Animações */
@keyframes pulse-primary {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(0, 123, 255, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
    }
}

@keyframes sparkle {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.2) rotate(180deg);
        opacity: 1;
    }
}

/* Responsividade */
@media (max-width: 1200px) {
    .w-200px {
        width: 180px !important;
    }
}

@media (max-width: 992px) {
    .w-200px {
        width: 160px !important;
    }
}

@media (max-width: 768px) {
    .w-200px {
        width: 140px !important;
    }
    
    .inadimplencia-header .btn-danger {
        padding: 0.375rem 0.75rem !important;
        font-size: 0.875rem !important;
    }
    
    .inadimplencia-header .btn-danger i {
        font-size: 1rem !important;
    }
    
    .faturamento-valor {
        font-size: 2rem !important;
    }
    
    .faturamento-header {
        padding: 1rem !important;
    }
    
    .faturamento-body {
        padding: 1.5rem !important;
    }
    
    .faturamento-title {
        font-size: 1.25rem !important;
    }
} 

/* Estilos para mensagens de erro do DataTables */
#datatable-error-message {
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

#datatable-error-message .alert {
    margin: 0;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

#datatable-error-message .btn-close {
    margin-left: auto;
    padding: 0.25rem;
    background: none;
    border: none;
    font-size: 1rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#datatable-error-message .btn-close:hover {
    opacity: 1;
}

/* Melhorar indicador de processamento do DataTables */
.dataTables_processing {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
    border: 1px solid #e9ecef !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 400 !important;
    color: #6c757d !important;
    font-size: 0.875rem !important;
    backdrop-filter: blur(4px) !important;
}

/* Animação de loading para tabelas - mais discreta */
.table-responsive.loading {
    position: relative;
    opacity: 0.9;
    pointer-events: none;
}

.table-responsive.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.table-responsive.loading::before {
    content: 'Carregando...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    font-weight: 400;
    color: #6c757d;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Melhorar responsividade das tabelas */
@media (max-width: 768px) {
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        text-align: left;
        margin-bottom: 0.5rem;
    }
    
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        text-align: center;
        margin-top: 0.5rem;
    }
    
    #datatable-error-message .alert {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    #datatable-error-message .btn-close {
        margin-left: 0;
        align-self: center;
    }
} 

/* Componente de Crescimento YTD */
.crescimento-ytd-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.crescimento-ytd-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.crescimento-ytd-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0d6efd 0%, #0b5ed7 50%, #0a58ca 100%);
}

.crescimento-badge {
    margin-top: 0;
    flex-shrink: 0;
}

.crescimento-badge .badge {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
    animation: pulse-glow 2s infinite;
    white-space: nowrap;
}

.crescimento-badge .badge.badge-light-success {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.3);
}

.crescimento-badge .badge.badge-light-danger {
    background: linear-gradient(135deg, #dc3545 0%, #bb2d3b 100%);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.crescimento-badge .badge.badge-light-warning {
    background: linear-gradient(135deg, #fd7e14 0%, #e55a00 100%);
    box-shadow: 0 2px 8px rgba(253, 126, 20, 0.3);
}

/* Estilo para informação de atualização */
.crescimento-ytd-card .text-muted {
    color: #6c757d !important;
    font-size: 0.75rem !important;
    opacity: 0.8;
}

.crescimento-ytd-card .text-muted:hover {
    opacity: 1;
    transition: opacity 0.2s ease;
}

.crescimento-ytd-card .fs-8 {
    font-size: 0.7rem !important;
}

.crescimento-ytd-card .fs-7 {
    font-size: 0.8rem !important;
}

/* Estilo para badge de crescimento com texto separado */
.crescimento-badge .badge {
    text-align: center;
    line-height: 1.4;
    padding: 0.5rem 0.75rem !important;
    white-space: nowrap;
}

.crescimento-badge .badge .fs-8 {
    font-size: 0.9rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.5px;
    margin-left: 0.25rem;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3); }
    50% { box-shadow: 0 4px 16px rgba(13, 110, 253, 0.5); }
}

.crescimento-chart-container {
    padding: 0.25rem 0;
}

.crescimento-bar-row {
    position: relative;
    margin-bottom: 0.75rem;
}

.crescimento-bar-row:last-child {
    margin-bottom: 0;
}

.crescimento-label {
    min-width: 35px;
    text-align: right;
}

.crescimento-bar-container {
    position: relative;
}

.crescimento-bar-wrapper {
    background: #f8f9fa;
    border-radius: 0.5rem;
    height: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.crescimento-bar {
    height: 100%;
    border-radius: 0.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
    font-weight: 700;
    font-size: 0.65rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.crescimento-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.bar-2025 {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 50%, #0a58ca 100%);
}

.bar-2024 {
    background: linear-gradient(135deg, #fd7e14 0%, #e55a00 50%, #d63384 100%);
}

.crescimento-valor {
    position: relative;
    z-index: 2;
    font-family: 'Courier New', monospace;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: 0.6rem;
}

/* Animação de entrada */
.crescimento-ytd-card {
    animation: slideInDown 0.6s ease-out;
}

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

/* Responsividade */
@media (max-width: 991.98px) {
    .crescimento-chart-container {
        margin-top: 0.5rem;
    }
    
    .crescimento-label {
        min-width: 30px;
        font-size: 0.7rem;
    }
    
    .crescimento-bar-wrapper {
        height: 24px;
    }
    
    .crescimento-valor {
        font-size: 0.55rem;
        padding-right: 0.4rem;
    }
}

@media (max-width: 767.98px) {
    .crescimento-ytd-card .card-body {
        padding: 0.75rem;
    }
    
    .crescimento-chart-container {
        margin-top: 0.25rem;
    }
    
    .crescimento-bar-wrapper {
        height: 22px;
    }
    
    .crescimento-valor {
        font-size: 0.5rem;
        padding-right: 0.3rem;
    }
    
    .crescimento-label {
        min-width: 25px;
        font-size: 0.65rem;
    }
} 