.dashboard-grid-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

/* Índice rápido del Dashboard IA: fila de pills que se "pega" arriba al
   scrollear, para saltar directo a una sección sin scrollear toda la
   página -- pedido del usuario 2026-09-02. Contenido generado por
   inicializarIndiceRapidoDashboard() en dashboard.js.

   NO se usa position:sticky: #main-content (el <main> real) tiene
   `overflow: hidden auto` -- por spec CSS eso lo convierte en el
   "contenedor de scroll" de cualquier sticky descendiente, aunque en la
   práctica quien scrollea de verdad es la ventana (main-content.scrollTop
   se queda siempre en 0). Con eso, sticky se calcula contra un scroll que
   nunca cambia y el pill queda pegado a su ancestro en vez de al viewport
   -- por eso el pin real se hace a mano con JS (position:fixed +
   left/width leídos de #main-content, recalculados en cada scroll/resize
   para seguir el sidebar colapsable). Ver actualizarPinIndiceRapido. */
.dashboard-quicknav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 4px;
    background: #f8fafc;
}

.dashboard-quicknav:empty {
    padding: 0;
}

.dashboard-quicknav.pinned {
    position: fixed;
    top: 0;
    z-index: 900;
    margin: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.dashboard-quicknav-placeholder {
    display: none;
}

.dashboard-quicknav-placeholder.active {
    display: block;
}

.dashboard-quicknav::-webkit-scrollbar {
    height: 4px;
}

.dashboard-quicknav-item {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 999px;
    background: white;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.dashboard-quicknav-item:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.dashboard-quicknav-item.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.dashboard-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f3f4f6;
}

.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #374151;
}

.btn-details {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-details:hover {
    background: #e5e7eb;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    margin-right: 5px;
}

.btn-icon:hover {
    background: #f3f4f6;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #f3f4f6;
}

.metric-box {
    background: #f9fafb;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.metric-label {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 5px;
}

.metric-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.metric-value-small {
    font-size: 1rem;
    font-weight: 600;
}

.metric-small {
    font-size: 0.75rem;
    color: #6b7280;
}

.progress-container {
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 4px;
    transition: width 0.5s ease-in-out;
}

.card-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f3f4f6;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: #f9fafb;
    border-radius: 8px;
    transition: transform 0.2s;
}

.ranking-item:hover {
    transform: translateX(5px);
    background: #f3f4f6;
}

.ranking-pos {
    width: 30px;
    height: 30px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 15px;
}

.ranking-info {
    flex: 1;
}

.ranking-name {
    font-weight: 600;
    color: #374151;
}

.ranking-value {
    font-size: 0.9rem;
    color: #6b7280;
}

