/* =============================================================
   Gestión de Valijas — estilos generales
   Clon visual de pedidos.cerba.com (fondo azul claro, logo Cerba,
   tarjeta blanca centrada con bordes redondeados).
   ============================================================= */

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1f2937;
    background: #fff;
}

/* --- Fondo con patrón hexagonal (clon de pedidos.cerba.com) --- */
.login-body {
    min-height: 100vh;
    background:
        linear-gradient(180deg, #e8f1fb 0%, #d6e7f7 100%);
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

.login-body::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='104' viewBox='0 0 120 104'><g fill='none' stroke='%23bfd6ef' stroke-width='1' opacity='0.55'><polygon points='30,2 58,18 58,52 30,68 2,52 2,18'/><polygon points='90,2 118,18 118,52 90,68 62,52 62,18'/><polygon points='60,52 88,68 88,102 60,118 32,102 32,68'/></g></svg>");
    background-repeat: repeat;
    pointer-events: none;
    z-index: 0;
}

/* --- Botón burger flotante --- */
.burger {
    background: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    font-size: 18px;
    color: #3b82f6;
    cursor: pointer;
}

.burger--floating {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 20;
}

/* --- Login --- */
.login-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(25, 65, 120, 0.12);
    padding: 40px 48px;
    width: 100%;
    max-width: 400px;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
}

