:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --text: #17202a;
  --muted: #66727f;
  --border: #e2e7eb;
  --border-strong: #d3dbe2;
  --navy: #0f3158;
  --navy-dark: #0a2544;
  --navy-soft: #edf3f8;
  --blue: #326fa8;
  --green: #2b7d59;
  --green-soft: #e8f5ee;
  --orange: #a86112;
  --orange-soft: #fff3df;
  --red: #b74242;
  --red-soft: #fceaea;
  --shadow: 0 1px 2px rgba(15, 49, 88, .04), 0 8px 24px rgba(15, 49, 88, .05);
}

[hidden] { display: none !important; }
.object-later-stage-note { display:flex; align-items:center; flex-wrap:wrap; gap:5px; width:fit-content; max-width:100%; margin:10px 0 0; padding:6px 9px; border-radius:8px; background:var(--surface-muted,#f2f5f7); color:var(--muted,#606b75); font-size:12px; line-height:1.35; }
.object-later-stage-note .info-tip { flex:none; }

* { box-sizing: border-box; }
html { font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
body { margin: 0; min-width: 320px; background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--navy-dark); color: #fff; padding: 20px 14px 14px; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 24px; }
.brand strong { display: block; font-size: 16px; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 3px; color: rgba(255,255,255,.58); font-size: 10px; }
.brand-mark { width: 34px; height: 34px; position: relative; flex: 0 0 34px; }
.brand-mark span { position: absolute; background: #fff; width: 15px; height: 15px; border-radius: 3px 3px 6px 3px; transform: rotate(45deg); }
.brand-mark span:nth-child(1) { left: 1px; top: 1px; }
.brand-mark span:nth-child(2) { right: 1px; top: 1px; opacity: .82; }
.brand-mark span:nth-child(3) { left: 9px; bottom: 1px; opacity: .64; }
.nav-list { display: flex; flex-direction: column; gap: 3px; }
.nav-group { display: flex; flex-direction: column; gap: 3px; margin-top: 12px; }
.nav-group[hidden], #quick-add[hidden] { display: none !important; }
.nav-group-label { padding: 0 10px 3px; color: rgba(255,255,255,.5); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.nav-item { width: 100%; min-height: 40px; border: 0; border-radius: 7px; background: transparent; color: rgba(255,255,255,.68); display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 9px; padding: 0 10px; text-align: left; font-size: 13px; font-weight: 500; cursor: pointer; transition: .16s ease; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.is-active { background: rgba(255,255,255,.12); color: #fff; }
.nav-item.ops-subnav { min-height: 36px; padding-left: 22px; font-size: 12px; }
.foreign-nav-group { margin: 2px 0 2px 9px; }
.foreign-nav-group summary { min-height: 40px; padding: 7px 9px; display: flex; align-items: center; gap: 8px; border-radius: 7px; color: rgba(255,255,255,.75); font-size: 12px; font-weight: 600; line-height: 1.25; cursor: pointer; list-style: none; }
.foreign-nav-group summary::-webkit-details-marker { display: none; }
.foreign-nav-group summary::after { content: '⌄'; margin-left: auto; font-size: 16px; line-height: 1; transform: rotate(-90deg); transition: transform .16s ease; }
.foreign-nav-group[open] summary::after { transform: rotate(0); }
.foreign-nav-group summary:hover, .foreign-nav-group summary:focus-visible, .foreign-nav-group:has(.nav-item.is-active) summary { background: rgba(255,255,255,.09); color: #fff; }
.foreign-nav-group summary:focus-visible { outline: 2px solid #9ce0d9; outline-offset: 2px; }
.foreign-nav-symbol { width: 21px; flex: 0 0 21px; text-align: center; font-size: 17px; font-weight: 400; }
.foreign-nav-links { padding: 2px 0 4px 4px; }
.foreign-nav-links .nav-item.ops-subnav { padding-left: 12px; }
.nav-item b { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 10px; background: #fff; color: var(--navy-dark); font-size: 10px; }
.nav-item kbd { opacity: 0; font-size: 10px; font-family: inherit; }
.nav-item:hover kbd { opacity: .55; }
.nav-icon { width: 21px; text-align: center; font-size: 17px; font-weight: 400; }
.nav-icon svg { width: 18px; height: 18px; vertical-align: middle; }
.nav-item[hidden], [data-detail-tab][hidden], [data-lift-tab][hidden], [data-register-tab][hidden], [data-settings-tab][hidden] { display: none !important; }
.access-locked body > :not(#access-login):not(#access-password-change):not(script) { display: none !important; }
.access-locked body { display:block; background:#eef3fa; }
#access-login,#access-password-change { min-height:100vh; display:grid; place-items:center; padding:24px; }
.access-login-card { width:min(100%,420px); padding:36px; background:white; border:1px solid var(--line); border-radius:16px; box-shadow:0 16px 50px #102e5014; }
.access-login-card h1 { margin:12px 0 8px; }
.access-login-card p { color:var(--muted); margin-bottom:24px; }
.access-login-card label { display:grid; gap:8px; margin:18px 0; font-size:13px; }
.access-login-card input { width:100%; border:1px solid #cbd5e1; border-radius:7px; min-height:44px; padding:10px; }
.access-login-card > button { width:100%; }
.access-error { color:#b42318 !important; font-size:13px; line-height:1.5; }
.access-readonly { background:#edf4ff; border:1px solid #c4d6ee; color:#31567e; padding:10px 14px; border-radius:8px; margin-bottom:16px; font-size:13px; }
#access-logout { color:#c6d5e8; width:100%; margin-top:10px; }
.access-users-panel, .staff-panel { grid-column:1 / -1; min-width:0; }
.access-users-content { padding:0 18px 18px; }
.access-account-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:center; border-bottom:1px solid #e2e8f0; }
.access-account-row .access-account { border-bottom:0; }
.access-account-row > .quiet-btn { white-space:nowrap; }
.access-assignment-list { margin-top:16px; border-top:1px solid #e2e8f0; max-height:260px; overflow:auto; }
.access-account { width:100%; background:white; color:inherit; border:0; border-bottom:1px solid #e2e8f0; display:grid; grid-template-columns:38px minmax(140px,1fr) 140px 80px 80px; gap:14px; align-items:center; padding:18px 0; text-align:left; cursor:pointer; }
.access-account:hover { background:#f7faff; }
.access-account small, .access-legacy small { display:block; color:#62748a; margin-top:5px; overflow-wrap:anywhere; }
.access-role { font-size:12px; color:#496581; }
.access-legacy { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 0 0; }
.access-setup { display:flex; flex-direction:column; gap:6px; padding:14px 16px; margin-top:16px; border-radius:8px; background:#eef5ff; color:#254b77; line-height:1.5; font-size:13px; }
.access-empty { padding:24px; color:#62748a; }
.staff-actions { display:flex; flex-wrap:wrap; gap:8px; }
.staff-company { display:inline-flex; margin-top:6px; padding:4px 9px; border-radius:999px; background:#edf4ff; color:#31567e; font-size:12px; font-weight:600; }
.staff-panel .panel-head .info-tip { margin-left:8px; }
.staff-table-wrap { overflow-x:auto; overscroll-behavior-inline:contain; -webkit-overflow-scrolling:touch; }
.staff-table { width:100%; border-collapse:collapse; min-width:1040px; }
.staff-table th { background:#f5f8fc; text-align:left; color:#607187; font-size:11px; padding:12px 14px; }
.staff-table td { padding:10px 8px; border-top:1px solid #e5ebf2; }
.staff-table th:first-child, .staff-table td:first-child { padding-left:18px; }
.staff-table th:last-child, .staff-table td:last-child { padding-right:18px; }
.staff-table input, .staff-table select { width:100%; min-height:38px; padding:8px; border:1px solid transparent; background:transparent; border-radius:6px; color:#203448; font:inherit; font-size:12px; }
.staff-table input:hover, .staff-table select:hover { border-color:#cdd8e5; background:white; }
.staff-table input:focus, .staff-table select:focus { border-color:#3277bf; outline:2px solid #3277bf22; background:white; }
.staff-table input:invalid { border-color:#dc9c41; }
.staff-table td:first-child { width:19%; } .staff-table td:nth-child(2) { width:17%; } .staff-table td:nth-child(3) { width:17%; }
.staff-table td:nth-child(5), .staff-table td:nth-child(6) { width:130px; }
.staff-legacy { margin:12px 18px 0; padding:12px 14px; border:1px solid #e2e8f0; border-radius:10px; background:#f8fafc; font-size:13px; }
.staff-legacy > div { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:10px; }
.staff-legacy > div + div { border-top:1px solid #e2e8f0; margin-top:10px; }
@media(max-width:700px) { .staff-table { min-width:900px; } .staff-table th,.staff-table td { padding:7px 6px; } .staff-legacy > div { align-items:flex-start; flex-direction:column; } .staff-legacy .quiet-btn { width:100%; } }
.staff-save-status { border-top:1px solid #e5ebf2; padding:12px 18px; font-size:11px; color:#607187; }
.modal.access-user-editor { width:min(760px,calc(100vw - 32px)); max-width:760px; max-height:90vh; overflow:auto; }
.access-user-editor .form-grid { margin-top:20px; }
.access-owner { display:flex !important; align-items:center; gap:8px; font-size:13px; }
.access-owner input { width:16px !important; min-height:16px !important; }
.access-rights-head { display:flex; align-items:center; justify-content:space-between; margin:24px 18px 10px; }
.access-orgs { border:1px solid #dce5ef; border-radius:8px; padding:12px; max-height:220px; overflow:auto; }
.access-orgs legend { padding:0 6px; font-weight:700; }
.access-org-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:6px 0; }
.access-org-row label { display:flex; align-items:center; gap:8px; margin:0; }
.access-org-row select { width:auto; min-width:130px; }
.access-rights-head h3 { margin:0; font-size:14px; }
.access-rights-head span { font-size:12px; color:#66788e; }
.access-company-tabs { display:flex; gap:6px; margin:0 18px 10px; overflow-x:auto; padding-bottom:3px; }
.access-company-tabs button { flex:0 0 auto; border:1px solid #cbd8e7; border-radius:7px; background:#f7f9fc; color:#284462; padding:8px 12px; font:inherit; cursor:pointer; }
.access-company-tabs button[aria-selected="true"] { background:#163b60; border-color:#163b60; color:white; }
.access-company-controls { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin:0 18px 10px; min-height:38px; font-size:12px; color:#435970; }
.access-company-controls label { display:flex; align-items:center; gap:7px; }
.access-company-controls select { max-width:180px; min-height:36px; border:1px solid #cbd8e7; border-radius:6px; background:white; }
.access-reset-control { align-self:end; display:grid; gap:5px; }
.access-reset-result { font-size:12px; overflow-wrap:anywhere; user-select:all; }
.access-rights { display:grid; grid-template-columns:1fr 1fr; border:1px solid #dce5ef; border-radius:8px; overflow:hidden; margin:0 18px; }
.access-right-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:8px; padding:9px 12px; border-bottom:1px solid #e6ecf4; font-size:12px; background:#fbfcfe; }
.access-right-row:nth-child(odd) { border-right:1px solid #e6ecf4; }
.access-right-row > span { min-width:0; }
.access-right-row label { display:inline-flex; align-items:center; gap:4px; white-space:nowrap; cursor:pointer; }
.access-right-row input { width:16px; height:16px; margin:0; accent-color:#1a5f98; }
.access-editor-note { font-size:12px; color:#607187; line-height:1.5; margin:14px 18px; }
.access-user-editor > .access-error { margin:8px 18px; }
#page-settings .settings-history { padding:10px 18px; }
#page-settings #tax-rule-history .tax-rule-entry { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px 12px; min-width:0; line-height:1.45; }
#tax-rule-history .tax-rule-entry > b { grid-column:1 / -1; font-size:11px; }
#tax-rule-history .tax-rule-entry > span { min-width:0; overflow-wrap:anywhere; }
#tax-rule-history .tax-rule-entry strong { color:var(--text); white-space:nowrap; }
#tax-rule-date-help { font-size:10px; line-height:1.4; }
.dashboard-pool[hidden], [data-dashboard-view][hidden] { display:none !important; }
@media(max-width:700px) { .access-account { grid-template-columns:32px 1fr 80px; } .access-account .access-role, .access-account > span:last-child { display:none; } .access-rights { grid-template-columns:1fr; } .access-right-row:nth-child(odd) { border-right:0; } .access-legacy { align-items:flex-start; flex-direction:column; } .staff-panel .panel-head { flex-wrap:wrap; gap:12px; } }
@media(max-width:420px) { .access-right-row { grid-template-columns:minmax(0,1fr) auto auto; gap:5px; padding:9px 7px; font-size:11px; } }
.sidebar-bottom { margin-top: auto; }
.user-card { display: grid; grid-template-columns: 34px 1fr auto; gap: 9px; align-items: center; margin-top: 12px; padding: 13px 8px 4px; border-top: 1px solid rgba(255,255,255,.11); }
.user-card strong, .user-card small { display: block; }
.user-card strong { font-size: 12px; }
.user-card small { color: rgba(255,255,255,.5); font-size: 10px; margin-top: 2px; }
.user-card > span { color: rgba(255,255,255,.4); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #dce7f0; color: var(--navy); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.avatar.small { width: 30px; height: 30px; flex: 0 0 30px; }

.main { min-width: 0; }
.topbar { min-height: 62px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 28px; position: sticky; top: 0; z-index: 15; backdrop-filter: blur(16px); }
.company-switch { display: flex; flex: 0 1 auto; min-width: 0; padding: 3px; border-radius: 7px; background: var(--bg); }
.company-switch button, .segmented button { border: 0; background: transparent; color: var(--muted); border-radius: 5px; padding: 7px 11px; font-size: 12px; font-weight: 500; cursor: pointer; }
.company-switch button.is-active, .segmented button.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(20,30,40,.1); }
.top-actions, .header-buttons, .view-actions { display: flex; align-items: center; gap: 8px; }
.top-actions { flex: 0 1 auto; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
.deployment-badge { display:inline-flex; align-items:center; min-height:24px; padding:0 8px; border:1px solid #d3a447; border-radius:999px; background:#fff8e7; color:#76500d; font-size:9px; font-weight:700; letter-spacing:.03em; white-space:nowrap; }
.deployment-badge.is-partial { border-color:#c87836; background:#fff1e6; color:#8a3f0b; }
.deployment-badge[hidden] { display:none; }
.deployment-badge-short { display:none; }
.server-state { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; color: var(--muted); font-size: 8px; white-space: nowrap; }
.server-state i { width: 7px; height: 7px; border-radius: 50%; background: #b7c0c8; box-shadow: 0 0 0 3px rgba(183,192,200,.16); }
.server-state.is-online i { background: var(--green); box-shadow: 0 0 0 3px rgba(42,139,117,.13); }
.server-state.is-saving i { background: var(--orange); box-shadow: 0 0 0 3px rgba(190,127,35,.13); }
.server-state.is-offline i { background: var(--red); box-shadow: 0 0 0 3px rgba(180,72,72,.12); }
.server-state.is-local i, .server-state.is-conflict i { background: var(--orange); box-shadow: 0 0 0 3px rgba(190,127,35,.13); }
.server-state.is-error { flex: 1 1 100%; min-width: 0; max-width: 100%; align-items: flex-start; white-space: normal; line-height: 1.35; }
.server-state.is-error > span { min-width: 0; overflow-wrap: anywhere; }
.server-state.is-error i { flex: 0 0 7px; margin-top: .35em; }
.server-status-panel { display:flex; align-items:center; gap:6px; min-width:0; }
.mobile-wordmark, .mobile-shell-settings { display:none; }
.mobile-active-company { display:none; }
#retry-local-draft[hidden] { display: none; }
#download-repaired-draft[hidden] { display: none; }
.conflict-versions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.conflict-versions details { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.conflict-versions pre { max-height: 220px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 10px; }
.icon-btn, .quiet-btn, .primary-btn, .text-btn { border: 0; cursor: pointer; white-space: nowrap; }
.icon-btn { width: 34px; height: 34px; border-radius: 7px; background: transparent; color: var(--muted); font-size: 20px; }
.icon-btn:hover { background: var(--bg); color: var(--text); }
.notification { position: relative; }
.notification i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--red); top: 7px; right: 7px; }
.primary-btn { min-height: 36px; padding: 0 14px; border-radius: 7px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 600; transition: .16s ease; }
.primary-btn:hover { background: #174879; }
.quiet-btn { min-height: 34px; padding: 0 12px; border-radius: 7px; background: var(--surface); color: #3c4956; border: 1px solid var(--border-strong); font-size: 12px; font-weight: 500; }
.quiet-btn:hover { background: var(--surface-soft); }
.text-btn { padding: 5px 0; background: transparent; color: var(--blue); font-size: 12px; font-weight: 600; }
.mobile-menu { display: none; }
.mobile-menu-close, .mobile-menu-backdrop { display: none; }

.page { display: none; max-width: 1480px; margin: 0 auto; padding: 26px 30px 48px; }
.page.is-active { display: block; animation: page-in .18s ease; }
@keyframes page-in { from { opacity: .5; transform: translateY(2px); } }
.page-heading, .object-header, .section-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.eyebrow { margin: 0 0 5px; font-size: 10px; text-transform: uppercase; letter-spacing: .11em; color: var(--muted); font-weight: 700; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 24px; line-height: 1.2; letter-spacing: -.035em; }
h2 { margin-bottom: 0; font-size: 14px; letter-spacing: -.01em; }
h3 { margin-bottom: 0; font-size: 14px; }
.heading-sub { margin: 5px 0 0; color: var(--muted); font-size: 12px; }

.focus-strip, .calc-summary { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: 9px; margin-bottom: 16px; box-shadow: var(--shadow); }
.focus-strip > div, .calc-summary > div { padding: 15px 18px; border-right: 1px solid var(--border); }
.focus-strip > div:last-child, .calc-summary > div:last-child { border-right: 0; }
.focus-strip span, .calc-summary span { color: var(--muted); font-size: 11px; display: block; margin-bottom: 5px; }
.focus-strip strong { font-size: 21px; letter-spacing: -.03em; }
.calc-summary strong { font-size: 19px; letter-spacing: -.03em; }
.calc-summary small { color: var(--green); margin-left: 7px; font-size: 11px; font-weight: 600; }
.danger-text { color: var(--red) !important; }
.info-tip { position:relative; display:inline-grid; place-items:center; width:16px; height:16px; margin-left:4px; border:1px solid #a9bacd; border-radius:50%; background:#f4f8fc; color:#50647d; font-size:10px; font-weight:800; font-style:normal; line-height:1; vertical-align:middle; cursor:help; }
.form-grid label .info-tip,.modal-head .info-tip,.panel-head .info-tip,.page-heading .info-tip,.contract-heading .info-tip { display:inline-grid; }
.info-tip:hover,.info-tip:focus-visible { border-color:#315d91; color:#173b68; outline:2px solid #b9d4f2; outline-offset:1px; }
.info-tip::after { position:absolute; z-index:100; top:calc(100% + 7px); left:50%; width:max-content; max-width:min(300px, calc(100vw - 32px)); padding:8px 10px; border-radius:7px; background:#17304d; color:#fff; box-shadow:0 7px 20px #0c1d3450; font-size:11px; font-weight:500; line-height:1.4; text-align:left; white-space:normal; content:attr(data-tip); opacity:0; pointer-events:none; transform:translate(-50%,-4px); transition:opacity .12s, transform .12s; }
.info-tip:hover::after,.info-tip:focus-visible::after { opacity:1; transform:translate(-50%,0); }
.warning-text { color: var(--orange); }
.ok-text { color: var(--green); }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(310px, .75fr); gap: 16px; align-items: start; }
.panel, .data-panel, .schedule-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--shadow); }
.panel-head { min-height: 58px; padding: 14px 17px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.task-row { width: 100%; min-height: 64px; display: grid; grid-template-columns: 32px minmax(0,1fr) auto 14px; gap: 12px; align-items: center; padding: 9px 16px; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; cursor: pointer; }
.task-row:last-child { border-bottom: 0; }
.task-row:hover, .lift-row:hover, .source-panel button:hover { background: var(--surface-soft); }
.task-state { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: var(--navy-soft); color: var(--navy); font-size: 11px; font-weight: 700; }
.task-state.critical { background: var(--red-soft); color: var(--red); }
.task-state.warning { background: var(--orange-soft); color: var(--orange); }
.task-state.blue { color: var(--blue); }
.task-state.green { background: var(--green-soft); color: var(--green); }
.task-state.neutral { background: #f0f2f4; color: #5c6670; }
.task-main strong, .task-main small, .task-meta b, .task-meta small { display: block; }
.task-main strong { font-size: 12px; margin-bottom: 5px; }
.task-main small, .task-meta small { color: var(--muted); font-size: 10px; }
.task-meta { text-align: right; }
.task-meta b { font-size: 11px; margin-bottom: 4px; }
.chevron { color: #9aa4ae; font-size: 18px; }
.timeline { padding: 3px 16px 6px; }
.timeline-row { display: grid; grid-template-columns: 42px 1fr auto; gap: 11px; align-items: center; min-height: 66px; border-bottom: 1px solid var(--border); }
.timeline-row:last-child { border-bottom: 0; }
.timeline-row time { text-align: center; font-size: 15px; font-weight: 700; color: var(--navy); }
.timeline-row time span { display: block; font-size: 8px; letter-spacing: .08em; color: var(--muted); }
.timeline-row strong, .timeline-row small { display: block; }
.timeline-row strong { font-size: 11px; margin-bottom: 4px; }
.timeline-row small { font-size: 10px; color: var(--muted); }
.status { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 11px; background: #eff1f3; color: #626d77; font-size: 9px; font-weight: 700; white-space: nowrap; }
.status-green { background: var(--green-soft); color: var(--green); }
.status-orange { background: var(--orange-soft); color: var(--orange); }
.status-blue { background: var(--navy-soft); color: var(--blue); }

.toolbar { min-height: 50px; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.search-field { width: min(360px, 42vw); height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface); color: var(--muted); }
.search-field input { width: 100%; border: 0; outline: 0; font-size: 12px; color: var(--text); background: transparent; }
.segmented { display: inline-flex; padding: 3px; border-radius: 7px; background: #e9edf0; }
.segmented b { font-size: 9px; margin-left: 3px; color: inherit; }
.toolbar > .quiet-btn:last-child { margin-left: auto; }
.data-panel { overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { height: 38px; padding: 0 13px; color: var(--muted); background: var(--surface-soft); border-bottom: 1px solid var(--border); text-align: left; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; }
.data-table td { height: 54px; padding: 7px 13px; border-bottom: 1px solid var(--border); font-size: 11px; vertical-align: middle; }
.data-table tr { cursor: pointer; }
.data-table tr[data-client-id]:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
#page-clients .client-card-action button { min-width:44px; min-height:44px; white-space:nowrap; }
#page-clients .client-card-action button:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
.data-table tbody tr:hover { background: var(--surface-soft); }
.data-table td strong, .data-table td small { display: block; }
.data-table td strong { font-size: 11px; }
.data-table td small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.data-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.table-footer { height: 47px; display: flex; align-items: center; justify-content: space-between; padding: 0 13px; color: var(--muted); font-size: 10px; }
.table-footer div { display: flex; gap: 3px; }
.table-footer button { min-width: 27px; height: 27px; border: 1px solid var(--border); background: var(--surface); border-radius: 5px; font-size: 10px; }
.empty-state { padding: 56px; text-align: center; color: var(--muted); font-size: 12px; }

.object-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.object-card, .lift-detail-card { padding: 16px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); box-shadow: var(--shadow); text-align: left; cursor: pointer; }
.object-card:hover, .lift-detail-card:hover { border-color: #bac8d4; transform: translateY(-1px); }
.object-top, .object-facts, .spec-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.object-top > span:last-child { color: var(--muted); font-size: 10px; }
.object-card h3 { margin-top: 16px; font-size: 15px; }
.object-card p { margin: 5px 0 17px; color: var(--muted); font-size: 11px; }
.object-card-meta { display:grid; gap:3px; overflow-wrap:anywhere; }
.object-facts { justify-content: flex-start; gap: 21px; font-size: 10px; color: var(--muted); }
.object-facts b { color: var(--text); }
.mini-progress { height: 4px; border-radius: 3px; margin-top: 13px; background: #e9edf0; overflow: hidden; }
.mini-progress i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
@media(max-width:600px) {
  #page-objects { padding-top:10px; }
  #page-objects .page-heading { margin-bottom:10px; }
  #page-objects #new-object { min-height:44px; }
  #page-objects .toolbar { min-height:0; gap:8px; margin-bottom:10px; }
  #page-objects .search-field { min-height:44px; }
  #page-objects .segmented { width:100%; max-width:100%; overflow-x:auto; }
  #page-objects .segmented button { flex:none; min-height:44px; padding:8px 10px; }
  #page-objects .object-grid { gap:8px; }
  #page-objects .object-card { width:100%; min-width:0; min-height:44px; padding:11px 13px; border-radius:11px; }
  #page-objects .object-card h3 { margin:7px 0 2px; font-size:15px; line-height:1.25; overflow-wrap:anywhere; }
  #page-objects .object-card p { margin:0 0 8px; font-size:11px; line-height:1.35; }
  #page-objects .object-top { gap:8px; }
  #page-objects .object-facts { gap:8px; font-size:11px; }
  #page-objects .object-facts span:not(:first-child),#page-objects .mini-progress { display:none; }
}

.back-link { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; margin-bottom: 15px; }
.object-header { align-items: center; }
.title-line { display: flex; align-items: center; gap: 10px; }
.object-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.detail-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border-strong); margin-bottom: 16px; overflow-x: auto; }
.detail-tabs button { min-height: 38px; padding: 0 13px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.detail-tabs button.is-active { color: var(--navy); border-color: var(--navy); }
.detail-tabs b { font-size: 8px; padding: 2px 5px; border-radius: 8px; background: #e9edf0; margin-left: 3px; }
.detail-pane { display: none; }
.detail-pane.is-active { display: block; }
.detail-layout { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(280px,.65fr); gap: 16px; align-items: start; }
.detail-primary, .detail-side { display: flex; flex-direction: column; gap: 14px; }
.stage-panel .panel-head { border-bottom: 0; }
.stage-track { display: grid; grid-template-columns: repeat(11,1fr); gap: 4px; padding: 4px 17px 10px; }
.stage-track i { height: 5px; background: #e4e8ec; border-radius: 3px; }
.stage-track i.done { background: var(--green); }
.stage-track i.current { background: var(--blue); }
.stage-labels { display: grid; grid-template-columns: repeat(11,1fr); gap: 4px; padding: 0 17px 16px; color: var(--muted); font-size: 7px; }
.stage-labels span { overflow: hidden; text-overflow: ellipsis; }
.progress-next-actions { border-top:1px solid var(--border); padding-top:14px; }
.progress-next-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 16px 10px; }
.progress-next-head h3 { margin:0; font-size:12px; }
.progress-next-head p { margin:3px 0 0; color:var(--muted); font-size:9px; }
.stage-panel .stage-actions { grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); }
.stage-panel .check-list .empty-state { padding:9px 16px 13px; font-size:9px; }
.stage-actions { display: grid; gap: 7px; padding: 0 14px 10px; }
.stage-action { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: center; width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); text-align: left; cursor: pointer; }
.stage-action:hover { border-color: var(--blue); background: var(--blue-soft); }
.stage-action > span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--navy-soft); color: var(--navy); }
.stage-action b, .stage-action small { display: block; }
.stage-action-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.stage-action-title b { min-width: 0; }
.stage-action-title .info-tip { flex: none; margin-left: auto; }
.stage-action b { font-size: 10px; }
.stage-action small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.stage-action.ready { border-color: #afd9c3; background: var(--green-soft); }
.stage-action.blocked { opacity: .62; cursor: not-allowed; }
.object-related-list { display: grid; gap: 8px; }
.related-row { display: grid; grid-template-columns: 42px 1fr auto; gap: 11px; align-items: center; min-height: 62px; padding: 10px 13px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.related-row strong, .related-row small { display: block; }
.related-row strong { font-size: 10px; }
.related-row small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.history-row { padding: 11px 13px; border-bottom: 1px solid var(--border); }
.history-row strong, .history-row small { display: block; }
.history-row strong { font-size: 10px; }
.history-row small { margin-top: 4px; color: var(--muted); font-size: 8px; }
#object-history-list { gap: 8px; }
#object-history-list .history-row { min-width: 0; padding: 13px 15px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
#object-history-list .history-row strong { font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
#object-history-list .history-row time { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.measurement-summary { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 14px 12px; }
.measurement-chip { padding: 6px 8px; border-radius: 6px; background: var(--surface-soft); color: var(--muted); font-size: 8px; }
.measurement-chip b { color: var(--text); }
.lift-row { width: 100%; min-height: 66px; display: grid; grid-template-columns: 35px minmax(0,1fr) auto auto 12px; gap: 12px; align-items: center; padding: 10px 16px; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; cursor: pointer; }
.lift-row:last-child { border-bottom: 0; }
.lift-code { width: 32px; height: 32px; border-radius: 7px; display: inline-grid; place-items: center; background: var(--navy-soft); color: var(--navy); font-size: 10px; font-weight: 700; flex: 0 0 auto; }
.lift-code.large { width: 38px; height: 38px; }
.lift-row strong, .lift-row small, .lift-row b { display: block; }
.lift-row strong, .lift-row b { font-size: 10px; }
.lift-row small { color: var(--muted); font-size: 9px; margin-top: 4px; }
.check-list label { display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 11px; }
.check-list label:last-child { border: 0; }
.check-list input { accent-color: var(--navy); margin-top: 1px; }
.check-list span, .check-list small { display: block; }
.check-list small { color: var(--muted); margin-top: 4px; font-size: 9px; }
.check-list s { color: var(--muted); }
.info-panel dl { margin: 0; padding: 8px 16px; }
.info-panel dl div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 10px; }
.info-panel dl div:last-child { border-bottom: 0; }
.info-panel dt { color: var(--muted); }
.info-panel dd { margin: 0; font-weight: 600; }
.project-file-group { padding: 10px 16px; border-top: 1px solid var(--border); }
.project-file-group:first-child { border-top: 0; }
.project-file-group-summary { display:flex; align-items:center; gap:7px; min-height:44px; margin:-4px 0; color:var(--text); cursor:pointer; list-style:none; }
.project-file-group-summary::-webkit-details-marker { display:none; }
.project-file-group-summary::before { content:'▸'; color:var(--blue); font-size:13px; transition:transform .15s ease; }
.project-file-group[open] > .project-file-group-summary::before { transform:rotate(90deg); }
.project-file-group-summary strong { font-size:12px; }
.project-file-group-summary span { display:inline-grid; place-items:center; min-width:20px; height:20px; padding:0 5px; border-radius:20px; background:var(--surface-soft); color:var(--muted); font-size:10px; }
.project-file-group-summary:focus-visible,.project-file-details summary:focus-visible { outline:2px solid var(--blue); outline-offset:2px; border-radius:4px; }
.project-file-group > .project-file-list,.project-file-group > .project-file-email { margin-top:6px; }
.project-file-details { color:var(--muted); font-size:10px; }
.project-file-details summary { display:inline-flex; align-items:center; min-height:28px; color:var(--blue); cursor:pointer; }
.project-file-details .project-file-meta { margin:2px 0 5px; }
.project-file-group h3,.object-file-group h3 { display:flex; align-items:center; gap:7px; margin: 0 0 5px; font-size: 11px; letter-spacing:.01em; }
.project-file-group h3 span,.object-file-group h3 span { display:inline-grid; place-items:center; min-width:19px; height:19px; padding:0 5px; border-radius:20px; background:var(--surface-soft); color:var(--muted); font-size:10px; font-weight:600; }
.project-file-email { margin-top:8px; }
.project-file-group.project-file-email { margin-top:0; }
.project-file-email h4 { margin:0 0 6px; font-size:10px; }
.project-file-list { display: grid; gap: 0; }
.project-file-row { min-width:0; padding: 7px 0; border-top: 1px solid var(--border); font-size: 11px; }
.project-file-row:first-child { border-top: 0; }
.project-file-email .project-file-row { display:grid; grid-template-columns:90px minmax(0,1fr); gap:8px; }
.project-file-main { min-width:0; }
.project-file-group .project-file-main { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:0 7px; }
.project-file-group .project-file-main > a,.project-file-group .project-file-main > span { display:flex; align-items:center; min-height:44px; }
.project-file-group .project-file-current-tag { grid-column:1/-1; width:max-content; }
.project-file-group .project-file-details { grid-column:2; grid-row:1; }
.project-file-group .project-file-details[open] { grid-column:1/-1; grid-row:auto; }
.project-file-group .project-file-details summary { min-height:44px; }
.project-file-current-tag { display:inline-block; margin:3px 0 0 7px; padding:2px 6px; border-radius:999px; background:#e9f2fb; color:#225985; font-size:10px; font-style:normal; font-weight:700; line-height:1.2; vertical-align:middle; }
.project-file-main > a,.project-file-main > span { font-weight:600; line-height:1.35; }
.project-file-preview-link { display:inline-flex; align-items:center; flex-wrap:wrap; gap:3px 8px; min-height:44px; border:0; padding:4px 0; background:none; color:var(--blue); font:inherit; font-weight:600; line-height:1.35; text-align:left; overflow-wrap:anywhere; cursor:pointer; }
.project-file-open-action { font-size:11px; white-space:nowrap; text-decoration:underline; }
.project-file-preview-link:hover { text-decoration:underline; }
.project-file-preview-link:focus-visible { outline:2px solid var(--blue); outline-offset:2px; border-radius:2px; }
.project-file-meta { display:flex; flex-wrap:wrap; align-items:center; gap:3px 5px; margin-top:3px; color:var(--muted); font-size:10px; line-height:1.35; overflow-wrap:anywhere; }
.project-file-meta time { color:inherit; }
.project-file-message { width:100%; border:0; padding:0; background:none; color:var(--blue); font:inherit; font-size:10px; text-align:left; text-decoration:underline; cursor:pointer; white-space:nowrap; }
.project-file-message:hover { color:var(--navy); }
.project-file-row a, .project-file-row span { overflow-wrap: anywhere; min-width: 0; }
.project-file-history { min-width:0; border-top:1px solid var(--border); }
.project-file-history summary { min-height:36px; display:grid; grid-template-columns:10px minmax(0,1fr); align-items:center; gap:2px 6px; padding:5px 0; color:var(--blue); font-size:10px; font-weight:600; cursor:pointer; list-style:none; }
.project-file-history summary::-webkit-details-marker { display:none; }
.project-file-history summary::before { content:'▸'; grid-row:1 / span 2; font-size:11px; line-height:1; transition:transform .15s ease; }
.project-file-history summary > span,.project-file-history summary > small { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.project-file-history summary > small { grid-column:2; color:var(--muted); font-size:10px; font-weight:500; }
.project-file-history[open] summary::before { transform:rotate(90deg); }
.project-file-history summary:focus-visible { outline:2px solid var(--blue); outline-offset:-2px; border-radius:4px; }
.project-file-history-rows { min-width:0; margin:0 0 6px 4px; padding-left:10px; border-left:2px solid var(--border); }
.project-file-history-rows .project-file-row:first-child { border-top:0; }
.project-hover-preview { position:fixed; z-index:1200; box-sizing:border-box; max-height:min(332px,calc(100vh - 24px)); padding:9px; border:1px solid var(--border); border-radius:11px; background:var(--surface); box-shadow:0 14px 36px rgba(20,43,76,.20); pointer-events:none; overflow:hidden; }
.project-hover-preview[hidden] { display:none; }
.project-hover-preview > strong { display:block; margin:0 0 7px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:11px; }
.project-hover-media { display:block; width:100%; height:min(286px,calc(100vh - 70px)); border:0; border-radius:6px; background:var(--surface-soft); object-fit:contain; }
.project-file-empty { margin: 0; color: var(--muted); font-size: 10px; }
.money-value { padding: 16px 16px 2px; }
.money-value strong, .money-value span { display: block; }
.money-value strong { font-size: 20px; }
.money-value span { color: var(--muted); font-size: 10px; margin-top: 3px; }
.money-panel > .mini-progress { margin: 12px 16px; }
.payment-next { padding: 0 16px 16px; }
.payment-next span, .payment-next b { display: block; font-size: 9px; }
.payment-next span { color: var(--muted); margin-bottom: 3px; }
.section-bar { align-items: center; margin-bottom: 13px; }
.section-bar p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.lift-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.lift-detail-card > div:first-child { display: flex; justify-content: space-between; }
.lift-detail-card h3 { margin: 14px 0 5px; }
.lift-detail-card p { color: var(--muted); font-size: 10px; margin-bottom: 15px; }
.lift-detail-card.attention { border-color: #edcf9e; }
.spec-row { justify-content: flex-start; gap: 18px; color: var(--muted); font-size: 9px; }
.spec-row b { color: var(--text); display: block; margin-top: 3px; }
.placeholder-pane { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; }
.placeholder-pane > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: var(--navy-soft); color: var(--navy); font-weight: 700; }
.placeholder-pane h2 { margin-top: 13px; font-size: 16px; }
.placeholder-pane p { color: var(--muted); font-size: 11px; margin: 7px 0 15px; }

.sales-detail-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(280px,.6fr); gap: 14px; margin-bottom: 14px; align-items: start; }
.request-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 8px 16px; }
.request-fields > div, .request-fields > label { min-height: 55px; display: flex; flex-direction: column; justify-content: center; border-bottom: 1px solid var(--border); }
.request-fields > :nth-last-child(-n+2) { border-bottom: 0; }
.request-fields span { color: var(--muted); font-size: 8px; margin-bottom: 5px; }
.request-fields b { font-size: 10px; }
.request-fields select { width: calc(100% - 18px); height: 31px; border: 1px solid var(--border); border-radius: 5px; background: #fff; font-size: 10px; }
.sales-actions button { width: 100%; min-height: 64px; display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px 15px; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; cursor: pointer; }
.sales-actions button:last-child { border-bottom: 0; }
.sales-actions button > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 7px; background: var(--navy-soft); color: var(--navy); font-weight: 700; }
.sales-actions b, .sales-actions small { display: block; }
.sales-actions b { font-size: 10px; }.sales-actions small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.tender-panel { margin-top: 14px; }
.bidder-row { min-height: 57px; display: grid; grid-template-columns: minmax(160px,1fr) 130px 120px auto; gap: 12px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--border); }
.bidder-row:last-child { border-bottom: 0; }
.bidder-row b, .bidder-row small { display: block; }
.bidder-row b { font-size: 10px; }.bidder-row small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.bidder-row .primary-btn { min-height: 30px; padding: 0 10px; font-size: 8px; }
.bidder-row.winner { background: var(--green-soft); }

.blocked-btn { background: #6f7b85; }
.validation-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #efcf9d; border-radius: 8px; background: var(--orange-soft); margin-bottom: 14px; }
.validation-banner > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: #f6d9ab; color: var(--orange); font-weight: 700; }
.validation-banner div { flex: 1; }
.validation-banner strong { display: block; font-size: 11px; }
.validation-banner p { margin: 3px 0 0; color: #80571e; font-size: 10px; }
.validation-banner button { border: 0; background: transparent; color: var(--orange); font-size: 10px; font-weight: 700; cursor: pointer; }
.tech-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(270px,.6fr); gap: 14px; align-items: start; }
.spec-table > div { min-height: 45px; display: grid; grid-template-columns: minmax(130px,1.2fr) minmax(150px,1.4fr) minmax(90px,.7fr) 28px; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border); font-size: 10px; }
.spec-table > div:last-child { border: 0; }
.spec-table .spec-head { min-height: 34px; color: var(--muted); background: var(--surface-soft); text-transform: uppercase; letter-spacing: .06em; font-size: 8px; }
.spec-table .has-warning { background: #fffaf2; }
.spec-table .is-required-missing { background:#fff8df; box-shadow:inset 3px 0 #e3aa27, inset -1px 0 #efd184; }
.spec-table .is-required-missing > span:first-child { color:#7c5608; font-weight:700; }
.check-dot, .warning-dot { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 9px; font-style: normal; font-weight: 700; }
.warning-dot { background: var(--orange-soft); color: var(--orange); }
.source-panel button { width: 100%; min-height: 59px; display: grid; grid-template-columns: 37px 1fr auto; gap: 10px; align-items: center; padding: 8px 14px; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; cursor: pointer; }
.source-panel button:last-child { border: 0; }
.source-panel strong, .source-panel small { display: block; }
.source-panel strong { font-size: 10px; }
.source-panel small { color: var(--muted); font-size: 9px; margin-top: 4px; }
.file-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; background: var(--red-soft); color: var(--red); font-size: 8px; font-weight: 700; }
.file-icon.muted { background: #edf0f2; color: var(--muted); }

.calc-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(270px,.6fr); gap: 14px; align-items: start; }
.calc-table > div { min-height: 48px; display: grid; grid-template-columns: minmax(130px,1fr) repeat(3,minmax(100px,.72fr)); align-items: center; gap: 10px; padding: 5px 16px; border-bottom: 1px solid var(--border); font-size: 10px; }
.calc-table .calc-head { min-height: 34px; color: var(--muted); background: var(--surface-soft); text-transform: uppercase; font-size: 8px; }
.calc-table label { height: 31px; display: flex; align-items: center; position: relative; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); }
.calc-table label input { width: 100%; border: 0; outline: 0; padding: 0 23px 0 8px; font-size: 10px; font-weight: 600; background: transparent; }
.calc-table label em { position: absolute; right: 7px; color: var(--muted); font-style: normal; }
.calc-table label.edited { border-color: #e5b86f; background: #fffaf2; }
.calc-table label small { position: absolute; right: 1px; top: -13px; color: var(--orange); font-size: 7px; }
.calc-table b { text-align: right; }
.calc-table .calc-total { border: 0; background: var(--navy-soft); font-weight: 600; }
.calc-table .calc-total strong { text-align: right; font-size: 12px; }
.segmented.wide { display: flex; margin: 15px 16px 0; }
.segmented.wide button { flex: 1; }
.customer-price { margin: 14px 16px; padding: 15px; border-radius: 8px; background: var(--navy-soft); }
.customer-price span { color: var(--muted); font-size: 9px; }
.customer-price strong { display: block; margin: 4px 0 7px; font-size: 22px; letter-spacing: -.04em; }
.customer-price p { margin: 0; color: #536679; font-size: 9px; line-height: 1.45; }
.customer-price .price-lines { display: grid; gap: 8px; margin-top: 10px; }
.customer-price .price-lines div { display: flex; justify-content: space-between; font-size: 10px; }
.offer-meta { padding: 0 16px 12px; }
.offer-meta div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 9px; }
.offer-meta div:last-child { border: 0; }
.offer-meta span { color: var(--muted); }

.week-nav { display: flex; align-items: center; gap: 9px; }
.week-nav button { width: 30px; height: 30px; border: 1px solid var(--border); background: var(--surface); border-radius: 6px; }
.week-nav strong { font-size: 11px; }
.toolbar > .segmented:last-child { margin-left: auto; }
.schedule-panel { overflow: hidden; }
.schedule-head, .schedule-row { display: grid; grid-template-columns: 190px repeat(7, minmax(80px,1fr)); min-width: 800px; }
.schedule-head { height: 37px; background: var(--surface-soft); border-bottom: 1px solid var(--border); }
.schedule-head span { display: grid; place-items: center; border-right: 1px solid var(--border); color: var(--muted); font-size: 9px; }
.schedule-head span:first-child { place-items: center start; padding-left: 14px; }
.schedule-row { min-height: 59px; position: relative; border-bottom: 1px solid var(--border); }
.schedule-row:last-child { border: 0; }
.schedule-row::before { content: ""; position: absolute; left: 190px; right: 0; top: 0; bottom: 0; background: repeating-linear-gradient(to right, transparent 0, transparent calc(14.285% - 1px), var(--border) calc(14.285% - 1px), var(--border) 14.285%); pointer-events: none; }
.schedule-row > div { display: flex; align-items: center; gap: 9px; padding: 0 13px; border-right: 1px solid var(--border); z-index: 1; }
.schedule-row b, .schedule-row small { display: block; }
.schedule-row b { font-size: 10px; }
.schedule-row small { color: var(--muted); font-size: 8px; margin-top: 3px; }
.job { align-self: center; margin: 0 5px; padding: 8px 9px; border-radius: 5px; font-style: normal; font-size: 9px; font-weight: 600; z-index: 2; }
.job-blue { background: #dfeaf4; color: var(--navy); }
.job-green { background: var(--green-soft); color: var(--green); }
.job-orange { background: var(--orange-soft); color: var(--orange); }
.money-focus strong { font-size: 18px; }

.lift-pane { display: none; }
.lift-pane.is-active { display: block; }
.lift-overview-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(270px,.6fr); gap: 14px; align-items: start; }
.lift-overview-grid > .panel { min-width: 0; }
#lift-overview .info-panel dl div { grid-template-columns: 92px minmax(0,1fr); min-width: 0; }
#lift-overview .info-panel dd { min-width: 0; overflow-wrap: anywhere; }
#page-lift-detail > .object-header, #page-lift-detail > .object-header > div:first-child, #page-lift-detail .title-line { min-width: 0; }
#page-lift-detail .title-line h1, #page-lift-detail #lift-subtitle { min-width: 0; overflow-wrap: anywhere; }
.installation-lift-board { margin-top: 14px; padding-bottom: 14px; }
.installation-board-filter { margin: 0 14px 12px; min-width: 0; }
.installation-board-filter label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 600; }
.installation-board-filter-controls { display: flex; gap: 8px; min-width: 0; }
.installation-board-filter input { flex: 1; width: 100%; min-width: 0; min-height: 44px; padding: 8px 11px; border: 1px solid var(--border-strong); border-radius: 9px; background: #fff; color: var(--text); font: inherit; font-size: 13px; }
.installation-board-filter button { flex: none; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: #fff; color: var(--navy); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.installation-board-filter button[hidden] { display: none; }
.installation-board-empty { margin: 0; padding: 12px; border: 1px dashed var(--border-strong); border-radius: 9px; color: var(--muted); font-size: 12px; }
.installation-progress { margin: 0 14px 14px; }
.installation-progress h3 { margin: 0 0 8px; font-size: 13px; }
.installation-progress-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.installation-progress-grid > * { display: flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 56px; padding: 8px; border: 1px solid var(--border-strong); border-radius: 9px; color: inherit; text-decoration: none; }
.installation-progress-grid strong { font-size: 18px; }
.installation-progress-grid span { font-size: 11px; overflow-wrap: anywhere; }
.installation-order-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 14px 12px; }
.installation-order-filter button { min-height: 44px; padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.installation-order-filter button[aria-pressed="true"] { border-color: var(--navy); background: #eaf2fa; font-weight: 700; }
.installation-order-filter button:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.installation-order-empty { margin: 0; padding: 12px; border: 1px solid var(--border-strong); border-radius: 8px; color: var(--muted); }
@media (max-width: 520px) { .installation-progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.installation-lift-list { display: grid; gap: 10px; margin: 0 14px; }
.installation-lift-row { border: 1px solid var(--border-strong); border-radius: 10px; padding: 12px; min-width: 0; }
.installation-lift-identity { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 7px; min-width: 0; }
.installation-lift-row h3 { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.installation-lift-identity small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.installation-lift-reference { display: flex; flex-wrap: wrap; gap: 3px 10px; margin: 5px 0 9px; min-width: 0; color: var(--muted); font-size: 11px; }
.installation-lift-reference span, .installation-lift-reference strong { min-width: 0; overflow-wrap: anywhere; }
.installation-lift-reference strong { color: var(--text); font-weight: 600; }
.installation-lift-priority { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; font-size: 11px; }
.installation-lift-status { padding: 4px 7px; border-radius: 6px; background: var(--navy-soft); color: var(--navy); }
.installation-lift-state { color: var(--muted); overflow-wrap: anywhere; }
.installation-lift-next { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; margin-top: 9px; border-top: 1px solid var(--border); padding-top: 7px; }
.installation-lift-next > span { color: var(--muted); font-size: 10px; font-weight: 600; }
.installation-lift-next a { display: inline-flex; align-items: center; min-height: 44px; color: var(--navy); font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.installation-lift-more { border-top: 1px solid var(--border); }
.installation-lift-more summary { display: flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 11px; cursor: pointer; }
.installation-lift-more summary:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }
.installation-lift-more dl { padding-top: 8px; }
.installation-lift-row dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 8px 12px; margin: 0; }
.installation-lift-row dt { color: var(--muted); font-size: 11px; }
.installation-lift-row dd { margin: 2px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.installation-lift-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
.installation-lift-actions a { color: var(--navy); font-size: 12px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 520px) {
  .installation-lift-row { padding: 10px 11px; }
  .installation-lift-reference { flex-direction: column; gap: 2px; }
  .installation-lift-next { align-items: stretch; flex-direction: column; }
  .installation-lift-next a { width: 100%; box-sizing: border-box; justify-content: center; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--navy-soft); text-align: center; }
}
.lift-flow { display: grid; grid-template-columns: repeat(5,minmax(110px,1fr)); padding: 18px; overflow-x: auto; }
.lift-flow button { min-width: 112px; position: relative; display: flex; flex-direction: column; gap: 5px; padding: 0 14px 0 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.lift-flow button:not(:last-child)::after { content: ""; position: absolute; top: 13px; left: 36px; right: 4px; height: 2px; background: var(--border-strong); }
.lift-flow button span { width: 27px; height: 27px; display: grid; place-items: center; z-index: 1; border-radius: 50%; background: var(--navy); color: #fff; font-size: 8px; }
.lift-flow button b { margin-top: 5px; font-size: 10px; }
.lift-flow button small { color: var(--muted); font-size: 8px; }

.lift-calc-table { overflow-x: auto; }
.lift-calc-head, .lift-calc-row, .lift-calc-total { min-width: 610px; display: grid; grid-template-columns: minmax(180px,1.4fr) 90px 130px 110px 34px; gap: 10px; align-items: center; padding: 7px 16px; border-bottom: 1px solid var(--border); font-size: 10px; }
.lift-calc-head { min-height: 35px; background: var(--surface-soft); color: var(--muted); text-transform: uppercase; font-size: 8px; }
.lift-calc-row input { width: 100%; height: 31px; padding: 0 8px; border: 1px solid var(--border); border-radius: 5px; outline: 0; font: inherit; font-weight: 600; }
.lift-calc-row input:focus, .price-editor input:focus, .price-editor textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(50,111,168,.1); }
.lift-calc-row strong, .lift-calc-total strong { text-align: right; }
.lift-calc-row button { width: 28px; height: 28px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; }
.lift-calc-row button:hover { background: var(--red-soft); color: var(--red); }
.lift-calc-total { min-height: 46px; border-bottom: 0; background: var(--navy-soft); font-weight: 700; }
.lift-calc-total strong { grid-column: 4; font-size: 12px; }
.price-editor { display: grid; gap: 13px; padding: 16px; }
.price-editor label > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 9px; }
.price-editor label > div { position: relative; }
.price-editor input, .price-editor textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: 6px; padding: 9px 10px; outline: 0; font: inherit; }
.price-editor em { position: absolute; right: 10px; top: 9px; color: var(--muted); font-style: normal; }
.version-list { border-top: 1px solid var(--border); }
.version-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 9px; padding: 11px 16px; border-bottom: 1px solid var(--border); align-items: center; }
.version-item:last-child { border-bottom: 0; }
.version-item > span { width: 32px; height: 25px; display: grid; place-items: center; border-radius: 5px; background: var(--navy-soft); color: var(--navy); font-size: 8px; font-weight: 700; }
.version-item b, .version-item small { display: block; font-size: 9px; }
.version-item small { margin-top: 3px; color: var(--muted); }
.version-item > time { color: var(--muted); font-size: 8px; }
.offer-document { margin: 18px; padding: 32px; min-height: 340px; border: 1px solid var(--border); border-radius: 7px; background: #fff; box-shadow: inset 0 0 0 8px #fafbfc; }
.offer-document > span { color: var(--blue); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.offer-document h2 { margin: 30px 0 7px; font-size: 20px; }
.offer-document > p { color: var(--muted); font-size: 10px; }
.offer-document #customer-price { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--border); }
.offer-document #customer-price strong { display: block; margin: 6px 0; font-size: 24px; }
.offer-document #customer-price p { color: var(--muted); font-size: 9px; }

.planner-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.planner-filters { display: flex; gap: 7px; }
.planner-filters select { height: 32px; padding: 0 28px 0 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font-size: 10px; }
.planner-shell { border: 1px solid var(--border); border-radius: 9px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.planner-scroll { overflow: auto; max-height: calc(100vh - 255px); }
.planner-grid { min-width: 1160px; --planner-left: 465px; --week-width: 72px; }
.planner-header, .planner-row { display: grid; grid-template-columns: var(--planner-left) repeat(12,var(--week-width)); }
.planner-header { position: sticky; top: 0; z-index: 8; background: #f7f9fb; border-bottom: 1px solid var(--border-strong); }
.planner-header-left { position: sticky; left: 0; z-index: 10; display: grid; grid-template-columns: 205px 105px 155px; background: #f7f9fb; }
.planner-header-left span, .planner-week { min-height: 48px; display: flex; align-items: flex-end; padding: 7px 9px; border-right: 1px solid var(--border); color: var(--muted); font-size: 8px; font-weight: 600; }
.planner-week { justify-content: center; text-align: center; line-height: 1.35; }
.planner-week.current { background: #edf7f5; color: var(--green); }
.crew-group { border-bottom: 1px solid var(--border-strong); }
.crew-heading { position: sticky; left: 0; z-index: 6; min-width: 1160px; height: 36px; display: flex; align-items: center; gap: 9px; padding: 0 11px; background: #eef1f4; border-bottom: 1px solid var(--border); font-size: 10px; }
.crew-heading b { margin-right: auto; }
.crew-heading span { color: var(--muted); font-size: 8px; }
.planner-row { min-height: 54px; position: relative; border-bottom: 1px solid var(--border); }
.planner-row:last-child { border-bottom: 0; }
.planner-row::after { content: ""; position: absolute; left: var(--planner-left); right: 0; inset-block: 0; z-index: 0; background: repeating-linear-gradient(to right, transparent 0, transparent calc(var(--week-width) - 1px), var(--border) calc(var(--week-width) - 1px), var(--border) var(--week-width)); pointer-events: none; }
.planner-info { position: sticky; left: 0; z-index: 4; display: grid; grid-template-columns: 205px 105px 155px; background: var(--surface); border-right: 1px solid var(--border-strong); }
.planner-info > div { min-width: 0; display: flex; align-items: center; padding: 7px 9px; border-right: 1px solid var(--border); }
.planner-info > div:last-child { border-right: 0; }
.planner-name { gap: 8px; }
.planner-name i { width: 7px; height: 7px; border-radius: 2px; background: #aebdcb; flex: 0 0 auto; }
.planner-name b, .planner-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planner-name b { font-size: 9px; }
.planner-name small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.planner-params { color: var(--muted); font-size: 8px; line-height: 1.45; }
.planner-dates { display: grid !important; grid-template-columns: 1fr 1fr; gap: 5px; }
.planner-dates label { min-width: 0; }
.planner-dates span { display: block; margin-bottom: 2px; color: var(--muted); font-size: 7px; }
.planner-dates input { width: 100%; min-width: 0; border: 0; background: transparent; font-size: 8px; }
.planner-bar { align-self: center; height: 30px; z-index: 2; display: flex; align-items: center; justify-content: center; margin: 0 3px; border: 1px solid rgba(30,55,80,.08); border-radius: 4px; overflow: hidden; color: #24415a; font-size: 8px; font-weight: 700; white-space: nowrap; cursor: grab; }
.planner-bar.plan { background: #dfe3f3; }
.planner-bar.active { background: #bcded9; color: #1f695d; }
.planner-bar.risk { background: #efb9b9; color: #8c3535; }
.planner-row.risk .planner-info { background: #fff6f6; }
.planner-row.dragging { opacity: .5; }
.crew-group.drag-over .crew-heading { background: #dfeaf4; outline: 2px solid var(--blue); outline-offset: -2px; }
.planner-empty { min-width: 1160px; padding: 16px; color: var(--muted); font-size: 9px; }
.planner-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; padding: 9px 3px; color: var(--muted); font-size: 8px; }
.planner-legend span:last-child { margin-left: auto; }
.planner-legend i { display: inline-block; width: 11px; height: 7px; margin-right: 4px; border-radius: 2px; }
.legend-plan { background: #dfe3f3; }.legend-active { background: #bcded9; }.legend-risk { background: #efb9b9; }

.settings-list { max-width: 760px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.settings-list button { width: 100%; min-height: 67px; display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 10px 15px; background: transparent; border: 0; border-bottom: 1px solid var(--border); text-align: left; cursor: pointer; }
.settings-list button:hover { background: var(--surface-soft); }
.settings-list button:last-child { border: 0; }
.settings-list button > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; background: var(--navy-soft); color: var(--navy); font-size: 10px; font-weight: 700; }
.settings-list strong, .settings-list small { display: block; }
.settings-list strong { font-size: 11px; }
.settings-list small { color: var(--muted); font-size: 9px; margin-top: 4px; }
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.client-search-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:0 0 12px; }
.client-search-field { flex:1 1 220px; min-width:0; }
.client-search-field input { display:block; width:100%; min-height:44px; padding:10px 12px; border:1px solid var(--border-strong); border-radius:8px; background:var(--surface); color:var(--text); font-size:16px; }
.client-search-field input:focus-visible, #client-search-clear:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
#client-search-clear { min-height:44px; padding:8px 12px; }
#client-search-clear[hidden] { display:none; }
#client-search-count { color:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.client-search-field .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media(max-width:600px) { .client-search-row { gap:6px; } .client-search-field { flex-basis:calc(100% - 90px); } #client-search-count { flex-basis:100%; } }
.settings-form { padding-top: 4px; }
.calc-defaults-panel { grid-column:1 / -1; }
.calc-defaults-panel .settings-form { grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; padding:18px; }
@media(max-width:1100px) { .calc-defaults-panel .settings-form { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .calc-defaults-panel .settings-form { grid-template-columns:1fr; } }
.calc-defaults-section { grid-column: 1 / -1; margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--border); color: var(--navy); font-size: 12px; }
.calc-defaults-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.settings-form .primary-btn.full { grid-column: 1 / -1; justify-self: end; }
.compact-list { max-width: none; border: 0; border-radius: 0; }
.settings-row { min-height: 62px; display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.settings-row:last-child { border-bottom: 0; }
.settings-row > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; background: var(--navy-soft); color: var(--navy); font-size: 10px; font-weight: 700; }
.settings-row strong, .settings-row small { display: block; }
.settings-row strong { font-size: 11px; }
.settings-row small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.settings-row i { color: var(--muted); font-size: 9px; font-style: normal; }
.template-settings-row { grid-template-columns:38px minmax(0,1fr); }
.template-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.template-version-modal { width:min(720px,100%); }
.template-version-body { display:grid; gap:16px; padding:18px 19px; }
.template-version-body h3 { margin:0 0 9px; font-size:12px; }
.template-version-list { border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.template-version-row { display:grid; grid-template-columns:46px minmax(0,1fr) auto; gap:12px; align-items:center; min-height:62px; padding:10px 12px; border-bottom:1px solid var(--border); }
.template-version-row:last-child { border-bottom:0; }
.template-version-number { display:grid; place-items:center; width:38px; height:30px; border-radius:6px; background:var(--navy-soft); color:var(--navy); font-weight:700; font-size:10px; }
.template-version-row strong,.template-version-row small { display:block; }
.template-version-row strong { font-size:10px; }
.template-version-row small { margin-top:3px; color:var(--muted); font-size:9px; }
.template-version-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.template-active-label { color:#177245; font-weight:700; }
.template-marker-details { border-top:1px solid var(--border); padding-top:13px; }
.template-marker-details summary { cursor:pointer; color:var(--blue); font-size:10px; font-weight:700; }
.template-marker-details p { margin:10px 0 7px; color:var(--muted); font-size:9px; line-height:1.45; }
.template-marker-grid { display:flex; flex-wrap:wrap; gap:5px; }
.template-marker-grid code { padding:4px 6px; border:1px solid var(--border); border-radius:5px; background:var(--surface-soft); color:#32465a; font-size:8px; }
.cloud-readiness { padding:15px 18px 17px; background:#f7fbff; }
.cloud-readiness-head { display:flex; align-items:center; gap:10px; }
.cloud-readiness-icon { display:grid; place-items:center; width:34px; height:34px; flex:none; border-radius:8px; background:var(--navy-soft); color:var(--navy); font-size:15px; }
.cloud-readiness-head strong,.cloud-readiness-head small { display:block; }
.cloud-readiness-head strong { font-size:12px; }
.cloud-readiness-head small { margin-top:3px; color:#8a571b; font-size:10px; }
.cloud-readiness p { margin:11px 0 0; font-size:11px; line-height:1.5; }
.cloud-readiness > small { display:block; margin-top:11px; padding-top:10px; border-top:1px solid var(--border); color:var(--muted); font-size:10px; line-height:1.5; }
.muted-row { opacity: .72; }
.offer-controls { display: grid; gap: 10px; margin-top: 16px; }
.offer-controls label span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 600; }
.offer-controls select { width: 100%; padding: 8px 9px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); font-size: 10px; }
.empty-state.compact { padding: 16px 0; }
.form-grid label small { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; }
.source-file, .document-item { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; min-height: 58px; padding: 9px 0; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; }
.source-file:last-child, .document-item:last-child { border-bottom: 0; }
.source-file strong, .source-file small, .document-item strong, .document-item small { display: block; }
.source-file strong, .document-item strong { font-size: 10px; }
.source-file small, .document-item small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.upload-state { margin-top: 10px; padding: 9px; border-radius: 6px; background: var(--blue-soft); color: var(--blue); font-size: 11px; display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.upload-state[hidden] { display:none; }
.upload-state > span { flex:1 1 100%; overflow-wrap:anywhere; }
.upload-state .mini-action, .upload-state a { min-height:36px; display:inline-flex; align-items:center; }
.empty-dot { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-soft); color: var(--muted); font-style: normal; }
.inspection-list { display: grid; }
.inspection-row { display: grid; grid-template-columns: minmax(220px,1fr) minmax(180px,1fr); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.inspection-row label { display: flex; gap: 9px; align-items: center; font-size: 10px; font-weight: 600; }
.inspection-row input[data-check-note], .inspection-note input, .inspection-note textarea { width: 100%; padding: 8px 9px; border: 1px solid var(--border-strong); border-radius: 6px; font-size: 10px; }
.inspection-note { display: block; margin-top: 13px; }
.inspection-note > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 600; }
.modal-actions.embedded { padding-inline: 0; padding-bottom: 0; }
.payroll-panel { margin-top: 14px; }
.data-panel.flat { border: 0; border-radius: 0; box-shadow: none; }
.legal-note { margin: 10px 14px 14px; color: var(--muted); font-size: 8px; }
.crew-settings-row { grid-template-columns:34px minmax(0,1fr) auto; padding:10px 17px; }
.crew-settings-row > span { font-size:12px; }
.crew-settings-row > div { min-width:0; }
.crew-settings-row small { overflow-wrap:anywhere; }
.crew-empty { padding:14px 19px; color:var(--muted); font-size:11px; line-height:1.5; }
.crew-modal-content { width:min(680px,100%); }
#workforce-modal .modal { max-height:min(92vh,900px); overflow:auto; padding:18px; }
#workforce-modal section { margin:16px 0; padding-top:14px; border-top:1px solid var(--border); }
#workforce-modal h3 { margin:0 0 10px; font-size:13px; }
#workforce-modal label { display:grid; gap:5px; font-size:11px; }
#workforce-modal select, #workforce-modal input[type="number"] { min-width:0; width:100%; padding:8px; border:1px solid var(--border-strong); border-radius:6px; background:var(--surface); }
#workforce-modal .workforce-available { display:flex; align-items:center; gap:8px; padding:5px 0; }
#workforce-modal .workforce-available input { flex:none; }
#workforce-participants { display:grid; gap:8px; margin:10px 0; }
.workforce-participant { display:grid; grid-template-columns:minmax(0,1fr) 110px auto; align-items:end; gap:8px; }
#workforce-error:not([hidden]) { padding:8px 10px; color:#8b3028; background:#fff0ed; border-radius:6px; }
#workforce-share-total { font-weight:700; }
@media (max-width:540px) { .workforce-participant { grid-template-columns:minmax(0,1fr) 90px; } .workforce-participant button { grid-column:1 / -1; justify-self:start; } }
.crew-editor-toolbar { display:flex; justify-content:flex-end; padding:12px 19px 0; }
.crew-editor { display:grid; gap:9px; padding:12px 19px 18px; }
.crew-edit-card { min-width:0; border:1px solid var(--border); border-radius:8px; background:var(--surface); }
.crew-edit-card[open] { border-color:var(--blue); }
.crew-edit-card summary { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 14px; cursor:pointer; list-style:none; }
.crew-edit-card summary::-webkit-details-marker { display:none; }
.crew-edit-card summary strong { min-width:0; overflow-wrap:anywhere; font-size:12px; }
.crew-edit-card summary span { flex:none; color:var(--muted); font-size:10px; }
.crew-edit-body { display:grid; gap:15px; padding:0 14px 14px; }
.crew-name-field { display:grid; gap:6px; color:var(--text); font-size:11px; font-weight:600; }
.crew-name-field small { color:var(--muted); font-weight:400; }
.crew-name-field input { width:100%; min-width:0; padding:9px 10px; border:1px solid var(--border-strong); border-radius:6px; background:var(--surface); font:inherit; }
.crew-edit-body fieldset { min-width:0; margin:0; padding:10px; border:1px solid var(--border); border-radius:7px; }
.crew-edit-body legend { padding:0 5px; font-size:11px; font-weight:700; }
.crew-member-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.crew-member-options label { display:flex; align-items:center; gap:8px; min-width:0; padding:8px; border:1px solid var(--border); border-radius:6px; cursor:pointer; font-size:11px; }
.crew-member-options label:has(input:checked) { border-color:var(--blue); background:var(--blue-soft); }
.crew-member-options input { flex:none; }
.crew-member-options span { min-width:0; overflow-wrap:anywhere; }
.crew-remove-btn { justify-self:start; border:0; background:none; color:#a9493d; font-size:10px; cursor:pointer; }
.mini-action { padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: 5px; background: var(--surface); color: var(--blue); font-size: 8px; font-weight: 700; cursor: pointer; }
.automation-panel { grid-column:1 / -1; }
.automation-notice { margin:16px 18px 0; padding:13px 15px; border:1px solid #e5c88c; border-radius:9px; background:#fff8e9; color:#684717; }
.automation-notice strong { font-size:13px; }
.automation-notice p { margin:6px 0 0; font-size:11px; line-height:1.5; }
.automation-catalog { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:16px 18px 18px; }
.automation-card { min-width:0; padding:15px; border:1px solid var(--border); border-radius:10px; background:var(--surface); }
.automation-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.automation-card h3 { margin:0; font-size:14px; line-height:1.3; }
.automation-card-head p { margin:6px 0 0; color:var(--muted); font-size:11px; line-height:1.45; }
.automation-state { flex:none; padding:5px 8px; border-radius:99px; background:#eef1f5; color:#4b5b6d; font-size:10px; font-weight:700; white-space:nowrap; }
.automation-state.is-partial { background:#fff1d9; color:#8c5b17; }
.automation-card dl { display:grid; gap:0; margin:12px 0 0; border-top:1px solid var(--border); }
.automation-card dl > div { display:grid; grid-template-columns:150px minmax(0,1fr); gap:12px; padding:9px 0; border-bottom:1px solid var(--border); }
.automation-card dl > div:last-child { border-bottom:0; padding-bottom:0; }
.automation-card dt { color:var(--muted); font-size:10px; font-weight:700; }
.automation-card dd { min-width:0; margin:0; font-size:11px; line-height:1.45; overflow-wrap:anywhere; }
@media(max-width:1000px) { .automation-catalog { grid-template-columns:1fr; } }
@media(max-width:600px) { .automation-card-head { flex-direction:column; } .automation-card dl > div { grid-template-columns:1fr; gap:3px; } }
.conflict-copy { padding: 18px 19px; color: var(--muted); font-size: 10px; line-height: 1.55; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(10,25,40,.42); backdrop-filter: blur(2px); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(580px,100%); max-height: calc(100vh - 36px); overflow: auto; background: var(--surface); border-radius: 11px; box-shadow: 0 24px 80px rgba(10,25,40,.25); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 19px 14px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 16px; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; padding: 18px 19px; }
.form-grid label, .decision { display: block; }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid label span, .decision > span { display: block; margin-bottom: 6px; color: #4c5965; font-size: 10px; font-weight: 600; }
.form-grid input, .form-grid select, .form-grid textarea, .decision select, .decision textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: 6px; padding: 9px 10px; outline: 0; background: var(--surface); color: var(--text); font-size: 11px; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .decision select:focus, .decision textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(50,111,168,.1); }
#client-form { width:min(520px,100%); }
#client-form .modal-head { align-items:center; }
#client-form .modal-head > div { display:flex; align-items:center; min-width:0; }
#client-form .form-grid { gap:12px 14px; padding-block:16px; }
#client-form .form-grid input { min-height:40px; }
#client-form .modal-actions button { min-height:40px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 19px; border-top: 1px solid var(--border); }
#task-modal .modal { width: min(500px,100%); }
#task-modal .modal-head { align-items: center; padding: 15px 17px 12px; }
#task-modal .modal-head > div { display: flex; align-items: center; gap: 6px; min-width: 0; }
#task-modal .modal-head .info-tip { margin: 0; }
#task-modal .form-grid { gap: 10px 12px; padding: 14px 17px; }
#task-modal .form-grid label > span { margin-bottom: 4px; font-size: 11px; }
#task-modal .form-grid input, #task-modal .form-grid select { min-width: 0; min-height: 40px; font-size: 13px; }
#task-modal .modal-actions { padding: 11px 17px; }
#task-modal .modal-actions button { min-height: 40px; }
.task-form-error { margin: 0 17px 10px; color: #a12d32; font-size: 11px; line-height: 1.4; }
.task-form-error[hidden] { display: none; }
.object-modal { width: min(520px,100%); }
.object-modal .modal-head { align-items:center; padding-block:14px; }
.object-modal .modal-head > div { display:flex; align-items:center; gap:8px; min-width:0; }
.object-modal .form-grid { gap:10px 12px; padding-block:15px; }
.object-modal .form-grid label span { margin-bottom:4px; font-size:11px; }
.object-modal .form-grid input,.object-modal .form-grid select { min-height:40px; font-size:13px; }
.object-modal .modal-actions { padding-block:11px; }
@media(max-width:420px) {
  #object-modal { padding:8px; align-items:center; }
  .object-modal { max-height:calc(100dvh - 16px); }
  .object-modal .modal-head { padding:12px 14px; }
  .object-modal .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px 10px; padding:12px 14px; }
  .object-modal .form-grid label.full { grid-column:1 / -1; }
  .object-modal .modal-actions { padding:10px 14px; }
  .object-modal .modal-actions button { min-width:0; flex:1; white-space:normal; }
}
.difference-modal { width: min(520px,100%); }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 18px 19px 10px; }
.compare-grid > div { padding: 13px; border-radius: 7px; background: var(--surface-soft); border: 1px solid var(--border); }
.compare-grid span, .compare-grid strong, .compare-grid small { display: block; }
.compare-grid span { color: var(--muted); font-size: 9px; }
.compare-grid strong { margin: 5px 0; font-size: 18px; }
.compare-grid small { color: var(--muted); font-size: 8px; }
.difference-note { margin: 0 19px 13px; padding: 11px 12px; background: var(--orange-soft); border-radius: 7px; color: #75501e; }
.difference-note strong { font-size: 10px; }
.difference-note p { margin: 4px 0 0; font-size: 9px; line-height: 1.45; }
.decision { padding: 0 19px 13px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 80; min-width: 240px; max-width: 360px; padding: 11px 13px; border-radius: 7px; background: var(--navy-dark); color: #fff; font-size: 11px; box-shadow: 0 12px 32px rgba(10,25,40,.25); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .22s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.save-issue { position: fixed; right: 20px; bottom: 20px; z-index: 85; width: min(440px,calc(100vw - 32px)); padding: 16px; border: 2px solid #b44848; border-radius: 12px; background: #fff8f6; box-shadow: 0 16px 40px rgba(10,25,40,.25); color: var(--text); }
.save-issue[hidden] { display: none; }
.save-issue strong { display: block; font-size: 15px; }
.save-issue p { margin: 8px 0 14px; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; max-height: 30vh; overflow: auto; }
.save-issue-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.save-issue-actions .mini-action { font-size: 11px; }
.lift-set-row.save-issue-highlight { outline: 3px solid #b44848; outline-offset: 2px; }

@media (max-width: 1020px) {
  .app-shell { grid-template-columns: 72px minmax(0,1fr); }
  .topbar { gap:8px; }
  .top-actions { flex:0 1 auto; }
  .sidebar { padding-inline: 9px; }
  .brand { justify-content: center; padding-inline: 0; }
  .brand > div:last-child, .nav-item span:not(.nav-icon), .nav-item kbd, .sidebar-bottom .user-card div, .sidebar-bottom .user-card > span { display: none; }
  .nav-group-label { display: none; }
  .nav-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.12); }
  .nav-item { grid-template-columns: 1fr; justify-items: center; padding: 0; position: relative; }
  .nav-item.ops-subnav { padding: 0; }
  .foreign-nav-group { margin-left: 0; }
  .foreign-nav-group summary { justify-content: center; padding: 0; font-size: 0; }
  .foreign-nav-group summary::after { display: none; }
  .foreign-nav-symbol { flex-basis: auto; }
  .foreign-nav-links { padding: 2px 0 4px; }
  .foreign-nav-links .nav-item.ops-subnav { padding: 0; }
  .nav-item b { position: absolute; right: 2px; top: 2px; min-width: 15px; height: 15px; font-size: 8px; }
  .user-card { grid-template-columns: 1fr; justify-items: center; padding-inline: 0; }
  #access-logout { font-size: 0; }
  #access-logout::before { content: "⇥"; font-size: 20px; line-height: 1; }
  .overview-grid, .detail-layout, .tech-grid, .calc-layout, .lift-overview-grid, .sales-detail-grid, .settings-grid { grid-template-columns: 1fr; }
  .lift-overview-grid { grid-template-columns: minmax(0,1fr); }
  .lift-overview-grid > .panel { min-width: 0; }
  .lift-overview-grid .lift-flow { max-width: 100%; }
  #lift-parameters .tech-panel { min-width: 0; }
  #lift-parameters .spec-table { max-width: 100%; }
  .compact-panel, .detail-side, .source-panel, .offer-preview { display: grid; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; width: min(280px, calc(100vw - 48px)); height: 100dvh; overflow-y: auto; padding-top:calc(20px + env(safe-area-inset-top)); padding-bottom:calc(14px + env(safe-area-inset-bottom)); transform: translateX(-100%); transition: transform .2s ease; box-shadow: 12px 0 30px rgba(10,25,40,.22); z-index: 31; }
  .sidebar.is-open { transform: translateX(0); }
  .mobile-menu-backdrop.is-open { display: block; position: fixed; inset: 0; background: rgba(10,25,40,.48); z-index: 30; }
  .mobile-menu-close { display: grid; place-items: center; position: absolute; right: 10px; top:calc(10px + env(safe-area-inset-top)); width:44px; height:44px; border: 0; border-radius: 7px; background: transparent; color: #fff; font-size: 27px; cursor: pointer; }
  .mobile-menu-close:hover, .mobile-menu-close:focus-visible { background: rgba(255,255,255,.12); }
  .brand { justify-content: flex-start; padding-inline: 8px; }
  .brand > div:last-child, .nav-item span:not(.nav-icon), .sidebar-bottom .user-card div, .sidebar-bottom .user-card > span { display: block; }
  .nav-group-label { display: block; }
  .nav-group { margin-top: 12px; padding-top: 0; border-top: 0; }
  .nav-item { grid-template-columns: 22px 1fr auto; justify-items: stretch; padding: 0 10px; }
  .nav-item.ops-subnav { padding-left: 22px; }
  .foreign-nav-group { margin-left: 9px; }
  .foreign-nav-group summary { min-height: 44px; justify-content: flex-start; padding: 7px 9px; font-size: 12px; }
  .foreign-nav-group summary::after { display: block; }
  .foreign-nav-symbol { flex-basis: 21px; }
  .foreign-nav-links { padding: 2px 0 4px 4px; }
  .foreign-nav-links .nav-item.ops-subnav { padding-left: 12px; min-height: 44px; }
  .user-card { grid-template-columns: 34px 1fr auto; justify-items: stretch; padding-inline: 8px; }
  #access-logout { font-size: 12px; }
  #access-logout::before { content: none; }
  .mobile-menu { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border: 0; border-radius: 7px; background: var(--navy-soft); color: var(--navy-dark); font-size: 21px; cursor: pointer; }
  .topbar { min-height: 58px; padding: 8px 14px; gap: 8px; }
  .top-actions { flex: 0 1 auto; }
  .ui-language-control > span { display: none; }
  .ui-language-control select { width: 74px; }
  .company-switch button { padding-inline: 8px; }
  .top-actions .icon-btn { display: grid; place-items: center; flex: 0 0 34px; }
  .server-state { display: inline-flex; position: static; padding: 0 6px; background: transparent; box-shadow: none; font-size: 10px; }
  #retry-local-draft:not([hidden]) { position: static; }
  .top-actions .primary-btn { width: 34px; padding: 0; font-size: 0; }
  .top-actions .primary-btn span:first-child { font-size: 18px; }
  .top-actions .primary-btn span:last-child { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .page { padding: 20px 14px 38px; }
  .page-heading, .object-header, .section-bar { align-items: flex-start; }
  h1 { font-size: 21px; }
  .focus-strip, .calc-summary { grid-template-columns: repeat(2,1fr); }
  .focus-strip > div:nth-child(2), .calc-summary > div:nth-child(2) { border-right: 0; }
  .focus-strip > div:nth-child(-n+2), .calc-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .toolbar { flex-wrap: wrap; }
  .search-field { width: 100%; }
  .segmented { max-width: 100%; overflow-x: auto; }
  .toolbar > .quiet-btn:last-child { margin-left: 0; }
  .data-panel, .schedule-panel { overflow-x: auto; }
  .data-table { min-width: 780px; }
  .object-grid, .lift-detail-grid { grid-template-columns: 1fr; }
  .task-row { grid-template-columns: 30px 1fr 12px; }
  .task-meta { display: none; }
  .lift-row { grid-template-columns: 35px 1fr 12px; }
  .lift-row > span:nth-child(3), .lift-row > span:nth-child(4) { display: none; }
  .stage-labels { display: none; }
  .stage-track { padding-bottom: 15px; }
  .spec-table { overflow-x: auto; }
  .spec-table > div { min-width: 620px; }
  .calc-table { overflow-x: auto; }
  .calc-table > div { min-width: 650px; }
  .form-grid { grid-template-columns: 1fr; }
  #page-clients .page-heading { gap:12px; flex-wrap:wrap; }
  #page-clients .page-heading .primary-btn { min-height:42px; }
  #page-clients .data-panel { overflow:visible; border:0; background:transparent; box-shadow:none; }
  #page-clients .data-table { display:block; min-width:0; }
  #page-clients .data-table thead { display:none; }
  #page-clients .data-table tbody { display:grid; gap:10px; }
  #page-clients .data-table tr[data-client-id] { position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px 10px; padding:11px 13px; border:1px solid var(--border); border-radius:12px; background:var(--surface); box-shadow:var(--shadow); }
  #page-clients .data-table tr[data-client-id] td { display:block; height:auto; min-width:0; padding:0; border:0; font-size:12px; overflow-wrap:anywhere; text-align:left; }
  #page-clients .data-table tr[data-client-id] td:first-child { grid-column:1/-1; min-height:42px; padding-right:105px; }
  #page-clients .data-table tr[data-client-id] td:first-child strong { font-size:15px; line-height:1.25; }
  #page-clients .data-table tr[data-client-id] td:first-child small { margin-top:2px; font-size:11px; }
  #page-clients .data-table tr[data-client-id] td[data-label]::before { content:attr(data-label); display:block; margin-bottom:1px; color:var(--muted); font-size:10px; }
  #page-clients .data-table tr[data-client-id] td:nth-child(2) { grid-column:1; grid-row:2; }
  #page-clients .data-table tr[data-client-id] td:nth-child(3) { grid-column:1/-1; grid-row:3; }
  #page-clients .data-table tr[data-client-id] td:nth-child(4) { grid-column:1/-1; grid-row:4; }
  #page-clients .data-table tr[data-client-id] td:nth-child(5) { grid-column:2; grid-row:2; text-align:right; }
  #page-clients .data-table tr[data-client-id] .client-card-action { position:absolute; top:8px; right:10px; }
  #page-clients .data-table tr[data-client-id] .client-card-action button { padding:0 10px; border-radius:8px; font-size:11px; }
  #page-clients .data-table tr:not([data-client-id]) { display:block; padding:17px; border:1px solid var(--border); border-radius:10px; background:var(--surface); }
  #page-clients .data-table tr:not([data-client-id]) td { display:block; height:auto; padding:0; border:0; }
  #client-modal { padding:8px; }
  #client-form { max-height:calc(100dvh - 16px); }
  #client-form .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:14px; }
  #client-form .form-grid label.full { grid-column:1 / -1; }
  #client-form .modal-head { padding:14px; }
  #client-form .modal-actions { position:sticky; bottom:0; z-index:1; padding:10px 14px; background:var(--surface); }
  .form-grid label.full { grid-column: auto; }
  .compare-grid { grid-template-columns: 1fr; }
  .inspection-row { grid-template-columns: 1fr; }
  .crew-member-options { grid-template-columns: 1fr; }
  .request-fields { grid-template-columns: 1fr; }
  .request-fields > :nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .request-fields > :last-child { border-bottom: 0; }
  .bidder-row { grid-template-columns: 1fr auto; }
  .bidder-row > :nth-child(2), .bidder-row > :nth-child(3) { display: none; }
  .planner-toolbar { align-items: flex-start; flex-direction: column; }
  .planner-filters { width: 100%; overflow-x: auto; }
  .planner-scroll { max-height: calc(100vh - 300px); }
}
/* OWNER mobile operations: keep finance rows readable without a wide table viewport. */
@media (max-width: 430px) {
  #page-payments, #page-schedule, #page-registers { min-width:0; padding-top:28px; }
  #page-payments .page-heading, #page-schedule .page-heading, #page-registers .page-heading { display:grid; gap:8px; margin-bottom:10px; }
  #page-payments .page-heading h1, #page-schedule .page-heading h1, #page-registers .page-heading h1 { font-size:20px; line-height:1.2; }
  #page-payments .page-heading .heading-sub, #page-schedule .page-heading .heading-sub { margin-top:3px; line-height:1.35; }
  #page-payments .header-buttons { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); width:100%; gap:6px; }
  #page-payments .header-buttons select, #page-payments .header-buttons button { min-width:0; width:100%; min-height:44px; white-space:normal; }
  #page-payments .focus-strip { margin-bottom:10px; }
  #page-payments .focus-strip > div { padding:9px 11px; }
  #page-payments .money-focus strong { font-size:15px; }
  #page-payments .data-panel { overflow:visible; border:0; background:transparent; box-shadow:none; }
  #page-payments .data-table { display:block; min-width:0; width:100%; }
  #page-payments .data-table thead { display:none; }
  #page-payments .data-table tbody { display:grid; gap:8px; }
  #page-payments .data-table tr { display:grid; gap:5px; min-width:0; padding:11px 12px; border:1px solid var(--border); border-radius:9px; background:var(--surface); box-shadow:var(--shadow); }
  #page-payments .data-table td { display:flex; justify-content:space-between; gap:10px; height:auto; min-width:0; padding:0; border:0; text-align:right; overflow-wrap:anywhere; }
  #page-payments .data-table td[data-label]::before { content:attr(data-label); flex:0 0 36%; color:var(--muted); font-size:10px; text-align:left; }
  #page-payments .data-table td:first-child { padding-bottom:5px; border-bottom:1px solid var(--border); }
  #page-payments .data-table td:first-child strong { font-size:12px; }
  #page-payments .data-table td:first-child small { display:block; }
  #page-payments .data-table tr.budget-empty-row td { display:block; padding:0; border:0; text-align:left; }
  #page-payments .payroll-panel { margin-top:10px; }
  #page-payments .payroll-panel .panel-head { display:grid; gap:5px; padding:10px 12px; }
  #page-payments .payroll-panel .panel-head p { line-height:1.35; }
  #page-payments .payroll-panel .data-panel.flat { padding:0 8px; }
  #page-payments .legal-note { margin:8px 12px 12px; }
  #page-schedule .header-buttons { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; gap:6px; }
  #page-schedule .header-buttons .quiet-btn, #page-schedule .header-buttons .primary-btn { display:inline-flex; align-items:center; justify-content:center; min-width:0; min-height:44px; padding:6px; font-size:10px; line-height:1.2; white-space:normal; text-align:center; }
  #page-schedule .planner-toolbar { display:grid; gap:8px; margin-bottom:8px; }
  #page-schedule .week-nav { display:grid; grid-template-columns:44px auto 44px minmax(0,1fr); gap:5px; }
  #page-schedule .week-nav button { width:auto; min-width:44px; min-height:44px; }
  #page-schedule .week-nav strong { min-width:0; font-size:10px; overflow-wrap:anywhere; }
  #page-schedule .planner-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; gap:6px; }
  #page-schedule .planner-filters select { width:100%; min-width:0; min-height:44px; font-size:11px; }
  #page-schedule .planner-shell { min-width:0; max-width:100%; }
  #page-schedule .planner-scroll { max-height:calc(100dvh - 320px); }
  #page-schedule .planner-legend { gap:8px; }
  #page-registers .register-panel { margin-top:9px; }
  #page-registers .register-header { display:none; }
  #page-registers .register-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px 8px; min-height:66px; padding:10px 12px; }
  #page-registers .register-row > * { min-width:0; overflow-wrap:anywhere; }
  #page-registers .register-row > b { grid-column:1 / -1; }
  #page-registers .register-row strong { display:block; grid-column:2; text-align:right; }
  #page-registers .register-create { padding:10px 12px; }
  #page-registers .register-create button { min-height:44px; }
  #crew-modal { padding:8px; }
  #crew-modal .crew-modal-content { max-height:calc(100dvh - 16px); }
  #crew-modal .crew-editor-toolbar { padding:8px 12px 0; }
  #crew-modal .crew-editor { gap:6px; padding:8px 12px 12px; }
  #crew-modal .crew-edit-card summary, #crew-modal .crew-member-options label, #crew-modal .crew-remove-btn, #crew-modal .crew-editor-toolbar button { min-height:44px; }
  #crew-modal .crew-name-field input { min-height:44px; }
  #crew-modal .crew-edit-body { gap:8px; padding:0 10px 10px; }
  #crew-modal .crew-member-options { gap:5px; }
}
@media (max-width:430px) {
  #task-modal { padding: 8px; }
  #task-modal .modal { max-height: calc(100dvh - 16px); }
  #task-modal .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px 10px; padding: 12px 14px; }
  #task-modal .form-grid label.full { grid-column: 1 / -1; }
  #task-modal .modal-head { padding: 12px 14px; }
  #task-modal .modal-actions { position: sticky; bottom: 0; z-index: 1; padding: 10px 14px; background: var(--surface); }
  #task-modal .modal-actions button { min-width: 0; flex: 1; white-space: normal; }
  #page-object-detail .detail-primary, #page-object-detail .stage-panel, #detail-history { min-width: 0; }
  #page-object-detail .progress-next-head { align-items: flex-start; padding-inline: 12px; }
  #page-object-detail .progress-next-head > div { min-width: 0; }
  #page-object-detail .progress-next-head p { line-height: 1.35; }
  #page-object-detail .stage-panel .stage-actions { grid-template-columns: minmax(0,1fr); padding-inline: 12px; }
  #page-object-detail .stage-action { min-width: 0; grid-template-columns: 22px minmax(0,1fr); min-height: 44px; }
  #page-object-detail .stage-action b, #page-object-detail .stage-action small { overflow-wrap: anywhere; }
  #object-history-list .history-row { padding: 12px; }
  #page-clients .page-heading .primary-btn { width:100%; justify-content:center; }
  #client-form .form-grid { grid-template-columns:1fr; }
  #client-form .form-grid label.full { grid-column:auto; }
  #client-form { display:flex; flex-direction:column; min-width:0; overflow:hidden; }
  #client-form .modal-head { flex:none; padding:10px 12px; }
  #client-form .modal-head .icon-btn { flex:none; min-width:44px; min-height:44px; }
  #client-form .form-grid { flex:1 1 auto; min-height:0; min-width:0; overflow-y:auto; gap:8px; padding:10px 12px; }
  #client-form .form-grid label { min-width:0; }
  #client-form .form-grid label span { margin-bottom:3px; font-size:11px; }
  #client-form .form-grid input { min-width:0; min-height:44px; font-size:16px; }
  #client-form .modal-actions { flex:none; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:9px 12px max(9px,env(safe-area-inset-bottom)); box-shadow:0 -3px 12px #10223812; }
  #client-form .modal-actions button { min-width:0; min-height:44px; padding:8px; white-space:normal; line-height:1.2; }
}

/* OWNER phone shell: one navigation row and persistent, legible sync feedback. */
@media (max-width: 760px) {
  .topbar { height:calc(44px + env(safe-area-inset-top)); min-height:calc(44px + env(safe-area-inset-top)); flex-wrap:nowrap; padding:0 10px; padding-top:env(safe-area-inset-top); gap:7px; backdrop-filter:none; }
  .mobile-wordmark { display:block; color:var(--navy-dark); font-size:15px; letter-spacing:-.03em; white-space:nowrap; }
  .topbar:has(.deployment-badge:not([hidden])) .mobile-wordmark, .mobile-active-company { display:none; }
  .top-actions { flex:0 0 auto; flex-wrap:nowrap; gap:6px; margin-left:auto; }
  .top-actions .icon-btn, .top-actions .primary-btn { width:44px; height:44px; flex:0 0 44px; }
  .mobile-menu { width:44px; height:44px; flex-basis:44px; border-radius:10px; }
  .mobile-shell-settings { display:grid; gap:12px; margin:0 4px 14px; padding:12px; border:1px solid rgba(255,255,255,.16); border-radius:12px; background:rgba(255,255,255,.08); }
  .mobile-shell-settings .mobile-company-label { color:rgba(255,255,255,.8); font-size:11px; }
  .mobile-shell-settings .company-switch { margin-top:-7px; }
  .mobile-shell-settings .company-switch { display:block; width:100%; max-width:none; min-width:0; padding:0; background:none; }
  .mobile-shell-settings .company-compact { display:block; width:100%; }
  .mobile-shell-settings .company-compact select { min-height:44px; font-size:13px; }
  .mobile-shell-settings .company-logo-button { display:none !important; }
  .mobile-shell-settings .ui-language-control { display:grid; gap:5px; color:rgba(255,255,255,.8); font-size:11px; }
  .mobile-shell-settings .ui-language-control > span { display:block; }
  .mobile-shell-settings .ui-language-control select { width:100%; max-width:none; min-height:44px; padding:7px 10px; font-size:13px; color:var(--text); }
  .mobile-menu:focus-visible, .mobile-shell-settings select:focus-visible, .top-actions button:focus-visible, #retry-local-draft:focus-visible, #download-repaired-draft:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
  .server-status-panel { position:fixed; z-index:27; left:12px; bottom:calc(10px + env(safe-area-inset-bottom)); width:max-content; max-width:calc(100vw - 24px); min-height:36px; padding:7px 11px; gap:10px; border:1px solid var(--border-strong); border-radius:999px; background:rgba(255,255,255,.97); box-shadow:0 8px 28px rgba(10,37,68,.16); backdrop-filter:blur(14px); }
  .server-state, .server-state.is-error { flex:1 1 auto; display:flex; align-items:center; min-width:0; max-width:none; padding:0; color:var(--text); font-size:11px; line-height:1.35; white-space:normal; }
  .server-state > span { min-width:0; overflow-wrap:anywhere; }
  .server-state i, .server-state.is-error i { flex:0 0 8px; width:8px; height:8px; margin:0; }
  .server-status-panel:has(.is-local), .server-status-panel:has(.is-saving), .server-status-panel:has(.is-conflict) { border-color:#e8c996; background:#fffaf0; }
  .server-status-panel:has(.is-error), .server-status-panel:has(.is-offline) { border-color:#e7b1ad; background:#fff6f4; }
  .server-status-panel:has(.is-local), .server-status-panel:has(.is-conflict), .server-status-panel:has(.is-error), .server-status-panel:has(.is-offline), .server-status-panel:has(#retry-local-draft:not([hidden])) { right:12px; width:auto; max-width:none; border-radius:13px; flex-wrap:wrap; }
  .server-status-panel:has(.is-error) .server-state, .server-status-panel:has(.is-offline) .server-state { flex-basis:100%; }
  .save-issue { left: 12px; right: 12px; bottom: calc(125px + env(safe-area-inset-bottom)); width: auto; max-height: 55vh; overflow: auto; }
  #retry-local-draft:not([hidden]) { position:static; flex:0 0 auto; min-height:36px; max-width:42%; white-space:normal; line-height:1.15; }
  #download-repaired-draft:not([hidden]) { position:static; flex:0 0 auto; min-height:36px; max-width:42%; white-space:normal; line-height:1.15; }
  .deployment-badge:not([hidden]) { position:fixed; z-index:16; top:calc(11px + env(safe-area-inset-top)); left:62px; max-width:calc(100vw - 182px); min-height:22px; overflow:hidden; text-overflow:ellipsis; box-shadow:0 3px 12px rgba(70,49,12,.12); }
  .deployment-badge-full { display:none; }
  .deployment-badge-short { display:inline; overflow:hidden; text-overflow:ellipsis; }
  .page { padding-top:10px; padding-bottom:calc(var(--mobile-status-height, 42px) + 32px + env(safe-area-inset-bottom)); }
  .toast { bottom:calc(var(--mobile-status-height, 42px) + 26px + env(safe-area-inset-bottom)); left:12px; right:12px; max-width:none; min-width:0; }
}
@media print { .server-status-panel, .deployment-badge { display:none !important; } }

@media (max-width: 430px) {
  .header-buttons .quiet-btn { display: none; }
  #page-lift-detail > .object-header { flex-direction: column; align-items: stretch; }
  #page-lift-detail > .object-header .header-buttons { width: 100%; flex-wrap: wrap; }
  #page-lift-detail > .object-header .header-buttons .quiet-btn {
    display: inline-flex; align-items: center; justify-content: center; flex: 1 1 100%;
    min-width: 0; height: auto; padding-block: 7px; white-space: normal; text-align: center;
  }
  #page-lift-detail > .object-header .header-buttons .primary-btn:not([hidden]) { flex: 1 1 100%; }
  .title-line { align-items: flex-start; flex-wrap: wrap; }
  .title-line h1 { flex-basis: calc(100% - 50px); }
  .object-header { margin-bottom: 14px; }
  .focus-strip > div, .calc-summary > div { padding: 13px; }
  .timeline-row { grid-template-columns: 38px 1fr; }
  .timeline-row .status { display: none; }
  .page-heading .primary-btn { padding-inline: 10px; }
}

body[data-company-theme="rl"] { --company-accent:#003380; --company-soft:#eaf1ff; --company-strong:#001f57; }
body[data-company-theme="nl"] { --company-accent:#f36b21; --company-soft:#fff0e6; --company-strong:#17324d; }
body[data-company-theme="custom"] { --company-accent:#52657a; --company-soft:#eef2f6; --company-strong:#23384e; }
.main { background:linear-gradient(180deg,var(--company-soft, #f5f8fc) 0, #f5f7fa 190px); }
.active-company-logo { margin-top:8px; height:30px; max-width:145px; padding:4px 7px; background:#fff; border-radius:6px; }
.active-company-logo img { width:100%; height:100%; object-fit:contain; object-position:left center; }
.brand-slot { display:flex; align-items:center; justify-content:center; width:100%; height:100%; min-width:0; min-height:0; overflow:hidden; }
.brand-slot .brand-image { width:100%; height:100%; object-fit:contain; }
.brand-slot .brand-image[hidden], .brand-slot .brand-fallback[hidden] { display:none !important; }
.brand-fallback { display:flex; align-items:center; justify-content:center; width:100%; height:100%; border-radius:5px; background:#e8edf2; color:#34495c; font-weight:700; letter-spacing:.06em; font-size:1rem; }
.brand-slot.settings-company-logo { width:74px; height:32px; flex:none; }
.ui-language-control { display:flex; align-items:center; gap:5px; font-size:.75rem; color:var(--muted, #64748b); }
.ui-language-control select { max-width:100px; padding:5px; border:1px solid #d9e1ea; border-radius:6px; background:#fff; }
.company-switch { gap:6px; }
.company-logo-button { width:112px; height:42px; padding:7px 10px !important; background:#fff !important; border:1px solid #d9e1ea !important; border-radius:10px !important; }
.request-company-logos { display:flex; flex-wrap:wrap; gap:10px; }
.request-company-logo { width:150px; height:54px; padding:9px 14px; border:2px solid var(--border); border-radius:12px; background:#fff; cursor:pointer; }
.request-company-logo img { width:100%; height:100%; object-fit:contain; }
.request-company-logo.is-active { border-color:var(--company-accent); box-shadow:0 0 0 3px color-mix(in srgb, var(--company-accent) 14%, transparent); }
.company-compact { display:none; }
.company-compact select { display:block; width:100%; min-width:0; height:40px; padding:0 25px 0 8px; border:1px solid var(--company-accent, var(--border-strong)); border-radius:7px; background:var(--surface); color:var(--text); font-size:12px; font-weight:600; text-overflow:ellipsis; cursor:pointer; }
@media (max-width:1360px) { .company-switch { flex: 1 1 120px; min-width: 120px; max-width: 180px; } .company-switch .company-logo-button { display:none !important; } .company-compact { display:block; width:100%; min-width:0; } }
@media (min-width:1361px) { .company-switch:has(.company-logo-button:nth-of-type(4)) { flex: 0 1 180px; min-width: 120px; } .company-switch:has(.company-logo-button:nth-of-type(4)) .company-logo-button { display:none !important; } .company-switch:has(.company-logo-button:nth-of-type(4)) .company-compact { display:block; width:100%; min-width:0; } }
.company-logo-button img { width:100%; height:100%; object-fit:contain; }
.company-logo-button.is-active { border-color:var(--company-accent) !important; box-shadow:0 0 0 2px color-mix(in srgb,var(--company-accent) 20%,transparent); }
.primary-btn { background:var(--company-strong, #0c315f); }
#dashboard-metrics { grid-template-columns:repeat(5,1fr); }
.focus-strip > button { border:0; background:transparent; text-align:left; padding:20px 22px; cursor:pointer; color:inherit; }
.focus-strip > button + button { border-left:1px solid var(--border); }
.focus-strip > button.is-active { background:var(--company-soft); box-shadow:inset 0 -3px var(--company-accent); }
.dashboard-range { display:flex; gap:8px; }
.dashboard-range label { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:12px; }
.dashboard-range input { border:1px solid var(--border); border-radius:9px; padding:9px; background:#fff; }
.dashboard-detail { margin-bottom:16px; }
.company-task { position:relative; border-left:4px solid var(--company-color) !important; }
.company-task.rl,.request-object-row.rl,.request-child-row.rl { --company-color:#003380; }
.company-task.nl,.request-object-row.nl,.request-child-row.nl { --company-color:#f36b21; }
.company-task.custom,.request-object-row.custom,.request-child-row.custom { --company-color:#52657a; }
.company-dot,.company-pill { display:inline-flex; align-items:center; justify-content:center; min-width:32px; height:24px; border-radius:7px; color:#fff; background:var(--company-color,var(--company-accent)); font-size:11px; font-weight:800; }
.request-heading-context { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
#request-company-badge { padding:0 8px; }
.timeline-row { width:100%; border:0; border-bottom:1px solid var(--border); background:#fff; text-align:left; cursor:pointer; }
.request-object-row { background:#e9f1fb; box-shadow:inset 4px 0 var(--company-color); }
.request-object-row td { height:44px; padding:5px 10px; }
.request-object-row:hover { background:#dfeafa !important; }
.request-object-number { display:inline-flex; align-items:center; justify-content:center; min-width:48px; height:23px; border-radius:5px; background:#fff; border:1px solid #d3dde7; color:#173b68; font-size:10px; font-weight:800; font-variant-numeric:tabular-nums; }
.request-object-title { display:flex; align-items:center; gap:10px; }
.request-object-title strong { font-size:10px !important; }
.request-group-count { display:block; color:#334d67; font-weight:800; }
.request-group-count > span:first-child { display:inline-block; margin-right:4px; color:var(--company-color); font-size:15px; line-height:1; }
.request-group-won { color:#267751; }
.request-child-row td { height:40px; padding:4px 10px; font-size:10px; }
.request-child-row.is-grouped { background:#f4f8fe; box-shadow:inset 4px 0 var(--company-color,#003380); }
.request-child-row.is-grouped:hover { background:#e9f2fd; }
.request-child-row.is-grouped td { border-bottom-color:#dce7f3; }
.request-child-row.is-grouped td:first-child { position:relative; padding-left:35px; }
.request-child-row.is-grouped td:first-child::before { content:""; position:absolute; left:18px; top:0; bottom:0; border-left:2px solid #a6bdd8; }
.request-child-row.is-grouped td:first-child::after { content:""; position:absolute; left:18px; top:50%; width:11px; border-top:2px solid #a6bdd8; }
.request-child-row.is-grouped.is-last td:first-child::before { bottom:50%; }
.request-child-row.is-grouped.is-last td { border-bottom:6px solid #fff; }
.request-child-row.is-single td:first-child { padding-left:10px; }
.request-child-row.is-single { background:#fbfdff; }
.request-line-title { display:flex; align-items:center; gap:8px; }
.request-line-title > span:last-child { min-width:0; flex:1; }
.request-line-title strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.request-line-title .request-description { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; overflow:hidden; overflow-wrap:anywhere; }
.request-line-title small { display:block; margin-top:2px; }
.request-list-prices { display:grid; gap:3px; min-width:0; }
.request-list-price { display:flex; justify-content:flex-end; align-items:baseline; gap:5px; min-width:0; }
.request-list-price > span { flex:1; min-width:0; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.request-list-price strong { flex:none; white-space:nowrap; }
.request-child-row.is-winner:not(.is-grouped) { background:#f4fbf7; box-shadow:inset 4px 0 #68ad8e; }
.request-public-number { color:#173b68; font-variant-numeric:tabular-nums; letter-spacing:.02em; }
.request-date { font-variant-numeric:tabular-nums; white-space:nowrap; }
#page-requests .page-heading { margin-bottom:12px; }
#page-requests .toolbar { min-height:38px; margin-bottom:8px; }
#page-requests .search-field { height:32px; }
#page-requests .segmented { padding:2px; }
#page-requests .segmented button { min-height:27px; padding:0 9px; }
#page-requests .data-table { table-layout:fixed; }
#page-requests .data-table th:nth-child(1) { width:7%; }
#page-requests .data-table th:nth-child(2) { width:25%; }
#page-requests .data-table th:nth-child(3) { width:14%; }
#page-requests .data-table th:nth-child(4) { width:12%; }
#page-requests .data-table th:nth-child(5) { width:20%; }
#page-requests .data-table th:nth-child(6) { width:10%; }
#page-requests .data-table th:nth-child(7) { width:9%; }
#page-requests .data-table th:nth-child(8) { width:3%; }
#page-requests .data-table th { height:31px; padding:0 10px; font-size:8px; }
#page-requests .data-table td strong { font-size:10px; }
#page-requests .data-table td small { margin-top:1px; font-size:8px; }
#page-requests .status { min-height:19px; padding:0 7px; font-size:8px; }
#page-requests .company-pill { min-width:26px; height:20px; border-radius:5px; padding:0 5px; font-size:9px; white-space:nowrap; }
#page-requests .table-footer { height:38px; }
@media (max-width:760px) {
  #page-requests .data-panel { overflow-x:visible; }
  #page-requests .data-table { display:block; min-width:0; }
  #page-requests .data-table thead { display:none; }
  #page-requests .data-table tbody { display:grid; gap:8px; padding:8px; }
  #page-requests .request-child-row { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"number arrow" "title title" "client status" "price price" "due owner"; gap:5px 9px; min-width:0; padding:10px 12px; border:1px solid var(--border); border-radius:9px; }
  #page-requests .request-child-row td { display:block; height:auto; min-width:0; padding:0; border:0; overflow-wrap:anywhere; }
  #page-requests .request-child-row td:nth-child(1) { grid-area:number; }
  #page-requests .request-child-row td:nth-child(2) { grid-area:title; }
  #page-requests .request-child-row td:nth-child(3) { grid-area:client; }
  #page-requests .request-child-row td:nth-child(4) { grid-area:status; text-align:right; }
  #page-requests .request-child-row td:nth-child(5) { grid-area:price; text-align:left; }
  #page-requests .request-child-row td:nth-child(6) { grid-area:due; }
  #page-requests .request-child-row td:nth-child(7) { grid-area:owner; text-align:right; }
  #page-requests .request-child-row td:nth-child(8) { grid-area:arrow; text-align:right; }
  #page-requests .request-child-row.is-grouped td:first-child { padding-left:0; }
  #page-requests .request-child-row.is-grouped td:first-child::before, #page-requests .request-child-row.is-grouped td:first-child::after { display:none; }
  #page-requests .request-child-row.is-grouped.is-last td { border-bottom:0; }
  #page-requests .request-line-title { align-items:flex-start; min-width:0; }
  #page-requests .request-line-title .company-pill { max-width:90px; overflow:hidden; text-overflow:ellipsis; }
  #page-requests .request-list-price { justify-content:space-between; }
  #page-requests .request-object-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:6px 9px; align-items:center; min-width:0; padding:9px 12px; border-radius:9px; }
  #page-requests .request-object-row td { display:block; height:auto; min-width:0; padding:0; border:0; }
  #page-requests .request-object-row td:nth-child(2) { min-width:0; }
  #page-requests .request-object-row td:nth-child(3) { grid-column:2; }
  #page-requests .request-object-row td:nth-child(4) { grid-column:3; grid-row:1; }
  #page-requests .request-object-title { min-width:0; flex-wrap:wrap; gap:4px 7px; }
  #page-requests .request-object-title > div { min-width:0; }
  #page-requests .request-object-title strong, #page-requests .request-object-title small { overflow-wrap:anywhere; }
}
.request-object-summary { display:flex; justify-content:space-between; gap:20px; align-items:center; padding:4px 0 16px; }
.request-object-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
@media (max-width:600px) { .request-object-summary { align-items:stretch; flex-direction:column; gap:10px; } .request-object-actions { justify-content:flex-start; } .request-object-actions .quiet-btn { min-height:44px; } }
.request-object-summary small { display:block; margin-top:4px; color:var(--muted); }
.request-lift-list { display:grid; gap:8px; }
.request-lift-list button { display:flex; align-items:center; gap:12px; width:100%; border:1px solid var(--border); border-radius:10px; background:#fff; padding:12px; text-align:left; cursor:pointer; }
.request-lift-list button div { flex:1; }
.request-lift-list small { display:block; color:var(--muted); margin-top:3px; }
.page-size,.page-size label { display:flex; align-items:center; gap:8px; }
.page-size select { border:1px solid var(--border); border-radius:7px; padding:6px; }
.settings-configurable { display:contents; }
.settings-company-logo { width:74px; height:32px; object-fit:contain; }
.info-tip[hidden] { display:none !important; }
.settings-columns { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.settings-columns > div { display:flex; flex-direction:column; gap:8px; }
.settings-columns span { padding:8px 10px; background:#f5f7fa; border-radius:8px; }
.inline-lookup { margin-top:6px; border:0; background:transparent; color:var(--company-accent); font-weight:700; cursor:pointer; padding:0; }
.user-card { width:100%; border:0; background:transparent; color:#fff; text-align:left; cursor:pointer; }
@media (max-width: 760px) { #dashboard-metrics { grid-template-columns:repeat(2,1fr); } .focus-strip > button:nth-child(2) { border-right:0; } .focus-strip > button:nth-child(-n+2) { border-bottom:1px solid var(--border); } .company-logo-button { width:84px; } }
@media (max-width: 520px) { .focus-strip > button { padding:13px; } .dashboard-range { display:grid; } .settings-columns { grid-template-columns:1fr; } }

@media print {
  body.print-offer .sidebar, body.print-offer .topbar, body.print-offer .object-header, body.print-offer .lift-tabs, body.print-offer .offer-preview { display: none !important; }
  body.print-offer .app-shell { display: block; }
  body.print-offer .page { display: none !important; }
  body.print-offer #page-lift-detail, body.print-offer #lift-offer { display: block !important; padding: 0; }
  body.print-offer .calc-layout { display: block; }
  body.print-offer .offer-document { border: 0; box-shadow: none; margin: 0; min-height: auto; }
  body.print-summary .sidebar, body.print-summary .topbar, body.print-summary .back-link, body.print-summary .lift-tabs, body.print-summary .header-buttons { display: none !important; }
  body.print-summary .app-shell { display: block; }
  body.print-summary .page { display: none !important; }
  body.print-summary #page-lift-detail, body.print-summary #lift-overview { display: block !important; padding: 0; }
}

/* Unified object sales flow */
.object-sales-panel { margin-bottom:16px; }
.object-customer-requests { display:flex; flex-wrap:wrap; gap:7px; margin:-8px 0 13px; }
.object-customer-requests[hidden] { display:none; }
.object-customer-request { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:2px 12px; min-width:150px; max-width:100%; padding:7px 10px; border:1px solid var(--border); border-radius:9px; background:var(--surface); color:var(--text); text-align:left; }
button.object-customer-request { cursor:pointer; }
button.object-customer-request:hover, button.object-customer-request:focus-visible { border-color:var(--blue); outline:2px solid transparent; }
.object-customer-name { min-width:0; font-size:12px; font-weight:700; overflow-wrap:anywhere; }
.object-customer-meta { grid-column:1; display:flex; align-items:center; flex-wrap:wrap; gap:4px; color:var(--muted); font-size:10px; }
.object-customer-meta .status { padding:2px 6px; font-size:9px; }
.object-customer-request > [aria-hidden] { grid-column:2; grid-row:1 / 3; color:var(--blue); font-size:18px; }
.object-request-cards { display:grid; gap:9px; }
.object-request-card { display:grid; grid-template-columns:minmax(180px,1fr) auto auto; align-items:center; gap:14px; padding:13px 15px; border:1px solid var(--border); border-radius:10px; background:#fff; }
.object-request-card.winner { border-color:#b8ddce; background:#f2faf6; }
.object-request-card strong,.object-request-card small { display:block; }
.object-request-card small { margin-top:4px; color:var(--muted); }
.object-request-card .request-card-actions { display:flex; gap:6px; }
.other-requests summary { padding:9px 2px; color:var(--muted); font-weight:700; cursor:pointer; }
.other-requests[open] summary { margin-bottom:7px; }

/* One calculation for every lift in the object */
#project-calculation-modal .modal { width:min(1180px,calc(100vw - 36px)); max-height:calc(100vh - 36px); overflow:auto; }
.project-calc-summary { display:grid; grid-template-columns:repeat(4,1fr); border-bottom:1px solid var(--border); }
.calc-source-notice { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:14px 18px 0; padding:12px 14px; border:1px solid #9cbddd; border-radius:10px; background:#eff6ff; color:#1b3858; }
.calc-source-notice[hidden] { display:none; }
.calc-source-notice strong { display:block; font-size:14px; }
.calc-source-notice p { margin:5px 0; line-height:1.4; }
.calc-source-notice small { display:block; line-height:1.4; }
.calc-source-notice .primary-btn { flex:none; }
@media (max-width:720px) { .calc-source-notice { align-items:stretch; flex-direction:column; } }
.project-calc-summary > div { padding:13px 18px; border-right:1px solid var(--border); }
.project-calc-summary > div:last-child { border-right:0; }
.project-calc-summary span,.project-calc-summary strong { display:block; }
.project-calc-summary span { color:var(--muted); font-size:10px; }
.project-calc-summary strong { margin-top:4px; font-size:17px; }
.project-calculation-modal > .project-calc-scroll,.project-calculation-modal > section { margin-inline:18px; }
.project-calculation-modal > section { padding-block:14px; }
.project-calc-scroll { overflow:auto; margin-top:14px; border:1px solid var(--border); border-radius:10px; }
.project-calc-table { width:100%; min-width:0; }
.project-calc-head,.project-calc-row,.project-calc-section { display:grid; width:100%; min-width:calc(220px + var(--calc-columns) * 150px); grid-template-columns:minmax(220px,1fr) repeat(var(--calc-columns),minmax(150px,1fr)); align-items:center; }
.project-calc-head { position:sticky; top:0; z-index:2; background:#eef3f8; border-bottom:1px solid var(--border); }
.project-calc-head > span,.project-calc-row > * { min-width:0; padding:8px 10px; border-right:1px solid var(--border); }
.project-calc-head > span:last-child,.project-calc-row > *:last-child { border-right:0; }
.project-calc-lift small { display:block; margin-top:2px; color:var(--muted); font-weight:400; }
.project-calc-row { border-bottom:1px solid var(--border); background:#fff; }
.project-calc-row > span { color:var(--muted); font-size:11px; }
.project-calc-row input { width:100%; height:32px; border:1px solid #d8e0e8; border-radius:6px; padding:0 8px; }
.project-calc-row input[type="number"] { appearance:textfield; -moz-appearance:textfield; }
.project-calc-row input[type="number"]::-webkit-inner-spin-button,.project-calc-row input[type="number"]::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.project-calc-row.result { background:#f7f9fc; }
.project-calc-row.result strong { text-align:right; }
.project-calc-section { padding:8px 10px; background:#e9eef4; color:#20364d; border-bottom:1px solid var(--border); }
.project-calc-section strong:not(:first-child) { text-align:right; }
.calc-check { display:flex; align-items:center; gap:7px; font-size:11px; }
.project-client-prices { display:grid; gap:8px; }
.client-price-row { display:grid; grid-template-columns:minmax(150px,1fr) 150px 180px 110px 120px; gap:9px; align-items:center; padding:10px 0; border-bottom:1px solid var(--border); }
.client-price-row small { display:block; color:var(--muted); margin-top:3px; }
.client-price-row select,.client-price-row input { width:100%; height:34px; border:1px solid var(--border); border-radius:7px; background:#fff; padding:0 8px; }
.client-price-inputs { display:flex; gap:5px; }
.show-discount { display:flex; align-items:center; gap:5px; font-size:10px; color:var(--muted); }
.version-comparison { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:10px 0; }
.version-comparison > div { padding:12px; border-radius:9px; background:#f4f7fa; }
.version-comparison span,.version-comparison small { display:block; color:var(--muted); }
.project-version-button { width:100%; border:0; border-bottom:1px solid var(--border); background:transparent; text-align:left; cursor:pointer; }

/* Compact equipment list and request-owned variants */
.lift-detail-grid { display:block; overflow-x:auto; border:1px solid var(--border); border-radius:9px; background:#fff; }
.lift-table-head,.lift-table-row { display:grid; grid-template-columns:minmax(170px,2fr) 90px 105px 130px 130px 125px 110px; min-width:860px; gap:10px; align-items:center; width:100%; text-align:left; }
.lift-table-head { padding:9px 13px; background:#eef3f8; color:#617083; text-transform:uppercase; letter-spacing:.05em; font-size:9px; font-weight:700; }
.lift-table-row { padding:10px 13px; border:0; border-top:1px solid var(--border); background:#fff; color:var(--text); font-size:10px; cursor:pointer; }
.lift-table-row:hover { background:#f4f8fc; }
.lift-table-row small { display:block; margin-top:3px; color:var(--muted); }
#lift-form { width:min(520px,100%); }
#lift-form .modal-head { align-items:center; }
#lift-form .modal-head > div { display:flex; align-items:center; gap:8px; min-width:0; }
#lift-form .form-grid { gap:10px 12px; padding-block:15px; }
#lift-form .form-grid label > span { margin-bottom:4px; font-size:11px; }
#lift-form .form-grid input,#lift-form .form-grid select { min-height:40px; font-size:13px; }
#lift-form .modal-actions button { min-height:40px; }
@media (max-width:600px) {
  #object-lift-grid { overflow:visible; border:0; background:transparent; }
  #object-lift-grid .lift-table-head { display:none; }
  #object-lift-grid .lift-table-row { min-width:0; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 12px; margin-bottom:9px; padding:12px; border:1px solid var(--border); border-radius:10px; box-shadow:0 2px 8px rgba(18,42,70,.04); }
  #object-lift-grid .lift-table-row > span { min-width:0; overflow-wrap:anywhere; font-size:11px; line-height:1.35; }
  #object-lift-grid .lift-table-row > span:first-child { grid-column:1 / -1; font-size:13px; }
  #object-lift-grid .lift-table-row > span::before { content:attr(data-label); display:block; margin-bottom:3px; color:var(--muted); font-size:9px; font-weight:700; letter-spacing:.02em; }
  #lift-modal { padding:8px; align-items:center; }
  #lift-form { max-height:calc(100dvh - 16px); }
  #lift-form .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px 10px; padding:12px 14px; }
  #lift-form .modal-head { padding:12px 14px; }
  #lift-form .modal-actions { position:sticky; bottom:0; z-index:1; padding:10px 14px; background:var(--surface); }
  #lift-form .modal-actions button { min-width:0; flex:1; white-space:normal; }
}
.object-request-card { display:block; padding:11px 13px; container-type:inline-size; }
.request-card-heading,.request-variant-row,.variant-price-top { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.request-card-heading { padding-bottom:8px; }
.request-card-main { display:flex; align-items:center; gap:9px; min-width:0; }
.request-card-main > div { min-width:0; overflow-wrap:anywhere; }
.request-card-main strong { font-size:14px; }
.request-detail-preview { position:relative; margin:0 0 8px; min-width:0; color:var(--muted); font-size:12px; }
.request-detail-preview summary { display:flex; align-items:flex-start; gap:5px; width:fit-content; max-width:100%; cursor:pointer; list-style:none; }
.request-detail-preview summary::-webkit-details-marker { display:none; }
.request-detail-preview summary:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
.request-detail-excerpt { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; white-space:pre-wrap; overflow-wrap:anywhere; }
.request-detail-cue { flex:none; font-size:15px; line-height:1; }
.request-detail-full { position:absolute; z-index:5; left:0; top:100%; box-sizing:border-box; width:min(100%, 520px); max-height:min(50vh, 360px); overflow:auto; padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:#fff; box-shadow:0 8px 22px #12243b24; color:var(--text); white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.5; }
.request-description { max-width:72ch; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.5; }
.request-variant-list { border-top:1px solid var(--border); }
.request-variant-row { min-height:43px; box-sizing:border-box; padding:7px 9px; border-bottom:1px solid #edf1f5; font-size:10px; flex-wrap:wrap; }
.request-variant-row:last-child { border-bottom:0; padding-bottom:0; }
.request-variant-row > div:first-child { flex:1; min-width:0; overflow-wrap:anywhere; }
.request-variant-row small { white-space:normal; }
.request-variant-row .variant-missing-files { flex:0 0 100%; order:4; display:block; margin:0; padding:7px 9px; border-left:2px solid #d79250; border-radius:3px; background:#fff8ed; color:#9b481f; font-weight:600; line-height:1.4; }
.request-variant-row > strong { white-space:nowrap; font-size:11px; }
.request-variant-row > div:nth-of-type(2) { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px; min-width:0; }
@container (max-width:720px) {
  .request-variant-row > div:first-child { flex-basis:calc(100% - 110px); }
  .request-variant-row > div:nth-of-type(2) { flex:0 1 100%; }
}
@media(max-width:430px) {
  .request-variant-row > div:nth-of-type(2) { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; gap:6px; }
  .request-variant-row > div:nth-of-type(2) .mini-action { min-width:0; min-height:44px; padding:7px 5px; font-size:10px; line-height:1.2; white-space:normal; overflow-wrap:anywhere; }
  .request-variant-row > div:nth-of-type(2) .mini-action:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
}
.request-offer-panel { margin-top:13px; }
.request-offer-panel > .panel-head { gap:12px; flex-wrap:wrap; }
.request-offer-panel .header-buttons { gap:7px; flex-wrap:wrap; }
.offer-document-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px 16px; padding:18px; border-bottom:1px solid var(--border); background:#fbfdff; }
.offer-document-fields > label,.offer-extra-terms label { display:grid; align-content:start; gap:5px; min-width:0; color:var(--muted); font-size:11px; font-weight:600; }
.offer-document-fields input,.offer-document-fields select,.offer-document-fields textarea { width:100%; min-width:0; padding:8px 10px; border:1px solid var(--border-strong); border-radius:6px; background:#fff; color:var(--text); font:inherit; font-size:12px; font-weight:400; }
.offer-document-fields textarea { resize:vertical; }
.offer-document-fields input[readonly] { background:#f0f4f8; color:#43576d; border-color:#dfe6ed; cursor:default; }
.offer-vat-field { display:grid; gap:5px; min-width:0; }
.offer-document-fields .offer-vat-choice { display:flex; align-items:center; gap:7px; color:var(--text); font-size:11px; font-weight:700; }
.offer-document-fields .offer-vat-choice input { width:16px; height:16px; margin:0; flex:none; }
.offer-vat-field > label:last-child { display:grid; gap:4px; color:var(--muted); font-size:11px; font-weight:600; }
.offer-vat-field input:disabled { background:#f0f4f8; color:var(--muted); }
.offer-content-options { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:10px 22px; margin:0; padding:9px 12px 11px; border:1px solid var(--border); border-radius:6px; background:#fff; }
.offer-content-options legend { padding:0 4px; color:var(--text); font-size:11px; font-weight:700; }
.offer-content-options label { display:inline-flex; align-items:center; gap:7px; color:var(--text); font-size:11px; cursor:pointer; }
.offer-content-options input[type="checkbox"] { flex:none; width:15px; height:15px; margin:0; padding:0; accent-color:var(--blue); }
.offer-document-fields [aria-invalid="true"] { border-color:#bd4b2f; box-shadow:0 0 0 1px #bd4b2f; }
.offer-field-error { color:#a3361c; font-size:10px; font-weight:500; }
.offer-field-error[hidden] { display:none; }
.offer-extra-terms { grid-column:1 / -1; padding-top:3px; }
.offer-extra-terms > summary { color:var(--blue); font-size:11px; font-weight:600; cursor:pointer; }
.offer-extra-terms > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding-top:12px; }
.offer-extra-terms .offer-works-text { grid-column:1 / -1; }
.offer-generation-status { margin:14px 18px 0; padding:11px 13px; border:1px solid #aacac0; border-radius:7px; background:#f1faf6; color:#215c48; font-size:12px; line-height:1.5; }
.offer-generation-status a { margin-left:4px; color:inherit; font-weight:700; }
.offer-generation-status.is-error { border-color:#e8bdad; background:#fff5ee; color:#923817; }
.offer-generation-status[hidden] { display:none; }
.offer-calculation-status { margin:14px 18px 0; padding:11px 13px; border:1px solid #e8bdad; border-radius:7px; background:#fff5ee; color:#923817; display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:13px; }
.offer-calculation-status button { flex:none; min-height:40px; padding:8px 12px; }
.request-offer-panel .header-buttons button:disabled { opacity:.45; cursor:not-allowed; }
@media (max-width:600px) { .offer-calculation-status { align-items:flex-start; flex-direction:column; } }
.request-offer-body { display:grid; grid-template-columns:minmax(0,1fr) 230px; gap:18px; padding:15px; }
.request-offer-document { border:1px solid var(--border); border-radius:8px; padding:20px; background:#fff; }
.request-offer-document > span { color:var(--blue); font-size:10px; font-weight:800; letter-spacing:.08em; }
.request-offer-document h3 { margin:11px 0 3px; font-size:16px; }
.request-offer-document p { margin:0 0 17px; color:var(--muted); }
.offer-client-requisites { display:flex; flex-wrap:wrap; gap:4px 14px; margin:-8px 0 17px; color:var(--muted); font-size:10px; }
.offer-client-requisites b { color:var(--text); font-weight:700; }
.request-offer-document table { width:100%; border-collapse:collapse; font-size:10px; }
.request-offer-document th,.request-offer-document td { padding:9px 7px; border-bottom:1px solid var(--border); text-align:left; }
.request-offer-document td:last-child,.request-offer-document th:last-child { text-align:right; white-space:nowrap; }
.request-offer-document tfoot th { font-size:12px; border-top:2px solid #b8c8d9; }
.request-offer-settings { display:grid; align-content:start; gap:11px; }
.request-offer-settings label { display:grid; gap:4px; color:var(--muted); font-size:10px; font-weight:700; }
.request-offer-settings select,.request-offer-settings input { width:100%; height:33px; border:1px solid var(--border-strong); border-radius:6px; padding:0 8px; background:#fff; }
.offer-version-stack { display:grid; gap:6px; padding-top:9px; border-top:1px solid var(--border); font-size:10px; }
.offer-version-stack small { color:var(--muted); }
.offer-version-doc-actions { display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; }
.offer-generated-files { display:grid; gap:8px; padding-top:11px; border-top:1px solid var(--border); font-size:10px; }
.offer-generated-files > small { color:var(--muted); }
.offer-generated-file { display:grid; grid-template-columns:38px minmax(0,1fr) 12px; align-items:center; gap:7px; padding:8px 0; color:var(--text); text-decoration:none; border-bottom:1px solid var(--border); }
.offer-generated-file > span:first-child { padding:6px 2px; border-radius:5px; background:#eaf2fb; color:#235987; font-size:9px; font-weight:800; text-align:center; }
.offer-generated-file strong { display:block; overflow-wrap:anywhere; font-size:10px; }
.offer-generated-file small { display:block; margin-top:4px; color:var(--muted); }
.offer-generated-file:hover strong { text-decoration:underline; }
.offer-generated-file i { color:var(--blue); font-style:normal; }
@media(max-width:850px) { .offer-document-fields { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:540px) { .offer-document-fields,.offer-extra-terms > div { grid-template-columns:1fr; }.request-offer-panel .header-buttons { width:100%; }.request-offer-panel .header-buttons button { flex:1 1 auto; } }
.offer-template-box { display:grid; gap:8px; padding-top:11px; border-top:1px solid var(--border); font-size:10px; }
.offer-template-box small { color:var(--muted); line-height:1.4; }
.offer-template-box a { overflow-wrap:anywhere; }

/* Calculation: scope, details and section subtotals */
.calc-context-bar { display:flex; align-items:end; flex-wrap:wrap; gap:9px; padding:12px 18px; border-bottom:1px solid var(--border); background:#f7f9fc; }
.calc-context-bar label { display:grid; gap:4px; min-width:180px; color:#506176; font-size:9px; font-weight:700; }
.calc-context-bar select { height:34px; border:1px solid var(--border-strong); border-radius:6px; padding:0 8px; background:#fff; }
.calc-context-bar button { height:34px; }
.project-variant-specs { padding:0 18px; }
.variant-name-field { display:flex; align-items:center; gap:10px; padding:10px 0 0; color:var(--muted); font-size:9px; font-weight:700; }
.variant-name-field input { width:min(300px,100%); height:31px; border:1px solid var(--border-strong); border-radius:6px; padding:0 8px; font-size:10px; }
.variant-base-note,.variant-spec-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 0; font-size:10px; }
.variant-base-note span,.variant-spec-heading small { color:var(--muted); }
.variant-spec-heading small { display:block; margin-top:3px; }
.variant-spec-list { display:grid; gap:5px; padding-bottom:10px; }
.variant-spec-actions { display:flex; justify-content:flex-end; padding:0 0 10px; }
.variant-spec-row { display:grid; grid-template-columns:30px minmax(120px,1.5fr) repeat(5,minmax(72px,1fr)) 26px; align-items:end; gap:7px; padding:7px 8px; border:1px solid var(--border); border-radius:7px; background:#f9fbfd; }
.variant-spec-row > b { align-self:center; }
.variant-spec-row label { display:grid; gap:3px; color:var(--muted); font-size:8px; }
.variant-spec-row input,.variant-spec-row select { min-width:0; width:100%; height:29px; padding:3px 5px; border:1px solid var(--border-strong); border-radius:5px; background:#fff; font-size:10px; }
.project-calc-summary { background:#f6f9fd; }
.project-calc-summary > div { padding:10px 18px; }
.project-calc-summary strong { font-size:15px; }
.project-calc-scroll { max-height:44vh; }
.project-calc-head { top:0; }
.project-calc-row > span { color:#33485d; }
.project-calc-row input { height:29px; }
.project-calc-row input[readonly] { background:#f0f4f8; color:#43576d; cursor:default; }
.offer-installation-plan-note { margin:0; padding:9px 11px; border-radius:8px; background:#eef5fc; color:#24456b; font-size:.84rem; line-height:1.4; }
.project-calc-row.subtotal { background:#eaf2fa; font-weight:700; }
.project-calc-row.subtotal strong { text-align:right; color:#153b6a; }
.project-calc-section { background:#dfeaf6; }
.project-calc-section strong { font-size:10px; }
.calc-live-label { margin-left:auto; align-self:center; color:#287454; font-size:10px; font-weight:700; }
.calc-readonly { padding:8px 10px; color:#465d76; background:#f7f9fc; font-size:10px; text-align:right; }
.calc-price-cell,.calc-rate-cell { display:grid; gap:2px; min-width:0; padding:4px 5px; }
.calc-price-cell input,.calc-rate-cell input { padding-inline:5px; text-align:right; }
.calc-price-cell button { border:0; padding:0; background:none; color:#315f94; font-size:8px; text-align:left; cursor:pointer; }
.calc-rate-cell small { color:#587087; font-size:8px; text-align:right; }
.calc-dual-cell { min-width:0; padding:4px 5px; }
.calc-dual-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; }
.calc-dual-fields label { display:flex; align-items:center; min-width:0; border:1px solid #d8e0e8; border-radius:6px; background:#fff; }
.calc-dual-fields label.is-active { border-color:#315f94; box-shadow:0 0 0 1px #315f94; }
.calc-dual-fields label > span { flex:none; width:18px; color:#506176; font-size:10px; text-align:center; }
.calc-dual-fields input { width:100%; min-width:0; height:26px; padding:0 3px 0 0; border:0; background:transparent; text-align:right; }
.calc-dual-fields input:focus { outline:0; }
.calc-dual-fields label:focus-within { outline:2px solid #315f94; outline-offset:1px; }
.calc-dual-cell > small { display:block; margin-top:2px; color:#506176; font-size:9px; text-align:right; }
.calc-other-row { align-items:stretch; }
.calc-other-label { display:grid; grid-template-columns:minmax(80px,1fr) 120px 22px; gap:4px; align-items:center; padding:4px; min-width:0; }
.calc-other-label input,.calc-other-label select,.calc-other-value input { width:100%; min-width:0; min-height:29px; border:1px solid var(--border-strong); border-radius:5px; padding:3px 5px; background:#fff; font-size:10px; }
.calc-other-label button { border:0; background:none; color:#9f4c4c; cursor:pointer; font-size:16px; }
.calc-other-value { display:flex; align-items:center; gap:3px; min-width:0; padding:4px; }
.calc-other-value input { text-align:right; }
.calc-other-value strong { font-size:9px; white-space:nowrap; color:#315f94; }
.calc-other-add { min-height:35px; }
.calc-other-add button { justify-self:start; margin:4px; }
/* Calculation density and hierarchy */
#project-calculation-modal .modal { width:min(1040px,calc(100vw - 24px)); }
.project-calculation-modal .modal-head { padding-block:12px; }
.project-calculation-modal .modal-head h2 { font-size:17px; }
.project-calculation-modal .modal-head p { margin-top:3px; font-size:12px; }
.calc-context-bar { gap:8px 14px; padding:8px 16px; }
.project-calculation-modal .calc-context-bar { position:sticky; top:0; z-index:8; align-items:center; }
.calc-version-controls { display:flex; flex:1 1 470px; align-items:end; justify-content:flex-end; gap:8px; min-width:0; }
.calc-version-controls > label { flex:1 1 180px; max-width:330px; }
.calc-version-controls input { width:100%; min-width:0; height:32px; padding:0 9px; border:1px solid var(--border-strong); border-radius:7px; background:#fff; font:inherit; }
.calc-version-controls > button { flex:none; }
.calc-version-feedback { flex-basis:100%; min-height:15px; }
.calc-version-feedback p { margin:0; }
.calc-versions-menu { position:relative; flex:none; }
.calc-versions-menu > summary { display:flex; align-items:center; min-height:31px; padding:0 10px; border:1px solid var(--border-strong); border-radius:7px; background:#fff; color:var(--blue); cursor:pointer; font-size:12px; font-weight:700; list-style:none; white-space:nowrap; }
.calc-versions-menu > summary::-webkit-details-marker { display:none; }
.calc-versions-menu > summary::after { content:'⌄'; margin-left:8px; }
.calc-versions-menu[open] > summary::after { content:'⌃'; }
.calc-versions-popover { position:absolute; top:calc(100% + 7px); right:0; width:min(760px,calc(100vw - 55px)); max-height:min(68vh,680px); overflow:auto; border:1px solid var(--border-strong); border-radius:10px; background:#fff; box-shadow:0 14px 36px #1c334d38; padding:10px; }
.calc-versions-popover .version-list { border-top:0; }
.calc-versions-popover .project-version-button { padding:9px 5px; }
.calc-context-bar label,.calc-client-context { min-width:0; display:grid; gap:3px; font-size:12px; color:#42526a; }
.calc-client-context { min-width:160px; }
.calc-client-context strong { color:#20364d; font-size:13px; }
.calc-context-bar select { min-width:155px; height:31px; font-size:12px; }
.calc-context-bar button { height:31px; }
.calc-variant-field { display:grid; gap:3px; min-width:0; color:#42526a; font-size:12px; }
.calc-variant-buttons { display:flex; flex-wrap:wrap; gap:4px; }
.calc-variant-buttons button { min-height:31px; height:auto; padding:5px 10px; border:1px solid var(--border-strong); border-radius:6px; background:#fff; color:var(--blue); font-size:12px; font-weight:700; line-height:1.2; }
.calc-variant-buttons button.is-active { background:#eaf2fb; border-color:var(--blue); color:#163f6b; }
.calc-variant-buttons button:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
@media(max-width:600px) { .calc-variant-field { grid-column:1/-1; } .calc-variant-buttons button { min-height:44px; } }
.variant-base-note { justify-content:flex-start; gap:12px; padding:6px 0; font-size:12px; }
.project-calc-summary > div { padding:8px 12px; }
.project-calc-summary span { font-size:11px; }
.project-calc-summary strong { font-size:14px; }
.project-calc-scroll { max-height:52vh; margin-top:8px; }
.project-calc-head,.project-calc-row,.project-calc-section { min-width:calc(180px + var(--calc-columns) * 180px); grid-template-columns:minmax(180px,1.3fr) repeat(var(--calc-columns),minmax(180px,1fr)); }
.project-calc-head > span,.project-calc-row > * { padding:5px 8px; }
.project-calc-lift b { font-size:12px; }
.project-calc-lift small { font-size:11px; line-height:1.3; }
.project-calc-row > span,.project-calc-row strong,.project-calc-section strong { font-size:12px; }
.project-calc-section { padding:6px 8px; background:#e6edf5; }
.project-calc-section .calc-check { justify-self:end; }
.calc-check { font-size:11px; }
.calc-check input { width:14px; height:14px; margin:0; accent-color:#315f94; }
.project-calc-row input { height:28px; font-size:12px; }
@media (max-width:600px) {
  .project-calc-row .calc-dual-fields label { min-height:44px; }
  .project-calc-row .calc-dual-fields input { box-sizing:border-box; height:44px; font-size:16px; }
  .project-calc-row .calc-dual-fields label > span { width:22px; font-size:12px; }
}
.project-calc-row.subtotal { border-bottom:2px solid #c5d8ed; }
.project-calculation-modal > section { padding-block:10px; }
#execution-budget-panel .panel-head h2,#project-work-items .panel-head h2,.project-client-prices .panel-head h2 { font-size:15px; }
.budget-purpose { margin:2px 0 8px; max-width:760px; color:#42526a; font-size:12px; line-height:1.4; }
.budget-status { margin:0 0 8px; font-size:12px; }
.budget-fix-fields { display:grid; grid-template-columns:minmax(150px,190px) minmax(190px,1fr) auto; align-items:end; gap:8px; }
.budget-fix-fields label { display:grid; gap:4px; color:#42526a; font-size:12px; }
.budget-fix-fields input,.budget-fix-fields select { width:100%; height:32px; border:1px solid var(--border-strong); border-radius:6px; padding:0 8px; background:#fff; font:inherit; }
.budget-fix-fields button { min-height:32px; }
@media(max-width:650px) { .project-calc-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } .budget-fix-fields { grid-template-columns:1fr; } }
@media (max-width:430px) {
  #project-calculation-modal { padding:6px; }
  #project-calculation-modal .modal { width:100%; max-height:calc(100dvh - 12px); }
  .project-calculation-modal .calc-context-bar { position:static; }
  .project-calculation-modal .modal-head { align-items:center; min-height:52px; padding:5px 12px; }
  .project-calculation-modal .modal-head p { display:none; }
  .project-calculation-modal .modal-head .icon-btn { flex:none; width:44px; height:44px; }
  .project-calculation-modal .calc-context-bar { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,2fr); gap:7px 9px; padding:8px 12px; }
  .project-calculation-modal .calc-client-context,.project-calculation-modal .calc-context-bar label { min-width:0; overflow-wrap:anywhere; font-size:11px; }
  .project-calculation-modal .calc-client-context strong { font-size:12px; }
  .project-calculation-modal .calc-context-bar select { width:100%; min-width:0; height:44px; font-size:16px; }
  .project-calculation-modal .calc-version-controls { grid-column:1/-1; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px; width:100%; }
  .project-calculation-modal .calc-version-controls > label { grid-column:1/-1; max-width:none; }
  .project-calculation-modal .calc-version-controls input { height:42px; font-size:16px; }
  .project-calculation-modal .calc-version-controls > button,.project-calculation-modal .calc-versions-menu > summary { min-height:42px; height:auto; }
  .project-calculation-modal .calc-version-feedback { grid-column:1/-1; }
  .project-calculation-modal .calc-versions-popover { right:0; width:min(90vw,520px); }
  .project-calculation-modal .calc-context-bar > button { grid-column:1/-1; width:100%; min-height:44px; height:auto; padding:7px 10px; white-space:normal; line-height:1.25; }
}
.project-client-prices .panel-head { padding:0 0 8px; }
.variant-price-editor { border:1px solid var(--border); border-radius:10px; padding:10px 13px; background:linear-gradient(180deg,#f8fbff,#fff 70%); }
.variant-price-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.variant-price-top strong { min-width:0; font-size:13px; }
.variant-price-top strong span { color:var(--muted); font-weight:500; }
.variant-price-top small { display:block; margin-top:3px; color:var(--muted); }
.variant-price-top select,.variant-discount select,.variant-discount input { height:33px; border:1px solid var(--border-strong); border-radius:6px; padding:0 8px; background:#fff; }
.variant-manual-prices { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:6px 16px; padding:9px 0 4px; }
.variant-manual-prices label { display:grid; grid-template-columns:minmax(0,1fr) 100px 12px; align-items:center; gap:6px; font-size:11px; }
.variant-manual-prices label span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.variant-manual-prices input { width:100%; height:31px; border:1px solid var(--border-strong); border-radius:6px; padding:0 7px; }
.variant-discount { display:flex; gap:8px; padding:9px 0 4px; }
.variant-price-total { display:flex; justify-content:space-between; align-items:center; margin-top:8px; padding-top:7px; border-top:1px solid var(--border); font-size:11px; }
.variant-price-total strong { font-size:14px; color:#173e69; }
.project-version-status { margin:0 0 8px; color:var(--muted); font-size:12px; }
.project-version-status[data-dirty="true"] { color:#a94820; font-weight:600; }
.variant-finish-prices { border-top:1px solid var(--border); margin-top:9px; padding:10px 0; }
.variant-finish-prices > strong { display:block; font-size:11px; }
.variant-finish-prices > small { display:block; color:var(--muted); margin:3px 0 9px; }
.variant-finish-prices > div { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:8px; }
.variant-finish-prices label { display:flex; align-items:center; gap:6px; font-size:10px; }
.variant-finish-prices input { width:100px; height:31px; border:1px solid var(--border-strong); border-radius:6px; padding:0 7px; }
.variant-finish-prices.option-cost-editor > .option-cost-row { display:block; padding:10px 0; border-top:1px solid var(--border); }
.variant-finish-prices.option-cost-editor > summary { cursor:pointer; font-size:11px; font-weight:700; color:var(--blue); }
.variant-finish-prices.option-cost-editor > summary span { display:inline-block; margin-left:4px; padding:1px 6px; border-radius:20px; background:#e8f0f9; }
.option-cost-title { display:flex; flex-wrap:wrap; align-items:baseline; gap:8px; font-size:11px; }
.option-cost-title small { color:var(--muted); font-weight:400; }
.option-cost-fields { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:8px; }
.variant-finish-prices .option-cost-fields label { display:grid; align-content:start; gap:4px; min-width:0; }
.option-cost-fields label > div { display:flex; align-items:center; gap:5px; }
.option-cost-fields label > div small { color:var(--muted); }
.variant-finish-prices .option-cost-fields input { width:100%; min-width:0; }
.option-cost-total { display:grid; align-content:start; gap:7px; font-size:10px; }
.option-cost-total strong { font-size:13px; }
@media(max-width:760px) { .option-cost-fields { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.offer-finishes { margin-top:16px; }
.offer-finishes h4 { margin:0 0 7px; font-size:12px; }
.offer-finishes table { width:100%; border-collapse:collapse; font-size:10px; }
.offer-finishes th,.offer-finishes td { padding:7px 8px; border-bottom:1px solid var(--border); text-align:left; vertical-align:top; }
.offer-finishes td b { display:inline-block; margin-top:4px; }
.offer-finishes td small { display:block; margin-top:3px; color:var(--muted); }
.request-variant-row.is-selected { background:#eaf3ff; box-shadow:inset 3px 0 #2868b5; }
.request-variant-row.is-won { background:#eff9f4; box-shadow:inset 3px 0 #3c9164; }
.request-variant-row .winner-action.is-ready { color:#fff; background:#278255; border-color:#278255; }
.request-variant-row .winner-action.is-pending { color:#7d5a10; background:#fff3cd; border-color:#e9d386; opacity:1; cursor:not-allowed; }
.lift-sets-panel .panel-head { align-items:center; }
.lift-set-tabs { display:flex; align-items:center; gap:5px; overflow-x:auto; padding:9px 14px; border-bottom:1px solid var(--border); }
.lift-set-tabs button { flex:none; border:1px solid var(--border); border-radius:6px; padding:6px 9px; background:#f6f9fc; color:var(--text); font-size:10px; font-weight:700; cursor:pointer; }
.lift-set-tabs button.is-active { border-color:#386baa; background:#eaf2fc; color:#163e72; }
.lift-set-tabs small { display:inline-block; margin-left:5px; color:var(--muted); }
.lift-set-toolbar { display:flex; align-items:end; justify-content:space-between; flex-wrap:wrap; gap:8px; padding:9px 14px; background:#fbfcfe; border-bottom:1px solid var(--border); }
.lift-set-toolbar > div:first-child { display:flex; align-items:center; gap:8px; min-width:180px; }
.lift-set-name-wrap #lift-set-name { width:180px; font-weight:700; }
.lift-set-name-wrap #lift-set-name:disabled { background:#f1f5fa; color:#3d5065; }
#lift-set-name-status,.lift-set-save-state { color:#2b7754; font-size:10px; }
.lift-set-toolbar > div:first-child > strong { font-size:11px; }
.lift-set-toolbar > div:first-child > small { grid-column:1 / -1; }
.lift-set-toolbar > div:first-child > .mini-action { height:28px; white-space:nowrap; }
.lift-set-toolbar small { color:var(--muted); font-size:9px; }
.lift-set-toolbar label { display:grid; gap:3px; font-size:9px; color:var(--muted); }
.lift-set-toolbar input { height:28px; width:160px; border:1px solid var(--border-strong); border-radius:5px; padding:0 7px; color:var(--text); font-size:10px; }
.lift-set-toolbar-actions { display:flex; align-items:end; flex-wrap:wrap; gap:5px; }
.lift-set-toolbar-actions input,.lift-set-toolbar-actions select { width:58px; height:28px; border:1px solid var(--border-strong); border-radius:5px; padding:0 5px; background:#fff; color:var(--text); font-size:10px; }
.lift-set-toolbar-actions button { height:28px; padding:0 8px; font-size:9px; }
.lift-set-row { border-bottom:1px solid var(--border); }
.lift-shared-choice { display:inline-flex; align-items:center; width:max-content; max-width:100%; gap:4px; margin:0; padding:3px 5px; border:1px solid #c8d9ee; border-radius:5px; background:#f4f8fe; color:#31537a; font-size:9px; font-weight:600; cursor:pointer; white-space:nowrap; }
.lift-shared-choice input { width:13px; height:13px; margin:0; accent-color:#315d91; }
.lift-archive-check:disabled { opacity:.35; cursor:not-allowed; }
.lift-set-row:last-child { border-bottom:0; }
.lift-set-row summary { display:grid; grid-template-columns:18px 35px minmax(0,1fr) max-content 12px; align-items:center; gap:10px; min-height:57px; padding:7px 15px; cursor:pointer; list-style:none; }
.lift-set-row summary input[type=file][hidden] { display:none; }
.lift-import-aoi { white-space:nowrap; }
.source-parameter-card { margin:7px 0; border:1px solid var(--border); border-radius:7px; background:#fff; overflow:hidden; }
.source-parameter-card > summary { display:flex; align-items:center; gap:10px; padding:10px; cursor:pointer; list-style:none; }
.source-parameter-card > summary > span:nth-child(2) { flex:1; min-width:0; }
.source-parameter-card > summary strong,.source-parameter-card > summary small { display:block; overflow-wrap:anywhere; }
.source-parameter-card > summary small { color:var(--muted); }
.source-parameter-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 15px; padding:8px 12px; background:#f8fbff; }
.source-parameter-list > div { display:flex; justify-content:space-between; gap:8px; padding:5px 0; border-bottom:1px solid var(--border); font-size:10px; }
.source-parameter-list b { text-align:right; overflow-wrap:anywhere; }
.source-raw-text { margin:8px 12px; font-size:10px; }
.source-raw-text pre { max-height:300px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; }
.source-revision-changes { display:grid; gap:5px; margin:8px 12px; padding:9px; border:1px solid #ebd4a9; border-radius:6px; background:#fffaf0; font-size:10px; }
.source-revision-changes s { color:#9b5c1b; }
.register-panel { margin-top:15px; }
.register-table { width:100%; }
.register-header,.register-row { display:grid; grid-template-columns:100px minmax(0,1fr) 145px 110px; align-items:center; gap:10px; padding:11px 16px; }
.register-header { background:#f4f8fc; color:var(--muted); font-size:10px; font-weight:700; }
.register-row { width:100%; border:0; border-top:1px solid var(--border); background:#fff; text-align:left; cursor:pointer; color:var(--text); font-size:11px; }
.register-row:hover { background:#f7faff; }
.register-row small { display:block; margin-top:3px; color:var(--muted); }
.register-row strong { text-align:right; }
.register-create { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:12px 16px; }
.register-create b { width:100%; font-size:11px; }
.service-register-list { display:grid; }
.service-register-row { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto; align-items:center; gap:10px; min-height:48px; padding:9px 14px; border-top:1px solid var(--border); color:var(--text); font-size:12px; text-decoration:none; }
.service-register-row:hover,.service-register-row:focus-visible { background:#f7faff; }
.service-register-row > * { min-width:0; overflow-wrap:anywhere; }
.service-register-row .service-register-name { font-weight:700; }
.service-register-status { color:var(--muted); }
.service-register-source { display:inline-flex; margin:10px 14px; text-decoration:none; }
.register-loading,.register-error { margin:10px 14px; font-size:12px; }
.register-error { color:#a43c36; }
@media(max-width:650px) { .service-register-row { grid-template-columns:minmax(0,1fr) auto; gap:4px 8px; } .service-register-row .service-register-name { grid-column:1/-1; } .service-register-row .service-register-status { grid-column:1; } }
.contract-delivery-control input[hidden],.contract-delivery-overrides input[hidden] { display:none; }
.contract-delivery-control select,.contract-delivery-control input { width:100%; }
.contract-delivery-overrides { display:grid; gap:7px; padding:12px 16px; border-top:1px solid var(--border); }
.contract-delivery-overrides > b { font-size:11px; }
.contract-delivery-overrides > small { color:var(--muted); }
.contract-delivery-row { display:grid; grid-template-columns:45px minmax(0,1fr) minmax(0,1fr); align-items:center; gap:8px; }
.contract-delivery-row select,.contract-delivery-row input { width:100%; min-width:0; height:32px; border:1px solid var(--border-strong); border-radius:5px; padding:0 7px; }
.contract-template-source { display:grid; gap:8px; margin-bottom:12px; padding:10px; border:1px solid #cdd9e7; border-radius:7px; background:#f5f9fd; }
.contract-template-source .quiet-btn { justify-self:start; }
.contract-template-source small { color:#53677d; line-height:1.45; }
.contract-template-source label { display:flex; align-items:flex-start; gap:7px; font-size:11px; }
@media(max-width:650px) { .register-header,.register-row { grid-template-columns:75px minmax(0,1fr) 85px; }.register-header span:last-child,.register-row strong { display:none; } }
.lift-set-row summary:not(:has(.lift-archive-check)) { grid-template-columns:35px minmax(0,1fr) max-content 12px; }
.lift-archive-check { width:15px; height:15px; margin:0; cursor:pointer; }
.archive-selected-lifts:disabled { opacity:.45; cursor:not-allowed; }
.lift-set-row summary .open-set-lift { white-space:nowrap; }
.lift-set-summary-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; min-width:0; gap:5px; }
.lift-set-summary-actions .mini-action { white-space:nowrap; }
.lift-set-summary-actions [data-unit-import].is-dragover,.lift-set-summary-actions [data-group-import].is-dragover,.lift-unit-row [data-unit-import].is-dragover { outline:2px solid var(--blue); outline-offset:2px; background:#edf5ff; }
.pdf-button-upload-list { display:block; flex:1 0 100%; min-width:0; max-width:100%; }
.pdf-button-upload-list[hidden] { display:none; }
.pdf-button-upload-list [data-upload-list] { display:grid; gap:3px; min-width:0; }
.pdf-button-upload-list .pdf-upload-job { max-width:100%; min-width:0; }
.lift-set-row summary::-webkit-details-marker { display:none; }
.lift-set-row summary:hover { background:var(--surface-soft); }
.lift-set-row[open] summary { background:#f6f9fc; }
.lift-set-identity strong,.lift-set-identity small { display:block; }
.lift-set-identity strong { font-size:11px; }
.lift-set-identity small { margin-top:3px; color:var(--muted); font-size:9px; }
.lift-set-finish-count { color:var(--muted); font-size:9px; }
.lift-set-editor { padding:10px 15px 12px 60px; background:#fcfdff; border-top:1px solid var(--border); }
.lift-set-fields { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:7px; }
.lift-set-fields > label { min-width:0; }
.lift-set-fields > label[hidden] { display:none; }
.lift-set-row .lift-code { width:auto; min-width:32px; max-width:64px; height:auto; min-height:32px; padding:2px 5px; line-height:1.15; text-align:center; overflow-wrap:anywhere; }
.lift-set-row summary { grid-template-columns:18px minmax(32px,max-content) minmax(0,1fr) minmax(0,auto) 12px; }
.lift-set-row summary:not(:has(.lift-archive-check)) { grid-template-columns:minmax(32px,max-content) minmax(0,1fr) minmax(0,auto) 12px; }
.lift-set-identity { min-width:0; }
.lift-set-editor label { display:grid; gap:3px; min-width:0; color:var(--muted); font-size:9px; }
.lift-set-editor label input,.lift-set-editor label select { min-width:0; width:100%; height:29px; border:1px solid var(--border-strong); border-radius:5px; padding:0 7px; background:white; color:var(--text); font-size:10px; }
.lift-set-address { grid-column:span 2; }
.lift-set-editor [data-custom-capacity][hidden] { display:none; }
.lift-finish-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:10px; }
.lift-finish-grid > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; border:1px solid var(--border); border-radius:7px; padding:8px; background:white; }
.lift-finish-grid strong { grid-column:1/-1; font-size:10px; }
.lift-set-row-actions { display:flex; gap:6px; justify-content:flex-end; margin-top:9px; }
.lift-set-row-actions button { height:30px; padding:0 9px; font-size:9px; }
.lift-type-heading,.lift-unit-section h4 { margin:2px 0 9px; font-size:11px; }
.lift-unit-section { margin-top:14px; padding-top:12px; border-top:1px solid var(--border); }
.lift-unit-row { display:grid; grid-template-columns:48px minmax(120px,1fr) minmax(160px,1.5fr) minmax(125px,1fr); align-items:end; gap:8px; padding:9px 0; border-top:1px solid var(--border); }
.lift-unit-row.has-document-upload { grid-template-columns:48px minmax(110px,1fr) minmax(145px,1.3fr) minmax(120px,1fr) auto; }
.lift-unit-row > b { align-self:center; color:var(--blue); font-size:12px; }
.lift-unit-row .lift-unit-serial { align-self:center; font-size:10px; color:var(--muted); }
.lift-unit-row .lift-file-check-row { grid-column:2/5; margin:0; }
.lift-unit-row > button { grid-column:5; grid-row:1; align-self:center; white-space:nowrap; }
.lift-unit-row > .pdf-button-upload-list { grid-column:2/-1; grid-row:auto; display:block; width:100%; max-width:none; min-width:0; }
.lift-unit-row > .pdf-button-upload-list[hidden] { display:none; }
.lift-unit-row > .pdf-button-upload-list [data-upload-list] { display:grid; gap:5px; }
.lift-unit-row > .pdf-button-upload-list .pdf-upload-job { width:100%; }
.lift-order-status { align-self:center; max-width:190px; color:var(--muted); font-size:10px; overflow-wrap:anywhere; }
.lift-order-status a { color:var(--blue); }
.xnor-serial-assignment { padding:12px 16px; border-top:1px solid var(--border); background:#fffaf0; }
.xnor-serial-assignment summary { cursor:pointer; font-weight:700; color:#7d4b13; }
.xnor-serial-assignment p { margin:8px 0; color:var(--muted); font-size:11px; }
.xnor-serial-assignment label { display:flex; align-items:center; gap:10px; margin:6px 0; font-size:11px; }
.xnor-serial-assignment label span { min-width:115px; font-weight:700; }
.xnor-serial-assignment select { max-width:400px; width:100%; min-width:0; }
.lift-detail-units { margin:0 16px 14px; padding:12px; border:1px solid var(--border); border-radius:8px; background:#f8fbff; }
.lift-detail-units h3 { margin:0 0 10px; font-size:12px; }
.lift-detail-unit { display:grid; grid-template-columns:50px minmax(120px,1fr) minmax(160px,1.5fr) 140px; align-items:end; gap:8px; padding:8px 0; border-top:1px solid var(--border); }
.lift-detail-unit label { display:grid; gap:4px; font-size:10px; color:var(--muted); }
.lift-detail-unit input { width:100%; min-width:0; height:31px; border:1px solid var(--border-strong); border-radius:6px; padding:3px 7px; }
.lift-detail-unit small { align-self:center; color:var(--muted); }
.pdf-unit-picker { display:grid; gap:3px; color:var(--muted); font-size:10px; }
.pdf-unit-picker select { min-width:100px; max-width:170px; height:30px; border:1px solid var(--border-strong); border-radius:5px; background:#fff; }
@media(max-width:900px) { .lift-unit-row,.lift-unit-row.has-document-upload { grid-template-columns:42px repeat(2,minmax(0,1fr)); }.lift-unit-row .lift-unit-serial { grid-column:2/4; }.lift-unit-row .lift-file-check-row { grid-column:2/4; }.lift-unit-row > button,.lift-unit-row > .pdf-button-upload-list { grid-column:2/4; grid-row:auto; justify-self:start; }.lift-detail-unit { grid-template-columns:45px repeat(2,minmax(0,1fr)); }.lift-detail-unit small { grid-column:2/4; } }
@media(max-width:540px) { .lift-unit-row,.lift-unit-row.has-document-upload { grid-template-columns:38px minmax(0,1fr); }.lift-unit-row > label,.lift-unit-row .lift-unit-serial,.lift-unit-row .lift-file-check-row,.lift-unit-row > button,.lift-unit-row > .pdf-button-upload-list { grid-column:2; }.lift-detail-unit { grid-template-columns:35px minmax(0,1fr); }.lift-detail-unit > label,.lift-detail-unit small { grid-column:2; } }
.archive-set-btn { color:#9d4848; }
.lift-configuration { margin-top:12px; }
.lift-config-fields,.lift-option-fields { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; padding:12px 16px; }
.lift-config-group { display:grid; align-content:start; gap:9px; min-width:0; padding:10px; border:1px solid var(--border); border-radius:8px; background:#fbfdff; }
.lift-config-group h4 { margin:0 0 2px; font-size:11px; color:var(--text); }
.lift-config-fields label,.lift-option-fields label { display:grid; gap:4px; min-width:0; color:var(--muted); font-size:10px; }
.lift-config-fields input,.lift-config-fields select,.lift-option-fields input,.lift-option-fields select { width:100%; min-width:0; height:31px; border:1px solid var(--border-strong); border-radius:6px; padding:3px 7px; background:#fff; font-size:11px; }
.lift-config-fields input[type="number"] { appearance:textfield; -moz-appearance:textfield; }
.lift-config-fields input[type="number"]::-webkit-inner-spin-button,.lift-config-fields input[type="number"]::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.lift-spec-source { display:block; min-width:0; overflow-wrap:anywhere; color:#365d75; line-height:1.35; }
.lift-spec-source.is-warning { color:#9a5a18; }
.motala-specification-panel { margin:8px 16px 12px; padding:11px 13px; border:1px solid var(--border); border-radius:8px; background:#f7fafd; font-size:11px; }
.motala-specification-panel h4 { margin:0 0 5px; font-size:12px; }
.motala-specification-panel p { margin:3px 0; overflow-wrap:anywhere; }
.motala-project-warning { color:#9a4d18; font-weight:700; }
.motala-specification-panel details { margin-top:8px; }
.motala-specification-panel summary { cursor:pointer; font-weight:700; }
.motala-specification-panel dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 12px; margin:9px 0 0; }
.motala-specification-panel dl div { display:flex; justify-content:space-between; gap:12px; border-bottom:1px solid var(--border); padding-bottom:4px; }
.motala-specification-panel dt { color:var(--muted); }
.motala-specification-panel dd { margin:0; font-weight:700; text-align:right; overflow-wrap:anywhere; }
@media(max-width:520px) { .motala-specification-panel { margin:8px 10px 12px; }.motala-specification-panel dl { grid-template-columns:1fr; } }
.lift-source-manual { margin-top:3px; font-size:10px; }
.lift-config-actions { display:flex; align-items:center; gap:12px; padding:0 16px 13px; }
.lift-config-actions small { color:var(--muted); }
.lift-options-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 16px; border-top:1px solid var(--border); background:#f8fafc; }
.lift-options-heading h3 { margin:0; font-size:12px; }.lift-options-heading p { margin:3px 0 0; color:var(--muted); font-size:10px; }
.lift-option-total { display:grid; align-content:end; gap:4px; min-width:0; color:var(--muted); font-size:10px; }
.lift-option-total strong { min-height:31px; display:flex; align-items:center; color:var(--text); font-size:12px; }
.lift-option-note { margin:0; padding:5px 16px 10px; color:var(--muted); font-size:10px; }
.lift-spec-to-option { justify-self:start; margin-top:3px; }
/* Lift detail: compact headings and controls keep specification usable at a glance. */
#page-lift-detail { padding-top: 18px; }
#page-lift-detail > .object-header { margin-bottom: 10px; gap: 10px; }
#page-lift-detail .title-line { gap: 8px; }
#page-lift-detail .title-line h1 { font-size: 18px; line-height: 1.2; }
#page-lift-detail .lift-code.large { width: 32px; height: 32px; font-size: 11px; }
#page-lift-detail .object-header p { margin-top: 3px; font-size: 10px; }
#page-lift-detail .lift-tabs { margin-bottom: 11px; }
#page-lift-detail .lift-tabs button { min-height: 34px; }
#lift-overview .lift-flow button[hidden] { display: none; }
#lift-overview .lift-flow:has(button[hidden]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#page-lift-detail .panel-head { min-height: 44px; padding: 9px 12px; }
#page-lift-detail .panel-head h2 { font-size: 13px; line-height: 1.3; }
#page-lift-detail .panel-head p { margin-top: 2px; font-size: 10px; }
#lift-parameters .tech-grid { gap: 10px; }
#lift-parameters .source-panel .panel-head { flex-wrap: wrap; align-items: center; gap: 6px 10px; }
#lift-parameters .source-panel .panel-head h2 { min-width: 0; }
#lift-parameters .source-panel .panel-head #import-pdf { display: inline-flex; align-items: center; width: auto; min-height: 32px; padding: 4px 8px; border: 1px solid var(--border-strong); border-radius: 6px; font-size: 11px; }
#lift-parameters .source-panel > #source-documents summary { padding: 8px 10px; }
#page-lift-detail .lift-save-action:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; }
#page-lift-detail .lift-save-action[hidden], #installation-lift-board[hidden] { display: none !important; }
@media (max-width: 600px) {
  #page-lift-detail { padding-top: 14px; }
  #page-lift-detail .title-line h1 { font-size: 15px; }
  #page-lift-detail .lift-code.large { width: 30px; height: 30px; }
  #page-lift-detail .panel-head { padding: 8px 10px; }
  #page-lift-detail .panel-head h2 { font-size: 12px; }
  #page-lift-detail .header-buttons .lift-save-action:not([hidden]) { grid-column: 1 / -1; }
}
.lift-option-item { border-top:1px solid var(--border); }.lift-option-fields { padding-bottom:5px; }
.lift-option-foot { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:0 16px 10px; color:var(--muted); font-size:10px; }
.lift-option-foot b { color:var(--text); }.archived-options { padding:10px 16px; border-top:1px solid var(--border); font-size:10px; }
.archived-options .lift-option-item { margin-top:8px; border:1px solid var(--border); border-radius:7px; background:#f1f3f6; }
.archived-options .lift-option-item input,.archived-options .lift-option-item select { background:#e9edf2; color:#647487; }
.archived-options button { color:var(--blue); cursor:pointer; }
#project-add-variant,[data-variant-remove] { display:none !important; }
@media(max-width:760px) { .lift-set-fields,.lift-config-fields,.lift-option-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }.lift-finish-grid { grid-template-columns:1fr; }.lift-set-editor { padding-left:14px; }.lift-set-row summary { grid-template-columns:18px 35px minmax(0,1fr) max-content 12px; gap:6px; }.lift-set-row summary:not(:has(.lift-archive-check)) { grid-template-columns:35px minmax(0,1fr) max-content 12px; } }
@media(max-width:520px) { .lift-config-fields { grid-template-columns:1fr; } }
@media(max-width:520px) {
  .lift-config-fields,.lift-option-fields { grid-template-columns:1fr; padding:10px 12px; }
  .lift-config-group { gap:7px; padding:9px; }
  .lift-config-fields input,.lift-config-fields select,.lift-option-fields input,.lift-option-fields select { min-height:40px; }
  .lift-options-heading,.lift-option-foot { flex-wrap:wrap; padding-inline:12px; }
  .lift-config-actions { padding-inline:12px; }
  .lift-config-actions button,.lift-options-heading button,.lift-option-foot button { min-height:40px; }
}

/* Survey: shaft diagram and one row per landing */
.measurement-modal { width:min(1050px,calc(100vw - 34px)); }
.measurement-body { padding:14px 18px; }
.measurement-body h3 { margin:0 0 8px; font-size:12px; }
.measurement-top { display:flex; gap:10px; max-width:540px; margin-bottom:10px; }
.measurement-top label,.measurement-metrics label { display:grid; gap:4px; flex:1; color:var(--muted); font-size:9px; font-weight:700; }
.measurement-top input,.measurement-top select,.measurement-metrics input,.measurement-metrics select,.landing-table input,.landing-table select,.measurement-note textarea { width:100%; border:1px solid var(--border-strong); border-radius:6px; padding:6px 8px; background:#fff; font-size:10px; }
.measurement-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin-bottom:12px; padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:#f5f8fc; }
.measurement-metrics input[readonly] { background:#e8f0f9; color:#173b68; font-weight:800; }
.measurement-layout { display:block; }
.shaft-panel { width:min(100%,760px); margin-inline:auto; border:1px solid var(--border); border-radius:8px; padding:12px; }
.shaft-panel > small { display:block; margin-top:8px; color:var(--muted); }
.shaft-diagram { display:grid; grid-template-columns:50px 1fr 50px; grid-template-rows:32px 105px 32px; align-items:center; text-align:center; border:1px solid #aabed3; border-radius:7px; background:#f2f7fd; }
.shaft-diagram > strong { grid-column:2; grid-row:2; display:grid; place-items:center; height:100%; background:#d8e6f5; border:1px solid #9eb7d1; color:#174573; font-size:10px; }
.shaft-wall { color:#586e85; font-size:8px; }
.shaft-wall.north { grid-column:2; }.shaft-wall.west { grid-column:1; grid-row:2; }.shaft-wall.east { grid-column:3; grid-row:2; }.shaft-wall.south { grid-column:2; grid-row:3; }
.landing-section { margin-top:13px; border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.landing-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px 12px; background:#f5f8fc; }
.landing-heading h3 { margin:0; }.landing-heading p { margin:3px 0 0; color:var(--muted); font-size:9px; }
.landing-table-wrap { max-height:260px; overflow:auto; }
.landing-table { width:100%; min-width:760px; border-collapse:collapse; font-size:10px; }
.landing-table th,.landing-table td { padding:6px 7px; border-bottom:1px solid var(--border); text-align:left; }
.landing-table thead { position:sticky; top:0; background:#e8f0f9; z-index:1; }
.landing-table th:first-child { width:55px; }
.measurement-note { display:grid; gap:5px; margin-top:12px; color:var(--muted); font-size:9px; }
.form-segmented { display:flex; gap:5px; padding:0; background:transparent; }
.form-segmented label { position:relative; flex:1; cursor:pointer; }
.form-segmented input[type="radio"] { position:absolute; opacity:0; width:1px; height:1px; }
.form-segmented label span { display:grid; place-items:center; height:35px; margin:0; border:1px solid var(--border-strong); border-radius:6px; background:#fff; color:var(--text); font-size:11px; }
.form-segmented input:checked + span { border-color:var(--blue); background:#eaf3ff; color:var(--blue); }
.form-segmented input:focus-visible + span { outline:2px solid var(--blue); outline-offset:2px; }

@media(max-width:760px) { .request-card-heading,.request-variant-row { align-items:flex-start; flex-wrap:wrap; }.request-offer-body { grid-template-columns:1fr; }.variant-spec-row { grid-template-columns:repeat(2,minmax(0,1fr)); }.measurement-top { flex-wrap:wrap; }.measurement-top label { min-width:120px; } }
.shaft-sketch { display:grid; gap:10px; }
.shaft-sketch label { display:grid; gap:4px; color:var(--muted); font-size:10px; font-weight:700; }
.shaft-sketch input,.shaft-sketch select,.measurement-end-row input { width:100%; min-width:0; min-height:38px; border:1px solid var(--border-strong); border-radius:6px; padding:7px 9px; background:#fff; font-size:14px; }
.sketch-center { display:grid; grid-template-columns:94px 1fr; gap:10px; align-items:center; }
.sketch-box { min-height:145px; position:relative; display:grid; place-items:center; border:8px solid #9eb7d1; background:#eaf3fc; color:#174573; }
.sketch-box strong { font-size:13px; }
.sketch-opening,.sketch-second { position:absolute; z-index:1; display:grid; gap:2px; min-width:180px; padding:4px 7px; border:1px solid #9eb7d1; border-radius:4px; background:#fff; text-align:center; line-height:1.2; box-shadow:0 1px 3px #173b681a; }
.sketch-opening b,.sketch-second b { font-size:10px; }
.sketch-opening small,.sketch-second small { font-size:9px; font-weight:700; color:#426184; }
.sketch-opening { bottom:-10px; left:50%; transform:translateX(-50%); }
.sketch-second { top:-10px; left:50%; transform:translateX(-50%); }
.sketch-second[data-side="left"] { top:50%; left:-10px; right:auto; min-width:145px; transform:translateY(-50%); }
.sketch-second[data-side="right"] { top:50%; right:-10px; left:auto; min-width:145px; transform:translateY(-50%); }
.sketch-openings { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
#second-door-fields { grid-template-columns:repeat(4,minmax(0,1fr)); }
.landing-table { min-width:750px; font-size:12px; }
.landing-table:has([data-landing^="second"]) { min-width:1050px; }
.landing-dims { display:grid; grid-template-columns:repeat(4,minmax(58px,1fr)); gap:4px; }
.landing-dims input { min-width:0; min-height:38px; font-size:12px; }
.landing-ears { display:flex; gap:4px; }
.landing-ears input { width:65px; min-width:0; min-height:38px; font-size:13px; }
.landing-table input[type="text"],.landing-table input:not([type]) { min-height:38px; font-size:13px; }
.landing-check { display:inline-flex; gap:6px; align-items:center; min-height:38px; cursor:pointer; }
.landing-check input { width:20px; height:20px; accent-color:var(--blue); }
.measurement-boundary,.measurement-end-row { background:#eef5fc; }
.measurement-end-row { display:flex; align-items:center; gap:12px; padding:8px 12px; }
.measurement-end-row input { max-width:170px; }
.archived-lifts { padding:10px 12px; border-top:1px solid var(--border); }
.archived-lifts > div { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:7px 0; }
.saved-calc-detail { margin-top:10px; padding:10px; border:1px solid var(--border); border-radius:8px; }
.saved-calc-detail > strong { display:block; margin-bottom:8px; }
.saved-calc-detail details { border-top:1px solid var(--border); padding:7px 0; }
.saved-calc-detail details > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px 14px; padding:8px; }
.saved-calc-detail details > div > div { display:flex; justify-content:space-between; gap:8px; }
.saved-calc-detail span { color:var(--muted); }
.archive-calc-preview { overflow:hidden; }
.archive-calc-preview header { display:grid; gap:3px; margin-bottom:8px; }
.archive-calc-preview header small { color:var(--muted); }
.archive-restore-action { display:block; max-width:100%; min-height:42px; margin-top:12px; white-space:normal; text-align:center; }
.archive-calc-status { margin:0 0 10px; padding:8px 10px; border-radius:6px; background:#eef5fc; color:#24456b; font-size:12px; }
.archive-calc-preview .project-calc-summary { grid-template-columns:repeat(3,minmax(0,1fr)); margin-bottom:10px; }
.archive-calc-scroll { max-height:52vh; overflow:auto; border:1px solid var(--border); border-radius:8px; }
.archive-calc-table .project-calc-row > strong { text-align:right; font-weight:600; }
.archive-calc-table .project-calc-row > span b,.archive-calc-table .project-calc-row > span small { display:block; }
.archive-calc-table .project-calc-row > span small { margin-top:3px; color:var(--muted); }
.archive-calc-reason,.archive-calc-unavailable { margin:10px 0; font-size:12px; }
@media(max-width:650px) { .archive-calc-preview .project-calc-summary { grid-template-columns:1fr; } .version-comparison { grid-template-columns:1fr; } .archive-restore-action { width:100%; } }
.settings-tabs { display:flex; gap:6px; overflow-x:auto; margin:12px 0 16px; padding-bottom:3px; }
.settings-tabs button { flex:none; min-height:36px; padding:7px 13px; border:1px solid var(--border-strong); border-radius:8px; background:white; color:var(--muted); cursor:pointer; }
.settings-tabs button.is-active { border-color:var(--blue); color:var(--blue); background:#edf5ff; font-weight:700; }
#page-settings .settings-grid section.panel[hidden] { display:none; }
#page-settings .settings-grid .panel-head p { display:none; }
#settings-profile-company { min-height:34px; border:1px solid var(--border-strong); border-radius:7px; background:white; padding:5px 8px; }
.companies-panel { grid-column:1 / -1; }
.company-settings-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,390px),1fr)); gap:14px; padding:16px; }
.company-settings-card { min-width:0; border:1px solid var(--border); border-radius:10px; background:#fff; overflow:hidden; }
.company-settings-card[open] { border-color:var(--border-strong); box-shadow:0 4px 16px rgba(21,48,83,.07); }
.company-settings-card > summary { display:flex; align-items:center; gap:14px; min-height:76px; padding:14px; cursor:pointer; list-style:none; }
.company-settings-card > summary::-webkit-details-marker { display:none; }
.company-settings-card > summary > span:nth-child(2) { display:grid; gap:4px; min-width:0; flex:1; }
.company-settings-card > summary strong { font-size:14px; }
.company-settings-card > summary small { color:var(--muted); overflow-wrap:anywhere; }
.company-card-chevron { color:var(--muted); font-size:19px; transition:transform .15s; }
.company-settings-card[open] .company-card-chevron { transform:rotate(180deg); }
.company-card-body { border-top:1px solid var(--border); }
.company-details-form { padding:14px 16px 16px; }
.company-details-form h3 { margin:0; padding:2px 0 9px; border-bottom:1px solid var(--border); font-size:13px; }
.company-details-form h3:not(:first-child) { margin-top:8px; }
.company-details-form input { min-width:0; }
.company-modules { min-width:0; margin:4px 0 0; padding:0; border:0; }
.company-modules legend { margin-bottom:8px; font-size:12px; font-weight:700; }
.company-modules-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 12px; }
.company-modules-grid label { display:flex; align-items:center; gap:8px; min-width:0; min-height:34px; font-size:12px; }
.company-modules-grid label span { min-height:0; margin:0; }
.company-modules-grid input { width:16px; height:16px; flex:none; }
@media(max-width:600px) {
  .company-settings-list { padding:10px; gap:10px; }
  .company-settings-card > summary { min-height:60px; padding:10px 12px; gap:10px; }
  .company-details-form { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 8px; padding:12px; }
  .company-details-form h3, .company-details-form label.full,
  .company-details-form label:has(input[type=file]) { grid-column:1 / -1; }
  .company-details-form label { min-width:0; }
  .company-details-form label span { min-height:2.6em; margin-bottom:4px; font-size:11px; line-height:1.3; }
  .company-details-form label.full span,
  .company-details-form label:has(input[type=file]) span { min-height:0; }
  .company-details-form input:not([type=file]):not([type=color]) { min-height:44px; padding:10px; font-size:16px; }
  .company-details-form input[type=file] { min-height:44px; max-width:100%; font-size:12px; }
  .company-details-form input[type=color] { min-height:44px; padding:3px; }
  .company-details-form .company-modules-grid label span { min-height:0; margin:0; font-size:12px; }
  .company-details-form .company-modules-grid input[type=checkbox] { width:16px; height:16px; min-height:16px; padding:0; }
  .company-details-form .primary-btn { width:100%; min-height:44px; }
}
.settings-history { padding:10px 0; }
.settings-history > div { display:flex; justify-content:space-between; gap:8px; padding:8px 0; border-top:1px solid var(--border); font-size:11px; }
.settings-history span { color:var(--muted); }
#page-settings .settings-row:has(> button.mini-action) { grid-template-columns:38px minmax(0,1fr) auto auto; }
#page-settings .settings-row:has(> .settings-company-logo):has(> button.mini-action) { grid-template-columns:86px minmax(0,1fr) auto; }
.classifier-item { display:flex; align-items:center; gap:5px; min-height:38px; padding:4px; border:1px solid var(--border); border-radius:7px; background:#fff; }
.classifier-item > span { flex:1; min-width:0; padding:5px; background:transparent; }
.classifier-item[draggable="true"] { cursor:grab; }
.sales-settings-panel { grid-column:1 / -1; }
.sales-settings-body { padding:14px 18px 18px; }
.sales-setting-intro { display:flex; gap:8px 16px; align-items:baseline; flex-wrap:wrap; padding-bottom:12px; color:var(--muted); font-size:12px; }
.sales-setting-intro strong { color:var(--text); }
.sales-setting-rows,.classifier-rows { border:1px solid var(--border); border-radius:9px; overflow:hidden; }
.sales-setting-row,.classifier-row { display:grid; align-items:center; gap:12px; min-height:57px; padding:9px 12px; border-bottom:1px solid var(--border); }
.sales-setting-row:last-child,.classifier-row:last-child { border-bottom:0; }
.sales-setting-row { grid-template-columns:32px minmax(0,1fr) 110px auto; }
.sales-setting-marker { display:grid; place-items:center; width:30px; height:30px; border-radius:7px; background:#edf4fc; color:var(--blue); }
.sales-setting-count,.classifier-usage { color:var(--muted); font-size:11px; white-space:nowrap; }
.classifiers-layout { display:grid; gap:16px; padding:16px 18px 18px; }
.classifier-group { min-width:0; }
.classifier-group-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:9px; }
.classifier-group-head h3 { margin:0; font-size:14px; }
.classifier-group-head > div > span:not(.info-tip) { color:var(--muted); font-size:11px; }
.classifier-row { grid-template-columns:30px minmax(0,1fr) 110px auto; }
.classifier-position { color:var(--muted); text-align:center; font-size:11px; }
.classifier-name { min-width:0; overflow-wrap:anywhere; }
.classifier-name strong { display:block; font-size:12px; }
.classifier-name small { display:block; margin-top:3px; color:var(--muted); }
.classifier-actions { display:flex; align-items:center; gap:5px; }
.classifier-actions .mini-action:disabled { opacity:.35; cursor:not-allowed; }
@media(max-width:650px) { .sales-setting-row,.classifier-row { grid-template-columns:30px minmax(0,1fr) auto; } .sales-setting-count,.classifier-usage { display:none; } .classifier-actions { grid-column:2 / -1; justify-self:end; } }
.schedule-steps { padding:10px 18px; }
.schedule-steps-head,.schedule-step-row { display:grid; grid-template-columns:minmax(0,1fr) 90px 30px; gap:7px; align-items:center; margin-bottom:7px; }
.schedule-steps-head { color:var(--muted); font-size:10px; }
.schedule-step-row input { min-width:0; min-height:36px; padding:7px 9px; border:1px solid var(--border-strong); border-radius:6px; }
.schedule-step-foot { display:flex; justify-content:space-between; align-items:center; }
#schedule-step-total { color:#ae422d; font-weight:700; }
#schedule-step-total.is-valid { color:#24794f; }
.offer-custom-schedule { display:grid; gap:6px; margin-top:8px; }
.offer-schedule-row { display:grid; grid-template-columns:minmax(0,1fr) 65px 28px; gap:5px; }
.offer-schedule-row input { min-width:0; padding:6px; border:1px solid var(--border-strong); border-radius:5px; }
.offer-schedule-actions { display:flex; justify-content:space-between; align-items:center; }
.offer-payment-schedule { margin-top:12px; }
.offer-payment-schedule h4 { margin:0 0 6px; }
.template-group { padding:10px 12px; border-bottom:1px solid var(--border); }
.template-group:last-child { border-bottom:0; }
.documents-settings-panel { grid-column:1 / -1; }
#page-settings:has(.documents-settings-panel:not([hidden])) { max-width:none; }
.template-group h3 { margin:0 0 5px; font-size:13px; display:flex; align-items:center; gap:8px; }
.template-group h3 span { color:var(--muted); font-weight:500; }
.template-group > small { color:var(--muted); }
#template-list .settings-row { grid-template-columns:38px minmax(0,1fr); align-items:start; }
#template-list .settings-row > div { min-width:0; }
#template-list .template-record { display:grid; grid-template-columns:minmax(220px,1.5fr) minmax(180px,.9fr) minmax(260px,1.5fr); align-items:center; gap:18px; width:100%; }
#template-list .settings-row small { overflow-wrap:anywhere; }
#template-list .template-status { color:#8a571b; }
#template-list .template-review-note { color:#a43d31; }
.template-actions { display:flex; flex-wrap:wrap; gap:6px; }
.template-actions .mini-action { text-decoration:none; }
#template-list .template-actions button.mini-action { display:inline-flex; width:auto; min-height:28px; padding:5px 9px; border:1px solid var(--border-strong); border-radius:6px; text-align:center; }
.template-empty { padding:12px 50px; color:var(--muted); display:flex; align-items:center; gap:12px; }
.template-empty,.template-empty .mini-action { white-space:nowrap; }
.template-modal-note { margin:0; color:var(--muted); font-size:11px; line-height:1.45; }
#template-act-purpose-field[hidden] { display:none; }
.object-act-upload { display:grid; grid-template-columns:minmax(140px,190px) minmax(180px,1fr) auto; gap:8px 10px; align-items:end; padding:12px; margin-bottom:12px; border:1px solid var(--border); border-radius:10px; background:#fff; }
.object-act-upload strong { grid-column:1 / -1; font-size:12px; }
.object-act-upload label { display:grid; gap:6px; min-width:0; color:#46596d; font-size:12px; font-weight:700; }
.object-act-upload select { width:100%; min-width:0; min-height:44px; border:1px solid var(--border-strong); border-radius:8px; padding:8px 10px; background:#fff; color:var(--text); font-size:13px; }
.object-file-picker-control { position:relative; display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:9px; min-width:0; min-height:44px; padding:4px; border:1px solid #afc2d5; border-radius:8px; background:#f7faff; cursor:pointer; }
.object-file-picker-control:focus-within { outline:2px solid var(--blue); outline-offset:2px; }
.object-file-pick-button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:8px 12px; border:1px solid #c2d3e5; border-radius:6px; background:#fff; color:#173b68; font-size:12px; font-weight:700; white-space:nowrap; }
.object-file-picker-control output { min-width:0; overflow-wrap:anywhere; color:#43566d; font-size:11px; font-weight:500; line-height:1.35; }
.object-act-upload .object-file-picker-control input[type=file] { position:absolute; inset:0; width:100%; height:100%; min-height:0; padding:0; opacity:0; cursor:pointer; }
.object-act-upload .mini-action { min-height:44px; padding:8px 13px; white-space:normal; }
.object-act-upload .mini-action:disabled { border-color:#d7e1eb; background:#edf2f7; color:#687b8d; cursor:not-allowed; }
.object-act-upload.is-uploading .object-file-picker-control { opacity:.64; cursor:wait; }
.object-act-upload.has-file .object-file-picker-control { border-color:#7ba997; background:#f3fbf6; }
.object-act-upload.has-file .object-file-picker-control output { color:#1d614c; font-weight:700; }
.object-act-upload.has-file .object-file-picker-control output::before { content:'✓ '; }
.object-upload-feedback,.object-upload-error { grid-column:1/-1; margin:0; padding:8px 10px; border-radius:7px; font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.object-upload-feedback { background:#edf5fc; color:#244c70; }
.object-upload-error { border:1px solid #edc2bf; background:#fff1ef; color:#9b3029; }
.object-upload-feedback[hidden],.object-upload-error[hidden] { display:none; }
.object-file-tools { display:grid; grid-template-columns:minmax(0,1fr) minmax(138px,190px) auto; align-items:center; gap:8px; min-width:0; margin:0 0 12px; }
.object-file-tools label { display:block; min-width:0; }
.object-file-search { display:grid; grid-template-columns:minmax(0,1fr) 44px; align-items:center; gap:6px; min-width:0; }
.object-file-search-clear { width:44px; min-height:44px; padding:0; border:1px solid var(--border-strong); border-radius:9px; background:var(--surface-soft); color:var(--text); font:inherit; font-size:20px; cursor:pointer; }
.object-file-search-clear[hidden] { display:none; }
.object-file-search-clear:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
.object-file-tools input,.object-file-tools select { width:100%; min-width:0; min-height:44px; padding:8px 11px; border:1px solid var(--border-strong); border-radius:9px; background:#fff; color:var(--text); font:inherit; font-size:13px; }
.object-file-tools :is(input,select):focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
.object-file-tools output { color:var(--muted); font-size:11px; white-space:nowrap; }
.object-file-group { min-width:0; }
.object-file-group + .object-file-group { margin-top:12px; }
.object-file-group h3 { margin:0 0 6px; }
.object-file-group-summary { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 10px; min-width:0; min-height:44px; padding:7px 9px; border:1px solid var(--border); border-radius:9px; background:var(--surface); cursor:pointer; list-style:none; }
.object-file-group-summary::-webkit-details-marker { display:none; }
.object-file-group-summary::after { content:'⌄'; grid-column:2; grid-row:1/4; align-self:center; color:var(--muted); }
.object-file-group[open] > .object-file-group-summary::after { transform:rotate(180deg); }
.object-file-group-heading { display:flex; align-items:center; gap:7px; min-width:0; font-size:12px; }
.object-file-group-count { display:inline-grid; place-items:center; min-width:20px; height:20px; padding:0 5px; border-radius:20px; background:var(--surface-soft); color:var(--muted); font-size:10px; font-weight:600; }
.object-file-group-newest,.object-file-group-activity { grid-column:1; min-width:0; color:var(--muted); font-size:10px; line-height:1.3; }
.object-file-group-newest { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.object-file-group-activity { display:flex; flex-wrap:wrap; gap:2px 7px; overflow-wrap:anywhere; }
.object-file-group-activity time { flex:none; }
.object-file-group-summary:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
.object-file-group[open] > .object-file-group-list { margin-top:4px; }
.object-file-group-list { display:grid; border:1px solid var(--border); border-radius:9px; overflow:hidden; background:var(--surface); }
.object-file-row { display:grid; grid-template-columns:32px minmax(0,1fr) auto; gap:9px; align-items:center; width:100%; min-width:0; min-height:57px; padding:8px 10px; color:inherit; font:inherit; text-align:left; text-decoration:none; border:0; border-top:1px solid var(--border); background:transparent; cursor:pointer; }
.object-file-row:first-child { border-top:0; }
.object-file-row:hover,.object-file-row:focus-visible { background:var(--surface-soft); }
.object-file-row .file-icon { width:30px; height:34px; display:grid; place-items:center; border-radius:6px; font-size:9px; }
.object-file-content { min-width:0; }
.object-file-content strong { display:block; overflow-wrap:anywhere; font-size:11px; line-height:1.3; }
.object-file-content > small { display:block; color:var(--muted); font-size:10px; margin-top:2px; overflow-wrap:anywhere; }
.object-file-content .project-file-meta { margin-top:2px; }
.object-file-open { color:var(--blue); font-size:11px; font-weight:700; white-space:nowrap; }
.object-file-action-symbol { display:none; }
.object-file-group-list > .project-file-history summary { padding:6px 10px; }
.object-file-group-list .project-file-history-rows { margin:0 10px 8px 14px; }
.object-file-group-list .project-file-history-rows .object-file-row:first-child { border-top:0; }
.file-viewer { width:min(960px, calc(100vw - 24px)); height:min(820px, calc(100dvh - 24px)); max-width:none; max-height:none; margin:auto; padding:0; border:1px solid var(--border); border-radius:14px; background:var(--surface); color:var(--text); box-shadow:0 24px 70px #10223855; overflow:hidden; }
.file-viewer::backdrop { background:#102238aa; }
.file-viewer[open] { display:flex; flex-direction:column; }
.file-viewer-head { display:flex; align-items:center; justify-content:space-between; gap:12px; min-width:0; padding:10px 14px; border-bottom:1px solid var(--border); }
.file-viewer-heading { min-width:0; }
.file-viewer-heading strong,.file-viewer-heading small { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.file-viewer-heading strong { font-size:13px; }
.file-viewer-heading small { color:var(--muted); font-size:10px; margin-top:3px; }
.file-viewer-actions { display:flex; align-items:center; gap:8px; flex:none; }
.file-viewer-actions a { padding:7px 9px; border-radius:6px; background:var(--surface-soft); color:var(--blue); font-size:11px; font-weight:600; text-decoration:none; }
.file-viewer-close { width:34px; height:34px; border:0; border-radius:7px; background:var(--surface-soft); color:var(--text); font-size:22px; line-height:1; cursor:pointer; }
.file-viewer-actions a:focus-visible,.file-viewer-close:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
.file-viewer-body { display:grid; place-items:center; flex:1; min-height:0; min-width:0; overflow:auto; background:var(--surface-soft); }
.file-viewer-media { display:block; width:100%; height:100%; border:0; object-fit:contain; }
.file-viewer-body { grid-template-rows:minmax(0,1fr) auto; }
.file-viewer-media[hidden] { display:none; }
.file-viewer-fallback { margin:0; padding:7px 12px; color:var(--muted); font-size:11px; line-height:1.35; text-align:center; }
.file-viewer-fallback[role="alert"] { color:var(--danger,#a93333); font-weight:650; }
@media(max-width:600px) { .file-viewer { width:100vw; height:100dvh; border:0; border-radius:0; } .file-viewer-head { padding: max(8px, env(safe-area-inset-top)) 8px 8px; } .file-viewer-actions { gap:4px; } .file-viewer-actions a { padding:7px 5px; } .file-viewer-body { padding-bottom:env(safe-area-inset-bottom); } }
@media(max-width:430px) {
  #object-summary-files .project-file-group { padding:4px 10px; }
  #object-summary-files .project-file-group-summary { min-height:44px; }
  #object-summary-files .project-file-group h3 { margin-bottom:8px; font-size:12px; line-height:1.25; }
  #object-summary-files .project-file-list { gap:0; }
  #object-summary-files .project-file-list > .project-file-row { padding:4px 0; border-top:1px solid var(--border); }
  #object-summary-files .project-file-row .project-file-meta { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 6px; font-size:10px; line-height:1.3; }
  #object-summary-files .project-file-row .project-file-meta time { grid-column:1/-1; color:#354c66; font-weight:650; }
  #object-summary-files .project-file-row .project-file-meta > span[aria-hidden="true"] { display:none; }
  #object-summary-files .project-file-row .project-file-meta > span:not([aria-hidden]) { min-width:0; overflow-wrap:anywhere; }
  #object-summary-files .project-file-history { padding:0 8px; border:1px solid var(--border); border-radius:9px; background:var(--surface); }
  #object-summary-files .project-file-history summary { min-height:44px; }
  #object-summary-files .project-file-history-rows { margin:0 0 8px 3px; }
  #detail-summary .project-file-preview-link { display:flex; align-items:center; width:100%; min-height:44px; padding:3px 0; }
  #detail-summary .project-file-row .project-file-main { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:0 6px; }
  #detail-summary .project-file-row .project-file-current-tag { margin:0; }
  #detail-summary .project-file-row .project-file-meta { grid-column:1/-1; }
  #detail-summary .project-file-history summary { min-height:44px; }
  .file-viewer { max-width:100vw; max-height:100dvh; }
  .file-viewer-head { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; min-height:60px; padding:calc(8px + env(safe-area-inset-top)) 10px 8px; }
  .file-viewer-heading strong { display:-webkit-box; max-height:2.5em; overflow:hidden; overflow-wrap:anywhere; -webkit-box-orient:vertical; -webkit-line-clamp:2; white-space:normal; font-size:12px; line-height:1.25; }
  .file-viewer-actions { align-self:start; gap:6px; }
  .file-viewer-actions a { box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; max-width:36vw; padding:8px 10px; white-space:normal; text-align:center; }
  .file-viewer-close { flex:none; width:44px; height:44px; min-height:44px; }
  .file-viewer-body { max-width:100%; padding-bottom:calc(8px + env(safe-area-inset-bottom)); }
}
@media(max-width:600px) { .object-act-upload { grid-template-columns:minmax(0,1fr) auto; padding:10px; } .object-act-upload strong,.object-act-upload label:nth-of-type(2) { grid-column:1 / -1; } .object-act-upload label:first-of-type { min-width:0; } .object-act-upload .mini-action { grid-column:2; } }
@media(max-width:430px) { .object-act-upload .object-file-picker-control { grid-template-columns:auto minmax(0,1fr); gap:7px; } .object-act-upload .object-file-pick-button { padding-inline:9px; } .object-act-upload .object-file-picker-control output { display:-webkit-box; max-height:2.7em; overflow:hidden; overflow-wrap:anywhere; white-space:normal; -webkit-box-orient:vertical; -webkit-line-clamp:2; } }
@media (max-width:430px) {
  #difference-modal { padding:8px; }
  #difference-modal .difference-modal { width:100%; max-height:calc(100dvh - 16px); }
  .difference-modal .modal-head { align-items:center; min-height:56px; padding:7px 12px; }
  .difference-modal .modal-head .icon-btn { flex:none; width:44px; height:44px; }
  .difference-modal .compare-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:10px 12px 8px; }
  .difference-modal .compare-grid > div { min-width:0; padding:10px; overflow-wrap:anywhere; }
  .difference-modal .compare-grid strong { font-size:16px; }
  .difference-modal .compare-grid small { font-size:9px; line-height:1.3; }
  .difference-modal .difference-note { margin:0 12px 10px; padding:9px 10px; }
  .difference-modal .difference-note strong,.difference-modal .difference-note p { font-size:11px; line-height:1.35; }
  .difference-modal .decision { padding:0 12px 10px; }
  .difference-modal .decision :is(select,textarea) { min-height:44px; font-size:16px; }
  .difference-modal .modal-actions { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.6fr); gap:8px; padding:9px 12px; }
  .difference-modal .modal-actions button { min-width:0; min-height:44px; white-space:normal; line-height:1.25; }
}
/* Compact Files tab: one current upload per type and scope, with every older upload reachable. */
@media (max-width:430px) {
  #detail-files, #object-file-list { min-width:0; max-width:100%; }
  #detail-files .object-file-tools { grid-template-columns:minmax(0,1fr) auto; gap:7px; }
  #detail-files .object-file-search { grid-column:1/-1; }
  #detail-files .object-file-type { min-width:0; }
  #detail-files .object-file-tools output { justify-self:end; font-size:10px; }
  #detail-files .object-act-upload { grid-template-columns:minmax(0,1fr) 112px; gap:7px 8px; margin-bottom:12px; padding:9px; }
  #detail-files .object-act-upload strong,#detail-files .object-act-upload label:first-of-type { grid-column:1/-1; }
  #detail-files .object-act-upload label:nth-of-type(2) { grid-column:1; grid-row:3; }
  #detail-files .object-act-upload > button { grid-column:2; grid-row:3; align-self:end; width:100%; min-height:44px; }
  #detail-files .object-file-group + .object-file-group { margin-top:14px; }
  #detail-files .object-file-group h3 { margin:0 0 6px; font-size:12px; line-height:1.25; }
  #detail-files .object-file-group h3 span { min-width:22px; height:22px; font-size:11px; }
  #detail-files .object-file-group-list { border-radius:10px; }
  #detail-files .object-file-row { grid-template-columns:28px minmax(0,1fr) 16px; gap:8px; min-height:56px; padding:8px 9px; }
  #detail-files .object-file-open { display:grid; place-items:center; width:16px; min-width:0; }
  #detail-files .object-file-action-text { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
  #detail-files .object-file-action-symbol { display:block; font-size:20px; line-height:1; }
  #detail-files .object-file-row.is-download .object-file-action-symbol { font-size:16px; }
  #detail-files .object-file-row.is-latest { box-shadow:inset 3px 0 var(--company-accent,var(--blue)); background:#f8fbff; }
  #detail-files .project-file-history-rows .object-file-row { grid-template-columns:minmax(0,1fr) 16px; padding:7px 9px; }
  #detail-files .project-file-history-rows .object-file-row .file-icon { display:none; }
  #detail-files .object-file-content .project-file-current-tag { margin:3px 0 1px; }
  #detail-files .object-file-row .file-icon { width:28px; height:30px; font-size:9px; }
  #detail-files .object-file-content strong { font-size:12px; line-height:1.25; }
  #detail-files .object-file-content > small { font-size:10px; line-height:1.25; }
  #detail-files .object-file-content .project-file-meta { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 6px; margin-top:3px; font-size:10px; line-height:1.3; }
  #detail-files .object-file-content .project-file-meta time { grid-column:1/-1; color:#354c66; font-weight:650; }
  #detail-files .object-file-content .project-file-meta > span[aria-hidden="true"] { display:none; }
  #detail-files .object-file-content .project-file-meta > span:not([aria-hidden]) { min-width:0; overflow-wrap:anywhere; }
  #detail-files .project-file-history summary { min-height:44px; padding:8px 10px; font-size:11px; }
  #detail-files .project-file-history summary > span,
  #detail-files .project-file-history summary > small { overflow:visible; white-space:normal; text-overflow:clip; overflow-wrap:anywhere; }
  #detail-files .project-file-history-rows { margin:0 8px 8px 12px; padding-left:8px; }
  #detail-files .project-file-history-rows .object-file-row { min-height:48px; }
}
@media (max-width:350px) {
  #detail-files .object-act-upload { grid-template-columns:minmax(0,1fr); }
  #detail-files .object-act-upload label:nth-of-type(2),#detail-files .object-act-upload > button { grid-column:1; grid-row:auto; }
}
/* Shared phone form sheet. Domain fields and their validation remain in place. */
@media (max-width:430px) {
  .modal-backdrop:has(> .mobile-form-shell) { height:100dvh; padding:8px 8px calc(8px + env(safe-area-inset-bottom)); place-items:end center; }
  .modal-backdrop > .mobile-form-shell { width:100%; min-width:0; max-height:calc(100dvh - 16px - env(safe-area-inset-bottom)); overflow-x:auto; overflow-y:auto; overscroll-behavior:contain; scroll-padding-bottom:88px; border-radius:16px; }
  .mobile-form-shell > .modal-head { position:sticky; top:0; z-index:4; align-items:center; gap:8px; min-width:0; padding:10px 12px; background:var(--surface); }
  .mobile-form-shell > .modal-head > :first-child { min-width:0; }
  .mobile-form-shell > .modal-head h2 { margin:0; font-size:15px; line-height:1.25; overflow-wrap:anywhere; }
  .mobile-form-shell > .modal-head p { font-size:11px; line-height:1.35; overflow-wrap:anywhere; }
  .mobile-form-shell > .modal-head .icon-btn { flex:0 0 44px; width:44px; height:44px; min-height:44px; }
  .mobile-form-shell > .form-grid { min-width:0; gap:10px; padding:12px; }
  .mobile-form-shell > .form-grid > *, .mobile-form-shell > .form-grid label { min-width:0; }
  .mobile-form-shell .form-grid label span { margin-bottom:5px; font-size:12px; line-height:1.3; }
  .mobile-form-shell .form-grid :is(input:not([type=file]):not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) { min-width:0; min-height:44px; padding:10px 11px; font-size:16px; line-height:1.3; }
  .mobile-form-shell .form-grid input[type=file], .mobile-form-shell .form-grid button { min-height:44px; max-width:100%; }
  .mobile-form-shell .form-grid :is(input, select, textarea):focus-visible, .mobile-form-shell .modal-actions button:focus-visible, .mobile-form-shell .modal-head button:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
  .mobile-form-shell > .modal-actions { position:sticky; bottom:0; z-index:4; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:9px 12px calc(9px + env(safe-area-inset-bottom)); background:var(--surface); box-shadow:0 -5px 18px rgba(15,49,88,.06); }
  .mobile-form-shell > .modal-actions:has(> :only-child) { grid-template-columns:minmax(0,1fr); }
  .mobile-form-shell > .modal-actions button { min-width:0; min-height:44px; height:auto; padding:8px 10px; white-space:normal; line-height:1.25; }
}
#plan-form .plan-modal-tip { display:inline-grid; }
#plan-form .plan-form-feedback { margin:0 12px 8px; padding:8px 10px; border:1px solid #e5b7b3; border-radius:8px; background:#fff1ef; color:#8b2d2b; font-size:12px; line-height:1.35; }
#plan-form .plan-form-feedback[hidden] { display:none; }
@media (max-width:430px) {
  #plan-form { overflow-x:hidden; }
  #plan-form .plan-modal-tip { width:44px; height:44px; margin-left:0; border:0; background:transparent; font-size:0; }
  #plan-form .plan-modal-tip::before { content:'i'; display:grid; place-items:center; width:16px; height:16px; border:1px solid #a9bacd; border-radius:50%; background:#f4f8fc; color:#50647d; font-size:10px; }
  #plan-form .plan-modal-tip::after { position:absolute; top:calc(100% + 7px); bottom:auto; left:0; width:min(300px, calc(100vw - 40px)); transform:translateY(-4px); }
  #plan-form .plan-modal-tip:is(:hover,:focus-visible)::after { transform:translateY(0); }
  #plan-form .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:10px 12px; }
  #plan-form .form-grid label:has([name="lift"]) { grid-column:1/-1; grid-row:1; }
  #plan-form .form-grid label:has([name="physicalUnitId"]) { grid-column:1/-1; grid-row:2; }
  #plan-form .form-grid label:has([name="organizationId"]) { grid-column:1; grid-row:3; }
  #plan-form .form-grid label:has([name="status"]) { grid-column:2; grid-row:3; }
  #plan-form .form-grid label:has([name="crew"]) { grid-column:1/-1; grid-row:4; }
  #plan-form .form-grid label:has([name="start"]) { grid-column:1; grid-row:5; }
  #plan-form .form-grid label:has([name="end"]) { grid-column:2; grid-row:5; }
  #plan-form .form-grid :is(input, select) { width:100%; min-width:0; }
}
@media(max-width:950px) { #template-list .template-record { grid-template-columns:minmax(0,1fr); gap:5px; } .template-actions { margin-top:6px; } }
@media(max-width:600px) { #page-settings .settings-grid { grid-template-columns:1fr; } .settings-tabs button { min-height:42px; } }
@media (max-width:760px) {
  #page-lift-detail > .object-header { flex-direction:column; align-items:stretch; min-width:0; }
  #page-lift-detail > .object-header > div:first-child { min-width:0; }
  #page-lift-detail .title-line { flex-wrap:wrap; min-width:0; }
  #page-lift-detail .title-line h1 { min-width:0; overflow-wrap:anywhere; }
  #page-lift-detail .header-buttons { width:100%; min-width:0; flex-wrap:wrap; }
  #page-lift-detail .header-buttons button { max-width:100%; white-space:normal; text-align:center; }
  #page-lift-detail .lift-tabs { max-width:100%; }
  #measurement-modal { padding:6px; }
  .measurement-modal { width:100%; min-width:0; max-height:calc(100dvh - 12px); overflow:auto; }
  .measurement-modal .modal-head { position:sticky; top:0; z-index:3; gap:8px; background:#fff; }
  .measurement-modal .modal-head h2 { min-width:0; overflow-wrap:anywhere; }
  .measurement-modal .modal-head .icon-btn { flex:none; }
  .measurement-modal .modal-actions { position:sticky; bottom:0; z-index:3; background:#fff; }
  .measurement-body { min-width:0; padding:10px; }
  .measurement-top { flex-wrap:wrap; max-width:none; }
  .measurement-top label { min-width:120px; }
  .shaft-panel { min-width:0; padding:10px; }
  .sketch-openings,#second-door-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .landing-heading { align-items:flex-start; flex-direction:column; }
  .landing-table-wrap { max-height:none; overflow:visible; }
  .landing-table,.landing-table:has([data-landing^="second"]) { display:block; width:100%; min-width:0; }
  .landing-table thead { display:none; }
  .landing-table tbody { display:grid; gap:8px; padding:8px; }
  .landing-table tr { display:grid; gap:8px; min-width:0; padding:10px; border:1px solid var(--border); border-radius:7px; background:#fff; }
  .landing-table tr.measurement-boundary { background:#eef5fc; }
  .landing-table tr th,.landing-table tr td { display:block; width:100%; min-width:0; padding:0; border:0; }
  .landing-table tr th { font-size:12px; }
  .landing-table td:has([data-landing^="first"]):not(:has(.landing-check))::before,
  .landing-table td:has([data-landing^="second"]):not(:has(.landing-check))::before,
  .landing-table td:has([data-landing="note"])::before { display:block; margin-bottom:5px; color:var(--muted); font-size:10px; font-weight:700; }
  .landing-table td[data-mobile-label]::before { content:attr(data-mobile-label); }
  .landing-table .landing-dims { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .landing-table .landing-dims input { width:100%; }
}
@media (max-width:430px) {
  .measurement-top label { min-width:0; }
  .sketch-center { grid-template-columns:minmax(0,1fr); }
  .sketch-box { min-width:0; margin:0 10px 10px; }
  .sketch-opening,.sketch-second { min-width:min(180px,90%); }
  .landing-table .landing-dims { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .measurement-modal .measurement-body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) { min-height:44px; font-size:16px; }
  .measurement-modal .landing-check,.measurement-modal .form-segmented label span { min-height:44px; }
  .measurement-modal .modal-actions button { min-height:44px; }
  .measurement-modal .modal-actions { padding:10px; }
  .measurement-modal .modal-actions button { min-width:0; white-space:normal; }
}
@media print { body.print-request-offer .sidebar,body.print-request-offer .topbar,body.print-request-offer #page-object-detail > :not(#detail-offers),body.print-request-offer #detail-offers > :not(#request-offer-editor),body.print-request-offer .request-offer-panel > .panel-head,body.print-request-offer .request-offer-settings { display:none !important; } body.print-request-offer .app-shell { display:block; } body.print-request-offer .page { display:none !important; } body.print-request-offer #page-object-detail,body.print-request-offer #detail-offers { display:block !important; padding:0; } body.print-request-offer .request-offer-body { display:block; padding:0; } body.print-request-offer .request-offer-document { border:0; } }

/* Contract preparation and revision review */
.contract-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin:4px 0 16px; }
.contract-heading h2 { margin:2px 0 5px; font-size:22px; }
.contract-heading p:last-child { margin:0; color:var(--muted); font-size:12px; }
.contract-heading-actions { display:flex; gap:8px; flex-wrap:wrap; }
.contract-steps { display:flex; gap:5px; margin-bottom:16px; overflow-x:auto; }
.contract-steps span { flex:1 0 130px; border-top:4px solid #dbe3ec; padding:8px 4px 0; color:var(--muted); font-size:10px; font-weight:700; }
.contract-steps span.done { border-color:#2f815c; color:#2f815c; }
.contract-steps span.current { border-color:var(--blue); color:var(--blue); }
.contract-grid { display:grid; grid-template-columns:minmax(0,1fr) 320px; align-items:start; gap:16px; }
.contract-main,.contract-side { display:grid; gap:16px; min-width:0; }
.contract-section,.contract-source { padding:18px; }
.contract-section .panel-head,.contract-source .panel-head { margin:-18px -18px 16px; padding:14px 18px; }
.contract-section .panel-head h3,.contract-source .panel-head h3 { margin:0; font-size:14px; }
.contract-word-section .panel-head { flex-wrap:wrap; }
.contract-word-section .panel-head .primary-btn { white-space:normal; text-align:center; }
.contract-source .panel-head span { font-size:11px; color:var(--muted); }
.contract-source-facts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.contract-source-facts > div { display:grid; gap:4px; min-width:0; }
.contract-source-facts small { color:var(--muted); font-size:10px; }
.contract-source-facts b { overflow-wrap:anywhere; font-size:12px; }
.contract-source-confirm { display:flex; align-items:center; gap:7px; margin-top:12px; color:#754a1d; font-size:11px; }
.contract-source-confirm input { flex:none; }
.contract-summary-payments { padding:3px 16px 14px; }
.contract-summary-payments > div { display:flex; justify-content:space-between; gap:8px; border-bottom:1px solid var(--border); padding:8px 0; font-size:11px; }
.contract-summary-payments > div:last-child { border:0; }
.contract-warning { margin:14px 0 0; color:#9b5c1b; font-size:11px; }
.contract-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.contract-fields label,.contract-section > label { display:grid; gap:5px; min-width:0; color:#53677d; font-size:11px; }
.contract-fields label.wide { grid-column:1 / -1; }
.contract-fields input,.contract-fields select,.contract-section > label input,.contract-section > label select,.contract-section textarea,.contract-payment-row input { width:100%; min-width:0; border:1px solid var(--border-strong); border-radius:7px; padding:9px 10px; background:#fff; color:var(--text); font:inherit; font-size:12px; }
.contract-fields input:disabled,.contract-section input:disabled,.contract-section textarea:disabled { background:#f3f6fa; color:#52667b; }
.contract-lifts { display:grid; gap:7px; margin-bottom:16px; }
.contract-lifts > div { display:grid; grid-template-columns:auto minmax(130px,190px) minmax(0,1fr); gap:12px; align-items:end; padding:9px 10px; border:1px solid var(--border); border-radius:7px; font-size:11px; }
.contract-lifts b { color:var(--blue); align-self:center; }
.contract-lifts .contract-model { display:grid; gap:4px; color:#53677d; }
.contract-lifts .contract-model strong { color:var(--text); font-size:12px; }
.contract-payment-head,.contract-payment-row,.contract-payment-total { display:grid; grid-template-columns:minmax(0,1fr) 85px 110px 27px; gap:7px; align-items:center; }
.contract-payment-head { color:var(--muted); font-size:10px; font-weight:700; margin-bottom:5px; }
.contract-payment-row { margin-bottom:7px; }
.contract-payment-row strong,.contract-payment-total b { text-align:right; font-size:12px; }
.contract-payment-row button { height:30px; border:0; background:transparent; color:#a43d31; cursor:pointer; font-size:18px; }
.contract-payment-total { border-top:1px solid var(--border); padding-top:10px; color:#9b4e34; }
.contract-payment-total .is-valid { color:#248050; }
#contract-text { min-height:290px; line-height:1.55; resize:vertical; }
.contract-document { margin-top:16px; padding:26px; border:1px solid var(--border-strong); background:#fff; box-shadow:0 2px 8px #12385f0c; }
.contract-document > div:first-child { display:flex; justify-content:space-between; gap:12px; margin-bottom:22px; }
.contract-document small { color:var(--muted); }
#contract-preview-text { font-size:12px; line-height:1.65; overflow-wrap:anywhere; }
#contract-checklist { margin-bottom:15px; font-size:11px; }
#contract-checklist ul { margin:7px 0; padding-left:18px; color:#a35a25; }
#contract-checklist p { color:#9b5c1b; }
.contract-actions { display:grid; gap:8px; margin:14px 0; }
.contract-client-reviewer { margin-top:10px; }
.contract-actions button { white-space:normal; min-height:38px; }
.contract-side .contract-section > small { display:block; margin-top:9px; color:var(--muted); font-size:10px; }
.contract-file { display:block; margin-bottom:12px; font-size:12px; }
#contract-signed-file { width:100%; margin:10px 0 5px; font-size:11px; }
.contract-upload-label { display:grid; gap:3px; margin-top:10px; font-size:10px; color:var(--muted); }
.contract-upload-label.is-disabled { opacity:.72; }
.contract-upload-state { display:block; margin-top:5px !important; color:#76541e !important; }
.contract-signed-file-row { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.contract-signed-file-row .contract-file { min-width:0; overflow-wrap:anywhere; }
.mini-action.is-danger { color:#a43d31; }
.contract-generation-status { margin:10px 0; padding:8px 10px; border-radius:6px; background:#edf6f1; color:#226f4b; font-size:11px; }
.contract-generation-status.is-error { background:#fff2ef; color:#9b3f31; }
.contract-generated-list { display:grid; gap:7px; margin-top:12px; }
.contract-generated-file { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 10px; border:1px solid var(--border); border-radius:7px; text-decoration:none; }
.contract-generated-file span { display:grid; gap:2px; min-width:0; }
.contract-generated-file b { overflow-wrap:anywhere; font-size:11px; }
.contract-generated-file small { color:var(--muted); font-size:10px; }
.contract-edoc-attachments { display:grid; gap:7px; margin-top:14px; padding-top:12px; border-top:1px solid var(--border); font-size:11px; }
.contract-edoc-attachments small { color:var(--muted); line-height:1.4; }
.contract-edoc-attachments a { overflow-wrap:anywhere; }
.contract-edoc-attachments > b:not(:first-child) { margin-top:8px; }
.edoc-entry { display:flex; align-items:baseline; justify-content:space-between; gap:8px; padding:6px 8px; border:1px solid var(--border); border-radius:5px; background:var(--surface-soft); text-decoration:none; font-size:10px; }
.edoc-entry span { overflow-wrap:anywhere; }
.edoc-entry small { flex:none; }
.edoc-folder { margin-left:8px; padding-left:7px; border-left:1px solid var(--border); }
.edoc-folder > summary,.edoc-technical > summary { cursor:pointer; padding:5px 0; color:var(--text); font-weight:600; }
.edoc-technical { margin-top:3px; }
.edoc-signature { display:grid; gap:3px; padding:8px; border:1px solid var(--border); border-radius:6px; background:var(--surface-soft); }
.catalog-panel { grid-column:1 / -1; min-width:0; }
.catalog-panel > .text-btn { margin:0 20px 18px; }
.catalog-model-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:16px; }
.catalog-model-list button { width:auto; min-height:34px; display:inline-flex; align-items:center; justify-content:center; grid-template-columns:none; padding:7px 11px; border:1px solid var(--border-strong); border-radius:6px; background:#fff; text-align:center; }
.catalog-model-list button:last-child { border:1px solid var(--border-strong); }
.catalog-model-list button.primary-btn { border-color:var(--navy); background:var(--navy); color:#fff; }
.catalog-model-list button.is-danger { color:var(--red); }
.catalog-model { min-width:0; border:1px solid var(--border-strong); border-radius:10px; background:var(--surface); overflow:hidden; }
.catalog-model[open] { grid-column:1 / -1; border-color:#aac5e0; box-shadow:0 6px 20px rgba(15,49,88,.08); }
.catalog-model > summary { cursor:pointer; display:flex; align-items:center; gap:12px; min-height:72px; padding:15px 17px; list-style:none; }
.catalog-model > summary::-webkit-details-marker { display:none; }
.catalog-model > summary:hover { background:var(--surface-soft); }
.catalog-model-icon { width:36px; height:36px; flex:none; display:grid; place-items:center; border-radius:8px; background:var(--navy-soft); color:var(--navy); font-size:18px; }
.catalog-model-title { min-width:0; flex:1; display:grid; gap:3px; }
.catalog-model-title strong { font-size:13px; }
.catalog-model-title small { margin:0; color:var(--muted); font-size:10px; line-height:1.35; }
.catalog-model-count { flex:none; padding:5px 9px; border-radius:999px; background:#edf5ff; color:var(--navy); font-size:10px; font-weight:700; }
.catalog-model-chevron { color:var(--muted); font-size:20px; transition:transform .15s; }
.catalog-model[open] .catalog-model-chevron { transform:rotate(180deg); }
.catalog-model-body { display:grid; gap:20px; padding:18px; border-top:1px solid var(--border); background:#fbfcfe; }
.catalog-model-section { min-width:0; padding:18px; border:1px solid var(--border); border-radius:9px; background:#fff; }
.catalog-section-heading { margin-bottom:16px; }
.catalog-section-heading h3 { margin:0 0 4px; font-size:13px; }
.catalog-section-heading p { margin:0; color:var(--muted); font-size:10px; line-height:1.4; }
.catalog-model-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.catalog-model-form label,.catalog-size-form label,.catalog-dimension-row label { display:grid; align-content:start; gap:5px; min-width:0; font-size:10px; font-weight:600; color:#415166; }
.catalog-model-form label small { color:var(--muted); font-size:9px; font-weight:400; }
.catalog-model-form input,.catalog-size-form input,.catalog-dimension-row input { width:100%; min-width:0; min-height:36px; padding:8px 10px; border:1px solid var(--border-strong); border-radius:7px; background:#fff; color:var(--text); font:inherit; font-size:11px; }
.catalog-model-form input:focus,.catalog-size-form input:focus,.catalog-dimension-row input:focus { border-color:var(--blue); outline:3px solid rgba(50,111,168,.13); }
.catalog-model-actions { grid-column:1 / -1; display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:3px; }
.catalog-model-actions .is-danger { margin-left:auto; }
.catalog-dimension-list { display:grid; gap:0; }
.catalog-dimension-row { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto; align-items:end; gap:10px; padding:10px 0; border-bottom:1px solid var(--border); }
.catalog-dimension-row:first-child { padding-top:0; }
.catalog-row-actions { display:flex; gap:6px; padding-bottom:1px; }
.catalog-row-actions .mini-action { white-space:nowrap; }
.catalog-size-form { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto; align-items:end; gap:10px; margin-top:18px; padding:16px; border:1px dashed #b9cbdc; border-radius:8px; background:var(--surface-soft); }
.catalog-size-form > strong { grid-column:1 / -1; font-size:11px; }
.catalog-size-form > button { min-height:36px; white-space:nowrap; }
.catalog-empty { margin:0; color:var(--muted); font-size:11px; }
@media(max-width:900px) { .catalog-model-list { grid-template-columns:1fr; } .catalog-model[open] { grid-column:auto; } }
@media(max-width:670px) { .catalog-model-body { padding:10px; } .catalog-model-section { padding:12px; } .catalog-model-form { grid-template-columns:1fr; } .catalog-dimension-row,.catalog-size-form { grid-template-columns:repeat(3,minmax(0,1fr)); } .catalog-row-actions,.catalog-size-form > button { grid-column:1 / -1; justify-self:start; } .catalog-model-count { display:none; } }
.catalog-cabin-choice { grid-column:1/-1; }
.contract-signed-date { display:flex; flex-wrap:wrap; gap:4px 8px; align-items:baseline; padding:8px; border:1px solid var(--border); border-radius:6px; background:var(--surface-soft); }
.edoc-unverified { padding:8px; border:1px solid #efcf93; border-radius:6px; background:#fff8e9; color:#805014 !important; }
.contract-muted { color:var(--muted); font-size:11px; }
.contract-comments { display:grid; gap:8px; margin-bottom:12px; }
.contract-comment { border:1px solid var(--border); border-radius:7px; padding:9px; font-size:11px; }
.contract-comment.is-resolved { opacity:.68; }
.contract-comment > div { display:flex; justify-content:space-between; gap:8px; }
.contract-comment small { color:var(--muted); }
.contract-comment p { margin:7px 0; white-space:pre-wrap; }
.contract-comment > span { color:#248050; }
#contract-comment-text { margin:10px 0; }
.contract-revision { border-top:1px solid var(--border); padding:9px 0; font-size:11px; }
.contract-revision summary { cursor:pointer; }
.contract-revision > div { padding:8px 0; }
.contract-revision pre { max-height:220px; overflow:auto; white-space:pre-wrap; font:inherit; background:#f5f8fb; padding:9px; }
.contract-events { display:grid; gap:8px; }
.contract-events > div { display:grid; gap:2px; border-bottom:1px solid var(--border); padding-bottom:7px; font-size:11px; }
.contract-events small { color:var(--muted); }
@media(max-width:1000px) { .contract-grid { grid-template-columns:1fr; } .contract-side { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:650px) { .contract-heading { flex-direction:column; } .contract-source-facts,.contract-fields,.contract-side { grid-template-columns:1fr; } .contract-lifts > div { grid-template-columns:auto minmax(0,1fr); } .contract-lifts > div > span { grid-column:1 / -1; } .contract-payment-head,.contract-payment-row,.contract-payment-total { grid-template-columns:minmax(0,1fr) 55px 75px 22px; } .contract-document { padding:14px; } }
@media(max-width:650px) { .info-tip::after { position:fixed; left:16px; right:16px; top:auto; bottom:16px; width:auto; max-width:none; transform:translateY(4px); } .info-tip:hover::after,.info-tip:focus-visible::after { transform:translateY(0); } }
@media print { body.print-contract .sidebar,body.print-contract .topbar,body.print-contract #page-object-detail > :not(#detail-contract),body.print-contract #detail-contract > :not(#object-contract-content),body.print-contract .contract-heading,body.print-contract .contract-steps,body.print-contract .contract-source,body.print-contract .contract-side,body.print-contract .contract-main > :not(:has(.contract-document)),body.print-contract #contract-text,body.print-contract .contract-main .panel-head { display:none !important; } body.print-contract .app-shell { display:block; } body.print-contract .page { display:none !important; } body.print-contract #page-object-detail,body.print-contract #detail-contract { display:block !important; padding:0; } body.print-contract .contract-grid,body.print-contract .contract-main { display:block; } body.print-contract .contract-section { border:0; box-shadow:none; padding:0; } body.print-contract .contract-document { border:0; box-shadow:none; margin:0; padding:0; } }

/* Dashboard shows all queues together */
.dashboard-pools { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.dashboard-pool { min-width:0; border:1px solid var(--border); border-radius:10px; overflow:hidden; background:#fff; }
.dashboard-pool h3 { display:flex; justify-content:space-between; align-items:center; margin:0; padding:11px 13px; background:#f4f7fa; font-size:12px; }
.dashboard-pool h3 span { display:grid; place-items:center; min-width:24px; height:22px; padding:0 6px; border-radius:999px; background:var(--company-soft); color:var(--company-accent); }
.dashboard-pool .task-row { box-shadow:none; border-radius:0; border-inline:0 !important; }
.dashboard-pool.is-overdue-payment { border-color:#eab5b5; }
.dashboard-pool.is-overdue-payment h3 { background:#fff0f0; color:#a52332; }
.dashboard-pool.is-overdue-payment h3 span { background:#fbdede; color:#a52332; }
.task-row.is-overdue-payment,.timeline-row.is-overdue-payment { background:#fff8f8; }
.task-row.is-overdue-payment:hover,.timeline-row.is-overdue-payment:hover { background:#ffeded; }
.task-row.is-overdue-payment .task-main strong,.task-row.is-overdue-payment .task-meta b,.timeline-row.is-overdue-payment strong,.timeline-row.is-overdue-payment time { color:#a52332; }
.dashboard-pool:last-child:nth-child(odd) { grid-column:1 / -1; }

/* Compact planner with month bands and square weeks */
.planner-grid { min-width:980px; --planner-left:430px; --week-width:46px; }
.planner-header,.planner-row,.planner-months { grid-template-columns:var(--planner-left) repeat(12,var(--week-width)); }
.planner-months { display:grid; position:sticky; top:0; z-index:12; background:#edf2f7; border-bottom:1px solid var(--border); }
.planner-months > span { grid-column:1; position:sticky; left:0; background:#edf2f7; border-right:1px solid var(--border-strong); }
.planner-months b { padding:5px 7px; border-right:1px solid var(--border); text-align:center; text-transform:capitalize; font-size:8px; color:#52657a; }
.planner-header { top:26px; }
.planner-header-left { grid-template-columns:190px 90px 150px; }
.planner-header-left span,.planner-week { min-height:32px; align-items:center; justify-content:center; padding:4px; }
.planner-row { min-height:44px; }
.planner-info { grid-template-columns:190px 90px 150px; }
.planner-bar { height:24px; margin:0 2px; border-radius:3px; }
.crew-heading { min-height:30px; }

#page-settings > .page-heading .heading-sub { display:none; }
.request-file-selection { display:grid; gap:4px; margin-top:8px; padding:10px 12px; border:1px solid #cddbea; border-radius:8px; background:#f2f7fd; color:#354b62; font-size:10px; }
.request-file-selection[hidden] { display:none; }
.request-file-selection strong { color:#173b68; }
.request-selected-file { display:grid; grid-template-columns:minmax(0,1fr) minmax(130px,190px); align-items:center; gap:10px; padding:6px 0; border-top:1px solid #dce7f2; font-size:12px; }
.request-selected-file > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.request-selected-file small { color:#687c90; font-size:11px; }
#request-form .request-selected-file select { width:100%; min-height:34px; padding:5px 8px; border:1px solid #c5d5e6; border-radius:7px; background:#fff; color:#28425e; font-size:12px; }
.request-detail-kicker { display:flex; align-items:center; gap:6px; margin:8px 0 6px; color:var(--company-accent,#315e95); }

/* The request editor keeps its short fields paired on phones. */
#request-form .info-tip::after { content:attr(aria-label); }
#request-form .form-grid label > span:has(.info-tip) { display:flex; align-items:center; gap:5px; }
#request-form .form-grid label > span > span { display:inline; margin:0; }
#request-form .form-grid label .info-tip { flex:none; margin:0; }
#request-form .request-file-field { position:relative; }
#request-form .form-grid > .request-file-field { min-width:0; }
#request-form .request-file-field > span:first-child { display:flex; align-items:center; gap:5px; margin-bottom:6px; font-size:12px; }
#request-form .request-file-field input[type="file"] { position:absolute; width:1px; height:1px; min-height:0; padding:0; opacity:0; }
#request-form .request-file-trigger { display:inline-flex; align-items:center; justify-content:center; min-height:44px; width:auto; max-width:100%; margin:0; padding:10px 14px; border:1px solid #a9c1dc; border-radius:8px; background:#f4f8fd; color:#173b68; font-size:13px; font-weight:700; cursor:pointer; }
#request-form .request-file-field:hover .request-file-trigger,#request-form .request-file-field:focus-within .request-file-trigger { border-color:#5279a6; background:#e9f2fc; box-shadow:0 0 0 3px rgba(50,111,168,.1); }
@media (max-width:760px) {
  #request-modal { padding:12px; }
  #request-form { width:min(620px,100%); max-height:calc(100dvh - 24px); overflow-x:hidden; border-radius:13px; }
  #request-form .modal-head { position:sticky; top:0; z-index:2; gap:12px; padding:14px 16px 12px; background:#fff; }
  #request-form .modal-head h2 { font-size:17px; line-height:1.3; }
  #request-form .modal-head p { font-size:11px; line-height:1.4; }
  #request-form .modal-head .icon-btn { flex:none; min-width:40px; min-height:40px; }
  #request-form .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 11px; padding:15px 16px 18px; }
  #request-form .form-grid label { min-width:0; }
  #request-form .form-grid label.full { grid-column:1/-1; }
  #request-form .form-grid .request-file-field.full { grid-column:1/-1; }
  #request-form .form-grid label > span { margin-bottom:6px; font-size:12px; line-height:1.3; }
  #request-form .form-grid input:not([type="hidden"]),#request-form .form-grid select,#request-form .form-grid textarea { min-width:0; min-height:44px; padding:10px 11px; border-radius:8px; font-size:14px; line-height:1.35; }
  #request-form .form-grid textarea { min-height:78px; resize:vertical; }
  #request-form .form-grid .request-section-start { padding-top:14px; border-top:1px solid #e3eaf2; }
  #request-form .form-grid label:has(input[name="contact"]) { grid-column:1/-1; }
  #request-form .form-grid label:has(input[name="amount"]),#request-form .form-grid label:has(input[name="liftCount"]) { display:flex; flex-direction:column; }
  #request-form .form-grid label:has(input[name="amount"]) input,#request-form .form-grid label:has(input[name="liftCount"]) input { margin-top:auto; }
  #request-form .request-company-logos { gap:8px; }
  #request-form .request-company-logo { flex:1 1 135px; min-width:0; max-width:180px; min-height:48px; height:48px; padding:7px 10px; border-width:1px; border-radius:9px; }
  #request-form .request-company-logo.is-active { border-width:2px; }
  #request-form .form-grid .request-file-field input[type="file"] { min-height:0; padding:0; }
  #request-form .modal-actions { position:sticky; bottom:0; z-index:2; padding:10px 16px; background:#fff; box-shadow:0 -6px 18px rgba(18,43,70,.05); }
  #request-form .modal-actions button { min-height:44px; font-size:13px; }
  #request-form .request-file-selection { min-width:0; overflow-wrap:anywhere; font-size:12px; }
  #request-form .request-selected-file { grid-template-columns:minmax(0,1fr) minmax(120px,42%); }
  #request-form .request-selected-file select { min-height:40px; font-size:12px; }
}
@media (max-width:430px) {
  #request-modal { padding:8px; }
  #request-form { max-height:calc(100dvh - 16px); }
  #request-form .form-grid { gap:11px 9px; padding-inline:14px; }
  #request-form .modal-head { padding-inline:14px; }
  #request-form .form-grid label:has(#request-client-select),#request-form .form-grid label:has(input[name="newClientName"]),#request-form .form-grid label:has(input[name="contact"]) { grid-column:1/-1; }
  #request-form .modal-actions { padding-inline:14px; }
  #request-form .modal-actions button { flex:1 1 0; min-width:0; white-space:normal; }
}

@media (max-width:760px) {
  .dashboard-pools { grid-template-columns:1fr; }
  .dashboard-pool:last-child:nth-child(odd) { grid-column:auto; }
  .object-request-card { grid-template-columns:1fr; }
  .client-price-row { grid-template-columns:1fr 1fr; }
  .client-price-row > strong { text-align:right; }
}
.pma-measurement-reference { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 12px 14px; border: 1px solid #bfd2e8; border-radius: 10px; background: #f4f8fd; color: #23364f; }
.pma-measurement-reference[hidden] { display: none; }
.pma-measurement-reference > div { flex: 1 1 320px; min-width: 0; }
.pma-measurement-reference p { margin: 4px 0; line-height: 1.45; overflow-wrap: anywhere; }
.pma-measurement-reference small { color: #64748b; }
.pma-measurement-reference label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.des-specification { margin: 12px 0 18px; padding: 12px 14px; border: 1px solid #d5dfeb; border-radius: 10px; background: #f8fbff; }
.des-specification summary { cursor: pointer; font-weight: 700; }
.des-specification p { color: #52647b; font-size: 13px; }
.des-specification textarea { display: block; width: 100%; margin-top: 10px; resize: vertical; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.lift-file-checks,.lift-file-check-row { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.lift-file-checks { margin:10px 0 14px; padding:10px 12px; border:1px solid #d5dfeb; border-radius:9px; background:#fff; }
.lift-file-checks > strong { margin-right:5px; font-size:12px; }
.lift-file-checks > small { flex-basis:100%; color:#66758b; font-size:11px; }
.lift-file-check-row { margin-top:5px; }
.lift-file-neutral { color:var(--muted); font-size:12px; line-height:1.35; }
.manufacturer-document-settings { border-top:1px solid var(--border); margin-top:12px; padding:12px 16px; }
.manufacturer-document-settings summary { cursor:pointer; font-weight:600; }
.manufacturer-document-settings .settings-list { margin:10px 0; }
.manufacturer-document-type { display:flex; align-items:center; gap:8px; margin:8px 0; }
.manufacturer-document-type select { max-width:240px; min-width:0; }
@media(max-width:540px) { .manufacturer-document-settings { padding:12px; } .manufacturer-document-type { flex-wrap:wrap; } .manufacturer-document-type select { width:100%; max-width:none; } }
.lift-file-check { display:inline-flex; align-items:center; gap:4px; padding:2px 5px; border:1px solid #cbd5e1; border-radius:5px; font-size:10px; font-weight:700; white-space:nowrap; }
.lift-file-check b { display:inline-flex; align-items:center; justify-content:center; width:12px; height:12px; border:1px solid currentColor; border-radius:3px; font-size:10px; line-height:1; }
.lift-file-check.is-present { color:#176449; background:#effaf5; border-color:#a4d9c0; }
.lift-file-check.is-missing { color:#8b5a12; background:#fff9ee; border-color:#ead4ac; }

/* Gmail review queue */
.gmail-intro { display:grid; gap:12px; padding:18px; }
.gmail-intro p,.gmail-note { margin:0; color:#53657b; line-height:1.45; }
.gmail-intro small { color:#66758b; }
.gmail-intro .primary-btn { justify-self:start; text-decoration:none; }
.gmail-toolbar { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; padding:16px 18px; border-bottom:1px solid var(--border); }
.gmail-toolbar > div { display:grid; gap:4px; min-width:0; }
.gmail-toolbar strong,.gmail-toolbar small { overflow-wrap:anywhere; }
.gmail-toolbar small { color:#66758b; }
.gmail-note { padding:10px 18px; font-size:12px; }
.gmail-error { margin:10px 18px; padding:10px 12px; color:#a52332; background:#fff0f0; border:1px solid #eab5b5; border-radius:8px; }
.gmail-layout { display:grid; grid-template-columns:minmax(220px, 0.9fr) minmax(0, 1.4fr); border-top:1px solid var(--border); min-height:280px; }
.gmail-list { min-width:0; max-height:600px; overflow:auto; border-right:1px solid var(--border); }
.gmail-message { display:grid; gap:5px; width:100%; padding:12px 14px; border:0; border-bottom:1px solid var(--border); background:#fff; text-align:left; cursor:pointer; }
.gmail-message:hover,.gmail-message.is-selected { background:#f0f6ff; }
.gmail-message strong,.gmail-message small,.gmail-message span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gmail-message small { color:#66758b; }
.gmail-message > span { color:#52657a; }
.gmail-message em { font-size:11px; font-style:normal; color:#1b5d95; }
.gmail-preview { min-width:0; padding:16px; }
.gmail-preview h3 { margin:0 0 10px; overflow-wrap:anywhere; }
.gmail-preview p { margin:5px 0; overflow-wrap:anywhere; }
.gmail-body { margin:16px 0; max-height:360px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.5; font-size:13px; }
.gmail-attachments { color:#52657a; font-size:12px; }
.gmail-actions { display:flex; align-items:end; flex-wrap:wrap; gap:8px; border-top:1px solid var(--border); padding-top:14px; }
.gmail-actions label { flex:1 1 220px; min-width:0; display:grid; gap:5px; }
.gmail-actions label span { font-size:11px; font-weight:700; color:#52657a; }
.gmail-actions select { width:100%; min-width:0; }
.gmail-dashboard-row { width:100%; border:0; border-top:1px solid var(--border); background:#fff; text-align:left; cursor:pointer; }
.gmail-dashboard-row:hover { background:#f0f6ff; }
.gmail-row-kind { margin-left:auto; color:#476381; font-size:11px; font-style:normal; white-space:nowrap; }
.gmail-linked-section { margin:12px 0; padding:12px; border:1px solid var(--border); border-radius:10px; background:#fff; }
.gmail-linked-section h3 { display:flex; justify-content:space-between; margin:0 0 8px; font-size:13px; }
.gmail-linked-section h3 span { color:#52657a; }
.gmail-empty-archive { margin:6px 0 0; color:#66758b; font-size:12px; }
.request-card-emails { margin:0 14px 14px; border-top:1px solid var(--border); }
.request-card-emails h4 { margin:12px 0 5px; font-size:12px; color:#41546a; }
.request-email-row { display:flex; align-items:center; gap:12px; width:100%; padding:13px 17px; border:0; border-top:1px solid var(--border); background:#fff; text-align:left; cursor:pointer; color:var(--text); }
.request-email-row:first-child { border-top:0; }
.request-email-row:hover,.request-email-row:focus-visible { background:#f1f6fd; }
.request-email-index { display:grid; place-items:center; flex:0 0 28px; height:28px; border-radius:8px; background:#eaf2fc; color:#164e85; font-size:12px; font-weight:700; }
.request-email-copy { display:grid; min-width:0; gap:3px; flex:1; }
.request-email-copy strong,.request-email-copy small,.request-email-copy > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.request-email-copy strong { font-size:13px; }
.request-email-copy small { color:#61738a; font-size:11px; }
.request-email-copy > span { color:#52657a; font-size:12px; }
.request-email-row i { color:#8ca0b8; font-style:normal; font-size:20px; }
.request-card-emails .request-email-row { padding:9px 5px; }
.gmail-settings-list { max-height:520px; border-top:1px solid var(--border); }
.gmail-decision-modal { width:min(920px,calc(100vw - 28px)); }
.gmail-decision-modal .modal-head { position:sticky; top:0; z-index:2; background:#fff; }
.gmail-decision-modal .modal-head h2 { overflow-wrap:anywhere; }
.gmail-modal-subtitle { margin-top:4px; color:#66758b; font-size:12px; overflow-wrap:anywhere; }
.gmail-modal-content { padding:18px; display:grid; gap:16px; }
.gmail-classification { display:grid; gap:4px; padding:11px 13px; border:1px solid #d5e4f5; border-radius:9px; background:#f4f8fe; color:#173c68; }
.gmail-classification.is-linked { border-color:#b7ddce; background:#f2faf5; color:#1b6946; }
.gmail-classification small { color:#53657b; }
.gmail-preview { border:1px solid var(--border); border-radius:9px; overflow:hidden; background:#fff; }
.gmail-preview-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:45px; padding:7px 13px; border-bottom:1px solid var(--border); }
.gmail-preview-toolbar strong { font-size:13px; }
.gmail-preview-toolbar small { color:#66758b; font-size:11px; }
.gmail-preview-modes { display:flex; gap:3px; padding:3px; border:1px solid var(--border); border-radius:8px; background:#f5f8fc; }
.gmail-preview-modes button { padding:5px 9px; border:0; border-radius:5px; background:transparent; color:#52657a; cursor:pointer; font:inherit; font-size:11px; font-weight:600; }
.gmail-preview-modes button.is-active { background:#fff; color:#102b4e; box-shadow:0 1px 4px rgba(20,43,76,.13); }
.gmail-modal-body { min-height:120px; overflow:hidden; color:#66758b; font-size:13px; }
.gmail-modal-body:not(:has(iframe)) { padding:16px; }
.gmail-preview-frame { display:block; width:100%; height:min(440px,50vh); min-height:280px; border:0; background:#fff; }
.gmail-modal-files,.gmail-decision-actions { padding:14px; border:1px solid var(--border); border-radius:9px; }
.gmail-modal-files h3,.gmail-decision-actions h3 { margin:0 0 9px; font-size:14px; }
.gmail-modal-files p,.gmail-decision-actions p { margin:0 0 10px; color:#52657a; font-size:12px; line-height:1.45; }
.gmail-file-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:7px 0; border-top:1px solid var(--border); font-size:12px; }
.gmail-file-row span { min-width:0; overflow-wrap:anywhere; }
.gmail-file-row small { color:#66758b; }
.gmail-file-row a { white-space:nowrap; }
.gmail-project-choice { display:flex; align-items:end; gap:10px; margin:12px 0; }
.gmail-project-choice label { display:grid; gap:5px; flex:1; min-width:0; color:#52657a; font-size:12px; }
.gmail-project-choice select,.gmail-project-choice input { width:100%; }
.gmail-project-choice select[hidden] { display:none; }
.lift-group-import { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:14px 0 2px; padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:var(--surface-soft); color:var(--muted); font-size:11px; }
.lift-group-import .mini-action { white-space:nowrap; }
.lift-unit-section.is-single { margin-top:0; border-top:0; }
.gmail-ignore-choice { margin-top:16px; padding-top:15px; border-top:1px solid var(--border); }
.gmail-ignore-choice .quiet-btn { color:#a52332; }
@media (max-width:760px) { .gmail-layout { grid-template-columns:1fr; } .gmail-list { max-height:280px; border-right:0; border-bottom:1px solid var(--border); } }
@media (max-width:600px) { .gmail-project-choice { flex-direction:column; align-items:stretch; } }
.work-catalog-panel { grid-column: 1 / -1; }
.work-catalog-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; padding: 16px; }
.work-catalog-card, .work-catalog-new { border: 1px solid #d6e0ee; border-radius: 10px; padding: 12px; background: #fff; }
.work-catalog-card summary, .work-catalog-new summary { cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.work-catalog-card summary span { color: #52647b; font-size: 12px; }
.work-catalog-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 14px; }
.work-catalog-form label, .work-item-form label { display: grid; gap: 4px; font-size: 12px; color: #42526a; }
.work-catalog-form input, .work-catalog-form select, .work-catalog-form textarea, .work-item-form input, .work-item-form select { width: 100%; border: 1px solid #cad7e8; border-radius: 7px; padding: 8px; font: inherit; color: #1f2e42; background: white; }
.work-catalog-wide { grid-column: 1 / -1; }
.work-catalog-new { margin: 0 16px 16px; }
.project-work-items { margin: 16px 0; }
.work-items-body { padding: 16px; }
.work-item-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.work-item-form label { min-width: 160px; flex: 1; }
.work-item-lines { display: grid; gap: 8px; margin-top: 14px; }
.work-item-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px; border: 1px solid #d6e0ee; border-radius: 8px; }
.work-item-line span { color: #52647b; flex: 1; }
.work-item-line select { border: 1px solid #cad7e8; border-radius: 7px; padding: 7px; }
.work-pricing-area { margin-top: 16px; border-top: 1px solid #d6e0ee; padding-top: 14px; }
.work-pricing-total { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.work-pricing-total > span:nth-child(2) { margin-left: auto; color: #234365; }
.work-pricing-help { margin:-2px 0 12px; border:1px solid #d6e0ee; border-radius:8px; background:#f8fbff; }
.work-pricing-help summary { display:flex; align-items:center; min-height:40px; padding:8px 11px; color:#234d78; font-size:11px; font-weight:650; cursor:pointer; }
.work-pricing-help summary::-webkit-details-marker { display:none; }
.work-pricing-help summary::before { content:'▸'; margin-right:7px; transition:transform .15s ease; }
.work-pricing-help[open] summary::before { transform:rotate(90deg); }
.work-pricing-help summary:focus-visible { outline:2px solid var(--blue); outline-offset:2px; border-radius:7px; }
.work-pricing-help p { margin:0; padding:0 11px 11px; color:#42566e; font-size:11px; line-height:1.5; }
@media(max-width:430px) { .work-pricing-help summary { min-height:44px; font-size:12px; } .work-pricing-help p { font-size:12px; } }
.work-pricing-row { border: 1px solid #d6e0ee; border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.work-pricing-row > strong,.work-pricing-row > small { display: block; }
.work-pricing-row > small { margin-top: 4px; color: #52647b; }
.work-price-form { display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 8px; margin-top: 10px; align-items: end; }
.work-price-form label { font-size: 11px; color: #52647b; }
.work-price-form input,.work-price-form select,.work-override-controls input,.work-override-controls select { width: 100%; min-height: 34px; border: 1px solid #cad7e8; border-radius: 6px; padding: 5px 7px; background: #fff; }
.work-override-controls { display: grid; grid-template-columns: minmax(100px,1fr) minmax(100px,1fr) minmax(170px,2fr) auto auto; align-items: end; gap: 8px; margin-top: 10px; }
@media(max-width: 800px) { .work-override-controls { grid-template-columns: repeat(2,minmax(0,1fr)); } }
/* OWNER-PDF-001: per-lift multi-file upload feedback beside the visible + PDF control. */
.pdf-upload-job { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:3px 6px; color:var(--text); font-size:10px; }
.pdf-upload-job span:first-child { min-width:0; max-width:100%; }
.pdf-upload-job span:nth-child(2) { grid-column:1; min-width:0; }
.pdf-upload-job .mini-action { grid-column:2; grid-row:1 / span 2; }
.pdf-upload-job span:first-child { overflow-wrap:anywhere; }
.pdf-upload-job.is-success span:nth-child(2) { color:#267044; }
.pdf-upload-job.is-failed span:nth-child(2) { color:#9d4848; overflow-wrap:anywhere; }
.pdf-upload-job .mini-action { justify-self:end; }
.pdf-upload-files-link { grid-column:1 / -1; justify-self:start; color:var(--blue); font-weight:700; text-decoration:underline; text-underline-offset:2px; }
@media(max-width:775px) { .pdf-upload-job { grid-template-columns:minmax(0,1fr) auto; }.pdf-upload-job span:nth-child(2) { grid-column:1; }.pdf-upload-job .mini-action { grid-column:2; grid-row:1/3; min-height:44px; }.pdf-upload-files-link { grid-column:1 / -1; min-height:44px; align-content:center; }.upload-state .mini-action, .upload-state a { min-height:44px; } }
@media(max-width:430px) { .pdf-upload-job span:first-child { display:-webkit-box; max-height:2.7em; overflow:hidden; overflow-wrap:anywhere; -webkit-box-orient:vertical; -webkit-line-clamp:2; } }
@media(min-width:761px) and (max-width:1120px) { .lift-set-fields { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:760px) {
  .lift-set-row summary,.lift-set-row summary:not(:has(.lift-archive-check)) { grid-template-columns:minmax(32px,max-content) minmax(0,1fr) 12px; }
  .lift-set-row summary:has(.lift-archive-check) { grid-template-columns:18px minmax(32px,max-content) minmax(0,1fr) 12px; }
  .lift-set-summary-actions { grid-column:2 / -2; justify-content:flex-start; }
  .lift-set-row summary:has(.lift-archive-check) .lift-set-summary-actions { grid-column:3 / -2; }
}
#object-summary-files .project-file-group { padding:5px 12px; }
#object-summary-files .project-file-list > .project-file-row { padding:5px 0; }
#object-summary-files .project-file-main { display:block; }
#object-summary-files .project-file-preview-link,#object-summary-files .project-file-main > a,#object-summary-files .project-file-main > span { display:inline; width:auto; min-height:0; padding:0; font-size:11px; line-height:1.3; }
#object-summary-files .project-file-main > .project-file-maker { display:inline-block; margin-left:6px; padding:1px 5px; border-radius:4px; background:var(--surface-soft); color:var(--muted); font-size:9px; font-weight:600; }
#object-summary-files .project-file-row .project-file-meta { display:flex; gap:3px 5px; margin-top:2px; font-size:9px; line-height:1.25; }
#object-summary-files .project-file-meta time { color:var(--muted); font-weight:400; }
.service-profile-panel { max-width: 680px; }
.service-profile-panel h2 { display: flex; align-items: center; gap: .45rem; }
.service-profile-picker, .service-profile-form label { display: grid; gap: .4rem; font-weight: 600; }
.service-profile-picker { max-width: 260px; margin: 1rem 0; }
.service-profile-form { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.service-profile-form input, .service-profile-form select, .service-profile-picker select { width: 100%; min-width: 0; }
.service-profile-status, .service-profile-actions { grid-column: 1 / -1; }
.service-profile-status { min-height: 1.4em; margin: 0; }
.service-profile-status.is-error { color: var(--danger, #a32323); }
.service-profile-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
@media (max-width: 600px) {
  #page-lift-detail .title-line h1 { font-size: 15px; line-height: 1.2; }
  #page-lift-detail > .object-header .header-buttons .lift-save-action:not([hidden]) { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .service-profile-form { grid-template-columns: 1fr; } }

/* Object and lift cards share a compact phone rhythm without changing other modules. */
@media (max-width: 430px) {
  #page-object-detail, #page-lift-detail { min-width: 0; }
  #page-object-detail, #page-lift-detail { padding-top: 28px; }
  #page-object-detail > .back-link, #page-lift-detail > .back-link { margin-bottom: 3px; min-height: 44px; }
  #page-object-detail > .object-header, #page-lift-detail > .object-header { flex-direction: column; align-items: stretch; gap: 3px; margin-bottom: 8px; }
  #page-object-detail .object-customer-requests { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin:0 0 8px; }
  #page-object-detail .object-customer-requests[hidden] { display:none; }
  #page-object-detail .object-customer-request { min-width:0; min-height:44px; padding:6px 8px; }
  #page-object-detail > .object-header > div:first-child, #page-lift-detail > .object-header > div:first-child { min-width: 0; }
  #page-object-detail .title-line, #page-lift-detail .title-line { gap: 6px 8px; }
  #page-object-detail .title-line h1, #page-lift-detail .title-line h1 { flex: 1 1 180px; min-width: 0; font-size: 17px; line-height: 1.15; overflow-wrap: anywhere; }
  #page-object-detail .object-header p, #page-lift-detail .object-header p { margin-top: 2px; font-size: 10px; line-height: 1.2; overflow-wrap: anywhere; }
  #page-object-detail .header-buttons, #page-lift-detail .header-buttons { display: grid; width: 100%; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  #page-object-detail .header-buttons .quiet-btn, #page-lift-detail .header-buttons .quiet-btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-width: 0; min-height: 44px; padding: 7px 8px; white-space: normal; text-align: center; }
  #page-lift-detail .header-buttons { grid-template-columns: repeat(3,minmax(0,1fr)); }
  #page-lift-detail .header-buttons .primary-btn:not([hidden]) { grid-column: auto; min-width: 0; min-height: 44px; padding-inline: 8px; white-space: normal; }
  #page-object-detail .detail-tabs, #page-lift-detail .lift-tabs { max-width: 100%; min-width: 0; gap: 0; margin-bottom: 9px; overscroll-behavior-x: contain; scroll-snap-type: x proximity; }
  #page-object-detail .detail-tabs button, #page-lift-detail .lift-tabs button { flex: none; min-height: 44px; padding-inline: 10px; scroll-snap-align: start; }
  #page-object-detail .detail-tabs button:focus-visible, #page-lift-detail .lift-tabs button:focus-visible { outline: 2px solid var(--blue); outline-offset: -3px; }
  #detail-summary .detail-layout { gap: 8px; min-width: 0; }
  #detail-summary .detail-primary, #detail-summary .detail-side { min-width: 0; gap: 8px; }
  #detail-summary .panel-head, #lift-overview .panel-head { min-height: 0; padding: 10px 12px; gap: 8px; }
  #detail-summary .panel-head h2, #lift-overview .panel-head h2 { font-size: 13px; }
  #detail-summary .stage-track { padding: 2px 12px 8px; }
  #detail-summary .progress-next-actions { padding-top: 9px; }
  #detail-summary .progress-next-head { gap: 8px; padding: 0 12px 8px; }
  #detail-summary .progress-next-head .text-btn { flex: none; min-height: 40px; }
  #detail-summary .stage-actions { gap: 5px; padding-bottom: 8px; }
  #detail-summary .stage-action { padding: 7px 9px; }
  #detail-summary .check-list label { padding: 9px 12px; }
  #page-object-detail .info-panel dl, #lift-overview .info-panel dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; padding: 4px 12px; }
  #page-object-detail .info-panel dl div, #lift-overview .info-panel dl div { display: block; min-width: 0; padding: 7px 0; }
  #page-object-detail .info-panel dl dt, #lift-overview .info-panel dl dt { margin-bottom: 3px; font-size: 10px; }
  #page-object-detail .info-panel dl dd, #lift-overview .info-panel dl dd { overflow-wrap: anywhere; line-height: 1.35; }
  #page-lift-detail .lift-file-checks { margin: 7px 0 9px; padding: 8px 10px; }
  #lift-overview .validation-banner { gap: 8px; margin-bottom: 9px; padding: 9px 10px; }
  #lift-overview .validation-banner > span { flex: none; width: 24px; height: 24px; }
  #lift-overview .validation-banner button { min-height: 40px; }
  #lift-overview .lift-overview-grid { gap: 8px; min-width: 0; }
  #lift-overview .lift-overview-grid > .panel { min-width: 0; }
  #lift-overview .lift-flow { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; max-width: 100%; padding: 10px 12px 12px; overflow: visible; }
  #lift-overview .lift-flow button { min-width: 0; min-height: 72px; gap: 4px; padding: 0; overflow-wrap: anywhere; }
  #lift-overview .lift-flow button:not(:last-child)::after { display: none; }
  #lift-overview .lift-flow button b { margin-top: 2px; line-height: 1.25; }
  #lift-overview .lift-flow button small { line-height: 1.25; }
  #lift-overview .lift-configuration { margin-top: 8px; }
  #lift-overview .lift-config-fields { grid-template-columns: minmax(0,1fr); gap: 7px; padding: 8px; }
  #lift-overview .lift-config-group { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 10px; }
  #lift-overview .lift-config-group:first-child { grid-template-columns: minmax(0,1fr); }
  #lift-overview .lift-config-group h4 { grid-column: 1 / -1; margin-bottom: 0; }
  #lift-overview .lift-config-group label { min-width: 0; line-height: 1.3; overflow-wrap: anywhere; }
  #lift-overview .lift-config-group .catalog-cabin-choice { grid-column: 1 / -1; }
  #lift-overview .lift-detail-units { margin: 0 8px 8px; padding: 9px; }
  #lift-overview .lift-detail-unit { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  #lift-overview .lift-detail-unit > b, #lift-overview .lift-detail-unit > small { grid-column: 1 / -1; }
  #lift-overview .lift-detail-unit > label { grid-column: auto; min-width: 0; }
  #lift-overview .lift-detail-unit input { min-width: 0; min-height: 40px; }
  #lift-overview .lift-config-actions { padding: 0 8px 9px; }
  #lift-overview .lift-option-fields { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 9px 10px; }
  #lift-overview .lift-option-fields label:nth-child(2), #lift-overview .lift-option-fields label:nth-child(3) { grid-column: 1 / -1; }
  #lift-overview .lift-options-heading, #lift-overview .lift-option-foot { padding: 9px 10px; }
  #lift-overview .lift-option-note { padding:5px 10px 9px; }
}

/* Object contract and payment editing at phone width. */
@media (max-width: 430px) {
  #detail-contract, #object-contract-content, #object-payment-panel { min-width:0; max-width:100%; }
  #object-payment-panel .panel-head { min-height:0; padding:10px 12px; }
  #object-payment-panel .panel-head button { min-height:44px; }
  #object-payment-panel .money-value { padding:8px 12px 2px; }
  #object-payment-panel .money-value strong { overflow-wrap:anywhere; font-size:19px; }
  #object-payment-panel .contract-summary-payments { padding:0 12px 10px; }
  #object-payment-panel .contract-summary-payments > div { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:baseline; gap:8px; padding:8px 0; }
  #object-payment-panel .contract-summary-payments span { min-width:0; overflow-wrap:anywhere; }
  #object-payment-panel .contract-summary-payments b { min-width:0; max-width:150px; overflow-wrap:anywhere; text-align:right; font-variant-numeric:tabular-nums; }
  #object-contract-content .contract-heading { gap:4px; margin:0 0 9px; }
  #object-contract-content .contract-heading h2 { margin:0 0 3px; font-size:17px; line-height:1.25; }
  #object-contract-content .contract-heading p:last-child { font-size:10px; line-height:1.35; }
  #object-contract-content .contract-steps { gap:4px; margin-bottom:9px; overscroll-behavior-x:contain; }
  #object-contract-content .contract-steps span { flex-basis:100px; padding-top:5px; font-size:9px; }
  #object-contract-content .contract-grid, #object-contract-content .contract-main, #object-contract-content .contract-side { gap:9px; min-width:0; }
  #object-contract-content .contract-section, #object-contract-content .contract-source { min-width:0; padding:12px; }
  #object-contract-content .contract-section .panel-head, #object-contract-content .contract-source .panel-head { margin:-12px -12px 10px; padding:10px 12px; }
  #object-contract-content .contract-source-facts { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  #object-contract-content .contract-source-facts b { overflow-wrap:anywhere; }
  #object-contract-content .contract-fields { gap:8px; }
  #object-contract-content .contract-fields label, #object-contract-content .contract-section > label { min-width:0; overflow-wrap:anywhere; line-height:1.35; }
  #object-contract-content .contract-fields input, #object-contract-content .contract-fields select, #object-contract-content .contract-section > label input, #object-contract-content .contract-section > label select, #object-contract-content .contract-section textarea { min-height:44px; }
  #object-contract-content .contract-lifts { gap:6px; margin-bottom:9px; }
  #object-contract-content .contract-lifts > div { gap:7px; padding:8px; }
  #object-contract-content .contract-payment-head { display:none; }
  #object-contract-content .contract-payment-row { display:grid; grid-template-columns:88px minmax(0,1fr) 44px; gap:6px; min-width:0; margin-bottom:8px; padding:9px; border:1px solid var(--border); border-radius:8px; }
  #object-contract-content .contract-payment-row [data-payment-field="label"] { grid-column:1 / -1; }
  #object-contract-content .contract-payment-row input { min-height:44px; }
  #object-contract-content .contract-payment-row strong { min-width:0; overflow-wrap:anywhere; text-align:right; font-size:12px; font-variant-numeric:tabular-nums; }
  #object-contract-content .contract-payment-row button { min-width:44px; min-height:44px; }
  #object-contract-content .contract-payment-total { grid-template-columns:minmax(0,1fr) auto; gap:5px; }
  #object-contract-content .contract-payment-total b:last-child { grid-column:1 / -1; overflow-wrap:anywhere; font-size:15px; }
  #object-contract-content #contract-add-payment, #object-contract-content #contract-next-number, #object-contract-content .contract-actions button, #object-contract-content .contract-lifts .mini-action { min-height:44px; white-space:normal; }
  #object-contract-content .contract-delivery-row { grid-template-columns:45px minmax(0,1fr); gap:6px; }
  #object-contract-content .contract-delivery-row input { grid-column:2; }
  #object-contract-content .contract-delivery-row select, #object-contract-content .contract-delivery-row input { min-height:44px; }
  #object-contract-content .contract-delivery-overrides { padding:9px 12px; }
}

@media (max-width: 430px) {
  #object-contract-content .contract-word-section .panel-head { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
  #object-contract-content .contract-word-section .panel-head h3 { min-width:0; line-height:1.3; }
  #object-contract-content #contract-generate-word { width:100%; min-height:44px; padding:8px 10px; white-space:normal; }
  #object-contract-content #contract-template-id { min-height:44px; }
  #object-contract-content .contract-generation-status { margin:8px 0; overflow-wrap:anywhere; line-height:1.4; }
  #object-contract-content .contract-generated-list { margin-top:8px; }
  #object-contract-content .contract-generated-file { min-width:0; min-height:44px; gap:6px; }
  #object-contract-content .contract-signed-file-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:7px; }
  #object-contract-content .contract-signed-file-row .contract-file { display:flex; align-items:center; min-width:0; min-height:44px; margin:0; overflow-wrap:anywhere; }
  #object-contract-content #contract-remove-signed-file, #object-contract-content #contract-retry-edoc { min-height:44px; padding:8px 10px; }
  #object-contract-content .contract-upload-label { min-width:0; gap:6px; margin-top:9px; overflow-wrap:anywhere; }
  #object-contract-content #contract-signed-file { min-width:0; width:100%; min-height:44px; margin:0; padding:8px; border:1px solid var(--border-strong); border-radius:7px; background:var(--surface); }
  #object-contract-content .contract-edoc-attachments { min-width:0; gap:6px; margin-top:10px; padding-top:9px; }
}

@media (max-width: 430px) {
  #object-contract-content .contract-comments { gap:6px; margin-bottom:9px; }
  #object-contract-content .contract-comment { min-width:0; padding:9px 10px; }
  #object-contract-content .contract-comment > div { display:grid; grid-template-columns:minmax(0,1fr); gap:2px; }
  #object-contract-content .contract-comment strong, #object-contract-content .contract-comment p { overflow-wrap:anywhere; }
  #object-contract-content .contract-comment p { margin:7px 0; line-height:1.4; }
  #object-contract-content .contract-comment [data-resolve-comment] { min-height:44px; max-width:100%; padding:8px 10px; white-space:normal; }
  #object-contract-content #contract-comment-author { min-height:44px; }
  #object-contract-content #contract-comment-text { min-height:88px; margin:8px 0; line-height:1.4; }
  #object-contract-content #contract-add-comment { width:100%; min-height:44px; white-space:normal; }
  #object-contract-content .contract-revision { min-width:0; }
  #object-contract-content .contract-revision summary { min-height:44px; padding:9px 0; line-height:1.4; overflow-wrap:anywhere; }
  #object-contract-content .contract-revision summary strong { overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
  #object-contract-content .contract-revision summary:focus-visible { outline:2px solid var(--blue); outline-offset:2px; border-radius:4px; }
  #object-contract-content .contract-revision > div { min-width:0; padding:6px 0 9px; overflow-wrap:anywhere; }
  #object-contract-content .contract-revision pre { max-width:100%; max-height:180px; margin:7px 0 0; overflow:auto; }
  #object-contract-content .contract-events { gap:6px; }
  #object-contract-content .contract-events > div { min-width:0; overflow-wrap:anywhere; }
}