/* COLORS FOR RANKING POSITIONS */
.ranking-item:nth-child(1) .ranking-pos {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.ranking-item:nth-child(2) .ranking-pos {
    background: linear-gradient(135deg, #d1d5db, #9ca3af);
}

.ranking-item:nth-child(3) .ranking-pos {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

/* STOCK CRITICAL ITEMS */
.stock-critical-item {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 4px solid #ef4444;
    background: #fef2f2;
}

.stock-warning-item {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 4px solid #f59e0b;
    background: #fef3c7;
}

/* TRENDS */
.kpi-trend-up {
    font-size: 0.8rem;
    color: #10b981;
    font-weight: 600;
}

.kpi-trend-down {
    font-size: 0.8rem;
    color: #ef4444;
    font-weight: 600;
}

/* ANIMATIONS */
@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

.updating {
    animation: pulse 1.5s infinite;
}

/* RANKING DE PRODUCCIÓN (PIEZAS): corona/caballo animados en la punta de
   cada barra de operaria -- la "carrera" cambia de líder en vivo a medida
   que reportan durante el día, esto es solo el efecto motivacional visual.
   Posición (left/top) la calcula renderChartPulidoRanking en dashboard.js
   a partir de las coordenadas reales del gráfico; aquí solo la animación. */
.pulido-race-icon {
    position: absolute;
    transform: translateY(-50%);
    font-size: 1.05rem;
    line-height: 1;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}

@keyframes pulido-race-crown-glow {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        filter: drop-shadow(0 0 2px rgba(250, 204, 21, 0.9)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
    }
    50% {
        transform: translateY(-50%) scale(1.15);
        filter: drop-shadow(0 0 6px rgba(250, 204, 21, 1)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
    }
}

.pulido-race-icon-crown {
    animation: pulido-race-crown-glow 1.4s ease-in-out infinite;
}

/* scaleX(-1) al final: el emoji 🐎 mira de fábrica hacia la izquierda, así
   que sin espejo el caballo corre en sentido contrario a como crecen las
   barras -- pedido del usuario 2026-09-02. */
@keyframes pulido-race-gallop {
    0%, 100% { transform: translateY(-50%) rotate(-8deg) scaleX(-1); }
    50% { transform: translateY(calc(-50% - 3px)) rotate(8deg) scaleX(-1); }
}

.pulido-race-icon-horse {
    animation: pulido-race-gallop 0.9s ease-in-out infinite;
}

/* MIX DE PRODUCCIÓN: caballito con efecto de calor/efervescencia en la
   punta de cada barra, cuya intensidad (color + velocidad de pulso) varía
   según el puesto en la carrera -- ver posicionarIconosCarreraMix en
   dashboard.js, que calcula --heat-color y animation-duration por fila. */
.pulido-mix-race-icon {
    position: absolute;
    transform: translateY(-50%);
    font-size: 1.1rem;
    line-height: 1;
    animation-name: pulido-mix-heat;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

/* Mismo salto/rebote que pulido-race-gallop (pedido del usuario 2026-09-02:
   quiere ese movimiento en las dos gráficas, no el pulso de escala que
   tenía antes) + scaleX(-1) para correr hacia la meta. El color de calor
   por puesto se conserva vía drop-shadow, con brillo fijo -- la intensidad
   por puesto ya la da la velocidad de la animación (animation-duration,
   calculada en JS), no falta que el glow también pulse. */
@keyframes pulido-mix-heat {
    0%, 100% {
        transform: translateY(-50%) rotate(-8deg) scaleX(-1);
        filter: drop-shadow(0 0 3px var(--heat-color, #f59e0b)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
    }
    50% {
        transform: translateY(calc(-50% - 3px)) rotate(8deg) scaleX(-1);
        filter: drop-shadow(0 0 3px var(--heat-color, #f59e0b)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
    }
}

/* Meta del "hipódromo": bandera + etiqueta en el borde derecho del área de
   dibujo, más allá de donde puede llegar cualquier barra real (ver axisMax
   en renderChartPulidoMixReferencias) -- se ve alcanzable pero nunca se
   toca. Posición (left/top) la calcula posicionarIconosCarreraMix. */
.mix-race-meta {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    font-size: 1.05rem;
    line-height: 1;
    pointer-events: none;
}

.mix-race-meta span {
    font-size: 0.55rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.05em;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .dashboard-grid-charts {
        grid-template-columns: 1fr;
    }

    .dashboard-card[style*="grid-column: span 2"] {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .card-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .dashboard-card[style*="grid-column: span 2"] .card-content>div {
        grid-template-columns: 1fr;
    }

    canvas {
        min-height: 250px !important;
    }
}

/* Tabla de inventario */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.table-container table {
    width: 100%;
    min-width: 600px;
    /* Asegura legibilidad en mÃ³vil */
    border-collapse: collapse;
    font-size: 0.88rem;
}

.table-container thead tr {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.table-container th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

.table-container tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s ease;
}

.table-container tbody tr:hover {
    background-color: #f9fafb;
}

.table-container td {
    padding: 10px 12px;
    vertical-align: middle;
}

/* Columnas numÃ©ricas */
.col-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Badges simples para stock */
.badge-stock {
    display: inline-block;
    min-width: 44px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.75rem;
    text-align: center;
}

.badge-stock-ok {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-stock-low {
    background: #fef3c7;
    color: #92400e;
}

.badge-stock-zero {
    background: #fee2e2;
    color: #b91c1c;
}

.modal-detalle-producto {
    backdrop-filter: none !important;
}

.modal-detalle-producto .modal-content,
.modal-detalle-producto>div {
    opacity: 1 !important;
    filter: none !important;
}

/* =========================================
   MODALES UI/UX (Estilo Ejecutivo Moderno)
   ========================================= */

.modal-content, .modal-body {
    padding: 24px;
    border-radius: 12px;
    max-height: 85vh;
    overflow-y: auto;
}

/* Tablas Modernas dentro de Modales */
.modal-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.modal-body table th,
.modal-body table td {
    border: none !important;
    border-bottom: 1px solid #e9ecef !important;
    padding: 12px 16px !important;
    vertical-align: middle;
}

.modal-body table th {
    background-color: #f8f9fa !important;
    font-weight: 700 !important;
    color: #374151;
    text-align: left;
}

/* Filas alternas sutiles */
.modal-body table tbody tr:nth-child(even),
.modal-body table.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fafafa !important;
}

/* Botón de Cierre perfectamente alineado */
.modal-header .btn-close,
.modal-body .btn-close,
.btn-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1050;
    background-color: white;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.btn-close:hover {
    transform: scale(1.1);
}

/* Ajustes para encabezado de modal (evitar doble padding) */
.modal-header {
    border-bottom: none;
    padding-bottom: 0;
    padding-top: 0;
}



/* =========================================
   AJUSTES RESPONSIVOS Y Z-INDEX (Modales)
   ========================================= */

/* Centrado absoluto y corrección de márgenes */
.modal-dialog {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: calc(100% - 3.5rem);
    margin: 0 auto !important; /* El 'auto' aquí es la clave para centrar horizontalmente */
    max-width: 90% !important;
}

/* Asegurar que el contenido interno no tenga alineaciones raras */
.modal-content {
    margin: auto !important;
}

.modal-body {
    overflow-x: auto;
    padding: 1.5rem !important;
}
.modal-body table {
    min-width: 600px;
}
.modal-backdrop {
    z-index: 1040 !important;
}
.modal {
    z-index: 1050 !important;
}
.sidebar, #sidebar {
    z-index: 1030 !important;
}

/* Vistas del dashboard (pedido 2026-10-21): piso de planta / financiero.
   dashboard.js pone data-vista en #dashboard-page y solo pide y pinta los datos
   de la vista activa; el resto de secciones se oculta aquí. El asistente de
   datos no lleva data-dash-vista: se ve en las dos. */
#dashboard-page[data-vista="planta"] [data-dash-vista="financiero"],
#dashboard-page[data-vista="financiero"] [data-dash-vista="planta"] {
    display: none !important;
}

.dashboard-vistas {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 16px 0;
}

.dashboard-vista-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}

.dashboard-vista-btn > i {
    font-size: 1.3rem;
    color: #94a3b8;
    transition: color 0.15s;
}

.dashboard-vista-texto {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dashboard-vista-texto strong {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
}

.dashboard-vista-texto small {
    font-size: 0.78rem;
    color: #64748b;
}

.dashboard-vista-btn:hover {
    border-color: #93c5fd;
}

.dashboard-vista-btn.active {
    border: 2px solid #2563eb;
    padding: 11px 15px;
    background: #f8fbff;
}

.dashboard-vista-btn.active > i {
    color: #2563eb;
}

@media (max-width: 575px) {
    .dashboard-vistas {
        gap: 8px;
        margin: 10px 10px 0;
    }

    .dashboard-vista-btn {
        gap: 10px;
        padding: 10px 12px;
    }

    .dashboard-vista-btn.active {
        padding: 9px 11px;
    }

    .dashboard-vista-texto small {
        display: none;
    }
}

/* ── Alistamiento (Almacén) en la vista de planta ───────────────────── */
/* Las 4 etapas de la cola se leen como un recorrido: cada tarjeta lleva su color (--kpi),
   su icono y un tinte suave; debajo, una sola barra con el reparto de lo que sigue abierto. */
.dash-alist-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.dash-alist-kpi {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.dash-alist-kpi::before { content: ""; position: absolute; inset: 0; background: var(--kpi, #64748b); opacity: .07; pointer-events: none; }
.dash-alist-kpi::after { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--kpi, #64748b); }
.dash-alist-kpi-ico {
    position: relative;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    color: #fff;
    border-radius: 15px;
    background: var(--kpi, #64748b);
    box-shadow: 0 8px 16px color-mix(in srgb, var(--kpi, #64748b) 38%, transparent);
}
.dash-alist-kpi-cuerpo { position: relative; min-width: 0; }
.dash-alist-kpi-valor { font-size: 2.2rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: #0f172a; font-variant-numeric: tabular-nums; }
.dash-alist-kpi-etiqueta { margin-top: 4px; font-size: .82rem; font-weight: 700; letter-spacing: .02em; color: #475569; }
.dash-alist-kpi-detalle { font-size: .75rem; color: #64748b; }

.dash-alist-embudo { grid-column: 1 / -1; padding: 2px 2px 0; }
.dash-alist-embudo-cab { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #64748b; }
.dash-alist-embudo-cab b { font-size: .85rem; letter-spacing: 0; text-transform: none; color: #0f172a; }
.dash-alist-embudo-barra { display: flex; gap: 3px; height: 12px; }
.dash-alist-embudo-barra i { display: block; height: 100%; min-width: 6px; border-radius: 999px; }

.dash-alist-avisos { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.dash-alist-aviso { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; color: #334155; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 12px; padding: 8px 14px; }
.dash-alist-aviso i { color: #64748b; }
.dash-alist-aviso-alerta { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.dash-alist-aviso-alerta i { color: #dc2626; }

.dash-alist-subtitulo { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-weight: 800; font-size: .92rem; color: #0f172a; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #e2e8f0; }
.dash-alist-periodo { font-weight: 600; font-size: .78rem; color: #475569; background: #f1f5f9; border-radius: 999px; padding: 2px 10px; }
.dash-alist-pista { font-weight: 500; font-size: .76rem; color: #64748b; }

/* Ranking: cada operaria es una fila clickeable que abre su detalle (pedidos, referencias y tiempos). El primer
   puesto se pinta en dorado. */
.dash-alist-fila {
    display: grid;
    grid-template-columns: 34px minmax(150px, 30%) 1fr 84px 112px 16px;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 10px;
    margin: 0;
    font: inherit;
    text-align: left;
    color: inherit;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 14px;
}
button.dash-alist-fila { cursor: pointer; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease; }
button.dash-alist-fila:hover { background: #f8faff; border-color: #c7d2fe; box-shadow: 0 6px 16px rgba(67, 97, 238, .1); }
button.dash-alist-fila:active { transform: scale(.995); }
button.dash-alist-fila:focus-visible { outline: 3px solid rgba(67, 97, 238, .45); outline-offset: 2px; }
.dash-alist-fila.es-lider { background: linear-gradient(90deg, #fffbeb, #fff 80%); }
button.dash-alist-fila.es-lider:hover { background: linear-gradient(90deg, #fef3c7, #fff 80%); border-color: #fcd34d; box-shadow: 0 6px 16px rgba(217, 119, 6, .12); }
.dash-alist-cab { padding-top: 2px; padding-bottom: 2px; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; }
.dash-alist-puesto { width: 30px; height: 30px; display: grid; place-items: center; font-size: .82rem; font-weight: 800; color: #475569; background: #f1f5f9; border-radius: 50%; }
.dash-alist-puesto--1 { color: #fff; background: linear-gradient(135deg, #fbbf24, #d97706); box-shadow: 0 4px 10px rgba(217, 119, 6, .35); }
.dash-alist-puesto--2 { color: #fff; background: linear-gradient(135deg, #94a3b8, #64748b); }
.dash-alist-puesto--3 { color: #fff; background: linear-gradient(135deg, #e0a373, #b4693a); }
.dash-alist-nombre { display: block; font-weight: 700; font-size: .92rem; color: #0f172a; }
.dash-alist-nombre small { display: block; font-weight: 500; font-size: .72rem; color: #64748b; }
.dash-alist-barra { display: block; background: #eef2f7; border-radius: 999px; height: 12px; overflow: hidden; }
.dash-alist-barra i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #818cf8, #4361ee); }
.dash-alist-fila.es-lider .dash-alist-barra i { background: linear-gradient(90deg, #fbbf24, #f97316); }
.dash-alist-uds { text-align: right; font-weight: 800; font-size: 1.05rem; color: #0f172a; font-variant-numeric: tabular-nums; }
.dash-alist-fila.es-lider .dash-alist-uds { color: #b45309; }
.dash-alist-uds small { font-weight: 500; font-size: .7rem; color: #64748b; }
.dash-alist-tiempo { text-align: right; font-weight: 700; font-size: .88rem; color: #0f172a; font-variant-numeric: tabular-nums; }
.dash-alist-tiempo small { display: block; font-weight: 500; font-size: .7rem; color: #64748b; }
.dash-alist-ir { font-size: .75rem; color: #cbd5e1; transition: transform .15s ease, color .15s ease; }
button.dash-alist-fila:hover .dash-alist-ir { color: #4361ee; transform: translateX(3px); }
.dash-alist-vacio { color: #64748b; font-size: .85rem; padding: 14px 16px; text-align: center; background: #f8fafc; border: 1px dashed #e2e8f0; border-radius: 14px; }

/* Detalle de una operaria (modal): notas de lo que no suma, y los pedidos como filas que se despliegan. */
.dash-alist-notas { margin: 14px 0 0; padding: 10px 14px 10px 30px; font-size: .8rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; }
.dash-alist-pedido { margin-bottom: 8px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; }
.dash-alist-pedido[open] { border-color: #c7d2fe; box-shadow: 0 6px 16px rgba(67, 97, 238, .08); }
.dash-alist-pedido > summary {
    display: grid;
    grid-template-columns: minmax(120px, 1.2fr) minmax(100px, 1.6fr) 80px 70px 90px 90px;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    list-style: none;
    cursor: pointer;
    font-size: .88rem;
}
.dash-alist-pedido > summary::-webkit-details-marker { display: none; }
.dash-alist-pedido > summary:hover { background: #f8faff; }
.dash-alist-pedido-id { font-weight: 800; color: #0f172a; }
.dash-alist-pedido-id i { font-size: .7rem; color: #94a3b8; margin-right: 6px; transition: transform .15s ease; }
.dash-alist-pedido[open] .dash-alist-pedido-id i { transform: rotate(90deg); color: #4361ee; }
.dash-alist-pedido-cli { color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-alist-pedido-dato { text-align: right; font-variant-numeric: tabular-nums; color: #334155; }
.dash-alist-pedido .table-responsive { border-top: 1px solid #eef2f7; padding: 4px 8px 8px; background: #fcfdff; }

@media (max-width: 767px) {
    .dash-alist-fila { grid-template-columns: 30px 1fr 64px 16px; }
    .dash-alist-fila .dash-alist-barra { grid-column: 2 / 4; grid-row: 2; }
    .dash-alist-fila .dash-alist-tiempo { grid-column: 2 / 4; grid-row: 3; text-align: left; }
    .dash-alist-cab { display: none; }
    .dash-alist-pedido > summary { grid-template-columns: 1fr 1fr; }
    .dash-alist-pedido-cli { grid-column: 1 / -1; }
    .dash-alist-pedido-dato { text-align: left; }
}

@media (max-width: 575px) {
    .dash-alist-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
    .dash-alist-kpi { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 12px 12px 16px; }
    .dash-alist-kpi-ico { flex-basis: 38px; width: 38px; height: 38px; font-size: .95rem; border-radius: 12px; }
    .dash-alist-kpi-valor { font-size: 1.75rem; }
    .dash-alist-embudo { margin-top: 2px; }
}
