/*
 * DARIUS Sync — Hoja de estilos principal
 * Formato legible: sangría de 4 espacios y una propiedad por línea.
 */

/* Variables de color y estilos generales */

:root {
    --navy: #123f7a;
    --blue: #078bd6;
    --ink: #17283b;
    --muted: #64748b;
    --line: #d9e2ec;
    --bg: #f4f7fb;
    --green: #08a67a;
    --amber: #d89100;
    --red: #df4961;
    --white: #fff;
    --shadow: 0 10px 30px rgba(23, 40, 59, .08);
}

.config-af4-table select,
.config-af4-table input {
    min-width: 145px;
    margin: 2px 0;
}

.config-af4-table input {
    width: 100%;
}

.af4-config-dialog {
    width: min(1500px, 96vw);
}

.af4-config-scroll {
    max-height: 72vh;
}

.af4-config-dialog .config-af4-table td:nth-child(2) {
    min-width: 360px;
}

.af4-table td:nth-child(3),
.af4-table td:nth-child(4) {
    min-width: 145px;
}

.af4-manual {
    width: 100%;
    min-width: 125px;
    background: #fff6cf;
    border-color: #d7b94c;
    text-align: right;
}

.af4-row-seccion td {
    background: #dbe8f5;
    font-weight: 700;
}

.af4-row-subtotal td,
.af4-row-total td {
    background: #edf3f9;
    border-top: 2px solid #7796b5;
    font-weight: 700;
}

* {
    box-sizing: border-box;
}

html {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg);
}

body {
    margin: 0;
}

/* Barra lateral y navegación */

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 245px;
    background: #162c44;
    color: #d8e5f2;
    padding: 22px 14px;
    z-index: 5;
}

.side-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 24px;
    border-bottom: 1px solid #2c435d;
}

.side-brand > span,
.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: linear-gradient(145deg, #08a1df, #14509a);
    font-weight: 900;
    color: #fff;
}

.side-brand strong,
.side-brand small {
    display: block;
}

.side-brand small {
    font-size: 11px;
    color: #94abc2;
}

.sidebar nav {
    padding-top: 18px;
    display: grid;
    gap: 5px;
}

.sidebar nav a {
    color: #d7e3ef;
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 9px;
    font-size: 14px;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: #1677bd;
    color: #fff;
}

/* Contenido principal y barra superior */

.app {
    margin-left: 245px;
    min-height: 100vh;
}

.topbar {
    height: 66px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 26px;
    position: sticky;
    top: 0;
    z-index: 4;
}

