.ide-form-wrap {
    /* Forzar ancho disponible */
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    /* Asegurar padding no rompa el ancho */
    box-sizing: border-box;
}

.ide-nowrap {
    white-space: nowrap;
}

.ide-form-group {
    position: relative;
    margin-bottom: 24px;
}

/* Tamaños de letras */

.ide-letra-10 {
    font-size: 11px !important;
}

.ide-letra-11 {
    font-size: 11px !important;
}

.ide-letra-12 {
    font-size: 12px !important;
}

.ide-letra-13 {
    font-size: 13px !important;
}

.ide-letra-14 {
    font-size: 14px !important;
}

.ide-letra-15 {
    font-size: 15px !important;
}

.ide-letra-16 {
    font-size: 16px !important;
}

.ide-letra-20 {
    font-size: 20px !important;
}

.ide-letra-22 {
    font-size: 22px !important;
}

.ide-letra-24 {
    font-size: 24px !important;
}

.ide-letra-36 {
    font-size: 36px !important;
}

.ide-letra-2em {
    font-size: 2em !important;
}

/* Anchos */
.ide-width-20 {
    width: 20px;
}

/* Posiciones */
.ide-relative {
    position: relative;
}

/* Input Styles */
.ide-form-group input,
.ide-form-group select,
.ide-form-group textarea {
    width: 100%;
    /* Asegurar comportamiento bloque */
    display: block;
    /* Padding incluido en el ancho */
    box-sizing: border-box;
    padding: 14px 12px 6px 12px;
    font-size: 16px;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid #5c9aeb !important;
    box-shadow: none !important;
    border-radius: 1px;
    background-color: rgba(0, 0, 0, 0) !important;
    transition: all 0.2s ease;
    outline: none;
}

.ide-form-group input:focus {
    border-color: #5c9aeb;
    border: 0 0 0 1px solid #5c9aeb !important;
    box-shadow: none !important;
    background: rgba(0, 0, 0, 0);
}

/* Label Styles (Floating) */
.ide-form-group label {
    position: absolute;
    top: 14px;
    left: 12px;
    color: #5c9aeb;
    font-size: 16px;
    pointer-events: none;
    transition: all 0.2s ease;
    background-color: transparent;
}

.ide-letras-rojas {
    color: #cc0033 !important;
}

.ide-letras-azules {
    color: #5c9aeb !important;
}

.ide-letras-grises {
    color: #666 !important;
}

.ide-letras-grises-claras {
    color: #888 !important;
}

.ide-letras-blancas {
    color: white !important;
}

.ide-bold {
    font-weight: bold !important;
}

.ide-valign-center {
    vertical-align: middle !important;
}

.ide-valign-top {
    vertical-align: top !important;
}

.ide-valign-bottom {
    vertical-align: bottom !important;
}

.ide-halign-center {
    text-align: center !important;
}

.ide-halign-left {
    text-align: left !important;
}

.ide-halign-right {
    text-align: right !important;
}

/* Float state: when input has focus OR has content */
.ide-form-group input:focus~label,
.ide-form-group input:not(:placeholder-shown)~label {
    top: -5px;
    font-size: 11px;
    color: #5c9aeb;
    /*font-weight: 600;*/
}

.ide-form-group select~label,
.ide-form-group select:focus~label,
.ide-form-group textarea~label,
.ide-form-group textarea:focus~label {
    top: -5px;
    font-size: 11px;
    color: #5c9aeb;
}


/* Color cuando no tiene foco pero si texto: incluido en la regla agrupada anterior */

/* Hide default placeholder */
.ide-form-group input::placeholder {
    color: transparent;
}

/* Button */
.ide-btn-submit {
    width: 100%;
    padding: 12px;
    font-weight: bold;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    background-color: #2ea3f2;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.ide-btn-submit:hover {
    background-color: #1b8adb;
}

.ide-btn-submit:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.ide-btn:disabled {
    cursor: not-allowed;
}

