/* ================================================================
   PICKING.css — MÓDULO DE PICKING v2.1
   Layout: Fila Superior (Formulario + Grilla) | Fila Inferior (Detalle Horizontal)
   Protocolo SOLVIX EGL — Tech Elite Design System — 19-04-2026
   ================================================================ */

/* --- CONTENEDOR PRINCIPAL --- */
#picking-content {
    background: transparent;
    color: var(--solvix-silver);
    min-height: calc(100vh - 80px);
    width: 100%;
    position: relative;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* --- HEADER DEL MÓDULO --- */
.picking-module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 28px;
    background: var(--theme-panel-header-bg);
    border-bottom: 2px solid var(--solvix-metal-border);
    box-shadow: var(--solvix-metal-shadow);
    flex-shrink: 0;
}

.picking-module-header .module-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: var(--solvix-header-text, #020c1b);
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.picking-module-header .module-title img {
    height: 48px;
    width: auto;
   
}

.picking-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.picking-header-kpi {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.15);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--solvix-header-text, #020c1b);
}

.picking-header-kpi .kpi-number {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--solvix-header-text, #020c1b);
}

/* --- FILA SUPERIOR: 2 COLUMNAS (Formulario + Grilla) --- */
.picking-top-row {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 16px;
    padding: 16px 20px 8px 20px;
    flex-shrink: 0;
}

/* --- PANELES GLASSMORPHISM --- */
.pk-panel {
    background: var(--solvix-glass);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    transition: border-color 0.3s ease;
}

.pk-panel:hover {
    border-color: rgba(0, 242, 255, 0.12);
}

.pk-panel-form {
    max-height: 52vh;
    overflow-y: auto;
}

.pk-panel-grid {
    max-height: 52vh;
}

.pk-panel-header {
    background: var(--theme-panel-header-bg);
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--solvix-header-text, #020c1b);
    border-bottom: 1px solid var(--solvix-metal-border);
    flex-shrink: 0;
}

.panel-icon {
    margin-right: 6px;
    font-size: 1rem;
}

.pk-panel-body {
    padding: 14px 16px;
    overflow-y: auto;
    flex: 1;
}

.pk-panel-footer {
    padding: 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

/* --- FORMULARIO --- */
.pk-form-group {
    margin-bottom: 10px;
}

.pk-form-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--solvix-silver-dark, #94a3b8);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.pk-input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--solvix-silver, #e2e8f0);
    font-size: 0.82rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.pk-input:focus {
    outline: none;
    border-color: var(--solvix-cyan, #00f2ff);
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.15);
}

.pk-input[readonly] {
    opacity: 0.7;
    background: rgba(0, 0, 0, 0.2);
}

.pk-stock-badge {
    font-weight: 800;
    text-align: center;
    color: var(--solvix-cyan, #00f2ff) !important;
}

.pk-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

/* Buscador de inventario */
.pk-search-row {
    display: flex;
    gap: 6px;
}

.pk-search-row .pk-input {
    flex: 1;
}

.pk-btn-search {
    width: 40px;
    height: 36px;
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.2), rgba(0, 242, 255, 0.08));
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 8px;
    color: var(--solvix-cyan, #00f2ff);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pk-btn-search:hover {
    background: rgba(0, 242, 255, 0.3);
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.25);
}

/* Resultados de búsqueda */
.pk-search-results {
    max-height: 140px;
    overflow-y: auto;
    margin-bottom: 10px;
    border: 1px solid rgba(0, 242, 255, 0.15);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
}

.pk-search-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
    font-size: 0.78rem;
}

.pk-search-item:hover {
    background: rgba(0, 242, 255, 0.1);
}