.topbar select,
.selector select,
.selector input {
    min-width: 220px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-actions a {
    color: var(--navy);
    font-weight: 700;
    text-decoration: none;
}

.bell {
    border: 0;
    background: #edf5fb;
    border-radius: 50%;
    width: 38px;
    height: 38px;
}

.role {
    font-size: 11px;
    font-weight: 800;
    background: #e7f4ff;
    color: #1263a6;
    padding: 5px 9px;
    border-radius: 999px;
}

/* Títulos y encabezados */

.content {
    padding: 26px;
    max-width: 1700px;
    margin: auto;
}

h1 {
    font-size: 28px;
    margin: 4px 0 8px;
}

h2 {
    font-size: 20px;
    margin: 0 0 5px;
}

h3 {
    margin: 10px 0;
}

p {
    margin: 5px 0 14px;
}

.muted,
.page-head p,
.panel-head p,
.hint,
.month-card p,
.hero p {
    color: var(--muted);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 800;
    font-size: 11px;
    color: #087dbe !important;
}

.hero,
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.hero {
    background: linear-gradient(120deg, #0e417d, #087fc5);
    color: #fff;
    padding: 30px;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.hero p {
    color: #dceeff;
}

.live {
    background: rgba(255, 255, 255, .15);
    padding: 9px 12px;
    border-radius: 999px;
    font-size: 12px;
}

/* Indicadores y paneles */

.kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.kpis article,
.panel,
.month-card,
.year-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.kpis article {
    padding: 18px;
}

.kpis span,
.kpis strong {
    display: block;
}

.kpis span {
    font-size: 12px;
    color: var(--muted);
}

.kpis strong {
    font-size: 26px;
    margin-top: 9px;
}

.kpis .accent {
    border-top: 3px solid var(--amber);
}

.panel {
    padding: 20px;
    margin: 18px 0;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.process {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.process span {
    padding: 14px 18px;
    background: #edf6fc;
    color: var(--navy);
    border-radius: 10px;
    font-weight: 800;
}

/* Botones y acciones */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5df;
    background: #fff;
    color: var(--navy);
    padding: 9px 14px;
    border-radius: 9px;
    font: inherit;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    filter: brightness(.98);
    transform: translateY(-1px);
}

.btn.primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.btn.danger {
    background: #fff0f2;
    border-color: #ffb8c2;
    color: #bd2940;
}

.btn.tiny {
    padding: 6px 9px;
    font-size: 12px;
}

.btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}

.actions {
    display: flex;
    gap: 8px;
}

/* Búsqueda, filtros y campos de formulario */

.search,
.selector {
    display: flex;
    align-items: end;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 13px;
    margin-bottom: 16px;
}

.search input {
    flex: 1;
}

.selector.three {
    display: grid;
    grid-template-columns: repeat(3, minmax(200px, 1fr));
}

.selector label {
    margin: 0;
}

.selector label .btn {
    margin-left: 7px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cbd5df;
    border-radius: 8px;
    padding: 10px 11px;
    font: inherit;
    background: #fff;
    color: var(--ink);
}

label {
    display: grid;
    gap: 6px;
    color: #244766;
    font-size: 12px;
    font-weight: 750;
}

/* Tablas y estados */

.table-wrap {
    overflow: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 13px;
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    background: #24588e;
    color: #fff;
    text-align: left;
    padding: 11px;
    white-space: nowrap;
}

td {
    padding: 10px 11px;
    border-bottom: 1px solid #e8edf3;
    vertical-align: middle;
}

tbody tr:hover {
    background: #f2f8fd;
}

td small {
    display: block;
    color: var(--muted);
    margin-top: 3px;
}

.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Hoja de Trabajo del Estado de Flujo de Efectivo */

.flow-sheet-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 16px 0 8px;
    color: #173f66;
}

.flow-worktable-wrap {
    max-height: 68vh;
}

.flow-worktable {
    width: 2734px;
    min-width: 2734px;
    table-layout: fixed;
    font-size: 15.94px;
}

.flow-worktable th,
.flow-worktable td {
    box-sizing: border-box;
}

.flow-worktable thead {
    position: sticky;
    top: 0;
    z-index: 4;
}

.flow-worktable th {
    text-align: center;
    white-space: normal;
    min-width: 92px;
    padding: 7px 5px;
    font-size: 15.94px;
}

.flow-worktable thead tr:first-child th[colspan="2"] {
    width: 300px;
}

.flow-worktable td.num,
.flow-worktable th.num {
    text-align: right;
    padding-right: 10px;
    padding-left: 6px;
}

.flow-worktable thead tr:last-child th {
    text-align: right;
    padding-right: 10px;
}

.flow-worktable thead tr:first-child th:first-child,
.flow-worktable tbody td:first-child,
.flow-worktable tfoot th:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 64px;
    min-width: 64px;
    max-width: 64px;
    font-weight: 800;
}

.flow-worktable thead tr:first-child th:nth-child(2),
.flow-worktable tbody td:nth-child(2),
.flow-worktable tfoot th:nth-child(2) {
    position: sticky;
    left: 64px;
    z-index: 2;
    width: 270px;
    min-width: 270px;
    max-width: 270px;
    text-align: left;
}

.flow-worktable tbody td {
    font-size: 15.94px;
}

.flow-worktable thead tr:first-child th:first-child,
.flow-worktable thead tr:first-child th:nth-child(2) {
    z-index: 6;
    background: #24588e;
}

.flow-worktable tbody tr:nth-child(odd) td {
    background: #edf6fd;
}

.flow-worktable tbody tr:nth-child(even) td {
    background: #f2f2f2;
}

.flow-worktable tbody tr:hover td {
    background: #fff4bf;
}

.flow-worktable .manual-head,
.flow-worktable .manual-cell {
    background: #fff9e8 !important;
}

.flow-worktable .manual-cell input {
    width: 134px;
    padding: 5px 6px;
    text-align: right;
    font-size: 15.94px;
    border-color: #e2c878;
}

.flow-worktable tfoot th {
    position: static;
    background: #dce9f7;
    color: #173f66;
    border-top: 2px solid #6f94bb;
    padding: 10px 7px;
    font-size: 15.94px;
    font-weight: 800;
}

.flow-worktable tfoot tr:first-child th {
    background: #d8e7f5;
}

.flow-worktable tfoot tr:last-child th {
    background: #eef4fa;
}

.flow-worktable tfoot tr:first-child th:nth-child(2),
.flow-worktable .flow-totals-row th:nth-child(2),
.flow-worktable .flow-difference-row th:nth-child(2) {
    font-size: 20px;
    letter-spacing: .02em;
}

.flow-worktable .flow-difference-row th {
    background: #eef4fa;
    border-top: 2px solid #9db4ca;
    border-bottom: 1px solid #9db4ca;
}

.flow-save-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 12px;
    color: var(--muted);
}

