/* Estilos específicos para la página de Cotizaciones (cotizaciones.html) */

/* Alertas para productos con información faltante */
.product-alert {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #f59e0b;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
    cursor: pointer;
    position: relative;
}

.product-alert.error {
    background: #ef4444;
}

.product-alert.warning {
    background: #f59e0b;
}

.product-alert:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.product-alert-tooltip {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: #374151;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.product-alert:hover .product-alert-tooltip {
    opacity: 1;
}

.product-alert-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #374151;
}

/* Tabla de productos con alertas */
.table .product-name-cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.table .product-row.has-issues {
    background-color: #fef3c7;
}

.table .product-row.has-errors {
    background-color: #fee2e2;
}

/* Modal de validación de productos */
.validation-modal .validation-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 6px;
    background: #f3f4f6;
}

.validation-modal .validation-item.error {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
}

.validation-modal .validation-item.warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
}

.validation-modal .validation-icon {
    margin-right: 8px;
    font-size: 14px;
}

.validation-modal .validation-icon.error {
    color: #ef4444;
}

.validation-modal .validation-icon.warning {
    color: #f59e0b;
}

/* Estadísticas de validación */
.validation-stats {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
}

.validation-stats .stat-icon {
    color: #f59e0b;
}

.validation-stats .validation-numbers {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
}

.validation-stats .error-count {
    color: #dc2626;
}

.validation-stats .warning-count {
    color: #d97706;
}

/* Action Bar */
.action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    min-width: 300px;
    flex: 1;
}

.search-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 14px;
}

.search-input {
    width: 100%;
    padding: 10px 12px 10px 35px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filters-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Estilos específicos para el botón de filtros avanzados */
.filters-section .btn-outline {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.9) 100%);
    color: var(--text-dark);
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 12px;
    padding: 14px 20px;
    min-width: 160px;
    height: 48px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.filters-section .btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: subtract;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
}

.filters-section .btn-outline:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(240, 147, 251, 0.12) 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.filters-section .btn-outline i {
    font-size: 14px;
    margin: 0;
}

.filters-section .btn-outline span {
    margin: 0;
    white-space: nowrap;
}

/* Responsive design for action bar */
@media (max-width: 768px) {
    .action-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .search-container {
        min-width: unset;
        order: 1;
    }
    
    .filters-section {
        order: 2;
        justify-content: center;
    }
    
    .action-buttons {
        order: 3;
        justify-content: center;
    }
}

/* Modal de cotización */
#quote-modal .modal-content {
    max-width: 1000px;
}

#quote-modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

#quote-modal .form-row.single {
    grid-template-columns: 1fr;
}

/* Producto input group */
.product-input-group {
    display: flex;
    gap: 0.5rem;
}

.product-input-group .form-input {
    flex: 1;
}

.btn-catalog {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
}

.btn-catalog:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Product Catalog Modal */
.catalog-search {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.catalog-search .search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.catalog-search .search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.catalog-search .search-box input {
    padding-left: 2.5rem;
    width: 100%;
}

.catalog-filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.catalog-products {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.catalog-product-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.catalog-product-item:hover {
    background-color: rgba(var(--primary-rgb), 0.05);
}

.catalog-product-item:last-child {
    border-bottom: none;
}

.catalog-product-info {
    flex: 1;
}

.catalog-product-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.catalog-product-code {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.catalog-product-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.catalog-product-details {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
}

.catalog-product-family {
    background-color: rgba(var(--secondary-rgb), 0.1);
    color: var(--secondary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.catalog-product-price {
    text-align: right;
    min-width: 120px;
}

.catalog-product-unit-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.catalog-product-unit {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.catalog-product-actions {
    margin-left: 1rem;
}

.btn-select-product {
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-select-product:hover {
    background: var(--success-dark);
    transform: translateY(-1px);
}

/* Tabla de productos en el modal */
.products-table {
    margin: 20px 0;
}

.products-table table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.products-table th,
.products-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.products-table th {
    background: #f8fafc;
    font-weight: 600;
}

.products-table input {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 0.9rem;
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-input-group {
        flex-direction: column;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .catalog-search {
        flex-direction: column;
        align-items: stretch;
    }
    
    .catalog-filters {
        justify-content: center;
    }
    
    .catalog-product-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .catalog-product-price {
        text-align: center;
        min-width: auto;
    }
    
    .catalog-product-details {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .modal-content.large {
        width: 95vw;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .btn-catalog {
        min-width: 100%;
        margin-top: 0.5rem;
    }
    
    .product-input-group {
        flex-direction: column;
    }
    
    .catalog-product-item {
        padding: 0.75rem;
    }
    
    .catalog-product-actions {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

.add-product-btn {
    background: var(--tertiary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
}

.add-product-btn:hover {
    background: #059669;
}

.remove-product-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.8rem;
}

.remove-product-btn:hover {
    background: #dc2626;
}

/* Form hints */
.form-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 4px;
    font-style: italic;
}

/* Service Sheets Container */
.service-sheet-entry {
    margin-bottom: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.service-sheet-entry .form-row {
    align-items: end;
    gap: 12px;
}

.service-sheet-entry .form-group:first-child {
    flex: 1;
}

/* Resumen de totales */
.quote-summary {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.quote-summary .summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.quote-summary .summary-row.total {
    font-weight: 700;
    font-size: 1.1rem;
    border-top: 2px solid var(--border-color);
    padding-top: 8px;
    margin-top: 12px;
}

/* Estados de cotización */
.quote-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.quote-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.quote-status.approved {
    background: #d1fae5;
    color: #065f46;
}

.quote-status.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.quote-status.expired {
    background: #e5e7eb;
    color: #6b7280;
}

/* Tabla de cotizaciones */
#quotes-table .quote-id {
    font-family: monospace;
    font-weight: 600;
    color: var(--primary-color);
}

#quotes-table .quote-amount {
    font-weight: 600;
    color: var(--tertiary-color);
}

#quotes-table .quote-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

#quotes-table tr.expired {
    background: #fef2f2;
}

#quotes-table tr.expired td {
    color: #6b7280;
}

/* Columna de observaciones con tooltip mejorado */
#quotes-table .observations-cell {
    max-width: 150px;
    position: relative;
}

#quotes-table .observations-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
    cursor: help;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    max-width: 140px; /* Limitar ancho del texto */
    display: inline-block;
}

#quotes-table .observations-text:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
}

/* Tooltip para observaciones */
#quotes-table .observations-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(17, 24, 39, 0.95);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    max-width: 300px;
    min-width: 200px;
    word-wrap: break-word;
    white-space: normal;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateX(-50%) translateY(5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

#quotes-table .observations-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(17, 24, 39, 0.95);
}

#quotes-table .observations-cell:hover .observations-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Asegurar que la tabla no se desborde */
#quotes-table {
    table-layout: fixed;
    width: 100%;
}

/* Columna ID - más estrecha */
#quotes-table th:nth-child(1),
#quotes-table td:nth-child(1) {
    width: 70px;
    max-width: 70px;
}

/* Columna Cliente - optimizada */
#quotes-table th:nth-child(2),
#quotes-table td:nth-child(2) {
    width: 160px;
    max-width: 160px;
}

/* Columna Título - optimizada */
#quotes-table th:nth-child(3),
#quotes-table td:nth-child(3) {
    width: 140px;
    max-width: 140px;
}

/* Columna Observaciones */
#quotes-table th:nth-child(4),
#quotes-table td:nth-child(4) {
    width: 120px;
    max-width: 120px;
}

/* Columna Monto */
#quotes-table th:nth-child(5),
#quotes-table td:nth-child(5) {
    width: 100px;
    max-width: 100px;
}

