/*
* Archivo: RecepcionCotiz.css (OPTIMIZADO)
* Ruta: src\static\css\Ventas\Cotiz\RecepcionCotiz.css
* Descripción: Estilos optimizados para la solicitud de cotizaciones especiales
* Optimización: Reducción de redundancias, mejor performance, manteniendo 100% compatibilidad
*/

/*---------------------------------------------------
    1. VARIABLES GLOBALES - Fácil personalización
---------------------------------------------------*/
:root {
    /* === TIPOGRAFÍA === */
    /* Familia de fuentes */
    --font-family-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-secondary: Georgia, 'Times New Roman', serif;
    --font-family-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    
    /* === TAMAÑOS DE TEXTO === */
    /* Títulos principales */
    --font-size-title: 1.5rem;          /* 24px - Títulos principales (h2, h3) */
    --font-size-subtitle: 1.2rem;       /* 17.6px - Subtítulos (h4, h5) */
    --font-size-sub-subtitle: 1rem;     /* 16px - Sub-subtítulos (h6) */
    --font-size-section: 1rem;          /* 16px - Títulos de sección */
    
    /* Texto de contenido */
    --font-size-base: 0.9rem;           /* 14.4px - Texto base (labels, inputs) */
    --font-size-small: 0.8rem;          /* 12.8px - Texto pequeño (ayudas, notas) */
    --font-size-large: 1.2rem;          /* 19.2px - Texto destacado */
    
    /* Botones */
    --font-size-button: 0.9rem;         /* 14.4px - Botones normales */
    --font-size-button-large: 1rem;     /* 16px - Botones grandes */
    --font-size-button-small: 0.8rem;   /* 12.8px - Botones pequeños */
    
    /* Selectboxes y dropdowns */
    --font-size-select: 0.9rem;         /* 14.4px - Texto en select */
    --font-size-option: 0.9rem;         /* 14.4px - Opciones del dropdown */
    
    /* Placeholders y textos secundarios */
    --font-size-placeholder: 0.85rem;   /* 13.6px - Placeholders */
    --font-size-helper: 0.75rem;        /* 12px - Textos de ayuda */
    
    /* === TAMAÑOS RESPONSIVOS (MÓVIL) === */
    --font-size-title-mobile: 1.2rem;        /* 19.2px - Títulos en móvil */
    --font-size-subtitle-mobile: 1rem;       /* 16px - Subtítulos en móvil */
    --font-size-sub-subtitle-mobile: 0.8rem;     /* 16px - Sub-subtítulos (h6) */
    --font-size-section-mobile: 0.8rem;      /* 11.2px - Secciones en móvil */
    --font-size-base-mobile: 0.8rem;         /* 11.2px - Base en móvil */
    --font-size-small-mobile: 0.8rem;        /* 11.2px - Pequeño en móvil */
    --font-size-button-mobile: 0.85rem;       /* 12.8px - Botones en móvil */
    --font-size-button-large-mobile: 0.8rem; /* 12.8px - Botones grandes en móvil */
    --font-size-button-small-mobile: 0.8rem; /* 12.8px - Botones pequeños en móvil */
    --font-size-select-mobile: 0.8rem;       /* 11.2px - Select en móvil */
    --font-size-option-mobile: 0.8rem;       /* 11.2px - Opciones dropdown en móvil */
    
    /* === PESOS DE FUENTE === */
    --font-weight-title: 700;           /* Bold para títulos */
    --font-weight-subtitle: 600;        /* Semi-bold para subtítulos */
    --font-weight-label: 500;           /* Medium para labels */
    --font-weight-base: 400;            /* Normal para texto base */
    --font-weight-light: 300;           /* Light para textos secundarios */

    /* Colores principales */
    --color-primary: #4e8cff;
    --color-secondary: #6c757d;
    --color-success: #00e4d0;
    --color-danger: #dc3545;
    --color-warning: #ffc107;
    --color-info: #17a2b8;
    
    /* Colores de hover */
    --hover-primary: #0056b3;
    --hover-secondary: #5a6268;
    --hover-success: #218838;
    
    /* Fondos */
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-form: #ffffff;
    
    /* Bordes y espaciado */
    --border-color: #e9ecef;
    --border-radius: 8px;
    --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 8px rgba(0, 0, 0, 0.15);
    
    /* Espaciado estándar */
    --gap-xs: 8px;
    --gap-sm: 12px;
    --gap-md: 16px;
    --gap-lg: 24px;
    --gap-xl: 32px;
}

