:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17231f;
  background: #f3f6f4;
  --ink: #17231f;
  --muted: #5b6963;
  --brand-950: #092e26;
  --brand-900: #103d32;
  --brand-700: #14644f;
  --brand-600: #14745a;
  --brand-100: #e3f3ec;
  --brand-50: #f2faf6;
  --line: #d9e2dd;
  --line-strong: #bbc9c1;
  --surface: #ffffff;
  --surface-soft: #f7faf8;
  --danger: #8d2f29;
  --danger-soft: #fbe9e7;
  --warning-soft: #fff7dc;
  --radius: 1rem;
  --radius-small: .7rem;
  --shadow: 0 14px 38px rgb(10 47 37 / 9%);
  --shadow-small: 0 5px 18px rgb(10 47 37 / 6%);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; scroll-padding-top: 9rem; }
body { margin: 0; color: var(--ink); background: linear-gradient(180deg, #f8faf8 0, #f3f6f4 22rem); line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--brand-700); }
a:hover { color: var(--brand-900); }
button, input, select, textarea { font: inherit; }
button, .button-link { min-height: 2.75rem; }
:focus-visible { outline: 3px solid #a35d00; outline-offset: 3px; box-shadow: 0 0 0 5px #fff; }
.skip-link { position: fixed; z-index: 100; top: .5rem; left: .5rem; transform: translateY(-160%); padding: .7rem 1rem; border-radius: .5rem; color: #fff; background: var(--brand-900); font-weight: 700; }
.skip-link:focus { transform: translateY(0); }

.auth-page { min-height: 100vh; background: linear-gradient(145deg, #edf4ef 0%, #f7f8f5 55%, #e7f0ec 100%); }
.auth-shell { width: min(440px, 100%); margin: 0 auto; padding: max(2rem, 8vh) 1rem 3rem; }
.auth-brand { display: inline-flex; align-items: center; gap: .62rem; width: fit-content; margin: 0 auto 1rem; color: var(--brand-900); font-size: 1.58rem; font-weight: 800; letter-spacing: -.035em; text-decoration: none; }
.auth-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.auth-toolbar .auth-brand { margin: 0; }
.language-switcher { display: inline-flex; gap: .15rem; padding: .2rem; border: 1px solid rgb(255 255 255 / 24%); border-radius: 999px; background: rgb(255 255 255 / 8%); }
.language-choice { min-width: 2.45rem; min-height: 2.25rem; padding: .3rem .55rem; border: 0; border-radius: 999px; color: #dcebe5; background: transparent; font-size: .75rem; font-weight: 800; letter-spacing: .035em; line-height: 1; }
.language-choice:hover { color: #fff; background: rgb(255 255 255 / 12%); }
.language-choice[aria-pressed="true"] { color: var(--brand-900); background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / 18%); }
.language-switcher-light { border-color: var(--line); background: #edf3ef; }
.language-switcher-light .language-choice { color: var(--brand-700); }
.language-switcher-light .language-choice[aria-pressed="true"] { color: #fff; background: var(--brand-700); }
.auth-card { padding: clamp(1.3rem, 5vw, 1.8rem); border-color: rgb(16 61 50 / 10%); box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 .35rem; font-size: 1.55rem; }
.auth-card form button { width: 100%; }
.auth-alternative { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }

.site-footer { width: min(1180px, 100%); margin: 0 auto; padding: 1rem 1rem 2rem; color: var(--muted); font-size: .82rem; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.2rem; }
.site-footer a { color: inherit; }
.site-footer-auth { width: min(640px, 100%); }

.legal-page { min-height: 100vh; background: linear-gradient(180deg, #f8faf8 0, #f3f6f4 22rem); }
.legal-header { border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 92%); }
.legal-header-shell { display: flex; width: min(960px, 100%); margin: 0 auto; padding: .8rem 1rem; align-items: center; justify-content: space-between; gap: 1rem; }
.legal-header .auth-brand { margin: 0; }
.legal-main { width: min(900px, 100%); margin: 1.5rem auto; padding: 0 1rem 2rem; }
.legal-document { padding: clamp(1rem, 3vw, 2rem); }
.legal-document > header { margin-bottom: 1.5rem; }
.legal-document h1 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.4rem); letter-spacing: -.035em; line-height: 1.15; }
.legal-document h2 { margin-top: 2rem; }
.legal-document h3 { margin-top: 1.35rem; }
.legal-document p, .legal-document li { max-width: 76ch; }
.legal-document table { width: 100%; }
.legal-document .table-wrap { margin-block: 1rem; }
.legal-draft-notice { padding: .85rem 1rem; border-left: .3rem solid #b47b12; border-radius: .35rem; background: var(--warning-soft); }
.legal-placeholder { padding: .05rem .25rem; border-radius: .2rem; color: #6b4300; background: #fff0bd; font-weight: 700; }
.legal-language-note { color: var(--muted); font-size: .84rem; }
.legal-summary { color: var(--muted); font-size: 1.02rem; }

.help-page { width: min(1060px, 100%); }
.help-page .eyebrow { margin: 0 0 .25rem; color: var(--brand-700); }
.help-heading { align-items: flex-end; }
.help-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.help-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .75rem; min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--surface-soft); }
.help-card h3 { margin: 0 0 .35rem; }
.help-card p { margin: 0 0 .55rem; color: var(--muted); font-size: .87rem; }
.help-card a { font-size: .86rem; font-weight: 720; }
.help-step { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .6rem; color: #fff; background: var(--brand-600); font-weight: 800; }
.faq-list { display: grid; gap: .55rem; }
.faq-list details { margin: 0; border: 1px solid var(--line); border-radius: .7rem; background: var(--surface-soft); }
.faq-list summary { padding: .8rem 1rem; color: var(--ink); }
.faq-list details[open] summary { border-bottom: 1px solid var(--line); color: var(--brand-900); }
.faq-list p { margin: 0; padding: .85rem 1rem 1rem; color: var(--muted); }
.support-layout { display: grid; grid-template-columns: minmax(220px, .38fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.support-sidebar { display: grid; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--surface-soft); }
.support-meta { display: grid; gap: .8rem; margin: 0; }
.support-meta div { min-width: 0; }
.support-meta dt { color: var(--muted); font-size: .72rem; font-weight: 760; letter-spacing: .04em; text-transform: uppercase; }
.support-meta dd { margin: .12rem 0 0; overflow-wrap: anywhere; font-weight: 680; }
.session-support-identity { padding-top: 1rem; border-top: 1px solid var(--line); }
.session-support-identity h3 { margin: 0 0 .35rem; }
.session-support-identity p { margin: 0; overflow-wrap: anywhere; color: var(--muted); font-size: .84rem; }
.support-configuration-notice, .sensitive-warning { margin-bottom: .8rem; padding: .85rem 1rem; border-radius: .65rem; }
.support-configuration-notice { border: 1px solid #dfc468; color: #61490b; background: var(--warning-soft); }
.sensitive-warning { border-left: 4px solid var(--danger); color: #60251f; background: var(--danger-soft); }
.support-configuration-notice p, .sensitive-warning p { margin: .2rem 0 0; }
.support-form fieldset { padding: 0; border: 0; }
.support-form fieldset[disabled] { opacity: .62; }
.support-form textarea { min-height: 11rem; resize: vertical; }
.support-privacy-note { margin: .15rem 0; color: var(--muted); font-size: .8rem; }

.site-header { position: sticky; z-index: 20; top: 0; color: #fff; background: linear-gradient(115deg, var(--brand-950), var(--brand-900)); box-shadow: 0 3px 18px rgb(0 0 0 / 16%); }
.header-shell { display: grid; grid-template-columns: auto 1fr; gap: .7rem 1.6rem; max-width: 1240px; margin: 0 auto; padding: .72rem 1.25rem 0; }
.brand { display: inline-flex; align-self: center; align-items: center; gap: .6rem; color: #fff; font-size: 1.55rem; font-weight: 820; letter-spacing: -.04em; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { display: inline-grid; width: 2.15rem; height: 2.15rem; place-items: center; border: 1px solid rgb(255 255 255 / 25%); border-radius: .68rem; color: var(--brand-950); background: linear-gradient(145deg, #fff, #d9eee5); box-shadow: 0 3px 12px rgb(0 0 0 / 16%); font-size: 1.08rem; font-weight: 900; letter-spacing: 0; }
.brand-wordmark { white-space: nowrap; }
.session-context { display: flex; justify-content: flex-end; align-items: center; gap: .65rem; min-width: 0; }
.organization-link { display: grid; min-width: 0; min-height: 2.75rem; padding: .38rem .75rem; border-radius: .7rem; color: #fff; line-height: 1.2; text-decoration: none; }
.organization-link:hover { color: #fff; background: rgb(255 255 255 / 10%); }
.context-label { color: #c6ddd4; font-size: .7rem; text-transform: uppercase; letter-spacing: .045em; }
.organization-link strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu { position: relative; }
.user-menu > summary { display: flex; min-height: 2.75rem; align-items: center; gap: .55rem; padding: .32rem .52rem; border-radius: .7rem; cursor: pointer; list-style: none; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover, .user-menu[open] > summary { background: rgb(255 255 255 / 10%); }
.user-avatar { display: grid; width: 2.1rem; height: 2.1rem; place-items: center; border-radius: 50%; color: var(--brand-900); background: #dcebe5; font-weight: 800; }
.user-summary { display: grid; max-width: 15rem; min-width: 0; font-size: .78rem; line-height: 1.25; }
.user-summary strong, .user-summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-summary span { color: #c6ddd4; }
.user-menu-panel { position: absolute; right: 0; width: min(19rem, calc(100vw - 2rem)); margin-top: .55rem; padding: .55rem; border: 1px solid var(--line); border-radius: .85rem; color: var(--ink); background: #fff; box-shadow: var(--shadow); }
.user-menu-panel p { margin: .25rem .4rem .55rem; padding-bottom: .65rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.user-menu-panel a, .menu-action { display: block; width: 100%; min-height: auto; padding: .65rem .7rem; border: 0; border-radius: .45rem; color: var(--ink); background: transparent; font-weight: 650; text-align: left; text-decoration: none; cursor: pointer; }
.user-menu-panel a:hover, .menu-action:hover { color: var(--brand-900); background: var(--brand-100); }
.user-menu-panel form { margin: 0; }
.main-nav { grid-column: 1 / -1; display: flex; gap: .2rem; overflow-x: auto; scrollbar-width: thin; }
.main-nav a { display: inline-flex; flex: 0 0 auto; min-height: 2.75rem; align-items: center; padding: .57rem .78rem .64rem; border-bottom: 3px solid transparent; border-radius: .55rem .55rem 0 0; color: #dcebe5; font-size: .88rem; font-weight: 700; text-decoration: none; }
.main-nav a:hover { color: #fff; background: rgb(255 255 255 / 9%); }
.main-nav a[aria-current="page"] { border-bottom-color: #f3c25f; color: #fff; }

.page-shell { width: min(1180px, 100%); margin: 1.65rem auto; padding: 0 1rem 3.5rem; }
.page-narrow { width: min(760px, 100%); }
.page-medium { width: min(920px, 100%); }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 1.25rem; margin-bottom: 1.25rem; }
.page-heading h1 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.15rem); font-weight: 780; letter-spacing: -.035em; line-height: 1.16; }
.page-heading p { margin: .35rem 0 0; color: var(--muted); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.section-heading h2, .section-heading h3 { margin: 0; }
.section-heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .55rem; }
section, .panel { margin-bottom: 1rem; padding: clamp(1rem, 2.2vw, 1.3rem); border: 1px solid rgb(16 61 50 / 11%); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-small); }
section[id] { scroll-margin-top: 9rem; }
h2 { margin: 0 0 1rem; font-size: 1.17rem; letter-spacing: -.018em; }
h3 { font-size: 1rem; letter-spacing: -.01em; }
.muted, .note, .empty, .meta { color: var(--muted); }
.note, .meta { font-size: .86rem; line-height: 1.5; }
.empty-state { padding: 1.6rem; border: 1px dashed #afc0b7; border-radius: .8rem; color: var(--muted); text-align: center; background: var(--surface-soft); }

form { display: grid; gap: .75rem; }
label { display: grid; gap: .34rem; color: #35433d; font-size: .88rem; font-weight: 620; }
input, select, textarea { width: 100%; min-height: 2.75rem; padding: .65rem .75rem; border: 1px solid var(--line-strong); border-radius: .65rem; color: var(--ink); background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
input:hover, select:hover, textarea:hover { border-color: #71847a; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-600); box-shadow: 0 0 0 3px rgb(20 116 90 / 12%); }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: #b85249; box-shadow: 0 0 0 3px rgb(184 82 73 / 10%); }
button, .button-link { display: inline-flex; justify-content: center; align-items: center; gap: .35rem; width: fit-content; padding: .61rem .92rem; border: 1px solid transparent; border-radius: .67rem; color: #fff; background: var(--brand-600); box-shadow: 0 1px 2px rgb(0 0 0 / 7%); font-weight: 720; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
button:hover, .button-link:hover { color: #fff; background: var(--brand-700); box-shadow: 0 4px 12px rgb(10 47 37 / 12%); }
button:active, .button-link:active { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: .55; }
.button-secondary { border-color: #adbbb4; color: var(--ink); background: #fff; }
.button-secondary:hover { color: var(--brand-900); background: var(--brand-100); }
.button-danger, .danger { color: #fff; background: var(--danger); }
.button-danger:hover, .danger:hover { background: #74251f; }
.button-small { min-height: 2.25rem; padding: .38rem .65rem; border-radius: .55rem; font-size: .81rem; }
.inline { display: flex; grid-template-columns: none; flex-wrap: wrap; align-items: center; gap: .5rem; }
.inline input:not([type="checkbox"]):not([type="radio"]), .inline select { flex: 1 1 10rem; width: auto; }
.inline input[type="checkbox"], .inline input[type="radio"] { width: auto; min-height: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1rem; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); align-items: end; gap: .75rem; padding: .9rem; border: 1px solid #e2e9e5; border-radius: .8rem; background: var(--surface-soft); }
.filter-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter-hint { margin: .48rem 0 0; color: var(--muted); font-size: .78rem; }
.mapping-explanation { display: grid; gap: .35rem; margin: .9rem 0; padding: .8rem 1rem; border-left: 4px solid var(--brand-600); border-radius: .35rem; background: var(--surface-soft); }
.mapping-explanation p { margin: 0; }
.required-marker, .required-help { color: var(--danger); font-weight: 700; }
.required-help { font-size: .86rem; }
.form-required-row { display: flex; justify-content: flex-end; align-items: center; min-height: 1.5rem; }
.form-required-row .required-help { margin: 0; text-align: right; }
.field-label { display: flex; align-items: flex-start; gap: .2rem; min-height: 2.5em; }
.aligned-form-grid > label { grid-template-rows: minmax(2.5em, auto) auto minmax(2.1em, auto); align-content: start; }
.field-help { color: var(--muted); font-size: .75rem; font-weight: 450; line-height: 1.35; }
fieldset { display: grid; gap: .5rem; margin: 0; padding: .75rem; border: 1px solid var(--line); border-radius: .55rem; }
fieldset legend { padding: 0 .3rem; color: #3f4c46; font-size: .88rem; }

.flash { margin-bottom: .9rem; padding: .9rem 1rem; border: 1px solid #a9d4c3; border-radius: .75rem; color: #134f3f; background: #e6f4ee; box-shadow: var(--shadow-small); }
.flash.error { border-color: #e7b9b4; color: #6f201b; background: var(--danger-soft); }
.flash.info { border-color: #e3cd7f; color: #55410b; background: var(--warning-soft); }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: .8rem; background: #fff; }
.table-wrap:focus-visible { outline-offset: 2px; }
[data-async-region] { transition: opacity .12s ease; }
[data-async-region].is-updating { opacity: .55; pointer-events: none; }
.invoice-results { margin-top: 1.4rem; }
table { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; font-size: .86rem; }
.wide-table { min-width: 760px; }
.financial-table { min-width: 720px; }
th, td { min-width: 0; padding: .72rem .62rem; border-bottom: 1px solid #e5ebe7; text-align: center; vertical-align: middle; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: var(--brand-50); }
tr:last-child td { border-bottom: 0; }
th { color: #4b5b54; background: #f3f7f5; font-size: .72rem; font-weight: 780; letter-spacing: .045em; line-height: 1.3; text-transform: uppercase; white-space: normal; }
td { overflow-wrap: anywhere; word-break: normal; }
.table-cell-content { display: inline-block; max-width: 100%; text-align: left; overflow-wrap: anywhere; }
.table-wrap button, .table-wrap .button-link { white-space: nowrap; text-align: center; }
.date-cell, .money-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.money-cell { text-align: center; }
.table-actions { display: flex; width: fit-content; max-width: 100%; flex-wrap: wrap; align-items: center; justify-content: center; gap: .45rem; margin-inline: auto; }
.table-actions form { display: inline-flex; }
.invoice-results .wide-table { min-width: 1020px; }
.status { display: inline-block; padding: .18rem .48rem; border-radius: 999px; color: #165745; background: var(--brand-100); white-space: nowrap; }
.status.suspended { color: #711f1a; background: var(--danger-soft); }
.status-paid { color: #0f573f; background: #dff2e8; }
.status-sent { color: #1c4f6c; background: #e2f0f8; }
.status-replaced { color: #6b4d18; background: var(--warning-soft); }
.status-stack { display: grid; justify-items: end; gap: .3rem; }
.status-note { color: var(--danger); font-size: .76rem; font-weight: 700; white-space: nowrap; }
.invoice-row-revoked > td { background: #fff6f5; }
.invoice-row-revoked:hover > td { background: var(--danger-soft); }
.revoked-payment-marker { margin-left: .22rem; color: var(--danger); font-size: 1rem; font-weight: 900; }
.invoice-table-note { margin: .65rem 0 0; color: var(--danger); font-size: .8rem; font-weight: 700; }
.invoice-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .8rem; }
.invoice-actions > form, .invoice-actions > details { margin: 0; }
.invoice-actions details { min-width: min(100%, 24rem); padding: .7rem; border: 1px solid var(--line); border-radius: .6rem; }
.invoice-actions details form { margin-top: .8rem; }
.invoice-workflow { display: grid; gap: .8rem; margin: 0; padding: 0; list-style: none; }
.workflow-step { display: grid; gap: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: .7rem; background: #fff; }
.workflow-step.is-current { border-color: #8fc5b2; box-shadow: 0 0 0 2px rgb(25 113 92 / 8%); }
.workflow-step.is-complete { background: #f3faf6; }
.workflow-step.is-locked { background: var(--surface-soft); opacity: .78; }
.workflow-heading { display: flex; align-items: flex-start; gap: .8rem; }
.workflow-heading h3, .workflow-heading p { margin: 0; }
.workflow-heading p { margin-top: .2rem; color: var(--muted); font-size: .86rem; }
.workflow-number { display: grid; flex: 0 0 2rem; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; color: #fff; background: var(--brand-700); font-weight: 800; }
.workflow-state { margin-left: auto; padding: .18rem .5rem; border-radius: 999px; color: var(--brand-900); background: var(--brand-100); font-size: .76rem; font-weight: 700; white-space: nowrap; }
.workflow-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .8rem; }
.workflow-locked { margin: 0; color: var(--muted); font-size: .86rem; }
.workflow-step details { margin: 0; }
.workflow-step details form { margin-top: .8rem; }
.confirm-label { display: flex; grid-template-columns: none; align-items: flex-start; gap: .5rem; }
.confirm-label input { flex: 0 0 auto; width: auto; min-height: auto; margin-top: .25rem; }
.optional-fields-toggle { display: flex; align-items: center; gap: .55rem; margin-top: .9rem; }
.optional-fields-toggle input { width: auto; min-height: auto; }
.optional-fields { display: grid; gap: .75rem; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.optional-fields[hidden] { display: none !important; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .7rem; margin: 1rem 0; }
.metric { padding: .9rem; border: 1px solid #e1e7e3; border-radius: .75rem; background: var(--surface-soft); }
.metric span { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.metric strong { display: block; margin-top: .25rem; font-size: 1.12rem; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; }
.pagination a { font-weight: 700; text-decoration: none; }
.sort-link, .expense-sort-link { color: inherit; text-decoration: none; }
.sort-link:hover, .expense-sort-link:hover { color: var(--brand-700); }
.movements-table { min-width: 1320px; table-layout: fixed; }
.movements-table th { padding: 0; text-align: center; vertical-align: middle; letter-spacing: .015em; text-transform: none; }
.movements-table .sort-link { display: flex; min-height: 3.2rem; align-items: center; justify-content: center; gap: .35rem; padding: .65rem .55rem; text-align: center; }
.movements-table .sort-indicator { flex: 0 0 auto; color: #75827d; font-size: .72rem; }
.movements-table td { vertical-align: middle; }
.movements-table .movement-column-stay, .movements-table .movement-column-type, .movements-table .movement-column-action { padding: .65rem .55rem; }
.stay-range { display: grid; width: fit-content; max-width: 100%; gap: .22rem; margin-inline: auto; text-align: left; }
.stay-range > span { display: grid; gap: .08rem; }
.stay-range small { color: var(--muted); font-size: .66rem; font-weight: 700; text-transform: uppercase; }
.stay-range time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.property-cell, .description-cell, .type-cell { overflow-wrap: anywhere; word-break: normal; }
.action-cell { text-align: center; white-space: nowrap; }
.table-scroll-hint { display: none; margin: -.25rem 0 .65rem; color: var(--muted); font-size: .76rem; }
.platform { display: inline-block; max-width: 100%; padding: .15rem .4rem; border-radius: 999px; background: #e9f0ec; text-align: center; line-height: 1.2; text-transform: capitalize; white-space: normal; overflow-wrap: anywhere; }
.invoice-transaction-table { min-width: 1080px; }
.invoice-transaction-table th, .invoice-expense-table th { text-align: center; }
.invoice-calculation { display: grid; min-width: 0; gap: .28rem; text-align: left; }
.invoice-calculation > div { display: grid; grid-template-columns: minmax(4.9rem, auto) minmax(0, 1fr); gap: .35rem; }
.invoice-calculation strong { color: #34443c; }
.invoice-calculation span { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.invoice-expense-heading { margin-top: 1.25rem; }
.invoice-expense-table { min-width: 760px; }
.property-assignment-table { min-width: 840px; }
.property-assignment-form { display: grid; grid-template-columns: minmax(10rem, 1fr) auto; align-items: center; gap: .5rem; }
.property-assignment-form select { min-width: 0; }
.receipt-history { display: grid; gap: .5rem; padding: 0; list-style: none; }
.receipt-history li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .75rem; align-items: center; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: .55rem; }
.negative { color: var(--danger); font-weight: 650; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.dashboard-hero { position: relative; display: flex; min-height: 9rem; justify-content: space-between; align-items: flex-end; gap: 1rem; overflow: hidden; margin-bottom: 1rem; padding: 1.55rem 1.65rem; border: 1px solid rgb(255 255 255 / 8%); border-radius: 1.15rem; color: #fff; background: radial-gradient(circle at 86% 12%, rgb(255 255 255 / 13%), transparent 26%), linear-gradient(125deg, var(--brand-950), var(--brand-600)); box-shadow: var(--shadow); }
.dashboard-hero h1 { margin: .15rem 0 0; font-size: clamp(1.75rem, 3vw, 2.35rem); letter-spacing: -.045em; }
.dashboard-hero p { margin: .3rem 0 0; color: #dcebe5; }
.eyebrow { color: #bcd8cd; font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.dashboard-hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.dashboard-hero .button-secondary { border-color: rgb(255 255 255 / 42%); color: #fff; background: transparent; }
.dashboard-hero .button-secondary:hover { color: var(--brand-900); background: #fff; }
.dashboard-section { overflow: hidden; padding: 0; }
.dashboard-section-heading { margin: 0; padding: 1.15rem 1.25rem; border-bottom: 1px solid var(--line); }
.dashboard-filter-panel { margin: 0 1.25rem; padding: .95rem 0 1.1rem; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.dashboard-filter-panel .filter-actions { align-items: center; align-self: end; min-height: 2.75rem; }
.dashboard-filter-panel .filter-actions > a { font-size: .84rem; font-weight: 700; }
.result-count { padding: .22rem .55rem; border-radius: 999px; color: var(--brand-700); background: var(--brand-100); font-size: .78rem; font-weight: 750; white-space: nowrap; }
.negative-indicator { display: inline-flex !important; align-items: center; gap: .22rem; margin-top: .18rem; color: var(--danger) !important; font-size: .7rem !important; font-weight: 800; letter-spacing: 0 !important; text-transform: none !important; }
.dashboard-primary-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 1.1rem 1.25rem 1.25rem; }
.dashboard-attention-section .dashboard-attention-grid, .dashboard-attention-section .dashboard-clear-state { margin-block: 1rem 1.2rem; }
.dashboard-overview-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .7fr); gap: 1rem; align-items: start; }
.dashboard-overview-grid > .dashboard-section { min-width: 0; }
.financial-flow { display: grid; gap: .1rem; margin: 0; padding: 1rem 1.25rem 1.25rem; list-style: none; }
.financial-flow-item { display: grid; grid-template-columns: 1.35rem minmax(8rem, .75fr) minmax(6.5rem, auto) minmax(7rem, 1fr); align-items: center; gap: .5rem .75rem; min-height: 3rem; padding: .5rem .65rem; border-radius: .6rem; }
.financial-flow-item:nth-child(even) { background: var(--surface-soft); }
.financial-flow-item strong { text-align: right; white-space: nowrap; font-size: 1rem; font-variant-numeric: tabular-nums; }
.financial-flow-operator { color: var(--muted); text-align: center; font-size: 1.2rem; font-weight: 800; }
.financial-flow-label { color: #35433d; font-size: .84rem; font-weight: 700; }
.financial-flow-item.flow-net { margin-top: .45rem; padding-top: .85rem; border-top: 1px solid var(--line); border-radius: 0 0 .6rem .6rem; background: var(--brand-50); }
.financial-flow-item.flow-net strong { color: var(--brand-800); font-size: 1.15rem; }
.financial-flow-item.is-negative { background: var(--danger-soft); }
.financial-flow-item.is-negative strong { color: var(--danger); }
.financial-flow-item.is-negative .financial-progress { --progress-color: var(--danger); }
.financial-progress { width: 100%; overflow: hidden; border: 0; border-radius: 999px; background: #eaf0ec; appearance: none; }
.financial-progress { height: .48rem; }
.financial-progress::-webkit-progress-bar { border-radius: 999px; background: #eaf0ec; }
.financial-progress::-webkit-progress-value { border-radius: 999px; background: var(--progress-color); }
.financial-progress::-moz-progress-bar { border-radius: 999px; background: var(--progress-color); }
.progress-receipts, .progress-sent { --progress-color: #367da3; }
.progress-cleaning, .progress-issued { --progress-color: #c49b40; }
.progress-commission, .progress-replaced { --progress-color: #8a67a8; }
.progress-expenses { --progress-color: #b65d55; }
.progress-net, .progress-paid { --progress-color: var(--brand-600); }
.progress-draft { --progress-color: #8b9691; }
.dot-draft { background: #8b9691; }
.dot-issued { background: #c49b40; }
.dot-sent { background: #367da3; }
.dot-paid { background: var(--brand-600); }
.dot-replaced { background: #8a67a8; }
.invoice-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin: 1rem 1.25rem; }
.invoice-status-grid div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .6rem; min-width: 0; padding: .72rem .8rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--surface-soft); }
.invoice-status-grid dt { display: flex; min-width: 0; align-items: center; gap: .45rem; color: var(--muted); font-size: .8rem; }
.invoice-status-grid dd { margin: 0; color: var(--ink); font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.invoice-client-summary { margin: 0 1.25rem 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.invoice-client-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin-bottom: .55rem; }
.invoice-client-heading h3 { margin: 0; }
.invoice-client-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.invoice-client-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .6rem; min-width: 0; padding: .65rem .1rem; border-bottom: 1px solid #edf1ee; }
.invoice-client-list li:last-child { border-bottom: 0; }
.invoice-client-list li.has-outstanding { box-shadow: inset 3px 0 #b07a08; padding-left: .65rem; }
.invoice-client-list strong { min-width: 0; overflow-wrap: anywhere; font-size: .84rem; }
.invoice-client-counts { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .35rem .55rem; color: var(--muted); font-size: .74rem; white-space: nowrap; }
.invoice-client-more { margin: .65rem 0 0; text-align: right; }
.status-dot { width: .55rem; height: .55rem; border-radius: 50%; }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .75rem; }
.quick-action { display: flex; min-height: 4.25rem; align-items: center; gap: .75rem; padding: .9rem; border: 1px solid var(--line); border-radius: .8rem; color: var(--ink); background: var(--surface-soft); text-decoration: none; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.quick-action:hover { border-color: #8db6a5; color: var(--brand-900); background: var(--brand-100); }
.quick-action:active { transform: translateY(1px); }
.quick-action > span:not(.quick-action-icon) { display: grid; gap: .12rem; }
.quick-action strong { font-size: .92rem; }
.quick-action small { color: var(--muted); font-size: .78rem; }
.quick-action-icon { display: grid; flex: 0 0 2rem; width: 2rem; height: 2rem; place-items: center; border-radius: .55rem; color: var(--brand-700); background: #dcece5; font-size: 1.15rem; font-weight: 800; }
.attention-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .65rem; }
.dashboard-attention-grid, .dashboard-clear-state { margin: 1.2rem 1.25rem; }
.attention-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .85rem; border: 1px solid var(--line); border-radius: .7rem; color: var(--ink); background: var(--surface-soft); text-decoration: none; }
.attention-card:hover { border-color: #8db6a5; color: var(--brand-900); background: var(--brand-100); }
.attention-card > strong { min-width: 0; font-size: .84rem; }
.attention-card b { font-size: 1.25rem; }
.attention-icon { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; color: #6c520f; background: var(--warning-soft); font-size: .9rem; font-weight: 900; }
.dashboard-clear-state { display: flex; min-height: 6rem; align-items: center; justify-content: center; gap: .55rem; border: 1px dashed #9ebcac; border-radius: .8rem; color: var(--brand-700); background: var(--brand-50); }
.dashboard-clear-state > span { display: grid; width: 1.8rem; height: 1.8rem; place-items: center; border-radius: 50%; color: #fff; background: var(--brand-600); }
.dashboard-recent-panel { min-width: 0; }
.dashboard-recent-content { min-width: 0; padding: 1rem 1.25rem 1.25rem; }
.dashboard-recent-panel .table-wrap { width: 100%; min-width: 0; max-width: 100%; border: 1px solid var(--line); border-radius: .8rem; }
.dashboard-recent-panel table { font-size: .82rem; }
.dashboard-recent-table { min-width: 680px; table-layout: fixed; }
.dashboard-recent-table td:nth-child(2), .dashboard-recent-table td:nth-child(4) { overflow-wrap: anywhere; }
[data-invoice-scope-target][hidden] { display: none !important; }
.external-links { display: flex; flex-wrap: wrap; gap: .6rem; }
.external-links + .note { margin: .65rem 0 1rem; }
.external-link::after { content: "↗"; }
.pending { border-color: #d9ba4c; background: #fffdf5; }
.candidate, .card { padding: 1rem; border: 1px solid var(--line); border-radius: .65rem; background: #fff; }
.card-title { display: block; margin-bottom: .55rem; color: var(--muted); font-size: .75rem; text-transform: uppercase; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; }
.card > strong { display: block; margin-top: .7rem; }
.identity { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; }
.rule-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: .85rem 0 .7rem; }
.rule-details div { min-width: 0; padding: .65rem .7rem; border: 1px solid var(--line); border-radius: .5rem; background: #fff; }
.rule-actions { display: flex; width: fit-content; max-width: 100%; align-items: flex-start; justify-content: center; gap: .7rem; margin-inline: auto; text-align: left; }
.rule-actions details { margin: 0; }
.rule-actions details form { min-width: 260px; margin-top: .7rem; }
.rule-editor { margin-top: 1rem; }
.warning { padding: .75rem; border-radius: .5rem; color: #61490b; background: var(--warning-soft); white-space: normal; }
.cancel-button { background: var(--danger); }
details { margin-top: .8rem; }
summary { cursor: pointer; font-weight: 700; color: var(--brand-700); }
.collapsible-section { padding: 0; }
.collapsible-section > details { margin: 0; }
.collapsible-section > details > summary { padding: 1rem; color: var(--ink); font-size: 1.05rem; }
.collapsible-content { padding: 0 1rem 1rem; }
.rule-details div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.rule-details dt { color: var(--muted); font-size: .73rem; text-transform: uppercase; }
.rule-details dd { margin: 0; font-weight: 700; }
.property-list { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.property-card { overflow: hidden; border: 1px solid var(--line); border-radius: .95rem; background: #fff; box-shadow: 0 4px 16px rgb(10 47 37 / 5%); transition: border-color .15s ease, box-shadow .15s ease; }
.property-card:hover { border-color: #abc1b7; box-shadow: var(--shadow-small); }
.property-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem .8rem; }
.property-card-heading { min-width: 0; }
.property-card-heading h2 { margin: 0; color: var(--ink); font-size: 1.08rem; letter-spacing: -.02em; }
.property-card-heading p { margin: .22rem 0 0; color: var(--muted); font-size: .84rem; }
.property-identifiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 0; padding: 0 1.1rem 1rem; }
.property-identifiers div { min-width: 0; }
.property-identifiers dt { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.property-identifiers dd { margin: .12rem 0 0; overflow-wrap: anywhere; font-size: .86rem; font-weight: 650; }
.property-card-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); border-top: 1px solid var(--line); background: var(--surface-soft); }
.property-rule-panel, .property-rule-empty { min-width: 0; margin: 0; padding: .8rem 1.1rem .9rem; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.property-rule-panel + .property-rule-panel { border-left: 1px solid var(--line); }
.property-rule-panel-upcoming { background: #fffaf0; }
.property-rule-heading { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; color: var(--brand-900); }
.property-rule-heading strong { font-size: .78rem; letter-spacing: .015em; }
.property-rule-heading > span:last-child { margin-left: auto; color: var(--muted); font-size: .74rem; }
.property-rule-indicator { width: .48rem; height: .48rem; border-radius: 50%; background: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); }
.property-rule-panel-upcoming .property-rule-indicator { background: #b47b12; box-shadow: 0 0 0 3px var(--warning-soft); }
.property-rule-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: .65rem 0 0; }
.property-rule-metrics div { min-width: 0; }
.property-rule-metrics dt { color: var(--muted); font-size: .72rem; }
.property-rule-metrics dd { margin: .08rem 0 0; color: var(--ink); font-size: 1rem; font-weight: 780; font-variant-numeric: tabular-nums; }
.property-rule-empty { display: grid; gap: .18rem; color: var(--muted); font-size: .8rem; }
.property-rule-empty strong { color: var(--brand-900); }
.memberships { display: grid; gap: .45rem; min-width: 210px; }
.membership { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.membership-pills { display: flex; flex-wrap: wrap; gap: .4rem; min-width: 0; }
.membership-pill { display: inline-flex; max-width: 100%; align-items: center; gap: .25rem; padding: .18rem .2rem .18rem .62rem; border-radius: 999px; color: var(--brand-900); background: var(--brand-100); font-size: .78rem; font-weight: 700; }
.membership-pill > span { max-width: 15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.membership-pill form { display: inline-flex; }
.pill-remove { display: grid; width: 2rem; min-height: 2rem; height: 2rem; padding: 0; place-items: center; border-radius: 50%; color: var(--brand-900); background: transparent; box-shadow: none; line-height: 1; }
.pill-remove:hover { color: #fff; background: var(--danger); }
.pill-remove-icon { position: relative; display: block; width: .7rem; height: .7rem; overflow: hidden; color: transparent; font-size: 0; }
.pill-remove-icon::before, .pill-remove-icon::after { position: absolute; top: 50%; left: 50%; width: .72rem; height: 1.5px; border-radius: 2px; background: currentColor; content: ""; }
.pill-remove-icon::before { color: var(--brand-900); transform: translate(-50%, -50%) rotate(45deg); }
.pill-remove-icon::after { color: var(--brand-900); transform: translate(-50%, -50%) rotate(-45deg); }
.pill-remove:hover .pill-remove-icon::before, .pill-remove:hover .pill-remove-icon::after { color: #fff; }
.compact-disclosure { position: relative; margin-top: .45rem; }
.compact-disclosure > summary { width: fit-content; font-size: .8rem; list-style: none; }
.compact-disclosure > summary::-webkit-details-marker { display: none; }
.membership-add > form, .user-action-menu { width: min(18rem, calc(100vw - 2rem)); margin-top: .4rem; padding: .75rem; border: 1px solid var(--line); border-radius: .65rem; background: #fff; box-shadow: var(--shadow); }
.user-action-menu { display: grid; gap: .45rem; }
.user-action-menu form, .user-action-menu button { width: 100%; }
.admin-user-list { overflow: hidden; border: 1px solid var(--line); border-radius: .85rem; background: #fff; }
.admin-user-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 1.25rem; margin: 0; padding: 1.15rem; border-bottom: 1px solid var(--line); }
.admin-user-card:last-child { border-bottom: 0; }
.admin-user-card:hover { background: var(--brand-50); }
.admin-user-header { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .8rem; }
.admin-user-avatar { display: grid; width: 2.65rem; height: 2.65rem; place-items: center; border-radius: .8rem; color: var(--brand-900); background: var(--brand-100); font-weight: 820; }
.admin-user-identity { display: grid; min-width: 0; gap: .05rem; }
.admin-user-identity > strong, .admin-user-identity > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-identity details { margin-top: .25rem; }
.admin-user-identity summary { width: fit-content; font-size: .78rem; }
.admin-user-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .4rem .55rem; color: var(--muted); font-size: .78rem; text-align: right; }
.admin-user-meta > span:last-child { flex-basis: 100%; }
.admin-user-access { min-width: 0; padding-left: 3.45rem; }
.admin-user-access h3 { margin: 0 0 .5rem; color: var(--muted); font-size: .72rem; letter-spacing: .045em; text-transform: uppercase; }
.admin-user-controls { align-self: end; }
.admin-user-controls .compact-disclosure { margin: 0; }
.empty-state.compact { padding: .85rem; }
.add-disclosure { position: relative; margin: 0; }
.add-disclosure > summary { list-style: none; }
.add-disclosure > summary::-webkit-details-marker { display: none; }
.add-disclosure > form { position: absolute; z-index: 5; right: 0; width: min(22rem, calc(100vw - 2rem)); margin-top: .55rem; padding: 1rem; border: 1px solid var(--line); border-radius: .65rem; background: #fff; box-shadow: var(--shadow); }
.contextual-form { margin-top: .55rem; }
.audit-info { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; min-width: 180px; }
.audit-info.table-cell-content { display: inline-grid; }
.audit-info strong { color: #4d5b55; font-size: .75rem; }
td > .inline { width: fit-content; max-width: 100%; justify-content: center; margin-inline: auto; text-align: left; }
.timeline { display: grid; gap: .85rem; margin: 0; padding-left: 1.2rem; }
.timeline li { padding-left: .25rem; }
.timeline li > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }
.timeline li span { color: var(--muted); font-size: .82rem; }
.timeline li p { margin: .2rem 0 0; }
.history { padding: .85rem 0; border-top: 1px solid #e5ebe7; }
.history:first-of-type { border-top: 0; }
.history p { margin: .3rem 0; }
.change { font-size: .88rem; }
code { font-size: .8rem; overflow-wrap: anywhere; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: .65rem; margin-bottom: 1rem; }
.summary-grid div { padding: .75rem; border-radius: .6rem; background: var(--surface-soft); }
.summary-grid span { display: block; color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.summary-grid strong { display: block; margin-top: .2rem; }
.profile-list { display: grid; gap: 0; margin: 0; }
.profile-list div { display: grid; grid-template-columns: minmax(10rem, .4fr) 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.profile-list div:last-child { border-bottom: 0; }
.profile-list dt { color: var(--muted); }
.profile-list dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.profile-form { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.profile-readonly { padding: 0 .8rem; border-radius: .6rem; background: var(--surface-soft); }
.profile-readonly dt, .profile-readonly dd { color: var(--muted); }
dialog { width: min(520px, calc(100% - 2rem)); padding: 1.3rem; border: 1px solid rgb(16 61 50 / 10%); border-radius: 1rem; box-shadow: 0 24px 70px rgb(0 0 0 / 25%); }
dialog::backdrop { background: rgb(0 0 0 / 42%); }
.dialog-actions { display: flex; justify-content: flex-end; }
.info-button { display: inline-grid; width: 1.5rem; min-height: 1.5rem; height: 1.5rem; margin-left: .25rem; padding: 0; place-items: center; border: 1px solid var(--brand-600); border-radius: 50%; color: var(--brand-700); background: #fff; font-size: .78rem; }

@media (max-width: 760px) {
  html { scroll-padding-top: 11rem; }
  .header-shell { grid-template-columns: auto 1fr; padding: .65rem .8rem 0; }
  .session-context { gap: .25rem; }
  .language-choice { min-width: 2.25rem; padding-inline: .42rem; }
  .organization-link { max-width: 12rem; }
  .context-label, .user-summary { display: none; }
  .main-nav { margin-inline: -.8rem; padding-inline: .8rem; }
  .page-shell { margin-top: 1rem; padding-inline: .75rem; }
  .page-heading, .section-heading { align-items: stretch; flex-direction: column; }
  .section-heading-actions { justify-content: flex-start; }
  .page-heading .button-link, .section-heading .button-link { width: 100%; }
  section, .panel { padding: .9rem; }
  .filters { grid-template-columns: 1fr; }
  .filters button { width: 100%; }
  .filter-actions, .filter-actions > * { width: 100%; }
  .pagination { align-items: stretch; flex-direction: column; text-align: center; }
  .profile-list div { grid-template-columns: 1fr; gap: .15rem; }
  .identity { grid-template-columns: 1fr; }
  .invoice-actions { flex-direction: column; }
  .invoice-actions > *, .invoice-actions > .button-link { width: 100%; }
  .dashboard-overview-grid, .dashboard-primary-actions { grid-template-columns: 1fr; }
  .dashboard-hero { align-items: stretch; flex-direction: column; }
  .dashboard-hero-actions { justify-content: flex-start; }
  .financial-flow-item { grid-template-columns: 1.2rem minmax(0, 1fr) auto; }
  .financial-flow-item .financial-progress { grid-column: 2 / -1; }
  .financial-flow-item .negative-indicator { grid-column: 2 / -1; }
  .admin-user-card { grid-template-columns: 1fr; }
  .admin-user-header { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .admin-user-meta { grid-column: 2; justify-content: flex-start; text-align: left; }
  .admin-user-meta > span:last-child { flex-basis: auto; }
  .admin-user-access { padding-left: 0; }
  .admin-user-controls { justify-self: start; }
  .status-stack { justify-items: start; }
  .legal-header-shell { align-items: flex-start; }
  .legal-document { border-inline: 0; border-radius: 0; }
  .help-card-grid, .support-layout { grid-template-columns: 1fr; }
  .help-card-grid { gap: .65rem; }
}

@media (max-width: 520px) {
  .dashboard-section-heading { padding-inline: .9rem; }
  .dashboard-filter-panel, .dashboard-attention-grid, .dashboard-clear-state { margin-inline: .9rem; }
  .dashboard-primary-actions, .financial-flow { padding-inline: .9rem; }
  .dashboard-recent-content { padding: .8rem .9rem .9rem; }
  .invoice-status-grid, .invoice-client-summary { margin-inline: .9rem; }
  .invoice-client-list li { grid-template-columns: 1fr; }
  .invoice-client-counts { justify-content: flex-start; white-space: normal; }
  .organization-link { max-width: 9rem; }
  .organization-link strong { font-size: .82rem; }
  .table-wrap { border-inline: 0; border-radius: 0; }
  .property-card-header { align-items: stretch; flex-direction: column; }
  .property-card-header .button-link { align-self: flex-start; }
  .property-identifiers, .property-rule-metrics { grid-template-columns: 1fr; }
  .property-rule-panel + .property-rule-panel { border-top: 1px solid var(--line); border-left: 0; }
  .property-rule-heading > span:last-child { width: 100%; margin-left: 1rem; }
  .table-scroll-hint { display: block; }
  th, td { padding: .65rem .5rem; }
  .inline { align-items: stretch; flex-direction: column; }
  .inline > *, .inline button, .inline .button-link { width: 100%; }
  .inline input[type="checkbox"], .inline input[type="radio"] { width: auto; }
  .admin-user-header { grid-template-columns: auto minmax(0, 1fr); }
  .admin-user-meta { grid-column: 1 / -1; }
}

@media (pointer: coarse) {
  .button-small, .language-choice, .info-button, .pill-remove { min-height: 2.75rem; }
  .pill-remove { width: 2.75rem; height: 2.75rem; }
  .info-button { width: 2.75rem; height: 2.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