/* Columna OT */
#quotes-table th:nth-child(6),
#quotes-table td:nth-child(6) {
    width: 80px;
    max-width: 80px;
}

/* Columna Estado */
#quotes-table th:nth-child(7),
#quotes-table td:nth-child(7) {
    width: 90px;
    max-width: 90px;
}

/* Columna Fecha */
#quotes-table th:nth-child(8),
#quotes-table td:nth-child(8) {
    width: 85px;
    max-width: 85px;
}

/* Columna Vencimiento */
#quotes-table th:nth-child(9),
#quotes-table td:nth-child(9) {
    width: 95px;
    max-width: 95px;
}

/* Columna Acciones */
#quotes-table th:nth-child(10),
#quotes-table td:nth-child(10) {
    width: 180px;
    max-width: 180px;
}

/* ========== MODAL DE OBSERVACIONES SIMPLIFICADO ========== */

.observations-modal-content {
    max-width: 650px;
    width: 90%;
    height: 550px;
    margin: 5vh auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: white;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.observations-container {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.observations-container h4 {
    background: #667eea;
    color: white;
    font-weight: 600;
    margin: 0;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.observations-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.observations-text-full {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    flex: 1;
    overflow: hidden;
}

/* ========== MODAL DE OTs SIMPLIFICADO ========== */

.ots-modal-content {
    max-width: 700px;
    width: 90%;
    height: 600px;
    margin: 5vh auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: white;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.ots-container {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ots-container h4 {
    background: #22c55e;
    color: white;
    font-weight: 600;
    margin: 0;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.ots-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ots-list {
    flex: 1;
    overflow: hidden;
}

.ot-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ot-number {
    font-weight: 600;
    color: #1f2937;
    font-size: 16px;
}

.status-badge {
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.quote-info-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    position: relative;
}

.quote-info-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.3) 100%);
}

.quote-info-header .quote-id {
    font-family: 'Segoe UI', monospace;
    font-weight: 700;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.25);
    padding: 8px 16px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.quote-info-header .quote-client {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.95;
    text-align: right;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.observations-content {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 0;
    padding: 25px;
    border: none;
    position: relative;
}

.observations-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(102, 126, 234, 0.2) 50%, transparent 100%);
}

.observations-text-full {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #374151;
    background: white;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    min-height: 140px;
    white-space: pre-wrap;
    word-wrap: break-word;
    position: relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.observations-text-full::before {
    content: '"';
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 2rem;
    color: rgba(102, 126, 234, 0.3);
    font-family: serif;
    line-height: 1;
}

.observations-text-full:empty::before {
    content: "No hay observaciones disponibles para esta cotización.";
    color: #9ca3af;
    font-style: italic;
    position: static;
    font-size: 1rem;
}

/* Estilo para el texto clickeable en la tabla */
#quotes-table .observations-text {
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

#quotes-table .observations-text:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    transform: translateY(-1px);
}

#quotes-table .observations-text:active {
    transform: translateY(0);
}

/* Animación para el modal */
#observations-modal.show .observations-modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .observations-modal-content {
        width: 95%;
        max-height: 85vh;
        margin: 2vh auto;
    }
    
    .quote-info-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .observations-text-full {
        padding: 15px;
        font-size: 0.9rem;
    }
}

/* Filtros de cotización */
.quote-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.date-range {
    display: flex;
    gap: 10px;
    align-items: center;
}

.date-range input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Acciones rápidas */
.quick-actions {
    display: flex;
    gap: 4px; /* Reducido de 8px a 4px */
}

.quick-actions button {
    padding: 4px 8px; /* Reducido de 6px 12px a 4px 8px */
    border: none;
    border-radius: 4px; /* Reducido de 6px a 4px */
    font-size: 0.75rem; /* Reducido de 0.8rem a 0.75rem */
    cursor: pointer;
    font-weight: 500;
    min-width: 28px; /* Ancho mínimo para botones más compactos */
    transition: all 0.2s ease;
}

.quick-actions button i {
    font-size: 0.7rem; /* Iconos más pequeños */
    margin: 0; /* Remover márgenes de iconos */
}

.quick-actions .btn-pdf {
    background: #fee2e2;
    color: #dc2626;
}

.quick-actions .btn-pdf:hover {
    background: #dc2626;
    color: white;
}

.quick-actions .btn-email {
    background: #dbeafe;
    color: #1d4ed8;
}

.quick-actions .btn-email:hover {
    background: #1d4ed8;
    color: white;
}

.quick-actions .btn-duplicate {
    background: #e0f2fe;
    color: #0891b2;
}

.quick-actions .btn-duplicate:hover {
    background: #0891b2;
    color: white;
}

/* Responsive para cotizaciones */
@media (max-width: 768px) {
    #quote-modal .form-row {
        grid-template-columns: 1fr;
    }
    
    .quote-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-range {
        flex-direction: column;
        align-items: stretch;
    }
    
    .products-table {
        overflow-x: auto;
    }
    
    .quick-actions {
        gap: 2px; /* Aún más compacto en móviles */
        justify-content: center; /* Centrar los botones */
        flex-wrap: wrap; /* Permitir wrap si es necesario */
    }
    
    .quick-actions button {
        padding: 3px 6px; /* Más pequeño para móviles */
        font-size: 0.7rem;
        min-width: 24px;
    }
    
    .quick-actions button i {
        font-size: 0.65rem;
    }
    
    /* En móviles, hacer la columna de acciones más estrecha */
    #quotes-table .actions-cell {
        width: 140px; /* Reducido de 160px */
        max-width: 140px;
    }
    
    #quotes-table th:nth-child(4),
    #quotes-table td:nth-child(4),
    #quotes-table th:nth-child(5),
    #quotes-table td:nth-child(5) {
        display: none; /* Ocultar algunas columnas en móviles */
    }
}

/* Estilos para el nuevo formulario de cotización */
.form-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fafbfc;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row.three-cols {
    grid-template-columns: 1fr 1fr 1fr;
}

.phone-entry {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    margin-bottom: 10px;
}

.phone-entry .form-row {
    margin-bottom: 0;
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
}

.btn-sm {
    padding: 4px 8px; /* Más compacto */
    font-size: 0.75rem; /* Más pequeño */
}

/* Estilos adicionales para optimizar espacio en la tabla */
#quotes-table .actions-cell {
    white-space: nowrap;
    width: 180px; /* Reducido de 200px */
    max-width: 180px;
}

#quotes-table .actions-cell .quick-actions {
    justify-content: flex-start;
    flex-wrap: wrap; /* Permitir wrap en caso necesario */
}

/* Optimizar texto en celdas pequeñas */
#quotes-table td {
    padding: 8px 6px; /* Padding más compacto */
    font-size: 0.85rem; /* Texto ligeramente más pequeño */
    line-height: 1.3;
}

#quotes-table th {
    padding: 10px 6px;
    font-size: 0.8rem; /* Headers más pequeños */
    font-weight: 600;
}

/* Estilos específicos para celdas de contenido largo */
#quotes-table .quote-client-info {
    overflow: hidden;
    text-overflow: ellipsis;
}

#quotes-table .quote-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#quotes-table .quote-amount {
    font-weight: 600;
    color: var(--tertiary-color);
    text-align: right;
}