/* Button genérico — clase base + variantes de color */
.ide-button {
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: normal;
    display: inline-block;
    text-decoration: none !important;
    text-align: center !important;
    cursor: pointer;
}

.ide-button:disabled {
    cursor: not-allowed;
}

.ide-button-azul {
    color: white;
    background-color: #5679af;
}

.ide-button-azul:hover {
    color: white;
    background-color: #384d6d;
}

.ide-button-rojo {
    color: white;
    background-color: #cc0033;
}

.ide-button-rojo:hover {
    color: white;
    background-color: #66081f;
}

.ide-button-blanco {
    color: #334155;
    background-color: white;
    border: 1px solid #cbd5e1;
}

.ide-button-blanco:hover {
    color: #334155;
    background-color: #e2e6f1;
}


/* Lista de descargas (pestaña descargas familia):
   auto-fit expande 1 item al 100%, 2 al 50%, 3 al 33.33% (máximo 3 columnas) */
.ide-descargas-lista {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(max(300px, 32%), 1fr));
    gap: 10px;
    margin-top: 10px;
}

/* Zona clicable (visualizar) dentro de cada card de descarga */
.ide-descarga-view {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    text-decoration: none !important;
    color: inherit;
    min-width: 0;
    overflow: hidden;
}

/* Icono de documento cuando no hay imagen de previsualización */
.ide-icono-azul {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5679af;
    font-size: 22px;
}

/* Cuadros secciones área privada */
.ide-private-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    margin-top: 20px;
}

.ide-grid-menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.ide-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
}

.ide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ide-card-icon {
    margin-bottom: 5px;
}

.ide-card-title {
    font-weight: bold;
}

/* Fin cuadros secciones área privada */

/* Estilos para la lista de taxomias en forma de cuadros */
.ide-product-grid-wrapper {
    /*width: 100%;
    max-width: 1200px;*/
    margin: 30px 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.ide-application-grid-wrapper {
    /*width: 100%;
    max-width: 1200px;*/
    margin: 30px 0;
    display: grid;
    /* max(200px, calc((100% - 60px) / 4)) asegura un máximo de 4 columnas (el 25% menos el espacio del gap) y un mínimo de 200px por columna */
    grid-template-columns: repeat(auto-fit, minmax(max(200px, calc((100% - 60px) / 4)), 1fr));
    gap: 20px;
}


/* Error Box */
#ide-ajax-error {
    display: none;
    background-color: #fce4e4;
    border: 1px solid #fcc2c3;
    color: #cc0033;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.ide-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Modal Help Styles */
.ide-help-btn {
    display: inline-block;
    background: #5c9aeb;
    color: #fff;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    font-weight: bold;
    cursor: pointer;

    /* Positioning */
    position: absolute;
    right: 35px;
    /* desplazado para no solaparse con el toggle de contraseña */
    top: 14px;
    z-index: 20;
}

.ide-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    /* High z-index to cover everything */
    display: flex;
    justify-content: center;
    align-items: center;
}

.ide-modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    width: 90%;
    max-width: 700px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: ide-fadein 0.3s;
}

@keyframes ide-fadein {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ide-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.ide-modal-close:hover,
.ide-modal-close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.ide-modal-content img {
    max-width: 100%;
    height: auto;
    margin-top: 15px;
    border: 1px solid #ddd;
}

.ide-modal-content h4 {
    margin-top: 0;
    color: #333;
}

/* Alerts */
.ide-alert {
    padding: 15px;
    margin-bottom: 20px;
    margin-top: 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    text-align: center;
}

.ide-alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}

.ide-alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffc107;
}

.ide-alert-warning .ide-btn-sugerencia {
    margin-top: 4px;
}

.ide-alert-error {
    color: #cc0033;
    background-color: #fce4e4;
    border-color: #fcc2c3;
}

/* Password Toggle Logic */
.ide-password-toggle {
    position: absolute;
    right: 12px;
    top: 18px;
    cursor: pointer;
    color: #5c9aeb;
    z-index: 10;
    transition: color 0.2s;
}

