/**
 * Estilos unificados para BOW Gestion
 * Basado en el diseño del nuevo login
 */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --border-radius: 15px;
    --border-radius-sm: 10px;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.2);
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-color);
    min-height: 100vh;
    padding-bottom: 2rem;
}

/* Cards modernos */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 1rem 1.25rem;
    border: none;
}

.card-header.bg-success { background: var(--success-color) !important; }
.card-header.bg-primary { background: var(--primary-color) !important; }
.card-header.bg-danger { background: var(--danger-color) !important; }
.card-header.bg-warning { background: var(--warning-color) !important; color: #000 !important; }
.card-header.bg-info { background: var(--info-color) !important; }
/* Encabezados claros: texto oscuro (si no, queda letra blanca sobre blanco) */
.card-header.bg-light, .card-header.bg-white { color: #212529 !important; }

.card-body {
    padding: 1.25rem;
}

/* Inputs optimizados para tactil */
.form-control,
.form-select {
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #dee2e6;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--gradient-start);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
}

/* Inputs grandes para movil */
.form-control-lg,
.input-touch {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    min-height: 50px;
}

/* Botones modernos */
.btn {
    border-radius: var(--border-radius-sm);
    padding: 0.6rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6, #6a3d9a);
}

.btn-success {
    background: var(--success-color);
    border: none;
}

.btn-danger {
    background: var(--danger-color);
    border: none;
}

/* Botones grandes para tactil */
.btn-lg,
.btn-touch {
    padding: 0.9rem 1.5rem;
    font-size: 1.1rem;
    min-height: 50px;
}

/* Botones de accion principales */
.btn-action {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}

/* Titulos de seccion */
.section-title {
    font-weight: 700;
    color: var(--primary-color);
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--gradient-start);
}

/* Tablas responsivas */
.table {
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.table thead {
    background: var(--primary-color);
    color: white;
}

.table thead th {
    border: none;
    padding: 0.85rem;
    font-weight: 600;
}

.table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

/* Filas completadas/deshabilitadas */
.row-completed,
.row-disabled {
    background-color: #e9ecef !important;
    opacity: 0.7;
}

/* Badges modernos */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Alertas */
.alert {
    border-radius: var(--border-radius);
    border: none;
}

/* Formularios en fila */
.form-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.form-row > * {
    flex: 1;
    min-width: 150px;
}

/* Filtros */
.filtros-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

/* Header fijo con usuario */
.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-fixed .title {
    font-weight: 600;
    font-size: 1rem;
}

.header-fixed .user-badge {
    background: rgba(255,255,255,0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Espacio para header fijo */
body.has-fixed-header {
    padding-top: 60px;
}

/* Botones de seleccion tipo toggle */
.btn-toggle {
    background: white;
    border: 2px solid #dee2e6;
    color: var(--dark-color);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.btn-toggle:hover {
    border-color: var(--gradient-start);
    background: #f8f9fa;
}

.btn-toggle.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border-color: transparent;
}

/* Grid de opciones */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animacion de entrada */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
        padding-bottom: 2rem;
    }

    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .card {
        border-radius: var(--border-radius-sm);
    }

    .form-control,
    .form-select {
        font-size: 16px; /* Previene zoom en iOS */
    }

    .btn {
        padding: 0.75rem 1rem;
    }

    h2, .h2 { font-size: 1.5rem; }
    h3, .h3 { font-size: 1.25rem; }
    h4, .h4 { font-size: 1.1rem; }

    .table {
        font-size: 0.9rem;
    }

    .table td, .table th {
        padding: 0.5rem;
    }

    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Utilidades */
.text-gradient {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-gradient {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
}

.shadow-soft {
    box-shadow: var(--shadow);
}

.shadow-hard {
    box-shadow: var(--shadow-lg);
}

/* Boton flotante fijo */
.btn-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    border-radius: 50px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
}

.btn-floating-top {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1050;
    border-radius: 50px;
    padding: 0.75rem 1.25rem;
    box-shadow: var(--shadow-lg);
}

/* Input con icono */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .form-control {
    padding-left: 2.5rem;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* Estados de carga en botones */
.btn.is-loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.is-loading .btn-text {
    visibility: hidden;
}

.btn.is-loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Progress bar */
.progress {
    height: 8px;
    border-radius: 10px;
    background: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
}

/* Ambiente badge */
.env-badge {
    position: fixed;
    top: 5px;
    left: 5px;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 1100;
}

.env-prod {
    background: var(--success-color);
    color: white;
}

.env-test {
    background: var(--warning-color);
    color: black;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
}

.toast {
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1rem;
}

.back-link:hover {
    color: var(--gradient-start);
}

/* ==========================================================================
   Componentes compartidos (consolidados desde estilos inline duplicados)
   ========================================================================== */

/* --- Botones de tarea del menú (patrón de index.php) --- */
.task-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    margin: 0.4rem;
    min-width: 100px;
    flex: 1 1 100px;
    max-width: 140px;
    border-radius: 15px;
    background: white;
    border: 2px solid #dee2e6;
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.task-btn:hover {
    border-color: var(--gradient-start);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
    color: var(--primary-color);
}

.task-btn:active {
    transform: scale(0.98);
}

.task-btn i {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
    color: var(--gradient-start);
}

.task-btn span {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.task-btn.special {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border: none;
    color: white;
}

.task-btn.special i { color: white; }

.task-btn.special:hover {
    color: white;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

@media (max-width: 576px) {
    .task-btn {
        min-width: 85px;
        max-width: 110px;
        padding: 0.75rem 0.3rem;
    }
    .task-btn i { font-size: 1.5rem; }
    .task-btn span { font-size: 0.75rem; }
}

/* --- Badge de usuario flotante (header simple) --- */
.user-badge-float {
    position: fixed;
    top: 5px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    z-index: 1100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    text-decoration: none;
    transition: all 0.2s;
}

.user-badge-float:hover {
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* --- Badges de estado unificados (pendiente/parcial/completo/atrasado) --- */
.badge-estado {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
}

.badge-estado.estado-pendiente { background: #fff3cd; color: #856404; }
.badge-estado.estado-parcial   { background: #cfe2ff; color: #084298; }
.badge-estado.estado-completo  { background: #d1e7dd; color: #0f5132; }
.badge-estado.estado-atrasado  { background: #f8d7da; color: #842029; }
.badge-estado.estado-anulado   { background: #e2e3e5; color: #41464b; }

/* --- Card de listado mobile-friendly (patrón de cortes/listar_cortes.php) --- */
.list-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.list-card.is-disabled { opacity: 0.6; background: #f1f3f5; }

.list-card-id { font-weight: bold; color: var(--gradient-start); }
.list-card-sub { color: #6c757d; font-size: 0.85rem; }

.list-card-stats { display: flex; gap: 1rem; margin-top: 0.5rem; flex-wrap: wrap; }
.list-card-stat { text-align: center; }
.list-card-stat-value { font-size: 1.1rem; font-weight: bold; }
.list-card-stat-label { font-size: 0.72rem; color: #6c757d; }

/* --- Barra de progreso stock vs mínimo --- */
.stock-bar {
    height: 10px;
    border-radius: 6px;
    background: #e9ecef;
    overflow: hidden;
}
.stock-bar > span {
    display: block;
    height: 100%;
    border-radius: 6px;
    background: var(--success-color);
}
.stock-bar.is-low > span { background: var(--danger-color); }
.stock-bar.is-warn > span { background: var(--warning-color); }

/* --- Buscador de tabla (helper de paginación) --- */
.tabla-toolbar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0.75rem;
}
.tabla-toolbar .form-control { max-width: 320px; }
.tabla-paginacion {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}
.tabla-info { color: #6c757d; font-size: 0.85rem; }

/* --- Panel "Hoy" del menú principal (alertas accionables) --- */
.hoy-panel {
    background: white;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow);
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.hoy-title { font-weight: 700; color: var(--primary-color); display: inline-flex; align-items: center; gap: 0.3rem; }
.hoy-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s;
}
.hoy-chip:hover { transform: scale(1.04); }
.hoy-chip.hoy-danger  { background: #f8d7da; color: #842029; }
.hoy-chip.hoy-warn    { background: #fff3cd; color: #856404; }
.hoy-chip.hoy-info    { background: #cfe2ff; color: #084298; }
.hoy-chip.hoy-ok      { background: #d1e7dd; color: #0f5132; }
.hoy-chip.hoy-neutral { background: #e9ecef; color: #41464b; }

/* --- Barra superior común (partials/header.php) --- */
.bow-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--primary-color);
    color: #fff;
    padding: 0.5rem 0.9rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.bow-topbar-home {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--border-radius-sm);
    background: rgba(255,255,255,0.12);
}
.bow-topbar-home:hover { color: #fff; background: rgba(255,255,255,0.22); }
.bow-topbar-title { font-weight: 600; font-size: 1rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bow-topbar-env { background: var(--warning-color); color: #000; padding: 0.15rem 0.6rem; border-radius: 15px; font-size: 0.7rem; font-weight: 700; }
.bow-topbar-user { background: rgba(255,255,255,0.2); padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.85rem; white-space: nowrap; }
.bow-breadcrumb { background: #fff; padding: 0.5rem 0.9rem; border-bottom: 1px solid #e9ecef; }
.bow-breadcrumb .breadcrumb { font-size: 0.85rem; }

/* La barra global nunca se imprime (pantallas con botón Imprimir). */
@media print {
    .bow-topbar, .bow-breadcrumb, .bow-bell-panel { display: none !important; }
}

/* --- Campanita "Hoy" de la barra global --- */
.bow-bell { position: relative; }
.bow-bell-btn {
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.05rem;
    cursor: pointer;
    position: relative;
    transition: background 0.15s;
}
.bow-bell-btn:hover { background: rgba(255,255,255,0.25); }
.bow-bell-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: var(--danger-color);
    color: #fff;
    border-radius: 9px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--primary-color);
}
.bow-bell-panel {
    display: none;
    position: absolute;
    top: 46px;
    right: 0;
    width: 290px;
    max-width: 86vw;
    background: #fff;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 1200;
}
.bow-bell-panel.show { display: block; animation: fadeIn 0.15s ease; }
.bow-bell-head {
    padding: 0.6rem 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.bow-bell-empty { padding: 1.2rem 0.9rem; text-align: center; color: #0f5132; font-weight: 600; }
.bow-bell-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 0.9rem;
    text-decoration: none;
    color: var(--dark-color);
    border-bottom: 1px solid #f1f3f5;
    font-size: 0.85rem;
    font-weight: 500;
}
.bow-bell-item:hover { background: #f8f9fa; color: var(--dark-color); }
.bow-bell-item i { font-size: 1rem; }
.bow-bell-item.hoy-danger i { color: var(--danger-color); }
.bow-bell-item.hoy-warn i   { color: #b8860b; }
.bow-bell-item.hoy-info i   { color: var(--info-color); }
.bow-bell-foot { color: var(--primary-color); font-weight: 700; }
.bow-bell-foot i { color: var(--gradient-start); }

/* ==========================================================================
   Restyle del módulo Producción (remitos / recepción / embolsado)
   Se activa con la clase .mod-prod en el <body>. Tipografía más compacta,
   tarjetas suaves y jerarquía de botones (la acción principal destaca).
   ========================================================================== */
.mod-prod { font-size: 0.92rem; color: #2b3445; }
.mod-prod h1, .mod-prod h2 { font-size: 1.25rem; font-weight: 700; }
.mod-prod h3, .mod-prod h4 { font-size: 1.02rem; font-weight: 700; }
.mod-prod .h4 { font-size: 1.02rem; }

.mod-prod .card { border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); border: 1px solid #eef0f4; }
.mod-prod .card-header { font-size: 0.85rem; font-weight: 600; padding: 0.55rem 0.9rem; }
.mod-prod .card-body { padding: 0.85rem; }

/* Etiquetas de campo discretas y compactas */
.mod-prod .form-label {
    font-size: 0.72rem; font-weight: 600; color: #8a93a6;
    text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.2rem;
}
.mod-prod .form-control, .mod-prod .form-select {
    font-size: 0.95rem; padding: 0.5rem 0.7rem; border-radius: 10px; border: 1.5px solid #e3e6ec;
}

/* Tablas más compactas y legibles */
.mod-prod .table { font-size: 0.84rem; }
.mod-prod .table thead th { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.02em; }
.mod-prod .table td, .mod-prod .table th { padding: 0.45rem 0.5rem; vertical-align: middle; }

/* --- Jerarquía de botones --- */
.mod-prod .btn { border-radius: 10px; font-weight: 600; }
.mod-prod .btn-sm { font-size: 0.78rem; padding: 0.35rem 0.6rem; }

/* Secundarios: discretos, no compiten con la acción principal */
.mod-prod .btn-outline-secondary,
.mod-prod .btn-secondary,
.mod-prod .btn-outline-primary { font-weight: 500; }
.mod-prod .btn-secondary { background: #eef0f4; border-color: #eef0f4; color: #475569; }
.mod-prod .btn-secondary:hover { background: #e2e6ee; color: #475569; }

/* Acción principal (Guardar / Confirmar / Ingresar): siempre destacada */
.mod-prod .btn-success {
    background: linear-gradient(135deg, #16a34a, #15803d);
    border: none; color: #fff;
    box-shadow: 0 5px 16px rgba(22,163,74,0.32);
    font-weight: 700;
}
.mod-prod .btn-success:hover { background: linear-gradient(135deg, #15803d, #166534); color: #fff; }
.mod-prod .btn-success:active { transform: scale(0.99); }

/* Botón de acción full-width (el más importante de la pantalla) */
.mod-prod .btn-action { font-size: 1.05rem; padding: 0.85rem; letter-spacing: 0.01em; }

/* --- Detalle de remito en Recepción: pendiente de recibir vs ya recibido --- */
.rec-detalle { padding: 0.25rem 0.1rem; }
.rec-pend-title {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.03em; color: #8a6d00; margin: 0.1rem 0 0.4rem;
    display: flex; align-items: center; gap: 0.35rem;
}
.rec-line {
    display: flex; justify-content: space-between; align-items: center;
    gap: 0.5rem; padding: 0.45rem 0.6rem; border-radius: 10px; margin-bottom: 0.3rem;
}
.rec-line-pend { background: #fff8e6; border: 1px solid #ffe7a3; }
.rec-line-ok { background: #f1f5f9; }
.rec-prod {
    font-size: 0.82rem; font-weight: 600; color: #2b3445;
    display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; line-height: 1.2;
}
.rec-chip { font-size: 0.66rem; font-weight: 600; padding: 0.1rem 0.45rem; border-radius: 20px; background: #e2e8f0; color: #475569; }
.rec-nums { white-space: nowrap; text-align: right; }
.rec-nums small { color: #6c757d; display: block; font-size: 0.68rem; }
.rec-pend-badge { font-size: 0.78rem; font-weight: 700; color: #8a6d00; background: #ffe7a3; padding: 0.2rem 0.55rem; border-radius: 20px; }
.rec-allok { color: #0f5132; font-weight: 600; font-size: 0.85rem; padding: 0.5rem; text-align: center; }
.rec-recibido { margin-top: 0.5rem; }
.rec-recibido > summary {
    cursor: pointer; list-style: none; font-size: 0.74rem; font-weight: 700;
    color: #0f5132; padding: 0.4rem 0.6rem; background: #d1e7dd; border-radius: 10px;
    display: flex; align-items: center; gap: 0.4rem;
}
.rec-recibido > summary::-webkit-details-marker { display: none; }
.rec-recibido[open] > summary { margin-bottom: 0.4rem; }
.rec-modal-head { padding: 0 0.1rem 0.5rem; border-bottom: 1px solid #eef0f4; margin-bottom: 0.6rem; }
.rec-modal-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.85rem; color: #475569; font-weight: 600; }

/* --- Cards de selección de embolsado (lista de pendientes, mobile) --- */
.emb-card { background: #fff; border: 1px solid #eef0f4; border-radius: 12px; padding: 0.7rem 0.85rem; margin-bottom: 0.55rem; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.emb-card.is-done { opacity: 0.7; }
.emb-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.emb-prod-name { font-weight: 700; font-size: 0.92rem; line-height: 1.2; color: #2b3445; }
.emb-chips { display: flex; gap: 0.3rem; margin-top: 0.25rem; flex-wrap: wrap; }
.emb-sub { font-size: 0.72rem; color: #8a93a6; margin-top: 0.35rem; }
.emb-stats { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; align-items: center; margin-top: 0.45rem; font-size: 0.8rem; }
.emb-pend { font-weight: 700; color: #8a6d00; background: #ffe7a3; padding: 0.15rem 0.6rem; border-radius: 20px; }
.emb-stat { color: #475569; }
