.ec-stack { display: grid; gap: 15px; }
.ec-form { max-width: 860px; }
.ec-span { grid-column: 1 / -1; }
.ec-table { overflow-x: auto; }
.ec-nowrap { white-space: nowrap; }
.ec-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.ec-top { margin-top: 14px; }
.ec-muted { color: var(--muted); }
.ec-inline { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ec-inline select, .ec-inline input { width: auto; margin: 0; padding: 6px 8px; }

.ec-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; }

.ec-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;
}
.ec-state.pendiente, .ec-state.borrador { background: #fef3c7; color: #92400e; }
.ec-state.en_preparacion { background: #e0f2fe; color: #0369a1; }
.ec-state.presentada, .ec-state.liquidado, .ec-state.RI { background: #dbeafe; color: #1d4ed8; }
.ec-state.pagada, .ec-state.pagado, .ec-state.cobrado { background: #dcfce7; color: #166534; }
.ec-state.vencida { background: #fee2e2; color: #991b1b; }
.ec-state.Monotributo { background: #ede9fe; color: #5b21b6; }
.ec-state.Exento { background: #f1f5f9; color: #475569; }

.ec-facts dt, .ec-balance dt { color: var(--muted); font-size: 13px; }
.ec-facts dd, .ec-balance dd { margin: 3px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.ec-balance {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    border-top: 1px solid var(--line);
    padding: 12px 0 0;
    margin-bottom: 0;
}
.ec-total { text-align: right; font-size: 18px; font-weight: 700; }
.ec-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;
}
.ec-print main { max-width: 820px; margin: auto; padding: 20px; }
.ec-print-nav { margin-bottom: 16px; }
@media print {
    body.ec-print { background: white; color: #000; }
    .ec-print .panel { border: 0; box-shadow: none; padding: 0; }
    .ec-print-nav { display: none; }
}