.flow-control-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.flow-control-grid > div {
    display: grid;
    gap: 5px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.flow-control-grid span {
    color: var(--muted);
    font-size: 17.6px;
}

.flow-control-grid strong {
    color: #173f66;
    font-size: 25.6px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.flow-control-grid .ok {
    background: #e5f8f1;
    border-color: #8dd7bd;
}

.flow-control-grid .warn {
    background: #fff4cf;
    border-color: #e4c25f;
}

@media (max-width: 800px) {
    .flow-control-grid {
        grid-template-columns: 1fr;
    }
}

.badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 850;
    white-space: nowrap;
}

.badge.ok {
    background: #c7f5e4;
    color: #087457;
}

.badge.warn {
    background: #fff0bd;
    color: #8b5b00;
}

.badge.neutral {
    background: #e7eef6;
    color: #4c6074;
}

/* Ejercicios y periodos mensuales */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 15px;
}

.year-card {
    padding: 20px;
    text-decoration: none;
    color: var(--ink);
}

.year-card span,
.year-card small {
    display: block;
    color: var(--muted);
}

.year-card strong {
    font-size: 36px;
    color: var(--navy);
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 14px;
}

.month-card {
    padding: 18px;
}

.month-card > div {
    display: flex;
    justify-content: space-between;
}

.month-card > div > span {
    font-weight: 800;
}

/* Balance de comprobación y cierre */

.balance-table th {
    text-align: center;
}

.balance-table thead tr:first-child > th:nth-child(2),
.balance-table thead tr:first-child > th:nth-child(3) {
    text-align: left !important;
}

.balance-table tbody tr:not(.balance-subtotal):not(.balance-total-general) > td:nth-child(3) {
    text-align: left !important;
}

.balance-view-tools {
    align-items: end;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(230px, .8fr) minmax(280px, 1.4fr) auto;
    margin-bottom: 14px;
    padding: 14px;
}

.balance-view-tools label {
    color: var(--navy);
    display: grid;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
}

.balance-view-tools select,
.balance-view-tools input {
    min-height: 40px;
}

.balance-tree-column,
.balance-tree-cell {
    box-sizing: border-box;
    min-width: 42px;
    padding-left: 6px !important;
    padding-right: 6px !important;
    text-align: center !important;
    width: 42px;
}

.balance-tree-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 5px;
    color: var(--blue);
    cursor: pointer;
    display: inline-flex;
    font-size: 18px;
    height: 26px;
    justify-content: center;
    padding: 0;
    width: 28px;
}

.balance-tree-toggle:hover,
.balance-tree-toggle:focus-visible {
    background: #dcecff;
    outline: 2px solid #83b5e8;
}

.balance-tree-spacer {
    display: inline-block;
    height: 26px;
    width: 28px;
}

.balance-row-hidden {
    display: none !important;
}

.balance-table .account-description {
    display: inline-block;
    padding-left: 0 !important;
    text-align: left !important;
    width: 100%;
}

.balance-table .balance-principal td {
    color: var(--blue);
    font-weight: 800;
    background: #f2f8ff;
}

.balance-table .balance-level-2 td:nth-child(2),
.balance-table .balance-level-2 td:nth-child(3) {
    font-weight: 700;
}

.balance-table .balance-subtotal td {
    background: #eef4fb;
    border-top: 2px solid #8ba8c7;
    color: var(--navy);
    font-weight: 800;
}

.balance-table .balance-subtotal td:first-child,
.balance-table .balance-total-general td:first-child {
    text-align: right;
}

.balance-table .balance-total-general td {
    background: var(--navy);
    border-top: 3px double #fff;
    color: #fff;
    font-weight: 900;
}

