/* Compact application layout, preserving theme variables and touch targets. */
@media(min-width:1001px){.app-shell{grid-template-columns:232px minmax(0,1fr)}.sidebar{padding:18px 12px}.main{padding:20px 24px 32px}.brand-wrap{margin-bottom:14px}.mode-card{padding:12px;margin-bottom:14px}.nav-item,.nav-tree summary{padding:9px 11px}}
.app-shell .topbar{gap:12px;margin-bottom:16px;align-items:center}.app-shell .topbar h1{font-size:clamp(1.45rem,2vw,1.9rem);letter-spacing:-.025em}.app-shell .top-actions{gap:7px}.app-shell .primary-button,.app-shell .secondary-button{padding:9px 12px;font-size:.8rem}.app-shell .period-filter{padding:12px 16px;gap:12px;margin-bottom:14px;border-radius:14px}.app-shell .period-filter-copy{min-width:150px}.app-shell .period-filter label{font-size:.75rem}.app-shell input,.app-shell select{min-height:40px;padding:8px 10px}.app-shell .summary-grid{gap:12px}.app-shell .summary-card{padding:16px;min-height:114px;border-radius:15px;display:flex;flex-direction:column;justify-content:space-between;gap:7px;box-shadow:0 3px 12px rgba(12,39,59,.035)}.app-shell .summary-card>strong{font-size:clamp(1.18rem,1.65vw,1.55rem);line-height:1.2;letter-spacing:-.025em}.app-shell .summary-card>span,.app-shell .summary-card>small{line-height:1.4}.app-shell .summary-card>small{font-size:.73rem}.app-shell .panel{padding:18px;border-radius:15px}.app-shell .financial-summary,.app-shell .bank-account-grid{gap:12px}.app-shell .financial-card,.app-shell .bank-account-card{padding:15px;border-radius:13px}.app-shell .bank-account-card h3{margin:5px 0 12px}.app-shell .bank-account-card label{display:flex;justify-content:space-between;gap:10px;padding:7px 0}.app-shell .bank-account-card strong{white-space:nowrap}.app-shell .welcome-row{margin:10px 0 14px}.payment-alert-grid{gap:10px;margin:12px 0}.payment-alert{padding:12px 14px;border-radius:12px}.payment-alert span{font-size:.8rem}.credit-summary-line{display:flex;justify-content:space-between;gap:8px;border-top:1px solid rgba(160,180,195,.3);padding-top:8px;margin-top:2px;font-size:.73rem;line-height:1.4}.credit-summary-line strong{white-space:nowrap;font-size:.85rem}.overdraft-warning{border-color:#c8314a!important;background:#fff0f2!important;color:#89172c!important}.bank-account-grid{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}.report-dialog{max-width:min(1100px,calc(100vw - 24px))}.report-table th,.report-table td{padding:9px 10px;vertical-align:top}.report-table td small{line-height:1.5;margin-top:4px}
@media(max-width:1000px){.app-shell .main{padding:16px}.app-shell .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.app-shell .topbar{align-items:flex-start}.app-shell .top-actions{max-width:60%;display:flex;flex-wrap:wrap}.app-shell .financial-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.report-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.app-shell .main{padding:12px 10px 28px}.app-shell .topbar{flex-wrap:wrap;gap:10px}.app-shell .top-actions{max-width:none;width:100%;margin-left:0;display:flex;justify-content:flex-start;gap:6px}.app-shell .top-actions>button{min-height:42px;flex:1 1 auto}.app-shell .top-actions .user-chip{width:100%;padding:7px 10px}.app-shell .period-filter{padding:12px;display:flex;flex-wrap:wrap}.app-shell .period-filter-copy{width:100%}.app-shell .period-filter-controls{display:flex;flex-wrap:wrap;width:100%;gap:8px}.app-shell .period-filter label{flex:1 1 130px;min-width:0}.app-shell .period-filter input,.app-shell .period-filter select{width:100%;max-width:100%;min-width:0}.app-shell .period-filter button{min-height:42px;flex:1}.app-shell .summary-grid{gap:9px}.app-shell .summary-card{padding:12px;min-height:115px;gap:6px}.app-shell .summary-card>strong{font-size:1.18rem}.app-shell .summary-card>span{font-size:.74rem}.app-shell .summary-card>small{font-size:.68rem}.credit-summary-line{flex-direction:column;gap:2px;font-size:.66rem}.credit-summary-line strong{font-size:.8rem}.app-shell .panel{padding:13px}.app-shell .bank-account-grid{grid-template-columns:1fr}.app-shell .financial-card{padding:12px}.payment-alert-grid{grid-template-columns:1fr}.section-toolbar{flex-wrap:wrap;gap:10px}.report-dialog{width:calc(100vw - 16px);max-width:none;margin:8px;max-height:calc(100dvh - 16px)}.report-dialog .report-sheet{padding:12px}.report-dialog-actions{position:sticky;bottom:0;display:flex;flex-wrap:wrap;gap:7px;background:var(--white);padding:10px}.report-dialog-actions button{flex:1;min-height:44px}.stack-form label{min-width:0}#bankTransferDialog .form-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:no-preference){.summary-card[role=button]{transition:box-shadow .15s,transform .15s}.summary-card[role=button]:hover{transform:translateY(-1px)}}
@media print{.credit-summary-line{color:inherit}.report-dialog-actions{display:none!important}}
.app-shell .topbar{padding-top:0}.app-shell .user-chip{position:static;display:flex;align-items:center;gap:10px;order:0;min-height:40px}.app-shell .summary-card{justify-content:flex-start;gap:6px;padding:14px}.app-shell .summary-card>strong{margin:2px 0}.app-shell .summary-card>small{margin:0}.app-shell .credit-summary-line{margin-top:auto;padding-top:7px}.app-shell .top-actions .user-chip{font-size:.7rem}
@media(min-width:1001px){.app-shell .top-actions{max-width:75%}.app-shell .top-actions .user-chip{max-width:160px}.app-shell .summary-card{min-height:140px}}
@media(max-width:600px){.app-shell .top-actions .user-chip{width:100%;justify-content:space-between}.app-shell .summary-card{padding:12px}.app-shell .summary-card>strong{margin:0}.app-shell .credit-summary-line{margin-top:4px}}
@media(max-width:1000px){.app-shell{grid-template-columns:minmax(0,1fr)}.app-shell .main{width:100%;min-width:0}.app-shell .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.app-shell .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.app-shell .summary-card{min-width:0}.app-shell .summary-card>strong{font-size:1.1rem}.app-shell .financial-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:600px){.app-shell .top-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:7px}.app-shell .top-actions .user-chip{order:-1;grid-column:1/-1}.app-shell .top-actions>button{grid-column:auto!important;width:100%;min-width:0;padding:8px 6px;font-size:.75rem}.app-shell .top-actions .capture-button{min-width:0}.app-shell .summary-card{gap:5px}}
.app-shell .top-actions .user-chip{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;row-gap:0;min-width:0;max-width:180px}.app-shell .user-chip #currentUserName{grid-column:1;grid-row:1;overflow-wrap:anywhere}.app-shell .user-chip #currentUserRole{grid-column:1;grid-row:2}.app-shell .user-chip #logoutButton{grid-column:2;grid-row:1/span 2;align-self:center;max-width:100%}
@media(max-width:600px){.app-shell .top-actions .user-chip{max-width:none;width:100%}}

/* Select each position without combining money and credit. */
.account-topic-summary{grid-template-columns:repeat(3,minmax(0,1fr))!important}.account-summary-topic{display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:0;text-align:left;cursor:pointer;border:1px solid var(--line,#c8d9df);border-radius:10px;background:var(--panel,#f0f5f8);color:var(--text,#16324b);padding:13px;font:inherit}.account-summary-topic span{font-size:.75rem;color:inherit}.account-summary-topic strong{font-size:1.08rem;color:inherit;overflow-wrap:anywhere}.account-summary-topic[aria-pressed="true"]{border-color:#09a98f;box-shadow:inset 0 -3px #09a98f}.account-summary-topic:focus-visible{outline:3px solid #09a98f;outline-offset:3px}@media(max-width:540px){.account-topic-summary{grid-template-columns:1fr!important}.account-summary-topic{flex-direction:row;justify-content:space-between;align-items:center;padding:12px;gap:12px}.account-summary-topic strong{font-size:1rem}}
/* Keep the previous report palette on interactive summaries too. */
body #chartDetailsContent .account-summary-topic{background:#f1f5f7;color:#16324b;border-color:#c8d9df}
body #chartDetailsContent .account-summary-topic span{color:#405a6b!important}
body #chartDetailsContent .account-summary-topic strong{color:#16324b!important}
body #chartDetailsContent .account-summary-topic[aria-pressed="true"]{background:#e4f3ee;border-color:#087e70}
body.dark-theme #chartDetailsContent .account-summary-topic{background:#1b3545;color:#eef6fa;border-color:#688494}
body.dark-theme #chartDetailsContent .account-summary-topic span{color:#c5d8e2!important}
body.dark-theme #chartDetailsContent .account-summary-topic strong{color:#f4fbff!important}
body.dark-theme #chartDetailsContent .account-summary-topic[aria-pressed="true"]{background:#234652;border-color:#69e4c8;box-shadow:inset 0 -3px #69e4c8}
