/* ===== ESTILOS PARA SISTEMA DE COTIZACIONES ===== */

/* Estilos generales */
body {
    background: linear-gradient(135deg, #2B579A 0%, #0078D4 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #323130;
    min-height: 100vh;
    padding: 20px;
}

.container-fluid {
    padding: 20px;
}

/* Header */
.bg-primary {
    background: linear-gradient(135deg, #2B579A 0%, #0078D4 100%) !important;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(43,87,154,0.15);
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    border-bottom: none;
    font-weight: 700;
    background: linear-gradient(135deg, #2B579A 0%, #0078D4 100%);
    color: #FFFFFF;
    padding: 20px;
}

/* Búsqueda de clientes */
.busqueda-cliente {
    position: relative;
    background: linear-gradient(135deg, #F3F2F1 0%, #FFFFFF 100%);
    padding: 20px;
    border-radius: 15px;
    border-left: 6px solid #0078D4;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(43,87,154,0.12);
}

.busqueda-cliente .form-label {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #2B579A;
    font-weight: 600;
}

.busqueda-cliente .form-control {
    border: 2px solid #0078D4;
    font-size: 1rem;
    padding: 12px 15px;
    background: #F3F2F1;
    color: #323130;
    border-radius: 12px;
}

.busqueda-cliente .form-control:focus {
    border-color: #2B579A;
    box-shadow: 0 6px 24px rgba(43,87,154,0.2);
    background: #FFFFFF;
}

#sugerenciasClientes {
    position: absolute;
    z-index: 1000;
    width: 100%;
    border: 1px solid #E1DFDD;
    border-radius: 8px;
    background: white;
    box-shadow: 0 8px 32px rgba(43,87,154,0.15);
    top: 100%;
    left: 0;
}

#sugerenciasClientes .list-group-item {
    border: none;
    border-bottom: 1px solid #E1DFDD;
    cursor: pointer;
    transition: background-color 0.3s;
    color: #323130;
    padding: 12px 15px;
}

#sugerenciasClientes .list-group-item:hover {
    background-color: #F3F2F1;
    transform: translateY(-1px);
}

#sugerenciasClientes .list-group-item:last-child {
    border-bottom: none;
}

/* Campos de formulario */
.form-control, .form-select {
    border-radius: 12px;
    border: 2px solid #E1DFDD;
    transition: all 0.3s ease;
    background: #F3F2F1;
    color: #323130;
    padding: 12px 15px;
    font-weight: 500;
}

.form-control:focus, .form-select:focus {
    border-color: #0078D4;
    box-shadow: 0 6px 24px rgba(43,87,154,0.2);
    background: #FFFFFF;
    transform: translateY(-1px);
}

/* Tabla de productos */
.table {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(43,87,154,0.12);
}