.close-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff8ea;
    border: 1px solid #f0d394;
    padding: 14px;
    border-radius: 12px;
    margin-top: 14px;
}

.back {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--navy);
    font-weight: 800;
    text-decoration: none;
}

/* Análisis de importes y trazabilidad */

.amount-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 12px;
}

.amount-card {
    appearance: none;
    text-align: left;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 16px;
    cursor: pointer;
    box-shadow: var(--shadow);
    color: var(--ink);
}

.amount-card:hover,
.amount-card.active {
    border-color: var(--blue);
    box-shadow: 0 10px 28px rgba(7, 139, 214, .18);
}

.amount-card span,
.amount-card strong,
.amount-card small {
    display: block;
}

.amount-card span {
    color: var(--muted);
    font-size: 12px;
}

.amount-card strong {
    font-size: 19px;
    margin: 8px 0;
}

.amount-card small {
    color: var(--blue);
    font-weight: 750;
}

.trace-panel {
    min-height: 280px;
}

.trace-report-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.trace-report-actions[hidden] {
    display: none !important;
}

.trace-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 130px 130px 130px 110px;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--line);
}

.trace-row strong {
    overflow-wrap: anywhere;
}

.trace-row button {
    justify-self: end;
}

.trace-path {
    color: var(--blue) !important;
}

.trace-toolbar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
}

.trace-table table {
    min-width: 850px;
}

.trace-detail-table table {
    min-width: 1227px;
    table-layout: fixed;
}

.trace-detail-table .trace-col-siaf {
    width: 165px;
}

.trace-detail-table .trace-col-document {
    width: 163px;
}

.trace-detail-table .trace-col-doc-number {
    width: 128px;
}

.trace-detail-table .trace-col-date {
    width: 88px;
}

.trace-detail-table .trace-col-short {
    width: 43px;
}

.trace-detail-table th:nth-child(5),
.trace-detail-table th:nth-child(6),
.trace-detail-table th:nth-child(7) {
    font-size: 10.4px;
}

.trace-detail-table .trace-col-provider {
    width: 150px;
}

.trace-detail-table .trace-col-amount {
    width: 110px;
}

.trace-detail-table .trace-col-glosa {
    width: 198px;
}

.trace-detail-table .trace-col-action {
    width: 65px;
}

.trace-detail-table th,
.trace-detail-table td {
    overflow-wrap: anywhere;
    white-space: normal;
}

.trace-detail-table .trace-total-row td {
    background: #dce9f7;
    border-top: 2px solid #6f94bb;
    color: var(--navy);
    font-weight: 900;
}

.trace-detail-table .trace-total-row td:first-child {
    text-align: right;
}

.trace-detail-table th.trace-sortable {
    cursor: pointer;
    user-select: none;
}

.trace-detail-table th.trace-sortable:hover,
.trace-detail-table th.trace-sortable:focus-visible {
    background: #174a7d;
    outline: 2px solid #9fd3ff;
    outline-offset: -2px;
}

.trace-detail-table th.trace-sortable span {
    display: inline-block;
    font-size: .85em;
    margin-left: 3px;
}

.trace-table th,
.trace-table td {
    text-align: left;
    vertical-align: top;
}

.trace-table th.num,
.trace-table td.num {
    text-align: right;
}

.trace-table .trace-provider {
    text-align: left;
}

.trace-table tbody tr:nth-child(odd) td {
    background: #eaf4ff;
}

.trace-table tbody tr:nth-child(even) td {
    background: #ffffff;
}

.trace-table tbody tr:hover td {
    background: #d9ecff;
}

.trace-table tbody tr.trace-return-row td {
    background: #fff4cc !important;
    transition: background-color .8s ease;
}

.balance-table tr.balance-return-row td {
    background: #fff4cc;
    transition: background-color .8s ease;
}

.trace-eye-button {
    align-items: center;
    display: inline-flex;
    font-size: 16px;
    justify-content: center;
    min-height: 30px;
    min-width: 34px;
    padding: 4px 8px;
}

.trace-table td small {
    max-width: 330px;
    white-space: normal;
}

.empty {
    padding: 35px;
    text-align: center;
    color: var(--muted);
    background: #fff;
    border: 1px dashed #bdcad7;
    border-radius: 13px;
}

.control-note,
.callout {
    background: #e9f7ff;
    border-left: 4px solid var(--blue);
    padding: 13px;
    margin-top: 14px;
    color: #28516d;
}