/*---------------------------------------------------
    2. CONTENEDORES BASE
---------------------------------------------------*/

/* Contenedor principal con gradiente decorativo */
.form-main-container {
    background-color: var(--bg-light);
    padding: var(--gap-lg);
    border-radius: var(--border-radius);
    border: 3px solid transparent;
    border-image: linear-gradient(45deg, var(--color-primary), var(--color-success)) 1;
    box-shadow: 0 0 15px rgba(78, 140, 255, 0.3);
    margin: var(--gap-md) 0;
}

/* Contenedor de sección individual */
.form-section {
    background-color: var(--bg-form);
    padding: var(--gap-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: var(--gap-lg);
    border: 1px dashed rgba(0, 0, 0, 0.171); /* Gris muy suave y moderno */
}

/* Contenedor de búsqueda/acciones */
.form-search-container {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    background-color: var(--bg-white);
    padding: var(--gap-md);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-primary);
    margin-bottom: var(--gap-lg);
}

/*---------------------------------------------------
    3. TÍTULOS Y ENCABEZADOS
---------------------------------------------------*/

.form-title {
    text-align: center;
    font-size: var(--font-size-title);
    font-weight: var(--font-weight-title);
    font-family: var(--font-family-primary);
    color: #253858;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.form-title::after {
    content: "";
    display: block;
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-success));
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.form-subtitle {
    font-size: var(--font-size-subtitle);
    font-weight: var(--font-weight-subtitle);
    font-family: var(--font-family-primary);
    color: #253858;
    margin: var(--gap-lg) 0 var(--gap-md) 0;
    position: relative;
    padding-bottom: 0.3rem;
}

.form-subtitle::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-success));
    margin-top: 0.3rem;
    border-radius: 2px;
}

.form-sub-subtitle {
    font-size: var(--font-size-sub-subtitle);
    font-weight: var(--font-weight-base);
    font-family: var(--font-family-primary);
    color: #4d6287;
    margin: var(--gap-lg) 0 var(--gap-md) 0;
    position: relative;
    padding-bottom: 0.3rem;
}
 
.form-sub-subtitle::after {
    content: "";
    display: block;
    width: 60px;
    opacity: .4;
    height: 2px;
    background: linear-gradient(90deg, #333, grey);
    margin-top: 0.1rem;
    border-radius: 2px;
}

/* Título de sección (para divisiones menores) */
.form-section-title {
    font-size: var(--font-size-section);
    font-weight: var(--font-weight-subtitle);
    font-family: var(--font-family-primary);
    color: #253858;
    margin: var(--gap-md) 0 var(--gap-sm) 0;
}

/*---------------------------------------------------
    4. LAYOUTS DE FILAS Y COLUMNAS - FÁCIL USO
---------------------------------------------------*/

/* FILA CON 1 COLUMNA */
.row-1col {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-md);
    margin-bottom: var(--gap-md);
}

/* FILA CON 2 COLUMNAS */
.row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-md);
    margin-bottom: var(--gap-md);
}

/* FILA CON 3 COLUMNAS */
.row-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--gap-md);
    margin-bottom: var(--gap-md);
}

/* FILA CON 4 COLUMNAS */
.row-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap-md);
    margin-bottom: var(--gap-md);
}

/* FILA PERSONALIZADA: label pequeño + input grande */
.row-label-input {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--gap-md);
    align-items: center;
    margin-bottom: var(--gap-md);
}

