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

.vid-nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #0284c7;
    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; }

.vid-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;
}
.vid-state.medicion, .vid-state.borrador { background: #fef3c7; color: #92400e; }
.vid-state.corte, .vid-state.enviado { background: #e0f2fe; color: #0369a1; }
.vid-state.listo, .vid-state.ok, .vid-state.convertido { background: #dcfce7; color: #166534; }
.vid-state.entregado { background: #dbeafe; color: #1d4ed8; }
.vid-state.bajo, .vid-state.vencido { background: #fee2e2; color: #991b1b; }

.vid-calc-box {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}
.vid-calc-box strong { color: #0369a1; font-size: 15px; }

.vid-stepper {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 0;
    margin: 14px 0 0;
}
.vid-stepper li { text-align: center; display: grid; justify-items: center; gap: 4px; color: var(--muted); }
.vid-stepper li span {
    width: 28px; height: 28px; border-radius: 50%; background: #e2e8f0; color: #475569;
    font-weight: 700; font-size: 13px; display: grid; place-items: center;
}
.vid-stepper li.done span { background: #0284c7; color: #fff; }
.vid-stepper li.current small { color: #0369a1; font-weight: 700; }

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

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