.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-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;
}

/* Input Styles */
.ide-form-group input {
    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;*/
}

/* 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-azul {
    color: white;
    background-color: #003f8f;
}

.ide-button-azul:hover {
    color: #badcf8;
}

.ide-button-rojo {
    color: white;
    background-color: #cc0033;
}



/* Cuadros secciones área privada */
.ide-private-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 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 */


/* 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 */
}

/* 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: 1 1 0;
    min-width: 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;
    /* override del .ide-form-group label */
    font-size: 12px;
    color: #5c9aeb;
    margin-bottom: 5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* Select2 */
.ide-stock-pvp-selector .select2-container {
    width: 100% !important;
}

.ide-stock-pvp-selector .select2-selection--single {
    height: 40px !important;
    border-color: #5c9aeb !important;
    border-radius: 4px !important;
}

.ide-stock-pvp-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-stock-pvp-selector .select2-selection__arrow {
    height: 40px !important;
}

.ide-stock-pvp-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;
}

.ide-ficha-imagen {
    flex: 0 0 80px;
}

.ide-ficha-imagen img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 1px solid #e0eaf5;
    border-radius: 6px;
    background: #fff;
    padding: 4px;
}

.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: 1px solid #dcebf9;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 14px;
    margin-bottom: 16px;
}

.ide-stock-pvp-table thead th {
    background-color: #e5f1fb;
    color: #333;
    border-bottom: 2px solid #5c9aeb;
    padding: 10px 14px;
    text-align: left;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ide-stock-pvp-table tbody td {
    padding: 13px 14px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    font-size: 14px;
}

.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;
}