/* FILA DE ACCIONES: para botones */
.row-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--gap-md);
    margin-top: var(--gap-lg);
}

.row-actions.center {
    justify-content: center;
}

.row-actions.end {
    justify-content: flex-end;
}

/*---------------------------------------------------
    5. GRUPOS DE CAMPOS - COMPONENTES REUTILIZABLES
---------------------------------------------------*/

.field-group {
    display: flex;
    flex-direction: column;
}

.field-group label {
    font-weight: var(--font-weight-label);
    color: #333;
    font-size: var(--font-size-base);
    margin-bottom: var(--gap-xs);
}

.field-group label.required::after {
    content: '*';
    color: var(--color-danger);
    margin-left: 3px;
}

/* CAMPOS DE INPUT */
.field-group input,
.field-group select,
.field-group textarea {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: var(--font-size-base);
    font-family: var(--font-family-primary);
    transition: all 0.2s ease;
}

/* ESTILOS ESPECÍFICOS PARA SELECT - Solución completa */
.field-group select,
select {
    font-size: var(--font-size-select) !important;
    font-family: var(--font-family-primary) !important;
}

/* Forzar el tamaño en todos los estados del select */
.field-group select:focus,
.field-group select:active,
select:focus,
select:active {
    font-size: var(--font-size-select) !important;
}

/* Para navegadores webkit (Chrome, Safari) */
.field-group select::-webkit-input-placeholder,
select::-webkit-input-placeholder {
    font-size: var(--font-size-select) !important;
}

/* OPCIONES DEL DROPDOWN - Estilos globales para todas las opciones */
.field-group select option,
select option {
    font-size: var(--font-size-option) !important;
    font-family: var(--font-family-primary) !important;
    padding: 8px 12px !important;
    line-height: 1.4 !important;
}

/* LABELS ESPECÍFICOS PARA TEXTAREA Y OTROS CAMPOS */
.field-group label,
.row-1col .field-group label,
.row-2col .field-group label,
.row-3col .field-group label,
label {
    font-weight: var(--font-weight-label);
    font-family: var(--font-family-primary);
    color: #333;
    font-size: var(--font-size-base) !important;
    margin-bottom: var(--gap-xs);
}

.field-group input::placeholder,
.field-group textarea::placeholder {
    font-size: var(--font-size-placeholder);
    color: #999;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(78, 140, 255, 0.2);
}

.field-group input:disabled,
.field-group select:disabled,
.field-group textarea:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* TEXTO DE AYUDA */
.field-group .help-text {
    font-size: var(--font-size-helper);
    color: var(--color-secondary);
    margin-top: var(--gap-xs);
    font-weight: var(--font-weight-light);
}

/* TEXTO PEQUEÑO GENERAL */
.text-small {
    font-size: var(--font-size-small);
    color: var(--color-secondary);
}

/* TEXTO DESTACADO */
.text-highlight {
    font-size: var(--font-size-large);
    font-weight: var(--font-weight-subtitle);
    color: var(--color-primary);
}

/* CHECKBOX Y RADIO - Horizontal */
.field-group.horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--gap-xs);
    width: 100%;
}

.field-group.horizontal input[type="checkbox"],
.field-group.horizontal input[type="radio"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0;
}

.field-group.horizontal label {
    flex: 1;
    margin-bottom: 0;
    cursor: pointer;
    font-size: var(--font-size-base);
    font-family: var(--font-family-primary);
}

/*---------------------------------------------------
    6. FILAS PERSONALIZABLES CON FLEX (MEJOR OPCIÓN)
---------------------------------------------------*/

/* FILA DE BÚSQUEDA/ACCIONES PERSONALIZABLE CON FLEX */
.row-search {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    margin-bottom: var(--gap-lg);
}

/* PROPORCIONES CON FLEX - Más responsivo y flexible */
.row-search .search-label { 
    flex: 0 0 auto;                          /* No crece, tamaño según contenido */
    white-space: nowrap;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-label);
}

