.rep-stack { display: grid; gap: 15px; }
.rep-form { max-width: 860px; }
.rep-span { grid-column: 1 / -1; }
.rep-table { overflow-x: auto; }
.rep-nowrap { white-space: nowrap; }
.rep-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.rep-top { margin-top: 14px; }
.rep-muted { color: var(--muted); }
.rep-inline { display: inline; }

.rep-nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#submenus a { display: flex; align-items: center; gap: 8px; }

.rep-rows { margin: 14px 0 0; border: 1px solid var(--line); border-radius: 9px; min-width: 0; padding: 12px; }
.rep-rows legend { padding-inline: 6px; font-weight: 700; }
.rep-sale-row { display: grid; grid-template-columns: minmax(0, 1fr) 94px; gap: 10px; margin-bottom: 10px; }
.rep-sale-row:last-child { margin-bottom: 0; }
.rep-sale-row select { width: 100%; text-overflow: ellipsis; }

.rep-state {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
    background: #e0f2fe;
    color: #0369a1;
}
.rep-state.abierto, .rep-state.cargo { background: #fef3c7; color: #92400e; }
.rep-state.convertido, .rep-state.pago { background: #dcfce7; color: #166534; }
.rep-state.vencido, .rep-state.bajo { background: #fee2e2; color: #991b1b; }
.rep-state.taller { background: #ede9fe; color: #5b21b6; }
.rep-state.mayorista { background: #dbeafe; color: #1d4ed8; }
.rep-state.publico { background: #f1f5f9; color: #334155; }

.rep-oem {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-weight: 700;
    font-size: 12.5px;
    color: #1e3a8a;
    background: #eff6ff;
    padding: 2px 6px;
    border-radius: 5px;
}
.rep-alt { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.rep-loc { display: inline-block; font-size: 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 2px 7px; color: #334155; }

.rep-facts dt, .rep-balance dt { color: var(--muted); font-size: 13px; }
.rep-facts dd, .rep-balance dd { margin: 3px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.rep-balance { display: flex; flex-wrap: wrap; gap: 12px 24px; border-top: 1px solid var(--line); padding: 12px 0 0; margin-bottom: 0; }
.rep-total { text-align: right; font-size: 18px; font-weight: 700; }

.rep-form textarea {
    display: block; width: 100%; margin-top: 4px; padding: 8px 10px; resize: vertical;
    font: inherit; color: var(--ink); background: white; border: 1px solid #cbd5e1; border-radius: 7px;
}

.rep-bulk-bar {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: end;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px;
}
.rep-bulk-bar label { margin: 0; font-size: 12.5px; }
.rep-bulk-bar input, .rep-bulk-bar select { margin-top: 3px; }

.rep-print main { max-width: 820px; margin: auto; padding: 20px; }
.rep-print-nav { margin-bottom: 16px; }
@media print {
    body.rep-print { background: white; color: #000; }
    .rep-print .panel { border: 0; box-shadow: none; padding: 0; }
    .rep-print-nav { display: none; }
}