#quotes-table .quote-date {
    color: var(--text-light);
    font-size: 0.8rem;
}

/* Responsivo - ajustar en pantallas más pequeñas */
@media (max-width: 1200px) {
    /* En pantallas medianas, ajustar algunos anchos */
    #quotes-table th:nth-child(2),
    #quotes-table td:nth-child(2) {
        width: 140px;
        max-width: 140px;
    }
    
    #quotes-table th:nth-child(3),
    #quotes-table td:nth-child(3) {
        width: 120px;
        max-width: 120px;
    }
    
    #quotes-table th:nth-child(10),
    #quotes-table td:nth-child(10) {
        width: 160px;
        max-width: 160px;
    }
}

/* Estilos para autocompletado */
.autocomplete-container {
    position: relative;
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.suggestions-dropdown.show {
    display: block;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background-color: #3b82f6;
    color: white;
}

.suggestion-item.no-results {
    cursor: default;
    color: #6b7280;
    font-style: italic;
    text-align: center;
}

.suggestion-item.no-results:hover {
    background-color: transparent;
    color: #6b7280;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-main {
    font-weight: 600;
    color: #374151;
}

.suggestion-item:hover .suggestion-main,
.suggestion-item.selected .suggestion-main {
    color: white;
}

.suggestion-secondary {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 2px;
}

.suggestion-item:hover .suggestion-secondary,
.suggestion-item.selected .suggestion-secondary {
    color: rgba(255, 255, 255, 0.9);
}

.suggestion-rut {
    font-size: 0.8rem;
    color: #9ca3af;
    font-family: monospace;
}

.suggestion-item:hover .suggestion-rut,
.suggestion-item.selected .suggestion-rut {
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive para el modal expandido */
@media (max-width: 768px) {
    #quote-modal .modal-content {
        max-width: 95vw;
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .phone-entry .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Estilos para productos */
.product-entry {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    background-color: #f9fafb;
}

.product-row {
    display: grid;
    grid-template-columns: 2fr 80px 120px 80px 120px 40px;
    gap: 12px;
    align-items: end;
}

.form-group-sm {
    max-width: 100px;
}

.quantity-input,
.price-input,
.discount-input {
    text-align: center;
}

/* Prevenir cambio de valores con scroll en inputs number */
input[type="number"] {
    appearance: textfield; /* Estándar */
    -moz-appearance: textfield; /* Firefox */
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none; /* Chrome, Safari, Edge */
    margin: 0;
}

/* Desactivar scroll en inputs number para evitar cambios accidentales */
input[type="number"] {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.total-display {
    background-color: #f3f4f6;
    font-weight: 600;
    text-align: right;
}

/* Botón de eliminar producto */
.product-row .btn-delete {
    width: 24px;
    height: 24px;
    padding: 0;
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.product-row .btn-delete:hover {
    background-color: #fee2e2;
    color: #b91c1c;
    transform: scale(1.1);
}

.product-row .btn-delete i {
    font-size: 14px;
}

/* Sección de totales */
.totals-section {
    margin-top: 24px;
    padding: 20px;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.totals-row:last-child {
    border-bottom: none;
}

.totals-row.total-final {
    font-size: 1.2em;
    font-weight: 700;
    color: #059669;
    border-top: 2px solid #059669;
    margin-top: 12px;
    padding-top: 12px;
}

.totals-label {
    font-weight: 600;
    color: #374151;
}

.totals-value {
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: #1f2937;
}

.totals-row.total-final .totals-value {
    color: #059669;
}

/* Responsive para productos */
@media (max-width: 1024px) {
    .product-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .form-group-sm {
        max-width: none;
    }
}

/* Estilos para archivos adjuntos */

/* Sección de gasto administrativo */
.admin-expense-section {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.admin-expense-header .totals-label {
    font-weight: 600;
    color: #495057;
}

.admin-expense-control {
    padding: 10px 0;
}

.admin-expense-control .form-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-expense-control .form-label {
    margin: 0;
    min-width: 120px;
}

.admin-expense-control .form-input {
    max-width: 100px;
}

/* Contenedor principal de archivos adjuntos */
.attachments-section {
    margin-top: 20px;
    padding: 20px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    transition: border-color 0.3s ease;
}

.attachments-section.dragover {
    border-color: var(--primary-color);
    background-color: rgba(73, 165, 241, 0.05);
}

/* Zona de arrastre de archivos */
.file-drop-zone {
    text-align: center;
    padding: 40px 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.file-drop-zone:hover {
    border-color: var(--primary-color);
    background-color: rgba(73, 165, 241, 0.05);
}

.file-drop-zone.dragover {
    border-color: var(--primary-color);
    background-color: rgba(73, 165, 241, 0.1);
    transform: scale(1.02);
}

.drop-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 10px;
}

.drop-text {
    color: #666;
    font-size: 16px;
    margin-bottom: 8px;
}

.drop-subtext {
    color: #999;
    font-size: 14px;
}

/* Input de archivo oculto */
#file-input {
    display: none;
}

/* Contenedor de archivos seleccionados */
.selected-files-container {
    margin-top: 20px;
}

.selected-files-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Elemento de archivo individual */
.file-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.file-item:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.file-icon {
    font-size: 24px;
    margin-right: 12px;
    min-width: 24px;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    color: #333;
    word-break: break-word;
    margin-bottom: 2px;
}

.file-size {
    font-size: 12px;
    color: #6c757d;
}

.file-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    font-size: 16px;
}

.file-remove:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Iconos para diferentes tipos de archivo */
.icon-pdf { color: #dc3545; } /* Rojo para PDF */
.icon-image { color: #28a745; } /* Verde para imágenes */
.icon-word { color: #007bff; } /* Azul para Word */
.icon-excel { color: #17a2b8; } /* Azul claro para Excel */
.icon-file { color: #6c757d; } /* Gris para otros archivos */

/* Mensaje de no archivos */
.no-files-message {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

/* Contenedor de botones de archivos */
.file-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Botón para seleccionar archivos */
.btn-select-files {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.btn-select-files:hover {
    background-color: #0056b3;
}

/* Estilos responsivos para archivos */
@media (max-width: 768px) {
    .file-drop-zone {
        padding: 30px 15px;
    }
    
    .drop-icon {
        font-size: 36px;
    }
    
    .drop-text {
        font-size: 14px;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .file-icon {
        margin-right: 0;
        margin-bottom: 4px;
    }
    
    .file-actions {
        flex-direction: column;
    }
}

/* === CATÁLOGO DE PRODUCTOS - MEJORAS DE RENDIMIENTO === */

/* Estado de carga del catálogo */
.catalog-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mejoras de búsqueda instantánea */
.catalog-search .search-box {
    position: relative;
    flex: 1;
}

.catalog-search .search-box input {
    padding-left: 2.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.catalog-search .search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    outline: none;
}

.catalog-search .search-box .fas {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

/* Elementos del catálogo optimizados */
.catalog-product-item {
    transition: all 0.15s ease;
    cursor: pointer;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    margin-bottom: 0.5rem;
    background: white;
}

.catalog-product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.catalog-product-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Optimización visual para productos */
.catalog-product-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.catalog-product-code {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.5rem;
}

.catalog-product-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.catalog-product-details {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.catalog-product-family {
    background: var(--primary-color);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.catalog-product-price {
    text-align: right;
}

.catalog-product-unit-price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.125rem;
}

.catalog-product-unit {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Botón de selección optimizado */
.btn-select-product {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.btn-select-product:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Responsive para catálogo */
@media (max-width: 768px) {
    .catalog-search {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .catalog-filters {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .catalog-product-item {
        padding: 0.75rem;
    }
    
    .catalog-product-details {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* Estilos para botones de estado de cotizaciones */
.status-actions {
    display: flex;
    gap: 3px;
    margin-bottom: 5px;
}

.management-actions {
    display: flex;
    gap: 3px;
}

/* Botones de estado específicos */
.btn-approve {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    color: #27ae60;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    min-width: 28px;
    height: 28px;
}

.btn-approve:hover {
    background: #27ae60;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(39, 174, 96, 0.3);
}

.btn-pending {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    color: #f39c12;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    min-width: 28px;
    height: 28px;
}

.btn-pending:hover {
    background: #f39c12;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(243, 156, 18, 0.3);
}

.btn-reject {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    color: #e74c3c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    min-width: 28px;
    height: 28px;
}

.btn-reject:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

/* Estilos para action-buttons reorganizados */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

/* Hover effects mejorados para botones pequeños */
.btn-edit {
    color: #3498db;
}

.btn-edit:hover {
    background: #3498db;
    color: white;
}

.btn-duplicate {
    color: #9b59b6;
}

.btn-duplicate:hover {
    background: #9b59b6;
    color: white;
}

.btn-pdf {
    color: #e67e22;
}

.btn-pdf:hover {
    background: #e67e22;
    color: white;
}

.btn-delete {
    color: #e74c3c;
}

.btn-delete:hover {
    background: #e74c3c;
    color: white;
}

/* Responsive para botones de estado */
@media (max-width: 768px) {
    .status-actions,
    .management-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .btn-approve,
    .btn-pending,
    .btn-reject {
        min-width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

/* Estilos para filtros avanzados */
.advanced-filters-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 15px 0;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.advanced-filters-content {
    max-width: 100%;
}

.filters-title {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.range-inputs .form-input {
    flex: 1;
    min-width: 0;
}

.range-separator {
    color: var(--text-light);
    font-size: 0.9rem;
    white-space: nowrap;
}

.filters-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

/* Estilos para OT expandibles */
.ot-container {
    transition: all 0.2s ease;
}

/* Estilo general para todas las OT */
.ot-display {
    color: var(--primary-color) !important;
    font-weight: 500;
    border-radius: 4px;
    padding: 2px 6px;
    background: rgba(52, 152, 219, 0.1);
    transition: all 0.2s ease;
    display: inline-block;
}

.ot-display:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: translateY(-1px);
}

/* Estilo específico para OT expandibles (con muchas hojas) */
.expandable-ot {
    color: var(--primary-color) !important;
    font-weight: 500;
    border-radius: 4px;
    padding: 2px 6px;
    background: rgba(52, 152, 219, 0.1);
    cursor: pointer;
}

.expandable-ot:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: translateY(-1px);
}

.expandable-ot .fas {
    color: var(--primary-color);
    font-size: 0.8rem;
}

/* Modal de detalles de OT */
#ot-details-modal .modal-content {
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.ot-details-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
}

.ot-details-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.ot-details-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 10px;
}

.ot-details-header h4 {
    color: var(--text-dark);
    font-weight: 600;
    margin: 0;
}

.ot-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin: 15px 0;
}

.ot-item {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.1);
}

.ot-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.ot-item-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.ot-item-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.ot-summary {
    background: var(--primary-color);
    color: white;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    margin-top: 15px;
    font-weight: 600;
}

.ot-summary i {
    margin-right: 8px;
}

/* Indicador de resultados de búsqueda */
.search-results-indicator {
    background: var(--info-color);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin: 10px 0;
    display: none;
}

.search-results-indicator.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive para filtros avanzados */
@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .range-inputs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .range-separator {
        text-align: center;
        margin: 5px 0;
    }
    
    .filters-actions {
        flex-direction: column;
    }
    
    .advanced-filters-panel {
        padding: 15px;
    }
}

/* Status badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fef3c7;
    color: #d97706;
}

.status-approved {
    background: #d1fae5;
    color: #059669;
}

.status-rejected {
    background: #fee2e2;
    color: #dc2626;
}

.status-expired {
    background: #f3f4f6;
    color: #6b7280;
}

/* Action buttons */
.actions {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

.actions .btn {
    min-width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.actions .btn i {
    font-size: 14px;
}

.btn-sm {
    font-size: 12px;
    padding: 4px 8px;
}

/* PDF button specific styling */
.btn.btn-primary {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.btn.btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Preview button styling */
.btn.btn-outline {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #6b7280;
}

.btn.btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

/* Danger button styling */
.btn.btn-danger {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.btn.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

/* ========== ESTILOS PARA PREVISUALIZACIÓN DE PDF ========== */

/* Modal más moderno y elegante */
.modal-large {
    max-width: 90vw;
    max-height: 90vh;
    width: 90vw;
    height: 90vh;
    margin: 5vh auto;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background: white;
    overflow: hidden;
}

/* Header del modal más elegante */
#pdfPreviewModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    border-bottom: none;
    border-radius: 16px 16px 0 0;
}

#pdfPreviewModal .modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

#pdfPreviewModal .modal-header i.fa-file-pdf {
    font-size: 20px;
    opacity: 0.9;
}

#pdfPreviewModal .modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    transition: all 0.3s ease;
}

#pdfPreviewModal .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Contenedor del cuerpo del modal para PDF */
.pdf-preview-body {
    display: flex;
    flex-direction: column;
    height: calc(100% - 80px);
    padding: 25px;
    gap: 0;
    background: #f8fafc;
}

/* Barra de información más moderna */
.pdf-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #475569;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Previsualización del nombre del archivo */
.pdf-filename-preview {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 15px;
}

.filename-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #64748b;
}

.filename-info i {
    color: #3b82f6;
    width: 16px;
}

.filename-info code {
    background: #e2e8f0;
    color: #1e293b;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #cbd5e1;
}

.pdf-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    padding: 4px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.pdf-info-item i {
    color: #3b82f6;
    width: 18px;
    text-align: center;
    font-size: 14px;
}

/* Contenedor del iframe más elegante */
.pdf-preview-container {
    flex: 1;
    display: flex;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    position: relative;
}

/* Iframe para mostrar el PDF */
.pdf-preview-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
    border-radius: 12px;
    transition: opacity 0.3s ease;
}

/* Indicador de carga más moderno */
.pdf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #64748b;
    font-size: 16px;
    font-weight: 500;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
}

.pdf-loading i {
    font-size: 32px;
    margin-bottom: 16px;
    color: #3b82f6;
    animation: spin 1s linear infinite;
}

.pdf-loading-text {
    opacity: 0.8;
    font-size: 14px;
    text-align: center;
}

/* Mejoras al título del modal */
#pdfPreviewQuoteTitle {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}

/* Efecto hover mejorado para info items */
.pdf-info-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Acciones del modal más modernas */
.pdf-preview-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 0;
    background: transparent;
    border: none;
    margin: 0;
}

.pdf-preview-actions .btn {
    min-width: 160px;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pdf-preview-actions .btn i {
    font-size: 16px;
}

.pdf-preview-actions .btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.3);
}

.pdf-preview-actions .btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(59, 130, 246, 0.4);
}

.pdf-preview-actions .btn-secondary {
    background: white;
    border-color: #d1d5db;
    color: #6b7280;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.pdf-preview-actions .btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
    transform: translateY(-1px);
}

/* Ajustes responsivos más elegantes */
@media (max-width: 768px) {
    .modal-large {
        max-width: 95vw;
        max-height: 95vh;
        width: 95vw;
        height: 95vh;
        margin: 2.5vh auto;
        border-radius: 12px;
    }
    
    .pdf-preview-body {
        padding: 15px;
    }
    
    .pdf-info-bar {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .pdf-info-item {
        width: 100%;
        justify-content: center;
    }
    
    .pdf-preview-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .pdf-preview-actions .btn {
        width: 100%;
        min-width: unset;
    }
    
    #pdfPreviewModal .modal-header {
        padding: 16px 20px;
    }
    
    #pdfPreviewModal .modal-header h2 {
        font-size: 16px;
    }
}

/* Animaciones suaves */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

#pdfPreviewModal .modal-content {
    animation: fadeIn 0.3s ease-out;
}

/* Mejoras al icono del botón de previsualización */
.btn-pdf i.fa-eye {
    color: #3b82f6;
    transition: all 0.3s ease;
}

.btn-pdf:hover i.fa-eye {
    color: #1d4ed8;
    transform: scale(1.1);
}

/* Estilos para el botón de descarga directa */
.btn-download i.fa-download {
    color: #10b981;
    transition: all 0.3s ease;
}

.btn-download:hover i.fa-download {
    color: #059669;
    transform: scale(1.1);
}

.btn-download {
    margin-left: 5px;
}

/* ========== ESTILOS PARA SELECTOR MÚLTIPLE DE PRODUCTOS ========== */

/* Controles del catálogo */
.catalog-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.selection-mode-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    transition: all 0.4s ease;
    border-radius: 26px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    transition: all 0.4s ease;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.toggle-label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

/* Acciones en lote mejoradas */
.bulk-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.bulk-actions .btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
}

.bulk-actions .btn:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
    color: #1e40af;
}

.bulk-actions .btn i {
    margin-right: 6px;
    color: #3b82f6;
    font-size: 13px;
}

/* Header del modal con acciones mejorado */
.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.selection-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 6px;
    border: 1px solid #93c5fd;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.1);
}

.selected-count {
    font-size: 12px;
    font-weight: 600;
    color: #1e40af;
}

.selection-summary .btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: auto;
    height: 24px;
}

.selection-summary .btn:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #ef4444;
    color: #dc2626;
}

.selection-summary .btn i {
    margin-right: 2px;
    font-size: 10px;
}

/* Productos con checkbox mejorados */
.catalog-product-item {
    position: relative;
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    border: 2px solid #f1f5f9;
}

.catalog-product-item.multiple-mode {
    padding-left: 60px;
    cursor: pointer;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.catalog-product-item.multiple-mode:hover {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.catalog-product-item.selected {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 8px 25px rgba(59, 130, 246, 0.15);
}

.product-checkbox {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.product-checkbox input[type="checkbox"] {
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    accent-color: #3b82f6;
    transform: scale(1.2);
}

/* Footer del modal mejorado */
.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 16px 16px;
}

.selection-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-actions {
    display: flex;
    gap: 8px;
}

#selected-products-count {
    font-weight: 600;
    color: #374151;
    padding: 6px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-size: 12px;
}

/* Botón principal mejorado */
#add-selected-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    min-width: 120px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#add-selected-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

#add-selected-btn:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#add-selected-btn i {
    margin-right: 6px;
    font-size: 13px;
}

/* Botón cancelar mejorado */
.footer-actions .btn-outline {
    background: white;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 100px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-actions .btn-outline:hover {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: #374151;
}

/* Indicador visual de selección mejorado */
.catalog-product-item.selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 0 4px 4px 0;
    box-shadow: 2px 0 8px rgba(59, 130, 246, 0.3);
}

/* Animaciones mejoradas */
.catalog-product-item.multiple-mode {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.catalog-product-item.selected {
    animation: selectProduct 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes selectProduct {
    0% {
        transform: scale(1);
        background: inherit;
    }
    50% {
        transform: scale(1.02);
        background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    }
    100% {
        transform: scale(1);
        background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    }
}

/* Productos con mejor información visual */
.catalog-product-name {
    font-weight: 600;
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 4px;
}

.catalog-product-code {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
}

.catalog-product-price {
    font-weight: 700;
    font-size: 18px;
    color: #059669;
}

/* Tooltip para productos seleccionados mejorado */
.catalog-product-item.selected .catalog-product-name::after {
    content: " ✓";
    color: #3b82f6;
    font-weight: bold;
    margin-left: 8px;
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(59, 130, 246, 0.3);
}

/* Responsive mejorado */
@media (max-width: 768px) {
    .catalog-controls {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
        padding: 16px;
    }
    
    .selection-mode-toggle {
        justify-content: center;
    }
    
    .bulk-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }
    
    .footer-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .footer-actions .btn {
        width: 100%;
        text-align: center;
    }
    
    .catalog-product-item.multiple-mode {
        padding-left: 50px;
    }
    
    .product-checkbox {
        left: 15px;
    }
}

/* Estados de hover adicionales */
.bulk-actions .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#add-selected-btn:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Mejoras adicionales para la experiencia de usuario */
.catalog-product-item.multiple-mode .catalog-product-actions {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.catalog-product-item.selected .catalog-product-actions {
    opacity: 1;
    pointer-events: auto;
}

/* Estilo para botones del catálogo general */
.btn-select-product {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
    min-width: 120px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-select-product:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.4);
}

/* Mejoras para botones de filtros */
.catalog-filters .btn {
    background: white;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 100px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.catalog-filters .btn:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: #94a3b8;
    color: #374151;
}

.catalog-filters .btn i {
    margin-right: 5px;
    font-size: 13px;
}

/* Mejoras generales para todos los botones pequeños */
.btn-sm {
    padding: 10px 18px;
    font-size: 14px;
    height: 40px;
    min-width: 110px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-sm i {
    margin-right: 5px;
    font-size: 13px;
}

/* Estados de hover adicionales para consistencia */
.bulk-actions .btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#add-selected-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.footer-actions .btn-outline:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Modal content mejorado */
.modal-content.large {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.modal-title {
    font-weight: 600;
    font-size: 18px;
    color: white;
}

/* ===== MODAL DE ENVÍO DE COTIZACIONES ===== */
.send-quote-modal {
    max-width: 600px;
    min-width: 550px;
    max-height: 75vh;
    animation: modalBounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    margin: auto;
}

/* Asegurar que el modal se cierre correctamente */
#send-quote-modal.modal {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

#send-quote-modal.modal .modal-content {
    margin: 0 !important;
    position: relative;
    top: 0 !important;
    transform: none !important;
    max-height: 90vh;
    overflow: hidden;
}

/* Estado cerrado del modal */
#send-quote-modal:not(.active):not(.show) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Evitar scroll del body cuando el modal está abierto */
body.modal-open {
    overflow: hidden !important;
}

/* Botón de cerrar mejorado */
#send-quote-modal .modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 10001;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#send-quote-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Asegurar que el overlay funcione para cerrar */
#send-quote-modal::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -1;
}

.send-quote-modal::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(240, 147, 251, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    animation: floatingBubbles 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes floatingBubbles {
    0%, 100% {
        transform: rotate(0deg) translate(0px, 0px);
    }
    33% {
        transform: rotate(120deg) translate(20px, -20px);
    }
    66% {
        transform: rotate(240deg) translate(-20px, 20px);
    }
}

@keyframes modalBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-100px) rotate(-10deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05) translateY(20px) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotate(0deg);
    }
}

.send-quote-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 25px 30px;
    position: relative;
    overflow: hidden;
}

.send-quote-modal .modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-conic-gradient(
        from 0deg at 50% 50%,
        rgba(255,255,255,0.1) 0deg 15deg,
        transparent 15deg 30deg
    );
    animation: rotateBackground 10s linear infinite;
    opacity: 0.3;
}

@keyframes rotateBackground {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.send-quote-modal .modal-header h3 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 15px;
}

.send-quote-modal .modal-header h3 i {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.send-quote-modal .modal-body {
    padding: 25px;
    background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 50%, #f3e5f5 100%);
    overflow: hidden;
}

/* Información de la cotización */
.quote-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 16px;
    padding: 20px 25px;
    margin-bottom: 25px;
    border: none;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.quote-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255,255,255,0.1) 25%, 
        transparent 25%,
        transparent 50%,
        rgba(255,255,255,0.1) 50%,
        rgba(255,255,255,0.1) 75%,
        transparent 75%
    );
    background-size: 20px 20px;
    animation: moveStripes 2s linear infinite;
    opacity: 0.1;
}