.row-search .search-input { 
    flex: 2 1 150px;                         /* FLEX: crece 2 partes, mínimo 150px */
    min-width: 120px;                        /* Ancho mínimo absoluto */
    max-width: 300px;                        /* Máximo para pantallas grandes */
}

.row-search .search-button { 
    flex: 1 1 100px;                         /* FLEX: crece 1 parte, mínimo 100px */
    min-width: 80px;
}

.row-search .search-spacer { 
    flex: 2 1 60px;                          /* FLEX: crece 3 partes (más espacio) */
}

.row-search .search-button-secondary { 
    flex: 1.5 1 120px;                       /* FLEX: crece 1.5 partes, mínimo 120px */
    min-width: 100px;
}

/* FILA CON PROPORCIONES FLEX PERSONALIZADAS */
.row-flex {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    /*margin-bottom: var(--gap-lg);*/
}

/* CLASES DE PROPORCIÓN FLEX - Más responsive */
.flex-auto { flex: 0 0 auto; }              /* Tamaño automático, no crece */
.flex-1 { flex: 1 1 0; }                    /* 1 parte */
.flex-2 { flex: 2 1 0; }                    /* 2 partes */
.flex-3 { flex: 3 1 0; }                    /* 3 partes */
.flex-4 { flex: 4 1 0; }                    /* 4 partes */
.flex-8 { flex: 8 1 0; }                    /* 8 partes */
.flex-half { flex: 0.5 1 0; }               /* Media parte */

/* CON TAMAÑOS MÍNIMOS FLEX */
.flex-1-min100 { flex: 1 1 100px; }         /* 1 parte, mínimo 100px */
.flex-2-min150 { flex: 2 1 150px; }         /* 2 partes, mínimo 150px */
.flex-3-min200 { flex: 3 1 200px; }         /* 3 partes, mínimo 200px */

/*---------------------------------------------------
    7. ALINEACIONES DE BOTONES - DIFERENTES OPCIONES
---------------------------------------------------*/

/* BOTÓN ÚNICO */
.single-button-center {
    display: flex;
    justify-content: center;
    margin: var(--gap-lg) 0;
}

.single-button-left {
    display: flex;
    justify-content: flex-start;
    margin: var(--gap-lg) 0;
}

.single-button-right {
    display: flex;
    justify-content: flex-end;
    margin: var(--gap-lg) 0;
}

/* DOS BOTONES - DIFERENTES ALINEACIONES */
.two-buttons-center {
    display: flex;
    justify-content: center;
    gap: var(--gap-md);
    margin: var(--gap-lg) 0;
}

.two-buttons-justified {
    display: flex;
    justify-content: space-between;
    margin: var(--gap-lg) 0;
}

.two-buttons-ends {
    display: flex;
    justify-content: space-between;
    margin: var(--gap-lg) 0;
}

.two-buttons-left {
    display: flex;
    justify-content: flex-start;
    gap: var(--gap-md);
    margin: var(--gap-lg) 0;
}

.two-buttons-right {
    display: flex;
    justify-content: flex-end;
    gap: var(--gap-md);
    margin: var(--gap-lg) 0;
}

/*---------------------------------------------------
    8. GRUPOS DE CHECKBOX/RADIO CON DIFERENTES LAYOUTS
---------------------------------------------------*/

/* CHECKBOX EN LÍNEA HORIZONTAL */
.checkbox-group-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-lg);
    margin: var(--gap-sm) 0;
}

/* CHECKBOX EN COLUMNAS */
.checkbox-group-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--gap-md);
    margin: var(--gap-sm) 0;
}

/* CHECKBOX EN LISTA VERTICAL */
.checkbox-group-vertical {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    margin: var(--gap-sm) 0;
}

/*---------------------------------------------------
    9. TIPOS DE INPUT ESPECIALIZADOS
---------------------------------------------------*/

/* INPUT DE ARCHIVO CON ESTILO PERSONALIZADO */
.file-input-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.file-input-container input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-display {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    padding: 10px 12px;
    border: 2px dashed var(--border-color);
    border-radius: 4px;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
    font-size: var(--font-size-base);
}