.login-logo__img {
    max-width: 320px;
    height: auto;
    display: block;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.field__label {
    font-size: 14px;
    color: #4b5563;
}

.field input {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.btn {
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.05s;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
    background: #2563eb;
    color: #fff;
}

.btn--primary:hover { background: #1d4ed8; }

.btn--block { width: 100%; margin-top: 8px; padding: 12px; }

.btn--ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
}

.btn--ghost:hover { background: rgba(255,255,255,0.12); }

.login-hint {
    margin-top: 24px;
    color: #475569;
    font-size: 13px;
}

.alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
}

.alert--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* --- App (tras login) --- */
.topbar {
    background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.topbar__inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar .burger {
    box-shadow: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    text-decoration: none;
    color: inherit;
}
.brand:hover .brand__sub { opacity: 0.85; }

.brand__img {
    height: 52px;
    width: auto;
    background: #fff;
    border-radius: 8px;
    padding: 6px 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand__sub {
    font-size: 15px;
    color: #fff;
    font-weight: 500;
}

.topbar__right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mainnav {
    display: flex;
    gap: 4px;
    margin-left: 24px;
    flex: 1;
    flex-wrap: wrap;
}

.mainnav__link {
    color: #dbeafe;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.mainnav__link:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.mainnav__link.is-active {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

.user { font-size: 14px; opacity: 0.9; }

.main {
    min-height: calc(100vh - 130px);
    background: #f1f5f9;
    padding: 32px 20px;
}

.main__inner {
    max-width: 1300px;
    margin: 0 auto;
}

.page-title {
    margin: 0 0 24px 0;
    font-size: 24px;
    color: #1e293b;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.kpi {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
    border-left: 4px solid #94a3b8;
}

.kpi--warn { border-left-color: #f59e0b; }
.kpi--blue { border-left-color: #2563eb; }

.kpi__value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
}

.kpi__label {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.card__header {
    padding: 18px 22px 6px;
}

.card__title {
    margin: 0;
    font-size: 17px;
    color: #1e293b;
}

.card__subtitle {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: #64748b;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.table th, .table td {
    padding: 10px 14px;
    text-align: left;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
}

.table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    border-top: none;
    border-bottom: 1px solid #e5e7eb;
}

.table .num { text-align: right; }

.table .cell-code {
    font-family: "Consolas", "Monaco", monospace;
    color: #1e3a8a;
    font-weight: 600;
}

.row--warn { background: #fff7ed; }
.row--centro-start td { border-top: 3px solid #475569 !important; }
.row--info { background: #eff6ff; }
.badge--info { background: #dbeafe; color: #1e40af; font-size: 11px; padding: 2px 8px; }

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge--ok { background: #dcfce7; color: #166534; }
.badge--warn { background: #fef3c7; color: #92400e; }

.footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 14px 20px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

/* Page header with actions */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;
    flex-wrap: wrap;
}
.page-header .page-title { margin: 0; }
.page-hint { color: #64748b; margin: 0 0 20px 0; font-size: 14px; }

/* Buttons extra */
.btn--secondary { background: #e2e8f0; color: #334155; }
.btn--secondary:hover { background: #cbd5e1; }
.btn--danger { background: #dc2626; color: #fff; }
.btn--danger:hover:not(:disabled) { background: #b91c1c; }
.btn--danger:disabled { background: #fca5a5; cursor: not-allowed; }
.btn--small { padding: 6px 12px; font-size: 13px; }

.btn--ghost.btn--small {
    background: #fff;
    color: #2563eb;
    border: 1px solid #cbd5e1;
}
.btn--ghost.btn--small:hover { background: #eff6ff; }

/* Form */
.form {
    padding: 22px;
}
.form__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.field--wide { grid-column: span 2; }
.field--full { grid-column: 1 / -1; }
.field select, .field textarea {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
    outline: none;
}
.field textarea { resize: vertical; font-family: inherit; }
.field input[readonly] { background: #f1f5f9; color: #64748b; cursor: not-allowed; }
.form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 800px) {
    .form__grid { grid-template-columns: 1fr; }
    .field--wide, .field--full { grid-column: auto; }
}

.badge--mute { background: #e5e7eb; color: #475569; }

.alert--ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; margin-bottom: 14px; }
.alert--info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; margin-bottom: 14px; }

/* =============== Recepción =============== */
.recep__meta { color: #64748b; font-size: 14px; }
.recep__today { background: #e0e7ff; color: #3730a3; padding: 4px 10px; border-radius: 999px; }

.recep__scan {
    padding: 28px;
    margin-bottom: 20px;
    background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
}
.recep__scan-inner {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
}
.recep__label {
    display: block;
    color: #1e3a8a;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 15px;
}
.recep__input {
    width: 100%;
    padding: 22px 18px;
    font-size: 32px;
    font-family: "Consolas","Monaco",monospace;
    text-align: center;
    letter-spacing: 4px;
    border: 2px solid #93c5fd;
    border-radius: 12px;
    background: #fff;
    outline: none;
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.12);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.recep__input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.22);
}
.recep__status {
    min-height: 26px;
    margin-top: 14px;
    font-weight: 600;
    font-size: 16px;
}
.recep__status.is-ok  { color: #15803d; }
.recep__status.is-err { color: #b91c1c; }

.recep__history { overflow: hidden; }

.pill {
    display: inline-block;
    background: #e2e8f0;
    color: #334155;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 13px;
    margin-left: 6px;
}

.recep__list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 420px;
    overflow-y: auto;
}

.recep__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid #e5e7eb;
}
.recep__item:first-child { border-top: none; }
.recep__item.is-err { background: #fef2f2; }

.recep__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.recep__item-main { flex: 1; }
.recep__item-row1 {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 14px;
}
.recep__item-row1 code {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #1e3a8a;
}
.recep__item-row2 {
    color: #64748b;
    font-size: 13px;
    margin-top: 3px;
}

.recep__tag {
    background: #e0e7ff;
    color: #3730a3;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
}

.recep__err-tag {
    background: #fecaca;
    color: #991b1b;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

/* =============== Expediciones =============== */
.exp__card {
    padding: 22px;
    margin-bottom: 20px;
}
.exp__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
}
.exp__code {
    font-family: "Consolas","Monaco",monospace;
    font-size: 22px;
    color: #1e3a8a;
    font-weight: 700;
}
.exp__name {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-top: 2px;
}
.exp__addr {
    color: #475569;
    font-size: 14px;
    margin-top: 4px;
}
.exp__contact {
    color: #64748b;
    font-size: 13px;
    margin-top: 4px;
}
.exp__total {
    text-align: center;
    background: #eff6ff;
    padding: 10px 20px;
    border-radius: 10px;
    min-width: 120px;
}
.exp__total-n {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #1d4ed8;
    line-height: 1;
}
.exp__total-l {
    display: block;
    font-size: 12px;
    color: #1e40af;
    margin-top: 2px;
}

.exp__obs {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 14px;
    color: #78350f;
}
.exp__obs ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}
.exp__obs li { margin-top: 4px; }

.exp__tipologias {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.exp__tip {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px 16px;
}
.exp__tip-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #1e293b;
    margin-bottom: 8px;
}
.exp__tip-count {
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}
.exp__tip-umbral {
    color: #94a3b8;
    font-size: 12px;
    margin-left: auto;
}
.exp__valijas {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.exp__valija {
    background: #fff;
    border: 1px solid #cbd5e1;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 13px;
    color: #334155;
    font-family: "Consolas","Monaco",monospace;
}
.exp__valija-item {
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin-right: 6px;
    margin-bottom: 4px;
}
.exp__valija-item .exp__valija {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}
.btn-apartar {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-left: 1px solid #e2e8f0;
    color: #b91c1c;
    cursor: pointer;
    padding: 0 8px;
    font-size: 14px;
    line-height: 1;
    height: 24px;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    transition: background 0.1s, color 0.1s;
}
.btn-apartar:hover { background: #fef2f2; color: #991b1b; }
.btn-apartar:disabled { opacity: 0.5; cursor: not-allowed; }

.apartadas-bar {
    background: #fff7ed;
    border: 1px solid #fde68a;
    color: #78350f;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.exp__actions {
    margin-top: 16px;
    text-align: right;
}

@media print {
    .topbar, .footer, .no-print, .page-header .btn { display: none !important; }
    body, .main { background: #fff !important; }
    .card, .exp__card { box-shadow: none; border: 1px solid #cbd5e1; page-break-inside: avoid; }
    .page-title { margin-top: 0; }
}

/* =============== Clickable stock numbers =============== */
.stock-link {
    background: none;
    border: none;
    padding: 2px 8px;
    cursor: pointer;
    color: #1d4ed8;
    font: inherit;
    border-bottom: 1px dashed #93c5fd;
    border-radius: 3px;
    transition: background 0.1s;
}
.stock-link:hover { background: #dbeafe; color: #1e3a8a; }

/* =============== Modal =============== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}
.modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 720px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    overflow: hidden;
}
.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 18px 22px;
    border-bottom: 1px solid #e5e7eb;
}
.modal__title { margin: 0; font-size: 17px; color: #1e293b; }
.modal__subtitle { font-size: 13px; color: #64748b; margin-top: 2px; }
.modal__close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 6px;
}
.modal__close:hover { color: #1e293b; }
.modal__body {
    padding: 18px 22px;
    overflow-y: auto;
}
.modal__table th, .modal__table td { padding: 8px 12px; font-size: 13px; }
.modal__table code {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    color: #1e3a8a;
    font-size: 12px;
}

/* =============== Paper pijama (listado de magatzem) =============== */
.pijama {
    width: 100%;
    border-collapse: collapse;
    font-family: "Consolas","Monaco",monospace;
    font-size: 14px;
}
.pijama th {
    background: #1e3a8a;
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    border: 1px solid #1e3a8a;
    font-weight: 600;
}
.pijama td {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
}
.pijama tbody tr:nth-child(odd)  td { background: #eef2ff; }
.pijama tbody tr:nth-child(even) td { background: #fff;    }
.pijama .pijama__check {
    width: 28px;
    text-align: center;
    font-size: 18px;
    color: #64748b;
}
.pijama .pijama__sep td {
    background: #1e3a8a !important;
    color: #fff;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0.5px;
}
.pijama__header {
    background: #eff6ff;
    border-left: 4px solid #1e3a8a;
    padding: 10px 14px;
    margin-bottom: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    color: #1e293b;
}

/* =============== Filtros (panel) =============== */
.filtros { padding: 14px 18px; margin-bottom: 16px; }
.filtros__row {
    display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
}
.filtros .field { min-width: 160px; }
.filtros__actions { display: flex; gap: 8px; align-items: flex-end; }

/* =============== Switch (toggle activa) =============== */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch__slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #cbd5e1;
    border-radius: 22px;
    transition: 0.2s;
}
.switch__slider::before {
    content: "";
    position: absolute;
    height: 16px; width: 16px;
    left: 3px; bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}
.switch input:checked + .switch__slider { background: #16a34a; }
.switch input:checked + .switch__slider::before { transform: translateX(18px); }

.row--inactive { background: #f9fafb !important; opacity: 0.65; }
.row--inactive code, .row--inactive strong { text-decoration: line-through; }

.cb { font-family: "Consolas","Monaco",monospace; }
.card__footer {
    padding: 10px 18px; color: #64748b; font-size: 13px;
    border-top: 1px solid #e5e7eb; background: #f8fafc;
}

/* =============== Pantalla impresión de etiquetas =============== */
.impr {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 18px;
    align-items: flex-start;
}
@media (max-width: 900px) {
    .impr { grid-template-columns: 1fr; }
}

.impr__pliego {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(15,23,42,0.06);
}

/* Maqueta del pliego A4: relación 210/297 ≈ 0.707, mantenida con padding-top */
.pliego {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(4, 1fr);
    gap: 6px;
    aspect-ratio: 210 / 297;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    padding: 14px;
    border-radius: 8px;
}

.pliego__pos {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    min-height: 0;
    overflow: hidden;
}
.pliego__pos:hover:not(.is-used) { border-color: #93c5fd; background: #eff6ff; }
.pliego__pos.is-used {
    background: repeating-linear-gradient(
        45deg, #f1f5f9, #f1f5f9 6px, #e2e8f0 6px, #e2e8f0 12px
    );
    cursor: not-allowed;
    opacity: 0.7;
}
.pliego__pos.is-assigned { border-color: #2563eb; background: #eff6ff; }
.pliego__pos.is-droptarget { border-color: #16a34a; background: #f0fdf4; }
.pliego__pos-num {
    font-weight: 700;
    color: #1e3a8a;
    font-size: 13px;
}
.pliego__used {
    color: #94a3b8; font-size: 11px;
    text-align: center; margin: auto 0;
}
.pliego__used span { display: block; font-weight: 600; }
.pliego__empty {
    color: #94a3b8;
    font-size: 11px;
    text-align: center;
    margin: auto 0;
}
.pos-asignada {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 6px;
    align-items: flex-start;
    font-size: 11px;
    line-height: 1.3;
}
.pos-asignada strong { font-size: 12px; color: #1e3a8a; }
.pos-asignada small { color: #475569; font-size: 10px; }
.pos-asignada code { font-size: 10px; }
.btn-liberar {
    background: #fee2e2;
    color: #991b1b;
    border: none;
    border-radius: 50%;
    width: 18px; height: 18px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}
.btn-liberar:hover { background: #fecaca; }

.impr__pendientes {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(15,23,42,0.06);
    position: sticky; top: 80px;
}
.impr__pendientes h3 { margin: 0 0 6px 0; font-size: 15px; color: #1e293b; }

.pendientes__list { list-style: none; margin: 8px 0; padding: 0; max-height: 360px; overflow-y: auto; }
.pendiente {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: grab;
    background: #fff;
    transition: border-color 0.1s, background 0.1s;
    font-size: 13px;
}
.pendiente:hover { border-color: #93c5fd; }
.pendiente.is-selected { border-color: #2563eb; background: #eff6ff; box-shadow: 0 0 0 2px #93c5fd; }
.pendiente.is-assigned { opacity: 0.5; background: #f1f5f9; }
.pendiente__small { color: #64748b; font-size: 12px; margin-left: auto; }

.impr__actions {
    display: flex; gap: 8px;
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
    margin-top: 8px;
}

/* =============== Trazabilidad =============== */
.traza__metricas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}
.traza__metricas .kpi { padding: 10px 12px; }
.traza__metricas .kpi__value { font-size: 22px; }
