/* ========================================
   CLIENTES CSS - Golden SAT
   ======================================== */

/* Título da página com linha dourada */
.page-title {
    color: #333;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #d4af37 0%, #b8860b 100%);
    border-radius: 1px;
}

/* Botão Principal Dourado */
.btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, #e6c547 0%, #d4af37 100%);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

/* Estilos específicos para a página de clientes */
.clientes-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

/* Cards de estatísticas */
.stats-card {
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stats-card .card-body {
    padding: 1.5rem;
    text-align: center;
}

.stats-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.stats-card h5 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-card small {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Cores específicas para clientes */
.bg-cliente-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.bg-cliente-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.bg-cliente-info {
    background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%);
}

.bg-cliente-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
}

/* Tabela de clientes */
.clientes-table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.clientes-table thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.clientes-table th {
    border: none;
    font-weight: 600;
    color: #495057;
    padding: 1rem 0.75rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clientes-table td {
    border: none;
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
}

.clientes-table tbody tr {
    transition: all 0.3s ease;
}

.clientes-table tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
}

/* Badges personalizados */
.badge-cliente {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-status-ativo {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.badge-status-inativo {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.badge-cnpj {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    color: white;
}

.badge-contrato {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
}

.badge-equipamento {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

/* Botões de ação */
.btn-action {
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-action:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-action.btn-outline-info:hover {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.btn-action.btn-outline-warning:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-action.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Modais */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Remover backdrop escuro dos modais */
.modal-backdrop {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.modal-backdrop.show {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

body.modal-open .modal-backdrop {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Remover qualquer overlay escuro */
.modal-backdrop.fade {
    display: none !important;
}

.modal-backdrop.fade.show {
    display: none !important;
}

.modal-header {
    background: transparent !important;
    color: #333 !important;
    border: none !important;
    padding: 1.5rem;
}

.modal-header .btn-close {
    filter: none !important;
    color: #333 !important;
}

.modal-title {
    font-weight: 600;
    font-size: 1.2rem;
    color: #333 !important;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border: none !important;
    padding: 1.5rem 2rem;
    background: transparent !important;
}

/* Remover qualquer fundo colorido dos modais */
.modal-header.bg-primary,
.modal-header.bg-secondary,
.modal-header.bg-success,
.modal-header.bg-info,
.modal-header.bg-warning,
.modal-header.bg-danger {
    background: transparent !important;
    color: #333 !important;
}

.modal-footer.bg-light,
.modal-footer.bg-secondary,
.modal-footer.bg-primary {
    background: transparent !important;
}

/* Formulários */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

/* Filtros */
.filtros-card {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filtros-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    border-radius: 10px 10px 0 0;
}

/* Cards principais */
.main-card {
    border-radius: 15px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.main-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    padding: 1.5rem;
}

.main-card .card-body {
    padding: 0;
}

/* Responsividade */
@media (max-width: 1400px) {
    .d-xxl-table-cell {
        display: none !important;
    }
}

@media (max-width: 1200px) {
    .d-xl-table-cell {
        display: none !important;
    }
}

@media (max-width: 992px) {
    .d-lg-table-cell {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .d-md-table-cell {
        display: none !important;
    }
    
    .stats-card .card-body {
        padding: 1rem;
    }
    
    .stats-card i {
        font-size: 2rem;
    }
    
    .stats-card h5 {
        font-size: 1.5rem;
    }
    
    .clientes-table th,
    .clientes-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .btn-action {
        width: 30px;
        height: 30px;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-footer {
        padding: 1rem 1.5rem;
    }
    
    /* Melhorar visualização mobile */
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}

@media (max-width: 576px) {
    .stats-card .card-body {
        padding: 0.75rem;
    }
    
    .stats-card i {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .stats-card h5 {
        font-size: 1.25rem;
    }
    
    .clientes-table th,
    .clientes-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    .btn-action {
        width: 25px;
        height: 25px;
    }
    
    .btn-action i {
        font-size: 0.8rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 0.75rem 1rem;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Estados de loading */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #007bff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alertas personalizados */
.alert-cliente {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.alert-cliente-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-cliente-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-cliente-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-cliente-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Tooltips personalizados */
.tooltip-cliente {
    position: relative;
    cursor: help;
}

.tooltip-cliente::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip-cliente:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Scrollbar personalizada */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

/* Efeitos de hover para cards */
.card-hover {
    transition: all 0.3s ease;
}

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

/* Estilos para estados vazios */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h4 {
    margin-bottom: 1rem;
    color: #495057;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Estilos para badges de status */
.status-badge {
    position: relative;
    padding-left: 1.5rem;
}

.status-badge::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
}

.status-badge.ativo::before {
    background-color: #28a745;
}

.status-badge.inativo::before {
    background-color: #6c757d;
}

/* Estilos para ícones */
.icon-cliente {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    font-size: 1.2rem;
    margin-right: 1rem;
}

.icon-cliente i {
    margin: 0;
}

/* Estilos para formulários em modais */
.modal-form .form-group {
    margin-bottom: 1.5rem;
}

.modal-form .form-group:last-child {
    margin-bottom: 0;
}

.modal-form .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Estilos para botões de ação em massa */
.bulk-actions {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: none;
}

.bulk-actions.show {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

/* Estilos para paginação */
.pagination-cliente {
    justify-content: center;
    margin-top: 2rem;
}

.pagination-cliente .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 2px solid #e9ecef;
    color: #007bff;
    transition: all 0.3s ease;
}

.pagination-cliente .page-link:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    transform: translateY(-2px);
}

.pagination-cliente .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

/* Estilos para notificações */
.notification-cliente {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-cliente.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.notification-cliente.error {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.notification-cliente.warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

.notification-cliente.info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}