.file-input-container:hover .file-input-display {
    border-color: var(--color-primary);
    background-color: rgba(78, 140, 255, 0.05);
}

.file-input-icon {
    color: var(--color-primary);
    font-weight: bold;
}

/* INPUT TELEFÓNICO CON FORMATO */
.phone-input {
    position: relative;
}

.phone-input input {
    padding-left: 50px;
    font-size: var(--font-size-base);
}

.phone-input::before {
    content: "+52";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: var(--font-size-base);
    z-index: 1;
}

/*---------------------------------------------------
    ESTILOS PARA CAMPOS REQUIRED - SISTEMA COMPLETO
---------------------------------------------------*/

/* ===== ASTERISCO REQUIRED EN LABELS ===== */
.field-group label.required::after,
.form-group label.required::after,
label.required::after {
    content: '*';
    color: var(--color-danger);
    margin-left: 3px;
    font-weight: bold;
    font-size: 1.1em;
}

/* ===== ESTILOS PARA INPUTS/SELECTS REQUIRED ===== */

/* Estado normal required (sin error) */
input[required], 
select[required], 
textarea[required] {
    border-left: 3px solid #ffc107; /* Borde amarillo sutil */
}

/* Estado válido (required y con valor) */
input[required]:valid, 
select[required]:valid, 
textarea[required]:valid {
    border-left: 3px solid #28a745; /* Verde cuando está lleno */
}

/* Estado inválido (required y vacío o con error) */
input[required]:invalid, 
select[required]:invalid, 
textarea[required]:invalid {
    border-left: 3px solid #dc3545; /* Rojo cuando está vacío/inválido */
}

/* ===== CLASES PARA MANEJO MANUAL CON JS ===== */

/* Campo required válido */
.form-control.required-valid,
.form-select.required-valid {
    border-left: 3px solid #28a745;
    border-color: #28a745;
    background-color: #f8fff8;
}

.form-control.required-valid:focus,
.form-select.required-valid:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Campo required inválido */
.form-control.required-invalid,
.form-select.required-invalid {
    border-left: 3px solid #dc3545;
    border-color: #dc3545;
    background-color: #fff8f8;
}

.form-control.required-invalid:focus,
.form-select.required-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Campo required pendiente (sin llenar aún) */
.form-control.required-pending,
.form-select.required-pending {
    border-left: 3px solid #ffc107;
    border-color: #e9ecef;
    background-color: #fffdf5;
}

.form-control.required-pending:focus,
.form-select.required-pending:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

/* ===== MENSAJES DE ERROR ===== */
.field-error-message {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #dc3545;
    font-weight: 500;
}

.field-success-message {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #28a745;
    font-weight: 500;
}

/* ===== BADGE CONTADOR DE REQUIRED ===== */
.required-counter {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
    margin-left: 0.5rem;
}

.required-counter.pending {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
}

.required-counter.complete {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.required-counter.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* ===== INDICADOR EN TÍTULO DE SECCIÓN ===== */
.form-subtitle .section-validation-status {
    margin-left: 1rem;
    font-size: 0.9rem;
    font-weight: normal;
}

/*---------------------------------------------------
    10. BOTONES REUTILIZABLES
---------------------------------------------------*/

.btn-custom,
.btn,
button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: var(--font-size-button) !important;
    font-weight: var(--font-weight-label);
    font-family: var(--font-family-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--hover-primary);
}

.btn-success {
    background-color: var(--color-success);
    color: white;
}

.btn-success:hover {
    background-color: var(--hover-success);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--hover-secondary);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: white;
}

/* Tamaños de botones */
.btn-large {
    font-size: var(--font-size-button-large);
    padding: 12px 24px;
}

.btn-small {
    font-size: var(--font-size-button-small);
    padding: 6px 12px;
}

/*---------------------------------------------------
    11. ESPACIADORES Y UTILIDADES
---------------------------------------------------*/

