/* Shared presentation. Financial calculations and record state are unchanged. */
/* Match the overview's page gutters; keep login, dialogs and print layouts intact. */
@media screen {
  .has-centralle-menu :is(main.standalone-main, main.users-main) {
    width:100%;
    max-width:none;
    margin-inline:0;
    padding-inline:42px;
  }
}
@media screen and (max-width:820px) {
  .has-centralle-menu :is(main.standalone-main, main.users-main) {
    padding-inline:22px;
  }
}
.has-centralle-menu main { min-width:0; }
.has-centralle-menu .standalone-heading,
.has-centralle-menu .report-card-heading { flex-wrap:wrap; gap:18px; }
.has-centralle-menu .standalone-heading > div:first-child { min-width:0; flex:1 1 340px; }
.has-centralle-menu .standalone-actions { flex-wrap:wrap; justify-content:flex-end; max-width:100%; min-width:0; }
.has-centralle-menu .standalone-actions > label { min-width:0; }
.has-centralle-menu .report-card-heading > div:first-child { min-width:0; flex:1 1 280px; }
.has-centralle-menu .report-card-heading h2 { overflow-wrap:anywhere; line-height:1.35; }
.has-centralle-menu .report-card-heading > button,
.has-centralle-menu .report-card-heading > a { flex-shrink:0; }
.has-centralle-menu .standalone-main > .report-card + .report-card,
.has-centralle-menu #reviewIssues > .report-card + .report-card { margin-top:22px; }
.has-centralle-menu .finance-page-filters,
.has-centralle-menu .expense-toolbar,
.has-centralle-menu .operations-controls { align-items:flex-end; gap:14px; }
.has-centralle-menu .finance-page-filters label,
.has-centralle-menu .expense-toolbar label,
.has-centralle-menu .flow-filters label { font-size:14px; line-height:1.4; }
.has-centralle-menu .finance-page-filters select,
.has-centralle-menu .expense-toolbar select,
.has-centralle-menu .expense-toolbar input,
.has-centralle-menu .flow-filters select,
.has-centralle-menu .finance-filters select { font:400 16px/1.4 "DM Sans",sans-serif; min-height:44px; background:#fff; }
.has-centralle-menu .report-table-wrap { min-width:0; max-width:100%; }
.has-centralle-menu .ui-table { width:100%; table-layout:fixed; min-width:0; }
.has-centralle-menu .ui-table th,
.has-centralle-menu .ui-table td { padding:15px 12px; vertical-align:middle; white-space:normal; overflow-wrap:anywhere; line-height:1.5; }
.has-centralle-menu .ui-table th { font-size:11px; line-height:1.4; }
.has-centralle-menu .ui-table td { font-size:14px; }
.has-centralle-menu .ui-table td:first-child { min-width:0; max-width:none; white-space:normal; }
.has-centralle-menu .ui-table td strong { font-size:inherit; line-height:1.45; }
.has-centralle-menu .ui-table td small { font-size:12px; line-height:1.5; margin-top:5px; }
.has-centralle-menu .ui-table [data-column-kind="money"] { text-align:right; font-variant-numeric:tabular-nums; overflow-wrap:normal; }
.has-centralle-menu .ui-table td[data-column-kind="money"] > strong { white-space:nowrap; }
.has-centralle-menu .ui-table [data-column-kind="date"] { overflow-wrap:normal; }
.has-centralle-menu .ui-table [data-column-kind="status"] { text-align:center; }
.has-centralle-menu .ui-table th[data-column-kind="actions"] { text-align:right; }
.ui-table-scroll-hint { margin:0; padding:12px 20px; color:#715315; background:#fffaf0; border-bottom:1px solid var(--line); font-size:13px; line-height:1.5; }
.ui-row-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.ui-row-actions > :is(button,a) { display:inline-flex; align-items:center; justify-content:center; min-height:38px; max-width:100%; padding:8px 11px; margin:0; line-height:1.25; text-align:center; white-space:normal; text-decoration:none; }
.has-centralle-menu .ui-table .report-status { display:inline-flex; align-items:center; justify-content:center; max-width:100%; font-size:12px; line-height:1.35; white-space:normal; text-align:center; }
/* Room goes to descriptions; action columns keep their controls visible. */
.business-table[data-columns="7"] th:nth-child(1) { width:24%; }
.business-table[data-columns="7"] th:nth-child(2) { width:15%; }
.business-table[data-columns="7"] th:nth-child(3) { width:14%; }
.business-table[data-columns="7"] th:nth-child(n+4) { width:12%; }
.business-table[data-columns="7"] th:last-child { width:11%; }
.business-table[data-columns="6"] th:first-child { width:25%; }
.business-table[data-columns="6"] th:nth-child(2) { width:22%; }
.business-table[data-columns="6"] th:last-child { width:16%; }
.charge-table th:first-child { width:29%; }
.charge-table th:nth-child(2) { width:10%; }
.charge-table th:nth-child(3) { width:12%; }
.charge-table th:nth-child(4) { width:19%; }
.charge-table th:nth-child(5) { width:14%; }
.charge-table th:last-child { width:16%; }
.expense-table th:first-child { width:30%; }
.expense-table th:nth-child(2) { width:15%; }
.expense-table th:nth-child(3) { width:12%; }
.expense-table th:nth-child(4) { width:17%; }
.expense-table th:nth-child(5) { width:13%; }
.expense-table th:last-child { width:13%; }
.account-table th:first-child { width:29%; }
.account-table th:last-child { width:14%; }
.recurrence-table th:first-child { width:31%; }
.recurrence-table th:nth-child(2) { width:11%; }
.recurrence-table th:nth-child(3) { width:15%; }
.recurrence-table th:nth-child(4) { width:13%; }
.recurrence-table th:nth-child(5) { width:11%; }
.recurrence-table th:last-child { width:19%; }
.recurrence-guide { display:grid; grid-template-columns:1fr 1fr; gap:14px 28px; padding:18px 20px; margin:0 0 22px; border:1px solid #e8dfc5; border-radius:14px; background:#fffaf0; color:#625743; font-size:14px; line-height:1.6; }
.recurrence-guide p { margin:0; }
.recurrence-guide strong { display:block; margin-bottom:3px; color:#715315; }
.recurrence-table td.recurrence-description { min-width:0; max-width:none; }
.recurrence-table .recurrence-description > strong { font-weight:700; }
.recurrence-table .recurrence-detail { color:var(--muted); }
.recurrence-table .recurrence-origin { color:#86714b; }
.has-centralle-menu .recurrence-table .report-status { padding:6px 7px; }
/* Cards and forms must also handle long names and large totals. */
:is(.account-summary,.expense-metrics,.flow-projections,.business-summary) > :is(article,div) { min-width:0; }
:is(.account-summary,.expense-metrics,.flow-projections,.business-summary) strong { overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.expense-list article > div:first-child { min-width:0; flex:1; overflow-wrap:anywhere; }
.expense-list .row-actions { flex:0 1 auto; justify-content:flex-end; }
.has-centralle-menu dialog.modal { max-height:calc(100dvh - 32px); overflow:auto; }
.has-centralle-menu .modal-header { align-items:flex-start; }
.has-centralle-menu .modal-header > :first-child { min-width:0; }
.has-centralle-menu .modal-header h2 { overflow-wrap:anywhere; }
.has-centralle-menu .modal-header .icon-button { flex-shrink:0; }
.has-centralle-menu .form-grid > label { min-width:0; }
.has-centralle-menu dialog :is(input,select,textarea) { max-width:100%; }
.has-centralle-menu .modal-actions,
.has-centralle-menu .dialog-actions { flex-wrap:wrap; gap:10px; }
.has-centralle-menu .operations-table[data-layout="editable"] { min-width:1180px; table-layout:auto; }
@media (max-width:1200px) and (min-width:901px) {
  .has-centralle-menu .standalone-actions { justify-content:flex-start; }
  .has-centralle-menu .report-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:1100px) {
  /* The sidebar leaves less horizontal room on small laptops. */
  .has-centralle-menu .ui-table[data-layout="records"] thead { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
  .has-centralle-menu .ui-table[data-layout="records"],
  .has-centralle-menu .ui-table[data-layout="records"] tbody { display:block; width:100%; min-width:0; }
  .has-centralle-menu .ui-table[data-layout="records"] tbody { padding:14px; }
  .has-centralle-menu .ui-table[data-layout="records"] tbody tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding:18px; margin-bottom:12px; border:1px solid var(--line); border-radius:13px; background:#fff; }
  .has-centralle-menu .ui-table[data-layout="records"] tbody tr:last-child { margin-bottom:0; }
  .has-centralle-menu .ui-table[data-layout="records"] td { display:block; width:auto; min-width:0; max-width:none; border:0; padding:0; text-align:left; white-space:normal; }
  .has-centralle-menu .ui-table[data-layout="records"] td::before { content:attr(data-label); display:block; margin-bottom:5px; color:#777; font-size:11px; font-weight:700; line-height:1.4; text-transform:uppercase; letter-spacing:.035em; }
  .has-centralle-menu .ui-table[data-layout="records"] td[data-column-kind="description"],
  .has-centralle-menu .ui-table[data-layout="records"] td[data-column-kind="actions"],
  .has-centralle-menu .ui-table[data-layout="records"] td[colspan] { grid-column:1 / -1; }
  .has-centralle-menu .ui-table[data-layout="records"] td[data-column-kind="actions"]::before,
  .has-centralle-menu .ui-table[data-layout="records"] tr[data-empty-row="true"] td::before { display:none; }
  .has-centralle-menu .ui-table[data-layout="records"] .ui-row-actions { justify-content:flex-start; padding-top:3px; }
  .has-centralle-menu .ui-table[data-layout="records"] td small { margin-top:4px; }
  .recurrence-guide { grid-template-columns:1fr; }
}
@media (max-width:640px) {
  .has-centralle-menu .standalone-heading > div:first-child { flex-basis:auto; }
  .has-centralle-menu .standalone-actions { justify-content:flex-start; width:100%; }
  .has-centralle-menu .standalone-actions > label { flex:1 1 100%; }
  .has-centralle-menu .standalone-actions > label input { width:100%; min-width:0; }
  .has-centralle-menu .report-card-heading > div:first-child { flex-basis:100%; }
  .has-centralle-menu .report-card-heading > :is(button,a),
  .has-centralle-menu .report-card-heading .operations-controls { width:100%; }
  .has-centralle-menu .operations-controls > :is(button,a) { flex:1 1 auto; }
  .has-centralle-menu .operations-controls label { flex:1 1 100%; min-width:0; }
  .has-centralle-menu .expense-toolbar { gap:12px; }
  .has-centralle-menu .expense-toolbar > label { width:100%; min-width:0; flex:1 1 100%; }
  .has-centralle-menu .ui-table[data-layout="records"] tbody { padding:12px; }
  .has-centralle-menu .ui-table[data-layout="records"] tbody tr { padding:16px; gap:14px; }
  .has-centralle-menu .ui-table td { font-size:14px; }
  .has-centralle-menu .ui-table td[data-column-kind="money"] > strong { white-space:normal; }
  .has-centralle-menu .charge-summary { grid-template-columns:1fr; }
  .has-centralle-menu .modal-actions > button,
  .has-centralle-menu .dialog-actions > button { flex:1 1 130px; }
  .has-centralle-menu .expense-list .row-actions { width:100%; justify-content:flex-start; }
}
@media print {
  .has-centralle-menu .ui-table[data-layout="records"] { display:table; table-layout:auto; }
  .has-centralle-menu .ui-table[data-layout="records"] thead { position:static; display:table-header-group; width:auto; height:auto; margin:0; clip:auto; overflow:visible; white-space:normal; }
  .has-centralle-menu .ui-table[data-layout="records"] tbody { display:table-row-group; padding:0; }
  .has-centralle-menu .ui-table[data-layout="records"] tbody tr { display:table-row; border:0; padding:0; }
  .has-centralle-menu .ui-table[data-layout="records"] td { display:table-cell; padding:9px; }
  .has-centralle-menu .ui-table[data-layout="records"] td::before { display:none; }
}

@media (max-width:640px) {
  .has-centralle-menu .ui-row-actions > :is(button,a) { min-height:44px; }
}
