/**
 * Nómina CFDI 4.0 - Estilos personalizados
 */

/* Variables */
:root {
    --color-primario: #0d6efd;
    --color-exito: #198754;
    --color-peligro: #dc3545;
    --color-advertencia: #ffc107;
    --color-info: #0dcaf0;
}

/* Base */
html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

main {
    flex: 1;
}

/* Navbar */
.navbar-brand {
    font-weight: 600;
}

/* Cards */
.card {
    border: none;
    border-radius: 0.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

/* Tables */
.table th {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: #6c757d;
}

.table td {
    vertical-align: middle;
}

/* Buttons */
.btn-group-sm > .btn {
    padding: 0.25rem 0.5rem;
}

/* Forms */
.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

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

/* Badges */
.badge {
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* Code */
code {
    font-size: 0.875em;
    color: #e83e8c;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Loading state for buttons */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group > .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
}

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

.list-group-item-action:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Shadow utilities */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Transition utilities */
.btn,
.form-control,
.form-select,
.card {
    transition: all 0.2s ease-in-out;
}

/* Empty state */
.empty-state {
    padding: 3rem;
    text-align: center;
    color: #6c757d;
}

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