.spacer {
    flex-grow: 1;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--gap-xs); }
.mb-2 { margin-bottom: var(--gap-sm); }
.mb-3 { margin-bottom: var(--gap-md); }
.mb-4 { margin-bottom: var(--gap-lg); }


/* ===============================
    🎨 ESTILOS PARA LA TABLA
   =============================== */

/* 📌 Estilos para los títulos de la tabla */
#RecepcionCotizTable_wrapper .dataTables_scrollHead thead th {
    background-color: #1f71c2 !important; /* Color de fondo */
    color: white !important; /* Color del texto */
    font-size: 14px !important; /* Tamaño de fuente */
    font-weight: bold !important; /* Negrita */
    text-align: center !important; /* Alineación horizontal */
    vertical-align: middle !important; /* Alineación vertical */
    padding: 10px !important; /* Espaciado */
}

/* 📌 Alinear todos los títulos de columnas en DataTables a la derecha */
#RecepcionCotizTable_wrapper .dataTables_scrollHead table thead tr th {
    text-align: center !important;
}

/* 📌 Personalizar alineación de la tercera columna en los títulos generados por DataTables */
#RecepcionCotizTable_wrapper .dataTables_scrollHead table thead tr th:nth-child(3) {
    text-align: center !important;
}

/* 📌 Cambiar el color de fondo de la fila de filtros */
#RecepcionCotizTable_wrapper .dataTables_scrollHead thead tr:nth-child(2) th {
    background-color: #1f71c249 !important;
}

/* 📌 Ajustar el tamaño de texto y remover bordes de la fila de filtros */
#RecepcionCotizTable_wrapper .dataTables_scrollHead thead input {
    font-size: 12px !important;  /* Tamaño del texto */
    font-family: inherit !important;  /* Usa la misma fuente que el resto de la tabla */
    text-align: center !important; /* Centrar el texto */
    padding: 2px !important; /* Espaciado interno */
    border: none !important; /* Quitar el borde */
    /* background-color: transparent !important; */ /* Hacer el fondo transparente */
    outline: none !important; /* Evitar el contorno azul al hacer clic */
    width: auto !important; /* Ajustar al ancho del texto */
    min-width: 80px !important; /* Evita que sean demasiado pequeños */
    max-width: 100% !important; /* Asegura que no crezcan más allá de la celda */
}

/* 📌 Estilos para el cuerpo de la tabla */
#RecepcionCotizTable tbody td {
    font-size: 12px; /* Tamaño de fuente */
    text-align: left; /* Alineación predeterminada */
    vertical-align: middle; /* Alineación vertical */
    padding: 8px 0; /* 🔥 8px arriba y abajo, 0px en los lados */
}

/* 📌 Alinear las columnas del cuerpo a de la tabla*/
    #RecepcionCotizTable tbody td:nth-child(1) {
        text-align: center;
    }
    #RecepcionCotizTable tbody td:nth-child(2){
        text-align: center;
    }

    #RecepcionCotizTable tbody td:nth-child(3){
        text-align: justify;
    }

    #RecepcionCotizTable tbody td:nth-child(4) {
        text-align: center;
    }

    #RecepcionCotizTable tbody td:nth-child(5),
    #RecepcionCotizTable tbody td:nth-child(6),
    #RecepcionCotizTable tbody td:nth-child(7) {
        text-align: center;
    }

/* 📌 Estilos para las filas impares (para mejor visualización) */
#RecepcionCotizTable tbody tr:nth-child(odd) {
    background-color: #f2f2f2; /* Color de fondo alterno */
}

