/* Estilos personalizados para Caja Chica */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

body {
    background-color: #f5f5f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Cards de Balance */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    transition: transform 0.3s ease;
}

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

.card-body h3 {
    font-weight: 700;
    margin-bottom: 0;
}

.card-body h6 {
    font-weight: 500;
    opacity: 0.9;
}

/* Tabs */
.nav-tabs .nav-link {
    color: #6c757d;
    font-weight: 500;
    border: none;
    padding: 10px 20px;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background-color: transparent;
    border: none;
    border-bottom: 3px solid var(--primary-color);
}

/* Tablas */
.table {
    background-color: white;
}

.table thead th {
    background-color: var(--light-color);
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    color: var(--dark-color);
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Botones de Acción */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-group-action {
    white-space: nowrap;
}

/* Badges */
.badge-ingreso {
    background-color: var(--success-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
}

.badge-egreso {
    background-color: var(--danger-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
}

/* Formularios */
.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Modal */
.modal-header {
    background-color: var(--primary-color);
    color: white;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* Filtros */
.filtros-container {
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Imágenes de Comprobante */
.comprobante-preview {
    max-width: 200px;
    max-height: 200px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
    margin-top: 10px;
}

.comprobante-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.comprobante-link:hover {
    text-decoration: underline;
}

/* DataTables Personalización */
.dataTables_wrapper .dataTables_length select {
    width: 70px;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 5px 10px;
}

.page-link {
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Gráficos */
.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .card-body h3 {
        font-size: 1.25rem;
    }
    
    .card-body h6 {
        font-size: 0.875rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Loader */
.loader {
    border: 3px solid var(--light-color);
    border-radius: 50%;
    border-top: 3px solid var(--primary-color);
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Mensajes de Error/Éxito */
.alert-float {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Tooltips personalizados */
.tooltip-custom {
    font-size: 0.875rem;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
    }
    
    body {
        background-color: white;
    }
}

/* Efectos hover para iconos */
.fa-edit:hover,
.fa-trash:hover,
.fa-eye:hover {
    transform: scale(1.2);
    transition: transform 0.2s;
}

/* Estado activo/inactivo */
.estado-activo {
    color: var(--success-color);
    font-weight: 600;
}

.estado-inactivo {
    color: var(--danger-color);
    font-weight: 600;
}

/* Sombras suaves */
.shadow-soft {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Bordes redondeados */
.rounded-custom {
    border-radius: 10px;
}