/* Estilos personalizados para EmpresasVF */

/* Variables de colores */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

/* General */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
}

/* Login Screen */
.min-vh-100 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.min-vh-100 .card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.min-vh-100 .card-body {
    padding: 2rem;
}

.min-vh-100 h3 {
    color: #212529;
    font-weight: 700;
}

.min-vh-100 .text-muted {
    color: #6c757d !important;
}

/* Navbar */
.navbar-brand {
    font-weight: 600;
    font-size: 1.4rem;
}

.navbar-brand i {
    margin-right: 8px;
}

.navbar .badge {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25em 0.5em;
}

/* Cards */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: none;
}

.card-body {
    padding: 1.5rem;
}

/* Table */
.table {
    background-color: white;
}

.table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.table thead th {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table-responsive {
    border-radius: 8px;
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
}

/* Badges de estado de facturas Verifacti */
.badge.bg-warning.text-dark {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.badge.factura-correcta {
    background-color: #198754 !important;
    color: white;
}

.badge.factura-error {
    background-color: #ffc107 !important;
    color: #000;
}

.badge.factura-rechazada {
    background-color: #dc3545 !important;
    color: white;
}

.badge.factura-pendiente {
    background-color: #0dcaf0 !important;
    color: #000;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Input Groups */
.input-group-text {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

/* Modals */
.modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
}

.modal-title {
    font-weight: 600;
    color: #212529;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 8px 8px;
}

/* Alerts */
.alert {
    border-radius: 6px;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.alert i {
    margin-right: 8px;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
    margin-top: 3rem;
}

/* Empty State */
.bi-inbox {
    color: #dee2e6;
}

/* Responsive */
@media (max-width: 768px) {
    .table {
        font-size: 0.875rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card, .alert {
    animation: fadeIn 0.3s ease-in-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.hover-shadow:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: box-shadow 0.2s;
}