.ide-password-toggle:hover {
    color: #1b8adb;
}

/* Adjust input padding so text doesn't overlap icon */
.ide-form-group input[type="password"],
.ide-form-group input[type="text"] {
    padding-right: 40px !important;
}


/* Highlight Animation for Dashboard Cards */
@keyframes ide-glow {
    0% {
        box-shadow: 0 0 5px rgba(46, 163, 242, 0.2);
        border-color: #2ea3f2;
    }

    50% {
        box-shadow: 0 0 15px rgba(46, 163, 242, 0.5);
        border-color: #1b8adb;
    }

    100% {
        box-shadow: 0 0 5px rgba(46, 163, 242, 0.2);
        border-color: #2ea3f2;
    }
}

.ide-card-resaltar {
    animation: ide-glow 2s infinite ease-in-out;
    position: relative;
    z-index: 1;
}

/* TZS: Estilos para inputs de filtros en tablas */
.ide-input-filtro {
    padding: 4px 6px !important;
    height: 28px !important;
    min-height: 28px !important;
    /* Forzar en WP admin */
    line-height: 1.2 !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
}

.ide-input-filtro::placeholder {
    color: #999;
}

/* Estilos personalizados para la tabla de documentos */
.ide-list-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border: 1px solid #dcebf9;
    border-radius: 8px;
    /* Esquinas redondeadas tabla */
    overflow: hidden;
    /* Recortar contenido esquinas */
    margin-bottom: 20px;
}

.ide-list-table thead th {
    background-color: #e5f1fb;
    /* Azul muy clarito para encabezados */
    color: #333;
    border-bottom: 2px solid #5c9aeb;
    border-right: 1px solid #dcebf9;
    padding: 8px 12px;
}

.ide-list-table thead th:last-child {
    border-right: none;
}

.ide-list-table tr.filter-row {
    background-color: #f0f7fd !important;
    /* Fondo para fila de filtros */
}

.ide-list-table tr.filter-row td {
    border-bottom: 2px solid #5c9aeb;
    border-right: 1px solid #dcebf9;
    padding: 8px 12px;
    /* Menos espacio vertical */
}

.ide-list-table tr.filter-row td:last-child {
    border-right: none;
}

/* Zebra striping personalizado para el cuerpo */
.ide-list-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.ide-list-table tbody tr:nth-child(even) {
    background-color: #f4f9fc;
    /* Azul grisaceo muy tenue */
}

.ide-list-table tbody td {
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    padding: 8px 12px;
}

.ide-list-table tbody td:last-child {
    border-right: none;
}

/* Hover effect */
.ide-list-table tbody tr:hover {
    background-color: #eaf4fc;
}

/* Fix para ultima fila y bordes redondeados si fuera necesario, 
   pero overflow:hidden en table suele bastar */
.ide-list-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges para tipos de documento — clase base + variantes de color */
.ide-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
    display: inline-block;
}

.ide-badge-naranja {
    background-color: #ffcc80;
    /* Naranja pastel */
    color: #e65100;
    /* Naranja oscuro */
}

.ide-badge-verde {
    background-color: #a5d6a7;
    /* Verde pastel */
    color: #1b5e20;
    /* Verde oscuro */
}

.ide-badge-azul {
    background-color: #90caf9;
    /* Azul pastel */
    color: #0d47a1;
    /* Azul oscuro */
}

.ide-badge-gris {
    background-color: #e0e0e0;
    /* Gris pastel */
    color: #616161;
    /* Gris oscuro */
}

.ide-badge-rojo {
    background-color: #ff9e9e;
    /* Rojo pastel */
    color: #c62828;
    /* Rojo oscuro */
}

/* Padding */
.ide-padding-lados-10 {
    padding-left: 10px;
    padding-right: 10px;
}

.ide-padding-lados-20 {
    padding-left: 20px;
    padding-right: 20px;
}

