/* ── Página ──────────────────────────────────────────────── */
.pend-page {
    margin: 20px 0;
}

/* ── Sección (con stock / sin stock) ─────────────────────── */
.pend-section {
    margin-bottom: 32px;
}

.pend-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding: 12px 16px;
}

/* ── Lista de tarjetas ───────────────────────────────────── */
.pend-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Tarjeta ─────────────────────────────────────────────── */
.pend-card {
    display: grid;
    grid-template-columns: 90px 1fr 300px 200px;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

/* ── Columna imagen ──────────────────────────────────────── */
.pend-col-image img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 4px;
}

/* ── Columna info ────────────────────────────────────────── */
.pend-col-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    font-size: 13px;
}

.pend-name {
    margin: 0 0 4px;
    font-size: 14px;
}

.pend-ean,
.pend-marca {
    color: #666;
    font-size: 12px;
}

.pend-stock-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    background: #ecfdf5;
    color: #059669;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 400;
    font-size: 12px;
}

.pend-stock-pill:has(.stock-red) {
    background: #fef2f2;
    color: #dc2626;
}

.pend-por-encargo {
    margin: 0;
    width: 100%;
    font-size: 13px;
    color: #333;
    font-weight: 700;
    font-style: normal;
    text-align: right;
}

/* Indicadores de stock — reutiliza clases del tema */
.status-block-stock {
    display: flex;
    align-items: center;
}

.status-stock {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.pend-stock-pill .status-block-stock { display: inline-flex; }
.pend-stock-pill .status-stock {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}
.pend-stock-pill .status-stock.stock-green { background: #10b981; }
.pend-stock-pill .status-stock.stock-red   { background: #ef4444; }

/* ── Columna descuento ───────────────────────────────────── */
.pend-col-discount {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-around;
    gap: 10px;
    height: 100%;
}

.pend-discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: #eef4ff;
    color: #2563eb;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Columna acciones (cantidad + precio + botón) ────────── */
.pend-col-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.pend-qty-price {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pend-qty-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.pend-qty-label {
    font-size: 11px;
    color: #666;
}

.pend-qty-box {
    display: inline-block;
    min-width: 40px;
    padding: 4px 8px;
    border: none;
    border-radius: 6px !important;
    box-shadow: var(--borders--base);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    background: #fff;
}

.pend-price-block {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 2px;
    text-align: right;
}

.pend-price-unit {
    font-size: 15px;
    font-weight: 700;
    color: #2563eb;
}

.pend-price-per {
    font-size: 12px;
    color: #666;
}

.pend-iva-label {
    width: 100%;
    font-size: 11px;
    color: #888;
    text-align: right;
}

/* ── Fila totales ────────────────────────────────────────── */
.pend-totals {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.pend-original-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}

.pend-final-price {
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
}

/* ── Botón anular ────────────────────────────────────────── */
.btn-anular {
    font-size: 14px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 6px;
    background-color: #2563eb;
    color: #fff;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}
.btn-anular:hover {
    background-color: #1d4ed8;
    color: #fff;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .pend-card {
        grid-template-columns: 70px 1fr;
        grid-template-rows: auto auto;
    }

    .pend-col-discount {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .pend-col-actions {
        grid-column: 1 / -1;
        align-items: flex-end;
    }
}