.pk-search-item .search-sku {
    font-weight: 800;
    color: var(--solvix-cyan, #00f2ff);
    margin-right: 8px;
}

.pk-search-item .search-desc {
    color: var(--solvix-silver, #e2e8f0);
}

.pk-search-item .search-stock {
    float: right;
    font-weight: 700;
    color: #10b981;
    font-size: 0.72rem;
}

.pk-search-item .search-location {
    display: block;
    color: var(--solvix-silver-dark, #94a3b8);
    font-size: 0.7rem;
    margin-top: 2px;
}

/* Prioridad */
.pk-priority-selector {
    display: flex;
    gap: 6px;
}

.pk-priority-btn {
    flex: 1;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--solvix-silver-dark, #94a3b8);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.pk-priority-btn:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.pk-priority-btn.selected {
    border-color: var(--solvix-cyan, #00f2ff);
    background: rgba(0, 242, 255, 0.1);
    color: var(--solvix-silver, #e2e8f0);
}

.pk-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin: 10px 0;
}

/* Botones */
.pk-btn-primary {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.25), rgba(0, 200, 255, 0.1));
    border: 1px solid rgba(0, 242, 255, 0.4);
    border-radius: 10px;
    color: var(--solvix-cyan, #00f2ff);
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.pk-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.4), rgba(0, 200, 255, 0.2));
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.pk-btn-primary:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Filtros Gráfico */
.pk-filter-btn {
    width: 100%;
    text-align: left;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--solvix-silver-dark, #94a3b8);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.pk-filter-btn:hover {
    background: rgba(0, 242, 255, 0.1);
    color: var(--solvix-glass, #00f2ff);
    border-color: rgba(0, 242, 255, 0.3);
}

.pk-filter-btn.active {
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.2), rgba(0, 200, 255, 0.05));
    border-color: var(--solvix-glass, #00f2ff);
    color: var(--solvix-glass, #00f2ff);
    font-weight: 800;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.15);
}

.pk-btn-secondary {
    width: 100%;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--solvix-silver-dark, #94a3b8);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    margin-bottom: 8px;
}

.pk-btn-secondary:hover {
    border-color: var(--solvix-cyan, #00f2ff);
    color: var(--solvix-cyan, #00f2ff);
    background: rgba(0, 242, 255, 0.06);
}

.pk-btn-success {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.12));
    border: 1px solid rgba(16, 185, 129, 0.5);
    border-radius: 10px;
    color: #10b981;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.pk-btn-success:hover:not(:disabled) {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
}

.pk-btn-success:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Items temporales */
.pk-temp-items-list {
    max-height: 120px;
    overflow-y: auto;
}

.pk-temp-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 4px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.pk-temp-item .item-info {
    flex: 1;
    min-width: 0;
}

.pk-temp-item .item-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--solvix-silver, #e2e8f0);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pk-temp-item .item-meta {
    font-size: 0.65rem;
    color: var(--solvix-silver-dark, #94a3b8);
}

.pk-temp-item .item-qty {
    font-weight: 900;
    font-size: 0.85rem;
    color: var(--solvix-cyan, #00f2ff);
    min-width: 24px;
    text-align: center;
}

.pk-btn-remove {
    width: 22px;
    height: 22px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 50%;
    color: #ef4444;
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pk-btn-remove:hover {
    background: rgba(239, 68, 68, 0.4);
}

/* --- KPI STRIP --- */
.pk-kpi-strip {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.pk-kpi-card {
    flex: 1;
    text-align: center;
    padding: 6px 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.pk-kpi-card .kpi-value {
    font-size: 1.2rem;
    font-weight: 900;
}

.pk-kpi-card .kpi-value.cyan { color: var(--solvix-cyan, #00f2ff); }
.pk-kpi-card .kpi-value.amber { color: #f59e0b; }
.pk-kpi-card .kpi-value.red { color: #ef4444; }
.pk-kpi-card .kpi-value.green { color: #10b981; }

.pk-kpi-card .kpi-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--solvix-silver-dark, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* --- GRILLA DE ÓRDENES 4x4 --- */
.pk-orders-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 12px 16px;
    overflow-y: auto;
    flex: 1;
}

.pk-grid-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--solvix-silver-dark, #94a3b8);
}

.pk-grid-empty .empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.pk-grid-empty h3 {
    margin: 0 0 6px 0;
    font-size: 0.95rem;
    color: var(--solvix-silver, #e2e8f0);
}

.pk-grid-empty p {
    margin: 0;
    font-size: 0.78rem;
}

/* --- TARJETAS DE ORDEN --- */
.pk-order-card {
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(0, 242, 255, 0.12);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 80px;
    position: relative;
    overflow: hidden;
}

.pk-order-card:hover {
    border-color: var(--solvix-cyan, #00f2ff);
    box-shadow: 0 4px 20px rgba(0, 242, 255, 0.15);
    transform: translateY(-2px);
}

.pk-order-card.status-working {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.06);
    animation: pk-pulseWorking 2s infinite alternate;
}

.pk-order-card.status-completed {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.08);
}

.pk-order-card.priority-alta {
    border-left: 3px solid #ef4444;
}

.card-order-id {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 0.72rem;
    color: var(--solvix-silver, #e2e8f0);
}

.card-description {
    font-size: 0.7rem;
    color: var(--solvix-silver-dark, #94a3b8);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.65rem;
    margin-top: auto;
}

.card-items-count {
    font-weight: 700;
    color: var(--solvix-cyan, #00f2ff);
}

.card-priority-badge {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.6rem;
    font-weight: 900;
    width: 80px;
    text-align: center;
    padding: 3px 0;
    border-bottom-left-radius: 10px;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-alta { background-color: #ef4444; color: #000 !important; }
.badge-normal { background-color: #3b82f6; color: #000 !important; }
.badge-baja { background-color: #94a3b8; color: #000 !important; }

.card-status-badge {
    font-size: 0.6rem;
    font-weight: 800;
}

.badge-working { color: #f59e0b; }
.badge-completed { color: #10b981; }

.card-location {
    color: var(--solvix-silver-dark, #94a3b8);
    font-size: 0.6rem;
}

/* ================================================================
   PANEL DE DETALLE HORIZONTAL (FILA INFERIOR)
   ================================================================ */
.pk-panel-detail-horizontal {
    margin: 8px 20px 16px 20px;
    min-height: 220px;
    max-height: 38vh;
}

/* Estado vacío horizontal */
.pk-detail-empty-horizontal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    color: var(--solvix-silver-dark, #94a3b8);
    flex: 1;
}

.pk-detail-empty-horizontal .empty-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.4;
}

.pk-detail-empty-horizontal h3 {
    margin: 0 0 6px 0;
    font-size: 0.9rem;
    color: var(--solvix-silver, #e2e8f0);
}

.pk-detail-empty-horizontal p {
    margin: 0;
    font-size: 0.75rem;
}

/* Orden activa layout horizontal */
.pk-active-order-horizontal {
    display: none;
    flex-direction: row;
    flex: 1;
    overflow: hidden;
}

.pk-active-order-horizontal.visible {
    display: flex;
}

.pk-detail-summary-col {
    width: 240px;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
}

.pk-order-summary-h .order-id-display {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--solvix-cyan, #00f2ff);
    margin-bottom: 8px;
}

.pk-order-summary-h .order-meta-row {
    font-size: 0.75rem;
    color: var(--solvix-silver-dark, #94a3b8);
    margin-bottom: 4px;
}

.pk-order-summary-h .order-meta-row strong {
    color: var(--solvix-silver, #e2e8f0);
}

.pk-action-footer-h {
    margin-top: auto;
}

/* Columna items derecha */
.pk-detail-items-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header de tabla horizontal */
.pk-items-table-header {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--solvix-silver-dark, #94a3b8);
    flex-shrink: 0;
}

/* Items lista horizontal */
.pk-items-list-h {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.pk-item-row-h {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.15s;
    font-size: 0.78rem;
}

.pk-item-row-h:hover {
    background: rgba(0, 242, 255, 0.04);
}

.pk-item-row-h.item-done {
    opacity: 0.5;
    background: rgba(16, 185, 129, 0.06);
}

.pk-item-row-h .item-check-h {
    flex: 0 0 40px;
    text-align: center;
    width: 26px;
    height: 26px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    color: #10b981;
    margin: 0 auto;
}

.pk-item-row-h .item-check-h:hover {
    border-color: var(--solvix-cyan, #00f2ff);
    background: rgba(0, 242, 255, 0.08);
}

.pk-item-row-h.item-done .item-check-h {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.15);
}

.pk-item-row-h .item-desc-h { flex: 2; font-weight: 600; color: var(--solvix-silver); }
.pk-item-row-h .item-sku-h { flex: 1; color: var(--solvix-silver-dark); font-size: 0.72rem; }
.pk-item-row-h .item-loc-h { flex: 1; color: var(--solvix-cyan, #00f2ff); font-size: 0.72rem; font-weight: 700; }
.pk-item-row-h .item-qty-h {
    flex: 0 0 60px;
    text-align: center;
    font-weight: 900;
    font-size: 0.9rem;
    color: var(--solvix-cyan, #00f2ff);
}

/* Barra de progreso */
.pk-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.pk-progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--solvix-cyan, #00f2ff), #10b981);
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* ================================================================
   ANIMACIONES
   ================================================================ */
@keyframes pk-pulseWorking {
    from { box-shadow: 0 0 5px rgba(245, 158, 11, 0.15); }
    to { box-shadow: 0 0 18px rgba(245, 158, 11, 0.3); }
}

@keyframes pk-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pk-slideToast {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-dot {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

.pk-card-animate {
    animation: pk-fadeIn 0.3s ease both;
}

.pk-animate-in {
    animation: pk-fadeIn 0.25s ease both;
}

/* Stagger para grilla */
.pk-order-card:nth-child(1) { animation-delay: 0.02s; }
.pk-order-card:nth-child(2) { animation-delay: 0.04s; }
.pk-order-card:nth-child(3) { animation-delay: 0.06s; }
.pk-order-card:nth-child(4) { animation-delay: 0.08s; }
.pk-order-card:nth-child(5) { animation-delay: 0.10s; }
.pk-order-card:nth-child(6) { animation-delay: 0.12s; }
.pk-order-card:nth-child(7) { animation-delay: 0.14s; }
.pk-order-card:nth-child(8) { animation-delay: 0.16s; }

/* Toast */
.pk-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 12px 20px;
    background: rgba(2, 12, 27, 0.92);
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 10px;
    color: var(--solvix-silver, #e2e8f0);
    font-size: 0.82rem;
    font-weight: 600;
    z-index: 9999;
    animation: pk-slideToast 0.4s ease;
    backdrop-filter: blur(15px);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
    .picking-top-row {
        grid-template-columns: 300px 1fr;
    }
    .pk-orders-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .pk-detail-summary-col {
        width: 200px;
        min-width: 200px;
    }
}

@media (max-width: 900px) {
    .picking-top-row {
        grid-template-columns: 1fr;
    }
    .pk-panel-form {
        max-height: none;
    }
    .pk-panel-grid {
        max-height: 45vh;
    }
    .pk-orders-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pk-active-order-horizontal {
        flex-direction: column;
    }
    .pk-detail-summary-col {
        width: 100%;
        min-width: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        flex-direction: row;
        gap: 16px;
    }
    .pk-panel-detail-horizontal {
        margin: 8px 12px 16px 12px;
        max-height: none;
    }
}

@media (max-width: 600px) {
    .pk-orders-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    .pk-items-table-header {
        display: none;
    }
    .pk-item-row-h {
        flex-wrap: wrap;
    }
}

/* ── MINI GEMELO DIGITAL PARA PICKING ── */
.pk-mini-rack-grid {
    display: grid;
    margin: 5px auto;
    padding: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pk-mini-cell {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    aspect-ratio: 1.3 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    position: relative;
}

/* Celda objetivo a recolectar */
.pk-mini-cell.target-pick {
    background: rgba(0, 217, 255, 0.1) !important;
    border: 1px solid var(--solvix-cyan, #00D9FF) !important;
    color: var(--solvix-cyan, #00D9FF) !important;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.4);
    animation: pk-pulse-glow 1.2s infinite ease-in-out;
}

@keyframes pk-pulse-glow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(0, 217, 255, 0.3);
        background: rgba(0, 217, 255, 0.1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 15px rgba(0, 217, 255, 0.7);
        background: rgba(0, 217, 255, 0.2);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(0, 217, 255, 0.3);
        background: rgba(0, 217, 255, 0.1);
    }
}

/* Colores de Picking Gemelo Digital sugerido */
.pk-mini-cell.cell-free {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    color: #10b981 !important;
}

.pk-mini-cell.cell-occupied {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #ef4444 !important;
}

.pk-mini-cell.target-pick {
    background: rgba(245, 158, 11, 0.2) !important;
    border: 1px solid #f59e0b !important;
    color: #f59e0b !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
    animation: pk-pulse-glow-yellow 1.2s infinite ease-in-out !important;
}

@keyframes pk-pulse-glow-yellow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(245, 158, 11, 0.3);
        background: rgba(245, 158, 11, 0.15);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 15px rgba(245, 158, 11, 0.7);
        background: rgba(245, 158, 11, 0.25);
    }
    }


/* =========================================
   GESTOR DE LOTES Y TIPOS DE ORDEN
   ========================================= */

/* Modal Overlays */
.pk-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(2, 12, 27, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pk-modal-content {
    background: #0f172a;
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.pk-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pk-modal-header h3 {
    margin: 0; color: #fff; font-size: 1.1rem;
    display: flex; align-items: center; gap: 10px;
}
.pk-modal-header h3 i { color: var(--solvix-cyan); }

.pk-modal-close {
    background: transparent; border: none; color: #94a3b8;
    font-size: 1.2rem; cursor: pointer; transition: 0.2s;
}
.pk-modal-close:hover { color: #ef4444; }

.pk-modal-tabs {
    display: flex; background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.pk-tab-btn {
    flex: 1; padding: 12px; background: transparent;
    border: none; color: #94a3b8; cursor: pointer;
    font-weight: 600; border-bottom: 2px solid transparent;
    transition: 0.2s;
}
.pk-tab-btn:hover { color: #fff; background: rgba(255,255,255,0.02); }
.pk-tab-btn.active { color: var(--solvix-cyan); border-bottom-color: var(--solvix-cyan); }

.pk-modal-footer {
    padding: 15px 20px; border-top: 1px solid rgba(255,255,255,0.05);
    display: flex; justify-content: flex-end; gap: 10px;
}

/* Elementos de Lista de Batch */
.pk-batch-manager-item {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255,255,255,0.03); padding: 10px 15px;
    border-radius: 8px; margin-bottom: 8px; border: 1px solid transparent;
    transition: 0.2s;
}
.pk-batch-manager-item:hover { background: rgba(255,255,255,0.05); }
.pk-batch-manager-item.selected { border-color: var(--solvix-cyan); background: rgba(0,242,255,0.05); }

/* Tipos de Tarjetas en Grilla */
.pk-order-card.type-batch {
    border-top: 3px solid #8b5cf6; /* Morado para Lotes */
}
.pk-order-card.type-batch .card-order-id span { color: #c4b5fd; font-weight: bold; }

.pk-order-card.type-hybrid {
    border-left: 3px solid #f59e0b; /* Ambar para Híbridas */
}

/* Ítems consolidados en la vista de detalle */
.pk-item-row-h.consolidated-by-batch {
    opacity: 0.5;
    background: rgba(148, 163, 184, 0.1);
    pointer-events: none; /* No se pueden clickear individualmente */
}
.pk-item-row-h.consolidated-by-batch .item-desc-h {
    text-decoration: line-through;
    color: #94a3b8;
}

.pk-btn-massive-receive {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white; border: none; padding: 10px 15px;
    border-radius: 8px; font-weight: 800; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    gap: 8px; width: 100%; margin-top: 10px; box-shadow: 0 4px 15px rgba(16,185,129,0.3);
    transition: 0.3s;
}
.pk-btn-massive-receive:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,185,129,0.4); }