/* CAMUS — Utilidades y rejillas de página. */

.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s-5); align-items: start; }
.grid-main > * > * + * { margin-top: var(--s-5); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split > * + * { border-left: 1px solid var(--rule); }
.split > * { padding: var(--s-5); }
.mt-section { margin-top: var(--s-5); }
.max-w-form { max-width: 880px; }
.max-w-narrow { max-width: 640px; }

.row { display: flex; align-items: center; gap: var(--s-2); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

.muted, .text-secondary, .text-muted { color: var(--ink-3); }
.text-ink { color: var(--ink); }
.text-danger { color: var(--bad); }
.text-success { color: var(--ok); }
.text-warning { color: var(--warn); }
.text-brand { color: var(--brand-ink); }
.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-md); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.strong, .font-semibold { font-weight: 650; }
.font-bold { font-weight: 750; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 0.92em; }

.mt-1 { margin-top: var(--s-1); } .mt-2 { margin-top: var(--s-2); } .mt-3 { margin-top: var(--s-3); } .mt-4 { margin-top: var(--s-4); } .mt-5 { margin-top: var(--s-5); }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: var(--s-2); } .mb-3 { margin-bottom: var(--s-3); } .mb-4 { margin-bottom: var(--s-4); }

@media (max-width: 1180px) {
    .grid-main { grid-template-columns: minmax(0, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .grid-2, .grid-3, .split { grid-template-columns: minmax(0, 1fr); }
    .split > * + * { border-left: 0; border-top: 1px solid var(--rule); }
    .ledger-item + .ledger-item { border-left: 0; border-top: 1px solid var(--rule); }
    .page-title { font-size: var(--fs-xl); }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1 1 auto; }
    .page-actions .btn-ghost { display: none; }
    .card-header { padding: var(--s-3) var(--s-4); }
    .card-body { padding: var(--s-4); }
    .table th:first-child, .table td:first-child { padding-left: var(--s-4); }
    .table th:last-child, .table td:last-child { padding-right: var(--s-4); }
    .hide-sm { display: none !important; }
}