.ide-padding-alto-10 {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* ============================================================
   SECCIÓN STOCK Y PVP
   ============================================================ */

/* --- Layout dos columnas --- */
.wrap-stock-pvp {
    width: 100%;
}

.ide-stock-pvp-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.ide-stock-pvp-col-form {
    flex: 2 1 0;
    min-width: 0;
}

.ide-stock-pvp-col-form:last-child {
    flex: 3 1 0;
}


@media (max-width: 768px) {
    .ide-stock-pvp-layout {
        flex-direction: column;
    }

    .ide-stock-pvp-col-form {
        flex: none;
        width: 100%;
    }

    /* Ocultar la tabla de la ficha de artículo en móvil */
    .ide-ficha-tabla {
        display: none;
    }
}

/* --- Caja del formulario --- */
.ide-stock-pvp-form-wrap {
    background: #fff;
    border: 1px solid #dcebf9;
    border-radius: 8px;
    padding: 22px 20px;
}

/* --- Grupos de campo (sin floating label) --- */
/*.ide-stock-pvp-field-group {
    margin-bottom: 20px;
}
*/
/*
.ide-stock-pvp-field-group label {
    display: block;
    position: static;
    font-size: 12px;
    color: #5c9aeb;
    margin-bottom: 5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
    */

/* Select2 */
.ide-selector .select2-container {
    width: 100% !important;
}

.ide-selector .select2-selection--single {
    height: 40px !important;
    border-color: #5c9aeb !important;
    border-radius: 4px !important;
}

.ide-selector .select2-selection__rendered {
    line-height: 40px !important;
    padding-left: 10px !important;
    font-size: 13px !important;
}

/* Tamaño de letra para los resultados del desplegable de Select2 */
.select2-container--default .select2-results__option {
    font-size: 13px !important;
}

.ide-selector .select2-selection__arrow {
    height: 40px !important;
}

.ide-selector .select2-selection--single {
    padding-right: 10px;
}

.ide-stock-pvp-hint {
    color: #aaa;
    margin-top: 5px;
    margin-bottom: 0;
}

/* Input cantidad */
.ide-stock-pvp-cantidad input[type="number"] {
    width: 140px !important;
    padding: 8px 10px !important;
    border: 1px solid #5c9aeb !important;
    border-radius: 4px !important;
}

.ide-stock-pvp-qty-info {
    color: #888;
    margin-top: 5px;
    margin-bottom: 0;
}

/* Botón */
.ide-stock-pvp-btn-wrap {
    margin-top: 6px;
}

/* Items de Select2 en el dropdown */
.ide-select2-ref {
    color: #003f8f;
}

.ide-select2-sep {
    color: #bbb;
}

.ide-select2-name {
    color: #444;
}

/* ============================================================
   FICHA DE ARTÍCULO (se muestra al seleccionar en el desplegable)
   ============================================================ */
.ide-ficha-articulo {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #f4f9fc;
    border: 1px solid #dcebf9;
    border-radius: 8px;
    padding: 14px;
    position: relative;
    z-index: 20;
}

.ide-ficha-imagen {
    flex: 0 0 80px;
    position: relative;
    z-index: 50;
}

.ide-ficha-img-wrap {
    position: relative;
    display: inline-block;
}

.ide-ficha-zoom-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: zoom-in;
    display: block;
    line-height: 0;
}

.ide-ficha-imagen img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 1px solid #e0eaf5;
    border-radius: 6px;
    background: #fff;
    padding: 4px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ide-ficha-zoom-btn:hover img.ide-ficha-thumb {
    border-color: #005fa3;
    box-shadow: 0 3px 10px rgba(0, 95, 163, 0.2);
    transform: scale(1.03);
}

.ide-ficha-popover {
    position: fixed;
    z-index: 999999;
    width: 340px;
    max-width: calc(100vw - 30px);
    background: #ffffff;
    border: 1px solid #c9def5;
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
    padding: 8px;
    box-sizing: border-box;
}

.ide-ficha-popover-close {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.08);
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    line-height: 20px;
    font-size: 16px;
    color: #444;
    cursor: pointer;
    text-align: center;
    padding: 0;
    transition: background 0.15s, color 0.15s;
    z-index: 2;
}