.table thead th {
    background: linear-gradient(135deg, #2B579A 0%, #0078D4 100%);
    color: #FFFFFF;
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 15px 12px;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: #F3F2F1;
    transform: translateY(-1px);
}

/* Botones */
.btn {
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 2px solid;
    padding: 10px 20px;
    font-size: 0.95rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(43,87,154,0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #2B579A 0%, #0078D4 100%);
    color: #FFFFFF;
    border-color: #0078D4;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0078D4 0%, #2B579A 100%);
    border-color: #2B579A;
}

.btn-success {
    background: linear-gradient(135deg, #107C10 0%, #0F5132 100%);
    color: #FFFFFF;
    border-color: #107C10;
}

.btn-success:hover {
    background: linear-gradient(135deg, #0F5132 0%, #107C10 100%);
    border-color: #0F5132;
}

.btn-info {
    background: linear-gradient(135deg, #0078D4 0%, #2B579A 100%);
    color: #FFFFFF;
    border-color: #0078D4;
}

.btn-info:hover {
    background: linear-gradient(135deg, #2B579A 0%, #0078D4 100%);
    border-color: #2B579A;
}

.btn-warning {
    background: linear-gradient(135deg, #FF8C00 0%, #FFA500 100%);
    color: #FFFFFF;
    border-color: #FF8C00;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    border-color: #FFA500;
}

.btn-danger {
    background: linear-gradient(135deg, #D13438 0%, #B91C1C 100%);
    color: #FFFFFF;
    border-color: #D13438;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #B91C1C 0%, #D13438 100%);
    border-color: #B91C1C;
}

.btn-secondary {
    background: linear-gradient(135deg, #605E5C 0%, #323130 100%);
    color: #FFFFFF;
    border-color: #605E5C;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #323130 0%, #605E5C 100%);
    border-color: #323130;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(43,87,154,0.15);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
}

.modal-header {
    border-radius: 15px 15px 0 0;
    border-bottom: none;
    background: linear-gradient(135deg, #2B579A 0%, #0078D4 100%);
    color: #FFFFFF;
    padding: 20px;
}

.modal-footer {
    border-radius: 0 0 15px 15px;
    border-top: none;
    padding: 20px;
}

/* Totales */
.table-bordered {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(43,87,154,0.12);
}

.table-bordered th {
    background: linear-gradient(135deg, #2B579A 0%, #0078D4 100%);
    color: #FFFFFF;
    border: none;
    font-weight: 700;
    padding: 15px;
}

.table-bordered td {
    border: 1px solid #E1DFDD;
    padding: 12px 15px;
    background: #FFFFFF;
}

.table-primary {
    background: linear-gradient(135deg, #F3F2F1 0%, #FFFFFF 100%);
    border: 2px solid #0078D4;
    border-radius: 12px;
}

/* Alertas */
.alert {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 15px 20px;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Campos readonly */
input[readonly], textarea[readonly] {
    background-color: #F3F2F1 !important;
    border-color: #E1DFDD !important;
    color: #605E5C !important;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .container-fluid {
        padding: 10px;
    }
    
    .card {
        border-radius: 12px;
        margin-bottom: 15px;
    }
    
    .table-responsive {
        border-radius: 12px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    .btn-group .btn {
        margin-bottom: 5px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card, .modal-content {
    animation: fadeIn 0.6s ease-out;
}

/* Loading */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F3F2F1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #0078D4;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2B579A;
}

/* Campos específicos */
.cantidad-producto {
    width: 80px;
    text-align: center;
    border-radius: 8px;
    border: 2px solid #E1DFDD;
    background: #F3F2F1;
    color: #323130;
    font-weight: 600;
}

.cantidad-producto:focus {
    border-color: #0078D4;
    box-shadow: 0 4px 12px rgba(43,87,154,0.2);
    background: #FFFFFF;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 8px;
    font-weight: 600;
}

/* Iconos */
.fas, .fa {
    margin-right: 5px;
}

/* Tooltips */
.tooltip {
    font-size: 0.85rem;
}

/* Badges */
.badge {
    border-radius: 8px;
    font-weight: 600;
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* Estados */
.status-active {
    color: #28a745;
    font-weight: 600;
}

.status-inactive {
    color: #dc3545;
    font-weight: 600;
}

.status-pending {
    color: #ffc107;
    font-weight: 600;
}

/* Precios */
.precio {
    font-weight: 600;
    color: #2B579A;
}

.precio-grande {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0078D4;
}

/* Validación */
.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.is-valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 5px;
}

/* Campos requeridos */
.required::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

/* Grupos de campos */
.field-group {
    background: linear-gradient(135deg, #F3F2F1 0%, #FFFFFF 100%);
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid #0078D4;
    margin-bottom: 20px;
}

.field-group h6 {
    color: #2B579A;
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* Texto informativo */
.info-text {
    color: #605E5C;
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 5px;
}

/* Separadores */
.separator {
    border-top: 2px solid #E1DFDD;
    margin: 20px 0;
    opacity: 0.5;
}

/* Botones deshabilitados */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(43,87,154,0.15);
    animation: fadeIn 0.3s ease-out;
}

/* Overlay de carga */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #F3F2F1;
    border-top: 4px solid #0078D4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 