@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,500;9..144,600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --app-font-sans: 'DM Sans', sans-serif;
  --app-font-serif: 'Fraunces', Georgia, serif;
  --app-font-mono: 'IBM Plex Mono', monospace;
  --font-sans: var(--app-font-sans);
  --font-serif: var(--app-font-serif);
  --font-mono: var(--app-font-mono);
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Editorial ledger — quiet confidence, clear action. */
body {
  margin: 0;
  min-width: 320px;
  background: #f3f0e7;
  color: #26343d;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
.mono { font-family: var(--font-mono); }

.app-shell { min-height: 100dvh; display: flex; color: #26343d; width: 100%; }
.sidebar { width: 248px; background: #23343c; color: #e8e7dd; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 30; padding: 28px 19px 20px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: #f2f0e8; font-size: 12px; font-weight: 700; letter-spacing: .16em; line-height: 1.2; }
.brand small { display: block; margin-top: 5px; color: #aab5b4; font-size: 8px; font-weight: 500; letter-spacing: .18em; }
.brand-symbol { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #cda96a; color: #e8c987; font-family: var(--font-serif); font-size: 20px; font-weight: 500; letter-spacing: 0; flex: none; }
.account-switch { display: flex; align-items: center; gap: 10px; margin: 32px 0 26px; padding: 12px 10px; border: 1px solid #405159; background: #293c44; cursor: pointer; text-decoration: none; }
.account-switch:hover { border-color: #5b717c; }
.account-initial,.avatar-mini { display: grid; place-items: center; flex: none; width: 30px; height: 30px; background: #d6b776; color: #23343c; font-family: var(--font-serif); font-size: 15px; overflow: hidden; }
.account-initial img,.avatar-mini img { width: 100%; height: 100%; object-fit: cover; }
.account-switch b,.account-switch small { display: block; }
.account-switch b { font-size: 12px; font-weight: 600; color: #f2f0e8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 135px; }
.account-switch small { margin-top: 3px; color: #aab5b4; font-size: 10px; }
.account-switch svg { margin-left: auto; color: #aab5b4; flex: none; }
.nav-group { margin-bottom: 24px; }
.nav-label,.eyebrow { font-size: 9px; font-weight: 700; letter-spacing: .14em; line-height: 1.4; text-transform: uppercase; }
.nav-label { color: #8fa0a0; margin: 0 11px 10px; }
.nav-link { min-height: 37px; padding: 0 11px; display: flex; align-items: center; gap: 12px; color: #c1cac6; font-size: 12px; margin: 2px 0; transition: color .16s, background .16s; cursor: pointer; }
.nav-link:hover { color: #fff; background: #2c4149; }
.nav-current { color: #f2d596; background: #30434a; box-shadow: inset 2px 0 #d8b979; }
.nav-count { font-style: normal; margin-left: auto; font: 10px var(--font-mono); background: #bd9d63; color: #22333b; padding: 3px 6px; }
.sidebar-bottom { margin-top: auto; padding-top: 12px; }
.human-card { border-top: 1px solid #405159; border-bottom: 1px solid #405159; padding: 14px 2px; display: flex; align-items: center; gap: 10px; position: relative; }
.human-avatar { width: 33px; height: 33px; display: grid; place-items: center; background: #d6d2c2; color: #31414a; border-radius: 50%; font-size: 10px; font-weight: 700; flex: none; }
.human-card b,.human-card small { display: block; }
.human-card b { font-size: 11px; font-weight: 600; }
.human-card small { color: #aab5b4; font-size: 10px; margin-top: 3px; }
.online-dot { width: 6px; height: 6px; background: #a8c79d; border-radius: 50%; margin-left: auto; align-self: flex-start; margin-top: 4px; flex: none; }
.sidebar-help { display: flex; gap: 9px; align-items: center; padding: 13px 2px 6px; color: #d9c28e; font-size: 11px; }
.sidebar-help svg:last-child { margin-left: auto; }
.sidebar-signout { width: 100%; display: flex; gap: 9px; align-items: center; padding: 10px 2px 2px; color: #9aa8a6; font-size: 11px; background: none; border: 0; cursor: pointer; text-align: left; }
.sidebar-signout:hover { color: #f2f0e8; }

.main-area { margin-left: 248px; width: calc(100% - 248px); min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { min-height: 58px; border-bottom: 1px solid #dfdbd0; display: flex; align-items: center; justify-content: space-between; padding: 0 42px; background: rgba(248,246,239,.78); position: sticky; top: 0; z-index: 15; backdrop-filter: blur(8px); }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: #8a8b83; font-size: 9px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.breadcrumb svg { color: #b2aa98; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.preview-flag { color: #686e68; font-size: 10px; letter-spacing: .01em; display: flex; align-items: center; gap: 7px; }
.preview-dot,.tiny-dot { width: 6px; height: 6px; background: #648767; border-radius: 50%; display: inline-block; }
.flag-divider { color: #b3a990; margin: 0 1px; }
.topbar-account { display: flex; align-items: center; gap: 8px; color: #58636a; font-size: 11px; cursor: pointer; }
.topbar-account .avatar-mini { width: 25px; height: 25px; font-size: 11px; }
.content-area { width: min(1120px, 100%); padding: 35px 42px 50px; flex: 1; margin: 0 auto; }
.footer { margin: 0 42px; min-height: 44px; border-top: 1px solid #dfdbd0; display: flex; justify-content: space-between; align-items: center; color: #8b8a82; font-size: 9px; letter-spacing: .03em; }
.footer-dot { color: #b18b4d; margin: 0 5px; }

/* Notifications dropdown in topbar */
.notif-wrapper { position: relative; }
.notif-bell-btn { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #d9d4c8; background: #faf8f1; color: #58636a; cursor: pointer; }
.notif-bell-btn:hover { border-color: #a98246; color: #2b3940; }
.notif-badge-dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: #a45343; }
.notif-dropdown { position: absolute; right: 0; top: calc(100% + 8px); width: min(360px, 90vw); background: #f7f4ea; border: 1px solid #d2cbb9; box-shadow: 0 14px 40px rgba(24,34,36,.16); z-index: 60; }
.notif-dropdown-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid #ded8ca; background: #eeebe2; }
.notif-dropdown-head b { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #34444b; }
.notif-list { max-height: 310px; overflow-y: auto; }
.notif-item { display: block; width: 100%; text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid #e5e0d5; background: transparent; cursor: pointer; }
.notif-item:hover { background: #f0ede4; }
.notif-item.notif-unread { background: #efeadd; border-left: 2px solid #b18e51; }
.notif-item b { display: block; font-size: 11px; color: #2b3940; }
.notif-item p { margin: 4px 0 0; font-size: 10px; color: #6e746f; line-height: 1.45; }
.notif-item small { display: block; margin-top: 5px; font: 9px var(--font-mono); color: #8b8a82; }

.welcome-strip { min-height: 155px; padding: 22px 26px; color: #f2f0e8; background: #344850; display: flex; align-items: center; justify-content: space-between; position: relative; overflow: hidden; }
.welcome-strip:after { content: ''; position: absolute; height: 220px; width: 220px; right: 100px; top: -108px; border: 1px solid rgba(223,195,137,.12); border-radius: 50%; box-shadow: 0 0 0 28px rgba(223,195,137,.035),0 0 0 57px rgba(223,195,137,.025); pointer-events: none; }
.welcome-strip .eyebrow { color: #d6bf8b; }
.welcome-strip h1 { font: 500 29px/1.17 var(--font-serif); margin: 12px 0 8px; letter-spacing: -.025em; }
.welcome-strip p { margin: 0; font-size: 12px; color: #c2ceca; }
.strip-divider { color: #84928f; padding: 0 6px; }
.welcome-stamp { display: flex; align-items: center; gap: 9px; padding: 10px 12px; color: #e0c98f; border: 1px solid #69766f; position: relative; z-index: 1; flex: none; }
.welcome-stamp span { font-size: 8px; letter-spacing: .11em; color: #b8c4bc; line-height: 1.4; }
.welcome-stamp b { color: #f0ddae; font: 11px var(--font-mono); }
.section-heading,.panel-heading,.subsection-title { display: flex; align-items: end; justify-content: space-between; }
.section-heading { margin: 29px 0 12px; }
.eyebrow { color: #8b806b; }
h1,h2,h3,p { margin-top: 0; }
.section-heading h2,.panel-heading h2,.subsection-title h2 { font: 500 20px/1.25 var(--font-serif); letter-spacing: -.01em; margin: 5px 0 0; color: #2b3940; }
.inline-link { color: #566c69; display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; cursor: pointer; background: none; border: 0; padding: 6px 0; }
.inline-link:hover,.feature-link:hover { color: #a67630; }
.ledger-stats { display: grid; grid-template-columns: 1.1fr 1fr 1fr; border-top: 1px solid #d6d1c3; border-bottom: 1px solid #d6d1c3; }
.stat-block { min-height: 135px; padding: 17px 19px 15px 0; display: flex; flex-direction: column; align-items: flex-start; }
.stat-block + .stat-block { border-left: 1px solid #d6d1c3; padding-left: 20px; }
.stat-block > span { font-size: 10px; color: #72766f; }
.stat-block > strong { font: 500 25px/1.2 var(--font-mono); letter-spacing: -.04em; margin-top: 8px; color: #2e3d43; }
.stat-block > small { color: #777b75; font-size: 10px; margin: 3px 0 12px; }
.stat-block a { margin-top: auto; color: #566c69; display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 600; }
.dashboard-columns { display: grid; grid-template-columns: 1.14fr .86fr; gap: 16px; margin-top: 23px; }
.panel { min-width: 0; border: 1px solid #d8d3c6; background: rgba(251,249,242,.52); display: flex; flex-direction: column; }
.panel-heading { padding: 16px 17px 13px; border-bottom: 1px solid #e2ded3; align-items: center; }
.panel-heading .eyebrow { font-size: 8px; }
.panel-heading h2 { font-size: 18px; }
.panel-heading > svg { color: #9a8968; }
.attention-count { display: inline-grid; place-items: center; vertical-align: 3px; background: #e7deca; width: 19px; height: 19px; border-radius: 50%; font: 10px var(--font-mono); margin-left: 3px; }
.attention-item { border: 0; border-bottom: 1px solid #e5e0d5; width: 100%; background: transparent; padding: 14px 15px; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.attention-item:hover,.recent-row:hover { background: #f2efe5; }
.attention-icon,.record-icon { display: grid; place-items: center; width: 31px; height: 31px; flex: none; background: #ece8dc; color: #71796f; }
.estimate-icon { color: #927443; background: #f0e9d8; }
.overdue-icon { color: #a45343; background: #f1e3dd; }
.attention-copy,.recent-copy { flex: 1; min-width: 0; }
.attention-copy b,.recent-copy b { display: block; font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attention-copy small,.recent-copy small { display: block; color: #82837b; font-size: 9px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attention-item > strong { font: 11px var(--font-mono); white-space: nowrap; }
.attention-item > svg:last-child { color: #92948b; flex: none; }
.badge { display: inline-flex; white-space: nowrap; padding: 4px 7px; background: #e9e6db; color: #68716b; font-size: 9px; line-height: 1; border: 1px solid #e2ded1; }
.badge-paid,.badge-complete,.badge-completed,.badge-accepted { color: #47715f; background: #e5eee6; border-color: #d2e1d3; }
.badge-overdue,.badge-declined,.badge-rejected,.badge-cancelled { color: #a14e40; background: #f2e3dd; border-color: #e9d1c8; }
.badge-awaiting-response,.badge-part-paid,.badge-in-progress,.badge-received,.badge-time-sensitive,.badge-urgent,.badge-pending,.badge-open,.badge-scheduled,.badge-due { color: #8a6931; background: #f0ead8; border-color: #e7dcc0; }
.badge-planning,.badge-standard { color: #647276; }
.panel-footer { display: flex; justify-content: flex-end; padding: 8px 15px; margin-top: auto; }
.quiet-empty { display: flex; align-items: center; gap: 8px; padding: 18px 15px; color: #85867e; font-size: 11px; }
.quiet-empty svg { color: #799078; flex: none; }
.arrow-only { color: #6b7774; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #ddd7c8; }
.recent-row { width: 100%; display: flex; align-items: center; gap: 9px; border: 0; border-bottom: 1px solid #e5e0d5; padding: 11px 13px; text-align: left; background: transparent; cursor: pointer; }
.recent-row .badge { margin-left: 2px; }
.recent-amount { font: 10px var(--font-mono); white-space: nowrap; }
.project-feature { display: grid; grid-template-columns: 1fr 1fr; margin-top: 17px; padding: 20px 22px; background: #e9e5d8; border-left: 3px solid #b18e51; }
.feature-left .eyebrow { color: #75674c; }
.feature-id { margin-left: 8px; color: #a19a86; font: 9px var(--font-mono); }
.feature-left h2 { font: 500 21px/1.2 var(--font-serif); margin: 9px 0 5px; }
.feature-left p { margin: 0 0 13px; font-size: 10px; color: #6e716c; }
.feature-link { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 700; color: #566c69; }
.project-progress { border-left: 1px solid #d1ccbc; padding-left: 24px; align-self: center; }
.progress-caption { display: flex; justify-content: space-between; color: #73766e; font-size: 9px; }
.progress-caption b { color: #45564f; font-weight: 600; }
.timeline { display: flex; position: relative; align-items: center; justify-content: space-between; margin: 13px 5px 6px; }
.timeline:before { content: ''; position: absolute; left: 4px; right: 4px; top: 4px; height: 1px; background: #c6c1b3; }
.timeline i { position: relative; width: 9px; height: 9px; border: 1px solid #aaa58f; border-radius: 50%; background: #e9e5d8; }
.timeline i.timeline-done { background: #64796f; border-color: #64796f; }
.timeline i.timeline-active { background: #d2b26f; border-color: #a78748; box-shadow: 0 0 0 3px #e9e5d8; }
.timeline-labels { display: flex; justify-content: space-between; color: #898980; font-size: 8px; }
.feature-date { display: flex; justify-content: space-between; border-top: 1px solid #d3cdbd; margin-top: 13px; padding-top: 9px; font-size: 9px; color: #777970; }
.feature-date b { color: #3d514c; font-weight: 600; }
.quick-actions { display: grid; grid-template-columns: 1.05fr 1fr 1fr 1fr; align-items: center; gap: 11px; padding: 20px 0 0; }
.quick-actions h2 { margin: 4px 0 0; font: 500 17px var(--font-serif); }
.quick-actions > a { display: flex; align-items: center; gap: 8px; min-height: 39px; border: 1px solid #d9d4c7; padding: 0 10px; font-size: 9px; font-weight: 600; color: #53615f; background: rgba(250,248,241,.55); }
.quick-actions > a svg:first-child { color: #a07f48; flex: none; }
.quick-actions > a svg:last-child { margin-left: auto; flex: none; }
.quick-actions > a:hover { border-color: #b6a47e; background: #fbf8ee; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 1px solid #d9d4c8; padding: 3px 0 20px; margin-bottom: 22px; }
.page-title h1 { font: 500 34px/1.1 var(--font-serif); letter-spacing: -.035em; margin: 9px 0 7px; color: #2b3940; }
.page-title p { margin: 0; font-size: 12px; color: #777a73; }
.page-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.filter-tabs { display: flex; gap: 3px; overflow-x: auto; }
.filter-tabs button { padding: 8px 11px; border: 0; background: transparent; color: #74776f; font-size: 10px; cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; }
.filter-tabs button:hover { color: #293b40; }
.filter-tabs button.filter-active { border-color: #a77e3d; color: #34454a; font-weight: 700; }
.search-input { width: 210px; height: 34px; border: 1px solid #d9d4c8; padding: 0 10px; background: #faf8f1; font-size: 11px; outline: 0; }
.search-input:focus,input:focus,textarea:focus,select:focus { border-color: #a98246; box-shadow: 0 0 0 2px rgba(169,130,70,.13); outline: none; }
.table-wrap { overflow-x: auto; border-top: 1px solid #d8d3c6; border-bottom: 1px solid #d8d3c6; }
table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 11px; text-align: left; }
th { padding: 11px 12px; color: #84847b; font-size: 8px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; background: #eeebe2; white-space: nowrap; }
td { padding: 13px 12px; border-top: 1px solid #e1ddd2; color: #5e6868; white-space: nowrap; }
td b { color: #34444b; font-weight: 600; }
tr.click-row { cursor: pointer; }
tr.click-row:hover { background: #f0ede4; }
.amount-cell { font: 10px var(--font-mono); color: #38494e; }
.row-arrow { border: 0; background: transparent; display: grid; place-items: center; color: #85877e; cursor: pointer; }
.list-intro { display: flex; justify-content: space-between; margin: -3px 0 13px; color: #777a73; font-size: 10px; }
.list-intro span:last-child { display: flex; align-items: center; gap: 6px; }
.payment-summary { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid #dad5c8; background: rgba(251,249,242,.45); margin-bottom: 29px; }
.payment-summary > div { display: flex; flex-direction: column; padding: 16px 18px; gap: 8px; }
.payment-summary > div + div { border-left: 1px solid #ded9cc; }
.payment-summary span { color: #7b7c74; font-size: 10px; }
.payment-summary b { font: 500 21px var(--font-mono); color: #37464b; }
.payment-summary b.summary-disabled { font: 600 10px var(--app-font-sans); color: #8b806b; }
.subsection-title { align-items: end; margin: 28px 0 12px; }
.subsection-title .eyebrow { margin-bottom: 4px; }
.subsection-title p { font-size: 10px; color: #7b7c74; margin: 6px 0 0; }
.slip-heading { margin-top: 38px; }
.slip-list { border-top: 1px solid #d9d4c8; }
.slip-row { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid #ded9cc; }
.slip-icon { display: grid; place-items: center; width: 31px; height: 31px; background: #e9e5d9; color: #8b744c; flex: none; }
.slip-info { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.slip-info b { font-size: 11px; }
.slip-info small { color: #7a7c74; font-size: 9px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 1px solid transparent; min-height: 37px; padding: 0 14px; font-size: 11px; font-weight: 600; cursor: pointer; transition: background .15s,border-color .15s,transform .15s; }
.button:active { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: .48; filter: saturate(.45); }
.button-primary { background: #31474e; color: #f4f0e3; }
.button-primary:hover:not(:disabled) { background: #243940; }
.button-secondary { border-color: #d3cdbf; background: transparent; color: #4f625f; }
.button-secondary:hover:not(:disabled) { border-color: #a78c59; background: #f5f1e6; }
.button-small { min-height: 31px; padding: 0 10px; font-size: 10px; }
.full-button { width: 100%; }
.receipt-list { border-top: 1px solid #d8d3c6; }
.receipts-summary { display: flex; gap: 12px; align-items: center; padding: 13px; background: #eae6da; margin-bottom: 19px; color: #69716c; }
.receipts-summary span,.receipts-summary b,.receipts-summary small { display: block; }
.receipts-summary b { color: #3c4c50; font-size: 11px; }
.receipts-summary small { color: #7c7e75; font-size: 9px; margin-top: 3px; }
.receipt-record { border-bottom: 1px solid #d8d3c6; }
.receipt-summary { display: flex; align-items: center; width: 100%; border: 0; padding: 15px 5px; text-align: left; background: transparent; cursor: pointer; }
.receipt-summary:hover { background: #f0ede4; }
.receipt-summary > strong { margin-left: auto; margin-right: 30px; font: 12px var(--font-mono); }
.receipt-number { display: flex; align-items: center; gap: 11px; }
.receipt-mark { display: grid; place-items: center; width: 33px; height: 33px; color: #927342; background: #eae5d8; flex: none; }
.receipt-number b,.receipt-number small { display: block; }
.receipt-number b { font-size: 11px; }
.receipt-number small { font-size: 9px; color: #7b7c74; margin-top: 4px; }
.receipt-detail { padding: 5px 15px 17px 50px; }
.receipt-detail .eyebrow { margin-bottom: 8px; }
.receipt-item { display: flex; justify-content: space-between; padding: 6px 0; font-size: 10px; border-bottom: 1px dotted #d6d1c5; gap: 12px; }
.receipt-total { display: flex; justify-content: space-between; padding-top: 11px; font-size: 11px; }
.receipt-total strong { font: 12px var(--font-mono); }
.local-record-note { color: #939187; font-size: 9px; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-list { border-top: 1px solid #d8d3c6; }
.project-record { display: grid; grid-template-columns: 55px 1fr; padding: 20px 0; border-bottom: 1px solid #d8d3c6; }
.project-number { font: 12px var(--font-mono); color: #b18e51; padding-top: 5px; }
.project-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.project-top h2 { font: 500 22px var(--font-serif); margin: 5px 0 0; }
.project-meta { display: flex; gap: 38px; margin: 18px 0; }
.project-meta span { display: flex; flex-direction: column; gap: 5px; font-size: 10px; color: #53615f; }
.project-meta small { color: #8b8b80; font-size: 8px; text-transform: uppercase; letter-spacing: .1em; }
.linked-records { display: flex; flex-wrap: wrap; gap: 7px; }
.linked-record { display: flex; align-items: center; gap: 7px; background: #ece9df; border: 1px solid #ded9ca; padding: 8px 9px; font-size: 10px; cursor: pointer; }
.linked-record:hover { border-color: #b18e51; background: #f5f1e6; }
.linked-record svg:first-child { color: #9b7b43; }
.linked-record span { color: #8a8a80; font-size: 8px; border-left: 1px solid #d1ccbe; padding-left: 7px; }
.linked-record svg:last-child { color: #8b8d82; }
.record-empty { color: #8a8a80; font-size: 10px; }
.form-page-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(200px,.7fr); gap: 28px; align-items: start; }
.request-form,.quote-form { border-top: 2px solid #34484e; padding-top: 17px; }
.form-eyebrow { margin-bottom: 18px; }
.form-stack,.request-form,.quote-form { display: flex; flex-direction: column; gap: 16px; }
label { display: flex; flex-direction: column; gap: 7px; color: #4b5859; font-size: 10px; font-weight: 600; }
label input,label textarea,label select,.comment-label textarea { width: 100%; border: 1px solid #d5d0c4; background: #fbf9f2; border-radius: 0; min-height: 39px; padding: 10px 11px; color: #34444b; font-size: 11px; font-weight: 400; resize: vertical; }
label input::placeholder,label textarea::placeholder { color: #a2a096; }
label select { appearance: auto; }
.form-submit-row { border-top: 1px solid #ddd8cc; padding-top: 15px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.form-submit-row > span { font-size: 9px; color: #85867e; }
.form-aside { border-left: 2px solid #c5a365; padding: 4px 0 5px 17px; color: #566461; }
.form-aside > svg { color: #a27f46; }
.form-aside h3 { font: 500 19px/1.2 var(--font-serif); color: #34464b; margin: 13px 0 8px; }
.form-aside p { color: #777b74; font-size: 10px; line-height: 1.7; margin-bottom: 12px; }
.submitted-section { margin-top: 38px; }
.submitted-section .subsection-title { margin-bottom: 11px; }
.subsection-title > span { font-size: 10px; color: #88877f; }
.activity-record { border-top: 1px solid #d9d4c8; }
.activity-record:last-child { border-bottom: 1px solid #d9d4c8; }
.activity-summary { display: flex; width: 100%; align-items: center; gap: 11px; text-align: left; border: 0; padding: 12px 2px; background: transparent; }
button.activity-summary { cursor: pointer; }
button.activity-summary:hover { background: #f0ede4; }
.activity-summary > span:nth-child(2) { flex: 1; min-width: 0; }
.activity-summary b,.activity-summary small { display: block; }
.activity-summary b { font-size: 11px; }
.activity-summary small { color: #83847c; font-size: 9px; margin-top: 4px; }
.activity-marker { display: grid; place-items: center; width: 30px; height: 30px; background: #e9e5d9; color: #8c744b; flex: none; }
.activity-detail { margin: 0 0 13px 42px; padding: 12px; background: #eeebe2; }
.activity-detail p { margin: 0; color: #56615e; font-size: 11px; line-height: 1.6; }
.quote-intro { display: flex; gap: 12px; padding: 14px; background: #eae6da; color: #8a744d; margin-bottom: 20px; }
.quote-intro b { color: #3e4c4e; font-size: 11px; }
.quote-intro p { color: #777a73; margin: 4px 0 0; font-size: 10px; }
.quote-line { border-top: 1px solid #ddd8cc; padding-top: 12px; }
.quote-line-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.quote-line-head > b { font: 9px var(--font-mono); color: #9d865b; letter-spacing: .08em; }
.quote-inputs { display: grid; grid-template-columns: 1fr 100px; gap: 12px; }
.quote-description { grid-column: 1 / -1; }
.quote-description textarea { min-height: 57px; }
.text-button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: #66726e; font-size: 10px; cursor: pointer; padding: 4px; }
.text-button:hover { color: #2b3940; }
.destructive-text { color: #a25849; }
.add-line { display: inline-flex; align-items: center; align-self: flex-start; gap: 6px; background: transparent; border: 1px solid #d4cebf; color: #596b66; padding: 8px 10px; cursor: pointer; font-size: 10px; }
.add-line:hover { border-color: #a78c59; background: #f5f1e6; }
.quote-notes { margin-top: 5px; }
.quote-notes textarea { min-height: 69px; }
.quote-saved-lines { padding: 0 0 13px 42px; }
.quote-saved-lines p { margin: 0; padding: 7px 0; font-size: 10px; color: #626c68; border-top: 1px dotted #d8d2c5; }
.quote-saved-lines .quote-saved-note { color: #7c7a70; font-style: italic; }
.contact-card { max-width: 720px; border: 1px solid #d8d3c6; background: rgba(251,249,242,.45); }
.contact-title { display: flex; align-items: center; gap: 14px; padding: 21px 23px; border-bottom: 1px solid #ddd8cc; }
.big-avatar { width: 48px; height: 48px; font-size: 12px; }
.contact-title .eyebrow { margin-bottom: 5px; }
.contact-title h2 { font: 500 22px var(--font-serif); margin: 0 0 5px; }
.contact-title p { margin: 0; color: #7c7d75; font-size: 10px; }
.contact-separator { color: #bd9b5d; margin: 0 4px; }
.contact-actions { padding: 4px 23px; }
.contact-action { width: 100%; min-height: 69px; display: flex; align-items: center; gap: 13px; border: 0; border-bottom: 1px solid #e1ddd2; background: transparent; text-align: left; font: inherit; cursor: pointer; text-decoration: none; }
.contact-action:last-child { border-bottom: 0; }
.contact-action:disabled { cursor: not-allowed; opacity: .6; }
.contact-action-icon { width: 34px; height: 34px; display: grid; place-items: center; color: #657b70; background: #e8e9df; flex: none; }
.contact-action.primary-contact .contact-action-icon { color: #627d62; background: #e3ebdf; }
.contact-action > span:nth-child(2) { flex: 1; }
.contact-action b,.contact-action small { display: block; }
.contact-action b { color: #37484c; font-size: 12px; }
.contact-action small { color: #81827a; font-size: 9px; margin-top: 5px; }
.contact-action > svg:last-child { color: #888a80; }
.contact-action:hover b { color: #9a7437; }
.contact-action-status { flex: none; color: #47715f; font-size: 9px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.contact-footnote { display: flex; align-items: center; gap: 7px; padding: 14px 23px; color: #88877d; font-size: 9px; border-top: 1px solid #e1ddd2; }
.contact-footnote svg { color: #81927e; flex: none; }
.contact-alternatives { max-width: 720px; margin-top: 23px; display: flex; align-items: center; gap: 8px; }
.contact-alternatives > div { flex: 1; }
.contact-alternatives p { margin: 4px 0 0; color: #7c7d75; font-size: 9px; }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 37px 20px; border: 1px dashed #d2ccbd; background: rgba(251,249,242,.35); }
.empty-mark { display: grid; place-items: center; width: 39px; height: 39px; background: #ebe7db; color: #92794b; margin-bottom: 11px; }
.empty-state h3 { font: 500 18px var(--font-serif); margin: 0 0 5px; }
.empty-state p { color: #7d7e75; font-size: 10px; margin: 0 0 13px; max-width: 330px; line-height: 1.6; }

/* Modals */
.modal-scrim { position: fixed; z-index: 80; inset: 0; background: rgba(25,38,42,.46); display: grid; place-items: center; padding: 18px; animation: fade-in .16s ease-out; }
.modal { width: min(560px, 100%); max-height: min(90dvh, 800px); overflow: auto; background: #f7f4ea; border: 1px solid #d2cbb9; box-shadow: 0 18px 60px rgba(24,34,36,.22); padding: 21px 23px 20px; animation: rise-in .19s ease-out; }
.modal-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #ded8ca; padding-bottom: 14px; margin-bottom: 17px; }
.modal-head h2 { font: 500 23px var(--font-serif); margin: 0; }
.icon-button { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid #d9d3c5; color: #69716d; background: transparent; cursor: pointer; }
.icon-button:hover { border-color: #a98246; color: #2b3940; }
.detail-summary { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: #ece8dc; }
.detail-summary > div { display: flex; flex-direction: column; gap: 5px; }
.detail-summary span { color: #787b73; font-size: 9px; }
.detail-summary strong { font: 500 22px var(--font-mono); color: #34454a; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 10px 0 15px; }
.detail-grid > div { border-bottom: 1px solid #e1dccf; padding: 10px 3px; display: flex; flex-direction: column; gap: 5px; }
.detail-grid small { color: #83847b; font-size: 9px; }
.detail-grid b { color: #465552; font-size: 10px; font-weight: 600; }
.detail-section { padding: 10px 0; }
.detail-section .eyebrow { margin-bottom: 8px; }
.detail-payment { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid #e0dbcf; font-size: 10px; color: #66716c; }
.detail-payment b { font: 10px var(--font-mono); color: #465552; }
.detail-muted { font-size: 10px; color: #898980; }
.detail-items-list { border-top: 1px solid #e0dbcf; max-height: 200px; overflow-y: auto; }
.detail-item-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 7px 0; border-bottom: 1px dotted #ded8ca; font-size: 10px; color: #4e5b59; }
.detail-item-row span:first-child { flex: 1; }
.detail-item-row b { font: 10px var(--font-mono); color: #34454a; white-space: nowrap; }
.estimate-terms { padding: 12px; background: #eeebe1; margin: 13px 0; }
.estimate-terms p { margin: 6px 0 0; font-size: 10px; line-height: 1.6; color: #6e756f; }
.comment-label { display: block; margin: 12px 0; }
.comment-label > span { float: right; color: #898980; font-size: 9px; font-weight: 400; }
.decision-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 13px; }
.decision-actions .button-primary { flex: 1; }
.decline-button { color: #955c4f; }
.modal-actions-bar { display: flex; gap: 9px; margin-top: 12px; }
.modal-actions-bar > * { flex: 1; }
.upload-context p { font-size: 11px; color: #707670; line-height: 1.55; margin: 7px 0 16px; }
.upload-zone { position: relative; border: 1px dashed #bcb5a5; background: #f1eee5; min-height: 145px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; cursor: pointer; color: #66716c; }
.upload-zone:hover { border-color: #a98246; background: #eeeadd; }
.upload-zone > svg { color: #9b7b44; }
.upload-zone strong { font-size: 11px; }
.upload-zone span { font-size: 9px; color: #8c8b81; }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toast { position: fixed; z-index: 100; bottom: 22px; right: 22px; display: flex; align-items: center; gap: 13px; background: #30474e; color: #f4f0e3; padding: 12px 16px; font-size: 11px; box-shadow: 0 6px 25px rgba(31,42,44,.18); animation: rise-in .2s ease-out; }
.toast svg { color: #d4bc83; flex: none; }

/* Login */
.login-layout { min-height: 100dvh; width: 100%; display: grid; grid-template-columns: minmax(280px, .85fr) 1.15fr; background: #f4f1e8; }
.login-aside { background: #263940; color: #f2f0e8; padding: 34px 44px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.login-aside:after { content: ''; width: 400px; height: 400px; border: 1px solid rgba(219,192,138,.2); border-radius: 50%; position: absolute; bottom: -250px; left: -150px; box-shadow: 0 0 0 34px rgba(219,192,138,.04),0 0 0 70px rgba(219,192,138,.04),0 0 0 110px rgba(219,192,138,.03); pointer-events: none; }
.login-quote { margin: auto 0; max-width: 350px; position: relative; z-index: 1; }
.login-quote .eyebrow { color: #d4bb83; }
.login-quote h1 { font: 500 clamp(36px,5vw,58px)/1.05 var(--font-serif); letter-spacing: -.04em; margin: 19px 0 14px; }
.login-quote p { max-width: 285px; color: #c3ceca; font-size: 13px; line-height: 1.7; }
.login-aside-foot { color: #9ba9a5; font-size: 8px; letter-spacing: .15em; position: relative; z-index: 1; }
.login-aside-foot span { color: #d4bb83; padding: 0 5px; }
.login-main { padding: 28px 9%; display: flex; flex-direction: column; }
.back-link { display: flex; align-items: center; gap: 7px; color: #68726f; font-size: 10px; align-self: flex-start; }
.back-link svg { transform: rotate(45deg); }
.login-box { width: min(390px,100%); margin: auto; }
.login-box > .eyebrow { color: #9a8359; }
.login-box h2 { font: 500 32px var(--font-serif); margin: 12px 0 7px; letter-spacing: -.03em; }
.login-box > p { color: #7b7d75; font-size: 11px; margin-bottom: 24px; }
.login-box .form-stack { gap: 15px; }
.preview-note { display: flex; gap: 8px; align-items: flex-start; color: #776b50; background: #eee8d8; padding: 10px; font-size: 9px; line-height: 1.5; }
.connection-note { display: flex; align-items: flex-start; gap: 8px; padding: 10px 11px; border-left: 2px solid #b18e51; background: #eee9dc; color: #73694f; font-size: 10px; line-height: 1.5; }
.portal-inline-loading { display: inline-flex; align-items: center; gap: 8px; color: #73766e; font-size: 11px; }
.portal-page-loading { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #73766e; font-size: 11px; }
.portal-records-loading { overflow: hidden; border: 1px solid #d8d2c5; background: #f8f6ef; }
.portal-records-loading-row { display: grid; gap: 16px; align-items: center; padding: 14px 16px; border-bottom: 1px solid #e1ddd2; }
.portal-records-loading-row:last-child { border-bottom: 0; }
.portal-records-loading-cell { height: 10px; border-radius: 0 !important; background: #e4e0d5 !important; }
.portal-records-loading-head .portal-records-loading-cell { height: 7px; background: #d9d3c5 !important; }
.preview-note svg { flex: none; color: #9c8148; }
.login-help { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; border-top: 1px solid #ddd8cc; margin-top: 25px; padding-top: 16px; color: #85857c; font-size: 9px; }
.login-help a { color: #556b66; text-decoration: underline; text-underline-offset: 2px; }
.login-footer { color: #939187; font-size: 9px; text-align: center; padding: 20px 0 3px; }
.form-message { margin: 4px 0 0; color: #9a5347; font-size: 10px; }
.mobile-header { display: none; }
.mobile-scrim { display: none; }
.mobile-bottom-nav { display: none; }
.mobile-header-spacer { width: 31px; height: 31px; }

/* Profile page */
.profile-account-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2px 0 14px; color: #7b7c74; font-size: 9px; letter-spacing: .08em; }
.profile-account-line b { margin-left: 6px; color: #38494e; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0; }
.profile-preview-tag { color: #887a5c; font-size: 9px; letter-spacing: 0; }
.profile-page-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(285px,.8fr); gap: 14px; align-items: start; }
.profile-form { display: grid; gap: 11px; min-width: 0; }
.profile-section,.profile-location-card { min-width: 0; border: 1px solid #d8d3c6; background: rgba(251,249,242,.58); }
.profile-section { padding: 17px 19px 19px; }
.profile-section-heading,.profile-location-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 11px; margin-bottom: 14px; border-bottom: 1px solid #e1ddd2; color: #93794a; }
.profile-section-heading h2,.profile-location-heading h2 { margin: 4px 0 0; color: #34444b; font: 500 18px/1.15 var(--font-serif); letter-spacing: -.02em; }
.profile-photo-row { display: flex; align-items: center; gap: 12px; min-height: 67px; margin-bottom: 14px; padding-bottom: 13px; border-bottom: 1px solid #e7e2d7; }
.profile-photo { display: grid; place-items: center; flex: none; width: 54px; height: 54px; overflow: hidden; border: 1px solid #d3cbb9; background: #263a41; color: #e4ca8e; font: 500 19px var(--font-serif); }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-copy { display: grid; gap: 4px; min-width: 0; }
.profile-photo-copy b { color: #38494e; font-size: 11px; font-weight: 600; }
.profile-photo-copy small { color: #7b7c74; font-size: 9px; line-height: 1.45; }
.profile-photo-button { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 31px; margin-left: auto; padding: 0 9px; border: 1px solid #d4cebf; background: #f8f6ef; color: #46565a; font-size: 9px; white-space: nowrap; cursor: pointer; }
.profile-photo-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.profile-field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px 13px; }
.profile-field-grid label,.profile-location-fields > label { display: grid; gap: 5px; min-width: 0; color: #6e746f; font-size: 9px; font-weight: 600; }
.profile-field-grid input,.profile-field-grid select,.profile-location-fields input,.profile-field-grid textarea { width: 100%; min-width: 0; min-height: 35px; padding: 7px 9px; border: 1px solid #d9d4c8; border-radius: 0; background: #faf8f1; color: #34444b; font-size: 10px; outline: 0; }
.profile-field-grid input:focus,.profile-field-grid select:focus,.profile-location-fields input:focus,.profile-field-grid textarea:focus { border-color: #a98246; box-shadow: 0 0 0 2px rgba(169,130,70,.13); }
.profile-field-wide { grid-column: 1 / -1; }
.profile-aside { position: sticky; top: 75px; display: grid; gap: 11px; min-width: 0; }
.profile-location-card { overflow: hidden; }
.profile-location-heading { margin: 0; padding: 14px 15px 11px; }
.profile-map { height: 178px; background: #e5e0d3; }
.profile-map iframe { display: block; width: 100%; height: 100%; border: 0; }
.profile-location-fields { display: grid; gap: 11px; padding: 13px 15px 15px; }
.profile-map-footer { display: grid; gap: 9px; padding-top: 10px; border-top: 1px solid #e1ddd2; }
.profile-map-footer > span { display: flex; align-items: flex-start; gap: 6px; color: #73776f; font-size: 9px; line-height: 1.45; }
.profile-map-footer > span svg { flex: none; color: #a98246; }
.profile-map-footer a { display: inline-flex; align-items: center; gap: 6px; width: fit-content; color: #344d54; font-size: 9px; font-weight: 600; }
.profile-map-footer a:hover { color: #936e35; }
.profile-account-card { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border: 1px solid #d8d3c6; background: #eeebe2; }
.profile-account-mark { display: grid; place-items: center; flex: none; width: 35px; height: 35px; background: #d6b776; color: #23343c; font: 500 15px var(--font-serif); }
.profile-account-card > div { display: grid; gap: 3px; }
.profile-account-card small { color: #838279; font-size: 7px; font-weight: 700; letter-spacing: .12em; }
.profile-account-card b { color: #38494e; font: 10px var(--font-mono); }
.profile-account-card span:not(.profile-account-mark) { color: #74776f; font-size: 9px; }
.profile-save-area { display: flex; align-items: center; justify-content: space-between; gap: 12px; grid-column: 1 / -1; padding: 1px 0; }
.profile-save-area .connection-note { max-width: 410px; margin: 0; }
.profile-save-area .button { flex: none; }

@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }
@keyframes rise-in { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: translateY(0) } }

@media (max-width: 1050px) {
  .sidebar { width: 220px; padding-inline: 15px; }
  .main-area { margin-left: 220px; width: calc(100% - 220px); }
  .content-area { padding-inline: 28px; }
  .topbar { padding-inline: 28px; }
  .footer { margin-inline: 28px; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; width: min(290px,84vw); box-shadow: 12px 0 40px rgba(24,36,40,.12); }
  .sidebar.sidebar-open { transform: translateX(0); }
  .main-area { margin-left: 0; width: 100%; padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .mobile-header { display: flex; height: 52px; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid #ded9cd; background: #f7f4eb; }
  .mobile-header .icon-button { width: 31px; height: 31px; }
  .mobile-brand { font-size: 10px; letter-spacing: .16em; font-weight: 700; color: #34464d; }
  .mobile-header .avatar-mini { width: 28px; height: 28px; font-size: 10px; }
  .mobile-scrim { display: block; position: fixed; z-index: 25; inset: 0; background: rgba(24,37,41,.34); border: 0; }
  .topbar { min-height: 43px; padding: 0 16px; }
  .breadcrumb { font-size: 8px; }
  .topbar-actions { gap: 10px; }
  .topbar .preview-flag { font-size: 8px; }
  .topbar-account { display: none; }
  .content-area { padding: 19px 16px 34px; }
  .footer { margin: 0 16px; min-height: 48px; gap: 12px; font-size: 8px; }
  .mobile-bottom-nav { position: fixed; z-index: 20; inset-inline: 0; bottom: 0; display: flex; align-items: stretch; gap: 3px; min-height: calc(64px + env(safe-area-inset-bottom)); padding: 5px max(7px, env(safe-area-inset-left)) calc(5px + env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-right)); border-top: 1px solid #d8d3c7; background: rgba(248,246,239,.97); backdrop-filter: blur(12px); }
  .mobile-bottom-link { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 2px; background: transparent; color: #777b75; text-decoration: none; font: 500 9px var(--app-font-sans); cursor: pointer; }
  .mobile-bottom-link span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-bottom-link.mobile-bottom-current { color: #31474e; background: #eeeadf; }
  .mobile-nav-count { position: absolute; top: 1px; left: calc(50% + 5px); min-width: 14px; height: 14px; display: grid; place-items: center; padding-inline: 3px; background: #c6a968; color: #263b40; font-size: 8px; font-style: normal; line-height: 1; }
  .welcome-strip { min-height: 143px; padding: 18px 16px; }
  .welcome-strip h1 { font-size: 24px; max-width: 290px; }
  .welcome-strip p { max-width: 260px; line-height: 1.5; font-size: 10px; }
  .welcome-stamp { display: none; }
  .section-heading { margin-top: 22px; }
  .section-heading h2,.panel-heading h2,.subsection-title h2 { font-size: 18px; }
  .section-heading .inline-link { font-size: 9px; }
  .ledger-stats { grid-template-columns: 1fr 1fr; }
  .stat-block { min-height: 125px; padding: 13px 12px 13px 0; }
  .stat-block + .stat-block { padding-left: 12px; }
  .stat-block:last-child { grid-column: 1/-1; border-left: 0; border-top: 1px solid #d6d1c3; padding-left: 0; }
  .stat-block > strong { font-size: 21px; }
  .dashboard-columns { grid-template-columns: 1fr; gap: 12px; margin-top: 17px; }
  .project-feature { grid-template-columns: 1fr; gap: 16px; padding: 17px; }
  .project-progress { border-left: 0; border-top: 1px solid #d1ccbc; padding: 14px 0 0; }
  .quick-actions { grid-template-columns: 1fr; gap: 7px; padding-top: 22px; }
  .quick-actions > div { margin-bottom: 5px; }
  .quick-actions > a { min-height: 42px; font-size: 10px; }
  .page-title { padding-bottom: 16px; margin-bottom: 17px; }
  .page-title h1 { font-size: 29px; }
  .page-title p { max-width: 420px; font-size: 10px; line-height: 1.5; }
  .page-toolbar { align-items: flex-start; flex-direction: column-reverse; }
  .filter-tabs { max-width: calc(100vw - 32px); width: 100%; }
  .search-input { width: 100%; }
  .table-wrap { overflow: visible; margin: 0; border: 0; }
  .table-wrap table { display: block; width: 100%; min-width: 0; table-layout: auto; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .table-wrap tbody { display: block; }
  .table-wrap tbody tr { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; margin-bottom: 9px; padding: 8px 13px; border: 1px solid #d8d3c6; background: rgba(251,249,242,.56); }
  .table-wrap tbody tr:last-child { margin-bottom: 0; }
  .table-wrap tbody td { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 0; border: 0; color: #5e6868; white-space: normal; overflow-wrap: anywhere; font-size: 10px; }
  .table-wrap tbody td::before { content: attr(data-label); color: #84847b; font-size: 7px; font-weight: 700; letter-spacing: .1em; line-height: 1.35; text-transform: uppercase; }
  .table-wrap tbody td:first-child { grid-column: 1 / -1; padding: 4px 28px 9px 0; border-bottom: 1px solid #e1ddd2; font-size: 12px; }
  .table-wrap tbody td[data-label=""] { position: absolute; top: 10px; right: 10px; display: block; padding: 0; }
  .table-wrap tbody td[data-label=""]::before { content: none; }
  .table-wrap tbody td.amount-cell { text-align: left; font-size: 10px; }
  .table-wrap tbody td .badge { align-self: flex-start; }
  .table-wrap tbody tr.click-row:hover { background: #f0ede4; }
  .list-intro { font-size: 9px; gap: 12px; }
  .payment-summary > div { padding: 12px 9px; }
  .payment-summary span { font-size: 9px; }
  .payment-summary b { font-size: 16px; }
  .project-record { grid-template-columns: 36px 1fr; }
  .project-top h2 { font-size: 19px; }
  .project-meta { gap: 18px; flex-wrap: wrap; margin: 14px 0; }
  .project-meta span { min-width: 74px; }
  .form-page-grid { grid-template-columns: 1fr; gap: 22px; }
  .form-aside { border-top: 1px solid #d6d1c3; border-left: 0; padding: 15px 0 0; }
  .contact-alternatives { align-items: stretch; flex-wrap: wrap; }
  .contact-alternatives > div { flex-basis: 100%; }
  .contact-alternatives .button { flex: 1; font-size: 9px; padding-inline: 8px; }
  .contact-title { padding: 16px; }
  .contact-title p { max-width: 240px; line-height: 1.5; }
  .contact-actions { padding-inline: 16px; }
  .contact-action small { line-height: 1.5; }
  .login-layout { grid-template-columns: 1fr; }
  .login-aside { min-height: 205px; padding: 20px 22px; }
  .login-aside .brand-symbol { width: 29px; height: 29px; }
  .login-quote { margin: 30px 0 0; }
  .login-quote h1 { font-size: 32px; margin: 11px 0 6px; }
  .login-quote p { font-size: 10px; margin-bottom: 0; }
  .login-aside-foot { margin-top: 16px; }
  .login-main { min-height: 430px; padding: 18px 22px 23px; }
  .login-box { margin: 40px auto; }
  .login-footer { padding-top: 5px; }
  .profile-account-line { align-items: flex-start; flex-direction: column; gap: 5px; margin-bottom: 12px; }
  .profile-page-grid { grid-template-columns: minmax(0,1fr); gap: 11px; }
  .profile-section { padding: 14px 13px 15px; }
  .profile-aside { position: static; }
  .profile-location-heading { padding: 13px 13px 10px; }
  .profile-map { height: 190px; }
  .profile-location-fields { padding: 12px 13px 14px; }
  .profile-save-area { align-items: stretch; flex-direction: column; }
  .profile-save-area .button { width: 100%; justify-content: center; }
}

.login-minimal {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 26px;
  box-shadow: 0 18px 40px rgba(24, 34, 38, 0.06);
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink);
}

.login-card h2 {
  font-family: "Fraunces", serif;
  font-size: 1.75rem;
  font-weight: 500;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.login-sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

.profile-map-help {
  padding: 8px 18px;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

#profile-interactive-map {
  height: 250px;
  width: 100%;
  z-index: 1;
  cursor: crosshair;
}

.profile-address-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.profile-coords-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0 4px;
  font-size: 0.78rem;
  color: var(--muted);
}

.profile-coords-row a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.portal-saving-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(24, 34, 38, 0.58);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 20px;
  user-select: none;
  cursor: wait;
}

.portal-saving-dialog {
  width: 100%;
  max-width: 380px;
  background: #fbfaf6;
  border: 1px solid #d6d1c3;
  border-radius: 10px;
  padding: 22px 22px 20px;
  box-shadow: 0 24px 48px rgba(18, 28, 33, 0.24);
}

.portal-saving-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.portal-saving-head b {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: #23343c;
}

.portal-saving-percent {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: #8f6b32;
}

.portal-saving-status {
  margin: 0 0 14px;
  font-size: 0.84rem;
  color: #666c65;
}

.portal-progress-track {
  width: 100%;
  height: 8px;
  background: #e6e1d4;
  border-radius: 999px;
  overflow: hidden;
}

.portal-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #23343c 0%, #bd9d63 100%);
  border-radius: 999px;
  transition: width 0.2s ease-out;
}