.ide-ficha-popover-close:hover {
    background: #e02424;
    color: #fff;
}

.ide-ficha-img-large {
    width: 100% !important;
    height: auto !important;
    max-height: 340px !important;
    object-fit: contain;
    display: block;
    border-radius: 4px;
    background: #ffffff;
    border: none !important;
    padding: 0 !important;
}

.ide-ficha-datos {
    flex: 1 1 0;
    min-width: 0;
}

.ide-ficha-tabla {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.ide-ficha-tabla th {
    font-weight: 600;
    color: #5c9aeb;
    text-align: left;
    padding: 2px 10px 2px 0;
    white-space: nowrap;
    width: 1%;
}

.ide-ficha-tabla td {
    color: #333;
    padding: 2px 0;
}

.ide-ficha-enlaces {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ide-ficha-enlaces a {
    color: #5c9aeb;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ide-ficha-enlaces a:hover {
    text-decoration: underline;
    color: #003f8f;
}

.ide-ficha-sep {
    color: #ccc;
}

/* ============================================================
   SEMÁFOROS — círculos sólidos CSS
   ============================================================ */
.ide-semaforo {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 8px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.ide-semaforo-rojo {
    background-color: #e02020;
}

/* Sin stock */
.ide-semaforo-naranja {
    background-color: #e67e22;
}

/* Insuficiente */
.ide-semaforo-verde {
    background-color: #27ae60;
}

/* Disponible */

.ide-semaforo-texto {
    vertical-align: middle;
}

/* ============================================================
   RESULTADO
   ============================================================ */

/* Placeholder columna derecha */
.ide-stock-pvp-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    color: #bbb;
    text-align: center;
    border: 2px dashed #dcebf9;
    border-radius: 8px;
    padding: 30px 20px;
}

.ide-stock-pvp-placeholder .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    margin-bottom: 12px;
    color: #ccc;
}

.ide-stock-pvp-placeholder p {
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

/* Cabecera artículo */
.ide-stock-pvp-articulo-header {
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #dcebf9;
    margin-bottom: 0;
}

/* Tabla de disponibilidad */
.ide-stock-pvp-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    /* border y border-radius se gestionan en el div contenedor (#L30 del partial)
       para que overflow:hidden no cancele el position:sticky del thead */
    margin-top: 0;
    margin-bottom: 0;
}

.ide-stock-pvp-table thead th {
    background-color: #e5f1fb;
    color: #333;
    border-bottom: 2px solid #5c9aeb;
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    /*text-transform: uppercase;
    letter-spacing: 0.04em;*/
}

.ide-stock-pvp-table tbody td {
    padding: 5px 4px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    font-size: 12px;
}

.ide-stock-pvp-table tbody tr:last-child td {
    border-bottom: none;
}

.ide-stock-pvp-table tbody tr:nth-child(even) {
    background-color: #f4f9fc;
}

.ide-stock-pvp-consultar {
    font-style: italic;
    color: #777;
}

/* Caja PVP */
.ide-stock-pvp-pvp-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #e5f1fb;
    border: 1px solid #5c9aeb;
    border-radius: 8px;
    padding: 12px 20px;
    margin-top: 4px;
    width: fit-content;
}

.ide-stock-pvp-pvp-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5c9aeb;
}

.ide-stock-pvp-pvp-valor {
    font-weight: 700;
    color: #003f8f;
}

/* ============================================================
   ESTILOS PERSONALIZADOS: Formato pagina_rectangulos (ide-application-grid-wrapper)
   ============================================================ */
.ide-application-grid-wrapper .sector-card .sector-content {
    position: absolute !important;
    top: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    right: 0 !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
    transform: none !important;
    transition: none !important;
}

/* Cancelamos el desplazamiento original hacia arriba del bloque de contenido al hacer hover */
.ide-application-grid-wrapper .sector-card:hover .sector-content {
    transform: none !important;
}