/* Forzar que la tabla use el ancho correcto */
#RecepcionCotizTable {
    table-layout: fixed !important; /* Fija el ancho de la tabla */
    width: 100% !important; /* Asegura que la tabla use todo el ancho disponible */
}
/* Evitar que DataTables sobreescriba los anchos de las columnas */
#RecepcionCotizTable_wrapper .dataTables_scrollHead table {
    table-layout: fixed !important; /* Fijar el ancho de las columnas en el encabezado */
    width: 100% !important;
}
    /* Especificar los anchos de las columnas en una sola estructura */
    #RecepcionCotizTable_wrapper .dataTables_scrollHead table thead tr th:nth-child(1), /* Aplica cuando usas scrollX No*/
    #RecepcionCotizTable thead th:nth-child(1),
    #RecepcionCotizTable tbody td:nth-child(1) {
        width: 8% !important; /* Columna 1 */
    }
    #RecepcionCotizTable_wrapper .dataTables_scrollHead table thead tr th:nth-child(2), /* Aplica cuando usas scrollX Parte*/
    #RecepcionCotizTable thead th:nth-child(2),
    #RecepcionCotizTable tbody td:nth-child(2) {
        width: 13% !important; /* Columna 2 */
    }

    #RecepcionCotizTable_wrapper .dataTables_scrollHead table thead tr th:nth-child(3), /* Aplica cuando usas scrollX Descripcion*/
    #RecepcionCotizTable thead th:nth-child(3),
    #RecepcionCotizTable tbody td:nth-child(3) {
        width: 19% !important; /* Columna 3 */
    }

    #RecepcionCotizTable_wrapper .dataTables_scrollHead table thead tr th:nth-child(4), /* Aplica cuando usas scrollX Cantidad*/
    #RecepcionCotizTable thead th:nth-child(4),
    #RecepcionCotizTable tbody td:nth-child(4) {
        width: 10% !important; /* Columna 4 */
    }

    #RecepcionCotizTable_wrapper .dataTables_scrollHead table thead tr th:nth-child(5), /* Aplica cuando usas scrollX Unidad*/
    #RecepcionCotizTable thead th:nth-child(5),
    #RecepcionCotizTable tbody td:nth-child(5) {
        width: 13% !important; /* Columna 5 */
    }

    #RecepcionCotizTable_wrapper .dataTables_scrollHead table thead tr th:nth-child(6), /* Aplica cuando usas scrollX Precio_Unitario*/
    #RecepcionCotizTable thead th:nth-child(6),
    #RecepcionCotizTable tbody td:nth-child(6) {
        width: 13% !important; /* Columna 6 */
    }

    #RecepcionCotizTable_wrapper .dataTables_scrollHead table thead tr th:nth-child(7), /* Aplica cuando usas scrollX Importe*/
    #RecepcionCotizTable thead th:nth-child(7),
    #RecepcionCotizTable tbody td:nth-child(7) {
        width: 10% !important; /* Columna 7 */
    }

/* ===============================
    🔘 ESTILOS PARA LOS BOTONES DEL BODY
   =============================== */

/* 📌 Estilos generales para los botones de acción */
#RecepcionCotizTable tbody button {
    font-size: 12px; /* Tamaño del texto */
    padding: 5px 10px; /* Espaciado interno */
    border-radius: 5px; /* Bordes redondeados */
    cursor: pointer; /* Cursor de mano */
    transition: 0.3s; /* Suavizar efectos */
}

/* 📌 Estilos específicos para botones de aprobación */
#RecepcionCotizTable tbody .btn-approve {
    background-color: green;
    color: white;
    border: none;
}

#RecepcionCotizTable tbody .btn-approve:hover {
    background-color: darkgreen;
}

/* 📌 Estilos específicos para botones de rechazo */
#RecepcionCotizTable tbody .btn-reject {
    background-color: red;
    color: white;
    border: none;
}

#RecepcionCotizTable tbody .btn-reject:hover {
    background-color: darkred;
}

/* ===============================
    📤 ESTILOS PARA LOS BOTONES DE EXPORTACIÓN
   =============================== */

.dt-buttons .dt-button {
    background-color: #007bff !important; /* Azul */
    color: white !important;
    font-size: 12px !important;
    padding: 6px 12px !important;
    border-radius: 5px !important;
    margin-right: 5px !important;
}

.dt-buttons .dt-button:hover {
    background-color: #0056b3 !important; /* Azul más oscuro */
}