@keyframes moveStripes {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
}

.quote-info h4 {
    color: white;
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
}

.quote-info h4 i {
    font-size: 1.5rem;
    opacity: 0.9;
}

.quote-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.quote-detail:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(5px);
}

.quote-detail:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.quote-detail .label {
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quote-detail .label i {
    font-size: 1.1rem;
    opacity: 0.8;
}

.quote-detail .value {
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
    text-shadow: 0 1px 5px rgba(0,0,0,0.2);
}

/* Opciones de envío */
.send-options {
    display: grid;
    gap: 18px;
}

.send-option {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 3px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: white;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.send-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.send-option::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    pointer-events: none;
}

.send-option:active::after {
    width: 300px;
    height: 300px;
    animation: ripple 0.6s ease-out;
}

.send-option:hover::before {
    left: 100%;
}

.send-option:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.send-option.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 50%, #075E54 100%);
    color: white;
    border: 3px solid #25D366;
}

.send-option.whatsapp:hover {
    background: linear-gradient(135deg, #128C7E 0%, #25D366 50%, #34E877 100%);
    box-shadow: 0 20px 40px rgba(37, 211, 102, 0.4);
    border-color: #34E877;
}

.send-option.email {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 50%, #1f4e79 100%);
    color: white;
    border: 3px solid #3498db;
}

.send-option.email:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 50%, #5dade2 100%);
    box-shadow: 0 20px 40px rgba(52, 152, 219, 0.4);
    border-color: #5dade2;
}