/* Pestañas y descargas */

.tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tabs a,
.tabs span {
    padding: 9px 12px;
    border-radius: 9px;
    background: #eaf0f6;
    color: #31516e;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}

.tabs .active {
    background: var(--blue);
    color: #fff;
}

.tabs .disabled {
    opacity: .55;
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.download-list {
    display: grid;
    gap: 8px;
}

.download-list a {
    padding: 11px;
    background: #f1f7fb;
    border-radius: 8px;
    color: var(--navy);
    text-decoration: none;
    font-weight: 750;
}

/* Formularios y ventanas modales */

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-grid.one {
    grid-template-columns: 1fr;
}

.form-grid .wide {
    grid-column: 1/-1;
}

.modal-title,
.modal-actions {
    grid-column: 1/-1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title button {
    font-size: 28px;
    border: 0;
    background: none;
    cursor: pointer;
}

.modal-actions {
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

dialog {
    border: 0;
    border-radius: 15px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
    width: min(800px, 94vw);
    padding: 22px;
}

dialog::backdrop {
    background: rgba(11, 27, 43, .52);
}

/* Alertas y notificaciones */

.alert {
    padding: 12px 14px;
    border-radius: 9px;
    margin: 10px 0;
}

.alert.danger {
    background: #fff0f2;
    color: #a42639;
}

.alert.success {
    background: #d9f8ec;
    color: #087457;
}

#toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 20;
    background: #162c44;
    color: #fff;
    padding: 13px 18px;
    border-radius: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: .2s;
    pointer-events: none;
    max-width: 450px;
}

#toast.show {
    opacity: 1;
    transform: none;
}

#toast.error {
    background: #af263b;
}

/* Pantalla de acceso */

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 15% 15%, #d8efff, transparent 35%), linear-gradient(145deg, #f8fbfe, #e5edf5);
}

.login-card {
    width: min(430px, 92vw);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 24px 70px rgba(20, 63, 110, .18);
}

.login-card .brand-mark {
    width: 58px;
    height: 58px;
}

.setup-link {
    display: block;
    text-align: center;
    margin-top: 18px;
    color: var(--muted);
    font-size: 12px;
}

/* Controles de navegación móvil */

.mobile-menu {
    display: none;
}

.mobile-menu,
.topbar button {
    cursor: pointer;
}

/* Diseño adaptable: pantallas medianas */

@media (max-width: 1100px) {

    .month-grid,
    .amount-grid {
        grid-template-columns: repeat(2, 1fr);
    }

/* Indicadores y paneles */

    .kpis {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Diseño adaptable: dispositivos móviles */

@media (max-width: 760px) {

    .balance-view-tools {
        grid-template-columns: 1fr;
    }

/* Barra lateral y navegación */

    .sidebar {
        transform: translateX(-100%);
        transition: .2s;
    }

    .sidebar.open {
        transform: none;
    }

/* Contenido principal y barra superior */

    .app {
        margin-left: 0;
    }

/* Controles de navegación móvil */

    .mobile-menu {
        display: block;
    }

/* Títulos y encabezados */

    .content {
        padding: 16px;
    }

    .topbar {
        padding: 0 14px;
    }

    .kpis,
    .month-grid,
    .amount-grid,
    .selector.three,
    .split,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .hero,
    .page-head,
    .close-bar {
        display: block;
    }

    .actions {
        margin-top: 12px;
    }

    .trace-row {
        grid-template-columns: 1fr 1fr;
    }

    .trace-row strong {
        grid-column: 1/-1;
    }
}

/* Estilos de impresión */

@media print {

    .sidebar,
    .topbar,
    .btn,
    .selector,
    .balance-view-tools,
    .page-head .actions,
    .back {
        display: none !important;
    }

    .balance-table th:last-child,
    .balance-table td:last-child {
        display: none !important;
    }

    .balance-tree-column,
    .balance-tree-cell {
        min-width: 12px;
        padding: 0 !important;
        width: 12px;
    }

/* Contenido principal y barra superior */

    .app {
        margin: 0;
    }

/* Títulos y encabezados */

    .content {
        padding: 0;
    }

/* Tablas y estados */

    .table-wrap {
        overflow: visible;
        box-shadow: none;
    }

    table {
        font-size: 9px;
    }

    th,
    td {
        padding: 5px;
    }

    .panel {
        box-shadow: none;
    }
}