/* Empujamos la línea y el enlace a la parte inferior */
.ide-application-grid-wrapper .sector-card .sector-line {
    margin-top: auto !important;
}

/* Ocultamos la línea y el enlace por defecto con una transición suave */
.ide-application-grid-wrapper .sector-card .sector-line,
.ide-application-grid-wrapper .sector-card .sector-link {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(10px) !important;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease !important;
}

/* Los mostramos en hover */
.ide-application-grid-wrapper .sector-card:hover .sector-line,
.ide-application-grid-wrapper .sector-card:hover .sector-link {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* ============================================================
   FIN ESTILOS PERSONALIZADOS: Formato pagina_rectangulos (ide-application-grid-wrapper)
   ============================================================ */

/* Estilos para celdas de la tabla de variantes (layout_articulos.class.php) */
.article-table-wrapper table.article-table tbody tr td {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    padding-left: 16px !important;
    vertical-align: middle;
}

/* Estilos para celdas de la tabla de accesorios (layout_articulos.class.php) */
.accesories-table-wrapper {
    overflow-x: auto;
}

.accesories-table-wrapper table.article-table tbody tr td,
.accesories-table-wrapper table.accesories-table tbody tr td {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    padding-left: 16px !important;
    vertical-align: middle;
}

/* ============================================================
/* Encabezados de grupo desplegables en tablas de variantes y accesorios */
.article-table tr.group-header-collapsible {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.article-table tr.group-header-collapsible th {
    background-color: #f1f5f9;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    padding: 10px 16px;
    border-top: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.article-table tr.group-header-collapsible:hover th {
    background-color: #e2e8f0;
    color: #0f172a;
}

.article-table tr.group-header-collapsible:focus-visible th {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
}

.article-table tr.group-header-collapsible .group-header-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    vertical-align: middle;
}

.article-table tr.group-header-collapsible .group-toggle-arrow {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: #64748b;
    transition: transform 0.2s ease, color 0.2s ease;
    transform: rotate(0deg);
}

.article-table tr.group-header-collapsible:hover .group-toggle-arrow {
    color: #0f172a;
}

.article-table tr.group-header-collapsible.is-expanded .group-toggle-arrow {
    transform: rotate(90deg);
    color: #0f172a;
}

.article-table tr.group-header-collapsible .group-header-title {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.article-table tr.group-header-collapsible .group-header-count {
    font-size: 0.85em;
    font-weight: 500;
    color: #64748b;
    margin-left: 4px;
}

#table-downloads {
    scroll-margin-top: 120px;
}

/* Visibilidad responsive de la tabla de descargas */
#table-downloads .downloads-mobile-row {
    display: none;
}

#table-downloads .downloads-desktop-row {
    display: table-row;
}

/* Secciones desplegables en la tabla de descargas (vista escritorio) */
#table-downloads tr.tech-section-collapsible {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

#table-downloads tr.tech-section-collapsible th {
    transition: background-color 0.2s ease, color 0.2s ease;
}

#table-downloads tr.tech-section-collapsible:focus-visible th {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
}

#table-downloads tr.tech-section-collapsible .tech-section-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    vertical-align: middle;
}

#table-downloads tr.tech-section-collapsible .tech-toggle-arrow {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
    transform: rotate(0deg);
    /* Cerrado por defecto */
}

#table-downloads tr.tech-section-collapsible.is-expanded .tech-toggle-arrow {
    transform: rotate(90deg);
    /* Abierto */
}

@media (max-width: 768px) {
    #table-downloads .downloads-desktop-row {
        display: none !important;
    }

    #table-downloads .downloads-mobile-row {
        display: table-row !important;
    }

    #table-downloads tr.tech-section-collapsible {
        cursor: default;
        pointer-events: none;
    }

    #table-downloads tr.tech-section-collapsible .tech-toggle-arrow {
        display: none;
    }
}

/* ============================================================
   ESTILOS: Barra de aisos para poner en header
   ============================================================ */