.send-option .icon {
    font-size: 3rem;
    margin-right: 25px;
    width: 60px;
    text-align: center;
    animation: iconFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.3));
    position: relative;
}

.send-option .icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: currentColor;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    transition: all 0.3s ease;
}

.send-option:hover .icon::after {
    opacity: 0.2;
    transform: translate(-50%, -50%) scale(1.5);
}

@keyframes iconFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    25% {
        transform: translateY(-8px) rotate(2deg);
    }
    50% { 
        transform: translateY(-15px) rotate(0deg); 
    }
    75% {
        transform: translateY(-8px) rotate(-2deg);
    }
}

.send-option.whatsapp .icon {
    color: white;
    text-shadow: 0 3px 10px rgba(0,0,0,0.3);
    animation: iconFloat 3s ease-in-out infinite, whatsappPulse 2s infinite;
}

.send-option.email .icon {
    color: white;
    text-shadow: 0 3px 10px rgba(0,0,0,0.3);
    animation: iconFloat 3s ease-in-out infinite, emailGlow 2.5s infinite;
}

@keyframes whatsappPulse {
    0%, 100% { filter: drop-shadow(0 5px 10px rgba(0,0,0,0.3)) brightness(1); }
    50% { filter: drop-shadow(0 8px 20px rgba(37, 211, 102, 0.6)) brightness(1.2); }
}

