/* Hearth · a quiet, legible workspace for small rental portfolios. */
:root {
  --bg: #f6f6ef;
  --paper: #fffefa;
  --ink: #293e35;
  --muted: #657263;
  --line: #dde3d7;
  --green: #315443;
  --green-hover: #244534;
  --lime: #d8e8a8;
  --sage: #ecf1e2;
  --orange: #935c2b;
  --red: #9a4639;
  --shadow: 0 3px 18px #2b403708;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid #47745a; outline-offset: 3px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: #47745a; outline-width: 2px; }
button, a, input, select, textarea { touch-action: manipulation; }
button, input, select, textarea { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: #d9e6c6; color: #243e35; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 1000; padding: 12px 18px; min-height: 44px; border: 1px solid white; border-radius: 8px; background: #294c3a; color: white; font-size: 14px; transform: translateY(calc(-100% - 24px)); box-shadow: 0 4px 20px #152a2633; }
.skip-link:focus { transform: translateY(0); }
.demo-banner { background: #243e35; color: #f1f5e9; font-size: 12px; text-align: center; padding: 9px 18px; letter-spacing: .15px; }
.demo-dot { display: inline-block; width: 6px; height: 6px; background: var(--lime); border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.shell { display: grid; grid-template-columns: 232px minmax(0,1fr); min-height: calc(100vh - 37px); }
aside { background: #fcfcf7; border-right: 1px solid var(--line); padding: 28px 22px; display: flex; flex-direction: column; min-width: 0; }
.brand { font-size: 31px; letter-spacing: -1.8px; font-weight: 650; display: inline-flex; align-items: center; gap: 9px; width: fit-content; }
.brand:hover { text-decoration: none; }
.brand-mark { background: var(--green); color: #eff5d9; font-family: Georgia, serif; font-style: italic; border-radius: 12px; font-size: 32px; line-height: 42px; width: 42px; text-align: center; }
.brand-period { color: #829d5e; margin-left: -9px; }
.workspace { display: flex; gap: 10px; align-items: center; padding: 27px 0 30px; }
.avatar { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: #e9edde; color: #53663f; font-size: 12px; font-weight: 650; }
.workspace strong { display: block; font-size: 13px; }
.workspace small, .aside-bottom small { display: block; font-size: 12px; color: var(--muted); }
.tiny { margin-left: auto; }
.nav-label { font-size: 11px; letter-spacing: 1.6px; color: #6d7b62; font-weight: 650; margin: 0 12px 12px; }
nav { display: flex; flex-direction: column; gap: 5px; }
nav button { display: flex; align-items: center; gap: 12px; min-height: 44px; border: 1px solid transparent; background: none; text-align: left; padding: 10px 12px; border-radius: 8px; color: #5b6a5d; font-size: 13px; transition: background .15s, color .15s; }
nav button:hover { background: #f0f2e8; color: var(--green); }
nav button.active { background: #e8efdc; color: #294e38; font-weight: 650; border-color: #dfe8d1; }
nav .nav-icon { font-size: 19px; width: 22px; text-align: center; flex-shrink: 0; }
nav .count { margin-left: auto; background: #e1e7d7; color: #526342; border-radius: 5px; padding: 1px 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.aside-bottom { margin-top: auto; padding: 44px 8px 0; }
.little-leaf { font-size: 42px; color: #839c64; line-height: 1; }
.aside-bottom strong { display: block; font: 18px/1.45 Georgia, serif; margin: 10px 0; }
.aside-bottom p { color: var(--muted); font-size: 12px; margin: 0 0 17px; }
.text-button { display: block; border: 0; background: none; color: #506541; font-size: 12px; min-height: 40px; padding: 9px 0; text-align: left; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.aside-bottom small { margin-top: 12px; line-height: 1.5; }
main { padding: 0 clamp(24px,3.1vw,46px); min-width: 0; }
header { min-height: 86px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.breadcrumbs { font-size: 12px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.breadcrumbs span { padding-left: 8px; }
.breadcrumbs #crumb { color: #435d49; }
.role-switch { display: inline-flex; background: #e9ece1; padding: 4px; border: 1px solid #e1e6d9; border-radius: 9px; flex-shrink: 0; }
.role-switch button { border: 0; background: none; padding: 8px 12px; min-height: 36px; font-size: 12px; color: #5e6d52; border-radius: 6px; white-space: nowrap; }
.role-switch button.active { background: #fffefa; color: var(--green); box-shadow: 0 1px 5px #263c3510; font-weight: 600; }
#content { padding: 32px 0 38px; min-height: calc(100vh - 200px); }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.page-heading > div:first-child { min-width: 0; }
.eyebrow { font-size: 11px; letter-spacing: 1.5px; color: #657652; font-weight: 650; text-transform: uppercase; }
.page-heading h1 { font: 400 clamp(30px,3vw,40px)/1.15 Georgia, "Times New Roman", serif; letter-spacing: -1.2px; margin: 8px 0 10px; overflow-wrap: break-word; }
.page-heading p { margin: 0; color: var(--muted); font-size: 13px; max-width: 630px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #d4ddcd; background: #fffefa; color: var(--ink); border-radius: 8px; min-height: 44px; padding: 10px 16px; font-size: 13px; font-weight: 550; line-height: 1.4; text-align: center; text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s; }
.button.primary { background: var(--green); border-color: var(--green); color: white; }
.button.small { min-height: 38px; padding: 8px 11px; font-size: 12px; }
.button:hover { background: #f0f4e8; border-color: #b5c4a8; text-decoration: none; }
.button.primary:hover { background: var(--green-hover); border-color: var(--green-hover); }
.button:active { transform: translateY(1px); }
.heading-actions, .inline-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.heading-actions { justify-content: flex-end; }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 24px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--shadow); min-width: 0; }
.stat.featured { background: #eaf0dd; border-color: #dbe5ca; }
.stat-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 7px; font-size: 12px; color: #596c4b; }
.stat-icon { color: #728953; font-size: 18px; }
.stat-value { font-size: clamp(25px,2.3vw,33px); letter-spacing: -.9px; font-weight: 500; margin: 14px 0 7px; line-height: 1.15; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.stat-value > span[style] { color: #60734d !important; }
.stat-note { font-size: 12px; color: #647354; }
.stat-note strong { font-weight: 600; color: #456539; }
.two-col { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(280px,1fr); gap: 22px; align-items: start; }
.two-col > * { min-width: 0; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 22px 23px 17px; }
.panel-head h2 { font-size: 16px; font-weight: 600; margin: 0; line-height: 1.4; }
.panel-head .eyebrow { font-size: 11px !important; }
.panel-head p { color: var(--muted); font-size: 12px; margin: 5px 0 0; }
.link-button { border: 0; background: none; color: #496535; font-size: 12px; padding: 8px 4px; min-height: 36px; text-align: left; font-weight: 550; }
.link-button:hover { color: #244524; text-decoration: underline; text-underline-offset: 4px; }
.panel-body > p[style] { color: var(--muted) !important; font-size: 13px !important; }
.panel-body { padding: 0 23px 22px; }
.progress-label { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: #5e6e50; margin: 9px 0; }
.progress { height: 9px; background: #e9eddf; border-radius: 20px; overflow: hidden; }
.progress span { display: block; height: 100%; max-width: 100%; background: #7c9b54; border-radius: 20px; }
.collection-bottom { display: flex; gap: 28px; margin: 20px 0 3px; flex-wrap: wrap; }
.collection-bottom strong { font-size: 23px; display: block; font-weight: 500; font-variant-numeric: tabular-nums; }
.collection-bottom small { font-size: 12px; color: #657455; }
.dot { width: 6px; height: 6px; background: #73944a; display: inline-block; border-radius: 50%; margin-right: 6px; }
.dot.unpaid { background: #bac6a4; }
.table-wrap { overflow: auto; max-width: 100%; overscroll-behavior-x: contain; scrollbar-color: #b9c5ab #f1f3e9; scrollbar-width: thin; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: #657354; font-weight: 600; background: #f8faf2; padding: 12px 23px; border-top: 1px solid #e9ede1; border-bottom: 1px solid #e9ede1; }
td { padding: 17px 23px; border-bottom: 1px solid #edf0e5; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbf5; }
td strong { font-weight: 550; display: block; }
td small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 8px; font-size: 11px; line-height: 1.35; border-radius: 5px; background: #eaf1df; color: #4b672f; white-space: nowrap; font-weight: 550; }
.badge.amber { background: #faf0da; color: #865b20; }
.badge.red { background: #faeae5; color: #9c4937; }
.badge.gray { background: #ecefe5; color: #5d6b50; }
.request { padding: 17px 23px; border-top: 1px solid #e9ede1; display: flex; gap: 12px; align-items: flex-start; }
.request-icon { background: #f5efdf; border: 1px solid #e9dfc7; border-radius: 8px; width: 35px; height: 35px; display: grid; place-items: center; font-size: 16px; color: #88622f; flex-shrink: 0; }
.request strong { font-weight: 550; font-size: 13px; line-height: 1.4; }
.request p { margin: 5px 0 9px; font-size: 12px; color: var(--muted); }
.request .badge { margin: 2px 3px 2px 0; }
.request-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.request .link-button { padding: 6px 0; }
.calm-card { background: #eaf0df; border: 1px solid #dbe5ca; border-radius: var(--radius); padding: 25px; position: relative; overflow: hidden; }
.calm-card h3 { font: 25px/1.25 Georgia, serif; max-width: 240px; margin: 0 0 12px; }
.calm-card p { font-size: 13px; color: #5c6e49; max-width: 260px; position: relative; z-index: 1; }
.calm-card .line-art { position: absolute; right: 12px; bottom: 0; font: 100px Georgia, serif; color: #c1d1a1; transform: rotate(-13deg); pointer-events: none; }
.calm-card .link-button { position: relative; padding: 8px 0; color: #3e5d32; z-index: 1; }
.section-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 15px; }
.section-label h2 { font-size: 16px; font-weight: 600; margin: 0; }
.rental-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.rental-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-width: 0; }
.property-art { height: 132px; background: #e7e9de; position: relative; overflow: hidden; }
.property-art svg { display: block; width: 100%; height: 100%; }
.card-content { padding: 18px; }
.card-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.card-title h3 { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.card-content p { font-size: 12px; color: var(--muted); margin: 7px 0 18px; overflow-wrap: anywhere; }
.card-meta { display: flex; justify-content: space-between; align-items: end; gap: 10px; flex-wrap: wrap; }
.card-meta strong { font-size: 20px; font-weight: 500; }
.card-meta strong small { font-size: 12px; color: var(--muted); font-weight: 400; }
.card-meta span { font-size: 12px; color: #60724f; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 21px; }
.filters button { min-height: 38px; padding: 8px 15px; border: 1px solid #d8e0cf; border-radius: 22px; background: var(--paper); font-size: 12px; color: #5b6f47; }
.filters button:hover { background: #eef3e5; }
.filters button.active { background: var(--green); color: white; border-color: var(--green); }
.notice, .note-box { padding: 14px 17px; background: #eef2e5; border: 1px solid #dfe7d4; border-radius: 8px; color: #536644; font-size: 13px; line-height: 1.6; margin-bottom: 21px; overflow-wrap: anywhere; }
.empty { padding: 28px; color: var(--muted); font-size: 13px; text-align: center; }
.detail-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.detail-list div { padding: 15px; background: #f4f7ed; border: 1px solid #e8eddf; border-radius: 8px; min-width: 0; }
.detail-list small { display: block; font-size: 12px; color: #627553; margin-bottom: 6px; }
.detail-list strong { font-size: 14px; font-weight: 550; overflow-wrap: anywhere; }
.ticket-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.ticket-column { background: #ecefe3; padding: 15px; border: 1px solid #e0e7d6; border-radius: var(--radius); min-width: 0; }
.ticket-column h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .9px; padding: 0 4px; color: #526747; }
.ticket-card { padding: 18px; background: var(--paper); border: 1px solid #dbe2d1; border-radius: 9px; margin-top: 14px; box-shadow: var(--shadow); }
.ticket-card h3 { font-size: 14px; margin: 12px 0 6px; font-weight: 600; overflow-wrap: anywhere; }
.ticket-card p { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.ticket-card select { font-size: 13px; width: 100%; min-height: 44px; padding: 10px; border: 1px solid #cdd8c1; border-radius: 6px; color: var(--green); background: #fafcf5; }
.activity-item { display: flex; gap: 12px; border-bottom: 1px solid var(--line); padding: 16px 0; }
.activity-item:last-child { border: 0; padding-bottom: 0; }
.activity-item p { font-size: 13px; margin: 0; overflow-wrap: anywhere; }
.activity-item small { font-size: 12px; color: var(--muted); }
.activity-dot { width: 7px; height: 7px; background: #8fae61; border-radius: 50%; margin-top: 7px; flex-shrink: 0; }
footer { border-top: 1px solid var(--line); padding: 20px 0 27px; color: #637454; font-size: 11px; letter-spacing: 1px; display: flex; justify-content: space-between; gap: 18px; }
footer span { letter-spacing: 0; font-size: 12px; max-width: 530px; text-align: right; }

/* Dialogs and forms keep the same calm rhythm as the main workspace. */
dialog { border: 1px solid #e0e7d7; background: var(--paper); border-radius: 16px; padding: 0; width: min(600px,calc(100% - 32px)); color: var(--ink); box-shadow: 0 25px 90px #152a2638; max-height: min(90vh,900px); max-height: min(90dvh,900px); overflow-y: auto; overscroll-behavior: contain; }
dialog::backdrop { background: #172d256b; backdrop-filter: blur(3px); }
.modal-head { padding: 25px 27px 17px; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.modal-head h2 { margin: 4px 0 0; font: 28px/1.2 Georgia, serif; letter-spacing: -.45px; overflow-wrap: break-word; }
.close-button { flex-shrink: 0; border: 1px solid #dfe6d5; background: #eef2e5; color: #536b40; width: 40px; height: 40px; border-radius: 50%; font-size: 23px; line-height: 1; }
.close-button:hover { background: #e2ebd4; }
.modal-body { padding: 0 27px 27px; }
.modal-body > p { font-size: 13px; color: var(--muted); margin-top: 0; margin-bottom: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 16px; }
label { display: block; font-size: 13px; font-weight: 500; color: #526847; min-width: 0; }
label.full, .form-grid > .full { grid-column: 1/-1; }
input, select, textarea { display: block; width: 100%; border: 1px solid #c9d5bf; border-radius: 7px; background: #fffefa; color: var(--ink); padding: 11px 12px; margin-top: 6px; min-height: 44px; font-weight: 400; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: #67765c; opacity: 1; }
input[type="checkbox"], input[type="radio"] { display: inline-block; width: 18px; min-height: 18px; margin: 0 7px 0 0; vertical-align: middle; accent-color: var(--green); }
input[type="hidden"] { display: none; }
textarea { resize: vertical; min-height: 110px; }
input:disabled, select:disabled, textarea:disabled { background: #edf0e7; color: #6f7c62; border-color: #dce3d2; cursor: not-allowed; opacity: 1; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; flex-wrap: wrap; }
.form-error, .field-error { color: var(--red); font-size: 13px; margin-top: 10px; line-height: 1.5; }
.form-error:empty, .field-error:empty { display: none; }
[aria-invalid="true"] { border-color: #ad5748; box-shadow: 0 0 0 1px #ad5748; }
.form-hint { grid-column: 1/-1; margin: 0; font-size: 12px; font-weight: 400; color: #536944; background: #eef3e5; border-radius: 7px; padding: 12px 14px; line-height: 1.6; }
.field-hint { display: block; margin: 7px 0 0; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.5; }
.split-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.form-section { margin: 25px 0 0; padding: 23px 0 0; border: 0; border-top: 1px solid var(--line); min-width: 0; }
.form-section h3, .form-section legend { font-size: 15px; font-weight: 600; margin: 0 0 16px; padding: 0; }
.form-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.record-summary { font-size: 14px; line-height: 1.8; background: #f0f5e6; padding: 21px; border: 1px solid #e0e8d3; border-radius: 9px; }
.agreement { background: #f8faf2; border: 1px solid var(--line); padding: 22px; border-radius: 9px; font-size: 13px; }
.agreement h3 { font: 25px Georgia, serif; margin: 12px 0; }
.agreement p { color: var(--muted); }
.amount-large { font-size: clamp(37px,4vw,48px); letter-spacing: -1.8px; margin: 8px 0; font-variant-numeric: tabular-nums; }
.renter-hero { background: #e8efdc; padding: 28px; border-radius: var(--radius); border: 1px solid #d8e4c5; margin-bottom: 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.renter-hero > div { min-width: 0; }
.renter-hero p { font-size: 13px; color: #5c704a; }
.renter-hero h2 { font: 28px Georgia, serif; margin: 0; }
#toast { position: fixed; bottom: 25px; left: 50%; transform: translate(-50%,20px); background: #294c3a; color: white; padding: 14px 22px; border: 1px solid #3b634a; border-radius: 10px; font-size: 13px; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 100; max-width: min(560px,calc(100vw - 32px)); width: max-content; box-shadow: 0 8px 30px #152a2626; }
#toast.show { opacity: 1; transform: translate(-50%,0); }

/* Properties, units, and detail views. */
.property-group { display: grid; grid-template-columns: 190px minmax(0,1fr); background: var(--paper); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 22px; overflow: hidden; box-shadow: var(--shadow); }
.property-cover { grid-column: 1; grid-row: 1; display: flex; align-items: stretch; background: #f6f8ef; min-width: 0; }
.property-cover > .property-art { flex: 1; width: 100%; height: 100%; min-height: 164px; }
.property-cover > .property-art svg { min-height: 164px; }
.property-cover > svg { display: block; width: 100%; height: 160px; object-fit: cover; }
.property-summary { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: minmax(0,1fr) minmax(180px,.8fr); gap: 16px 24px; align-items: center; min-width: 0; padding: 23px 25px; }
.property-summary > div:first-child { min-width: 0; }
.property-summary > .summary-strip { margin: 0; grid-template-columns: repeat(2,minmax(0,1fr)); align-self: stretch; align-items: center; }
.property-summary > .summary-strip .summary-item { padding: 14px; }
.property-summary > .summary-strip strong { font-size: 21px; }
.property-summary > .button { grid-column: 1/-1; justify-self: start; }
.property-group > .unit-list { grid-column: 1/-1; }
.property-group > .unit-list > .link-button { margin: 4px 20px 12px; }
.property-summary h2 { font: 26px/1.2 Georgia, serif; letter-spacing: -.5px; margin: 5px 0 9px; overflow-wrap: anywhere; }
.property-summary h3 { font-size: 16px; margin: 4px 0 8px; }
.property-summary p { color: var(--muted); font-size: 13px; margin: 7px 0; overflow-wrap: anywhere; }
.property-summary .inline-actions { margin-top: 15px; }
.unit-list { margin: 0; padding: 0; list-style: none; }
.unit-row { display: flex; align-items: center; gap: 18px; padding: 19px 24px; border-top: 1px solid #e7ecde; min-width: 0; }
.unit-row:hover { background: #fafbf5; }
.unit-main { display: flex; align-items: center; gap: 12px; flex: 1 1 200px; min-width: 0; }
.unit-main > div { min-width: 0; }
.unit-main strong, .unit-main h3 { display: block; font-size: 14px; font-weight: 600; margin: 0 0 4px; overflow-wrap: anywhere; }
.unit-main p, .unit-main small { display: block; color: var(--muted); font-size: 12px; margin: 4px 0 0; overflow-wrap: anywhere; }
.unit-finance { flex: 0 1 auto; text-align: right; font-variant-numeric: tabular-nums; min-width: 110px; }
.unit-finance strong { display: block; font-size: 17px; font-weight: 550; }
.unit-finance strong > small { display: inline; font-size: 11px; font-weight: 400; }
.unit-finance small { display: block; color: var(--muted); font-size: 12px; }
.unit-row > .inline-actions { justify-content: flex-end; }
.toolbar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 23px; }
.search-field { flex: 1 1 260px; min-width: 180px; max-width: 560px; }
.search-field input, input.search-field { margin-top: 0; min-height: 44px; background-color: var(--paper); }
.filter-select { flex: 0 1 200px; min-width: 150px; }
select.filter-select { margin-top: 0; }
.filter-select select { margin-top: 0; }
.toolbar label > input, .toolbar label > select { margin-top: 6px; }
.toolbar .filters { margin-bottom: 0; }
.page-back { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; min-height: 40px; padding: 0 0 8px; margin: 0 0 13px; color: #4d693d; font-size: 13px; }
.page-back:hover { text-decoration: underline; text-underline-offset: 4px; }
.detail-tabs { display: flex; gap: 5px; border-bottom: 1px solid #d5decc; margin: 0 0 24px; overflow-x: auto; padding: 3px 3px 0; scrollbar-width: thin; }
.detail-tabs button, .detail-tabs a { flex: 0 0 auto; min-height: 45px; border: 0; border-bottom: 3px solid transparent; background: none; color: #647756; padding: 11px 16px; font-size: 13px; }
.detail-tabs .active, .detail-tabs [aria-selected="true"] { color: #2c5037; border-bottom-color: var(--green); font-weight: 650; }
.detail-tabs button:hover, .detail-tabs a:hover { background: #edf2e3; text-decoration: none; }
.detail-section { margin: 24px 0; min-width: 0; }
.detail-section > h2, .detail-section > h3 { font-size: 16px; margin: 0 0 15px; font-weight: 600; }
.detail-section > p { color: var(--muted); overflow-wrap: anywhere; }
.summary-strip { display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 0; border: 1px solid var(--line); border-radius: 10px; background: #f1f5e8; margin: 0 0 24px; overflow: hidden; }
.summary-item { min-width: 0; padding: 17px 20px; border-right: 1px solid #dfe6d5; }
.summary-item:last-child { border-right: 0; }
.summary-item small, .summary-item span { display: block; font-size: 12px; color: #61744f; }
.summary-item strong { display: block; font-size: 22px; font-weight: 500; margin-top: 5px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.timeline { padding: 0; margin: 6px 0 0; list-style: none; }
.timeline-entry { position: relative; padding: 0 0 22px 25px; border-left: 1px solid #d6dfca; margin-left: 5px; overflow-wrap: anywhere; }
.timeline-entry:before { content: ""; position: absolute; width: 9px; height: 9px; background: #91aa6e; border: 2px solid var(--paper); box-shadow: 0 0 0 1px #91aa6e; border-radius: 50%; left: -5px; top: 6px; }
.timeline-entry:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-entry strong { display: block; font-size: 13px; font-weight: 600; }
.timeline-entry p { margin: 4px 0; font-size: 13px; }
.timeline-entry small, .timeline-entry time { font-size: 12px; color: var(--muted); }
.note-box { background: #f5f7ef; margin-top: 16px; }
.note-box p:first-child { margin-top: 0; }
.note-box p:last-child { margin-bottom: 0; }
.renter-select { display: flex; align-items: center; gap: 12px; padding: 13px 17px; border: 1px solid #dce5d1; border-radius: 9px; background: #eef3e5; margin-bottom: 24px; font-size: 13px; color: #4d653e; }
.renter-select label { flex: 0 0 auto; }
.renter-select select { margin: 0; max-width: 360px; background: #fffefa; }
header .renter-select { margin: 0 0 0 auto; padding: 0; border: 0; background: transparent; gap: 8px; max-width: 270px; min-width: 0; flex: 1 1 200px; }
header .renter-select label, header .renter-select > span { font-size: 12px; }
header .renter-select select { min-width: 0; min-height: 40px; font-size: 13px; margin: 0; }
header select.renter-select { display: block; min-height: 44px; border: 1px solid #c9d5bf; padding: 10px 12px; background: var(--paper); font-size: 13px; color: var(--ink); }
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 22px; }
.backup-card, .help-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 25px; min-width: 0; box-shadow: var(--shadow); }
.backup-card h2, .help-card h2 { font: 25px/1.25 Georgia, serif; margin: 0 0 13px; letter-spacing: -.4px; }
.backup-card h3, .help-card h3 { font-size: 15px; margin: 20px 0 9px; }
.backup-card p, .help-card p { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.backup-card .inline-actions, .help-card .inline-actions { margin-top: 20px; }
.backup-card > .button { margin: 4px 6px 7px 0; }
.backup-card > .eyebrow + h2, .help-card > .eyebrow + h2 { margin-top: 9px; }
.step-list { padding-left: 23px; margin: 20px 0; }
.step-list li { padding-left: 5px; margin-bottom: 15px; color: var(--muted); font-size: 13px; }
.step-list li::marker { color: #4f713c; font-weight: 650; }
.step-list strong { color: var(--ink); }
.empty-state { grid-column: 1/-1; width: 100%; padding: 42px 24px; background: #fcfdf7; border: 1px dashed #cbd8bd; border-radius: var(--radius); text-align: center; color: var(--muted); }
.empty-icon { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid #dbe5ca; border-radius: 50%; margin: 0 auto 17px; background: #ecf2e0; color: #64804c; font-size: 25px; }
.empty-icon svg { width: 26px; height: 26px; }
.empty-state h2, .empty-state h3 { color: var(--ink); font: 25px/1.3 Georgia, serif; margin: 0 0 10px; }
.empty-state p { max-width: 450px; margin: 0 auto 19px; font-size: 13px; }
.empty-state .inline-actions { justify-content: center; }
.warning { color: #835b27; background: #fbf2df; border-color: #e9d9b4; }
.danger { color: #984434; }
.button.danger { color: #984434; background: #fff9f6; border-color: #e6bfb3; }
.button.danger:hover { background: #f8e9e2; border-color: #cf9787; }
.button.primary.danger { color: white; background: #9a4639; border-color: #9a4639; }
.button.primary.danger:hover { background: #80372d; }
.kbd, kbd { display: inline-block; font: 11px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; padding: 2px 6px; border: 1px solid #d0dbc4; border-bottom-width: 2px; border-radius: 4px; background: #f5f8ef; color: #5c714b; }
.mobile-tools { display: none; }

/* Adapt the layout before content gets cramped; tables scroll locally. */
@media (min-width: 1550px) { main { max-width: 1450px; width: 100%; margin: auto; } }
@media (max-width: 1180px) {
  .shell { grid-template-columns: 205px minmax(0,1fr); }
  aside { padding: 25px 15px; }
  main { padding: 0 25px; }
  .stats { gap: 10px; }
  .stat { padding: 18px 16px; }
  .two-col { grid-template-columns: minmax(0,1.3fr) minmax(265px,1fr); gap: 18px; }
  .rental-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .two-col .rental-grid { grid-template-columns: 1fr; }
  th, td { padding-left: 17px; padding-right: 17px; }
  .ticket-grid { gap: 12px; }
  .ticket-column { padding: 11px; }
  .ticket-card { padding: 14px; }
  .property-group { grid-template-columns: 150px minmax(0,1fr); }
  .property-summary { gap: 14px; padding: 20px; grid-template-columns: minmax(0,1fr) minmax(165px,.8fr); }
}
@media (max-width: 1020px) {
  .two-col { grid-template-columns: 1fr; }
  .two-col .rental-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat-value { font-size: 32px; }
  .ticket-grid { grid-template-columns: 1fr; }
  .ticket-column { padding: 15px; }
  .ticket-card { padding: 18px; }
  .settings-grid { grid-template-columns: 1fr; }
  .unit-row { gap: 12px; }
  .unit-row > .inline-actions { max-width: 170px; }
}
@media (max-width: 850px) {
  .shell { grid-template-columns: minmax(0,1fr); }
  aside { padding: 16px 22px 12px; border-right: 0; border-bottom: 1px solid var(--line); display: block; }
  .brand { font-size: 27px; }
  .brand-mark { font-size: 25px; width: 35px; line-height: 35px; border-radius: 9px; }
  .workspace, .nav-label, .aside-bottom { display: none; }
  nav { flex-direction: row; overflow-x: auto; padding: 3px 1px 6px; margin-top: 14px; gap: 6px; scrollbar-width: thin; scrollbar-color: #bbc8aa transparent; }
  nav button { white-space: nowrap; padding: 10px 12px; font-size: 12px; gap: 7px; min-height: 44px; flex-shrink: 0; }
  nav .nav-icon { font-size: 17px; width: 18px; }
  main { padding: 0 22px; }
  header { min-height: 73px; flex-wrap: wrap; padding: 12px 0; gap: 10px 14px; }
  header .renter-select { margin-left: 0; }
  .mobile-tools { display: flex; gap: 20px; flex-wrap: wrap; padding: 0 0 16px; }
  .mobile-tools .text-button { min-height: 44px; padding: 11px 0; font-size: 12px; }
  .property-group { grid-template-columns: 165px minmax(0,1fr); }
  .page-heading h1 { font-size: 35px; }
  .role-switch button { min-height: 40px; }
}
@media (max-width: 620px) {
  .demo-banner { font-size: 11px; padding: 9px 14px; }
  aside { padding: 15px 17px 10px; }
  main { padding: 0 17px; }
  header { flex-wrap: wrap; align-content: center; justify-content: space-between; gap: 8px 12px; padding: 12px 0; }
  .breadcrumbs { font-size: 12px; }
  .breadcrumbs span { padding-left: 4px; }
  .role-switch { margin-left: auto; }
  .role-switch button { font-size: 12px; padding: 8px 10px; min-height: 40px; }
  #content { padding-top: 25px; padding-bottom: 28px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; gap: 17px; margin-bottom: 23px; }
  .page-heading h1 { font-size: 33px; }
  .page-heading p { font-size: 13px; }
  .heading-actions { justify-content: flex-start; width: 100%; }
  .button { min-height: 44px; padding: 11px 14px; font-size: 13px; }
  .button.small, .link-button, .filters button, .page-back { min-height: 44px; }
  .link-button { padding-top: 10px; padding-bottom: 10px; }
  .stats { gap: 10px; margin-bottom: 20px; }
  .stat { padding: 18px 15px; }
  .stat-top { font-size: 12px; }
  .stat-value { font-size: 29px; letter-spacing: -.7px; }
  .stat-note { font-size: 12px; }
  .rental-grid, .two-col .rental-grid { grid-template-columns: 1fr; }
  .property-art { height: 150px; }
  .panel-head { padding: 20px 18px 15px; flex-wrap: wrap; gap: 8px 12px; }
  .panel-head > .link-button { padding-left: 0; }
  .panel-body { padding: 0 18px 20px; }
  .request { padding: 17px 18px; }
  .panel { margin-bottom: 20px; }
  .calm-card { padding: 24px; }
  .form-grid, .split-fields { grid-template-columns: 1fr; }
  .detail-list { gap: 10px; }
  .detail-list div { padding: 13px; }
  .modal-body { padding: 0 20px 24px; }
  .modal-head { padding: 22px 20px 16px; }
  .modal-head h2 { font-size: 26px; }
  dialog { width: calc(100% - 22px); max-height: 93vh; max-height: 93dvh; border-radius: 13px; }
  .close-button { width: 44px; height: 44px; }
  input, select, textarea, .ticket-card select { font-size: 16px; }
  .form-actions .button { flex: 1 1 auto; }
  .renter-hero { flex-direction: column; align-items: flex-start; gap: 13px; padding: 23px; }
  .renter-hero .button { white-space: normal; }
  footer { display: block; }
  footer span { display: block; margin-top: 8px; text-align: left; }
  .collection-bottom { gap: 30px; }
  .property-group { display: block; }
  .property-cover { flex-direction: column; }
  .property-cover > .property-art { flex-basis: auto; width: 100%; min-height: 140px; height: 140px; }
  .property-cover > .property-art svg { min-height: 140px; }
  .property-summary { display: block; padding: 20px; }
  .property-summary > .summary-strip { margin: 17px 0; }
  .property-summary > .summary-strip .summary-item { border-bottom: 0; }
  .property-summary h2 { font-size: 25px; }
  .unit-row { padding: 18px 20px; flex-wrap: wrap; gap: 12px; }
  .unit-main { flex: 1 1 150px; }
  .unit-finance { min-width: 90px; }
  .unit-row > .inline-actions { width: 100%; max-width: none; justify-content: flex-start; }
  .toolbar { gap: 10px; }
  .search-field { flex-basis: 100%; max-width: none; min-width: 0; }
  .filter-select { flex: 1 1 140px; min-width: 0; }
  .detail-tabs { gap: 0; margin-bottom: 21px; }
  .detail-tabs button, .detail-tabs a { padding: 11px 13px; }
  .summary-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .summary-item { padding: 15px 16px; border-bottom: 1px solid #dfe6d5; }
  .summary-item:nth-child(2n) { border-right: 0; }
  .summary-item:nth-last-child(-n+2) { border-bottom: 0; }
  .summary-item strong { font-size: 21px; }
  .renter-select { display: block; padding: 14px; }
  .renter-select select { margin-top: 7px; max-width: none; }
  header .renter-select { display: flex; order: 3; flex-basis: 100%; max-width: none; padding-top: 2px; }
  header .renter-select select { margin-top: 0; min-height: 44px; font-size: 16px; }
  header select.renter-select { font-size: 16px; padding: 10px 12px; }
  .backup-card, .help-card { padding: 22px; }
  .empty-state { padding: 34px 21px; }
  #toast { bottom: max(18px,env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  main { padding: 0 13px; }
  .page-heading h1 { font-size: 30px; }
  .stat { padding: 16px 12px; }
  .stat-value { font-size: 26px; }
  .stat-icon { display: none; }
  .detail-list { grid-template-columns: 1fr; }
  .role-switch { margin-left: 0; }
  .unit-finance { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .button, .badge, .stat, .panel, .rental-card, .property-group, .role-switch { border: 1px solid CanvasText; }
  nav button.active, .role-switch button.active { outline: 2px solid Highlight; outline-offset: -3px; }
  .progress span { background: Highlight; }
}

/* Third edition: a persistent home file, with evidence close to the next action. */
:root { --sage-deep: #dce7cb; --text-soft: #53644f; --focus-ring: #315f49; }
html { scroll-padding-top: 108px; }
#nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; border: 1px solid transparent; background: none; text-align: left; padding: 10px 12px; border-radius: 8px; color: #5b6a5d; font-size: 13px; line-height: 1.45; transition: background .15s, color .15s; }
#nav a:hover { background: #f0f2e8; color: var(--green); text-decoration: none; }
#nav a.active { background: #e8efdc; color: #294e38; font-weight: 650; border-color: #dfe8d1; }
.workspace-main .rental-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,190px),1fr)); }
.workspace-side > .help-card { margin-bottom: 22px; }
.card-content h2 { font-size: 18px; font-weight: 600; line-height: 1.35; margin: 9px 0; overflow-wrap: anywhere; }
.card-content > .button { margin-top: 18px; }
main > header { position: sticky; top: 0; z-index: 30; background: var(--bg); }
#content, [id][tabindex="-1"] { scroll-margin-top: 104px; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 8px; line-height: 1.55; }
.breadcrumbs span { padding-left: 0; }
.breadcrumbs a, .breadcrumbs button { color: #4b654a; }
.breadcrumbs button { border: 0; border-radius: 4px; background: transparent; padding: 6px 0; font-size: inherit; line-height: inherit; text-align: left; }
.breadcrumbs button:hover { text-decoration: underline; text-underline-offset: 3px; }
.breadcrumbs [aria-current="page"], .breadcrumbs #crumb { color: var(--ink); font-weight: 550; }
#content > .breadcrumbs { padding: 0 2px; margin: -6px 0 15px; }
.breadcrumbs .button { min-height: 36px; padding: 5px 0; border: 0; border-radius: 3px; background: transparent; font-size: 12px; font-weight: 500; box-shadow: none; }
.breadcrumbs .button:hover { background: transparent; text-decoration: underline; }
.workspace-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; padding: 25px 27px; margin: 0 0 22px; background: #edf2e4; border: 1px solid #d9e3cd; border-radius: 14px; }
.workspace-hero > div { min-width: 0; }
.workspace-hero h1 { font: 400 clamp(30px,3.2vw,42px)/1.14 Georgia, "Times New Roman", serif; letter-spacing: -1px; margin: 7px 0 10px; overflow-wrap: anywhere; }
.workspace-hero h2 { font: 400 27px/1.25 Georgia, "Times New Roman", serif; margin: 7px 0 10px; }
.workspace-hero p { max-width: 660px; font-size: 13px; color: #53664c; margin: 7px 0; overflow-wrap: anywhere; }
.workspace-hero .badge { margin-right: 5px; }
.workspace-hero .inline-actions, .workspace-actions { flex-shrink: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.workspace-title { flex: 1 1 320px; }
.workspace-hero .workspace-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 13px; color: #53664c; font-size: 12px; }
.workspace-tabs { display: flex; flex-direction: row; align-items: stretch; gap: 3px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #a5b69a transparent; padding: 5px 3px 0; margin: 0 0 25px; border-bottom: 1px solid #d3ddc9; }
.workspace-tabs button, .workspace-tabs a { flex: 0 0 auto; min-height: 48px; margin: 0; padding: 12px 15px 13px; background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 6px 6px 0 0; color: #56694d; font-size: 13px; line-height: 1.4; font-weight: 500; white-space: nowrap; text-decoration: none; }
.workspace-tabs button:hover, .workspace-tabs a:hover { color: #284f37; background: #edf2e3; text-decoration: none; }
.workspace-tabs .active, .workspace-tabs [aria-selected="true"], .workspace-tabs [aria-current="page"] { color: #284b35; background: #e9f0dd; border-color: var(--green); font-weight: 650; }
.workspace-tabs button:focus-visible, .workspace-tabs a:focus-visible { outline-offset: -4px; }
.workspace-tabs .count { margin: 0 0 0 5px; padding: 1px 5px; background: #dce6cf; color: #445c35; font-size: 11px; border-radius: 4px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(260px,1fr); gap: 22px; align-items: start; }
.workspace-main, .workspace-side { min-width: 0; }
.workspace-side { display: block; padding: 0; border: 0; background: transparent; }
.workspace-main > :last-child, .workspace-side > :last-child { margin-bottom: 0; }
.workspace-side .panel-head { padding: 20px 21px 15px; }
.workspace-side .panel-body { padding: 0 21px 21px; }
.workspace-side .detail-list { grid-template-columns: 1fr; }
.workspace-grid .panel-head { align-items: flex-start; flex-wrap: wrap; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,170px),1fr)); gap: 13px; margin: 0 0 24px; }
.metric-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); box-shadow: var(--shadow); }
.metric-card.featured { background: #e9f0dd; border-color: #d3e0c1; }
.metric-card.warning { background: #fbf3e2; border-color: #eadbb9; }
.metric-card .metric-label, .metric-card > small, .metric-card > span:first-child, .metric-card dt { display: block; color: #56694c; font-size: 12px; font-weight: 500; line-height: 1.45; }
.metric-card .metric-value, .metric-card > strong, .metric-card dd { display: block; margin: 12px 0 7px; color: var(--ink); font-size: clamp(25px,2.3vw,33px); font-weight: 500; letter-spacing: -.85px; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric-card .metric-value small, .metric-card > strong small { font-size: 13px; font-weight: 400; letter-spacing: 0; }
.metric-card .metric-note, .metric-card > p { color: #5d6d52; font-size: 12px; line-height: 1.5; margin: 0; }
.metric-card .link-button { padding-left: 0; margin-top: 5px; }
.workspace-main .metric-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,170px),1fr)); }
.document-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; margin-bottom: 22px; }
.document-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 21px; border: 1px solid #dbe3d2; border-radius: 11px; background: var(--paper); box-shadow: var(--shadow); }
.document-card .document-icon { display: grid; place-items: center; width: 38px; height: 44px; border: 1px solid #d6e0c8; border-radius: 6px; background: #eff4e5; color: #56743d; font-size: 12px; font-weight: 650; letter-spacing: .5px; margin-bottom: 16px; }
.document-card h2, .document-card h3, .document-card > strong { display: block; font-size: 15px; line-height: 1.4; font-weight: 600; color: var(--ink); margin: 0 0 7px; overflow-wrap: anywhere; }
.document-card p { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 7px 0 12px; overflow-wrap: anywhere; }
.document-card .document-meta, .document-card > small { color: #59694f; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.document-card .badge { margin-bottom: 12px; }
.document-card .inline-actions { margin-top: auto; padding-top: 17px; width: 100%; }
.document-card .inline-actions .button { flex: 1 1 auto; }
.document-preview { padding: 25px; background: #fffefa; border: 1px solid #dce3d3; border-radius: 9px; font-size: 13px; color: #394f3e; line-height: 1.8; overflow-wrap: anywhere; }
.document-preview h3 { font: 27px/1.25 Georgia, serif; margin: 0 0 20px; }
.document-preview pre { font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.document-preview .notice { margin-top: 0; }
.timeline { padding: 6px 0 0; margin: 0; list-style: none; }
.timeline-entry { margin-left: 5px; padding: 0 0 25px 23px; border-left-color: #d1ddc5; }
.timeline-entry::before { top: 6px; background: #739153; box-shadow: 0 0 0 1px #739153; }
.timeline-entry h3 { font-size: 13px; line-height: 1.5; font-weight: 600; margin: 0 0 5px; }
.timeline-entry p { font-size: 13px; line-height: 1.65; color: #58684f; }
.timeline-entry time { display: block; margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.timeline-entry .badge { margin: 6px 0; }
.timeline-entry .inline-actions { margin-top: 7px; }
.next-action { display: flex; align-items: flex-start; gap: 15px; padding: 20px 22px; background: #edf3e2; border: 1px solid #d7e3c9; border-radius: 11px; margin: 0 0 17px; }
.next-action > div { min-width: 0; }
.next-action .next-action-copy { flex: 1 1 220px; }
.next-action h2, .next-action h3, .next-action > strong { font-size: 15px; line-height: 1.45; font-weight: 600; margin: 4px 0 7px; color: #2f4b33; }
.next-action p { margin: 7px 0 11px; color: #526745; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.next-action small { font-size: 12px; color: #576c4b; }
.next-action .inline-actions { align-self: center; flex-shrink: 0; }
.next-action .eyebrow { color: #536e3d; }
.next-action.warning { background: #fbf3e4; border-color: #e8d9b8; }
.next-action.warning h2, .next-action.warning h3, .next-action.warning p, .next-action.warning small { color: #755223; }
.next-action + .next-action { margin-top: -4px; }
.ledger-table { white-space: normal; font-variant-numeric: tabular-nums; }
.ledger-table th { white-space: nowrap; }
.ledger-table td { vertical-align: top; line-height: 1.5; }
.ledger-table td:first-child { min-width: 100px; }
.ledger-table td small { color: #5d6d54; }
.ledger-table .numeric, .ledger-table [data-numeric] { white-space: nowrap; text-align: right; }
.ledger-table .inline-actions { flex-wrap: nowrap; }
.ledger-table .reversed, .ledger-table tr.is-reversed td { color: #65715e; }
.ledger-table .reversal-note { display: block; margin-top: 5px; font-size: 12px; color: #895f2d; }
.ledger-table tfoot td { background: #eef3e6; border-top: 1px solid #d7e1cb; font-weight: 600; }
.inline-actions > * { max-width: 100%; }
.inline-actions .button, .heading-actions .button { overflow-wrap: anywhere; }
.period-picker { display: flex; align-items: center; gap: 10px; flex: 0 1 auto; min-width: 0; margin: 0 0 20px; color: #526847; }
.period-picker label { white-space: nowrap; font-size: 12px; }
.period-picker select, .period-picker input { width: auto; min-width: 0; min-height: 42px; margin: 0; padding: 9px 34px 9px 11px; font-size: 13px; }
label.period-picker { flex-wrap: wrap; }
.danger-zone { padding: 20px 22px; margin-top: 25px; border: 1px solid #e6c8bf; border-radius: 11px; background: #fffbf7; }
.danger-zone h2, .danger-zone h3 { color: #864233; font-size: 15px; margin: 0 0 8px; font-weight: 600; }
.danger-zone p { color: #76594e; font-size: 13px; margin: 8px 0 15px; overflow-wrap: anywhere; }
.form-error:not(:empty) { padding: 12px 14px; border: 1px solid #e8c9bf; border-left: 3px solid #9a4639; border-radius: 6px; background: #fff4ee; color: #873c2e; }
.form-error a, .notice a { text-decoration: underline; text-underline-offset: 3px; }
.notice { color: #4d6241; line-height: 1.65; }
.notice h2, .notice h3, .notice strong { color: #3d5532; }
.notice p:first-child { margin-top: 0; }
.notice p:last-child { margin-bottom: 0; }
.notice.warning { color: #7a5526; background: #fbf2df; border-color: #e5d2a9; }
.notice.warning h2, .notice.warning h3, .notice.warning strong { color: #755023; }
.empty-state { background: #fbfcf6; border-color: #c3d1b4; }
.empty-state p { color: #5c6c52; line-height: 1.7; }
.empty-state .button { margin-top: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
[role="tabpanel"]:focus-visible { outline-offset: 6px; }
.table-wrap:focus-visible { outline-offset: -3px; }
@media (min-width: 1200px) {
  .workspace-side .next-action { display: block; }
  .workspace-side .next-action .inline-actions { margin-top: 15px; }
}
@media (max-width: 1180px) {
  .workspace-grid { grid-template-columns: minmax(0,1.4fr) minmax(245px,1fr); gap: 18px; }
  .workspace-hero { padding: 23px; flex-wrap: wrap; gap: 17px; }
  .workspace-hero .inline-actions, .workspace-actions { justify-content: flex-start; }
  .metric-grid { gap: 11px; }
  .metric-card { padding: 18px 16px; }
  .next-action { flex-wrap: wrap; }
  .document-grid { gap: 12px; }
  .document-card { padding: 18px; }
}
@media (max-width: 1020px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workspace-main .metric-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,170px),1fr)); }
  .workspace-side .detail-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workspace-side .panel:last-child { margin-bottom: 0; }
}
@media (max-width: 850px) {
  main > header { margin: 0 -22px; padding: 12px 22px; box-shadow: 0 4px 12px #293e3505; }
  .workspace-hero { padding: 23px; }
  .workspace-side { padding: 0; }
  .workspace-tabs { margin-top: 0; }
  #nav a { white-space: nowrap; flex-shrink: 0; padding: 10px 12px; gap: 7px; font-size: 12px; }
}
@media (max-width: 620px) {
  html { scroll-padding-top: 115px; }
  main > header { margin: 0 -17px; padding: 10px 17px; min-height: 70px; }
  main > header .breadcrumbs { flex: 1 1 100%; font-size: 11px; gap: 4px 6px; }
  main > header .role-switch { margin-left: 0; }
  .workspace-main .rental-grid { grid-template-columns: 1fr; }
  .workspace-hero { padding: 21px 19px; gap: 15px; margin-bottom: 18px; }
  .workspace-hero h1 { font-size: 32px; }
  .workspace-hero .inline-actions, .workspace-actions { width: 100%; }
  .workspace-hero .inline-actions .button { flex: 1 1 auto; }
  .workspace-tabs { gap: 1px; margin-bottom: 21px; padding-top: 4px; }
  .workspace-tabs button, .workspace-tabs a { min-height: 48px; font-size: 12px; padding: 12px 13px; }
  .workspace-grid { gap: 20px; }
  .metric-grid, .workspace-main .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 20px; }
  .metric-card { padding: 17px 14px; }
  .metric-card .metric-value, .metric-card > strong, .metric-card dd { font-size: 27px; }
  .document-grid { grid-template-columns: 1fr; gap: 13px; }
  .document-card { padding: 20px; }
  .document-card .document-icon { margin-bottom: 13px; }
  .document-preview { padding: 18px; }
  .next-action { padding: 18px; gap: 11px; }
  .next-action .inline-actions { width: 100%; }
  .next-action .inline-actions .button { flex: 1 1 auto; }
  .workspace-side .panel-head { padding: 20px 18px 15px; }
  .workspace-side .panel-body { padding: 0 18px 20px; }
  .ledger-table { min-width: 590px; }
  .ledger-table th, .ledger-table td { padding-left: 16px; padding-right: 16px; }
  .period-picker { width: 100%; justify-content: space-between; }
  .period-picker select, .period-picker input { min-height: 44px; font-size: 16px; max-width: 100%; }
  .danger-zone { padding: 18px; }
  .timeline-entry { padding-left: 20px; }
  .workspace-side { padding: 0; }
}
@media (max-width: 360px) {
  main > header { margin: 0 -13px; padding: 10px 13px; }
  .workspace-hero h1 { font-size: 29px; }
  .metric-card { padding: 15px 12px; }
  .metric-card .metric-value, .metric-card > strong, .metric-card dd { font-size: 25px; }
  .workspace-side .detail-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .button:active { transform: none; }
}
@media (forced-colors: active) {
  .workspace-hero, .metric-card, .document-card, .next-action, .danger-zone, .empty-state, .notice { border: 1px solid CanvasText; }
  #nav a.active, .workspace-tabs [aria-selected="true"], .workspace-tabs .active { border-bottom-color: Highlight; outline: 2px solid Highlight; outline-offset: -4px; }
  .timeline-entry::before { background: CanvasText; border-color: Canvas; box-shadow: none; }
  button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline-color: Highlight; }
}
@media print {
  @page { margin: 16mm 14mm; }
  :root { --bg: #fff; --paper: #fff; --ink: #19291e; --muted: #414b3b; --line: #b8c2b0; }
  html, body { background: #fff !important; color: #19291e; font-size: 10pt; }
  body { line-height: 1.45; }
  .shell { display: block; min-height: 0; }
  .shell > aside, main > header, .skip-link, .role-switch, .workspace-tabs, .detail-tabs, .heading-actions, .workspace-actions, .inline-actions, .button, .link-button, .text-button, .filters, .toolbar, .mobile-tools, .page-back, #toast, dialog, .danger-zone { display: none !important; }
  main { padding: 0; max-width: none; margin: 0; }
  .demo-banner { padding: 0 0 8pt; background: #fff; color: #414b3b; border-bottom: 1px solid #b8c2b0; font-size: 8pt; }
  .demo-dot { display: none; }
  #content { padding: 14pt 0; min-height: 0; }
  .workspace-hero, .page-heading { margin-bottom: 14pt; padding: 0 0 12pt; border: 0; border-bottom: 1px solid #b8c2b0; border-radius: 0; background: #fff; }
  .workspace-hero h1, .page-heading h1 { font-size: 26pt; }
  .workspace-grid, .two-col, .settings-grid { display: block; }
  .metric-grid, .stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8pt; }
  .metric-card, .stat, .document-card, .panel, .property-group, .next-action, .empty-state, .notice { box-shadow: none; background: #fff; border-color: #b8c2b0; break-inside: avoid; }
  .metric-card, .stat { padding: 10pt; }
  .metric-card .metric-value, .metric-card > strong, .stat-value { font-size: 20pt; }
  .panel, .next-action { margin-bottom: 12pt; }
  .panel-head { padding: 12pt 12pt 8pt; }
  .panel-body { padding: 0 12pt 12pt; }
  .document-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .table-wrap { overflow: visible; }
  table, .ledger-table { width: 100%; min-width: 0; white-space: normal; font-size: 9pt; }
  thead { display: table-header-group; }
  tr { break-inside: avoid; }
  th, td, .ledger-table th, .ledger-table td { padding: 8pt; font-size: 9pt; }
  th { background: #f3f5ef; color: #374b2c; }
  .timeline-entry { break-inside: avoid; }
  .badge { border: 1px solid #aab69f; color: #293e35; background: #fff; }
  footer { margin-top: 15pt; padding: 10pt 0 0; color: #414b3b; font-size: 8pt; }
  footer span { font-size: 8pt; }
  a { text-decoration: none; }
  input, select, textarea { border: 1px solid #b8c2b0; }
}

/* Connected-workflow placeholders: inherit Hearth's existing sage palette. */
.integration-status { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:18px 21px; margin:0 0 23px; border:1px solid #d7ddcf; border-radius:10px; background:#f3f5ed; }
.integration-status strong { display:block; color:var(--ink); font-size:14px; }
.integration-status p { margin:5px 0 0; color:#58664e; font-size:13px; line-height:1.6; }
.integration-status .badge { flex-shrink:0; white-space:nowrap; }
.workflow-links { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:0 0 25px; }
.workflow-links a { display:flex; align-items:flex-start; gap:12px; padding:18px 15px; color:var(--ink); background:var(--paper); border:1px solid var(--line); border-radius:10px; text-decoration:none; }
.workflow-links a:hover { background:#edf3e2; border-color:#9bad88; }
.workflow-links a>span { font-size:23px; line-height:1.2; color:#58723f; }
.workflow-links strong { display:block; font-size:13px; line-height:1.5; }
.workflow-links small { display:block; color:#5c6d51; font-size:12px; margin-top:5px; line-height:1.5; }
.vault-summary { display:flex; justify-content:space-between; align-items:center; gap:18px; margin:8px 0 17px; }
.vault-summary h2 { margin:0 0 5px; font-size:18px; font-weight:600; }
.vault-summary p { margin:0; color:var(--muted); font-size:12px; line-height:1.5; }
.vault-filters { display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px; padding:17px; margin:0 0 20px; border:1px solid var(--line); border-radius:10px; background:var(--paper); }
.vault-filters label { flex:1 1 150px; min-width:0; }
.vault-filters label:first-child { flex-basis:200px; }
.vault-filters input,.vault-filters select { width:100%; margin-bottom:0; }
.vault-filters .button { min-height:43px; margin-bottom:0; }
.ask-layout { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
.ask-layout .panel,.signing-card,.preview-prepare { min-width:0; }
.ask-layout form>label,.preview-prepare label,#payment-preview-form>label { display:block; margin-bottom:17px; }
.ask-layout textarea { min-height:105px; }
.suggested-questions { display:flex; gap:8px; flex-wrap:wrap; margin:8px 0 18px; }
.suggested-questions .button { text-align:left; font-size:12px; line-height:1.5; padding:9px 12px; color:#3f5c32; background:#f2f5eb; }
.answer-panel { background:#fbfcf6; }
.answer-placeholder { padding:22px 0; }
.answer-placeholder>span { color:#718956; font-size:35px; }
.answer-placeholder h3 { font:25px/1.3 Georgia,serif; color:var(--ink); }
.answer-placeholder p,.answer-panel p { color:#526348; font-size:13px; line-height:1.75; }
.source-excerpt { padding:18px; margin:18px 0; border:1px solid #d7e0ce; border-left:3px solid #7b9662; border-radius:6px; background:#f0f5e7; }
.source-excerpt p { margin-bottom:0; white-space:normal; }
.answer-source strong,.answer-source small { display:block; line-height:1.6; margin-bottom:8px; }
.answer-source strong { font-size:13px; }
.answer-source small { font-size:12px; color:#5c6b51; }
.answer-panel .field-hint { margin-top:25px; }
.signing-list { display:grid; grid-template-columns:1fr; gap:20px; }
.signing-list .panel { margin:0; }
.signer-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.signer-step { border:1px solid #d9e1d0; border-radius:9px; padding:20px; background:#f8faf3; }
.step-number { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:#e4eccf; color:#4c673c; font-size:12px; margin-bottom:13px; }
.signer-step h3 { margin:0 0 8px; font-size:16px; }
.signer-step p { font-size:13px; color:#4d6240; margin:0 0 5px; overflow-wrap:anywhere; }
.signer-step small { display:block; color:#5c6e50; font-size:12px; line-height:1.6; margin-bottom:17px; overflow-wrap:anywhere; }
.signer-step .badge { display:table; margin-bottom:14px; }
.delivery-preview { margin:22px 0; }
.delivery-preview h3 { font-size:14px; margin:0 0 10px; }
.delivery-preview>div { display:flex; justify-content:space-between; gap:15px; padding:12px 0; border-bottom:1px solid var(--line); font-size:13px; line-height:1.5; }
.delivery-preview .badge { text-align:right; }
.checkout-balance { display:flex; flex-direction:column; padding:22px; border:1px solid #d7e2ca; border-radius:10px; background:#f0f5e5; margin:18px 0 23px; }
.checkout-balance small,.checkout-balance span { color:#586f46; font-size:12px; line-height:1.6; }
.checkout-balance strong { display:block; color:#304b29; font-size:36px; font-weight:500; letter-spacing:-1px; margin:7px 0; }
button:disabled { cursor:not-allowed; opacity:.7; }
@media (max-width:1180px) { .workflow-links { grid-template-columns:repeat(2,minmax(0,1fr)); } .ask-layout { grid-template-columns:1fr; } }
@media (max-width:620px) {
  .integration-status { align-items:flex-start; flex-direction:column; gap:12px; padding:17px; }
  .workflow-links { gap:9px; }
  .workflow-links a { padding:15px 12px; gap:8px; }
  .workflow-links a>span { font-size:20px; }
  .vault-summary { flex-direction:column; align-items:flex-start; }
  .vault-filters label { flex-basis:calc(50% - 12px); }
  .vault-filters label:first-child { flex-basis:100%; }
  .vault-filters input,.vault-filters select { font-size:16px; }
  .signer-grid { grid-template-columns:1fr; }
  .delivery-preview>div { flex-direction:column; gap:7px; align-items:flex-start; }
  .delivery-preview .badge { text-align:left; }
  .signing-card .panel-head { align-items:flex-start; flex-direction:column; gap:10px; }
  .checkout-balance { padding:19px; }
}
@media print { .workflow-links,.vault-filters,.suggested-questions { display:none; } .integration-status { border-color:#aab69f; background:#fff; } }
