:root {
    --white: #fff;
    --paper: #f5f4f0;
    --paper-deep: #ebe8df;
    --ink: #1a1a18;
    --black: #10100f;
    --muted: #696760;
    --line: #ddd9cf;
    --gold: #b18a47;
    --gold-light: #d7bd87;
    --green: #247655;
    --green-soft: #e4f2eb;
    --blue: #376fa5;
    --blue-soft: #e7f0f8;
    --amber: #9b6a1f;
    --amber-soft: #f8eedb;
    --purple: #725a9e;
    --purple-soft: #eee8f7;
    --cyan: #297988;
    --cyan-soft: #e3f1f3;
    --gray-soft: #ecebe7;
    --serif: "Iowan Old Style", Baskerville, "Times New Roman", serif;
    --sans: "Helvetica Neue", Inter, Arial, sans-serif;
    --sidebar: 262px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); margin: 0; min-width: 320px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.sr-only { clip: rect(0,0,0,0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

/* Login */
.login-body { background: var(--black); min-height: 100vh; }
.login-shell { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(430px, .95fr); min-height: 100vh; }
.login-brand-panel { background: radial-gradient(circle at 18% 18%, rgba(177,138,71,.18), transparent 35%), linear-gradient(135deg, #10100f, #1b1a17); color: var(--white); display: flex; flex-direction: column; justify-content: space-between; padding: 55px 6vw; position: relative; }
.login-brand-panel::after { border: 1px solid rgba(216,189,134,.2); content: ""; inset: 28px; pointer-events: none; position: absolute; }
.brand-logo-image { display: block; height: auto; object-fit: contain; width: 100%; }
.login-brand { position: relative; width: min(390px, 82%); z-index: 1; }
.login-message { max-width: 740px; position: relative; z-index: 1; }
.eyebrow, .section-kicker { color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .15em; margin: 0 0 20px; text-transform: uppercase; }
.eyebrow { align-items: center; display: flex; gap: 11px; }
.eyebrow > span { background: var(--gold); height: 1px; width: 28px; }
.login-message h1 { font-family: var(--serif); font-size: clamp(64px, 6vw, 104px); font-weight: 400; letter-spacing: -.05em; line-height: .91; margin: 0; }
.login-message h1 em { color: var(--gold); font-weight: 400; }
.login-message > p:last-child { color: #aaa79e; font-family: var(--serif); font-size: 22px; line-height: 1.55; margin: 35px 0 0; max-width: 510px; }
.login-version { color: #706e67; font-size: 9px; font-weight: 700; letter-spacing: .13em; margin: 0; position: relative; z-index: 1; }
.login-form-panel { align-items: center; background: var(--white); display: flex; justify-content: center; padding: 60px 7vw; }
.login-form-wrap { max-width: 470px; width: 100%; }
.eyebrow-dark { color: var(--muted); }
.login-form-wrap h2 { font-family: var(--serif); font-size: 54px; font-weight: 400; letter-spacing: -.035em; margin: 0 0 16px; }
.login-form-wrap > p:not(.eyebrow) { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0 0 38px; }
.login-form-wrap form { display: grid; gap: 22px; }
.login-form-wrap label, .entity-form label, .side-form-card label { display: grid; gap: 8px; }
.login-form-wrap label > span, .entity-form label > span, .side-form-card label > span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.login-form-wrap input, .entity-form input, .entity-form select, .entity-form textarea, .side-form-card input, .side-form-card select, .side-form-card textarea { background: var(--white); border: 1px solid var(--line); border-radius: 0; color: var(--ink); min-height: 50px; padding: 12px 14px; width: 100%; }
.login-form-wrap input:focus, .entity-form input:focus, .entity-form select:focus, .entity-form textarea:focus, .side-form-card input:focus, .side-form-card select:focus, .side-form-card textarea:focus { border-color: var(--gold); outline: none; }
.login-alert { background: #f9e5e2; border-left: 3px solid #a23c31; color: #792b23; font-size: 13px; margin-bottom: 22px; padding: 13px 15px; }
.login-alert-success { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.login-recaptcha { display: grid; gap: 9px; min-width: 0; }
.login-recaptcha-label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.login-recaptcha-frame { min-height: 78px; overflow: hidden; width: 100%; }
.login-recaptcha noscript { color: #792b23; font-size: 12px; line-height: 1.5; }
.login-form-wrap .button-primary:disabled { background: #77746d; border-color: #77746d; color: #e8e6df; cursor: not-allowed; }
.login-form-wrap .button-primary:disabled > span { color: #d0cdc4; }

/* Shell */
.app-shell { min-height: 100vh; }
.sidebar { background: var(--black); bottom: 0; color: var(--white); display: flex; flex-direction: column; left: 0; padding: 30px 22px 24px; position: fixed; top: 0; width: var(--sidebar); z-index: 50; }
.sidebar-brand { padding: 0 2px 24px; position: relative; z-index: 1; }
.sidebar-brand-logo { display: flex; transition: opacity .18s ease; width: 100%; }
.sidebar-brand-logo:hover { opacity: .82; }
.sidebar-nav { margin-top: 34px; }
.sidebar-nav > p { color: #67655f; font-size: 9px; font-weight: 800; letter-spacing: .15em; margin: 0 12px 13px; }
.sidebar-nav > .sidebar-nav-section-admin { margin-top: 28px; }
.sidebar-nav a { align-items: center; border-left: 2px solid transparent; color: #aaa79f; display: flex; font-size: 13px; gap: 13px; margin: 3px 0; min-height: 48px; padding: 0 13px; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.sidebar-nav a:hover { background: #1e1e1b; color: var(--white); }
.sidebar-nav a.active { background: #26241f; border-left-color: var(--gold); color: var(--white); }
.nav-icon { color: var(--gold-light); font-family: var(--serif); font-size: 20px; text-align: center; width: 22px; }
.sidebar-footer { border-top: 1px solid #30302c; margin-top: auto; padding-top: 22px; }
.sidebar-user { align-items: center; display: flex; gap: 11px; }
.sidebar-user { border: 1px solid transparent; padding: 7px; transition: background .18s ease, border-color .18s ease; }
.sidebar-user:hover, .sidebar-user.active { background: #1e1e1b; border-color: #35342f; }
.avatar { align-items: center; background: var(--paper-deep); color: var(--ink); display: inline-flex; flex: 0 0 auto; font-family: var(--serif); font-size: 15px; height: 38px; justify-content: center; width: 38px; }
.avatar-gold { background: var(--gold); color: var(--black); }
.sidebar-user > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.sidebar-user strong { font-size: 12px; }
.sidebar-user small { color: #77746d; font-size: 10px; }
.sidebar-footer form { margin-top: 18px; }
.sidebar-footer button { background: transparent; border: 0; color: #85827a; cursor: pointer; display: flex; font-size: 11px; justify-content: space-between; padding: 8px 5px; width: 100%; }
.sidebar-footer button:hover { color: var(--gold-light); }
.app-main { margin-left: var(--sidebar); min-height: 100vh; }
.topbar { align-items: center; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); display: flex; height: 82px; justify-content: space-between; padding: 0 3.5vw; position: sticky; top: 0; z-index: 30; }
.topbar > div:first-of-type > p { color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .14em; margin: 0 0 4px; }
.topbar h1 { font-family: var(--serif); font-size: 25px; font-weight: 400; margin: 0; }
.topbar-context { align-items: center; color: var(--muted); display: flex; font-size: 11px; gap: 9px; }
.status-dot { background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px var(--green-soft); height: 7px; width: 7px; }
.mobile-sidebar-toggle { background: transparent; border: 0; display: none; height: 42px; padding: 10px 5px; width: 42px; }
.mobile-sidebar-toggle span { background: var(--ink); display: block; height: 1px; margin: 7px 0; width: 27px; }
.sidebar-backdrop { display: none; }
.content { margin: 0 auto; max-width: 1680px; padding: 42px 3.5vw 65px; }

/* Base UI */
.panel { background: var(--white); border: 1px solid var(--line); }
.button-primary, .button-secondary, .button-filter { align-items: center; border: 1px solid var(--ink); cursor: pointer; display: inline-flex; font-size: 10px; font-weight: 800; gap: 30px; justify-content: space-between; letter-spacing: .08em; min-height: 48px; padding: 0 17px; text-transform: uppercase; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.button-primary { background: var(--ink); color: var(--white); }
.button-primary > span { color: var(--gold-light); font-size: 17px; }
.button-primary:hover { background: var(--gold); border-color: var(--gold); color: var(--black); }
.button-primary:hover > span { color: var(--black); }
.button-secondary { background: var(--white); color: var(--ink); }
.button-secondary:hover { border-color: var(--gold); color: #7d5c29; }
.button-filter { background: var(--paper-deep); border-color: var(--line); min-height: 44px; }
.button-filter:hover { background: var(--ink); color: var(--white); }
.button-full { width: 100%; }
.flash { align-items: center; display: flex; gap: 12px; margin-bottom: 25px; padding: 14px 17px; }
.flash-success { background: var(--green-soft); border-left: 3px solid var(--green); color: var(--green); }
.flash-error { background: #f9e5e2; border-left: 3px solid #a23c31; color: #792b23; }
.flash span { font-size: 18px; }
.flash p { font-size: 13px; margin: 0; }
.section-kicker { margin-bottom: 10px; }
.welcome-row, .page-heading { align-items: flex-end; display: flex; justify-content: space-between; margin-bottom: 34px; }
.welcome-row h2, .page-heading h2, .record-heading h2, .project-detail-heading h2, .form-page-heading h2 { font-family: var(--serif); font-size: clamp(38px, 3.5vw, 56px); font-weight: 400; letter-spacing: -.035em; line-height: 1; margin: 0; }
.welcome-row > div:first-child > p:last-child, .page-heading > div > p:last-child, .form-page-heading > p:last-child { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 14px 0 0; }
.welcome-actions, .record-actions { display: flex; gap: 8px; }
.request-contact-actions.is-scroll-fixed { background: rgba(255,255,255,.97); border: 1px solid var(--line); box-shadow: 0 14px 32px rgba(25,24,21,.13); padding: 8px; position: fixed; right: auto; top: 96px; width: 330px; z-index: 29; }
.request-contact-actions.is-scroll-fixed > * { flex: 1; }
.phone-action-icon { font-size: 15px; line-height: 1; }
.badge { border-radius: 20px; display: inline-flex; font-size: 9px; font-weight: 800; letter-spacing: .04em; padding: 7px 10px; white-space: nowrap; }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.badge-cyan { background: var(--cyan-soft); color: var(--cyan); }
.badge-gold { background: #f4ead6; color: #7d5c29; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-gray { background: var(--gray-soft); color: var(--muted); }
.source-tag { background: var(--paper); border: 1px solid var(--line); color: var(--muted); display: inline-flex; font-size: 10px; padding: 6px 9px; }

/* Dashboard */
.metric-grid { display: grid; gap: 13px; grid-template-columns: repeat(4, 1fr); margin-bottom: 20px; }
.metric-card { background: var(--white); border: 1px solid var(--line); min-height: 180px; padding: 24px; position: relative; }
.metric-card-accent { border-top: 3px solid var(--gold); padding-top: 22px; }
.metric-card > div { align-items: center; display: flex; gap: 10px; }
.metric-card small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.metric-icon { align-items: center; background: var(--paper); color: var(--gold); display: flex; font-family: var(--serif); font-size: 19px; height: 31px; justify-content: center; width: 31px; }
.metric-card > strong { display: block; font-family: var(--serif); font-size: 50px; font-weight: 400; margin: 22px 0 9px; }
.metric-card > p { color: var(--muted); font-size: 11px; margin: 0; }
.trend-up { color: var(--green); }
.dashboard-grid { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
.panel-header { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; min-height: 91px; padding: 20px 24px; }
.panel-header h2, .panel-header h3 { font-family: var(--serif); font-size: 27px; font-weight: 400; margin: 0; }
.panel-header > a { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.panel-header > a span { color: var(--gold); font-size: 16px; margin-left: 8px; }
.request-feed-item { align-items: center; border-bottom: 1px solid var(--line); display: grid; gap: 12px; grid-template-columns: 38px minmax(0,1fr) auto; min-height: 78px; padding: 14px 22px; transition: background .18s ease; }
.request-feed-item:hover, .project-feed-item:hover { background: var(--paper); }
.request-feed-copy { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.request-feed-copy strong { font-size: 13px; }
.request-feed-copy small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.request-feed-item time { color: #929087; font-size: 9px; grid-column: 2; }
.project-feed { display: grid; grid-template-columns: 1fr 1fr; }
.project-feed-item { border-bottom: 1px solid var(--line); min-height: 190px; padding: 21px; transition: background .18s ease; }
.project-feed-item:nth-child(odd) { border-right: 1px solid var(--line); }
.project-feed-top { align-items: flex-start; display: flex; justify-content: space-between; gap: 8px; }
.project-feed-top > span:first-child { display: flex; flex-direction: column; gap: 7px; }
.project-feed-top small { color: var(--gold); font-size: 9px; letter-spacing: .1em; }
.project-feed-top strong { font-family: var(--serif); font-size: 20px; font-weight: 400; }
.project-feed-item > p { color: var(--muted); font-size: 10px; margin: 18px 0; }
.progress-row { align-items: center; display: grid; gap: 10px; grid-template-columns: 1fr auto; }
.progress-row > span, .mini-progress, .project-card-progress > div { background: var(--paper-deep); height: 5px; overflow: hidden; }
.progress-row i, .mini-progress i, .project-card-progress i { background: var(--gold); display: block; height: 100%; }
.progress-row strong { font-size: 11px; }
.project-feed-item footer { color: #87857d; display: flex; font-size: 9px; justify-content: space-between; margin-top: 17px; }

/* Lists and tables */
.status-summary { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; padding-bottom: 2px; }
.status-summary a { background: var(--white); border: 1px solid var(--line); display: flex; flex: 0 0 125px; flex-direction: column; gap: 3px; min-height: 68px; padding: 11px 14px; }
.status-summary a.active { border-color: var(--gold); box-shadow: inset 0 -2px 0 var(--gold); }
.status-summary strong { font-family: var(--serif); font-size: 24px; font-weight: 400; }
.status-summary span { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.table-panel, .project-list-panel { overflow: hidden; }
.filters { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 10px; min-height: 76px; padding: 15px 20px; }
.filters label { min-width: 190px; }
.filters select, .filters input { background: var(--white); border: 1px solid var(--line); border-radius: 0; color: var(--ink); height: 44px; padding: 0 13px; width: 100%; }
.search-field { flex: 1; max-width: 520px; position: relative; }
.search-field > span { color: var(--gold); font-family: var(--serif); font-size: 21px; left: 14px; position: absolute; top: 9px; }
.search-field input { padding-left: 42px; }
.filters > a { color: var(--muted); font-size: 10px; font-weight: 700; padding: 10px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; min-width: 980px; width: 100%; }
th { background: #f0eee8; color: #77756e; font-size: 9px; font-weight: 800; letter-spacing: .1em; padding: 13px 17px; text-align: left; text-transform: uppercase; }
td { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; padding: 13px 17px; vertical-align: middle; }
tbody tr { transition: background .16s ease; }
tbody tr:hover { background: #faf9f6; }
tbody tr[data-row-link] { cursor: pointer; }
tbody tr[data-row-link]:focus-visible { outline-offset: -2px; }
td > strong, td > small { display: block; }
td > strong { color: var(--ink); font-size: 12px; margin-bottom: 5px; }
td > small { color: #8a877f; font-size: 10px; }
.table-person { align-items: center; display: flex; gap: 11px; min-width: 205px; }
.table-person > span:last-child { display: flex; flex-direction: column; gap: 5px; }
.table-person strong { color: var(--ink); font-size: 12px; }
.table-person small { color: var(--muted); font-size: 10px; }
.row-action { align-items: center; border: 1px solid var(--line); color: var(--gold); display: flex; font-size: 17px; height: 33px; justify-content: center; width: 33px; }
.row-action:hover { background: var(--gold); color: var(--black); }
.empty-state { align-items: center; display: flex; flex-direction: column; padding: 70px 25px; text-align: center; }
.empty-state > span { color: var(--gold); font-family: var(--serif); font-size: 34px; }
.empty-state h3 { font-family: var(--serif); font-size: 27px; font-weight: 400; margin: 16px 0 7px; }
.empty-state p { color: var(--muted); font-size: 12px; margin: 0; }

/* Details */
.back-link { color: var(--muted); display: inline-flex; font-size: 10px; font-weight: 700; letter-spacing: .05em; margin-bottom: 25px; text-transform: uppercase; }
.back-link:hover { color: var(--gold); }
.record-heading, .project-detail-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: 30px; }
.record-person { align-items: center; display: flex; gap: 18px; }
.avatar-large { background: var(--gold); font-size: 28px; height: 72px; width: 72px; }
.record-person > div > p, .project-detail-heading > div:first-child > p { color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .12em; margin: 0 0 7px; }
.record-person h2 { display: inline-block; margin-right: 12px; vertical-align: middle; }
.detail-grid { align-items: start; display: grid; gap: 19px; grid-template-columns: minmax(0,1fr) 330px; }
.detail-main, .detail-side { display: grid; gap: 19px; }
.detail-side { align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; overscroll-behavior: contain; padding-right: 3px; position: sticky; scrollbar-color: #c9b583 transparent; scrollbar-width: thin; top: 101px; }
.project-detail-side.has-open-progress-picker { max-height: none; overflow: visible; }
body.contact-actions-fixed .detail-side { max-height: calc(100vh - 193px); top: 174px; }
.detail-side::-webkit-scrollbar { width: 4px; }
.detail-side::-webkit-scrollbar-thumb { background: #c9b583; }
.request-flow-panel { min-width: 0; overflow: hidden; padding: 24px 25px 20px; }
.request-flow-heading { align-items: flex-end; display: flex; gap: 20px; justify-content: space-between; margin-bottom: 21px; }
.request-flow-heading .section-kicker { margin-bottom: 6px; }
.request-flow-heading h3 { font-family: var(--serif); font-size: 25px; font-weight: 400; margin: 0; }
.request-flow-heading > .badge { flex: 0 0 auto; }
.request-flow-diagram { display: grid; gap: 0; grid-auto-columns: minmax(112px,1fr); grid-auto-flow: column; list-style: none; margin: 0; min-width: 0; overflow-x: auto; padding: 0 0 8px; scrollbar-color: #c9b583 transparent; scrollbar-width: thin; width: 100%; }
.request-flow-diagram::-webkit-scrollbar { height: 4px; }
.request-flow-diagram::-webkit-scrollbar-thumb { background: #c9b583; }
.request-flow-diagram > li { align-items: flex-start; display: grid; gap: 8px; grid-template-columns: 27px minmax(0,1fr); min-height: 56px; padding-right: 16px; position: relative; }
.request-flow-diagram > li::after { background: var(--line); content: ""; height: 1px; left: 27px; position: absolute; right: 0; top: 13px; }
.request-flow-diagram > li:last-child::after { display: none; }
.request-flow-marker { align-items: center; background: var(--white); border: 1px solid #cfcac0; color: #8d8980; display: flex; font-size: 8px; font-weight: 800; height: 27px; justify-content: center; position: relative; width: 27px; z-index: 1; }
.request-flow-copy { display: grid; gap: 3px; min-width: 0; padding-top: 1px; }
.request-flow-copy small { color: #99958d; font-size: 7px; font-weight: 800; letter-spacing: .07em; }
.request-flow-copy strong { color: #77736b; font-size: 9px; font-weight: 700; line-height: 1.35; padding-top: 4px; }
.request-flow-diagram > li.is-completed::after { background: #97c2ae; }
.request-flow-diagram > li.is-completed .request-flow-marker { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.request-flow-diagram > li.is-completed .request-flow-copy strong { color: var(--green); }
.request-flow-diagram > li.is-current .request-flow-marker { background: var(--black); border-color: var(--gold); color: var(--gold-light); box-shadow: 0 0 0 3px #f2e7d0; }
.request-flow-diagram > li.is-current .request-flow-copy small { color: var(--gold); }
.request-flow-diagram > li.is-current .request-flow-copy strong { color: var(--ink); }
.detail-section { padding: 28px; }
.detail-section > header:not(.panel-header) { border-bottom: 1px solid var(--line); margin-bottom: 25px; padding-bottom: 20px; }
.detail-section > header h3, .side-form-card h3, .contact-card h3 { font-family: var(--serif); font-size: 28px; font-weight: 400; margin: 0; }
.editable-section-header { align-items: center; display: flex; gap: 20px; justify-content: space-between; }
.editable-section-header .section-kicker { margin-bottom: 7px; }
.section-edit-button { align-items: center; background: var(--white); border: 1px solid #cfbf9e; color: #7d5c29; cursor: pointer; display: flex; flex: 0 0 42px; height: 42px; justify-content: center; padding: 0; transition: background .18s ease, border-color .18s ease, color .18s ease; width: 42px; }
.section-edit-button:hover, .section-edit-button[aria-expanded="true"] { background: var(--gold); border-color: var(--gold); color: var(--black); }
.section-edit-button svg { fill: none; height: 18px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 18px; }
.inline-edit-form[hidden], [data-inline-edit-view][hidden] { display: none; }
.inline-edit-form { display: grid; gap: 20px; }
.inline-edit-grid, .contact-edit-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.inline-edit-grid label, .contact-edit-grid label { display: grid; gap: 7px; min-width: 0; }
.inline-edit-grid label > span, .inline-field-label { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.inline-edit-grid input, .inline-edit-grid textarea, .contact-edit-grid input { background: var(--white); border: 1px solid #d2cdc3; border-radius: 0; color: var(--ink); min-height: 48px; padding: 11px 12px; width: 100%; }
.inline-edit-grid textarea { line-height: 1.55; resize: vertical; }
.inline-edit-grid input:focus, .inline-edit-grid textarea:focus, .contact-edit-grid input:focus { border-color: var(--gold); outline: none; }
.inline-edit-grid label > small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.inline-edit-grid .field-full, .contact-edit-grid .field-full { grid-column: 1 / -1; }
.readonly-edit-field { background: var(--paper); border: 1px solid var(--line); display: grid; gap: 7px; min-height: 80px; padding: 13px 14px; }
.readonly-edit-field > span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.readonly-edit-field > strong { font-size: 12px; overflow-wrap: anywhere; }
.readonly-edit-field > small { color: #8b877e; font-size: 9px; line-height: 1.4; }
.fixed-services-field .service-tag-list { margin-top: 2px; }
.inline-edit-actions { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 9px; justify-content: flex-end; padding-top: 17px; }
.inline-edit-actions > button { justify-content: center; min-width: 145px; }
.info-grid { display: grid; gap: 22px; grid-template-columns: 1fr 1fr; }
.info-grid-three { grid-template-columns: repeat(3, 1fr); }
.info-grid > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.info-grid span, .description-box > span { color: #85827a; font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.info-grid strong, .info-grid a { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.info-grid a { color: #7d5c29; text-decoration: underline; text-decoration-color: #d7bd87; text-underline-offset: 4px; }
.contact-phone-list > a { display: grid; gap: 2px; text-decoration: none; }
.contact-phone-list > a + a { border-top: 1px solid var(--line); padding-top: 7px; }
.contact-phone-list > a strong { color: #7d5c29; font-size: 12px; text-decoration: underline; text-decoration-color: #d7bd87; text-underline-offset: 3px; }
.contact-phone-list > a small { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.info-grid > .services-info { grid-column: 1 / -1; }
.service-tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.service-tag-list > span { background: #f4ead6; border: 1px solid #e1cda6; color: #765524; font-size: 9px; letter-spacing: .03em; padding: 7px 10px; text-transform: none; }
.description-box { background: var(--paper); border-left: 2px solid var(--gold); margin-top: 28px; padding: 20px 22px; }
.description-box p { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 10px 0 0; }
.phone-editor { background: #faf8f3; border: 1px solid #d9d1c1; display: grid; gap: 11px; padding: 16px; }
.phone-editor-hint { color: var(--muted); font-size: 9px; line-height: 1.45; margin-top: -4px; }
.primary-phone-row { align-items: center; background: var(--white); border: 1px solid var(--line); display: flex; gap: 15px; justify-content: space-between; min-height: 58px; padding: 10px 12px; }
.contact-edit-grid .phone-primary-option { align-items: center; cursor: pointer; display: flex; gap: 10px; min-width: 0; }
.phone-primary-option > span:last-child { display: grid; gap: 4px; }
.primary-phone-row small { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .09em; }
.primary-phone-row strong { font-size: 13px; }
.primary-phone-row em { background: var(--green-soft); color: var(--green); font-size: 8px; font-style: normal; font-weight: 800; letter-spacing: .06em; padding: 5px 7px; text-transform: uppercase; }
.additional-phone-list { display: grid; gap: 8px; }
.additional-phone-row { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; }
.contact-edit-grid .phone-primary-selector { align-items: center; background: var(--white); border: 1px solid #c9c3b8; cursor: pointer; display: flex; justify-content: center; }
.phone-primary-option input, .phone-primary-selector input { border: 0; height: 1px; min-height: 0; opacity: 0; overflow: hidden; padding: 0; position: absolute; width: 1px; }
.phone-choice-indicator { background: var(--white); border: 1.5px solid #a6a198; border-radius: 50%; display: block; height: 16px; position: relative; width: 16px; }
.phone-primary-option input:checked + .phone-choice-indicator, .phone-primary-selector input:checked + .phone-choice-indicator { border-color: var(--green); }
.phone-primary-option input:checked + .phone-choice-indicator::after, .phone-primary-selector input:checked + .phone-choice-indicator::after { background: var(--green); border-radius: 50%; content: ""; inset: 3px; position: absolute; }
.phone-primary-option input:focus-visible + .phone-choice-indicator, .phone-primary-selector input:focus-visible + .phone-choice-indicator { outline: 2px solid var(--gold); outline-offset: 3px; }
.additional-phone-row input { min-width: 0; }
.additional-phone-row > button { background: var(--white); border: 1px solid #cda7a2; border-left: 0; color: #8b4942; cursor: pointer; font-size: 20px; padding: 0; transition: background .18s ease, color .18s ease; }
.additional-phone-row > button:hover { background: #9a3f35; color: var(--white); }
.add-phone-button { align-items: center; align-self: start; background: transparent; border: 0; color: #7d5c29; cursor: pointer; display: inline-flex; font-size: 9px; font-weight: 800; gap: 8px; justify-self: start; letter-spacing: .05em; padding: 5px 0; text-transform: uppercase; }
.add-phone-button:hover { color: var(--black); }
.add-phone-button:disabled { color: #aaa69d; cursor: not-allowed; }
.add-phone-button > span { font-size: 15px; }
.service-detail-intro { color: var(--muted); font-size: 14px; line-height: 1.65; margin: -3px 0 22px; max-width: 760px; }
.service-total-card { background: var(--black); border-left: 3px solid var(--gold); color: var(--white); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 16px; min-height: 108px; padding: 23px 25px; }
.service-duration-total, .service-investment-total { align-items: flex-start; display: flex; flex-direction: column; gap: 7px; justify-content: center; min-height: 64px; }
.service-investment-total { align-items: flex-end; border-left: 1px solid rgba(255,255,255,.13); padding-left: 28px; text-align: right; }
.service-duration-total > span, .service-investment-total > span { color: var(--gold-light); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.service-duration-total > b { color: var(--white); font-family: var(--serif); font-size: clamp(24px,2.4vw,32px); font-weight: 400; }
.service-investment-total > strong { align-items: baseline; display: flex; font-family: var(--serif); font-size: clamp(32px,3vw,43px); font-weight: 400; gap: 9px; letter-spacing: -.025em; }
.service-investment-total > strong > small { color: var(--gold-light); font-family: var(--sans); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.service-investment-total > strong > b { font-weight: 400; }
.service-section-feedback { border-left: 2px solid var(--green); color: var(--green); font-size: 12px; line-height: 1.45; margin: 0 0 16px; padding: 8px 11px; }
.service-section-feedback:empty { display: none; }
.service-section-feedback.is-error { border-left-color: #9b3f34; color: #9b3f34; }
.proposal-download-modal { background: var(--white); border: 0; box-shadow: 0 30px 80px rgba(0,0,0,.28); color: var(--ink); max-width: 490px; padding: 30px; width: calc(100% - 36px); }
.proposal-download-modal::backdrop { background: rgba(16,16,14,.72); backdrop-filter: blur(3px); }
.proposal-modal-heading { align-items: flex-start; display: flex; justify-content: space-between; margin-bottom: 25px; }
.proposal-ready-mark { align-items: center; background: var(--black); color: var(--gold-light); display: flex; font-size: 8px; font-weight: 800; height: 48px; justify-content: center; letter-spacing: .06em; width: 48px; }
.proposal-modal-heading > button { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-family: var(--serif); font-size: 27px; line-height: 1; padding: 0; }
.proposal-download-modal h2 { font-family: var(--serif); font-size: 34px; font-weight: 400; letter-spacing: -.025em; line-height: 1.05; margin: 0 0 14px; }
.proposal-download-modal > p:not(.section-kicker) { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 0; }
.proposal-modal-summary { background: var(--paper); border-left: 3px solid var(--gold); display: grid; gap: 5px; margin: 23px 0; padding: 18px 20px; }
.proposal-modal-summary > span { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.proposal-modal-summary > strong { font-family: var(--serif); font-size: 20px; font-weight: 400; }
.proposal-modal-summary > small { color: var(--muted); font-size: 10px; }
.proposal-modal-actions { display: flex; gap: 9px; justify-content: flex-end; }
.proposal-modal-actions > * { justify-content: center; min-width: 145px; }
.service-estimate-list { display: grid; gap: 12px; }
.service-estimate-card { background: var(--paper); border: 1px solid var(--line); }
.service-estimate-form { padding: 20px; }
.service-estimate-form > header { align-items: center; display: flex; gap: 14px; margin-bottom: 18px; }
.service-estimate-number { align-items: center; background: var(--black); color: var(--gold-light); display: flex; flex: 0 0 auto; font-family: var(--serif); font-size: 17px; height: 42px; justify-content: center; width: 42px; }
.service-estimate-form > header > div { min-width: 0; }
.service-estimate-form > header small { color: var(--gold); display: block; font-size: 10px; font-weight: 800; letter-spacing: .1em; margin-bottom: 4px; }
.service-estimate-form h4 { font-family: var(--serif); font-size: 21px; font-weight: 400; line-height: 1.2; margin: 0; }
.service-delete-button { align-items: center; background: transparent; border: 1px solid #c9a39e; color: #8b4942; cursor: pointer; display: inline-flex; flex: 0 0 38px; height: 38px; justify-content: center; margin-left: auto; padding: 0; transition: background .18s ease, border-color .18s ease, color .18s ease; width: 38px; }
.service-delete-button:hover:not(:disabled) { background: #9a3f35; border-color: #9a3f35; color: var(--white); }
.service-delete-button:disabled { border-color: #d8d4cb; color: #aaa69d; cursor: not-allowed; }
.service-delete-icon { fill: none; height: 18px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 18px; }
.service-estimate-grid { display: grid; gap: 12px; grid-template-columns: 1.2fr 1fr 1fr 1fr; }
.service-estimate-grid label { display: grid; gap: 7px; min-width: 0; }
.service-estimate-grid label > span:first-child, .add-service-detail-form label > span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.service-estimate-grid input, .service-estimate-grid select, .add-service-detail-form input, .add-service-detail-form select { background: var(--white); border: 1px solid var(--line); border-radius: 0; color: var(--ink); min-height: 48px; min-width: 0; padding: 11px 12px; width: 100%; }
.service-estimate-grid input:focus, .service-estimate-grid select:focus, .add-service-detail-form input:focus, .add-service-detail-form select:focus { border-color: var(--gold); outline: none; }
.duration-input-group { display: grid; grid-template-columns: minmax(0,1fr) 105px; }
.duration-input-group select { border-left: 0; }
.service-estimate-form footer { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 18px; justify-content: space-between; margin-top: 17px; padding-top: 16px; }
.service-estimate-form footer small { color: var(--muted); font-size: 11px; line-height: 1.5; max-width: 460px; }
.service-save-feedback { font-size: 11px; line-height: 1.4; margin-left: auto; text-align: right; }
.service-save-feedback.is-success { color: var(--green); }
.service-save-feedback.is-error { color: #9b3f34; }
.service-estimate-form footer .button-secondary { min-height: 42px; min-width: 142px; white-space: nowrap; }
.service-save-button:disabled { background: #e9e7e1; border-color: #d8d4cb; color: #99958c; cursor: not-allowed; }
.service-save-button:not(:disabled) { background: var(--ink); color: var(--white); }
.service-save-button:not(:disabled):hover { background: var(--gold); border-color: var(--gold); color: var(--black); }
.add-service-detail-form { align-items: end; background: #f8f3e9; border: 1px solid #e0cfad; display: grid; gap: 18px; grid-template-columns: minmax(180px,.65fr) minmax(320px,1.35fr) auto; margin-top: 18px; padding: 20px; }
.add-service-detail-form > div { align-self: center; display: flex; flex-direction: column; }
.add-service-detail-form > div .section-kicker { font-size: 10px; margin-bottom: 6px; }
.add-service-detail-form > div strong { font-family: var(--serif); font-size: 19px; font-weight: 400; }
.add-service-detail-form > div small { color: var(--muted); font-size: 11px; line-height: 1.45; margin-top: 5px; }
.add-service-detail-form label { display: grid; gap: 7px; min-width: 0; }
.service-combobox { align-self: end !important; display: grid !important; gap: 7px; min-width: 0; position: relative; }
.service-combobox > label { display: flex; flex-direction: column; gap: 4px; }
.service-combobox > label > span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.service-combobox > label > small { color: #817e76; font-size: 11px; line-height: 1.4; margin: 0; }
.service-combobox-control { position: relative; }
.add-service-detail-form .service-combobox-control input { padding-right: 52px; }
.service-combobox-control > button { align-items: center; background: var(--black); border: 0; bottom: 1px; color: var(--gold-light); cursor: pointer; display: flex; justify-content: center; position: absolute; right: 1px; top: 1px; width: 46px; }
.service-combobox-control > button:hover { background: var(--gold); color: var(--black); }
.service-combobox-control > button > span { border-bottom: 1.5px solid currentColor; border-right: 1.5px solid currentColor; height: 8px; transform: translateY(-2px) rotate(45deg); transition: transform .18s ease; width: 8px; }
.service-combobox.is-open .service-combobox-control > button > span { transform: translateY(2px) rotate(225deg); }
.service-combobox-menu { background: var(--white); border: 1px solid var(--gold); box-shadow: 0 18px 36px rgba(25,24,21,.16); left: 0; max-height: 286px; overflow-y: auto; padding: 6px; position: absolute; right: 0; top: calc(100% + 7px); z-index: 25; }
.service-combobox-menu[hidden] { display: none; }
.service-combobox-menu > button { background: transparent; border: 0; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 58px; padding: 10px 12px; text-align: left; width: 100%; }
.service-combobox-menu > button[hidden] { display: none; }
.service-combobox-menu > button:hover, .service-combobox-menu > button.is-active { background: #f5eddd; }
.service-combobox-menu > button strong { font-family: var(--serif); font-size: 16px; font-weight: 400; }
.service-combobox-menu > button small { color: var(--muted); font-size: 10px; line-height: 1.4; margin: 0; }
.service-combobox-menu > p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 0; padding: 13px; }
.service-combobox-menu > p[hidden] { display: none; }
.add-service-detail-form .button-primary { white-space: nowrap; }
.service-readonly-heading { align-items: center; display: flex; gap: 20px; justify-content: space-between; }
.service-readonly-heading > div { min-width: 0; }
.service-readonly-heading > span { background: #eee9df; color: #756d5f; flex: 0 0 auto; font-size: 8px; font-weight: 800; letter-spacing: .08em; padding: 7px 9px; text-transform: uppercase; }
.service-readonly-lock-note { background: #f4eee2; border-left: 2px solid var(--gold); color: #756d5f; font-size: 11px; line-height: 1.55; margin: -7px 0 17px; padding: 11px 13px; }
.service-readonly-summary { background: var(--black); border-left: 3px solid var(--gold); color: var(--white); display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 14px; padding: 20px 23px; }
.service-readonly-summary > div { display: grid; gap: 6px; }
.service-readonly-summary > div:last-child { border-left: 1px solid rgba(255,255,255,.13); padding-left: 24px; text-align: right; }
.service-readonly-summary span { color: var(--gold-light); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.service-readonly-summary strong { font-family: var(--serif); font-size: 24px; font-weight: 400; }
.service-readonly-summary strong small { color: var(--gold-light); font-family: var(--sans); font-size: 9px; font-weight: 800; }
.service-readonly-summary strong b { font-weight: 400; }
.service-readonly-list { display: grid; gap: 9px; }
.service-readonly-item { background: var(--paper); border: 1px solid var(--line); display: grid; gap: 16px; grid-template-columns: minmax(210px,.8fr) minmax(0,1.6fr); padding: 17px 19px; }
.service-readonly-item > header { align-items: center; display: flex; gap: 13px; min-width: 0; }
.service-readonly-item > header > div { min-width: 0; }
.service-readonly-item > header small { color: var(--gold); display: block; font-size: 8px; font-weight: 800; letter-spacing: .1em; margin-bottom: 3px; }
.service-readonly-item h4 { font-family: var(--serif); font-size: 18px; font-weight: 400; line-height: 1.2; margin: 0; }
.service-readonly-values { display: grid; gap: 0; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 0; }
.service-readonly-values > div { border-left: 1px solid var(--line); display: grid; gap: 5px; min-width: 0; padding: 4px 12px; }
.service-readonly-values dt { color: var(--muted); font-size: 7px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.service-readonly-values dd { color: var(--ink); font-size: 11px; font-weight: 700; line-height: 1.35; margin: 0; overflow-wrap: anywhere; }
.service-readonly-actions { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 18px; justify-content: space-between; margin-top: 18px; padding-top: 18px; }
.service-readonly-actions > small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.service-readonly-actions .button-secondary { flex: 0 0 auto; min-width: 170px; }
.documents-intro { color: var(--muted); font-size: 13px; line-height: 1.65; margin: -3px 0 22px; max-width: 720px; }
.document-upload-form { display: grid; gap: 22px; }
.document-upload-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.document-field { min-width: 0; }
.document-generation-form { align-items: center; background: var(--black); border-left: 3px solid var(--gold); color: var(--white); display: grid; gap: 18px; grid-template-columns: minmax(0,1fr) auto; min-height: 126px; padding: 20px; }
.document-generation-form > div { display: grid; gap: 5px; min-width: 0; }
.document-generation-form > div > span { color: var(--gold-light); font-size: 8px; font-weight: 800; letter-spacing: .11em; }
.document-generation-form > div > strong { font-family: var(--serif); font-size: 23px; font-weight: 400; line-height: 1.1; }
.document-generation-form > div > small { color: #bbb8b0; font-size: 10px; line-height: 1.5; max-width: 330px; }
.document-generation-form.is-locked { background: #eeece6; border-left-color: #b9b4aa; color: #6b6861; }
.document-generation-form.is-locked > div > span, .document-generation-form.is-locked > div > small { color: #88847b; }
.document-generation-button { align-items: center; background: var(--gold); border: 1px solid var(--gold); color: var(--black); cursor: pointer; display: inline-flex; font-size: 9px; font-weight: 800; gap: 10px; justify-content: center; letter-spacing: .07em; min-height: 44px; padding: 0 14px; text-transform: uppercase; transition: background .18s ease, border-color .18s ease, color .18s ease; white-space: nowrap; }
.document-generation-button > span { align-items: center; border: 1px solid currentColor; display: inline-flex; font-size: 6px; height: 21px; justify-content: center; letter-spacing: .02em; width: 27px; }
.document-generation-button:hover:not(:disabled) { background: var(--white); border-color: var(--white); }
.document-generation-button:disabled { background: #d7d3ca; border-color: #d7d3ca; color: #858178; cursor: not-allowed; }
.document-generation-button.is-loading:disabled { cursor: progress; opacity: .82; }
.upload-zone { align-items: center; background: var(--paper); border: 1px dashed #c8c1b1; cursor: pointer; display: flex; flex-direction: column; justify-content: center; min-height: 220px; padding: 24px; text-align: center; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.upload-zone:hover, .upload-zone.is-dragging { background: #f8f3e9; border-color: var(--gold); transform: translateY(-2px); }
.upload-zone.is-selected { border-style: solid; border-color: var(--gold); }
.document-upload-form.is-uploading [data-file-drop] { pointer-events: none; }
.upload-zone.is-uploading, .signed-upload-zone.is-uploading { cursor: progress; opacity: .72; }
.upload-zone.is-locked { background: #f2f0eb; border-color: #d5d1c8; cursor: not-allowed; opacity: .72; }
.upload-zone.is-locked:hover, .upload-zone.is-locked.is-dragging { background: #f2f0eb; border-color: #d5d1c8; transform: none; }
.upload-zone input { height: 1px; opacity: 0; overflow: hidden; position: absolute; width: 1px; }
.upload-mark { align-items: center; border: 1px solid var(--gold); color: var(--gold); display: flex; font-family: var(--serif); font-size: 25px; height: 48px; justify-content: center; margin-bottom: 16px; width: 48px; }
.upload-zone > strong { font-family: var(--serif); font-size: 21px; font-weight: 400; }
.upload-instruction { color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 7px; }
.upload-file-name { color: #8a652d; font-size: 9px; font-weight: 800; letter-spacing: .04em; margin-top: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-lock-notice { background: var(--green-soft); border-left: 2px solid var(--green); display: grid; gap: 4px; margin-top: 10px; padding: 12px 14px; }
.document-lock-notice strong { color: var(--green); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.document-lock-notice span { color: #4f6f62; font-size: 10px; line-height: 1.45; }
.document-stage-lock-notice { background: #f4eee2; border-left: 2px solid var(--gold); display: grid; gap: 4px; margin-top: 10px; padding: 12px 14px; }
.document-stage-lock-notice strong { color: #765521; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.document-stage-lock-notice span { color: #756d5f; font-size: 10px; line-height: 1.45; }
.document-lock-hint { color: #86583c; font-size: 10px; line-height: 1.5; margin: -4px 0 16px; }
.signed-upload-zone { align-items: center; background: #fbf8f1; border: 1px solid #d8ccb4; cursor: pointer; display: grid; gap: 11px; grid-template-columns: 36px minmax(0,1fr) auto; margin-top: 10px; min-height: 68px; padding: 10px 12px; transition: background .18s ease, border-color .18s ease; }
.signed-upload-zone[hidden] { display: none; }
.signed-upload-zone:hover, .signed-upload-zone.is-dragging { background: #f6eedf; border-color: var(--gold); }
.signed-upload-zone.is-selected { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.signed-upload-zone.is-locked { background: #f2f0eb; border-color: #d5d1c8; cursor: not-allowed; opacity: .68; }
.signed-upload-zone.is-locked:hover, .signed-upload-zone.is-locked.is-dragging { background: #f2f0eb; border-color: #d5d1c8; }
.signed-upload-zone input { height: 1px; opacity: 0; overflow: hidden; position: absolute; width: 1px; }
.signed-upload-mark { align-items: center; background: var(--black); color: var(--gold-light); display: flex; font-size: 16px; height: 36px; justify-content: center; width: 36px; }
.signed-upload-copy { display: grid; gap: 4px; min-width: 0; }
.signed-upload-copy strong { font-family: var(--serif); font-size: 16px; font-weight: 400; }
.signed-upload-copy small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.signed-upload-file { color: #8a652d; font-size: 8px; font-weight: 800; letter-spacing: .04em; max-width: 100px; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.document-history { margin-top: 14px; }
.document-history-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: 7px; }
.document-history-heading strong { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.document-history-heading span { color: var(--muted); font-size: 9px; }
.document-version-list { display: grid; gap: 8px; }
.document-version-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; }
.document-current { align-items: center; border: 1px solid var(--line); display: grid; gap: 11px; grid-template-columns: 42px minmax(0,1fr) auto; margin-top: 9px; min-height: 66px; padding: 10px; transition: border-color .18s ease, background .18s ease; }
.document-version-row .document-current { margin-top: 0; }
.document-current:hover { background: var(--paper); border-color: var(--gold); }
.document-type { align-items: center; background: var(--black); color: var(--gold-light); display: flex; font-size: 8px; font-weight: 800; height: 42px; justify-content: center; letter-spacing: .05em; }
.document-current > span:nth-child(2) { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.document-current strong { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-current small { align-items: center; color: var(--muted); display: flex; flex-wrap: wrap; font-size: 8px; gap: 5px; }
.document-current small b { color: #7d5c29; font-weight: 800; }
.document-current small em { background: var(--green-soft); color: var(--green); font-size: 7px; font-style: normal; font-weight: 800; letter-spacing: .05em; padding: 3px 5px; text-transform: uppercase; }
.document-current small .document-signed-marker { background: #f3e5c7; color: #77521e; }
.document-current small .document-active-marker { background: var(--green-soft); color: var(--green); }
.document-current small .document-inactive-marker { background: #e6e4df; color: #6f6c65; }
.document-version-row.is-signed-active .document-current { background: #fbf8f0; border-color: #c9aa6d; }
.document-current i { color: var(--gold); font-size: 18px; font-style: normal; padding-right: 4px; }
.document-view-button { align-items: center; background: var(--white); border: 1px solid var(--line); border-left: 0; color: #376fa5; display: flex; justify-content: center; min-width: 44px; padding: 0; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.document-view-button:hover { background: var(--blue); border-color: var(--blue); color: var(--white); }
.document-delete-button { align-items: center; background: var(--white); border: 1px solid var(--line); border-left: 0; color: #8b4942; cursor: pointer; display: flex; justify-content: center; min-width: 44px; padding: 0; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.document-delete-button:hover { background: #9a3f35; border-color: #9a3f35; color: var(--white); }
.document-deactivate-button { align-items: center; background: #f4eee2; border: 1px solid #c9aa6d; border-left: 0; color: #765521; cursor: pointer; display: flex; font-size: 8px; font-weight: 800; justify-content: center; letter-spacing: .04em; min-width: 62px; padding: 0 9px; text-transform: uppercase; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.document-deactivate-button:hover { background: var(--gold); border-color: var(--gold); color: var(--black); }
.document-action-icon { display: block; flex: 0 0 auto; position: relative; }
.document-view-icon { border: 1.5px solid currentColor; border-radius: 50%; height: 10px; width: 16px; }
.document-view-icon::after { background: currentColor; border-radius: 50%; content: ""; height: 4px; left: 50%; position: absolute; top: 50%; transform: translate(-50%, -50%); width: 4px; }
.document-delete-icon { border: 1.5px solid currentColor; border-radius: 0 0 2px 2px; border-top: 0; height: 12px; width: 11px; }
.document-delete-icon::before { border-top: 1.5px solid currentColor; content: ""; left: -3px; position: absolute; right: -3px; top: -4px; }
.document-delete-icon::after { border-left: 1px solid currentColor; bottom: 2px; box-shadow: 3px 0 0 currentColor; content: ""; left: 3px; position: absolute; top: 2px; }
.document-empty { color: #918e86; font-size: 10px; margin: 13px 2px 0; }
.document-auto-upload-note { border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.5; margin: 0; padding-top: 20px; }
.side-form-card { padding: 25px; }
.side-form-card h3 { margin-bottom: 23px; }
.side-form-card form { display: grid; gap: 18px; }
.project-progress-field { background: #f8f3e9; border: 1px solid #e0cfad; border-left: 3px solid var(--gold); display: grid; gap: 9px; padding: 16px; position: relative; }
.side-form-card .project-progress-field > span { color: #7d6338; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.project-progress-trigger { align-items: center; background: var(--white); border: 1px solid #cfb77f; color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; min-height: 54px; padding: 8px 16px; transition: border-color .18s ease, box-shadow .18s ease; width: 100%; }
.project-progress-trigger:hover, .project-progress-field.is-open .project-progress-trigger { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(177,138,71,.1); }
.project-progress-trigger > span { align-items: baseline; display: flex; gap: 7px; }
.project-progress-trigger strong { font-family: var(--serif); font-size: 20px; font-weight: 400; }
.project-progress-trigger small { color: var(--muted); font-size: 8px; letter-spacing: .05em; text-transform: uppercase; }
.project-progress-trigger > i { border-bottom: 1.5px solid #806331; border-right: 1.5px solid #806331; height: 8px; margin: -4px 2px 0 12px; transform: rotate(45deg); transition: transform .18s ease; width: 8px; }
.project-progress-field.is-open .project-progress-trigger > i { margin-top: 4px; transform: rotate(225deg); }
.project-progress-field::after { background: #e2d2ae; bottom: 0; content: ""; height: 3px; left: 0; position: absolute; width: var(--current-progress); }
.project-progress-options { background: var(--white); border: 1px solid var(--gold); box-shadow: 0 16px 30px rgba(40,34,24,.15); display: grid; grid-auto-flow: column; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(6,32px); left: 16px; overflow: visible; padding: 5px; position: absolute; right: 16px; top: 96px; z-index: 25; }
.project-progress-options[hidden] { display: none; }
.project-progress-options > button { align-items: center; background: transparent; border: 0; color: #57544e; cursor: pointer; display: grid; font-size: 9px; font-weight: 700; gap: 6px; grid-template-columns: 29px minmax(0,1fr); min-height: 32px; padding: 4px 6px; text-align: left; width: 100%; }
.project-progress-options > button:hover, .project-progress-options > button:focus-visible { background: #f7f1e5; outline: none; }
.project-progress-options > button.is-selected { background: #f2e6ce; color: #715326; }
.project-progress-options > button > i { background: #ebe6dc; display: block; height: 2px; overflow: hidden; }
.project-progress-options > button > i > b { background: var(--gold); display: block; height: 100%; }
.project-progress-field > small { color: #817b70; font-size: 9px; line-height: 1.45; }
.attendance-update-card h3 { font-size: 27px; line-height: 1.08; }
.attendance-owner-field { background: var(--paper); border: 1px solid var(--line); gap: 10px !important; padding: 16px; }
.side-form-card .attendance-owner-field > span { color: var(--muted); }
.side-form-card .attendance-owner-field select { background: var(--white); border-color: #d5d0c6; color: var(--ink); font-family: var(--serif); font-size: 17px; min-height: 52px; }
.side-form-card .attendance-owner-field select:focus { border-color: var(--gold); }
.attendance-owner-summary > span, .attendance-next-step > span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.attendance-next-step { background: var(--paper); border-left: 2px solid var(--gold); display: grid; gap: 8px; padding: 17px 16px; }
.attendance-next-step > strong { font-family: var(--serif); font-size: 23px; font-weight: 400; line-height: 1.15; }
.attendance-next-step > small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.attendance-form-actions { display: grid; gap: 9px; grid-template-columns: 1fr; }
.attendance-form-actions > button { justify-content: center; min-height: 48px; padding-left: 12px; padding-right: 12px; width: 100%; }
.attendance-form-actions .approval-request-button { background: var(--gold); border-color: var(--gold); color: var(--black); }
.attendance-form-actions .approval-request-button > span { color: var(--black); }
.attendance-form-actions .approval-request-button:not(:disabled):hover { background: #c39a54; border-color: #c39a54; }
.attendance-form-actions .button-primary:disabled { background: #d8d5cd; border-color: #d8d5cd; color: #8f8b83; cursor: not-allowed; }
.attendance-form-actions .approval-request-button:disabled > span { color: #8f8b83; }
.archived-attendance { display: grid; gap: 14px; }
.approved-contract-button { justify-content: center; width: 100%; }
.attendance-owner-summary { background: var(--paper); border: 1px solid var(--line); display: grid; gap: 8px; padding: 17px 16px; }
.attendance-owner-summary > strong { color: var(--ink); font-family: var(--serif); font-size: 20px; font-weight: 400; }
.status-sequence-hint { color: var(--muted); font-size: 10px; line-height: 1.5; }
.status-requirement { color: #8a652d; font-size: 10px; line-height: 1.5; }
.status-requirement[hidden] { display: none; }
.archived-status-message { background: var(--paper); border-left: 2px solid var(--gold); padding: 16px; }
.archived-status-message strong { font-family: var(--serif); font-size: 20px; font-weight: 400; }
.archived-status-message p { color: var(--muted); font-size: 11px; line-height: 1.55; margin: 7px 0 0; }
.next-step-stack { display: grid; gap: 10px; }
.next-step-card, .contact-card { background: var(--black); color: var(--white); padding: 27px; }
.next-step-card > span { color: var(--gold-light); font-size: 9px; font-weight: 800; letter-spacing: .11em; }
.next-step-card > strong { display: block; font-family: var(--serif); font-size: 26px; font-weight: 400; line-height: 1.15; margin: 18px 0 12px; }
.next-step-card p { color: #97948c; font-size: 12px; line-height: 1.65; margin: 0; }
.archive-request-form { margin: 0; }
.archive-request-button { background: transparent; border: 1px solid #b77b73; color: #8b4942; cursor: pointer; font-size: 9px; font-weight: 800; letter-spacing: .08em; min-height: 48px; text-transform: uppercase; transition: background .18s ease, border-color .18s ease, color .18s ease; width: 100%; }
.archive-request-button:hover { background: #9a3f35; border-color: #9a3f35; color: var(--white); }
.reactivate-request-button { background: transparent; border: 1px solid #75a58e; color: #477a63; cursor: pointer; font-size: 9px; font-weight: 800; letter-spacing: .08em; min-height: 48px; text-transform: uppercase; transition: background .18s ease, border-color .18s ease, color .18s ease; width: 100%; }
.reactivate-request-button:hover { background: #477a63; border-color: #477a63; color: var(--white); }
.contact-card h3 { margin-bottom: 22px; }
.contact-card > a { border-top: 1px solid #363631; display: grid; gap: 5px; grid-template-columns: 1fr auto; padding: 15px 0; }
.contact-card > a > span { color: #85827a; font-size: 9px; grid-column: 1; letter-spacing: .1em; }
.contact-card > a > strong { font-size: 12px; grid-column: 1; overflow-wrap: anywhere; }
.contact-card > a > i { color: var(--gold-light); font-style: normal; grid-column: 2; grid-row: 1 / 3; }
.client-project-list > a { align-items: center; border-top: 1px solid var(--line); display: grid; gap: 14px; grid-template-columns: minmax(170px,1fr) auto 100px 38px 20px; min-height: 84px; padding: 12px 0; }
.client-project-list > a > span:first-child { display: flex; flex-direction: column; gap: 3px; }
.client-project-list small { color: var(--gold); font-size: 9px; }
.client-project-list p { color: var(--muted); font-size: 10px; margin: 0; }
.client-project-list > a > i { color: var(--gold); font-style: normal; }
.empty-inline { align-items: center; background: var(--paper); display: flex; justify-content: space-between; padding: 20px; }
.empty-inline p { color: var(--muted); font-size: 12px; margin: 0; }
.empty-inline a { color: #7d5c29; font-size: 10px; font-weight: 800; text-transform: uppercase; }

/* Forms */
.content-form-page { max-width: 1180px; }
.form-page-heading { margin-bottom: 32px; max-width: 770px; }
.entity-form { padding: 35px; }
.entity-form fieldset { border: 0; margin: 0; padding: 0; }
.entity-form fieldset + fieldset { border-top: 1px solid var(--line); margin-top: 35px; padding-top: 35px; }
.entity-form legend { font-family: var(--serif); font-size: 24px; margin-bottom: 25px; padding: 0; }
.entity-form legend span { color: var(--gold); font-size: 17px; margin-right: 10px; }
.form-grid { display: grid; gap: 23px; grid-template-columns: 1fr 1fr; }
.field-full { grid-column: 1 / -1; }
.service-selector { border-top: 1px solid var(--line); margin-top: 3px; padding-top: 23px; }
.form-field-label { color: var(--muted); display: block; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.form-field-help { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 7px 0 16px; }
.service-option-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.entity-form .service-option { align-items: center; background: var(--white); border: 1px solid var(--line); cursor: pointer; display: grid; gap: 13px; grid-template-columns: 34px minmax(0,1fr); min-height: 84px; padding: 13px 15px; position: relative; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.entity-form .service-option:hover { background: var(--paper); border-color: #cdb887; transform: translateY(-1px); }
.entity-form .service-option:has(input:checked) { background: #faf6ed; border-color: var(--gold); }
.service-option input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.entity-form .service-option > .service-check { align-items: center; border: 1px solid #c8c3b8; color: transparent; display: flex; font-size: 14px; height: 30px; justify-content: center; letter-spacing: normal; text-transform: none; transition: background .18s ease, border-color .18s ease, color .18s ease; width: 30px; }
.service-option input:checked + .service-check { background: var(--gold); border-color: var(--gold); color: var(--black); }
.service-option input:focus-visible + .service-check { outline: 2px solid var(--gold); outline-offset: 3px; }
.entity-form .service-option > .service-option-copy { display: flex; flex-direction: column; gap: 5px; letter-spacing: normal; min-width: 0; text-transform: none; }
.service-option-copy strong { color: var(--ink); font-family: var(--serif); font-size: 17px; font-weight: 400; }
.service-option-copy small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.service-validation { color: #9b3f34; font-size: 11px; margin: 10px 0 0; min-height: 17px; }
.entity-form textarea, .side-form-card textarea { resize: vertical; }
.form-actions { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; margin-top: 36px; padding-top: 25px; }
.entity-form label > small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.form-actions > span { color: var(--muted); font-size: 10px; line-height: 1.5; margin-right: auto; }

/* Projects */
.project-list-panel { background: transparent; border: 0; }
.project-list-panel .filters { background: var(--white); border: 1px solid var(--line); margin-bottom: 17px; }
.client-card-groups { display: grid; gap: 25px; }
.client-card-group { background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--gold); min-width: 0; }
.client-card-group-header { align-items: center; background: #f7f4ec; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; min-height: 76px; padding: 13px 18px; }
.client-card-group-client { align-items: center; display: flex; gap: 12px; min-width: 0; }
.client-card-group-client .avatar { flex: 0 0 42px; height: 42px; width: 42px; }
.client-card-group-client > span:last-child { display: grid; gap: 3px; min-width: 0; }
.client-card-group-client small, .client-card-group-total small { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.client-card-group-client strong { font-family: var(--serif); font-size: 20px; font-weight: 400; line-height: 1.15; }
.client-card-group-client em { color: var(--muted); font-size: 9px; font-style: normal; }
.client-card-group-client:hover strong { color: #7d5c29; }
.client-card-group-total { align-items: flex-end; border-left: 1px solid #ded7c9; display: flex; flex-direction: column; gap: 3px; min-width: 82px; padding-left: 20px; text-align: right; }
.client-card-group-total strong { font-family: var(--serif); font-size: 25px; font-weight: 400; line-height: 1; }
.client-item-accordion-list { display: grid; }
.client-item-accordion, .client-item-direct-link { background: var(--white); }
.client-item-accordion + .client-item-accordion, .client-item-direct-link + .client-item-direct-link { border-top: 1px solid var(--line); }
.client-item-accordion > summary, .client-item-direct-link { align-items: center; cursor: pointer; display: grid; gap: 16px; grid-template-columns: minmax(210px,1.05fr) minmax(340px,1.55fr) auto 26px; list-style: none; min-height: 62px; padding: 8px 16px; transition: background-color .18s ease; }
.client-item-accordion > summary::-webkit-details-marker { display: none; }
.client-item-accordion > summary:hover, .client-item-direct-link:hover { background: #fbfaf6; }
.client-item-accordion > summary:focus-visible, .client-item-direct-link:focus-visible { outline: 2px solid rgba(182,137,61,.42); outline-offset: -3px; }
.client-item-accordion[open] > summary { background: #fbfaf6; }
.client-item-identity { display: grid; gap: 2px; min-width: 0; }
.client-item-identity small { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .09em; }
.client-item-identity strong { font-family: var(--serif); font-size: 18px; font-weight: 400; line-height: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-item-identity em { color: var(--muted); display: block; font-size: 8px; font-style: normal; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-item-facts { align-items: stretch; display: grid; grid-template-columns: .75fr 1.15fr 1.15fr; min-width: 0; }
.client-item-facts > span { align-content: center; border-left: 1px solid var(--line); display: grid; gap: 3px; min-width: 0; padding: 1px 13px; }
.client-item-facts small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .07em; }
.client-item-facts strong { font-family: var(--serif); font-size: 14px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-item-progress > span { align-items: center; display: grid; gap: 9px; grid-template-columns: auto minmax(45px,1fr); }
.client-item-progress i { background: var(--paper-deep); display: block; height: 3px; overflow: hidden; }
.client-item-progress i b { background: var(--gold); display: block; height: 100%; }
.client-item-status { font-size: 8px; justify-self: end; padding: 5px 8px; white-space: nowrap; }
.client-item-toggle { align-items: center; border: 1px solid #d8d1c4; color: #8a672c; display: flex; height: 26px; justify-content: center; width: 26px; }
.client-item-toggle svg { fill: none; height: 14px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; transition: transform .18s ease; width: 14px; }
.client-item-accordion[open] .client-item-toggle svg { transform: rotate(180deg); }
.client-item-direct-arrow svg { transition: transform .18s ease; }
.client-item-direct-link:hover .client-item-direct-arrow svg { transform: translateX(2px); }
.client-item-accordion-content { background: #fbfaf6; border-top: 1px solid var(--line); display: grid; gap: 20px; grid-template-columns: minmax(0,1.5fr) minmax(250px,.75fr); padding: 20px 22px; }
.client-item-related { border: 1px solid var(--line); }
.client-item-related > header { background: var(--white); border-bottom: 1px solid var(--line); display: grid; gap: 4px; padding: 13px 15px; }
.client-item-related > header small { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.client-item-related > header strong { font-family: var(--serif); font-size: 18px; font-weight: 400; }
.client-item-related-list { display: grid; }
.client-item-related-list > a { align-items: center; display: grid; gap: 14px; grid-template-columns: minmax(0,1fr) auto 18px; padding: 11px 15px; transition: background-color .18s ease; }
.client-item-related-list > a + a { border-top: 1px solid var(--line); }
.client-item-related-list > a:hover { background: #f7f3e9; }
.client-item-related-list > a:focus-visible { outline: 2px solid rgba(182,137,61,.42); outline-offset: -3px; }
.client-item-related-list > a > span:first-child { display: grid; gap: 3px; }
.client-item-related-list small { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.client-item-related-list strong { font-size: 11px; }
.client-item-related-list .badge { background: transparent; padding-right: 0; }
.client-item-related-list > a > i { color: var(--gold); font-size: 15px; font-style: normal; }
.client-item-detail-grid { align-content: start; display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.client-item-detail-grid > div { display: grid; gap: 6px; min-width: 0; padding: 13px 14px; }
.client-item-detail-grid > div:nth-child(even) { border-left: 1px solid var(--line); }
.client-item-detail-grid > div:nth-child(n+3) { border-top: 1px solid var(--line); }
.client-item-detail-grid dt { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.client-item-detail-grid dd { font-size: 11px; font-weight: 700; line-height: 1.4; margin: 0; overflow-wrap: anywhere; }
.client-item-accordion-content > footer { border-top: 1px solid var(--line); display: flex; grid-column: 1 / -1; justify-content: flex-end; padding-top: 17px; }
.client-item-accordion-content > footer .button-secondary { justify-content: center; min-width: 175px; }
.service-order-detail-grid { grid-column: 1 / -1; grid-template-columns: repeat(4,minmax(0,1fr)); }
.service-order-detail-grid > div:nth-child(n) { border-left: 0; border-top: 0; }
.service-order-detail-grid > div + div { border-left: 1px solid var(--line); }
.project-cards { display: grid; gap: 15px; grid-template-columns: repeat(3, 1fr); }
.project-card { background: var(--white); border: 1px solid var(--line); min-height: 410px; padding: 23px; transition: border-color .18s ease, transform .18s ease; }
.project-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.project-card > header { align-items: flex-start; display: flex; justify-content: space-between; }
.project-card > header > span:first-child { display: flex; flex-direction: column; gap: 7px; }
.project-card > header small { color: var(--gold); font-size: 9px; letter-spacing: .1em; }
.project-card > header strong { font-family: var(--serif); font-size: 25px; font-weight: 400; }
.project-card-client { align-items: center; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: flex; gap: 11px; margin: 23px 0; padding: 15px 0; }
.project-card-client > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.project-card-client small, .project-card-meta span, .project-card-progress small, .project-card footer small, .overview-card > span { color: #8a877f; font-size: 8px; font-weight: 800; letter-spacing: .09em; }
.project-card-client strong { font-size: 12px; }
.project-card-client em { color: var(--muted); font-size: 9px; font-style: normal; line-height: 1.4; }
.project-card-meta { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.project-card-meta > div { display: flex; flex-direction: column; gap: 6px; }
.project-card-meta strong { font-size: 11px; line-height: 1.4; }
.project-card-progress { margin: 24px 0; }
.project-card-progress > span { display: flex; justify-content: space-between; margin-bottom: 10px; }
.project-card-progress > span strong { font-size: 12px; }
.project-card footer { align-items: end; border-top: 1px solid var(--line); display: grid; gap: 12px; grid-template-columns: 1fr 1fr auto; padding-top: 17px; }
.project-card footer > span { display: flex; flex-direction: column; gap: 5px; }
.project-card footer strong { font-size: 10px; }
.project-card footer > i { color: var(--gold); font-size: 18px; font-style: normal; }
.contract-cards { gap: 18px; }
.contract-card { display: flex; flex-direction: column; min-height: 455px; padding: 21px; }
.contract-card > header strong { font-size: 22px; }
.contract-card > header > .badge { padding: 6px 9px; }
.contract-card .project-card-client { border: 0; margin: 18px 0 16px; padding: 0; }
.contract-card .project-card-client .avatar { height: 34px; width: 34px; }
.contract-card-summary { background: #f7f5ef; display: grid; gap: 18px; grid-template-columns: 1fr 1fr; padding: 14px; }
.contract-card-summary > div { display: grid; gap: 5px; }
.contract-card-summary > div:last-child { justify-items: end; text-align: right; }
.contract-card-summary span { color: #8a877f; font-size: 8px; font-weight: 800; letter-spacing: .09em; }
.contract-card-summary strong { font-family: var(--serif); font-size: 16px; font-weight: 400; }
.contract-card-projects { display: grid; gap: 5px; margin-top: 13px; max-height: 101px; min-height: 45px; overflow-y: auto; }
.contract-card-projects > div { align-items: center; background: #faf9f6; border-left: 2px solid #e3dccd; display: grid; gap: 10px; grid-template-columns: minmax(0,1fr) auto; min-height: 45px; padding: 7px 10px; }
.contract-card-projects > div > span:first-child { display: grid; gap: 4px; min-width: 0; }
.contract-card-projects small { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.contract-card-projects strong { font-size: 10px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contract-card-projects .badge { background: transparent; gap: 6px; padding: 0; }
.contract-card-projects .badge::before { background: currentColor; border-radius: 50%; content: ""; height: 5px; width: 5px; }
.contract-card .project-card-progress { margin: 16px 0; }
.contract-card .project-card-progress > span { margin-bottom: 7px; }
.contract-card footer { margin-top: auto; }
.project-detail-heading > div:first-child .badge { margin-left: 12px; vertical-align: middle; }
.project-detail-heading > div:last-child { align-items: flex-end; display: flex; flex-direction: column; gap: 5px; }
.project-detail-heading > div:last-child span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.project-detail-heading > div:last-child a { color: #7d5c29; font-size: 13px; font-weight: 700; }
.project-overview-grid { display: grid; gap: 13px; grid-template-columns: 1.7fr repeat(4, 1fr); margin-bottom: 19px; }
.project-progress-card, .overview-card { background: var(--white); border: 1px solid var(--line); min-height: 168px; padding: 22px; }
.project-progress-card { align-items: center; display: flex; gap: 20px; }
.progress-ring { align-items: center; background: conic-gradient(var(--gold) var(--progress), var(--paper-deep) 0); border-radius: 50%; display: flex; flex: 0 0 auto; height: 112px; justify-content: center; position: relative; width: 112px; }
.progress-ring::after { background: var(--white); border-radius: 50%; content: ""; inset: 9px; position: absolute; }
.progress-ring > span { display: flex; flex-direction: column; position: relative; text-align: center; z-index: 1; }
.progress-ring strong { font-family: var(--serif); font-size: 28px; font-weight: 400; }
.progress-ring small { color: var(--muted); font-size: 7px; font-weight: 800; letter-spacing: .1em; }
.project-progress-card h3 { font-family: var(--serif); font-size: 24px; font-weight: 400; margin: 0 0 8px; }
.project-progress-card > div:last-child > p:last-child { color: var(--muted); font-size: 10px; margin: 0; }
.overview-card { display: flex; flex-direction: column; justify-content: center; }
.overview-card > strong { font-family: var(--serif); font-size: 25px; font-weight: 400; margin: 15px 0 9px; }
.overview-card p { color: var(--muted); font-size: 10px; line-height: 1.5; margin: 0; }
.project-source-heading { align-items: center; display: flex; gap: 18px; justify-content: space-between; }
.source-origin-tag { background: #edf4ed; border: 1px solid #aac4ac; color: #426846; flex: 0 0 auto; font-size: 8px; font-weight: 800; letter-spacing: .1em; padding: 9px 11px; }
.source-readonly-note { color: var(--muted); font-size: 12px; line-height: 1.6; margin: -7px 0 23px; }
.project-source-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.approved-projects-panel > p { color: var(--muted); font-size: 13px; line-height: 1.65; margin: -5px 0 20px; }
.approved-project-list { display: grid; gap: 9px; }
.approved-project-list > a { align-items: center; background: var(--paper); border: 1px solid var(--line); display: grid; gap: 16px; grid-template-columns: minmax(0,1fr) auto auto; padding: 16px 18px; transition: border-color .18s ease, transform .18s ease; }
.approved-project-list > a:hover { border-color: var(--gold); transform: translateX(3px); }
.approved-project-list > a > span:first-child { display: flex; flex-direction: column; gap: 5px; }
.approved-project-list small { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.approved-project-list strong { font-family: var(--serif); font-size: 19px; font-weight: 400; }
.approved-project-list > a > i { color: var(--gold); font-style: normal; }
.project-diary-entry-form { align-items: end; background: #f8f3e9; border: 1px solid #e0cfad; display: grid; gap: 16px; grid-template-columns: minmax(180px,.75fr) repeat(3,minmax(135px,1fr)); margin-bottom: 30px; padding: 20px; width: 100%; }
.project-diary-entry-copy { align-self: center; display: flex; flex-direction: column; }
.project-diary-entry-copy .section-kicker { font-size: 10px; margin-bottom: 6px; }
.project-diary-entry-copy strong { font-family: var(--serif); font-size: 19px; font-weight: 400; }
.project-diary-entry-copy small { color: var(--muted); font-size: 11px; line-height: 1.45; margin-top: 5px; }
.project-diary-entry-form label { display: grid; gap: 7px; min-width: 0; }
.project-diary-entry-form label > span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.project-diary-entry-form select, .project-diary-entry-form textarea { background: var(--white); border: 1px solid var(--line); border-radius: 0; color: var(--ink); min-height: 48px; min-width: 0; padding: 11px 12px; width: 100%; }
.project-diary-entry-form select:focus, .project-diary-entry-form textarea:focus { border-color: var(--gold); outline: none; }
.project-diary-description { grid-column: 1 / -1; }
.project-diary-description textarea { line-height: 1.5; min-height: 82px; resize: vertical; }
.project-diary-description.is-invalid > span { color: #8b3f37; }
.project-diary-description.is-invalid textarea { background: #fffafa; border-color: #a54b42; box-shadow: 0 0 0 3px rgba(165,75,66,.08); }
.project-diary-validation-alert { align-items: center; background: #f9e8e5; border: 1px solid #e2bcb6; border-left: 3px solid #9b3f34; color: #792f28; display: flex; gap: 12px; grid-column: 1 / -1; margin-top: -5px; padding: 12px 14px; }
.project-diary-validation-alert[hidden] { display: none; }
.project-diary-validation-alert > span:last-child { display: grid; gap: 3px; }
.project-diary-validation-alert strong { font-size: 11px; }
.project-diary-validation-alert small { color: #8b5550; font-size: 10px; line-height: 1.45; }
.project-diary-validation-icon { align-items: center; background: #9b3f34; color: var(--white); display: flex; flex: 0 0 28px; font-family: var(--serif); font-size: 17px; height: 28px; justify-content: center; }
.project-image-dropzone { align-items: center; background: rgba(255,255,255,.65); border: 1px dashed #c6ad7d; display: grid; gap: 14px 20px; grid-column: 1 / -1; grid-template-columns: minmax(0,1fr) auto; min-height: 104px; padding: 17px 18px; transition: background .18s ease, border-color .18s ease; }
.project-image-dropzone.is-dragging { background: #f2e6ce; border-color: var(--gold); }
.project-image-dropzone-copy { align-items: center; display: flex; gap: 14px; min-width: 0; }
.project-image-dropzone-copy > span:last-child { display: grid; gap: 5px; min-width: 0; }
.project-image-dropzone-copy strong { font-family: var(--serif); font-size: 18px; font-weight: 400; }
.project-image-dropzone-copy small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.project-image-dropzone-icon { align-items: center; background: var(--black); color: var(--gold-light); display: flex; flex: 0 0 43px; height: 43px; justify-content: center; }
.project-image-dropzone-icon svg { fill: none; height: 20px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; width: 20px; }
.project-image-select-button { gap: 12px; justify-content: center; min-width: 165px; }
.project-image-preview-list { display: grid; gap: 8px; grid-column: 1 / -1; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); }
.project-image-preview-list:empty { display: none; }
.project-image-preview { align-items: center; background: var(--white); border: 1px solid var(--line); display: grid; gap: 10px; grid-template-columns: 50px minmax(0,1fr) 30px; min-height: 62px; padding: 5px 7px 5px 5px; }
.project-image-preview img { height: 50px; object-fit: cover; width: 50px; }
.project-image-preview > span { display: grid; gap: 4px; min-width: 0; }
.project-image-preview strong { font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-image-preview small { color: var(--muted); font-size: 8px; }
.project-image-preview button { align-items: center; background: transparent; border: 0; color: #8b4942; cursor: pointer; display: flex; font-size: 19px; height: 30px; justify-content: center; padding: 0; width: 30px; }
.project-image-preview button:hover { background: #f6e8e5; }
.project-diary-entry-form .button-primary { align-self: end; grid-column: 1 / -1; height: 48px; justify-self: end; min-height: 48px; min-width: 175px; white-space: nowrap; }
.project-diary-history-heading { border-top: 1px solid var(--line); margin-bottom: 25px; padding-top: 24px; }
.project-diary-history-heading .section-kicker { margin-bottom: 6px; }
.project-diary-history-heading h4 { font-family: var(--serif); font-size: 23px; font-weight: 400; margin: 0; }
.timeline { padding: 0 5px; }
.timeline article { display: grid; gap: 18px; grid-template-columns: 14px 1fr; padding-bottom: 30px; position: relative; }
.timeline article:not(:last-child)::before { background: var(--line); content: ""; left: 6px; position: absolute; top: 14px; bottom: 0; width: 1px; }
.timeline-dot { background: var(--gold); border: 3px solid #f2e9d9; border-radius: 50%; height: 13px; margin-top: 2px; position: relative; width: 13px; z-index: 1; }
.timeline time { color: var(--gold); font-size: 9px; font-weight: 700; }
.timeline h4 { font-family: var(--serif); font-size: 21px; font-weight: 400; margin: 7px 0; }
.timeline p { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 0 0 8px; }
.timeline small { color: #918e86; font-size: 9px; }
.project-update-gallery { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill,minmax(125px,1fr)); margin: 14px 0; max-width: 720px; }
.project-update-gallery a { background: var(--paper); border: 1px solid var(--line); display: grid; overflow: hidden; transition: border-color .18s ease, transform .18s ease; }
.project-update-gallery a:hover { border-color: var(--gold); transform: translateY(-2px); }
.project-update-gallery img { aspect-ratio: 4 / 3; display: block; object-fit: cover; width: 100%; }
.project-update-gallery span { color: var(--muted); font-size: 8px; overflow: hidden; padding: 7px 8px; text-overflow: ellipsis; white-space: nowrap; }

/* Billing */
.billing-page-heading { align-items: center; }
.billing-contract-count { align-items: center; background: var(--black); color: var(--white); display: flex; flex: 0 0 auto; gap: 13px; min-height: 76px; padding: 15px 21px; }
.billing-contract-count strong { color: var(--gold-light); font-family: var(--serif); font-size: 36px; font-weight: 400; line-height: 1; }
.billing-contract-count span { color: #aaa79e; font-size: 9px; font-weight: 800; letter-spacing: .07em; line-height: 1.4; text-transform: uppercase; }
.billing-contract-table { min-width: 1080px; }
.billing-contract-code { display: grid; gap: 5px; min-width: 150px; }
.billing-contract-code strong { color: var(--ink); font-family: var(--serif); font-size: 16px; font-weight: 400; }
.billing-contract-code small { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.billing-table-progress { align-items: center; display: grid; gap: 9px; grid-template-columns: 105px auto; margin-bottom: 8px; }
.billing-table-progress > span { background: var(--paper-deep); display: block; height: 5px; overflow: hidden; }
.billing-table-progress > span i { background: var(--gold); display: block; height: 100%; }
.billing-table-progress > strong { color: var(--ink); font-size: 10px; }
.billing-detail-page { max-width: 1520px; }
.billing-detail-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: 30px; }
.billing-detail-heading > div:first-child > p { color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .12em; margin: 0 0 7px; }
.billing-detail-heading h2 { display: inline-block; font-family: var(--serif); font-size: clamp(38px,3.5vw,56px); font-weight: 400; letter-spacing: -.035em; line-height: 1; margin: 0 12px 0 0; vertical-align: middle; }
.billing-heading-links { display: flex; gap: 8px; }
.billing-hero { border-top: 3px solid var(--gold); display: grid; gap: 0; grid-template-columns: minmax(380px,1.1fr) minmax(540px,1.4fr); margin-bottom: 19px; }
.billing-hero-progress { align-items: center; border-right: 1px solid var(--line); display: flex; gap: 25px; min-height: 230px; padding: 31px; }
.billing-progress-ring { align-items: center; background: conic-gradient(var(--gold) var(--billing-progress), var(--paper-deep) 0); border-radius: 50%; display: flex; flex: 0 0 122px; flex-direction: column; height: 122px; justify-content: center; position: relative; width: 122px; }
.billing-progress-ring::before { background: var(--white); border-radius: 50%; content: ""; inset: 9px; position: absolute; }
.billing-progress-ring strong, .billing-progress-ring small { position: relative; z-index: 1; }
.billing-progress-ring strong { font-family: var(--serif); font-size: 32px; font-weight: 400; }
.billing-progress-ring small { color: var(--muted); font-size: 7px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.billing-hero-progress h3 { font-family: var(--serif); font-size: 29px; font-weight: 400; margin: 0 0 9px; }
.billing-hero-progress > div > p:last-child { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 0; max-width: 340px; }
.billing-finance-summary { display: grid; grid-template-columns: repeat(3,1fr); }
.billing-finance-summary-with-addenda { grid-template-columns: repeat(4,1fr); }
.billing-finance-summary-with-expenses { grid-template-columns: repeat(4,1fr); }
.billing-finance-summary-with-expense-billing { grid-template-columns: repeat(6,minmax(0,1fr)); }
.billing-finance-summary-with-expense-billing > div { grid-column: span 2; min-width: 0; }
.billing-finance-summary-with-expense-billing > div:nth-child(n+4) { border-top: 1px solid var(--line); grid-column: span 3; }
.billing-finance-summary-with-expense-billing > div:nth-child(4) { border-left: 0; }
.billing-finance-summary > div { display: flex; flex-direction: column; justify-content: center; padding: 24px 18px; }
.billing-finance-summary > div + div { border-left: 1px solid var(--line); }
.billing-finance-summary span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.billing-finance-summary strong { font-family: var(--serif); font-size: clamp(18px,1.45vw,24px); font-weight: 400; margin-top: 12px; white-space: nowrap; }
.billing-schedule-panel { margin-bottom: 19px; overflow: hidden; scroll-margin-top: 105px; }
.billing-schedule-heading { align-items: center; background: var(--white); color: var(--ink); display: grid; gap: 18px; grid-template-columns: 54px minmax(0,1fr) auto; min-height: 112px; padding: 23px 29px; width: 100%; }
.billing-schedule-heading-icon { align-items: center; background: var(--black); color: var(--gold-light); display: flex; height: 52px; justify-content: center; width: 52px; }
.billing-schedule-heading-icon svg { fill: none; height: 24px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; width: 24px; }
.billing-schedule-heading > span:nth-child(2) { display: grid; gap: 4px; min-width: 0; }
.billing-schedule-heading small { color: var(--gold); font-size: 8px; font-style: normal; font-weight: 800; letter-spacing: .11em; }
.billing-schedule-heading strong { font-family: var(--serif); font-size: 26px; font-weight: 400; line-height: 1.15; }
.billing-schedule-heading em { color: var(--muted); font-size: 11px; font-style: normal; line-height: 1.45; }
.billing-schedule-heading-status { align-items: center; display: flex; }
.billing-schedule-heading-status b { background: var(--paper); color: var(--muted); font-size: 8px; letter-spacing: .09em; padding: 8px 10px; text-transform: uppercase; }
.billing-schedule-heading-status b.is-configured { background: #eaf4ec; color: #347047; }
.billing-schedule-content { border-top: 1px solid var(--line); padding: 29px; }
.billing-schedule-intro { align-items: end; display: grid; gap: 30px; grid-template-columns: minmax(260px,.75fr) minmax(360px,1.25fr); margin-bottom: 25px; }
.billing-schedule-intro h3 { font-family: var(--serif); font-size: 29px; font-weight: 400; margin: 0; }
.billing-schedule-intro > p { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 0; }
.billing-mode-form { display: grid; gap: 18px; }
.billing-mode-form fieldset, .billing-frequency-fieldset { border: 0; margin: 0; padding: 0; }
.billing-mode-form legend, .billing-frequency-fieldset legend { color: var(--ink); font-size: 10px; font-weight: 800; letter-spacing: .08em; margin-bottom: 7px; text-transform: uppercase; }
.billing-mode-form fieldset > p { color: var(--muted); font-size: 11px; margin: 0 0 16px; }
.billing-mode-options { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.billing-mode-options > label { align-items: center; background: var(--paper); border: 1px solid var(--line); cursor: pointer; display: grid; gap: 14px; grid-template-columns: 23px minmax(0,1fr); min-height: 102px; padding: 19px; transition: border-color .18s ease, background .18s ease; }
.billing-mode-options > label:has(input:checked) { background: #f8f3e9; border-color: var(--gold); }
.billing-mode-options input { opacity: 0; pointer-events: none; position: absolute; }
.billing-mode-check { border: 1px solid #b2ada3; border-radius: 50%; height: 20px; position: relative; width: 20px; }
.billing-mode-options input:checked + .billing-mode-check { border-color: var(--gold); }
.billing-mode-options input:checked + .billing-mode-check::after { background: var(--gold); border-radius: 50%; content: ""; inset: 4px; position: absolute; }
.billing-mode-options input:focus-visible + .billing-mode-check { outline: 2px solid var(--gold); outline-offset: 3px; }
.billing-mode-options label > span:last-child { display: grid; gap: 5px; }
.billing-mode-options strong { font-family: var(--serif); font-size: 20px; font-weight: 400; }
.billing-mode-options small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.billing-mode-warning { align-items: center; background: #f8f3e9; border-left: 3px solid var(--gold); display: flex; gap: 13px; padding: 13px 15px; }
.billing-mode-warning > span { align-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); display: flex; flex: 0 0 26px; font-family: var(--serif); font-size: 15px; height: 26px; justify-content: center; }
.billing-mode-warning p { color: var(--muted); font-size: 10px; line-height: 1.45; margin: 0; }
.billing-mode-warning strong { color: var(--ink); display: block; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.billing-mode-form > .button-primary { justify-self: end; }
.billing-mode-modal { background: var(--white); border: 0; box-shadow: 0 30px 80px rgba(0,0,0,.3); color: var(--ink); max-width: 550px; padding: 31px; width: calc(100% - 36px); }
.billing-mode-modal::backdrop { backdrop-filter: blur(4px); background: rgba(16,16,14,.74); }
.billing-mode-modal-heading { align-items: flex-start; display: flex; justify-content: space-between; margin-bottom: 23px; }
.billing-mode-modal-heading > span { align-items: center; background: var(--black); color: var(--gold-light); display: flex; height: 50px; justify-content: center; width: 50px; }
.billing-mode-modal-heading svg { fill: none; height: 23px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; width: 23px; }
.billing-mode-modal-heading > button { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-family: var(--serif); font-size: 28px; line-height: 1; padding: 0; }
.billing-mode-modal h2 { font-family: var(--serif); font-size: clamp(30px,3.2vw,39px); font-weight: 400; letter-spacing: -.025em; line-height: 1.08; margin: 0 0 14px; }
.billing-mode-modal h2 span { color: #8b6729; }
.billing-mode-modal > p:not(.section-kicker) { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 0; }
.billing-mode-modal-warning { align-items: flex-start; background: #f8f3e9; border-left: 3px solid var(--gold); display: flex; gap: 14px; margin: 23px 0; padding: 17px 18px; }
.billing-mode-modal-warning > span { align-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); display: flex; flex: 0 0 27px; font-family: var(--serif); font-size: 16px; height: 27px; justify-content: center; }
.billing-mode-modal-warning p { color: var(--muted); font-size: 11px; line-height: 1.55; margin: 0; }
.billing-mode-modal-warning strong { color: var(--ink); display: block; font-size: 9px; letter-spacing: .07em; margin-bottom: 3px; text-transform: uppercase; }
.billing-mode-modal-actions { display: flex; gap: 9px; justify-content: flex-end; }
.billing-mode-modal-actions > * { justify-content: center; min-width: 170px; }
.billing-mode-modal [data-billing-start-step][hidden] { display: none; }
.billing-mode-modal form > [data-billing-start-step] > p:not(.section-kicker), .billing-payment-modal form > p:not(.section-kicker), .billing-addendum-modal form > p:not(.section-kicker), .billing-expense-modal form > p:not(.section-kicker) { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 0; }
.billing-collection-options { display: grid; gap: 10px; margin: 24px 0; }
.billing-collection-options label { align-items: center; border: 1px solid var(--line); cursor: pointer; display: grid; gap: 13px; grid-template-columns: 20px minmax(0,1fr); padding: 16px; }
.billing-collection-options label:has(input:checked) { background: #f8f3e9; border-color: var(--gold); }
.billing-collection-options input { opacity: 0; pointer-events: none; position: absolute; }
.billing-collection-options .billing-mode-check { border: 1px solid #aaa69d; border-radius: 50%; height: 18px; position: relative; width: 18px; }
.billing-collection-options input:checked + .billing-mode-check { border-color: var(--gold); }
.billing-collection-options input:checked + .billing-mode-check::after { background: var(--gold); border-radius: 50%; content: ""; inset: 4px; position: absolute; }
.billing-collection-options input:focus-visible + .billing-mode-check { outline: 2px solid var(--gold); outline-offset: 3px; }
.billing-collection-options label > span:last-child { display: grid; gap: 4px; }
.billing-collection-options strong { font-family: var(--serif); font-size: 20px; font-weight: 400; }
.billing-collection-options small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.billing-collection-options em { color: #87672f; font-size: 8px; font-style: normal; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.billing-payment-modal-summary { background: var(--black); color: var(--white); display: grid; grid-template-columns: 1fr 1fr; margin: 22px 0 16px; }
.billing-payment-modal-summary > div { display: grid; gap: 5px; padding: 15px 17px; }
.billing-payment-modal-summary > div + div { border-left: 1px solid rgba(255,255,255,.13); }
.billing-payment-modal-summary span { color: var(--gold-light); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.billing-payment-modal-summary strong { font-family: var(--serif); font-size: 19px; font-weight: 400; }
.billing-addendum-schedule-pickers { align-items: start; display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin: 17px 0 0; }
.billing-addendum-installment-picker { align-content: start; display: grid; gap: 7px; grid-template-rows: 22px auto auto; margin: 0; min-width: 0; }
.billing-addendum-installment-picker > span:first-child { align-items: flex-end; color: var(--muted); display: flex; font-size: 8px; font-weight: 800; letter-spacing: .08em; line-height: 1.35; min-height: 22px; text-transform: uppercase; }
.billing-addendum-installment-picker > small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.billing-addendum-installment-picker .billing-plan-select { width: 100%; }
.billing-addendum-cancel-confirm { background: #7f392f; border-color: #7f392f; color: var(--white); }
.billing-addendum-cancel-confirm:hover { background: #642b24; border-color: #642b24; }
.billing-payment-proof-field { cursor: pointer; display: grid; gap: 7px; }
.billing-payment-proof-field > span:first-child { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.billing-payment-proof-field > input { height: 1px; opacity: 0; overflow: hidden; position: absolute; width: 1px; }
.billing-payment-proof-drop { align-items: center; background: #fbfaf7; border: 1px dashed #c7b78f; display: flex; justify-content: space-between; min-height: 64px; padding: 14px 16px; }
.billing-payment-proof-drop strong { color: var(--ink); font-size: 11px; }
.billing-payment-proof-drop small { color: var(--muted); font-size: 8px; }
.billing-payment-proof-field:focus-within .billing-payment-proof-drop, .billing-payment-proof-field:hover .billing-payment-proof-drop { background: #f8f3e9; border-color: var(--gold); }
.billing-schedule-configured { display: grid; gap: 16px; }
.billing-mode-locked { align-items: center; background: var(--black); color: var(--white); display: grid; gap: 15px; grid-template-columns: 46px minmax(0,1fr) auto; padding: 18px 20px; }
.billing-mode-locked > span { align-items: center; background: rgba(255,255,255,.08); color: var(--gold-light); display: flex; height: 44px; justify-content: center; width: 44px; }
.billing-mode-locked svg { fill: none; height: 21px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; width: 21px; }
.billing-mode-locked > div { display: grid; gap: 3px; }
.billing-mode-locked small { color: var(--gold-light); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.billing-mode-locked strong { font-family: var(--serif); font-size: 20px; font-weight: 400; }
.billing-mode-locked p { color: #aaa79e; font-size: 10px; margin: 0; }
.billing-mode-locked > b { border: 1px solid rgba(255,255,255,.2); color: #c8c4ba; font-size: 8px; letter-spacing: .1em; padding: 8px 10px; text-transform: uppercase; }
.billing-project-plans { display: grid; gap: 14px; }
.billing-plan-card { border: 1px solid var(--line); }
.billing-plan-card > header { align-items: center; background: #faf9f6; border-bottom: 1px solid var(--line); display: grid; gap: 15px; grid-template-columns: 46px minmax(0,1fr) auto; padding: 17px 19px; }
.billing-plan-card-contract > header { grid-template-columns: minmax(0,1fr) auto; }
.billing-plan-card > header > div { min-width: 0; }
.billing-plan-card > header small { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.billing-plan-card h4 { font-family: var(--serif); font-size: 21px; font-weight: 400; margin: 4px 0; }
.billing-plan-card > header p { color: var(--muted); font-size: 10px; margin: 0; }
.billing-plan-status-actions { align-items: flex-end; display: flex; flex-direction: column; gap: 8px; }
.billing-plan-status-actions > span { background: #eaf4ec; color: #347047; font-size: 8px; font-weight: 800; letter-spacing: .08em; padding: 8px 10px; text-transform: uppercase; }
.billing-plan-status-actions > span.is-pending { background: #f3eee4; color: #8a692e; }
.billing-plan-status-actions > span.is-billing.is-automatic { background: var(--blue-soft); color: var(--blue); }
.billing-plan-status-actions > span.is-billing.is-manual { background: var(--amber-soft); color: var(--amber); }
.billing-start-button { gap: 8px; justify-content: center; min-height: 36px; padding: 0 14px; white-space: nowrap; }
.billing-start-button > .billing-start-currency-icon { align-items: center; background: rgba(255,255,255,.1); color: var(--gold-light); display: inline-flex; font-family: var(--serif); font-size: 12px; height: 18px; justify-content: center; letter-spacing: 0; width: 18px; }
.billing-start-button:hover > .billing-start-currency-icon { background: rgba(0,0,0,.12); color: var(--black); }
.billing-start-button > .billing-start-arrow { font-size: 14px; margin-left: 2px; }
.billing-plan-form { padding: 20px; }
.billing-plan-fields { display: grid; gap: 12px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.billing-plan-fields label { display: grid; gap: 7px; }
.billing-plan-fields label > span:first-child, .billing-frequency-fieldset legend { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.billing-plan-fields input { background: var(--white); border: 1px solid var(--line); border-radius: 0; color: var(--ink); min-height: 48px; padding: 10px 12px; width: 100%; }
.billing-plan-fields input:focus { border-color: var(--gold); outline: none; }
.billing-plan-select { display: block; position: relative; }
.billing-plan-select > input[type="hidden"] { display: none; }
.billing-plan-select > button { align-items: center; background: var(--white); border: 1px solid var(--line); color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; min-height: 48px; padding: 10px 12px; text-align: left; width: 100%; }
.billing-plan-select > button:hover, .billing-plan-select.is-open > button { border-color: var(--gold); }
.billing-plan-select > button:focus-visible { border-color: var(--gold); outline: 2px solid rgba(182,137,61,.18); outline-offset: 1px; }
.billing-plan-select > button strong { font-size: 12px; font-weight: 600; }
.billing-plan-select > button svg { fill: none; height: 17px; stroke: var(--gold); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; transition: transform .18s ease; width: 17px; }
.billing-plan-select.is-open > button svg { transform: rotate(180deg); }
.billing-plan-select-options { background: var(--white); border: 1px solid var(--gold); box-shadow: 0 15px 35px rgba(20,18,14,.14); display: grid; left: 0; max-height: 310px; overflow-y: auto; position: absolute; right: 0; top: calc(100% + 5px); z-index: 30; }
.billing-plan-select-options[hidden] { display: none; }
.billing-plan-select-options > button { background: var(--white); border: 0; border-bottom: 1px solid var(--line); color: var(--ink); cursor: pointer; font-size: 10px; font-weight: 700; min-height: 38px; padding: 9px 12px; text-align: left; }
.billing-plan-select-options > button:last-child { border-bottom: 0; }
.billing-plan-select-options > button:hover, .billing-plan-select-options > button:focus-visible { background: var(--paper); outline: none; }
.billing-plan-select-options > button.is-selected { background: #f8f3e9; color: #7d5c29; }
.billing-percent-input { display: grid; grid-template-columns: minmax(0,1fr) 42px; }
.billing-percent-input input { grid-column: 1 / -1; grid-row: 1; padding-right: 48px; }
.billing-percent-input i { align-items: center; border-left: 1px solid var(--line); color: var(--gold); display: flex; font-family: var(--serif); font-size: 18px; font-style: normal; grid-column: 2; grid-row: 1; justify-content: center; pointer-events: none; }
.billing-frequency-fieldset { margin-top: 17px; }
.billing-frequency-fieldset > div { display: grid; gap: 8px; grid-template-columns: repeat(4,minmax(0,1fr)); }
.billing-frequency-fieldset label { cursor: pointer; }
.billing-frequency-fieldset input { opacity: 0; pointer-events: none; position: absolute; }
.billing-frequency-fieldset label > span { align-items: baseline; background: var(--paper); border: 1px solid var(--line); display: flex; gap: 5px; justify-content: center; min-height: 52px; padding: 12px; transition: border-color .18s ease, background .18s ease; }
.billing-frequency-fieldset input:checked + span { background: #f8f3e9; border-color: var(--gold); }
.billing-frequency-fieldset input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.billing-frequency-fieldset strong { font-family: var(--serif); font-size: 21px; font-weight: 400; }
.billing-frequency-fieldset small { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.billing-live-preview { background: #fbfaf7; border: 1px solid #d9d2c4; margin-top: 18px; }
.billing-live-preview[hidden], .billing-payment-result[hidden] { display: none; }
.billing-live-preview > header { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 16px 18px; }
.billing-live-preview > header h5 { font-family: var(--serif); font-size: 20px; font-weight: 400; margin: 1px 0 0; }
.billing-live-preview > header > span { background: #f3eee4; color: #87672f; font-size: 8px; font-weight: 800; letter-spacing: .08em; padding: 7px 9px; text-transform: uppercase; }
.billing-live-preview-empty { color: var(--muted); font-size: 11px; line-height: 1.55; margin: 0; padding: 20px 18px; }
.billing-live-preview-empty[hidden], .billing-live-preview [data-billing-live-preview-content][hidden] { display: none; }
.billing-live-preview-summary { background: var(--white); display: grid; grid-template-columns: repeat(3,1fr); }
.billing-live-preview-summary > div { display: grid; gap: 6px; padding: 15px 18px; }
.billing-live-preview-summary > div + div { border-left: 1px solid var(--line); }
.billing-live-preview-summary span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.billing-live-preview-summary strong { font-family: var(--serif); font-size: 17px; font-weight: 400; }
.billing-live-preview-table th { background: #f4f1ea; }
.billing-live-preview-table td { background: #fbfaf7; }
.billing-plan-form footer { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 20px; justify-content: space-between; margin-top: 18px; padding-top: 16px; }
.billing-plan-form footer p { color: var(--muted); font-size: 10px; line-height: 1.5; margin: 0; }
.billing-plan-form footer .button-primary { white-space: nowrap; }
.billing-payment-result { border-top: 1px solid var(--line); }
.billing-activation-summary { align-items: center; border-bottom: 1px solid; display: grid; gap: 14px; grid-template-columns: 42px minmax(0,1fr) auto; padding: 16px 20px; }
.billing-activation-summary.is-automatic { background: var(--blue-soft); border-color: #c8dceb; }
.billing-activation-summary.is-manual { background: var(--amber-soft); border-color: #ead8b7; }
.billing-activation-summary > span { align-items: center; border-radius: 50%; color: var(--white); display: flex; font-size: 17px; height: 38px; justify-content: center; width: 38px; }
.billing-activation-summary.is-automatic > span { background: var(--blue); }
.billing-activation-summary.is-manual > span { background: var(--amber); }
.billing-activation-summary > div { display: grid; gap: 3px; }
.billing-activation-summary small { font-size: 8px; font-weight: 800; letter-spacing: .09em; }
.billing-activation-summary.is-automatic small { color: var(--blue); }
.billing-activation-summary.is-manual small { color: var(--amber); }
.billing-activation-summary strong { font-family: var(--serif); font-size: 18px; font-weight: 400; }
.billing-activation-summary p { color: var(--muted); font-size: 9px; line-height: 1.45; margin: 0; }
.billing-activation-summary em { color: var(--muted); font-size: 8px; font-style: normal; }
.billing-automation-control { align-items: center; border: 1px solid; display: flex; flex: 0 0 auto; gap: 10px; min-width: 190px; padding: 10px 12px; text-align: left; }
button.billing-automation-control { background: #f8fbfd; border-color: #98b9d4; color: var(--ink); cursor: pointer; }
button.billing-automation-control:hover { background: var(--white); border-color: var(--blue); }
.billing-automation-control.is-locked { background: #fbf6eb; border-color: #d7ba84; color: var(--ink); }
.billing-automation-control > span:last-child { display: grid; gap: 2px; }
.billing-automation-control strong { font-family: var(--sans); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.billing-automation-control small { font-size: 8px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.billing-automation-control.is-on strong, .billing-automation-control.is-on small { color: var(--blue); }
.billing-automation-control.is-off strong, .billing-automation-control.is-off small { color: var(--amber); }
.billing-automation-switch { background: #bdc5ca; border-radius: 14px; display: block; flex: 0 0 34px; height: 19px; padding: 3px; transition: background .18s ease; width: 34px; }
.billing-automation-switch i { background: var(--white); border-radius: 50%; display: block; height: 13px; transform: translateX(0); transition: transform .18s ease; width: 13px; }
.billing-automation-control.is-on .billing-automation-switch { background: var(--blue); }
.billing-automation-control.is-on .billing-automation-switch i { transform: translateX(15px); }
.billing-automation-control.is-off .billing-automation-switch { background: var(--amber); }
.billing-mode-transition-preview { align-items: center; background: var(--paper); display: grid; gap: 12px; grid-template-columns: 1fr auto 1fr; margin: 22px 0; padding: 14px; }
.billing-mode-transition-preview span { font-size: 10px; font-weight: 800; letter-spacing: .07em; padding: 11px; text-align: center; text-transform: uppercase; }
.billing-mode-transition-preview span.is-automatic { background: var(--blue-soft); color: var(--blue); }
.billing-mode-transition-preview span.is-manual { background: var(--amber-soft); color: var(--amber); }
.billing-mode-transition-preview i { color: var(--muted); font-family: var(--serif); font-size: 20px; font-style: normal; }
.billing-manual-confirm-button { background: var(--amber); }
.billing-manual-confirm-button:hover { background: #7d5317; }
.billing-payment-summary { background: var(--black); color: var(--white); display: grid; grid-template-columns: repeat(3,1fr); }
.billing-payment-summary > div { display: grid; gap: 7px; padding: 17px 20px; }
.billing-payment-summary > div + div { border-left: 1px solid rgba(255,255,255,.13); }
.billing-payment-summary span { color: var(--gold-light); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.billing-payment-summary strong { font-family: var(--serif); font-size: 18px; font-weight: 400; }
.billing-payment-table-wrap { overflow-x: auto; }
.billing-payment-table { border-collapse: collapse; min-width: 720px; width: 100%; }
.billing-payment-table th { background: var(--paper); color: var(--muted); font-size: 8px; letter-spacing: .08em; padding: 11px 16px; text-align: left; text-transform: uppercase; }
.billing-payment-table td { border-top: 1px solid var(--line); color: var(--ink); font-size: 10px; padding: 13px 16px; }
.billing-payment-table td:last-child { font-family: var(--serif); font-size: 15px; text-align: right; }
.billing-payment-table th:last-child { text-align: right; }
.billing-payment-table-active { min-width: 980px; }
.billing-payment-table-active td.billing-payment-amount { font-family: var(--serif); font-size: 15px; text-align: right; }
.billing-payment-table-active td:last-child { font-family: var(--sans); font-size: 10px; text-align: left; }
.billing-payment-table-active th:nth-child(4) { text-align: right; }
.billing-payment-table-active th:last-child { text-align: left; }
.billing-payment-status { background: var(--amber-soft); color: var(--amber); display: inline-block; font-size: 8px; font-weight: 800; letter-spacing: .07em; padding: 6px 8px; text-transform: uppercase; }
.billing-payment-status.is-paid { background: var(--green-soft); color: var(--green); }
.billing-payment-status.is-unbilled { background: #eeece7; color: #666159; }
.billing-payment-status.is-partial { background: #edf2f8; color: #416487; }
.billing-payment-audit { color: var(--muted); display: block; font-size: 8px; line-height: 1.4; margin-top: 6px; max-width: 150px; }
.billing-payment-actions button, .billing-payment-actions a { background: transparent; border: 1px solid #bca572; color: #7d5c29; cursor: pointer; display: inline-flex; font-size: 8px; font-weight: 800; letter-spacing: .06em; min-height: 32px; padding: 8px 10px; text-transform: uppercase; }
.billing-payment-actions button:hover, .billing-payment-actions a:hover { background: #f8f3e9; border-color: var(--gold); }
.billing-date-adjusted { background: #f8f3e9; color: #846424; display: inline-block; font-size: 8px; font-weight: 700; padding: 6px 8px; }
.billing-date-original { color: var(--muted); font-size: 9px; }
.billing-services-panel, .billing-addenda-panel, .billing-expenses-panel, .contract-addenda-panel, .contract-expenses-panel, .billing-origin-panel { margin-bottom: 19px; padding: 30px; }
.billing-section-heading { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; margin-bottom: 24px; padding-bottom: 22px; }
.billing-section-heading h3 { font-family: var(--serif); font-size: 29px; font-weight: 400; margin: 0; }
.billing-section-heading > span:not(.source-origin-tag) { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.billing-service-number { align-items: center; background: var(--black); color: var(--gold-light); display: flex; font-family: var(--serif); font-size: 17px; height: 44px; justify-content: center; width: 44px; }
.billing-linear-progress { background: var(--paper-deep); height: 5px; overflow: hidden; }
.billing-linear-progress i { background: var(--gold); display: block; height: 100%; }
.billing-linear-progress-muted i { background: #77746c; }
.contract-composition-panel .billing-section-heading { margin-bottom: 18px; }
.contract-composition-list { display: grid; gap: 10px; }
.contract-composition-item { background: #fbfaf6; border: 1px solid var(--line); cursor: pointer; transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease; }
.contract-composition-item:hover { background: #f8f4eb; border-color: #c6b58f; box-shadow: 0 8px 22px rgba(28,24,17,.05); }
.contract-composition-item:focus-visible { border-color: var(--gold); outline: 2px solid rgba(182,137,61,.36); outline-offset: 3px; }
.contract-composition-primary { align-items: center; display: grid; gap: 14px; grid-template-columns: 34px minmax(0,1fr) auto; padding: 16px 18px 13px; }
.contract-composition-number { align-items: center; border: 1px solid #d6c6a5; color: #8b6729; display: flex; font-family: var(--serif); font-size: 14px; height: 32px; justify-content: center; width: 32px; }
.contract-composition-identity { min-width: 0; }
.contract-composition-identity small { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.contract-composition-identity h4 { font-family: var(--serif); font-size: 21px; font-weight: 400; margin: 3px 0 2px; }
.contract-composition-identity p { color: var(--muted); font-size: 10px; margin: 0; }
.contract-composition-summary { align-items: center; border-top: 1px solid #ebe7df; display: grid; gap: 22px; grid-template-columns: minmax(150px,.75fr) minmax(310px,1.3fr) auto auto; padding: 13px 18px; }
.contract-composition-progress { display: grid; gap: 7px; }
.contract-composition-progress > span { align-items: baseline; display: flex; justify-content: space-between; }
.contract-composition-progress small, .contract-composition-value small, .contract-composition-facts dt { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.contract-composition-progress strong { font-family: var(--serif); font-size: 18px; font-weight: 400; }
.contract-composition-progress .billing-linear-progress { height: 3px; }
.contract-composition-facts { display: grid; gap: 18px; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0; }
.contract-composition-facts > div { min-width: 0; }
.contract-composition-facts dd { color: var(--ink); font-size: 11px; font-weight: 700; line-height: 1.35; margin: 5px 0 0; overflow-wrap: anywhere; }
.contract-composition-value { display: grid; gap: 5px; min-width: 125px; text-align: right; }
.contract-composition-value strong { font-family: var(--serif); font-size: 18px; font-weight: 400; white-space: nowrap; }
.contract-composition-link { align-items: center; color: var(--ink); display: inline-flex; font-size: 8px; font-weight: 800; gap: 11px; letter-spacing: .08em; min-height: 36px; padding: 0 4px 0 10px; text-transform: uppercase; white-space: nowrap; }
.contract-composition-link span { color: var(--gold); font-size: 16px; }
.contract-composition-link:hover { color: var(--gold); }
.billing-origin-panel .info-grid { margin-top: 2px; }
.billing-addenda-panel { scroll-margin-top: 105px; }
.billing-addenda-description { color: var(--muted); font-size: 12px; line-height: 1.6; margin: -4px 0 21px; max-width: 760px; }
.billing-addenda-list { display: grid; gap: 12px; }
.billing-addendum-item { border: 1px solid var(--line); }
.billing-addendum-item > header { align-items: center; background: #faf9f6; border-bottom: 1px solid var(--line); display: grid; gap: 16px; grid-template-columns: 46px minmax(0,1fr) auto; padding: 17px 19px; }
.billing-addendum-item > header > div { min-width: 0; }
.billing-addendum-item > header small { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.billing-addendum-item h4 { font-family: var(--serif); font-size: 21px; font-weight: 400; margin: 4px 0; }
.billing-addendum-item > header p { color: var(--muted); font-size: 10px; margin: 0; }
.billing-addendum-header-finance { align-items: flex-end; display: flex; flex-direction: column; gap: 7px; text-align: right; }
.billing-addendum-header-finance > strong { font-family: var(--serif); font-size: 23px; font-weight: 400; white-space: nowrap; }
.billing-addendum-item dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0; }
.billing-addendum-item dl > div { display: grid; gap: 7px; min-width: 0; padding: 17px 20px; }
.billing-addendum-item dl > div + div { border-left: 1px solid var(--line); }
.billing-addendum-item dt { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.billing-addendum-item dd { color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1.4; margin: 0; overflow-wrap: anywhere; }
.billing-addendum-charge-button, .billing-addendum-proof-link { align-items: center; border: 1px solid #bca572; cursor: pointer; display: inline-flex; font-size: 8px; font-weight: 800; justify-content: center; letter-spacing: .06em; min-height: 32px; padding: 8px 10px; text-transform: uppercase; }
.billing-addendum-charge-button { background: var(--gold); border-color: var(--gold); color: var(--white); gap: 7px; }
.billing-addendum-charge-button > .billing-addendum-currency-icon { align-items: center; background: rgba(0,0,0,.14); display: inline-flex; font-family: var(--serif); font-size: 12px; height: 18px; justify-content: center; letter-spacing: 0; width: 18px; }
.billing-addendum-charge-button > .billing-addendum-charge-arrow { font-size: 13px; letter-spacing: 0; margin-left: 2px; }
.billing-addendum-charge-button:hover { background: #966e2d; border-color: #966e2d; }
.billing-addendum-proof-link { background: transparent; color: #7d5c29; }
.billing-addendum-proof-link:hover { background: #f8f3e9; border-color: var(--gold); }
.billing-addendum-value-warning { color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.45; }
.billing-addendum-actions { align-items: center; background: #fbfaf7; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; padding: 13px 20px; }
.billing-addendum-installments { border-top: 1px solid var(--line); }
.billing-addendum-installments > header { align-items: center; background: #fbfaf7; display: flex; gap: 20px; justify-content: space-between; padding: 14px 20px; }
.billing-addendum-installments > header > div { display: grid; gap: 3px; }
.billing-addendum-installments > header small { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .09em; }
.billing-addendum-installments > header strong { font-family: var(--serif); font-size: 17px; font-weight: 400; }
.billing-addendum-installment-controls { align-items: flex-end; display: flex; flex-direction: column; gap: 8px; }
.billing-addendum-installment-controls > span { color: var(--muted); font-size: 8px; line-height: 1.45; text-align: right; }
.billing-addendum-installment-controls .billing-automation-control { min-width: 220px; }
.billing-addendum-installments > header .billing-addendum-installment-controls .billing-automation-control strong { font-family: var(--sans); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.billing-addendum-installments > header .billing-addendum-installment-controls .billing-automation-control small { font-size: 8px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.billing-addendum-installments > header .billing-addendum-installment-controls .billing-addendum-automation-cancelled strong { font-size: 8px; font-weight: 600; letter-spacing: .05em; }
.billing-addendum-installments > header .billing-addendum-installment-controls .billing-addendum-automation-cancelled small { font-weight: 500; }
.billing-addendum-installment-table { min-width: 820px; }
.billing-addendum-installment-table th:nth-child(3), .billing-addendum-installment-table td:nth-child(3) { text-align: right; }
.billing-addendum-installment-table td.billing-payment-amount { font-family: var(--serif); font-size: 15px; }
.billing-addendum-installment-table th:last-child, .billing-addendum-installment-table td:last-child { font-family: var(--sans); font-size: 10px; text-align: left; }
.billing-addendum-due-date { min-width: 185px; }
.billing-addendum-due-date > strong { display: block; font-size: 11px; }
.billing-addendum-due-date > small { color: var(--muted); display: block; font-size: 8px; line-height: 1.4; margin-top: 3px; }
.billing-expenses-panel { scroll-margin-top: 105px; }
.billing-expense-item dl { grid-template-columns: minmax(0,1.7fr) minmax(150px,.65fr) minmax(150px,.65fr); }
.billing-expense-payment-table { min-width: 760px; }
.billing-addenda-empty { align-items: center; background: var(--paper); border: 1px dashed #c9c2b5; color: var(--muted); display: flex; gap: 15px; min-height: 96px; padding: 18px 20px; }
.billing-addenda-empty > span { align-items: center; background: var(--white); color: var(--gold); display: flex; flex: 0 0 42px; font-family: var(--serif); font-size: 21px; height: 42px; justify-content: center; }
.billing-addenda-empty strong { color: var(--ink); display: block; font-family: var(--serif); font-size: 18px; font-weight: 400; }
.billing-addenda-empty p { font-size: 11px; line-height: 1.5; margin: 4px 0 0; }
.contract-addenda-panel { scroll-margin-top: 105px; }
.contract-addenda-intro { align-items: center; background: #f8f3e9; border: 1px solid #e0cfad; display: flex; gap: 16px; margin-bottom: 15px; padding: 16px 18px; }
.contract-addenda-intro > span { align-items: center; background: var(--black); color: var(--gold-light); display: flex; flex: 0 0 40px; font-family: var(--serif); font-size: 20px; height: 40px; justify-content: center; }
.contract-addenda-intro p { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 0; }
.contract-addenda-intro strong { color: var(--ink); display: block; font-family: var(--serif); font-size: 17px; font-weight: 400; margin-bottom: 3px; }
.contract-addenda-total { background: var(--black); border-left: 3px solid var(--gold); color: var(--white); display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 15px; min-height: 104px; }
.contract-addenda-total > div { display: flex; flex-direction: column; gap: 9px; justify-content: center; padding: 22px 25px; }
.contract-addenda-total > div + div { align-items: flex-end; border-left: 1px solid rgba(255,255,255,.13); text-align: right; }
.contract-addenda-total span { color: var(--gold-light); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.contract-addenda-total strong { font-family: var(--serif); font-size: clamp(24px,2.2vw,32px); font-weight: 400; }
.contract-addendum-list { display: grid; gap: 12px; }
.contract-addendum-card { background: var(--paper); border: 1px solid var(--line); }
.contract-addendum-card.is-completed { border-color: #a8cbb9; }
.contract-addendum-form { padding: 20px; }
.contract-addendum-form > header { align-items: center; display: flex; gap: 14px; margin-bottom: 18px; }
.contract-addendum-form > header > div { min-width: 0; }
.contract-addendum-form > header small { color: var(--gold); display: block; font-size: 9px; font-weight: 800; letter-spacing: .1em; margin-bottom: 4px; }
.contract-addendum-form h4 { font-family: var(--serif); font-size: 21px; font-weight: 400; line-height: 1.2; margin: 0; }
.contract-addendum-form > header p { color: var(--muted); font-size: 9px; margin: 5px 0 0; }
.contract-addendum-completed-badge { background: var(--green-soft); color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .06em; margin-left: auto; padding: 7px 9px; text-transform: uppercase; }
.contract-addendum-card.is-completed .service-estimate-grid input:disabled,
.contract-addendum-card.is-completed .service-estimate-grid select:disabled { background: #f3f4f0; color: #676b65; cursor: not-allowed; opacity: 1; }
.contract-addendum-form footer { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 18px; justify-content: space-between; margin-top: 17px; padding-top: 16px; }
.contract-addendum-form footer small { color: var(--muted); font-size: 11px; line-height: 1.5; max-width: 520px; }
.contract-addendum-form footer .button-secondary { margin-left: auto; min-height: 42px; min-width: 142px; white-space: nowrap; }
.contract-addendum-complete-flag { align-items: center; cursor: pointer; display: flex; gap: 11px; margin: 0; min-width: 0; }
.contract-addendum-complete-flag input { height: 1px; opacity: 0; overflow: hidden; position: absolute; width: 1px; }
.contract-addendum-complete-check { align-items: center; background: var(--white); border: 1px solid #a8a296; color: transparent; display: flex; flex: 0 0 24px; font-size: 14px; height: 24px; justify-content: center; transition: .18s ease; }
.contract-addendum-complete-flag > span:last-child { display: grid; gap: 2px; }
.contract-addendum-complete-flag strong { color: var(--ink); font-size: 11px; letter-spacing: .02em; }
.contract-addendum-complete-flag input:focus-visible + .contract-addendum-complete-check { outline: 2px solid var(--gold); outline-offset: 2px; }
.contract-addendum-complete-flag:hover .contract-addendum-complete-check { border-color: var(--green); }
.contract-addendum-complete-flag input:checked + .contract-addendum-complete-check,
.contract-addendum-complete-flag.is-checked .contract-addendum-complete-check { background: var(--green); border-color: var(--green); color: var(--white); }
.contract-addendum-complete-flag.is-checked { cursor: default; }
.contract-addendum-complete-flag.is-checked strong { color: var(--green); }
.contract-addendum-complete-form { display: none; }
.contract-addenda-empty { align-items: center; border: 1px dashed #c9c2b5; color: var(--muted); display: flex; gap: 15px; margin-bottom: 15px; min-height: 92px; padding: 18px 20px; }
.contract-addenda-empty > span { align-items: center; background: var(--paper); color: var(--gold); display: flex; flex: 0 0 42px; font-family: var(--serif); font-size: 21px; height: 42px; justify-content: center; }
.contract-addenda-empty strong { color: var(--ink); display: block; font-family: var(--serif); font-size: 18px; font-weight: 400; }
.contract-addenda-empty p { font-size: 11px; line-height: 1.5; margin: 4px 0 0; }
.contract-addendum-create { align-items: end; background: #f8f3e9; border: 1px solid #e0cfad; display: grid; gap: 18px; grid-template-columns: minmax(210px,.7fr) minmax(320px,1.3fr) auto; margin-top: 16px; padding: 20px; }
.contract-addendum-create-copy { align-self: center; display: flex; flex-direction: column; }
.contract-addendum-create-copy .section-kicker { font-size: 10px; margin-bottom: 6px; }
.contract-addendum-create-copy strong { font-family: var(--serif); font-size: 19px; font-weight: 400; }
.contract-addendum-create-copy small { color: var(--muted); font-size: 11px; line-height: 1.45; margin-top: 5px; }
.contract-addendum-create label { display: grid; gap: 7px; min-width: 0; }
.contract-addendum-create label > span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.contract-addendum-create input { background: var(--white); border: 1px solid var(--line); border-radius: 0; color: var(--ink); min-height: 48px; min-width: 0; padding: 11px 12px; width: 100%; }
.contract-addendum-create input:focus { border-color: var(--gold); outline: none; }
.contract-addendum-create .service-combobox-control input { padding-right: 52px; }
.contract-addendum-create .button-primary { min-height: 48px; white-space: nowrap; }
.contract-expenses-panel { scroll-margin-top: 105px; }
.contract-expenses-summary { align-items: center; background: var(--black); border-left: 3px solid var(--gold); color: var(--white); display: flex; gap: 28px; justify-content: space-between; margin-bottom: 15px; min-height: 92px; padding: 20px 24px; }
.contract-expenses-summary > div { display: grid; gap: 8px; }
.contract-expenses-summary small { color: var(--gold-light); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.contract-expenses-summary strong { font-family: var(--serif); font-size: clamp(24px,2.2vw,32px); font-weight: 400; }
.contract-expenses-summary p { color: #aaa79e; font-size: 11px; line-height: 1.55; margin: 0; max-width: 440px; text-align: right; }
.contract-expense-list { display: grid; gap: 10px; margin-bottom: 16px; }
.contract-expense-card { align-items: center; background: #fbfaf7; border: 1px solid var(--line); display: grid; gap: 16px; grid-template-columns: 42px minmax(0,1fr) auto 42px; min-height: 98px; padding: 17px 18px; }
.contract-expense-content { min-width: 0; }
.contract-expense-content > small { color: var(--gold); display: block; font-size: 8px; font-weight: 800; letter-spacing: .08em; margin-bottom: 4px; }
.contract-expense-content h4 { font-family: var(--serif); font-size: 20px; font-weight: 400; margin: 0; }
.contract-expense-content p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 6px 0 0; }
.contract-expense-amount { font-family: var(--serif); font-size: 21px; font-weight: 400; min-width: 125px; text-align: right; white-space: nowrap; }
.contract-expense-finance { align-items: flex-end; display: flex; flex-direction: column; gap: 7px; }
.contract-expense-card > form { margin: 0; }
.contract-expense-create { background: #f8f3e9; border: 1px solid #e0cfad; margin-top: 16px; padding: 20px; }
.contract-expense-create-copy { border-bottom: 1px solid #e0cfad; display: grid; grid-template-columns: auto 1fr; margin-bottom: 18px; padding-bottom: 15px; }
.contract-expense-create-copy .section-kicker { grid-column: 1 / -1; margin-bottom: 6px; }
.contract-expense-create-copy strong { font-family: var(--serif); font-size: 19px; font-weight: 400; }
.contract-expense-create-copy small { align-self: end; color: var(--muted); font-size: 11px; justify-self: end; }
.contract-expense-create-fields { align-items: end; display: grid; gap: 14px; grid-template-columns: minmax(260px,1.2fr) minmax(260px,1.2fr) minmax(145px,.55fr) auto; }
.contract-expense-create-fields > label { display: grid; gap: 6px; min-width: 0; }
.contract-expense-create-fields > label > span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.contract-expense-create-fields > label > small { color: #817e76; font-size: 10px; line-height: 1.4; }
.contract-expense-create-fields input { background: var(--white); border: 1px solid var(--line); border-radius: 0; color: var(--ink); min-height: 48px; min-width: 0; padding: 11px 12px; width: 100%; }
.contract-expense-create-fields input:focus { border-color: var(--gold); outline: none; }
.contract-expense-create-fields .service-combobox-control input { padding-right: 52px; }
.contract-expense-create-fields .button-primary { min-height: 48px; white-space: nowrap; }
.contract-expense-create-fields > label.is-invalid > span { color: #8b3f37; }
.contract-expense-create-fields > label.is-invalid input { background: #fffafa; border-color: #a54b42; box-shadow: 0 0 0 3px rgba(165,75,66,.08); }
.contract-expense-validation-alert { align-items: center; background: #f9e8e5; border: 1px solid #e2bcb6; border-left: 3px solid #9b3f34; color: #792f28; display: flex; gap: 12px; grid-column: 1 / -1; padding: 12px 14px; }
.contract-expense-validation-alert[hidden] { display: none; }
.contract-expense-validation-alert > span:last-child { display: grid; gap: 3px; }
.contract-expense-validation-alert strong { font-size: 11px; }
.contract-expense-validation-alert small { color: #8b5550; font-size: 10px; line-height: 1.45; }
.contract-expense-validation-icon { align-items: center; background: #9b3f34; color: var(--white); display: flex; flex: 0 0 28px; font-family: var(--serif); font-size: 17px; height: 28px; justify-content: center; }

/* Service catalog */
.catalog-page { max-width: 1400px; }
.catalog-page-heading { align-items: center; }
.catalog-count { align-items: center; background: var(--black); color: var(--white); display: flex; flex: 0 0 auto; gap: 12px; min-height: 74px; padding: 14px 20px; }
.catalog-count strong { color: var(--gold-light); font-family: var(--serif); font-size: 34px; font-weight: 400; }
.catalog-count small { color: #aaa79e; font-size: 10px; font-weight: 700; letter-spacing: .05em; max-width: 90px; text-transform: uppercase; }
.catalog-layout { align-items: start; display: grid; gap: 19px; grid-template-columns: 360px minmax(0,1fr); }
.catalog-form-card { padding: 28px; position: sticky; top: 105px; }
.catalog-form-card > header { border-bottom: 1px solid var(--line); margin-bottom: 24px; padding-bottom: 20px; }
.catalog-form-card h3, .catalog-list-header h3 { font-family: var(--serif); font-size: 27px; font-weight: 400; margin: 0; }
.catalog-form-card > header > p:last-child { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 10px 0 0; }
.catalog-form-card form { display: grid; gap: 19px; }
.catalog-form-card label { display: grid; gap: 8px; }
.catalog-form-card label > span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.catalog-form-card input, .catalog-form-card select, .catalog-form-card textarea { background: var(--white); border: 1px solid var(--line); border-radius: 0; color: var(--ink); min-height: 50px; padding: 12px 14px; resize: vertical; width: 100%; }
.catalog-form-card input:focus, .catalog-form-card select:focus, .catalog-form-card textarea:focus { border-color: var(--gold); outline: none; }
.catalog-select-field { display: block; position: relative; }
.catalog-select-field::after { color: var(--gold); content: "⌄"; font-size: 17px; pointer-events: none; position: absolute; right: 14px; top: 50%; transform: translateY(-57%); }
.catalog-select-field select { appearance: none; background: var(--white); border: 1px solid var(--line); border-radius: 0; color: var(--ink); min-height: 50px; padding: 12px 42px 12px 14px; width: 100%; }
.catalog-select-field select:focus { border-color: var(--gold); outline: none; }
.professional-catalog-page .catalog-select-field select { font-size: 14px; }
.user-catalog-page .catalog-select-field select { font-size: 14px; }
.catalog-list-panel { overflow: hidden; }
.catalog-list-header { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 24px; justify-content: space-between; min-height: 112px; padding: 23px 25px; }
.catalog-search { align-items: center; display: flex; gap: 7px; width: min(460px, 55%); }
.catalog-search label { flex: 1; }
.catalog-search input { background: var(--white); border: 1px solid var(--line); border-radius: 0; color: var(--ink); min-height: 44px; padding: 0 12px; width: 100%; }
.catalog-search input:focus { border-color: var(--gold); outline: none; }
.catalog-search > a { color: var(--muted); font-size: 10px; font-weight: 700; padding: 10px 4px; }
.catalog-service-list article { align-items: center; border-top: 1px solid var(--line); display: grid; gap: 17px; grid-template-columns: 44px minmax(0,1fr) auto; min-height: 92px; padding: 17px 24px; }
.catalog-service-list article:first-child { border-top: 0; }
.catalog-service-number { align-items: center; background: var(--paper); color: var(--gold); display: flex; font-family: var(--serif); font-size: 17px; height: 42px; justify-content: center; width: 42px; }
.catalog-service-list article > div { min-width: 0; }
.catalog-service-list article strong { font-family: var(--serif); font-size: 20px; font-weight: 400; }
.catalog-service-list article p { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 6px 0 0; }
.catalog-delete-button { align-items: center; background: transparent; border: 1px solid #c9a39e; color: #8b4942; cursor: pointer; display: flex; height: 42px; justify-content: center; width: 42px; }
.catalog-delete-button:hover { background: #9a3f35; border-color: #9a3f35; color: var(--white); }
.catalog-professional-actions { align-items: center; display: flex; gap: 7px; }
.catalog-professional-actions form { margin: 0; }
.catalog-edit-button { height: 42px; width: 42px; }
.catalog-professional-title-form { border-top: 1px solid var(--line); display: grid; gap: 14px; grid-column: 2 / -1; grid-template-columns: minmax(220px,1fr) auto; margin-top: 2px; padding-top: 16px; }
.catalog-professional-title-form[hidden] { display: none; }
.catalog-professional-title-form > label { display: grid; gap: 7px; }
.catalog-professional-title-form > label > span:first-child { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.catalog-professional-title-form > div { align-items: end; display: flex; gap: 7px; }
.catalog-professional-title-form .button-primary, .catalog-professional-title-form .button-secondary { justify-content: center; min-height: 50px; white-space: nowrap; }
.user-access-summary p { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.user-access-summary p span:first-child { color: #7d5c29; font-weight: 700; }
.user-access-actions { align-items: center; display: flex; gap: 8px; justify-self: end; }
.user-access-actions form { margin: 0; }

/* Account */
.account-page { max-width: 1280px; }
.account-page-heading { align-items: flex-end; }
.account-layout { align-items: start; display: grid; gap: 20px; grid-template-columns: 330px minmax(0,1fr); }
.account-identity-card { background: var(--black); color: var(--white); min-height: 390px; padding: 34px; position: sticky; top: 105px; }
.account-avatar { align-items: center; background: var(--gold); color: var(--black); display: flex; font-family: var(--serif); font-size: 27px; height: 70px; justify-content: center; margin-bottom: 34px; width: 70px; }
.account-identity-card h3 { font-family: var(--serif); font-size: 34px; font-weight: 400; line-height: 1.05; margin: 0; }
.account-identity-card dl { border-bottom: 1px solid #35342f; border-top: 1px solid #35342f; display: grid; gap: 18px; margin: 28px 0 22px; padding: 22px 0; }
.account-identity-card dl > div { display: grid; gap: 5px; }
.account-identity-card dt { color: #85827a; font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.account-identity-card dd { font-size: 13px; margin: 0; }
.account-identity-card > p:last-child { color: #aaa79e; font-size: 11px; line-height: 1.6; margin: 0; }
.account-settings-form { min-width: 0; }

@media (max-width: 1350px) {
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .project-cards { grid-template-columns: 1fr 1fr; }
    .project-overview-grid { grid-template-columns: 1.4fr 1fr; }
    .billing-finance-summary-with-addenda { grid-template-columns: 1fr 1fr; }
    .billing-finance-summary-with-addenda > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
    .billing-finance-summary-with-addenda > div:nth-child(4) { border-top: 1px solid var(--line); }
    .billing-finance-summary-with-expenses { grid-template-columns: 1fr 1fr; }
    .billing-finance-summary-with-expenses > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
    .billing-finance-summary-with-expenses > div:nth-child(4) { border-top: 1px solid var(--line); }
}

@media (max-width: 1050px) {
    .sidebar { box-shadow: 14px 0 35px rgba(0,0,0,.25); transform: translateX(-105%); transition: transform .22s ease; }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-backdrop { background: rgba(12,12,11,.52); inset: 0; opacity: 0; pointer-events: none; position: fixed; transition: opacity .2s ease; z-index: 40; }
    body.sidebar-open .sidebar-backdrop { display: block; opacity: 1; pointer-events: auto; }
    .app-main { margin-left: 0; }
    .topbar { padding-left: 24px; }
    .mobile-sidebar-toggle { display: block; margin-right: 12px; }
    .topbar > div:first-of-type { margin-right: auto; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-side, body.contact-actions-fixed .detail-side { grid-template-columns: 1fr; max-height: none; overflow: visible; overscroll-behavior: auto; padding-right: 0; position: static; top: auto; }
    .request-contact-actions.is-scroll-fixed { background: transparent; border: 0; box-shadow: none; padding: 0; position: static; width: auto; }
    .request-contact-actions.is-scroll-fixed > * { flex: 0 1 auto; }
    .project-detail-side { grid-template-columns: 1fr; }
    .service-estimate-grid { grid-template-columns: 1fr 1fr; }
    .add-service-detail-form { grid-template-columns: minmax(180px,.7fr) minmax(240px,1.3fr); }
    .add-service-detail-form .button-primary { grid-column: 2; justify-self: start; }
    .catalog-layout { grid-template-columns: 320px minmax(0,1fr); }
    .billing-hero { grid-template-columns: 1fr; }
    .billing-hero-progress { border-bottom: 1px solid var(--line); border-right: 0; }
    .billing-schedule-intro { align-items: start; grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .login-shell { display: flex; flex-direction: column; }
    .login-brand-panel { min-height: 430px; padding: 40px 8vw; }
    .login-brand-panel::after { inset: 18px; }
    .login-brand { width: min(345px, 86%); }
    .login-message h1 { font-size: clamp(52px, 15vw, 76px); }
    .login-message > p:last-child { font-size: 17px; }
    .login-form-panel { padding: 65px 8vw; }
    .login-form-wrap h2 { font-size: 44px; }
    .topbar { height: 72px; padding: 0 18px; }
    .topbar h1 { font-size: 21px; }
    .topbar-context { display: none; }
    .content { padding: 30px 5vw 50px; }
    .welcome-row, .page-heading, .record-heading, .project-detail-heading { align-items: flex-start; flex-direction: column; gap: 23px; }
    .welcome-actions, .record-actions { width: 100%; }
    .welcome-actions > *, .record-actions > * { flex: 1; }
    .metric-grid { grid-template-columns: 1fr; }
    .metric-card { min-height: 160px; }
    .project-feed { grid-template-columns: 1fr; }
    .project-feed-item:nth-child(odd) { border-right: 0; }
    .filters { align-items: stretch; flex-wrap: wrap; }
    .filters label { flex: 1 1 100%; max-width: none; }
    .filters label:not(.search-field) { flex-basis: calc(60% - 5px); min-width: 0; }
    .button-filter { flex: 1; }
    .status-summary a { flex-basis: 105px; }
    .detail-section, .side-form-card { padding: 22px; }
    .detail-side, .project-detail-side { grid-template-columns: 1fr; }
    .info-grid, .info-grid-three, .form-grid { grid-template-columns: 1fr; }
    .project-source-grid { grid-template-columns: 1fr; }
    .project-source-heading { align-items: flex-start; flex-direction: column; }
    .inline-edit-grid, .contact-edit-grid { grid-template-columns: 1fr; }
    .inline-edit-grid .field-full, .contact-edit-grid .field-full { grid-column: auto; }
    .inline-edit-actions { align-items: stretch; flex-direction: column-reverse; }
    .inline-edit-actions > button { width: 100%; }
    .service-option-grid { grid-template-columns: 1fr; }
    .service-total-card { grid-template-columns: 1fr; }
    .service-investment-total { align-items: flex-start; border-left: 0; border-top: 1px solid rgba(255,255,255,.13); margin-top: 15px; padding-left: 0; padding-top: 15px; text-align: left; }
    .proposal-modal-actions { align-items: stretch; flex-direction: column; }
    .proposal-modal-actions > * { width: 100%; }
    .service-estimate-grid, .add-service-detail-form { grid-template-columns: 1fr; }
    .project-diary-entry-form { grid-template-columns: 1fr; }
    .project-diary-entry-copy, .project-diary-description { grid-column: auto; grid-row: auto; }
    .project-diary-entry-form .button-primary { grid-column: auto; justify-content: center; justify-self: end; }
    .project-image-dropzone { grid-column: auto; grid-template-columns: 1fr; }
    .project-image-select-button { justify-self: start; }
    .service-readonly-item { grid-template-columns: 1fr; }
    .service-readonly-values > div:first-child { border-left: 0; padding-left: 0; }
    .service-readonly-actions { align-items: stretch; flex-direction: column; }
    .service-readonly-actions .button-secondary { justify-content: center; width: 100%; }
    .service-estimate-form footer { align-items: stretch; flex-direction: column; }
    .service-save-feedback { margin-left: 0; text-align: left; }
    .service-estimate-form footer .button-secondary, .add-service-detail-form .button-primary { grid-column: auto; justify-content: center; justify-self: stretch; width: 100%; }
    .document-upload-grid { grid-template-columns: 1fr; }
    .document-generation-form { grid-template-columns: 1fr; }
    .document-generation-button { justify-self: start; }
    .field-full { grid-column: auto; }
    .entity-form { padding: 24px 5vw; }
    .form-actions { align-items: stretch; flex-direction: column-reverse; }
    .form-actions > * { justify-content: center; width: 100%; }
    .catalog-layout { grid-template-columns: 1fr; }
    .catalog-form-card { position: static; }
    .catalog-list-header { align-items: stretch; flex-direction: column; }
    .catalog-search { width: 100%; }
    .catalog-professional-title-form { grid-column: 1 / -1; grid-template-columns: 1fr; }
    .catalog-professional-title-form > div { justify-content: flex-end; }
    .account-layout { grid-template-columns: 1fr; }
    .account-identity-card { min-height: 0; position: static; }
    .client-item-accordion > summary, .client-item-direct-link { align-items: start; gap: 14px; grid-template-columns: minmax(0,1fr) auto 28px; min-height: 0; padding: 14px 17px; }
    .client-item-facts { grid-column: 1 / -1; grid-row: 2; }
    .client-item-status { grid-column: 2; grid-row: 1; }
    .client-item-toggle { grid-column: 3; grid-row: 1; }
    .client-item-accordion-content { grid-template-columns: 1fr; padding: 17px; }
    .service-order-detail-grid { grid-template-columns: 1fr 1fr; }
    .service-order-detail-grid > div:nth-child(n) { border-left: 0; border-top: 0; }
    .service-order-detail-grid > div:nth-child(even) { border-left: 1px solid var(--line); }
    .service-order-detail-grid > div:nth-child(n+3) { border-top: 1px solid var(--line); }
    .project-cards { grid-template-columns: 1fr; }
    .project-overview-grid { grid-template-columns: 1fr; }
    .project-progress-card, .overview-card { min-height: 150px; }
    .client-project-list > a { align-items: start; grid-template-columns: 1fr auto; padding: 17px 0; }
    .client-project-list .mini-progress, .client-project-list > a > strong { display: none; }
    .client-project-list > a > i { grid-column: 2; }
    .empty-inline { align-items: flex-start; flex-direction: column; gap: 14px; }
    .billing-page-heading { align-items: flex-start; }
    .billing-contract-count { width: 100%; }
    .billing-detail-heading { align-items: flex-start; flex-direction: column; gap: 22px; }
    .billing-heading-links { width: 100%; }
    .billing-heading-links > * { flex: 1; }
    .billing-hero-progress { align-items: flex-start; flex-direction: column; }
    .billing-finance-summary { grid-template-columns: 1fr; }
    .billing-finance-summary > div + div { border-left: 0; border-top: 1px solid var(--line); }
    .billing-finance-summary-with-expense-billing > div,
    .billing-finance-summary-with-expense-billing > div:nth-child(n+4) { grid-column: auto; }
    .billing-schedule-heading { grid-template-columns: 46px minmax(0,1fr) auto; padding: 20px; }
    .billing-schedule-heading-icon { height: 44px; width: 44px; }
    .billing-schedule-heading-status b { display: none; }
    .billing-schedule-content { padding: 22px; }
    .billing-mode-options, .billing-plan-fields { grid-template-columns: 1fr; }
    .billing-addendum-schedule-pickers { grid-template-columns: 1fr; }
    .billing-mode-modal-actions { align-items: stretch; flex-direction: column-reverse; }
    .billing-mode-modal-actions > * { width: 100%; }
    .billing-frequency-fieldset > div { grid-template-columns: 1fr 1fr; }
    .billing-live-preview-summary { grid-template-columns: 1fr; }
    .billing-live-preview-summary > div + div { border-left: 0; border-top: 1px solid var(--line); }
    .billing-plan-form footer { align-items: stretch; flex-direction: column; }
    .billing-plan-form footer .button-primary { justify-content: center; }
    .billing-activation-summary { grid-template-columns: 42px minmax(0,1fr); }
    .billing-activation-summary .billing-automation-control { grid-column: 1 / -1; justify-self: stretch; width: 100%; }
    .billing-payment-summary { grid-template-columns: 1fr; }
    .billing-payment-summary > div + div { border-left: 0; border-top: 1px solid rgba(255,255,255,.13); }
    .billing-services-panel, .billing-addenda-panel, .billing-expenses-panel, .contract-addenda-panel, .contract-expenses-panel, .billing-origin-panel { padding: 22px; }
    .contract-composition-summary { grid-template-columns: minmax(150px,.8fr) minmax(280px,1.2fr); }
    .contract-composition-value { text-align: left; }
    .contract-composition-link { justify-self: end; }
    .billing-addendum-item dl { grid-template-columns: 1fr 1fr; }
    .billing-addendum-item dl > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
    .billing-addendum-item dl > div:nth-child(3) { grid-column: 1 / -1; }
    .contract-addendum-create { grid-template-columns: 1fr; }
    .contract-addendum-create .button-primary { justify-self: end; }
    .contract-expense-create-fields { grid-template-columns: 1fr 1fr; }
    .contract-expense-create-fields .service-combobox { grid-column: 1 / -1; }
    .contract-expense-create-fields .button-primary { justify-self: end; }
}

@media (max-width: 620px) {
    .client-card-group-header { align-items: flex-start; flex-direction: column; gap: 13px; }
    .client-card-group-total { align-items: center; border-left: 0; border-top: 1px solid #ded7c9; flex-direction: row; min-width: 0; padding-left: 0; padding-top: 11px; text-align: left; width: 100%; }
    .client-card-group-total strong { font-size: 20px; }
    .contract-composition-primary { align-items: start; grid-template-columns: 32px minmax(0,1fr); }
    .contract-composition-primary .badge { grid-column: 2; justify-self: start; }
    .contract-composition-summary { align-items: stretch; gap: 15px; grid-template-columns: 1fr; }
    .contract-composition-facts { gap: 12px; grid-template-columns: 1fr 1fr; }
    .contract-composition-facts > div:last-child { grid-column: 1 / -1; }
    .contract-composition-value { border-top: 1px solid var(--line); padding-top: 13px; text-align: left; }
    .contract-composition-link { justify-content: center; justify-self: stretch; min-height: 42px; padding: 0; }
}

@media (max-width: 480px) {
    .login-recaptcha-frame { min-height: 67px; }
    .login-recaptcha .g-recaptcha { transform: scale(.86); transform-origin: left top; }
    .client-item-facts { grid-template-columns: 1fr 1fr; }
    .client-item-facts > span:nth-child(3) { border-top: 1px solid var(--line); grid-column: 1 / -1; margin-top: 10px; padding-top: 12px; }
    .client-item-accordion > summary, .client-item-direct-link { grid-template-columns: minmax(0,1fr) 28px; }
    .client-item-status { grid-column: 1; grid-row: 2; justify-self: start; }
    .client-item-toggle { grid-column: 2; grid-row: 1; }
    .client-item-facts { grid-row: 3; }
    .client-item-detail-grid, .service-order-detail-grid { grid-template-columns: 1fr; }
    .client-item-detail-grid > div:nth-child(n), .service-order-detail-grid > div:nth-child(n) { border-left: 0; }
    .client-item-detail-grid > div + div, .service-order-detail-grid > div + div { border-top: 1px solid var(--line); }
    .client-item-accordion-content > footer .button-secondary { width: 100%; }
    .service-readonly-summary { grid-template-columns: 1fr; }
    .service-readonly-summary > div:last-child { border-left: 0; border-top: 1px solid rgba(255,255,255,.13); margin-top: 14px; padding-left: 0; padding-top: 14px; text-align: left; }
    .service-readonly-values { grid-template-columns: 1fr 1fr; row-gap: 13px; }
    .service-readonly-values > div:nth-child(3) { border-left: 0; padding-left: 0; }
    .signed-upload-zone { grid-template-columns: 36px minmax(0,1fr); }
    .signed-upload-file { grid-column: 2; max-width: 100%; }
    .document-generation-button { justify-self: stretch; width: 100%; }
    .welcome-actions, .record-actions { flex-direction: column; }
    .request-feed-item { grid-template-columns: 38px 1fr; }
    .request-feed-item .badge { grid-column: 2; justify-self: start; }
    .record-person { align-items: flex-start; }
    .avatar-large { height: 58px; width: 58px; }
    .project-progress-card { align-items: flex-start; flex-direction: column; }
    .billing-heading-links { flex-direction: column; }
    .billing-schedule-heading { gap: 12px; grid-template-columns: 42px minmax(0,1fr); }
    .billing-schedule-heading-icon { height: 40px; width: 40px; }
    .billing-schedule-heading strong { font-size: 21px; }
    .billing-schedule-heading-status { grid-column: 2; }
    .billing-mode-locked { align-items: start; grid-template-columns: 42px minmax(0,1fr); }
    .billing-mode-locked > b { grid-column: 2; justify-self: start; }
    .billing-plan-card > header { align-items: start; grid-template-columns: 44px minmax(0,1fr); }
    .billing-plan-card-contract > header { grid-template-columns: 1fr; }
    .billing-plan-status-actions { align-items: flex-start; grid-column: 2; justify-self: start; }
    .billing-plan-card-contract .billing-plan-status-actions { grid-column: 1; }
    .billing-payment-modal-summary { grid-template-columns: 1fr; }
    .billing-payment-modal-summary > div + div { border-left: 0; border-top: 1px solid rgba(255,255,255,.13); }
    .billing-payment-proof-drop { align-items: flex-start; flex-direction: column; gap: 5px; }
    .billing-frequency-fieldset > div { grid-template-columns: 1fr 1fr; }
    .billing-addendum-item > header { align-items: start; grid-template-columns: 44px minmax(0,1fr); }
    .billing-addendum-header-finance { align-items: flex-start; grid-column: 2; text-align: left; }
    .billing-addendum-item dl { grid-template-columns: 1fr; }
    .billing-addendum-item dl > div + div, .billing-addendum-item dl > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); grid-column: auto; }
    .billing-addendum-actions { align-items: stretch; }
    .billing-addendum-actions .billing-addendum-charge-button { width: 100%; }
    .billing-addendum-installments > header { align-items: flex-start; flex-direction: column; gap: 7px; }
    .billing-addendum-installment-controls { align-items: flex-start; width: 100%; }
    .billing-addendum-installment-controls > span { text-align: left; }
    .billing-addendum-installment-controls .billing-automation-control { min-width: 0; width: 100%; }
    .contract-addenda-total { grid-template-columns: 1fr; }
    .contract-addenda-total > div + div { align-items: flex-start; border-left: 0; border-top: 1px solid rgba(255,255,255,.13); text-align: left; }
    .contract-addendum-form footer { align-items: stretch; flex-direction: column; }
    .contract-addendum-form footer .button-secondary, .contract-addendum-create .button-primary { justify-content: center; margin-left: 0; width: 100%; }
    .contract-addenda-intro { align-items: flex-start; }
    .contract-expenses-summary { align-items: flex-start; flex-direction: column; gap: 10px; }
    .contract-expenses-summary p { text-align: left; }
    .contract-expense-card { align-items: start; grid-template-columns: 34px minmax(0,1fr) 38px; }
    .contract-expense-finance { align-items: flex-start; grid-column: 2; }
    .contract-expense-amount { min-width: 0; text-align: left; }
    .contract-expense-card > form { grid-column: 3; grid-row: 1; }
    .contract-expense-create-copy { grid-template-columns: 1fr; }
    .contract-expense-create-copy small { justify-self: start; margin-top: 5px; }
    .contract-expense-create-fields { grid-template-columns: 1fr; }
    .contract-expense-create-fields .service-combobox { grid-column: auto; }
    .contract-expense-create-fields .button-primary { justify-content: center; justify-self: stretch; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