@keyframes emailGlow {
    0%, 100% { filter: drop-shadow(0 5px 10px rgba(0,0,0,0.3)) brightness(1); }
    50% { filter: drop-shadow(0 8px 20px rgba(52, 152, 219, 0.6)) brightness(1.2); }
}

/* Animaciones de efectos especiales */
@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(400px) rotate(720deg);
        opacity: 0;
    }
}

/* Efecto de ondas al hacer hover */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.6;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.send-option .content {
    flex: 1;
}

.send-option .content h4 {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.send-option.whatsapp .content h4 {
    color: white;
}

.send-option.email .content h4 {
    color: white;
}

.send-option .content p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0.9;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.send-option.whatsapp .content p {
    color: rgba(255,255,255,0.9);
}

.send-option.email .content p {
    color: rgba(255,255,255,0.9);
}

/* Botones del modal */
.send-quote-modal .modal-footer {
    padding: 20px 30px;
    border-top: none;
    background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 50%, #f3e5f5 100%);
    display: flex;
    justify-content: center;
    gap: 15px;
    border-radius: 0 0 20px 20px;
}

.send-quote-modal .btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    border: none;
    color: white;
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(149, 165, 166, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 150px;
}

.send-quote-modal .btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.send-quote-modal .btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

.send-quote-modal .btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #95a5a6 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(149, 165, 166, 0.4);
}