.ide-barra-aviso {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border: 1px solid #ffb74d;
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.ide-barra-aviso-icon {
    font-size: 1.4em;
    flex-shrink: 0;
}

.ide-barra-aviso-text {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.ide-barra-aviso-btn {
    flex-shrink: 0;
    background-color: #ef6c00 !important;
    color: #fff !important;
    border-color: #e65100 !important;
    border-radius: 4px !important;
    cursor: pointer;
    transition: background-color 0.2s;
}

.ide-barra-aviso-btn:hover {
    background-color: #e65100 !important;
}

.ide-barra-aviso-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================================
   ESTILOS: Emular Usuario - Sección / Vista
   ============================================================ */

.ide-emular-info-actual {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.ide-selector-2 {
    margin-top: 10px;
}

.ide-selector-2 label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Mensajes de feedback */
#ide-emular-mensaje {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
}

#ide-emular-mensaje.ide-msg-success {
    background-color: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
}

#ide-emular-mensaje.ide-msg-error {
    background-color: #fce4e4;
    border: 1px solid #fcc2c3;
    color: #cc0033;
}

/* Responsive */
@media (max-width: 600px) {
    .ide-barra-aviso {
        flex-direction: column;
        align-items: flex-start;
    }

    .ide-emular-info-actual {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================
   SECCIÓN PUNTOS DE VENTA
   ============================================================ */
.ide-pv-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.ide-pv-col-left {
    flex: 1 1 70%;
}

.ide-pv-col-right {
    flex: 1 1 20%;
    min-width: 300px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    align-self: flex-start;
}

.ide-pv-col-right h4 {
    font-size: 1.1em;
    margin-top: 0;
}

.ide-pv-col-right input,
.ide-pv-col-right button {
    font-size: 0.9em !important;
}

.ide-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
}

.ide-pending-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ide-card-pv {
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 15px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease-in-out;
}

.ide-card-validated:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.ide-pv-pending {
    background: #fff;
    border: 1px dashed #c3c4c7;
    padding: 10px;
}

.ide-pv-pending h5 {
    font-size: 0.9em !important;
}

.ide-pv-pending .ide-card-pv-body p {
    font-size: 0.8em;
    margin: 2px 0;
}

.ide-card-pv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.ide-card-pv-header h5 {
    margin: 0;
    font-size: 1em;
    color: #1d2327;
    word-break: break-word;
}

.ide-pv-code {
    background: #f0f0f1;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    color: #646970;
    white-space: nowrap;
}

.ide-pv-code-validated {
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    color: #0073aa;
    background: transparent;
    padding: 0;
    white-space: nowrap;
    align-self: center;
}

.ide-card-pv-body p {
    margin: 3px 0;
    font-size: 0.9em;
    color: #50575e;
}

.ide-btn:hover {
    opacity: 0.9;
}

/* ============================================================
   NUEVO PEDIDO DE VENTA
   ============================================================ */

/* Paso 1: Selección de punto de venta */
#ide_step1_pv_pedido .ide-card-validated {
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

#ide_step1_pv_pedido .ide-card-validated:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 10px rgba(0, 115, 170, 0.15);
}

/* Paso 3: Formulario cabecera */
.ide-np-field-group {
    position: relative;
    margin-bottom: 18px;
}

.ide-np-field-group label {
    display: block !important;
    position: static !important;
    font-size: 0.9em !important;
    color: #334155 !important;
    font-weight: 600 !important;
    margin-bottom: 6px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.ide-np-field-group input[type="text"],
.ide-np-field-group select,
.ide-np-field-group textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.95em;
    border-radius: 4px;
    outline: none;
}

/* Tabla de líneas de pedido */
.ide-np-table th {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ide-np-table tr:hover {
    background-color: #f8fafc;
}

.ide-np-input-cant-linea:focus {
    border-color: #0073aa !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.ide-np-totales-box {
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .wrap-nuevo-pedido .ide-stock-pvp-layout {
        flex-direction: column !important;
    }

    .wrap-nuevo-pedido .ide-stock-pvp-col-form {
        width: 100% !important;
        min-width: 100% !important;
    }
}