/* ===============================
    🔍 ESTILOS PARA EL BUSCADOR Y PAGINACIÓN
   =============================== */

/* 📌 Estilos para la barra de búsqueda */
.dataTables_filter {
    font-size: 13px;
}

.dataTables_filter input {
    font-size: 12px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* 📌 Estilos para la paginación */
.dataTables_paginate {
    font-size: 13px;
}

/* 📌 Estilos para los botones de paginación */
.dataTables_paginate .paginate_button {
    padding: 5px 10px;
    border-radius: 5px;
    background-color: #ddd;
    color: black;
    margin: 0 2px;
    transition: 0.3s;
}

.dataTables_paginate .paginate_button:hover {
    background-color: #007bff;
    color: white;
}

/* 📌 Estilos para el texto "Showing X to X of X entries" */
#RecepcionCotizTable_wrapper .dataTables_info {
    font-size: 12px !important; /* Tamaño del texto */
    font-weight: bold !important; /* Negrita */
    color: #333 !important; /* Color del texto (puedes cambiarlo) */
    font-family: inherit !important; /* Mantener la fuente general */
    padding-top: 10px !important; /* Espaciado superior */
}

/* 📌 Por defecto (pantallas grandes) → Desactivamos desplazamiento horizontal */
#RecepcionCotizTable_wrapper {
    overflow-x: unset !important; /* Permite que la tabla se ajuste automáticamente */
    white-space: normal !important; /* Permite que el texto se ajuste */
}


/*---------------------------------------------------
    12. RESPONSIVO
---------------------------------------------------*/

@media (max-width: 1000px) {
    /* === APLICAR TAMAÑOS RESPONSIVOS === */
    :root {
        --font-size-title: var(--font-size-title-mobile);
        --font-size-subtitle: var(--font-size-subtitle-mobile);
        --font-size-sub-subtitle: var(--font-size-sub-subtitle-mobile);
        --font-size-section: var(--font-size-section-mobile);
        --font-size-base: var(--font-size-base-mobile);
        --font-size-small: var(--font-size-small-mobile);
        --font-size-button: var(--font-size-button-mobile);
        --font-size-button-large: var(--font-size-button-large-mobile);
        --font-size-button-small: var(--font-size-button-small-mobile);
        --font-size-select: var(--font-size-select-mobile);
        --font-size-option: var(--font-size-option-mobile);
    }
    
    .row-2col,
    .row-3col,
    .row-4col {
        grid-template-columns: 1fr;
    }
    
    .row-flex {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* RESPONSIVO PARA BÚSQUEDAS - Se vuelven verticales */
    .row-search {
        flex-direction: column;
        align-items: stretch;
        gap: var(--gap-sm);
    }
    
    .row-search .search-label,
    .row-search .search-input,
    .row-search .search-button,
    .row-search .search-button-secondary {
        flex: none;                     /* Quita todas las proporciones flex */
        width: 100%;                    /* Ancho completo */
        max-width: none;                /* Sin límite máximo */
        min-width: auto;                /* Sin mínimo */
    }
    
    .row-search .search-spacer {
        display: none;                  /* Oculta el espaciador en móvil */
    }
    
    .two-buttons-justified,
    .two-buttons-ends {
        flex-direction: column;
        gap: var(--gap-sm);
    }
    
    /* NORMALIZAR TAMAÑOS EN MÓVIL */
    .row-flex .flex-1,
    .row-flex .flex-2,
    .row-flex .flex-3,
    .row-flex .flex-4,
    .row-flex .flex-1-min100,
    .row-flex .flex-2-min150,
    .row-flex .flex-3-min200 {
        flex: none;                     /* Quita flex en móvil */
        width: 100%;                    /* Ancho completo */
        max-width: none;                /* Sin máximo */
        min-width: auto;                /* Sin mínimo */
    }
    
    .row-flex .flex-auto {
        width: 100%;                    /* Label también ocupa ancho completo */
    }
}
