/* Programación de alistamiento (Gestión de Pedidos).
   - .pa-*: tablero del modo "Programar" (programacion_alistamiento.js).
   - .at-turno / .at-seccion: turno numerado en la lista del modo "Alistar" (alistamiento_tiempos.js). */

/* ── Tablero ─────────────────────────────────────────────────────────── */
.pa-ayuda {
    margin: 0 0 12px;
    color: #64748b;
    font-size: 0.85rem;
    max-width: 900px;
}

/* Las columnas se acomodan en cuadrícula y bajan a otra fila cuando no caben:
   en un TV no hay barra horizontal para deslizar, así que nada queda oculto a la derecha. */
.pa-tablero {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 14px;
    align-items: start;
    padding-bottom: 12px;
}

.pa-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #f1f5f9;
    border: 2px solid transparent;
    border-radius: 14px;
}
.pa-col-libre { background: #fff7ed; }
.pa-col-fuera { background: #fef2f2; }
.pa-col-destino { border-color: #4f46e5; background: #eef2ff; }

.pa-col-cab {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px 8px;
}
.pa-col-nombre { font-weight: 800; color: #1e293b; font-size: 0.95rem; line-height: 1.2; overflow-wrap: anywhere; }
.pa-col-carga { color: #64748b; font-size: 0.75rem; font-weight: 600; }
.pa-col-aviso { color: #b91c1c; font-size: 0.72rem; font-weight: 600; }

.pa-col-lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 90px;
    padding: 4px 10px 12px;
}

.pa-vacio {
    padding: 22px 8px;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    color: #94a3b8;
    font-size: 0.8rem;
    text-align: center;
}

/* ── Tarjeta de pedido ───────────────────────────────────────────────── */
.pa-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    cursor: grab;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.pa-card:active { cursor: grabbing; }
.pa-card-arrastrando { opacity: 0.45; }
.pa-soltar-antes { box-shadow: 0 -3px 0 0 #4f46e5; }
.pa-soltar-despues { box-shadow: 0 3px 0 0 #4f46e5; }

.pa-card-cuerpo { display: flex; align-items: flex-start; gap: 8px; }
.pa-agarre { color: #cbd5e1; flex: 0 0 auto; line-height: 1; padding-top: 4px; }

.pa-turno, .at-turno {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border-radius: 999px;
    background: #4f46e5;
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    line-height: 1;
}

.pa-card-info { min-width: 0; flex: 1 1 auto; }
.pa-card-titulo { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; color: #1e293b; }
.pa-fecha { color: #94a3b8; font-size: 0.7rem; white-space: nowrap; }
.pa-cliente { color: #475569; font-size: 0.8rem; overflow-wrap: anywhere; }
.pa-meta { color: #64748b; font-size: 0.72rem; margin-top: 2px; }

.pa-ir {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin: 8px 0 0;
    padding: 6px 8px;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}
.pa-ir:hover { background: #e0e7ff; border-color: #4f46e5; }

.pa-card-acciones { display: flex; align-items: center; gap: 6px; margin-top: 8px; }

.pa-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    cursor: pointer;
}
.pa-btn:hover:not(:disabled) { background: #eef2ff; border-color: #4f46e5; color: #4f46e5; }
.pa-btn:disabled { opacity: 0.35; cursor: default; }

.pa-select {
    flex: 1 1 auto;
    min-width: 0;
    height: 34px;
    padding: 0 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-size: 0.78rem;
}

/* ── Lista del modo "Alistar": turno numerado ────────────────────────── */
.at-seccion {
    margin: 18px 0 10px;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.at-seccion:first-child { margin-top: 0; }
.at-turno { min-width: 32px; height: 32px; font-size: 1rem; }
.at-turno-siguiente {
    padding: 2px 8px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
}
.card.at-pedido-siguiente { box-shadow: 0 0 0 3px #c7d2fe !important; }