.send-quote-modal .btn-secondary i {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* Responsivo */
@media (max-width: 768px) {
    #send-quote-modal.modal {
        align-items: center !important;
        padding: 15px;
    }
    
    .send-quote-modal {
        max-width: 95%;
        min-width: auto;
        max-height: 90vh;
    }
    
    .send-quote-modal .modal-header {
        padding: 20px 25px;
    }
    
    .send-quote-modal .modal-header h3 {
        font-size: 1.4rem;
    }
    
    .send-quote-modal .modal-body {
        padding: 25px 20px;
    }
    
    .quote-info {
        padding: 18px 20px;
        margin-bottom: 20px;
    }
    
    .quote-info h4 {
        font-size: 1.1rem;
    }
    
    .quote-detail {
        padding: 8px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        text-align: left;
    }
    
    .quote-detail .label,
    .quote-detail .value {
        font-size: 0.9rem;
    }
    
    .send-option {
        padding: 18px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .send-option .icon {
        font-size: 2.2rem;
        margin-right: 0;
        margin-bottom: 8px;
        width: auto;
    }
    
    .send-option .content h4 {
        font-size: 1.1rem;
    }
    
    .send-option .content p {
        font-size: 0.85rem;
    }
    
    .send-quote-modal .modal-footer {
        padding: 18px 20px;
        flex-direction: column;
        gap: 12px;
    }
    
    .send-quote-modal .btn-secondary {
        width: 100%;
        padding: 15px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    #send-quote-modal.modal {
        padding: 10px;
    }
    
    .send-quote-modal {
        max-width: 98%;
        max-height: 92vh;
    }
    
    .send-quote-modal .modal-header {
        padding: 18px 20px;
    }
    
    .send-quote-modal .modal-header h3 {
        font-size: 1.2rem;
        flex-direction: column;
        gap: 8px;
    }
    
    .send-quote-modal .modal-body {
        padding: 20px 15px;
    }
    
    .quote-info {
        padding: 15px;
    }
    
    .quote-info h4 {
        font-size: 1rem;
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
    
    .send-option {
        padding: 15px;
    }
    
    .send-option .icon {
        font-size: 2rem;
    }
    
    .send-option .content h4 {
        font-size: 1rem;
    }
    
    .send-option .content p {
        font-size: 0.8rem;
    }
    
    .send-quote-modal .modal-footer {
        padding: 15px;
    }
    
    .send-quote-modal .btn-secondary {
        padding: 14px;
        font-size: 0.95rem;
    }
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.modal-title i {
    color: #3b82f6;
}

/* ========== FACTURACIÓN CON CONDICIÓN ========== */

/* Radio buttons personalizados */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    position: relative;
    transition: all 0.2s ease;
    background: white;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: #3b82f6;
    background: #3b82f6;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.radio-label {
    font-weight: 500;
    color: #374151;
    user-select: none;
}

.radio-option:hover .radio-custom {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Sección de detalles de facturación */
.billing-details {
    margin-top: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.billing-details .form-row {
    margin-bottom: 16px;
}

.billing-details .form-group {
    margin-bottom: 0;
}

.billing-details .form-label {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
}

.billing-details .form-input {
    border: 1px solid #d1d5db;
    background: white;
    transition: all 0.2s ease;
}

.billing-details .form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

.billing-details .form-hint {
    color: #6b7280;
    font-size: 0.875rem;
    font-style: italic;
    margin-top: 4px;
}

/* ========== MODAL DE CONFIRMACIÓN DE EXPORTACIÓN ========== */

.export-modal {
    max-width: 600px;
    width: 90%;
    animation: modalSlideIn 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.export-modal .modal-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 12px 12px 0 0;
}

.export-modal .modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.export-modal .modal-title i {
    font-size: 1.8rem;
    color: #d1fae5;
}

.export-modal .modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    transition: all 0.3s ease;
}

.export-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.export-info {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
}

.export-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.export-icon i {
    font-size: 24px;
    color: white;
}

.export-content {
    flex: 1;
}

.export-content h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 10px 0;
}

.export-content p {
    color: #6b7280;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.export-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.fields-column h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fields-column h5 i {
    color: #10b981;
    font-size: 1.1rem;
}

.fields-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fields-column li {
    padding: 4px 0;
    color: #6b7280;
    font-size: 0.9rem;
    position: relative;
    padding-left: 16px;
}

.fields-column li::before {
    content: '•';
    color: #10b981;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.export-note {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    padding: 12px;
    color: #0369a1;
    font-size: 0.9rem;
}

.export-note i {
    color: #0284c7;
    flex-shrink: 0;
}

.export-modal .modal-footer {
    padding: 20px 25px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.export-modal .btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.export-modal .btn-outline {
    background: white;
    border: 1px solid #d1d5db;
    color: #6b7280;
}

.export-modal .btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
    transform: translateY(-1px);
}

.export-modal .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.export-modal .btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.export-modal .btn i {
    font-size: 16px;
}

/* Responsive para modal de exportación */
@media (max-width: 768px) {
    .export-modal {
        width: 95%;
        max-width: 95%;
    }
    
    .export-info {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .export-fields {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .export-modal .modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .export-modal .btn {
        width: 100%;
    }
}

/* Título de la sección con icono */
.form-section h4.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.form-section h4.section-title i {
    color: #3b82f6;
    font-size: 1.2rem;
}

/* Responsividad para dispositivos móviles */
@media (max-width: 768px) {
    .radio-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .billing-details {
        padding: 15px;
        margin-top: 15px;
    }
    
    .billing-details .form-row {
        flex-direction: column;
    }
    
    .billing-details .form-group {
        margin-bottom: 16px;
    }
}

/* Modal específico para selección de números - mayor especificidad */
div#quote-number-selection-modal.modal {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(15, 23, 42, 0.8) !important;
    z-index: 10000 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    backdrop-filter: blur(12px) !important;
    animation: fadeIn 0.4s ease-out;
}

/* Estilos para modal de selección de números de cotización */
div#quote-number-selection-modal {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        backdrop-filter: blur(0px);
    }
    to { 
        opacity: 1; 
        backdrop-filter: blur(8px);
    }
}

#quote-number-selection-modal .modal-content {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    color: #1a202c;
    border-radius: 24px;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.12),
        0 12px 40px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 550px !important;
    max-height: 85vh;
    animation: modalSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(20px);
}

@keyframes modalSlideIn {
    from { 
        opacity: 0; 
        transform: scale(0.8) translateY(-50px);
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0);
    }
}

#quote-number-selection-modal .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
    border-radius: 24px 24px 0 0;
    z-index: 1;
}

#quote-number-selection-modal .modal-header,
#quote-number-selection-modal .modal-body,
#quote-number-selection-modal .modal-footer {
    position: relative;
    z-index: 2;
}

#quote-number-selection-modal .modal-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid #e2e8f0;
    padding: 30px 30px 20px 30px;
    border-radius: 24px 24px 0 0;
    margin: 0;
}

#quote-number-selection-modal .modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
}

#quote-number-selection-modal .modal-body {
    padding: 30px;
    text-align: center;
}

#quote-number-selection-modal .modal-body p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #475569;
    font-weight: 500;
}

.missing-numbers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    backdrop-filter: blur(5px);
}

.missing-number-badge {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    border: none;
    box-shadow: 
        0 4px 12px rgba(239, 68, 68, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.1);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.number-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

.option-group {
    width: 100%;
}

.number-option-btn {
    width: 100%;
    padding: 20px 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #1e293b;
    font-family: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.number-option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s;
}

.number-option-btn:hover::before {
    left: 100%;
}

.number-option-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
}

.number-option-btn:active {
    transform: translateY(-1px);
}

.number-option-btn.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-color: #2563eb;
    color: white;
}

.number-option-btn.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.3);
}

.number-option-btn strong {
    font-size: 18px;
    font-weight: 700;
    color: inherit;
}

.number-option-btn small {
    font-size: 14px;
    opacity: 0.8;
    font-weight: 500;
    color: inherit;
}

.more-missing {
    margin-top: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.more-missing details summary {
    cursor: pointer;
    font-weight: 600;
    color: white;
    outline: none;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.more-missing details summary:hover {
    background: rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.all-missing-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.missing-num-btn {
    min-width: 55px;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
}

.missing-num-btn:hover {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.3);
    border-color: transparent;
}

#quote-number-selection-modal .modal-footer {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 2px solid #e2e8f0;
    padding: 25px 30px;
    border-radius: 0 0 24px 24px;
    text-align: center;
}

#quote-number-selection-modal .btn-cancel {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
    border: 2px solid #cbd5e1;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#quote-number-selection-modal .btn-cancel:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #334155;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(71, 85, 105, 0.15);
    border-color: #94a3b8;
}

/* Responsividad para modal de números */
@media (max-width: 768px) {
    #quote-number-selection-modal {
        padding: 15px;
    }
    
    #quote-number-selection-modal .modal-content {
        margin: 0 auto;
        max-width: calc(100vw - 30px) !important;
        border-radius: 15px;
    }
    
    #quote-number-selection-modal .modal-header {
        padding: 20px;
    }
    
    #quote-number-selection-modal .modal-header h3 {
        font-size: 20px;
        text-align: center;
    }
    
    #quote-number-selection-modal .modal-body {
        padding: 20px;
    }
    
    .missing-numbers-list {
        justify-content: center;
        gap: 8px;
        margin: 20px 0;
        padding: 15px;
    }
    
    .missing-number-badge {
        font-size: 14px;
        padding: 8px 15px;
    }
    
    .number-option-btn {
        padding: 15px 20px;
    }
    
    .number-option-btn strong {
        font-size: 16px;
    }
    
    .number-option-btn small {
        font-size: 13px;
    }
    
    .all-missing-numbers {
        gap: 8px;
    }
    
    .missing-num-btn {
        min-width: 45px;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    #quote-number-selection-modal .modal-footer {
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .missing-numbers-list {
        flex-direction: column;
        align-items: center;
    }
    
    .missing-number-badge {
        font-size: 16px;
        padding: 10px 20px;
    }
    
    .number-options {
        gap: 12px;
    }
    
    .all-missing-numbers {
        justify-content: center;
        gap: 6px;
        font-size: 12px;
    }
}

/* Observaciones clickeables */
.clickable-observation {
    color: #007bff;
    cursor: pointer;
    border-bottom: 1px dotted #007bff;
    transition: all 0.3s ease;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.clickable-observation:hover {
    color: #0056b3;
    border-bottom-color: #0056b3;
    background-color: rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

/* OT clickeable en la tabla */
.clickable-ot {
    color: #059669;
    cursor: pointer;
    border-bottom: 1px dotted #059669;
    transition: all 0.3s ease;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.clickable-ot:hover {
    color: #047857;
    border-bottom-color: #047857;
    background-color: rgba(5, 150, 105, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}

/* Responsive para modales - Desktop grande */
@media (max-width: 1200px) {
    .observations-modal-content,
    .ots-modal-content {
        max-width: 90%;
    }
}

/* Responsive para modales - Tablet */
@media (max-width: 768px) {
    .observations-modal-content,
    .ots-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 2vh auto;
        border-radius: 12px;
    }
    
    .quote-info-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 18px 20px;
    }
    
    .quote-info-header .quote-id {
        font-size: 1.1rem;
        padding: 6px 14px;
    }
    
    .quote-info-header .quote-client {
        text-align: center;
        max-width: none;
        margin-left: 0;
        font-size: 0.9rem;
    }
    
    .observations-text-full {
        padding: 20px;
        font-size: 1rem;
        min-height: 120px;
    }
    
    .observations-content,
    .ots-content {
        padding: 20px;
        max-height: 60vh;
    }
    
    .ot-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }
    
    .ot-status {
        margin-left: 0;
        align-self: flex-end;
    }
    
    .ot-number {
        font-size: 1.2rem;
    }
    
    .ot-details {
        font-size: 0.9rem;
    }
}

/* Responsive para modales - Móvil */
@media (max-width: 480px) {
    .observations-modal-content,
    .ots-modal-content {
        width: 98%;
        margin: 1vh auto;
        border-radius: 8px;
    }
    
    .quote-info-header {
        padding: 15px 18px;
    }
    
    .quote-info-header .quote-id {
        font-size: 1rem;
        padding: 5px 12px;
    }
    
    .observations-content,
    .ots-content {
        padding: 18px;
        max-height: 70vh;
    }
    
    .observations-text-full {
        padding: 18px;
        font-size: 0.95rem;
    }
}

/* ========== MODAL DE OTs ========== */

.ots-modal-content {
    max-width: 750px;
    width: 90%;
    max-height: 80vh;
    margin: 5vh auto;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    background: white;
    overflow: hidden;
    border: 1px solid rgba(5, 150, 105, 0.1);
}

.ots-container {
    padding: 0;
}

/* Header compartido para ambos modales pero con colores diferentes */
.ots-modal-content .quote-info-header {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    position: relative;
}

.ots-modal-content .quote-info-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.3) 100%);
}

.ots-modal-content .quote-info-header .quote-id {
    font-family: 'Segoe UI', monospace;
    font-weight: 700;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.25);
    padding: 8px 16px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.ots-modal-content .quote-info-header .quote-client {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.95;
    text-align: right;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-left: 20px;
}

.ots-content {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-radius: 0;
    padding: 25px;
    border: none;
    max-height: 450px;
    overflow-y: auto;
    position: relative;
}

.ots-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(5, 150, 105, 0.2) 50%, transparent 100%);
}

/* Scrollbar personalizada para el contenedor de OTs */
.ots-content::-webkit-scrollbar {
    width: 6px;
}

.ots-content::-webkit-scrollbar-track {
    background: rgba(5, 150, 105, 0.1);
    border-radius: 3px;
}

.ots-content::-webkit-scrollbar-thumb {
    background: rgba(5, 150, 105, 0.3);
    border-radius: 3px;
}

.ots-content::-webkit-scrollbar-thumb:hover {
    background: rgba(5, 150, 105, 0.5);
}

.ots-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ot-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #059669;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(5, 150, 105, 0.1);
}

.ot-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(5, 150, 105, 0.2) 50%, transparent 100%);
}

.ot-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.15);
    border-left-width: 6px;
}

.ot-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.ot-number {
    font-weight: 700;
    font-size: 1.3rem;
    color: #059669;
    margin: 0;
    font-family: 'Segoe UI', monospace;
    text-shadow: 0 1px 2px rgba(5, 150, 105, 0.1);
}

.ot-details {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.4;
    margin: 0;
    font-weight: 400;
}

.ot-status {
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 20px;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
    flex-shrink: 0;
}

.ot-status.active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-color: rgba(6, 95, 70, 0.2);
}

.ot-status.completed {
    background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
    color: #1e40af;
    border-color: rgba(30, 64, 175, 0.2);
}

.ot-status.pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-color: rgba(146, 64, 14, 0.2);
}

.ots-list:empty::after {
    content: "No hay órdenes de trabajo asociadas a esta cotización.";
    display: block;
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 40px;
    background: white;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
    font-size: 1rem;
    line-height: 1.6;
}

/* OT clickeable en la tabla */
.clickable-ot {
    color: #059669;
    cursor: pointer;
    border-bottom: 1px dotted #059669;
    transition: all 0.3s ease;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.clickable-ot:hover {
    color: #047857;
    border-bottom-color: #047857;
    background-color: rgba(5, 150, 105, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .ots-modal-content {
        width: 95%;
        max-height: 85vh;
        margin: 2vh auto;
    }
    
    .ot-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .ot-status {
        margin-left: 0;
        align-self: flex-end;
    }
    
    .ots-content {
        padding: 15px;
        max-height: 350px;
    }
}

/* ===== MODAL DE BORRADORES ===== */
.drafts-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.draft-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff;
    transition: all 0.3s ease;
}

.draft-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.draft-info {
    flex: 1;
}

.draft-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.draft-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.draft-date {
    font-size: 0.85rem;
    color: #666;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
}

.draft-details {
    display: flex;
    gap: 20px;
    align-items: center;
}

.draft-client {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}

.draft-client i {
    color: var(--primary-color);
}

.draft-status {
    font-size: 0.85rem;
    color: #f39c12;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.draft-status i {
    color: #f39c12;
}

.draft-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.draft-actions .btn {
    padding: 8px 12px;
    font-size: 0.85rem;
    min-width: auto;
}

.no-data-message {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.no-data-message i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ddd;
}

.no-data-message p {
    font-size: 1.1rem;
    margin: 0;
}

/* Responsive para modal de borradores */
@media (max-width: 768px) {
    .draft-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .draft-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .draft-details {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .draft-actions {
        justify-content: center;
    }
    
    .draft-actions .btn {
        flex: 1;
        max-width: 120px;
    }
}

