:root {
  --navy: #202832;
  --navy-2: #2d3947;
  --ink: #202832;
  --muted: #64717e;
  --faint: #94a0aa;
  --paper: #fffefa;
  --bg: #f4f6f2;
  --line: #dbe3df;
  --mint: #c4f3dc;
  --mint-strong: #1fa36a;
  --mint-deep: #08764a;
  --amber: #f4bd62;
  --amber-on-dark: #f4bd62;
  --amber-bg: #fff7e7;
  --violet: #8c75e7;
  --blue: #4d8eea;
  --red: #e4787b;
  --shadow: 0 14px 35px rgba(0, 0, 0, 0.07);
  --radius: 16px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: var(--bg); color: var(--ink); }
body { font-size: 14px; line-height: 1.45; }
.limit-progress { height: 6px; overflow: hidden; border-radius: 999px; background: #e9eff1; }
.limit-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint-deep), #83e6bd); transition: width .25s ease; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, input, select, textarea { outline-color: var(--mint-strong); }

.app-shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; min-height: 100vh; padding: 28px 18px 18px; background: var(--navy); color: #dbe7f2; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 25px; }
.brand-mark { display: block; width: 39px; height: 39px; padding: 3px; border-radius: 12px; background: var(--mint); object-fit: contain; }
.brand-name { color: #fff; font-size: 17px; font-weight: 850; letter-spacing: -0.04em; }
.brand-subtitle { margin-top: 2px; color: #90a5bb; font-size: 9px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.workspace-switcher { display: flex; align-items: center; gap: 9px; margin: 0 2px 28px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 11px; background: rgba(255,255,255,.055); color: #c5d4e3; font-size: 11px; font-weight: 750; }
.workspace-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint-strong); }
.workspace-chevron { margin-left: auto; color: #8198ae; font-size: 17px; line-height: 1; }
.main-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item, .tool-item, .admin-entry { display: flex; align-items: center; width: 100%; border: 0; background: transparent; color: #8ea3b7; text-align: left; }
.nav-item { gap: 12px; padding: 11px 12px; border-radius: 10px; font-size: 12px; font-weight: 750; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.09); color: #fff; }
.nav-item.active { box-shadow: inset 3px 0 0 var(--mint); }
.nav-icon { width: 17px; color: currentColor; font-size: 15px; text-align: center; }
.nav-count { margin-left: auto; color: #9bb0c3; font-size: 10px; font-variant-numeric: tabular-nums; }
.sidebar-section-title { margin: 32px 12px 9px; color: #68839c; font-size: 9px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.tool-list { display: flex; flex-direction: column; gap: 2px; }
.tool-item { gap: 9px; padding: 9px 12px; border-radius: 9px; color: #a6b7c7; font-size: 11px; font-weight: 650; }
.tool-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.tool-dot { width: 7px; height: 7px; border-radius: 50%; }
.tool-dot.mint { background: var(--mint-strong); }.tool-dot.amber { background: var(--amber); }
.tool-plus { margin-left: auto; color: #7890a7; font-size: 15px; }
.tool-badge { margin-left: auto; padding: 3px 5px; border-radius: 4px; background: rgba(244,189,98,.16); color: var(--amber-on-dark); font-size: 11px; font-weight: 850; letter-spacing: .06em; }
.sidebar-bottom { margin-top: auto; }
.admin-entry { gap: 12px; margin-bottom: 16px; padding: 10px 12px; border-radius: 9px; font-size: 11px; font-weight: 700; }
.admin-entry:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-dot { width: 5px; height: 5px; margin-left: auto; border-radius: 50%; background: var(--mint-strong); }
.profile-mini { display: flex; align-items: center; gap: 9px; padding: 14px 5px 0; border-top: 1px solid rgba(255,255,255,.08); }
.avatar { display: grid; place-items: center; width: 31px; height: 31px; border: 0; border-radius: 10px; background: #dcecff; color: #2b5b8e; font-size: 10px; font-weight: 850; }
.profile-mini-copy { display: flex; flex-direction: column; min-width: 0; }
.profile-mini-copy strong { color: #eaf2fa; font-size: 11px; }.profile-mini-copy span { color: #7189a0; font-size: 9px; }
.profile-more { margin-left: auto; border: 0; background: transparent; color: #7991a8; letter-spacing: 2px; }

.main-content { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 74px; padding: 0 42px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.83); }
.breadcrumbs { display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 11px; font-weight: 650; }.breadcrumbs strong { color: var(--ink); }.crumb-separator { color: #c2ccd6; }
.topbar-actions { display: flex; align-items: center; gap: 17px; }.topbar-status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 650; }.status-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--mint-strong); box-shadow: 0 0 0 4px rgba(31,163,106,.1); }
.icon-button { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 18px; }.icon-button:hover { background: #eef3f7; color: var(--ink); }.notification-dot { position: absolute; top: 5px; right: 5px; width: 5px; height: 5px; border: 1px solid #fff; border-radius: 50%; background: var(--red); }
.avatar-small { width: 31px; height: 31px; }
.view-root { max-width: 1440px; margin: 0 auto; padding: 38px 42px 70px; }

.view-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }.eyebrow { color: var(--mint-deep); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }.view-heading h1 { margin: 7px 0 0; color: var(--navy); font-size: 34px; line-height: 1.05; letter-spacing: -.05em; }.view-heading p { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 0 15px; border: 1px solid transparent; border-radius: 10px; font-size: 11px; font-weight: 800; transition: .16s ease; }.button:hover { transform: translateY(-1px); }.button-primary { background: var(--navy); color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.12); }.button-primary:hover { background: var(--navy-2); }.button-secondary { border-color: var(--line); background: #fff; color: var(--ink); }.button-secondary:hover { border-color: #bac9d6; }.button-mint { background: #e9f9f0; border-color: #d1f0de; color: var(--mint-deep); }.button-ghost { min-height: auto; padding: 7px 0; background: transparent; color: var(--muted); }.button-danger { border-color: #f5d8d9; background: #fff5f5; color: #b55f63; }
.button-icon { font-size: 16px; line-height: .8; }.pro-label { display: inline-flex; align-items: center; padding: 3px 5px; border-radius: 4px; background: #fff2cf; color: #9c6b15; font-size: 8px; font-weight: 900; letter-spacing: .06em; }
.auth-recovery-link { justify-self: start; margin-top: 5px; padding: 0; font-size: 10px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 20px; }.stat-card { min-height: 130px; padding: 18px 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }.stat-card.featured { background: var(--navy); border-color: var(--navy); color: #fff; }.stat-label { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }.featured .stat-label { color: #a9c0d4; }.stat-value { margin-top: 19px; color: var(--navy); font-size: 26px; font-weight: 850; letter-spacing: -.05em; }.featured .stat-value { color: var(--mint); }.stat-note { margin-top: 5px; color: var(--faint); font-size: 10px; }.featured .stat-note { color: #a9c0d4; }.stat-trend { float: right; margin-top: 18px; color: var(--mint-strong); font-size: 10px; font-weight: 800; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(330px, .8fr); gap: 18px; }.card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 21px 22px 16px; }.card-title { color: var(--navy); font-size: 14px; font-weight: 850; }.card-subtitle { margin-top: 4px; color: var(--muted); font-size: 10px; }.card-header-action { color: var(--muted); font-size: 10px; font-weight: 750; }
.estimate-list { padding: 0 10px 10px; }.estimate-row { display: grid; grid-template-columns: 10px minmax(0,1fr) auto auto auto; gap: 14px; align-items: center; padding: 14px 12px; border-top: 1px solid var(--line); }.estimate-row:hover { background: #fafcfd; }.estimate-stage-dot { width: 8px; height: 8px; border-radius: 50%; }.estimate-stage-dot.pre { background: var(--violet); }.estimate-stage-dot.prod { background: var(--mint-strong); }.estimate-stage-dot.post { background: var(--blue); }.estimate-row-main { min-width: 0; }.estimate-row-title { overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }.estimate-row-meta { margin-top: 3px; color: var(--muted); font-size: 10px; }.estimate-row-total { color: var(--navy); font-size: 12px; font-weight: 850; white-space: nowrap; }.estimate-row-status { padding: 4px 7px; border-radius: 5px; background: #edf8f2; color: var(--mint-deep); font-size: 9px; font-weight: 800; }.estimate-row-actions { display: flex; align-items: center; gap: 2px; }.estimate-row-action { width: 25px; height: 25px; border: 0; border-radius: 6px; background: transparent; color: #b1bdc8; font-size: 16px; }.estimate-row-action:hover { background: #eef4f7; color: var(--navy); }.estimate-row-action.danger:hover { background: #fff1f1; color: #b55f63; }
.quick-card { padding-bottom: 19px; }.quick-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 0 21px; }.quick-item { display: flex; flex-direction: column; gap: 7px; min-height: 96px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfd; text-align: left; }.quick-item:hover { border-color: #b9d9c8; background: #f4fbf7; }.quick-item-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #eaf8f0; color: var(--mint-deep); font-size: 14px; }.quick-item:nth-child(2) .quick-item-icon { background: #f2edff; color: var(--violet); }.quick-item strong { color: var(--ink); font-size: 10px; }.quick-item span { color: var(--muted); font-size: 9px; line-height: 1.3; }
.activity-card { margin-top: 18px; }.activity-list { padding: 0 22px 19px; }.activity-item { display: flex; gap: 11px; padding: 11px 0; border-top: 1px solid var(--line); }.activity-icon { flex: 0 0 auto; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #edf4fb; color: var(--blue); font-size: 12px; }.activity-copy { min-width: 0; }.activity-copy strong { display: block; color: var(--ink); font-size: 10px; }.activity-copy span { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }.activity-time { margin-left: auto; color: #aab6c2; font-size: 9px; white-space: nowrap; }

.estimate-shell { max-width: 1280px; margin: 0 auto; }.estimate-topline { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; margin-bottom: 23px; }.estimate-topline h1 { margin-top: 6px; color: var(--navy); font-size: 32px; letter-spacing: -.05em; }.estimate-topline p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }.estimate-actions { display: flex; gap: 8px; }
.estimate-kpis { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 12px; margin-bottom: 17px; }.estimate-kpi { min-height: 104px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }.estimate-kpi.primary { background: var(--navy); border-color: var(--navy); }.estimate-kpi-label { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }.primary .estimate-kpi-label { color: #a9c0d4; }.estimate-kpi-value { margin-top: 13px; color: var(--navy); font-size: 23px; font-weight: 850; letter-spacing: -.04em; }.primary .estimate-kpi-value { color: var(--mint); }.estimate-kpi-note { margin-top: 3px; color: var(--muted); font-size: 9px; }.primary .estimate-kpi-note { color: #a9c0d4; }
.free-limit { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 17px; padding: 12px 15px; border: 1px solid #f1dfad; border-radius: 12px; background: var(--amber-bg); }.free-limit-copy { display: flex; align-items: center; gap: 10px; min-width: 0; }.free-limit-icon { display: grid; place-items: center; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; background: #ffe9ad; color: #9b6d16; font-weight: 900; }.free-limit strong { display: block; color: #735416; font-size: 10px; }.free-limit span { display: block; margin-top: 2px; color: #aa8b4f; font-size: 9px; }
.estimate-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 17px; align-items: start; }.stage-tabs { display: flex; gap: 4px; margin-bottom: 12px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #edf2f6; }.stage-tab { flex: 1; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 800; }.stage-tab.active { background: #fff; color: var(--navy); box-shadow: 0 2px 8px rgba(20,40,62,.06); }.stage-tab em { margin-left: 4px; color: #a6b2bf; font-style: normal; font-weight: 700; }
.composition-card { overflow: hidden; }.composition-header { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }.composition-title { display: flex; align-items: center; gap: 11px; }.composition-marker { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: #e7f8ee; color: var(--mint-deep); font-weight: 900; }.composition-title strong { display: block; color: var(--navy); font-size: 13px; }.composition-title span { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }.composition-total { color: var(--navy); font-size: 14px; font-weight: 850; }.stage-header { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 17px 0 8px; }.stage-heading { display: flex; align-items: center; gap: 9px; min-width: 0; }.stage-marker { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: #f0ecff; color: var(--violet); font-size: 14px; font-weight: 900; }.stage-marker.custom { background: #eaf5ff; color: var(--blue); }.stage-heading strong { display: block; color: var(--navy); font-size: 13px; }.stage-heading span:not(.stage-total) { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }.stage-total { margin-left: 10px; color: var(--navy); font-size: 12px; font-weight: 850; white-space: nowrap; }.stage-actions { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }.stage-add-button { padding: 7px 10px !important; font-size: 9px !important; }.stage-reorder { width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--muted); font-size: 13px; font-weight: 800; }.stage-reorder:hover:not(:disabled) { border-color: var(--mint); color: var(--mint-deep); }.stage-reorder:disabled { opacity: .35; }.section-block { padding: 0 20px 14px; }.section-block + .section-block { border-top: 1px solid var(--line); }.section-label { display: flex; justify-content: space-between; padding: 16px 0 9px; color: #5d7187; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }.section-label span:last-child { color: #92a0ae; letter-spacing: 0; }.line-row { display: grid; grid-template-columns: minmax(0,1fr) 78px 55px 90px 90px 27px; gap: 8px; align-items: center; min-height: 46px; border-top: 1px solid #f0f3f6; }.line-row.header { min-height: 25px; border: 0; color: #a1aebb; font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }.line-row.header > div:not(:first-child) { text-align: right; }.line-item { display: flex; align-items: center; gap: 9px; min-width: 0; }.line-item-dot { display: grid; place-items: center; flex: 0 0 auto; width: 23px; height: 23px; border-radius: 7px; background: #edf4fb; color: var(--blue); font-size: 10px; }.line-item-dot.equipment { background: #eaf8f0; color: var(--mint-deep); }.line-item-dot.crew { background: #f2edff; color: var(--violet); }.line-item-copy { min-width: 0; }.line-item-copy strong { display: block; overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.line-item-copy span { display: block; overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }.line-cell { color: var(--ink); font-size: 10px; text-align: right; }.line-cell.total { font-weight: 850; }.line-input { width: 100%; padding: 5px 4px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); font-size: 10px; text-align: right; }.line-input:hover, .line-input:focus { border-color: var(--line-strong); background: #fff; }.line-delete { border: 0; background: transparent; color: #c3cdd6; font-size: 15px; }.line-delete:hover { color: var(--red); }.section-add { display: inline-flex; align-items: center; gap: 5px; margin-top: 9px; padding: 5px 0; border: 0; background: transparent; color: var(--mint-deep); font-size: 9px; font-weight: 850; }.section-add:hover { color: var(--navy); }.empty-section { padding: 7px 0; color: #a8b5c0; font-size: 10px; }
.audit-card { padding-bottom: 12px; }.audit-card.pro-locked { position: relative; overflow: hidden; }.audit-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 18px 18px 12px; }.audit-title { display: flex; align-items: center; gap: 8px; color: var(--navy); font-size: 12px; font-weight: 850; }.audit-title-mark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: #fff3d4; color: #ad7714; font-size: 12px; }.audit-header > span { color: var(--muted); font-size: 9px; }.audit-body { padding: 0 18px; }.audit-summary { padding: 10px; border-radius: 10px; background: #f7fafc; color: var(--muted); font-size: 9px; line-height: 1.45; }.audit-summary strong { color: var(--navy); }.audit-issue { display: flex; gap: 9px; padding: 11px 0; border-bottom: 1px solid var(--line); }.audit-issue:last-child { border-bottom: 0; }.issue-icon { display: grid; place-items: center; flex: 0 0 auto; width: 21px; height: 21px; border-radius: 7px; background: #fff3d4; color: #a87313; font-size: 11px; font-weight: 900; }.issue-icon.info { background: #edf5ff; color: var(--blue); }.issue-copy strong { display: block; color: var(--ink); font-size: 9px; }.issue-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.35; }.audit-footer { padding: 4px 18px 0; }.pro-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; background: rgba(255,255,255,.91); text-align: center; backdrop-filter: blur(2px); }.pro-overlay strong { color: var(--navy); font-size: 12px; }.pro-overlay span { max-width: 210px; margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.45; }.pro-overlay .button { margin-top: 12px; min-height: 32px; font-size: 9px; }
.rental-compare { margin-top: 17px; }.rental-compare-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 17px 18px 12px; }.rental-compare-header strong { color: var(--navy); font-size: 12px; }.rental-compare-header span { color: var(--muted); font-size: 9px; }.rental-card { margin: 0 12px 8px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; }.rental-card.active { border-color: #b9e6ca; background: #f7fcf9; }.rental-card.selected { box-shadow: 0 0 0 2px rgba(38, 166, 105, .12); }.rental-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }.rental-name { display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: 10px; font-weight: 850; }.rental-bullet { width: 7px; height: 7px; border-radius: 50%; }.rental-bullet.green { background: var(--mint-strong); }.rental-bullet.violet { background: var(--violet); }.rental-bullet.blue { background: var(--blue); }.rental-bullet.amber { background: var(--amber); }.rental-price { margin-top: 7px; color: var(--navy); font-size: 11px; font-weight: 850; }.rental-meta { margin-top: 5px; color: var(--muted); font-size: 8px; }.rental-tag { padding: 3px 5px; border-radius: 4px; background: #e8f8ef; color: var(--mint-deep); font-size: 8px; font-weight: 800; }.rental-card.disabled { opacity: .55; }.rental-select-button, .rental-apply-button { display: block; margin-top: 8px; padding: 0; border: 0; background: transparent; color: var(--mint-deep); font-size: 8px; font-weight: 850; text-align: left; }.rental-select-button:hover, .rental-apply-button:hover { text-decoration: underline; }.rental-apply-button { color: var(--navy); }

.data-toolbar { display: flex; align-items: center; gap: 9px; margin-bottom: 15px; }.search-box { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 440px; padding: 0 12px; height: 39px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); }.search-box input { width: 100%; border: 0; background: transparent; color: var(--ink); font-size: 11px; }.filter-select { height: 39px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: 10px; font-weight: 700; }.data-table-card { overflow: hidden; }.data-table { width: 100%; border-collapse: collapse; }.data-table th { padding: 12px 17px; background: #f8fafc; color: #96a4b2; font-size: 8px; font-weight: 850; letter-spacing: .08em; text-align: left; text-transform: uppercase; }.data-table td { padding: 13px 17px; border-top: 1px solid var(--line); color: var(--ink); font-size: 10px; }.data-table tr:hover td { background: #fcfefd; }.table-item { display: flex; align-items: center; gap: 9px; }.table-item-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #eaf8f0; color: var(--mint-deep); font-size: 11px; }.table-item strong { display: block; font-size: 10px; }.table-item span { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }.table-rate { font-weight: 850; white-space: nowrap; }.quality-label { display: inline-flex; align-items: center; gap: 5px; color: var(--mint-deep); font-size: 9px; font-weight: 750; }.quality-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint-strong); }.quality-label.warning { color: #9c6b15; }.quality-label.warning .quality-dot { background: var(--amber); }.table-action { border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.rental-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }.rental-admin-card { padding: 19px; }.rental-admin-top { display: flex; justify-content: space-between; gap: 10px; }.rental-admin-name { display: flex; align-items: center; gap: 9px; color: var(--navy); font-size: 14px; font-weight: 850; }.rental-admin-card p { margin: 10px 0 15px; color: var(--muted); font-size: 10px; line-height: 1.5; }.rental-admin-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding-top: 12px; border-top: 1px solid var(--line); }.rental-admin-meta span { display: block; color: var(--muted); font-size: 8px; }.rental-admin-meta strong { display: block; margin-top: 3px; color: var(--ink); font-size: 10px; }.rental-admin-actions { display: flex; gap: 7px; margin-top: 15px; }.rental-admin-actions .button { min-height: 30px; padding: 0 9px; font-size: 9px; }
.analytics-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(260px,.8fr); gap: 17px; }.chart-card { padding-bottom: 20px; }.chart { display: flex; align-items: flex-end; gap: 11px; height: 210px; padding: 20px 22px 0; border-top: 1px solid var(--line); }.bar-wrap { display: flex; flex: 1; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }.bar { width: 100%; max-width: 38px; min-height: 4px; border-radius: 8px 8px 2px 2px; background: #dcebe5; }.bar.active { background: var(--mint-strong); }.bar-label { color: var(--muted); font-size: 8px; }.bar-value { color: var(--navy); font-size: 8px; font-weight: 800; }.insight-list { padding: 0 20px 20px; }.insight-row { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-top: 1px solid var(--line); }.insight-row span { color: var(--muted); font-size: 9px; }.insight-row strong { color: var(--navy); font-size: 11px; }
.admin-grid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 17px; }.settings-panel { padding: 21px; }.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }.setting-row:first-child { padding-top: 0; border-top: 0; }.setting-copy strong { display: block; color: var(--ink); font-size: 11px; }.setting-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }.setting-number { width: 110px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: 11px; font-weight: 800; text-align: right; }.toggle { position: relative; width: 39px; height: 22px; border: 0; border-radius: 20px; background: #dce5eb; }.toggle.on { background: var(--mint-strong); }.toggle::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; content: ""; transition: .16s ease; }.toggle.on::after { left: 20px; }.plan-card { padding: 18px; }.plan-card h3 { margin: 0; color: var(--navy); font-size: 13px; }.plan-card p { margin: 5px 0 14px; color: var(--muted); font-size: 9px; }.plan-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }.plan-row strong { color: var(--navy); font-size: 10px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 25px; background: rgba(8,22,38,.53); backdrop-filter: blur(4px); }.modal { width: min(620px, 100%); max-height: min(740px, calc(100vh - 40px)); overflow: auto; border-radius: 18px; background: #fff; box-shadow: 0 25px 80px rgba(0,0,0,.3); }.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 24px 25px 17px; }.modal-kicker { color: var(--mint-deep); font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }.modal h2 { margin: 5px 0 0; color: var(--navy); font-size: 24px; letter-spacing: -.04em; }.modal-close { width: 29px; height: 29px; border: 0; border-radius: 8px; background: #f0f4f7; color: var(--muted); font-size: 17px; }.modal-body { padding: 0 25px 24px; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.form-field { display: flex; flex-direction: column; gap: 6px; }.form-field.full { grid-column: 1 / -1; }.form-field label { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }.form-field input, .form-field select, .form-field textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-size: 11px; }.form-field textarea { min-height: 76px; resize: vertical; }.catalog-result-list { max-height: 220px; overflow: auto; margin-top: 7px; border: 1px solid var(--line); border-radius: 9px; }.catalog-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: var(--ink); text-align: left; width: 100%; }.catalog-result:last-child { border-bottom: 0; }.catalog-result:hover, .catalog-result.selected { background: #f3fbf6; }.catalog-result strong { display: block; font-size: 10px; }.catalog-result span { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }.catalog-result-price { color: var(--navy); font-size: 10px; font-weight: 850; white-space: nowrap; }.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 25px 20px; border-top: 1px solid var(--line); }
.workspace-modal { width: min(700px, 100%); }
.workspace-list { display: grid; gap: 8px; }
.workspace-option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); color: var(--ink); text-align: left; }
.workspace-option:hover, .workspace-option.active { border-color: var(--mint-deep); background: #f2fbf5; }
.workspace-option-mark { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 8px; background: var(--navy); color: var(--mint); font-size: 12px; font-weight: 900; }
.workspace-option-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 2px; }
.workspace-option-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-option-copy small { color: var(--muted); font-size: 9px; }
.workspace-option-check { color: var(--mint-deep); font-size: 10px; font-weight: 900; }
.workspace-section { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.workspace-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.workspace-section-heading strong { color: var(--navy); font-size: 12px; }
.workspace-section-heading span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.workspace-member-list { display: grid; gap: 5px; }
.workspace-member-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); }
.workspace-member-row:first-child { border-top: 0; }
.workspace-member-copy { min-width: 0; }
.workspace-member-copy strong, .workspace-member-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-member-copy strong { color: var(--ink); font-size: 10px; }
.workspace-member-copy small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.workspace-member-row select { min-width: 96px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font-size: 9px; }
.workspace-member-revoke { padding: 6px 7px; border: 0; border-radius: 7px; background: transparent; color: var(--danger, #b34c4c); font-size: 9px; }
.workspace-member-revoke:hover { background: #fff1f1; }
.workspace-invitation-list { display: grid; gap: 5px; }
.workspace-invitation-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); }
.workspace-invitation-row:first-child { border-top: 0; }
.workspace-empty { padding: 12px; border: 1px dashed var(--line-strong); border-radius: 9px; color: var(--muted); font-size: 10px; }
.workspace-note { margin-top: 12px; padding: 10px 12px; border-radius: 9px; background: #f3f7fa; color: var(--muted); font-size: 10px; line-height: 1.45; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: 330px; padding: 12px 15px; border-radius: 10px; background: var(--navy); color: #fff; box-shadow: 0 12px 25px rgba(0,0,0,.22); font-size: 10px; font-weight: 750; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .18s ease; }.toast.show { opacity: 1; transform: translateY(0); }
.modal-context { margin-top: 7px; color: var(--mint-deep); font-size: 10px; font-weight: 800; }.compact-modal { width: min(440px, 100%); }.modal-warning-copy { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }.context-lock { display: grid; grid-template-columns: 25px 1fr; align-items: center; column-gap: 8px; margin-bottom: 14px; padding: 10px 12px; border: 1px solid #d5efdf; border-radius: 9px; background: #f3fbf6; color: var(--mint-deep); font-size: 12px; }.context-lock small { grid-column: 2; margin-top: 2px; color: var(--muted); font-size: 9px; }.stage-category-picker { display: grid; gap: 8px; }.category-picker-button { display: grid; grid-template-columns: 27px 1fr auto; align-items: center; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); text-align: left; }.category-picker-button:hover { border-color: var(--mint); background: #f3fbf6; }.category-picker-button > span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; background: #edf4fb; color: var(--blue); }.category-picker-button strong { font-size: 11px; }.category-picker-button small { color: var(--muted); font-size: 9px; }.account-card { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 17px; padding: 22px; }.account-card-main { display: flex; align-items: center; gap: 13px; }.account-avatar { width: 44px; height: 44px; font-size: 13px; }.account-card h2 { margin: 5px 0 3px; color: var(--navy); font-size: 19px; }.account-card p { margin: 0; color: var(--muted); font-size: 10px; }.account-plan { display: grid; justify-items: end; gap: 4px; min-width: 170px; }.account-plan strong { color: var(--navy); font-size: 12px; }.account-plan span:last-child { color: var(--muted); font-size: 9px; }.catalog-group-heading { padding: 9px 11px 5px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }.catalog-group-heading:first-child { border-top: 0; }.catalog-group-heading.favorite-heading { color: var(--mint-deep); background: #f3fbf6; }.catalog-result { padding: 0; width: 100%; }.catalog-result-main { display: flex; align-items: center; justify-content: space-between; flex: 1; gap: 12px; min-width: 0; padding: 10px 7px 10px 11px; border: 0; background: transparent; color: var(--ink); text-align: left; }.catalog-result-main:hover { background: #f3fbf6; }.catalog-result-favorite { flex: 0 0 34px; align-self: stretch; border: 0; background: transparent; color: #b2bdc7; font-size: 17px; }.catalog-result-favorite:hover, .catalog-result-favorite.active { color: #d99a22; }.muted { color: var(--muted); }.hidden { display: none !important; }.crew-rate-card { margin-top: 17px; }.crew-rate-card h3 { margin: 0; color: var(--navy); font-size: 15px; }.crew-rate-card > p { margin: 6px 0 14px; color: var(--muted); font-size: 9px; line-height: 1.45; }.crew-rate-list { max-height: 440px; overflow: auto; padding-right: 4px; }.crew-rate-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px auto; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }.crew-rate-row:first-child { border-top: 0; }.crew-rate-row strong, .crew-rate-row small { display: block; }.crew-rate-row strong { color: var(--ink); font-size: 9px; }.crew-rate-row small, .crew-rate-row > span:last-child { color: var(--muted); font-size: 8px; }.crew-rate-row input { width: 100%; padding: 7px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); font-size: 9px; text-align: right; }
.upgrade-summary { display: flex; align-items: flex-start; gap: 11px; padding: 13px; border: 1px solid #d5efdf; border-radius: 11px; background: #f3fbf6; }.upgrade-badge { display: grid; place-items: center; flex: 0 0 37px; height: 27px; border-radius: 8px; background: var(--navy); color: #fff; font-size: 9px; font-weight: 900; letter-spacing: .08em; }.upgrade-summary strong, .upgrade-summary small { display: block; }.upgrade-summary strong { color: var(--navy); font-size: 11px; line-height: 1.35; }.upgrade-summary small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }.upgrade-feature-list { display: grid; gap: 0; margin: 16px 0 0; padding: 0; list-style: none; }.upgrade-feature-list li { display: flex; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }.upgrade-feature-list li > span { display: grid; place-items: center; flex: 0 0 23px; height: 23px; border-radius: 7px; background: #edf5ff; color: var(--blue); font-size: 12px; font-weight: 900; }.upgrade-feature-list strong, .upgrade-feature-list small { display: block; }.upgrade-feature-list strong { color: var(--ink); font-size: 10px; }.upgrade-feature-list small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.35; }.upgrade-note { margin-top: 14px; padding: 10px 11px; border-radius: 8px; background: #fff8e9; color: #8a681e; font-size: 9px; line-height: 1.45; }
.custom-favorite-choice { display: flex !important; flex-direction: row !important; align-items: center; gap: 7px !important; margin-top: 8px; color: var(--mint-deep) !important; font-size: 10px !important; letter-spacing: 0 !important; text-transform: none !important; }.custom-favorite-choice input { width: auto !important; }
.catalog-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.catalog-detail-grid > div, .catalog-spec-list > div { display: flex; flex-direction: column; gap: 4px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; }.catalog-detail-grid span, .catalog-spec-list span { color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }.catalog-detail-grid strong, .catalog-spec-list strong { color: var(--ink); font-size: 10px; line-height: 1.35; }.catalog-spec-list { display: grid; gap: 8px; margin-top: 10px; }.catalog-warning { margin-top: 10px; padding: 10px 11px; border: 1px solid #f1d9a7; border-radius: 9px; background: #fff8e9; color: #946f2e; font-size: 10px; line-height: 1.45; }
.profile-usage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }.profile-usage > div { padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #f7fafb; }.profile-usage span { display: block; color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }.profile-usage strong { display: block; margin-top: 5px; color: var(--navy); font-size: 13px; }
.profile-verification { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 11px 12px; border: 1px solid #f1d9a7; border-radius: 9px; background: #fff8e9; }.profile-verification.verified { border-color: #d5efdf; background: #f3fbf6; }.profile-verification strong, .profile-verification span { display: block; }.profile-verification strong { color: var(--ink); font-size: 10px; }.profile-verification span { margin-top: 3px; color: var(--muted); font-size: 9px; }.profile-verification .button { min-height: 29px; padding: 0 9px; font-size: 9px; }
.admin-users-card .card-header { padding: 0 0 8px; }.admin-users-card .card-header h3 { margin: 0; color: var(--navy); font-size: 13px; }.admin-users-card .card-header p { margin: 5px 0 0; }.admin-user-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 82px 142px; gap: 11px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }.admin-user-row > div { min-width: 0; }.admin-user-row strong, .admin-user-row span { display: block; }.admin-user-row strong { color: var(--ink); font-size: 10px; }.admin-user-row span { margin-top: 3px; color: var(--muted); font-size: 8px; }.admin-user-row select { width: 82px; min-height: 30px; padding: 6px 7px; font-size: 9px; }.admin-user-expiry { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; }.admin-user-expiry input { min-width: 0; width: 118px; min-height: 30px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: 9px; }
.launch-readiness-card { margin-top: 17px; }.launch-readiness-card .card-header { padding: 0 0 10px; }.launch-readiness-card .card-header h3 { margin: 0; color: var(--navy); font-size: 13px; }.launch-readiness-card .card-header p { margin: 5px 0 0; }.readiness-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }.readiness-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 9px; align-items: center; min-height: 48px; border-top: 1px solid var(--line); }.readiness-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }.readiness-dot.ok { background: var(--mint-strong); }.readiness-dot.warning { background: #e5aa48; }.readiness-dot.manual { background: var(--blue); }.readiness-row strong, .readiness-row small { display: block; }.readiness-row strong { color: var(--ink); font-size: 10px; }.readiness-row small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }.readiness-status { color: var(--muted); font-size: 8px; font-weight: 850; white-space: nowrap; }.readiness-status.ok { color: var(--mint-deep); }.readiness-status.warning { color: #a96d17; }.readiness-status.manual { color: var(--blue); }.readiness-footnote { margin-top: 12px; padding: 9px 10px; border-radius: 8px; background: #f6f8fa; color: var(--muted); font-size: 8px; line-height: 1.45; }
.setting-subheading { margin: 18px 0 2px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--navy); font-size: 10px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.catalog-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 18px 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }.catalog-pagination .button { min-height: 29px; padding: 7px 11px; font-size: 9px; }.catalog-pagination .button:disabled { cursor: default; opacity: .45; }
.estimate-details { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) 170px; gap: 12px; margin-bottom: 17px; padding: 15px 17px; }.detail-field { display: flex; flex-direction: column; gap: 5px; }.detail-field label { color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }.detail-field input { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 11px; font-weight: 700; }.detail-field input:focus { border-color: #b9dfc8; box-shadow: 0 0 0 3px rgba(31,163,106,.08); }
.estimate-save-state { margin-top: 7px; color: var(--mint-deep); font-size: 9px; font-weight: 800; }.estimate-save-state.dirty { color: #b17b1f; }
.estimate-summary { margin-top: 17px; }
.estimate-empty-note { display: flex; flex-direction: column; gap: 5px; margin-top: 17px; padding: 16px 18px; border: 1px dashed #cdd9e2; border-radius: 12px; background: #fbfcfd; color: var(--muted); font-size: 10px; line-height: 1.45; }
.estimate-empty-note strong { color: var(--navy); font-size: 11px; }

@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff; }
  .sidebar, .topbar, .estimate-actions, .free-limit, .stage-tabs, .audit-card, .rental-compare, .section-add, .row-actions, .toast { display: none !important; }
  .app-shell { display: block; min-height: 0; }
  .view-root { max-width: none; padding: 0; }
  .estimate-shell { max-width: none; }
  .estimate-topline { margin-bottom: 12px; }
  .estimate-topline h1 { font-size: 24px; }
  .estimate-details { margin-bottom: 12px; padding: 10px 12px; box-shadow: none; }
  .detail-field input { padding: 0; border: 0; font-size: 10px; }
  .estimate-kpis { gap: 8px; margin-bottom: 10px; }
  .estimate-kpi { min-height: 72px; padding: 10px 12px; box-shadow: none; }
  .estimate-kpi-value { margin-top: 7px; font-size: 16px; }
  .estimate-kpi-note { font-size: 8px; }
  .composition-card, .card { border-color: #d7dfe6; box-shadow: none; }
  .section-block { padding-bottom: 9px; }
  .line-row { min-height: 34px; }
  .line-input { padding: 0; border: 0; }
}

@media (max-width: 1120px) { .view-root { padding: 30px 25px 60px; }.topbar { padding: 0 25px; }.stats-grid { grid-template-columns: repeat(2, 1fr); }.estimate-layout { grid-template-columns: 1fr; }.audit-card, .rental-compare { display: block; }.rental-compare { display: grid; grid-template-columns: repeat(2,1fr); }.rental-compare-header { grid-column: 1 / -1; }.rental-compare .rental-card { margin: 0 0 8px; }.dashboard-grid, .analytics-grid, .admin-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .app-shell { display: block; }.sidebar { display: none; }.topbar { height: 62px; padding: 0 16px; }.topbar-status { display: none; }.view-root { padding: 24px 16px 45px; }.view-heading, .estimate-topline { align-items: flex-start; flex-direction: column; }.view-heading h1, .estimate-topline h1 { font-size: 28px; }.view-heading .button, .estimate-actions { width: 100%; }.estimate-actions .button { flex: 1; }.stats-grid { gap: 9px; }.stat-card { min-height: 108px; padding: 14px; }.stat-value { margin-top: 13px; font-size: 21px; }.dashboard-grid, .rental-grid, .rental-compare { grid-template-columns: 1fr; }.rental-compare-header { grid-column: auto; }.estimate-kpis { grid-template-columns: 1fr; }.estimate-details { grid-template-columns: 1fr; }.stage-tabs { overflow-x: auto; }.stage-tab { min-width: 110px; }.composition-card { overflow-x: auto; }.composition-header, .section-block { min-width: 720px; }.line-row { grid-template-columns: minmax(250px,1fr) 78px 55px 90px 90px 27px; }.data-toolbar { align-items: stretch; flex-direction: column; }.search-box { max-width: none; }.quick-list { grid-template-columns: 1fr; }.form-grid { grid-template-columns: 1fr; }.form-field.full { grid-column: auto; }.modal { max-height: calc(100vh - 22px); }.free-limit { align-items: flex-start; flex-direction: column; }.free-limit .button { width: 100%; } }
@media (max-width: 1120px) { .readiness-list { grid-template-columns: 1fr; } }
.account-avatar { width: 44px; height: 44px; font-size: 13px; }
.account-card { border-color: #d6eee0; background: linear-gradient(135deg, #ffffff 0%, #f4fbf7 100%); }
 .quality-warning-text { color: #ad7714 !important; }
 .catalog-health-note { margin-top: 12px; padding: 10px 11px; border: 1px solid #f1d9a7; border-radius: 9px; background: #fff8e9; color: #946f2e; font-size: 9px; line-height: 1.45; }
.mobile-menu-button, .mobile-nav-scrim { display: none; }
.back-to-estimates { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 8px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 10px; font-weight: 800; }
.back-to-estimates:hover { color: var(--mint-deep); }
.estimate-topline > div:first-child { min-width: 0; }
.estimate-topline h1 { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .mobile-menu-button { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--navy); font-size: 17px; }
  .mobile-nav-scrim { position: fixed; z-index: 19; inset: 0; background: rgba(16,35,60,.32); }
  .app-shell.mobile-nav-open .mobile-nav-scrim { display: block; }
  .app-shell.mobile-nav-open .sidebar { transform: translateX(0); box-shadow: 18px 0 40px rgba(0,0,0,.2); }
  .sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; width: min(280px, 84vw); min-height: 100vh; transform: translateX(-105%); transition: transform .2s ease; }
  .topbar { gap: 10px; }
  .breadcrumbs { min-width: 0; overflow: hidden; flex: 1; white-space: nowrap; text-overflow: ellipsis; }
  .topbar-actions { flex: 0 0 auto; gap: 6px; }
  .topbar-actions .icon-button { display: none; }
  .view-root { padding: 22px 13px 42px; }
  .estimate-topline { gap: 14px; margin-bottom: 17px; }
  .estimate-topline > div:first-child { width: 100%; }
  .estimate-topline h1 { font-size: 28px; line-height: 1.08; }
  .estimate-topline p { font-size: 10px; line-height: 1.45; }
  .estimate-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; width: 100%; }
  .estimate-actions .button { width: 100%; min-height: 42px; padding: 0 8px; font-size: 10px; }
  .estimate-actions .button:first-child { grid-column: 1 / -1; }
  .estimate-details { gap: 9px; margin-bottom: 13px; padding: 12px; }
  .estimate-layout { display: block; }
  .estimate-layout > div + div { margin-top: 14px; }
  .composition-card { overflow: visible; }
  .composition-header, .section-block { min-width: 0; }
  .composition-header { align-items: flex-start; padding: 14px 13px; }
  .composition-title { min-width: 0; gap: 9px; }
  .composition-title span { max-width: 210px; line-height: 1.35; }
  .composition-header > .button { flex: 0 0 auto; min-height: 36px; padding: 0 10px; }
  .stage-card { margin: 7px 5px; padding: 0 10px 10px; }
  .stage-header { flex-wrap: wrap; align-items: flex-start; gap: 6px; }
  .stage-heading { flex: 1 1 100%; }
  .stage-heading-copy { flex: 1; min-width: 0; }
  .stage-actions { width: 100%; justify-content: flex-end; margin-top: 1px; }
  .stage-add-button { min-height: 34px; }
  .stage-card .section-label { padding-top: 8px; }
  .line-row.header { display: none; }
  .line-row:not(.header) { grid-template-columns: repeat(3, minmax(0, 1fr)) 36px; gap: 5px; min-height: 0; padding: 9px 0; }
  .line-row:not(.header) .line-item { grid-column: 1 / -1; }
  .line-row:not(.header) .line-cell:nth-child(2), .line-row:not(.header) .line-cell:nth-child(3), .line-row:not(.header) .line-cell:nth-child(4) { text-align: left; }
  .line-row:not(.header) .line-cell:nth-child(2)::before { content: "Ставка"; }
  .line-row:not(.header) .line-cell:nth-child(3)::before { content: "Кол-во"; }
  .line-row:not(.header) .line-cell:nth-child(4)::before { content: "Смены"; }
  .line-row:not(.header) .line-cell:nth-child(2)::before, .line-row:not(.header) .line-cell:nth-child(3)::before, .line-row:not(.header) .line-cell:nth-child(4)::before { display: block; margin-bottom: 2px; color: var(--muted); font-size: 7px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
  .line-row:not(.header) .line-cell:nth-child(5) { grid-column: 1 / 4; padding-top: 2px; text-align: left; }
  .line-row:not(.header) .row-actions { grid-column: 4; grid-row: 3; justify-content: flex-end; }
  .line-row:not(.header) .line-input { padding: 4px 2px; font-size: 10px; text-align: left; }
  .rental-compare { display: block; }
  .rental-compare .rental-card { margin: 0 0 8px; }
  .dashboard-personal-stats { gap: 8px; }
}

/* Cleaner shell: the account is in the header, while estimates stay one click away. */
.sidebar-new-estimate { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 43px; margin: 0 0 18px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--mint); color: var(--navy); font-size: 11px; font-weight: 900; box-shadow: 0 8px 18px rgba(0,0,0,.12); }
.sidebar-new-estimate:hover { background: #d7f9e7; transform: translateY(-1px); }
.workspace-switcher { margin: -7px 0 18px; }
.workspace-switcher-button { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 52px; padding: 8px 10px; border: 1px solid rgba(171,226,198,.22); border-radius: 11px; background: rgba(255,255,255,.055); color: #dbe7f2; text-align: left; transition: border-color var(--motion-fast) var(--ease-out), background-color var(--motion-fast) var(--ease-out); }
.workspace-switcher-button:hover, .workspace-switcher-button:focus-visible { border-color: rgba(171,226,198,.58); background: rgba(255,255,255,.1); }
.workspace-switcher-mark { display: grid; grid-template-columns: repeat(2, 5px); gap: 2px; flex: 0 0 12px; width: 12px; height: 12px; }
.workspace-switcher-mark i { display: block; width: 5px; height: 5px; border-radius: 1px; background: var(--mint); }
.workspace-switcher-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }
.workspace-switcher-copy small { color: #88a1b5; font-size: 11px; letter-spacing: .02em; }
.workspace-switcher-copy strong { overflow: hidden; color: #f2f7f8; font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.workspace-switcher-chevron { width: 7px; height: 7px; margin-right: 2px; border-right: 1.5px solid #a7bdca; border-bottom: 1.5px solid #a7bdca; transform: rotate(45deg) translateY(-2px); }
.sidebar-estimates-group { position: relative; }
.sidebar-estimates-head { display: flex; align-items: center; gap: 4px; }
.sidebar-estimates-head .nav-item { min-width: 0; flex: 1; }
.sidebar-estimates-toggle { flex: 0 0 29px; width: 29px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: #8ea3b7; font-size: 16px; }
.sidebar-estimates-toggle:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-estimate-list { display: grid; gap: 2px; max-height: 330px; margin: 3px 0 0 18px; overflow: auto; border-left: 1px solid rgba(255,255,255,.11); padding-left: 8px; }
.sidebar-estimate-list.collapsed { display: none; }
.sidebar-estimate-row { display: grid; grid-template-columns: 7px minmax(0, 1fr); gap: 7px; align-items: center; width: 100%; padding: 7px 7px; border: 0; border-radius: 7px; background: transparent; color: #9eb0c0; text-align: left; }
.sidebar-estimate-row:hover, .sidebar-estimate-row.active { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-estimate-row .estimate-stage-dot { width: 6px; height: 6px; }
.sidebar-estimate-copy { min-width: 0; }
.sidebar-estimate-copy strong, .sidebar-estimate-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-estimate-copy strong { font-size: 9px; font-weight: 750; }
.sidebar-estimate-copy small { margin-top: 2px; color: #70879d; font-size: 8px; }
.sidebar-estimate-status { display: none; }
.sidebar-estimate-empty { padding: 9px 7px; color: #70879d; font-size: 9px; }
.profile-mini-copy { flex: 1; padding: 0; border: 0; background: transparent; text-align: left; }
.profile-mini-copy:hover strong { color: #fff; }
.topbar-account { display: flex; align-items: center; gap: 10px; min-width: 218px; padding: 5px 7px 5px 11px; border: 1px solid transparent; border-radius: 11px; background: transparent; text-align: right; }
.topbar-account:hover { border-color: var(--line); background: #f8fafc; }
.topbar-account-copy { display: flex; flex-direction: column; min-width: 0; }
.topbar-account-copy strong { overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-account-copy span { overflow: hidden; margin-top: 1px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-account-copy small { margin-top: 2px; color: var(--mint-deep); font-size: 11px; font-weight: 850; white-space: nowrap; }
.button-large { min-height: 44px; padding-inline: 18px; font-size: 12px; }
.account-settings-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 17px; }
.account-settings-card { padding: 21px; }
.account-settings-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.account-settings-card .card-header { padding: 0 0 17px; }
.account-settings-card .account-avatar { width: 44px; height: 44px; font-size: 13px; }
.account-profile-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; margin-bottom: 17px; }
.account-profile-summary > div { padding: 12px 0; border-top: 1px solid var(--line); }
.account-profile-summary span, .account-profile-summary strong { display: block; }
.account-profile-summary span { color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.account-profile-summary strong { margin-top: 4px; overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.account-usage-list { margin-bottom: 16px; }
.account-usage-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.account-usage-list span { color: var(--muted); font-size: 10px; }
.account-usage-list strong { color: var(--navy); font-size: 11px; }
.account-admin-link { width: 100%; }
.rental-sources-card { grid-column: 1 / -1; overflow: hidden; }
.rental-sources-card .card-header { align-items: center; }
.rental-source-list { padding: 0 21px 10px; }
.rental-source-row { display: grid; grid-template-columns: minmax(210px, 1fr) minmax(170px, .8fr) 170px auto; gap: 18px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.rental-source-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rental-source-main > div { min-width: 0; }
.rental-source-main strong, .rental-source-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rental-source-main strong { color: var(--ink); font-size: 11px; }
.rental-source-main small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.source-toggle { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; font-weight: 750; cursor: pointer; }
.source-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-track { position: relative; width: 35px; height: 20px; border-radius: 999px; background: #dce5eb; transition: .16s ease; }
.toggle-track::after { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; content: ""; transition: .16s ease; box-shadow: 0 1px 3px rgba(0,0,0,.16); }
.source-toggle input:checked + .toggle-track { background: var(--mint-strong); }
.source-toggle input:checked + .toggle-track::after { left: 18px; }
.rental-discount-field { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9px; }
.discount-input { display: inline-flex; align-items: center; gap: 3px; }
.discount-input input { width: 56px; padding: 7px 7px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); font-size: 10px; font-weight: 800; text-align: right; }
.discount-input b { color: var(--muted); font-size: 10px; }
.rental-source-status { justify-self: end; padding: 4px 7px; border-radius: 5px; font-size: 8px; font-weight: 800; }
.rental-source-status.connected { background: #e8f8ef; color: var(--mint-deep); }
.rental-source-status.draft { background: #f4f6f8; color: var(--muted); }

@media (max-width: 900px) {
  .rental-source-row { grid-template-columns: minmax(0, 1fr) 150px; gap: 10px; }
  .rental-source-status { justify-self: start; }
}

/* Product direction: the estimate is the interface, so hierarchy and state do the visual work. */
:root {
  --navy: #202832;
  --navy-2: #2d3947;
  --ink: #202832;
  --muted: #5e6a74;
  --faint: #87939b;
  --paper: #fffefa;
  --bg: #f4f6f2;
  --surface-soft: #eef1ed;
  --surface-tint: #f0f6d9;
  --line: #dce3dc;
  --line-strong: #b9c5bf;
  --mint: #d8f36a;
  --mint-strong: #a6c53a;
  --mint-deep: #566a15;
  --amber: #ff9b62;
  --amber-bg: #fff0e8;
  --violet: #7b73d1;
  --blue: #4262ff;
  --red: #d65f60;
  --radius: 14px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --motion-fast: 140ms;
  --motion-normal: 190ms;
  --motion-overlay: 260ms;
}

html { background: var(--bg); }
body { background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; }
::selection { background: var(--mint); color: var(--navy); }
:focus-visible { outline: 3px solid rgba(66,98,255,.35); outline-offset: 3px; }

.app-shell { grid-template-columns: 280px minmax(0, 1fr); min-height: 100svh; }
.sidebar { min-height: 100svh; padding: 25px 16px 17px; background: var(--navy); }
.brand { padding: 0 8px 22px; }
.brand-mark { width: 41px; height: 41px; border-radius: 13px; background: var(--mint); }
.brand-name { font-size: 18px; }
.brand-subtitle { color: #9bb0c0; font-size: 9px; letter-spacing: .1em; }
.sidebar-new-estimate { min-height: 46px; margin: 0 0 21px; border-radius: 11px; background: var(--mint); color: var(--navy); box-shadow: none; font-size: 12px; transition: background-color var(--motion-fast) var(--ease-out), transform var(--motion-fast) var(--ease-out); }
.sidebar-new-estimate:active { transform: scale(.98); }
.sidebar-section-title { margin: 27px 12px 10px; color: #7792a8; font-size: 10px; letter-spacing: .06em; text-transform: none; }
.nav-item { min-height: 40px; padding: 10px 12px; border-radius: 10px; color: #a8bbca; font-size: 12px; }
.nav-item:hover { background: var(--navy-2); color: #fff; }
.nav-item.active { background: var(--navy-2); color: #fff; box-shadow: inset 3px 0 0 var(--mint); }
.nav-icon { font-size: 14px; }
.sidebar-estimates-toggle { height: 38px; color: #a8bbca; }
.sidebar-estimates-list { scrollbar-color: #31526d transparent; }
.sidebar-estimate-list { max-height: 360px; margin-left: 14px; border-left-color: #294761; padding-left: 8px; scrollbar-color: #31526d transparent; }
.sidebar-estimate-row { min-height: 48px; padding: 7px 8px; border-radius: 8px; }
.sidebar-estimate-row:hover, .sidebar-estimate-row.active { background: #1c4263; }
.sidebar-estimate-copy strong { color: #d8e6ef; font-size: 10px; line-height: 1.25; }
.sidebar-estimate-copy small { color: #8099ad; font-size: 9px; line-height: 1.25; }
.profile-mini { padding-top: 16px; border-top-color: #294761; }
.profile-mini-copy strong { color: #eef5f8; font-size: 12px; }
.profile-mini-copy span { color: #8ea7ba; font-size: 10px; }
.profile-more { color: #9db3c3; }

.main-content { min-width: 0; }
.topbar { height: 76px; padding: 0 42px; border-bottom: 1px solid var(--line); background: var(--paper); }
.breadcrumbs { color: var(--muted); font-size: 12px; }
.breadcrumbs strong { color: var(--ink); }
.topbar-actions { gap: 11px; }
.topbar-status { padding-right: 8px; color: var(--muted); font-size: 11px; }
.status-pulse { width: 7px; height: 7px; box-shadow: none; }
.icon-button { width: 36px; height: 36px; border-radius: 9px; color: var(--muted); transition: background-color var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out); }
.icon-button:hover { background: var(--surface-soft); color: var(--ink); }
.topbar-account { width: 298px; min-width: 0; padding: 6px 7px 6px 12px; border-color: var(--line); border-radius: 11px; background: var(--surface-soft); text-align: left; transition: background-color var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out); }
.topbar-account:hover { border-color: var(--line-strong); background: var(--paper); }
.topbar-account-copy { flex: 1; align-items: flex-start; }
.topbar-account-copy strong { font-size: 11px; }
.topbar-account-copy span { margin-top: 2px; font-size: 11px; }
.topbar-account-copy small { margin-top: 3px; font-size: 11px; }
.topbar-account .avatar-small { width: 36px; height: 36px; border-radius: 10px; }

.view-root { max-width: 1480px; padding: 34px 42px 76px; }
.eyebrow { color: var(--mint-deep); font-size: 12px; font-weight: 800; letter-spacing: 0; text-transform: none; }
.view-heading { align-items: flex-end; gap: 32px; margin-bottom: 30px; }
.view-heading h1 { margin-top: 8px; color: var(--navy); font-size: 38px; line-height: 1.02; letter-spacing: -.045em; }
.view-heading p { max-width: 620px; margin-top: 11px; color: var(--muted); font-size: 14px; }
.button { min-height: 42px; padding: 0 16px; border-radius: 10px; font-size: 12px; font-weight: 800; transition: transform var(--motion-fast) var(--ease-out), background-color var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out); }
.button:active { transform: scale(.98); }
.button-primary { background: var(--navy); color: #fff; box-shadow: none; }
.button-primary:hover { background: var(--navy-2); }
.button-secondary { border-color: var(--line); background: var(--paper); color: var(--ink); }
.button-secondary:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.button-mint { border-color: #c3ead2; background: var(--surface-tint); color: var(--mint-deep); }
.button-mint:hover { border-color: #9dd8b6; background: #e3f6ea; }
.button-ghost { color: var(--muted); }
.button-ghost:hover { color: var(--ink); }
.button-large { min-height: 48px; padding-inline: 20px; font-size: 13px; }

.card, .stat-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: none; }
.card-header { padding: 22px 24px 17px; }
.card-title { font-size: 16px; }
.card-subtitle { color: var(--muted); font-size: 12px; }
.estimate-list { padding: 0 14px 12px; }
.estimate-row { min-height: 68px; grid-template-columns: 9px minmax(0,1fr) auto auto auto; gap: 16px; padding: 14px 10px; border-top-color: #e8eef2; }
.estimate-row:hover { background: var(--surface-soft); }
.estimate-row-title { font-size: 13px; }
.estimate-row-meta { color: var(--muted); font-size: 11px; }
.estimate-row-total { font-size: 13px; }
.estimate-row-status { padding: 5px 8px; background: var(--surface-tint); color: var(--mint-deep); font-size: 10px; }
.estimate-row-action { width: 31px; height: 31px; color: var(--faint); transition: background-color var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out); }
.estimate-row-action:hover { background: var(--surface-soft); color: var(--ink); }

.estimate-shell { max-width: 1320px; }
.estimate-topline { align-items: flex-end; margin-bottom: 28px; }
.estimate-topline h1 { margin-top: 9px; color: var(--navy); font-size: 39px; line-height: 1.03; letter-spacing: -.045em; }
.estimate-topline p { margin-top: 10px; color: var(--muted); font-size: 13px; }
.estimate-actions { gap: 9px; }
.estimate-actions .button { min-height: 43px; }
.back-to-estimates { margin-bottom: 8px; color: var(--muted); font-size: 12px; transition: color var(--motion-fast) var(--ease-out); }
.back-to-estimates:hover { color: var(--mint-deep); }
.save-state-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--mint-strong); vertical-align: 1px; }
.estimate-save-state { margin-top: 9px; color: var(--mint-deep); font-size: 12px; font-weight: 750; }
.estimate-save-state.dirty { color: var(--amber); }
.estimate-save-state.dirty .save-state-dot { background: var(--amber); }
.estimate-details { gap: 18px; margin-bottom: 20px; padding: 18px 20px; border-color: var(--line); }
.detail-field { gap: 7px; }
.detail-field label { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: 0; text-transform: none; }
.detail-field input { min-height: 43px; padding: 10px 12px; border-color: var(--line); border-radius: 9px; font-size: 13px; }
.detail-field input:hover { border-color: var(--line-strong); }
.detail-field input:focus { border-color: var(--mint-strong); box-shadow: 0 0 0 3px rgba(18,130,90,.12); }
.estimate-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; }
.estimate-kpis { gap: 14px; margin-bottom: 20px; }
.estimate-kpi { min-height: 118px; padding: 19px 20px; border-color: var(--line); }
.estimate-kpi-label { color: var(--muted); font-size: 11px; letter-spacing: 0; text-transform: none; }
.estimate-kpi-value { margin-top: 17px; font-size: 27px; }
.estimate-kpi-note { margin-top: 6px; font-size: 11px; }
.estimate-kpi.primary { background: var(--navy); }
.stage-tabs { gap: 5px; margin-bottom: 14px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: #e7eef2; }
.stage-tab { min-height: 39px; padding: 9px 13px; border-radius: 8px; font-size: 11px; transition: background-color var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out); }
.stage-tab.active { color: var(--navy); box-shadow: none; }

.composition-card { overflow: visible; }
.composition-header { min-height: 78px; padding: 19px 22px; border-bottom-color: var(--line); }
.composition-marker { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-tint); color: var(--mint-deep); }
.composition-title { gap: 12px; }
.composition-title strong { font-size: 16px; }
.composition-title span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.composition-header-actions { gap: 9px; }
.composition-header-actions .button { min-height: 39px; }
.estimate-outline { top: 0; z-index: 8; margin: 0; padding: 11px 22px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); box-shadow: none; backdrop-filter: none; }
.estimate-outline-label { color: var(--muted); font-size: 11px; font-weight: 750; }
.estimate-outline-tabs { gap: 4px; }
.outline-tab { min-height: 35px; padding: 7px 11px; border-radius: 8px; color: var(--muted); font-size: 11px; transition: background-color var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out); }
.outline-tab:hover { background: var(--surface-soft); color: var(--ink); }
.outline-tab.active { background: var(--navy); color: #fff; }
.outline-tab small { min-width: 18px; padding: 2px 5px; border-radius: 5px; background: rgba(255,255,255,.12); color: inherit; font-size: 10px; }
.stage-card { margin: 12px 12px 14px; padding: 0 16px 16px; border: 0; border-radius: 15px; background: var(--surface-soft); transition: background-color var(--motion-normal) var(--ease-out), opacity var(--motion-normal) var(--ease-out), transform var(--motion-normal) var(--ease-out); }
.stage-card:hover { border-color: transparent; background: #f2f7f9; }
.stage-card.dragging { opacity: .65; transform: scale(.995); }
.stage-card.drag-over { outline: 3px solid rgba(18,130,90,.18); }
.stage-header { min-height: 70px; padding: 15px 0 11px; }
.stage-drag-handle { color: var(--faint); }
.stage-marker { width: 30px; height: 30px; border-radius: 9px; background: #e9e6fb; color: var(--violet); }
.stage-marker.custom { background: #e5f1fc; color: var(--blue); }
.stage-heading { gap: 10px; }
.stage-heading strong { font-size: 16px; }
.stage-heading span:not(.stage-total) { margin-top: 3px; color: var(--muted); font-size: 11px; }
.stage-count { display: inline-block; margin-top: 7px; padding: 3px 7px; border-radius: 5px; background: #e7eef2; color: var(--muted); font-size: 10px; }
.stage-total { font-size: 14px; }
.stage-add-button { min-height: 38px; padding: 0 13px !important; border-radius: 9px !important; font-size: 11px !important; }
.stage-edit-button { width: 34px; height: 34px; border-color: var(--line); background: var(--paper); color: var(--muted); }
.category-block { margin-top: 8px; padding: 0 13px 13px; border-radius: 11px; background: var(--paper); }
.category-block + .category-block { margin-top: 10px; }
.section-label { min-height: 43px; padding: 14px 0 8px; color: var(--ink); font-size: 12px; letter-spacing: 0; text-transform: none; }
.section-heading { gap: 8px; }
.section-marker { color: var(--mint-strong); font-size: 14px; }
.section-count { margin-left: 5px; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: 0; }
.section-label span:last-child { color: var(--muted); font-size: 11px; }
.line-row { min-height: 61px; gap: 10px; border-top-color: #edf2f5; }
.line-row.header { min-height: 32px; color: var(--muted); font-size: 10px; letter-spacing: 0; text-transform: none; }
.line-item { gap: 10px; }
.line-item-dot { width: 28px; height: 28px; border-radius: 9px; font-size: 11px; }
.line-item-copy strong { font-size: 12px; }
.line-item-copy span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.line-cell { font-size: 12px; }
.line-input { min-height: 32px; padding: 6px 7px; border-color: transparent; font-size: 12px; }
.line-input:hover, .line-input:focus { border-color: var(--line-strong); background: var(--surface-soft); }
.line-delete { font-size: 13px; }
.section-add { min-height: 36px; margin-top: 12px; padding: 0 12px; border: 1px solid #c9e9d5; border-radius: 9px; background: var(--surface-tint); color: var(--mint-deep); font-size: 11px; transition: background-color var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out); }
.section-add:hover { border-color: #99d3af; background: #e2f6e9; color: var(--navy); }
.empty-section { padding: 9px 0 5px; color: var(--faint); font-size: 11px; }

.audit-card, .rental-compare { border-color: var(--line); }
.audit-header { padding: 19px 20px 13px; }
.audit-title { font-size: 14px; }
.audit-title-mark { width: 27px; height: 27px; border-radius: 8px; }
.audit-body { padding: 0 20px; }
.audit-issue { padding: 13px 0; }
.audit-issue:last-child { border-bottom: 0; }
.issue-copy strong { font-size: 11px; }
.issue-copy span { font-size: 10px; }
.audit-footer { padding: 6px 20px 2px; }
.rental-compare { margin-top: 20px; }
.rental-compare-header { padding: 19px 20px 14px; }
.rental-compare-header strong { font-size: 14px; }
.rental-compare-header span { display: block; max-width: 225px; margin-top: 5px; line-height: 1.35; font-size: 10px; }
.rental-compare-selection { margin: 0 20px 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); color: var(--muted); font-size: 10px; }
.rental-compare-selection strong { color: var(--navy); font-size: 11px; }
.rental-scope-summary { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(2, minmax(100px, .8fr)); gap: 10px; margin: 0 20px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.rental-scope-summary div { min-width: 0; }
.rental-scope-summary span, .rental-scope-summary strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rental-scope-summary span { color: var(--muted); font-size: 9px; }
.rental-scope-summary strong { margin-top: 3px; color: var(--navy); font-size: 12px; }
.rental-card { margin: 0 14px 10px; padding: 14px; border-color: var(--line); border-radius: 11px; }
.rental-card.active { border-color: #a9dec0; background: var(--surface-tint); }
.rental-card.selected { box-shadow: none; }
.rental-name { font-size: 12px; }
.rental-price { margin-top: 9px; font-size: 14px; }
.rental-meta { font-size: 10px; }
.rental-tag { padding: 4px 6px; font-size: 9px; }
.rental-select-button, .rental-apply-button { margin-top: 10px; font-size: 10px; }

.modal-backdrop { background: rgba(9,27,44,.58); backdrop-filter: blur(3px); }
.modal { max-height: min(780px, calc(100svh - 42px)); border-radius: 16px; box-shadow: 0 22px 60px rgba(0,0,0,.24); opacity: 1; transform: translateY(0) scale(1); transition: opacity var(--motion-overlay) var(--ease-out), transform var(--motion-overlay) var(--ease-out); }
@starting-style { .modal { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-header { padding: 25px 27px 18px; }
.modal-kicker { color: var(--mint-deep); font-size: 11px; letter-spacing: 0; text-transform: none; }
.modal h2 { font-size: 28px; }
.modal-body { padding: 0 27px 27px; }
.modal-footer { padding: 15px 27px 22px; border-top-color: var(--line); }
.modal-close { width: 34px; height: 34px; border-radius: 9px; font-size: 20px; transition: background-color var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out); }
.modal-close:hover { background: #e8eef2; color: var(--ink); }
.context-lock { border-color: #c8e9d4; background: var(--surface-tint); }
.form-field label { color: var(--muted); font-size: 11px; letter-spacing: 0; text-transform: none; }
.form-field input, .form-field select, .form-field textarea { min-height: 43px; border-color: var(--line); border-radius: 9px; font-size: 13px; }
.form-field textarea { min-height: 84px; }
.catalog-result-list { border-color: var(--line); border-radius: 10px; }
.catalog-result-main { min-height: 54px; padding: 11px 9px 11px 13px; }
.catalog-result strong { font-size: 12px; }
.catalog-result span { font-size: 10px; }
.catalog-result.selected { background: var(--surface-tint); box-shadow: inset 3px 0 0 var(--mint-strong); }
.catalog-custom-choice { min-height: 56px; border-color: #c8e9d4; background: var(--surface-tint); }
.toast { right: 27px; bottom: 27px; border-radius: 10px; box-shadow: 0 14px 30px rgba(0,0,0,.2); font-size: 12px; transition: opacity var(--motion-normal) var(--ease-out), transform var(--motion-normal) var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .card:hover { border-color: #cbd9e2; }
  .stage-add-button:hover, .section-add:hover { transform: translateY(-1px); }
}

@media (max-width: 1120px) {
  .view-root { padding-inline: 28px; }
  .topbar { padding-inline: 28px; }
  .estimate-layout { grid-template-columns: 1fr; }
  .audit-card, .rental-compare { display: block; }
  .rental-compare { display: grid; grid-template-columns: repeat(2, 1fr); }
  .rental-compare-header { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .app-shell { min-height: 100svh; }
  .sidebar { min-height: 100svh; }
  .topbar { height: 64px; padding-inline: 13px; }
  .topbar-account { width: auto; min-width: 42px; padding: 4px; background: transparent; border-color: transparent; }
  .topbar-account-copy { display: none; }
  .topbar-account:hover { border-color: transparent; background: var(--surface-soft); }
  .topbar-account .avatar-small { width: 36px; height: 36px; }
  .breadcrumbs { font-size: 11px; }
  .view-root { padding: 24px 13px 48px; }
  .view-heading { align-items: flex-start; gap: 18px; margin-bottom: 22px; }
  .view-heading h1 { font-size: 31px; }
  .view-heading p { font-size: 13px; }
  .view-heading .button { width: 100%; }
  .estimate-topline { gap: 18px; margin-bottom: 20px; }
  .estimate-topline h1 { font-size: 31px; }
  .estimate-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; width: 100%; }
  .estimate-actions .button { width: 100%; min-height: 44px; padding-inline: 8px; }
  .estimate-actions .button:first-child { grid-column: 1 / -1; }
  .estimate-details { grid-template-columns: 1fr; gap: 12px; padding: 15px; }
  .estimate-kpis { grid-template-columns: 1fr; gap: 9px; }
  .estimate-kpi { min-height: 100px; }
  .estimate-layout { display: block; }
  .estimate-layout > div + div { margin-top: 16px; }
  .composition-header { align-items: flex-start; flex-wrap: wrap; gap: 14px; padding: 17px 15px; }
  .composition-header-actions { width: 100%; justify-content: flex-end; }
  .composition-header-actions .button { min-height: 39px; }
  .estimate-outline { position: relative; overflow-x: auto; margin: 0; padding: 10px 15px; }
  .estimate-outline-label { display: none; }
  .estimate-outline-tabs { min-width: max-content; }
  .outline-tab { min-height: 37px; }
  .stage-card { margin: 10px 8px 12px; padding-inline: 11px; }
  .stage-header { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
  .stage-heading { flex: 1 1 100%; }
  .stage-heading strong { font-size: 15px; }
  .stage-actions { width: 100%; justify-content: flex-end; }
  .stage-add-button { min-height: 39px; }
  .category-block { padding-inline: 11px; }
  .line-row:not(.header) { grid-template-columns: repeat(2, minmax(0,1fr)) 36px; gap: 7px; padding: 12px 0; }
  .line-row:not(.header) .line-item { grid-column: 1 / -1; }
  .line-row:not(.header) .line-cell:nth-child(2), .line-row:not(.header) .line-cell:nth-child(3), .line-row:not(.header) .line-cell:nth-child(4), .line-row:not(.header) .line-cell:nth-child(5) { min-height: 36px; text-align: left; }
  .line-row:not(.header) .line-cell:nth-child(2)::before { content: "Ставка"; }
  .line-row:not(.header) .line-cell:nth-child(3)::before { content: "Кол-во"; }
  .line-row:not(.header) .line-cell:nth-child(4)::before { content: "Смены"; }
  .line-row:not(.header) .line-cell:nth-child(5)::before { content: "Итого"; }
  .line-row:not(.header) .line-cell::before { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 750; }
  .line-row:not(.header) .line-cell:nth-child(2) { grid-column: 1; }
  .line-row:not(.header) .line-cell:nth-child(3) { grid-column: 2; }
  .line-row:not(.header) .line-cell:nth-child(4) { grid-column: 1; }
  .line-row:not(.header) .line-cell:nth-child(5) { grid-column: 2; }
  .line-row:not(.header) .row-actions { grid-column: 3; grid-row: 3; justify-content: flex-end; }
  .line-input { min-height: 34px; text-align: left; }
  .rental-compare { display: block; }
  .rental-compare-header { grid-column: auto; }
  .rental-card { margin-inline: 12px; }
  .modal-backdrop { padding: 10px; }
  .modal { max-height: calc(100svh - 20px); }
  .modal-header { padding: 20px 18px 14px; }
  .modal-body { padding: 0 18px 19px; }
  .modal-footer { position: sticky; bottom: 0; padding: 12px 18px 15px; background: rgba(255,255,255,.98); }
  .modal-footer .button { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .account-settings-grid { grid-template-columns: 1fr; }
  .rental-source-row { grid-template-columns: 1fr; gap: 11px; }
  .rental-source-status { justify-self: start; }
  .rental-discount-field { justify-content: flex-start; gap: 15px; }
  .toast { right: 13px; bottom: 13px; left: 13px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .stage-card.dragging { transform: none; }
}

@media (max-width: 760px) {
  .topbar { height: 66px; padding: 0 14px; }
  .topbar-status, .icon-button { display: none; }
  .topbar-account { min-width: 0; padding-right: 0; }
  .topbar-account-copy span { max-width: 160px; }
  .view-root { padding: 25px 16px 48px; }
  .view-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .view-heading .button-large { width: 100%; }
  .account-settings-grid { grid-template-columns: 1fr; }
  .account-profile-summary { grid-template-columns: 1fr; }
  .rental-sources-card .card-header { align-items: flex-start; flex-direction: column; }
  .rental-sources-card .card-header .button { width: 100%; }
  .rental-source-list { padding-inline: 16px; }
  .rental-source-row { grid-template-columns: 1fr; gap: 9px; }
  .rental-source-status { justify-self: start; }
  .rental-discount-field { justify-content: flex-start; }
}
@media print { .back-to-estimates, .mobile-menu-button, .mobile-nav-scrim { display: none !important; } }
.stage-card { margin: 8px 10px; padding: 0 14px 12px; border: 1px solid transparent; border-radius: 14px; background: #fff; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, opacity .16s ease; }
.stage-card:hover { border-color: #dce7ee; }
.stage-card.dragging { opacity: .52; transform: scale(.995); }
.stage-card.drag-over { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(31,163,106,.13); }
.stage-drag-handle { display: grid; place-items: center; flex: 0 0 auto; width: 26px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: #f0f4f7; color: #90a0ae; cursor: grab; font-size: 16px; line-height: 1; }
.stage-drag-handle:active { cursor: grabbing; }
.stage-heading-copy { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.stage-heading-copy > div { min-width: 0; }
.stage-heading-copy > div > span { display: block; overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.stage-header { padding: 12px 2px 9px; }
.stage-actions { opacity: .78; transition: opacity .16s ease; }
.stage-card:hover .stage-actions { opacity: 1; }
.stage-add-button { box-shadow: none !important; border-radius: 8px !important; }
.stage-edit-button { width: 29px; height: 29px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); font-size: 16px; font-weight: 850; }
.stage-edit-button:hover { border-color: var(--mint); color: var(--mint-deep); }
.stage-content { padding: 0 3px; }
.stage-card .section-label { padding-top: 9px; }
.stage-card .section-add { margin-top: 5px; padding: 4px 0; }

/* Composition controls: readable at a glance, with comfortable hit areas. */
.composition-card .composition-header { padding: 20px 22px; }
.composition-card .composition-title strong { font-size: 15px; }
.composition-card .composition-title span { font-size: 10px; }
.composition-card .stage-header { padding: 16px 6px 12px; }
.composition-card .stage-heading strong { font-size: 15px; }
.composition-card .stage-heading span:not(.stage-total) { font-size: 10px; }
.composition-card .stage-total { font-size: 13px; }
.composition-card .stage-add-button { min-height: 36px; padding: 9px 13px !important; font-size: 11px !important; }
.composition-card .section-label { padding: 16px 0 10px; font-size: 11px; letter-spacing: .07em; }
.composition-card .line-row { min-height: 52px; gap: 10px; }
.composition-card .line-row.header { min-height: 29px; font-size: 9px; }
.composition-card .line-item-copy strong { font-size: 12px; }
.composition-card .line-item-copy span { font-size: 9px; }
.composition-card .line-cell { font-size: 11px; }
.composition-card .line-input { padding: 7px 5px; font-size: 11px; }
.composition-card .section-add { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; margin-top: 10px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--navy); font-size: 11px; font-weight: 850; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.composition-card .section-add:hover, .composition-card .section-add:focus-visible { border-color: var(--mint); background: #f4fbf7; color: var(--mint-deep); }
.composition-card .empty-section { padding: 9px 0; font-size: 11px; color: #8798a7; }

@media (max-width: 760px) {
  .composition-card .section-add { width: 100%; justify-content: center; }
  .composition-card .stage-header { padding-inline: 0; }
  .composition-card .stage-heading strong { font-size: 14px; }
}
.analytics-scope-note { display: flex; align-items: center; gap: 11px; margin: 0 0 17px; padding: 12px 15px; border: 1px solid #ccebd8; border-radius: 12px; background: #effaf3; color: var(--mint-deep); }
.analytics-scope-note > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #d9f2e3; font-size: 17px; font-weight: 900; }
.analytics-scope-note strong, .analytics-scope-note span + div span { display: block; }
.analytics-scope-note strong { color: #15794d; font-size: 10px; }
.analytics-scope-note span + div span { margin-top: 3px; color: #5b8b70; font-size: 9px; }
.dashboard-personal-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 17px; }
.personal-stat { min-width: 0; padding: 15px 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.personal-stat span, .personal-stat small { display: block; color: var(--muted); }
.personal-stat span { font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.personal-stat strong { display: block; overflow: hidden; margin-top: 9px; color: var(--navy); font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
.personal-stat small { margin-top: 4px; font-size: 9px; }
.estimate-row { grid-template-columns: 10px minmax(0, 1fr) 84px 128px 230px; cursor: pointer; }
.estimate-row:focus-visible { outline: 3px solid rgba(31,163,106,.22); outline-offset: -2px; }
.estimate-row-status { min-width: 72px; text-align: center; }
.estimate-row-total { min-width: 112px; text-align: right; }
.estimate-row-actions { justify-content: flex-end; min-width: 0; gap: 5px; }
.estimate-row-action { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: auto; min-width: 29px; padding: 0 7px; white-space: nowrap; }
.estimate-row-action span { color: inherit; font-size: 9px; font-weight: 800; }
.estimate-row-action.estimate-edit, .estimate-row-action.estimate-copy { color: #8394a3; }
.estimate-row-action.estimate-edit:hover, .estimate-row-action.estimate-copy:hover { color: var(--navy); }

@media (max-width: 760px) {
  .dashboard-personal-stats { grid-template-columns: 1fr; }
  .estimate-row { grid-template-columns: 8px minmax(0, 1fr) auto; gap: 9px; }
  .estimate-row-status { grid-column: 3; grid-row: 1; }
  .estimate-row-total { grid-column: 2 / -1; grid-row: 2; min-width: 0; text-align: left; }
  .estimate-row-actions { grid-column: 2 / -1; grid-row: 3; justify-content: flex-start; }
}

.category-picker-button.custom-choice { border-color: #bde7ce; background: #f3fbf6; }
.category-picker-button.custom-choice > span { background: #dff5e7; color: var(--mint-deep); }
.category-picker-button.custom-choice strong { color: var(--mint-deep); }
.catalog-custom-choice { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 8px; padding: 11px; border: 1px dashed #abdcbc; border-radius: 9px; background: #f5fcf7; color: var(--mint-deep); text-align: left; }
.catalog-custom-choice:hover { border-color: var(--mint-strong); background: #edf9f1; }
.catalog-custom-choice-icon { display: grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; border-radius: 7px; background: #dff5e7; font-size: 13px; font-weight: 850; }
.catalog-custom-choice > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.catalog-custom-choice strong { font-size: 10px; }
.catalog-custom-choice small { color: #6e927d; font-size: 8px; }
.catalog-custom-choice-arrow { margin-left: auto; color: var(--mint-deep); font-size: 15px; font-weight: 850; }

/* Product-level hierarchy: stage -> section -> position. */
.composition-header-actions { display: flex; align-items: center; gap: 8px; }
.composition-header-actions .button { min-height: 36px; }
.stage-count { display: inline-block; margin-top: 5px; color: #8a9aa8; font-size: 9px; font-weight: 750; }
.section-count { margin-left: 6px; color: #8c9ba8; font-size: 9px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.rental-empty { margin: 12px 0 2px; padding: 14px; border: 1px dashed #cbd9e2; border-radius: 10px; background: #fafcfd; color: var(--muted); font-size: 11px; line-height: 1.45; }
.rental-card { transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.rental-card.out-of-scope { border-color: #f0d8aa; background: #fffaf0; }
.rental-card.out-of-scope .rental-tag { background: #fff0cf; color: #9b6c18; }
.rental-select-button:disabled { color: #9b6c18; cursor: not-allowed; text-decoration: none; }
.rental-price-warning { display: grid; gap: 3px; margin-bottom: 12px; padding: 11px 12px; border: 1px solid #f1dfad; border-radius: 9px; background: var(--amber-bg); color: #735416; }.rental-price-warning strong { font-size: 11px; }.rental-price-warning span { color: #987b42; font-size: 9px; line-height: 1.4; }.rental-price-preview-list { display: grid; gap: 6px; max-height: 320px; overflow: auto; padding-right: 2px; }.rental-price-preview-row { display: grid; grid-template-columns: 18px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }.rental-price-preview-row.manual { border-color: #f1dfad; background: #fffaf0; }.rental-price-preview-row input { width: 16px; height: 16px; accent-color: var(--mint-strong); }.rental-price-preview-copy { min-width: 0; }.rental-price-preview-copy strong, .rental-price-preview-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.rental-price-preview-copy strong { color: var(--ink); font-size: 10px; }.rental-price-preview-copy small { margin-top: 3px; color: var(--muted); font-size: 8px; }.rental-price-preview-rate { color: var(--navy); font-size: 9px; font-weight: 850; white-space: nowrap; }.rental-price-preview-note { margin: 10px 0 0; color: var(--muted); font-size: 9px; }
.rental-card.active:hover { border-color: #a7ddbd; box-shadow: 0 7px 18px rgba(0, 0, 0, .07); transform: translateY(-1px); }
.rental-card .rental-meta { min-height: 28px; }
.rental-card .rental-select-button, .rental-card .rental-apply-button { min-height: 34px; }
.button:focus-visible, .stage-add-button:focus-visible, .section-add:focus-visible, .rental-select-button:focus-visible, .rental-apply-button:focus-visible { outline: 3px solid rgba(31, 163, 106, .2); outline-offset: 2px; }

@media (max-width: 760px) {
  .rental-scope-summary { grid-template-columns: 1fr 1fr; }
  .rental-scope-summary div:first-child { grid-column: 1 / -1; }
}

/* The estimate is edited as a hierarchy: estimate -> stage -> section -> position. */
.estimate-outline { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; gap: 12px; margin: 0 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); box-shadow: 0 5px 14px rgba(0,0,0,.05); backdrop-filter: blur(8px); }
.estimate-outline-label { flex: 0 0 auto; color: #8a9aa8; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.estimate-outline-tabs { display: flex; min-width: 0; flex: 1; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.estimate-outline-tabs::-webkit-scrollbar { display: none; }
.outline-tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 11px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 800; white-space: nowrap; }
.outline-tab:hover { border-color: #cfe5d8; background: #f5fbf7; color: var(--mint-deep); }
.outline-tab.active { border-color: #d5ebdd; background: #edf9f1; color: var(--mint-deep); }
.outline-tab small { min-width: 18px; padding: 2px 5px; border-radius: 999px; background: #e6edf1; color: #8495a3; font-size: 8px; font-weight: 850; text-align: center; }
.outline-tab.active small { background: #ccefd9; color: var(--mint-deep); }
.estimate-summary .stage-tabs { display: none; }
.section-heading { display: inline-flex; align-items: center; gap: 7px; }
.section-marker { color: var(--mint-strong); font-size: 13px; line-height: 1; }
.position-trigger { position: relative; cursor: pointer; border-radius: 8px; transition: background .15s ease, box-shadow .15s ease; }
.position-trigger:hover, .position-trigger:focus-visible { background: #f5fbf7; box-shadow: inset 3px 0 0 var(--mint-strong); outline: none; }
.position-edit-hint { margin-left: auto; padding: 3px 6px; border-radius: 5px; background: #edf8f2; color: var(--mint-deep); font-size: 8px; font-weight: 800; opacity: 0; transition: opacity .15s ease; }
.position-trigger:hover .position-edit-hint, .position-trigger:focus-visible .position-edit-hint { opacity: 1; }
.modal-selection-summary { display: flex; align-items: center; gap: 10px; grid-column: 1 / -1; padding: 10px 12px; border: 1px solid #bfe7ce; border-radius: 10px; background: #f1fbf5; color: var(--mint-deep); }
.modal-selection-summary.hidden { display: none; }
.modal-selection-summary > div { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.modal-selection-summary small { color: #559170; font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.modal-selection-summary strong { overflow: hidden; color: var(--navy); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.modal-selection-summary span:not(.modal-selection-check) { color: #6a8d78; font-size: 9px; }
.modal-selection-check { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px; background: #c9f0d7; color: var(--mint-deep); font-weight: 900; }
.modal-selection-clear { margin-left: auto; width: 27px; height: 27px; border: 0; border-radius: 7px; background: transparent; color: #789789; font-size: 17px; }
.modal-selection-clear:hover { background: #dff5e7; color: var(--mint-deep); }
.modal-offer-choices { margin-top: 8px; }
.modal-offer-choices > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.modal-offer-choice { display: grid; gap: 2px; padding: 6px 8px; border: 1px solid #bfe7ce; border-radius: 7px; background: #fff; color: var(--mint-deep); text-align: left; }
.modal-offer-choice span { color: #6a8d78 !important; font-size: 8px !important; }
.modal-offer-choice strong { color: var(--navy); font-size: 9px; }
.modal-offer-choice.active { border-color: var(--mint-deep); background: #e7f8ee; box-shadow: 0 0 0 1px var(--mint-deep); }

@media (max-width: 760px) {
  .estimate-shell { padding: 18px 12px 32px; }
  .estimate-topline { gap: 16px; }
  .estimate-topline h1 { font-size: clamp(24px, 8vw, 32px); line-height: 1.05; }
  .estimate-topline p { font-size: 10px; line-height: 1.45; }
  .estimate-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
  .estimate-actions .button { width: 100%; min-height: 40px; }
  .estimate-details { grid-template-columns: 1fr; gap: 10px; }
  .composition-card .composition-header { align-items: flex-start; flex-direction: column; gap: 13px; padding: 16px; }
  .composition-header-actions { width: 100%; }
  .composition-header-actions .button { flex: 1; }
  .composition-card .stage-header { align-items: flex-start; gap: 12px; }
  .composition-card .stage-heading { min-width: 0; }
  .composition-card .stage-heading-copy { align-items: flex-start; flex-direction: column; gap: 4px; }
  .composition-card .stage-actions { width: 100%; }
  .composition-card .stage-add-button { width: 100%; }
  .composition-card .stage-content { padding-inline: 0; }
  .composition-card .category-block { padding-inline: 4px; }
  .composition-card .line-row:not(.header) { grid-template-columns: minmax(0, 1fr) 74px; gap: 7px; padding: 10px 0; }
  .composition-card .line-row:not(.header) .line-item { grid-column: 1 / -1; }
  .composition-card .line-row:not(.header) .line-cell:nth-child(2), .composition-card .line-row:not(.header) .line-cell:nth-child(3), .composition-card .line-row:not(.header) .line-cell:nth-child(4), .composition-card .line-row:not(.header) .line-cell:nth-child(5) { min-height: 34px; }
  .composition-card .line-row:not(.header) .line-cell:nth-child(2)::before { content: "Ставка"; }
  .composition-card .line-row:not(.header) .line-cell:nth-child(3)::before { content: "Кол-во"; }
  .composition-card .line-row:not(.header) .line-cell:nth-child(4)::before { content: "Смены"; }
  .composition-card .line-row:not(.header) .line-cell:nth-child(5)::before { content: "Итого"; }
  .composition-card .line-row:not(.header) .line-cell::before { display: block; margin-bottom: 4px; color: #91a0ac; font-size: 8px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
  .composition-card .line-row:not(.header) .line-cell:nth-child(2) { grid-column: 1; }
  .composition-card .line-row:not(.header) .line-cell:nth-child(3) { grid-column: 2; }
  .composition-card .line-row:not(.header) .line-cell:nth-child(4) { grid-column: 1; }
  .composition-card .line-row:not(.header) .line-cell:nth-child(5) { grid-column: 2; }
  .composition-card .line-row:not(.header) .row-actions { grid-column: 1 / -1; grid-row: auto; justify-content: flex-end; }
  .composition-card .line-row:not(.header) .line-input { width: 100%; min-height: 32px; }
  .rental-compare .rental-compare-header { align-items: flex-start; flex-direction: column; gap: 10px; }
  .rental-compare .rental-compare-header .button { width: 100%; }
  .estimate-outline { align-items: flex-start; flex-direction: column; gap: 6px; margin: 0; padding: 9px 12px; }
  .estimate-outline-tabs { width: 100%; }
  .outline-tab { min-height: 36px; padding-inline: 12px; }
  .position-edit-hint { display: none; }
}

/* Focused interaction patterns for position selection and row actions. */
body.modal-open { overflow: hidden; }
.modal-backdrop { overflow: hidden; overscroll-behavior: contain; }
.modal { overscroll-behavior: contain; }
.catalog-result-list { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal-context-note { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.catalog-combobox { position: relative; z-index: 3; }
.catalog-combobox-control { display: flex; align-items: stretch; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: border-color var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out); }
.catalog-combobox-control:focus-within { border-color: var(--mint-strong); box-shadow: 0 0 0 3px rgba(60, 177, 122, .15); }
.catalog-combobox-control input { flex: 1; min-width: 0; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.catalog-combobox-toggle { flex: 0 0 42px; border: 0; border-left: 1px solid var(--line); background: #f7fafb; color: var(--muted); font-size: 17px; line-height: 1; transition: background-color var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out); }
.catalog-combobox-toggle:hover, .catalog-combobox-toggle:focus-visible, .catalog-combobox-toggle[aria-expanded="true"] { background: var(--surface-tint); color: var(--mint-deep); }
.catalog-combobox .catalog-result-list { position: absolute; top: calc(100% + 6px); right: 0; left: 0; z-index: 5; max-height: 260px; margin-top: 0; background: #fff; box-shadow: 0 14px 30px rgba(0,0,0,.16); }
.catalog-result.crew-result { display: block; position: relative; padding: 0; }
.catalog-result-row { display: flex; align-items: stretch; min-width: 0; }
.catalog-result-info { flex: 0 0 30px; align-self: stretch; border: 0; background: transparent; color: #9aabb8; font-size: 13px; font-weight: 900; }
.catalog-result-info:hover, .catalog-result-info:focus-visible { background: #eef8f2; color: var(--mint-deep); }
.catalog-result.selected { background: #effaf3; box-shadow: inset 3px 0 0 var(--mint); }
.catalog-result.selected .catalog-result-price { color: var(--mint-deep); font-weight: 900; }
.catalog-result-source-meta { display: block; min-width: 0; }
.catalog-presence-line { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.catalog-presence-pill { display: inline-flex; max-width: 100%; align-items: center; padding: 2px 5px; border-radius: 999px; font-size: 8px; font-weight: 800; line-height: 1.25; white-space: normal; }
.catalog-presence-pill.in_catalog { background: #e8f6ed; color: #28704b; }
.catalog-presence-pill.needs_clarification { background: #fff3d8; color: #8a6315; }
.catalog-presence-pill.not_found, .catalog-presence-pill.not_connected, .catalog-presence-pill.out_of_scope { background: #eef2f5; color: #657786; }
.catalog-offer-line { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.35; white-space: normal; }
.crew-info-popover { margin: 0 10px 10px; padding: 9px 10px; border-radius: 8px; background: #132c45; color: #fff; font-size: 10px; line-height: 1.4; box-shadow: 0 5px 14px rgba(0,0,0,.18); }
.field-optional { color: #9aa8b4; font-size: 8px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.row-actions { position: relative; display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; min-width: 58px; }
.stage-reorder-actions { display: inline-flex; align-items: center; gap: 3px; }
.line-menu-button { display: inline-grid; place-items: center; width: 27px; height: 27px; padding: 0; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #9aa9b6; font-size: 17px; font-weight: 900; line-height: 1; }
.line-menu-button:hover, .line-menu-button:focus-visible { border-color: var(--line); background: #f4f7f9; color: var(--navy); }
.row-action-menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 12; min-width: 170px; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 10px 26px rgba(0,0,0,.16); }
.row-action-menu button { display: block; width: 100%; padding: 8px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font-size: 10px; font-weight: 750; text-align: left; }
.row-action-menu button:hover, .row-action-menu button:focus-visible { background: #f2f7f9; color: var(--navy); }
.row-action-menu button.danger { color: var(--red); }
.row-action-menu button.danger:hover, .row-action-menu button.danger:focus-visible { background: #fff1f1; }

@media (max-width: 760px) {
  .modal-backdrop { display: block; padding: 11px; overflow-y: auto; }
  .modal { width: 100%; max-height: calc(100vh - 22px); margin: 0 auto; }
  .modal-header { padding: 19px 17px 13px; }
  .modal-body { padding: 0 17px 18px; }
  .modal-footer { display: grid; grid-template-columns: 1fr; gap: 8px; position: sticky; bottom: 0; padding: 12px 17px 14px; background: rgba(255,255,255,.97); }
  .modal-footer .button { width: 100%; }
  .modal h2 { font-size: 22px; }
  .catalog-result-list { max-height: 260px; }
  .row-action-menu { top: auto; right: 0; bottom: calc(100% + 4px); }
}
.modal-footer { position: sticky; bottom: 0; z-index: 2; background: rgba(255,255,255,.98); }

/* Pro collaboration entry point. The link is deliberately explicit about its permission. */
.share-modal { width: min(560px, 100%); }
.share-intro { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 13px 14px; border: 1px solid #d5efdf; border-radius: 11px; background: #f3fbf6; }
.share-intro-icon { display: grid; place-items: center; flex: 0 0 31px; width: 31px; height: 31px; border-radius: 9px; background: var(--mint); color: var(--mint-deep); font-size: 17px; font-weight: 900; }
.share-intro strong, .share-intro small { display: block; }
.share-intro strong { color: var(--navy); font-size: 12px; }
.share-intro small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.share-result { margin-top: 17px; padding: 13px 14px; border: 1px dashed #cbd7df; border-radius: 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.share-result p { margin: 0; }
.share-result-success strong, .share-result-success span, .share-result-success small { display: block; }
.share-result-success strong { color: var(--mint-deep); font-size: 12px; }
.share-result-success span { margin-top: 2px; font-size: 10px; }
.share-link-row { display: flex; gap: 7px; margin-top: 11px; }
.share-link-row input { min-width: 0; flex: 1; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 10px; }
.share-link-row .button { flex: 0 0 auto; }
.share-result-success small { margin-top: 10px; color: #82919f; font-size: 9px; line-height: 1.45; }
.share-links-section { margin-top: 19px; }
.share-links-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.share-links-head h3 { margin: 0; color: var(--navy); font-size: 12px; }
.share-links-head p { max-width: 390px; margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.share-links-count { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: #eef5f3; color: var(--mint-deep); font-size: 10px; font-weight: 850; }
.share-links-list { display: grid; gap: 7px; max-height: 205px; overflow: auto; padding-right: 2px; }
.share-link-item { padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; }
.share-link-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.share-link-meta strong { color: var(--navy); font-size: 10px; }
.share-link-meta span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.share-link-item .share-link-row { margin-top: 0; }
.share-link-item .share-link-row input { font-size: 9px; }
.share-link-revoke { color: var(--red); }
.share-link-revoke:hover, .share-link-revoke:focus-visible { border-color: #f1caca; background: #fff4f4; color: var(--red); }
.share-links-empty { margin: 0; padding: 12px; border: 1px dashed #cbd7df; border-radius: 9px; color: var(--muted); font-size: 10px; text-align: center; }
.share-links-error { color: var(--red); }

/* Final cascade pass. This stays last so the product hierarchy wins over legacy defaults. */
.brand-subtitle { font-size: 11px; letter-spacing: .06em; }
.sidebar-section-title { font-size: 11px; letter-spacing: 0; text-transform: none; }
.pro-label { font-size: 10px; letter-spacing: 0; }
.avatar { font-size: 11px; }
.profile-mini-copy span { font-size: 11px; }
.topbar-account-copy span, .topbar-account-copy small { font-size: 11px; }
.app-shell { grid-template-columns: 280px minmax(0, 1fr); min-height: 100svh; }
.sidebar { min-height: 100svh; padding: 25px 16px 17px; background: var(--navy); }
.sidebar-new-estimate { min-height: 46px; margin-bottom: 21px; box-shadow: none; }
.sidebar-estimate-list { max-height: 360px; margin-left: 14px; padding-left: 8px; }
.sidebar-estimate-row { min-height: 48px; padding: 7px 8px; }
.sidebar-estimate-copy strong { font-size: 10px; line-height: 1.25; }
.sidebar-estimate-copy small { font-size: 9px; line-height: 1.25; }
.profile-mini { border-top-color: #294761; }
.topbar { height: 76px; padding: 0 42px; background: var(--paper); }
.topbar-account { width: 298px; min-width: 0; padding: 6px 7px 6px 12px; background: var(--surface-soft); }
.topbar-account-copy { flex: 1; align-items: flex-start; }
.topbar-account-copy strong { font-size: 11px; }
.topbar-account-copy span { margin-top: 2px; font-size: 11px; }
.topbar-account-copy small { margin-top: 3px; font-size: 11px; }
.topbar-account .avatar-small { width: 36px; height: 36px; }
.view-root { max-width: 1480px; padding: 34px 42px 76px; }
.eyebrow { font-size: 12px; letter-spacing: 0; text-transform: none; }
.view-heading h1 { font-size: 38px; }
.button { transition: transform var(--motion-fast) var(--ease-out), background-color var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out); }
.button-primary { box-shadow: none; }
.card, .stat-card { box-shadow: none; }
.estimate-row { min-height: 68px; padding: 14px 10px; }
.estimate-row-title { font-size: 13px; }
.estimate-row-meta { font-size: 11px; }
.estimate-row-status { font-size: 10px; }
.estimate-shell { max-width: 1320px; }
.estimate-topline h1 { font-size: 39px; }
.estimate-details { padding: 18px 20px; }
.detail-field label { font-size: 11px; letter-spacing: 0; text-transform: none; }
.detail-field input { min-height: 43px; font-size: 13px; }
.estimate-layout { grid-template-columns: minmax(0,1fr) 340px; gap: 20px; }
.estimate-kpi { min-height: 118px; padding: 19px 20px; box-shadow: none; }
.estimate-kpi-label { font-size: 11px; letter-spacing: 0; text-transform: none; }
.estimate-kpi-value { font-size: 27px; }
.stage-tabs { border-color: var(--line); box-shadow: none; }
.composition-card { overflow: visible; }
.composition-header { min-height: 78px; padding: 19px 22px; }
.composition-title strong { font-size: 16px; }
.composition-title span { font-size: 11px; }
.estimate-outline { margin: 0; padding: 11px 22px; background: rgba(255,255,255,.97); box-shadow: none; backdrop-filter: none; }
.estimate-outline-label { font-size: 11px; letter-spacing: 0; text-transform: none; }
.outline-tab.active { border-color: transparent; background: var(--navy); color: #fff; }
.stage-card { margin: 12px 12px 14px; padding: 0 16px 16px; border: 0; border-radius: 15px; background: var(--surface-soft); box-shadow: none; }
.stage-card:hover { border-color: transparent; background: #f2f7f9; }
.stage-header { min-height: 70px; padding: 15px 32px 11px 0; position: relative; }
.stage-header[data-stage-toggle] { cursor: pointer; }
.stage-header[data-stage-toggle]::after { position: absolute; top: 27px; right: 8px; width: 9px; height: 9px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); content: ""; transform: rotate(45deg); transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out); }
.stage-header[data-stage-toggle]:hover::after, .stage-header[data-stage-toggle]:focus-visible::after { border-color: var(--navy); }
.stage-header[data-stage-toggle]:focus-visible { outline: 2px solid var(--mint-strong); outline-offset: 4px; border-radius: 10px; }
.stage-card.collapsed { padding-bottom: 0; }
.stage-card.collapsed .stage-header[data-stage-toggle]::after { transform: rotate(-45deg); }
.stage-card.collapsed .stage-content { display: none; }
@media (min-width: 761px) { .stage-header[data-stage-toggle] .stage-actions { padding-right: 23px; } }
.stage-heading strong { font-size: 16px; }
.stage-heading span:not(.stage-total) { font-size: 11px; }
.stage-count { padding: 3px 7px; background: #e7eef2; font-size: 10px; }
.category-block { margin-top: 8px; padding: 0 13px 13px; border-radius: 11px; background: var(--paper); }
.section-label { min-height: 43px; padding: 14px 0 8px; font-size: 12px; letter-spacing: 0; text-transform: none; }
.line-row { min-height: 61px; }
.line-row.header { min-height: 32px; font-size: 10px; letter-spacing: 0; text-transform: none; }
.line-item-copy strong { font-size: 12px; }
.line-item-copy span { font-size: 10px; }
.line-cell { font-size: 12px; }
.section-add { min-height: 36px; margin-top: 12px; padding: 0 12px; border: 1px solid #c9e9d5; border-radius: 9px; background: var(--surface-tint); box-shadow: none; font-size: 11px; }
.section-add:hover, .section-add:focus-visible { border-color: #99d3af; background: #e2f6e9; }
.audit-card, .rental-compare { box-shadow: none; }
.rental-card.selected { box-shadow: none; }
.modal { max-height: min(780px, calc(100svh - 42px)); box-shadow: 0 22px 60px rgba(0,0,0,.24); }
.modal h2 { font-size: 28px; }
.form-field label { font-size: 11px; letter-spacing: 0; text-transform: none; }
.form-field input, .form-field select, .form-field textarea { min-height: 43px; font-size: 13px; }
.toast { box-shadow: 0 14px 30px rgba(0,0,0,.2); }
.icon { position: relative; display: inline-block; width: 16px; height: 16px; flex: 0 0 16px; color: currentColor; }
.icon::before, .icon::after { position: absolute; box-sizing: border-box; content: ""; }
.icon-menu::before { top: 3px; left: 2px; width: 12px; height: 2px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.icon-menu::after { top: 7px; left: 2px; width: 12px; border-top: 2px solid currentColor; }
.icon-bell::before { top: 2px; left: 4px; width: 8px; height: 10px; border: 1.5px solid currentColor; border-radius: 7px 7px 3px 3px; }
.icon-bell::after { top: 13px; left: 2px; width: 12px; border-top: 1.5px solid currentColor; }
.icon-arrow-left::before { top: 7px; left: 2px; width: 12px; border-top: 1.5px solid currentColor; }
.icon-arrow-left::after { top: 4px; left: 2px; width: 7px; height: 7px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.icon-stack::before { top: 3px; left: 3px; width: 10px; height: 7px; border: 1.5px solid currentColor; border-radius: 2px; }
.icon-stack::after { top: 6px; left: 5px; width: 8px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; border-radius: 0 0 2px 0; transform: skewY(-24deg); }

@media (max-width: 1120px) {
  .view-root { padding-inline: 28px; }
  .topbar { padding-inline: 28px; }
  .estimate-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar { height: 64px; padding-inline: 13px; }
  .topbar-account { width: auto; min-width: 42px; padding: 4px; background: transparent; border-color: transparent; }
  .topbar-account-copy { display: none; }
  .topbar-account:hover { border-color: transparent; background: var(--surface-soft); }
  .topbar-account .avatar-small { width: 36px; height: 36px; }
  .view-root { padding: 24px 13px 48px; }
  .view-heading { align-items: flex-start; gap: 18px; }
  .view-heading h1 { font-size: 31px; }
  .view-heading .button { width: 100%; }
  .estimate-topline { gap: 18px; }
  .estimate-topline h1 { font-size: 31px; }
  .estimate-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; width: 100%; }
  .estimate-actions .button { width: 100%; min-height: 44px; }
  .estimate-actions .button:first-child { grid-column: 1 / -1; }
  .estimate-details { grid-template-columns: 1fr; gap: 12px; padding: 15px; }
  .estimate-kpis { grid-template-columns: 1fr; gap: 9px; }
  .estimate-layout { display: block; }
  .estimate-layout > div + div { margin-top: 16px; }
  .composition-header, .section-block { min-width: 0; }
  .composition-header { align-items: flex-start; flex-wrap: wrap; gap: 14px; padding: 17px 15px; }
  .composition-header-actions { width: 100%; justify-content: flex-end; }
  .composition-header-actions .button { flex: 1; }
  .estimate-outline { position: relative; align-items: flex-start; flex-direction: column; gap: 6px; margin: 0; padding: 9px 12px; }
  .estimate-outline-label { display: none; }
  .estimate-outline-tabs { width: 100%; }
  .outline-tab { min-height: 37px; }
  .stage-card { margin: 10px 8px 12px; padding-inline: 11px; }
  .stage-heading { flex: 1 1 100%; }
  .stage-heading strong { font-size: 15px; }
  .stage-actions { width: 100%; justify-content: flex-end; }
  .stage-add-button { min-height: 39px; }
  .category-block { padding-inline: 11px; }
  .composition-card .line-row:not(.header) { grid-template-columns: repeat(2, minmax(0,1fr)) 36px; gap: 7px; padding: 12px 0; }
  .composition-card .line-row:not(.header) .line-item { grid-column: 1 / -1; }
  .composition-card .line-row:not(.header) .line-cell:nth-child(2) { grid-column: 1; }
  .composition-card .line-row:not(.header) .line-cell:nth-child(3) { grid-column: 2; }
  .composition-card .line-row:not(.header) .line-cell:nth-child(4) { grid-column: 1; }
  .composition-card .line-row:not(.header) .line-cell:nth-child(5) { grid-column: 2; }
  .composition-card .line-row:not(.header) .line-cell::before { font-size: 10px; letter-spacing: 0; text-transform: none; }
  .composition-card .line-row:not(.header) .row-actions { grid-column: 3; grid-row: 3; justify-content: flex-end; }
  .rental-compare { display: block; }
  .modal-backdrop { padding: 10px; }
  .modal { max-height: calc(100svh - 20px); }
  .modal-footer { background: rgba(255,255,255,.98); }
  .form-grid { grid-template-columns: 1fr; }
}

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

.modal-footer { position: sticky; bottom: 0; z-index: 2; background: rgba(255,255,255,.98); }

/* Autosave and folder-like stage navigation. */
.estimate-save-state { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.estimate-save-state.dirty { color: var(--muted); }
.estimate-save-state .save-state-dot { background: var(--mint-strong); }
.estimate-save-state.conflict { color: #a24842; flex-wrap: wrap; }
.estimate-save-state.conflict .save-state-dot { background: #c85d52; }
.save-state-action { border: 0; padding: 0; color: inherit; background: transparent; font: inherit; text-decoration: underline; cursor: pointer; }
.estimate-row-status:empty, .sidebar-estimate-status:empty { display: none; }

/* Public entry. It uses the existing navy / mint / paper language, but keeps the first decision unmistakable. */
#appShell[hidden], #publicLanding[hidden] { display: none !important; }
body.public-entry { background: var(--bg); }
.public-fallback { display: grid; min-height: 100vh; place-content: center; gap: 9px; padding: 24px; background: var(--bg); color: var(--ink); text-align: center; }
.public-fallback strong { color: var(--navy); font-size: 28px; letter-spacing: -.05em; }
.public-fallback span { color: var(--muted); font-size: 13px; }
.public-fallback a { margin-top: 6px; color: var(--mint-deep); font-size: 12px; font-weight: 800; text-decoration: none; }
.public-fallback a:hover { text-decoration: underline; text-underline-offset: 3px; }
.public-page { min-height: 100vh; overflow: hidden; color: var(--ink); }
.public-nav, .public-hero, .public-counter, .public-workflow, .public-pro, .public-legal, .public-footer { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.public-nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; }
.public-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); text-decoration: none; }
.public-brand-mark { display: block; width: 38px; height: 38px; padding: 3px; border-radius: 11px; background: var(--mint); object-fit: contain; }
.public-brand strong, .public-brand small { display: block; }
.public-brand strong { font-size: 16px; letter-spacing: -.04em; }
.public-brand small { margin-top: 1px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.public-nav-actions { display: flex; align-items: center; gap: 12px; }
.public-link-button, .public-footer-link { border: 0; background: transparent; color: var(--navy); font-size: 11px; font-weight: 800; }
.public-link-button:hover, .public-footer-link:hover { color: var(--mint-deep); }
.public-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 0 20px; border-radius: 11px; font-size: 11px; font-weight: 850; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.public-button:hover { transform: translateY(-1px); }
.public-button-primary { border: 1px solid var(--navy); background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.14); }
.public-button-primary:hover { background: var(--navy-2); }
.public-button-secondary { min-height: 38px; padding-inline: 16px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.public-button-secondary:hover, .public-button-outline:hover { border-color: var(--line-strong); background: var(--surface-tint); }
.public-button-outline { border: 1px solid var(--line); background: transparent; color: var(--navy); }
.public-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(370px, .75fr); align-items: center; gap: clamp(48px, 9vw, 130px); padding: 92px 0 92px; }
.public-hero-copy h1 { margin: 0; color: var(--navy); font-size: clamp(46px, 6.5vw, 84px); font-weight: 850; line-height: .98; letter-spacing: -.075em; }
.public-hero-copy h1 em { color: var(--mint-deep); font-style: normal; }
.public-lead { max-width: 500px; margin: 27px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.public-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 31px; }
.public-reassurance { display: flex; flex-wrap: wrap; gap: 8px; margin: 17px 0 0; color: #82919f; font-size: 10px; }
.public-reassurance span:first-child, .public-reassurance span:nth-of-type(2) { color: var(--mint-deep); font-weight: 900; }
.public-preview { max-width: 430px; justify-self: end; padding: 25px 27px 24px; border: 1px solid #3a4652; border-radius: 18px; background: var(--navy); box-shadow: 18px 22px 0 rgba(216,243,106,.78); color: #fff; }
.public-preview-top { display: flex; align-items: center; gap: 8px; color: #b9cbd9; font-size: 10px; font-weight: 700; }
.public-preview-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(216,243,106,.14); }
.public-preview-status { margin-left: auto; color: var(--mint); font-size: 9px; }
.public-preview-title { margin-top: 28px; font-size: 20px; font-weight: 850; letter-spacing: -.04em; }
.public-preview-meta { margin-top: 5px; color: #91a7ba; font-size: 10px; }
.public-preview-line, .public-preview-total { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid rgba(255,255,255,.11); }
.public-preview-line { margin-top: 24px; padding-top: 14px; color: #c9d7e2; font-size: 10px; }
.public-preview-line + .public-preview-line { margin-top: 0; }
.public-preview-line strong { color: #fff; font-size: 11px; }
.public-preview-total { margin-top: 23px; padding-top: 17px; color: #c9d7e2; font-size: 10px; }
.public-preview-total strong { color: var(--mint); font-size: 19px; letter-spacing: -.04em; }
.public-preview-note { margin-top: 20px; color: #91a7ba; font-size: 9px; }
.public-preview-note span { color: var(--mint); }
.public-counter { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 20px 0 21px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.public-counter div { display: flex; align-items: baseline; gap: 12px; }
.public-counter strong { color: var(--navy); font-size: 30px; font-variant-numeric: tabular-nums; letter-spacing: -.06em; }
.public-counter span { color: var(--muted); font-size: 12px; }
.public-counter small { color: var(--mint-deep); font-size: 10px; font-weight: 750; }
.public-workflow { padding: 112px 0 116px; }
.public-section-heading > span, .public-section-heading-label { color: var(--mint-deep); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.public-section-heading h2, .public-pro h2, .public-legal h2 { margin: 10px 0 0; color: var(--navy); font-size: clamp(30px, 4vw, 49px); line-height: 1; letter-spacing: -.065em; }
.public-steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0; margin-top: 58px; border-top: 1px solid var(--line); }
.public-steps article { min-height: 192px; padding: 23px 30px 0 0; border-bottom: 1px solid var(--line); }
.public-steps article + article { padding-left: 30px; border-left: 1px solid var(--line); }
.public-steps article > span { color: var(--mint-deep); font-size: 10px; font-weight: 850; }
.public-steps h3 { margin: 30px 0 0; color: var(--navy); font-size: 16px; letter-spacing: -.035em; }
.public-steps p { max-width: 250px; margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.public-pro { display: grid; grid-template-columns: minmax(280px, .86fr) minmax(0, 1.14fr); gap: clamp(42px, 7vw, 92px); align-items: start; padding: 66px 0 70px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.public-pro-intro { min-width: 0; }
.public-pro p { max-width: 310px; margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.public-pro-list { border-top: 1px solid var(--line); }
.public-pro-list > div { display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 13px; align-items: start; padding: 19px 0; border-bottom: 1px solid var(--line); }
.public-pro-list span { color: var(--mint-deep); font-size: 17px; font-weight: 900; }
.public-pro-copy { min-width: 0; }
.public-pro-list strong, .public-pro-list small { display: block; }
.public-pro-list strong { color: var(--navy); font-size: 12px; }
.public-pro-list small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.public-legal { display: block; padding: 82px 0 52px; }
.public-legal h2 { font-size: clamp(25px, 3vw, 35px); }
.public-legal p { max-width: 620px; margin: 15px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.public-legal-links { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 18px; }
.public-legal-links a, .public-footer-link { color: var(--muted); font-size: 10px; text-decoration: none; }
.public-legal-links a { color: var(--mint-deep); font-weight: 750; }
.public-legal-links a:hover, .public-footer-link:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.public-legal-meta { display: block; margin-top: 20px; color: var(--faint); font-size: 10px; line-height: 1.5; }
.public-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 21px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.public-footer > span:nth-child(2) { margin-right: auto; }
.public-footer-link { padding: 0; border: 0; background: transparent; font-weight: 650; }

.legal-body { min-height: 100vh; background: var(--bg); }
.legal-page { width: min(860px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 70px; }
.legal-back { display: inline-flex; color: var(--mint-deep); font-size: 11px; font-weight: 800; text-decoration: none; }
.legal-back:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 4px; }
.legal-heading { margin: 72px 0 30px; }
.legal-heading > span { color: var(--mint-deep); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.legal-heading h1 { max-width: 720px; margin: 11px 0 0; color: var(--navy); font-size: clamp(36px, 6vw, 62px); line-height: .98; letter-spacing: -.07em; }
.legal-heading p { max-width: 650px; margin: 20px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.share-body { min-height: 100vh; background: var(--bg); }
.share-page { width: min(980px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 70px; }
.share-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; font-size: 14px; font-weight: 850; }
.share-brand > img { display: block; width: 34px; height: 34px; padding: 3px; border-radius: 10px; background: var(--mint); object-fit: contain; }
.share-card { margin-top: 45px; padding: clamp(22px, 4vw, 39px); border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 16px 45px rgba(0,0,0,.07); }
.share-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; padding-bottom: 23px; border-bottom: 1px solid var(--line); }
.share-eyebrow { color: var(--mint-deep); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.share-card h1 { margin: 9px 0 0; color: var(--navy); font-size: clamp(28px, 5vw, 46px); letter-spacing: -.065em; }
.share-card-top p { margin: 9px 0 0; color: var(--muted); font-size: 11px; }
.share-access { flex: 0 0 auto; padding: 8px 10px; border: 1px solid #d5efdf; border-radius: 8px; background: #f3fbf6; color: var(--mint-deep); font-size: 10px; font-weight: 800; }
.share-notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 23px 0; padding: 12px 14px; border-radius: 10px; background: #f7fafb; color: var(--muted); font-size: 10px; }
.share-notice strong, .share-notice span { display: block; }
.share-notice strong { color: var(--navy); }
.share-notice span { margin-top: 3px; line-height: 1.45; }
.share-notice small { flex: 0 0 auto; max-width: 180px; color: #82919f; font-size: 9px; line-height: 1.45; text-align: right; }
.share-live-notice { margin: 18px 0; padding: 10px 12px; border: 1px solid #c6e7d1; border-radius: 9px; background: #f1fbf5; color: var(--mint-deep); font-size: 10px; font-weight: 750; }
.share-presence { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin: 18px 0; padding: 11px 13px; border: 1px solid #d8e7df; border-radius: 11px; background: #f8fbf9; }
.share-presence strong, .share-presence span { display: block; }
.share-presence strong { color: var(--navy); font-size: 10px; }
.share-presence > div:first-child span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.share-presence-people { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.share-presence-person, .share-presence-empty { display: inline-flex !important; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 99px; background: #edf6ef; color: var(--mint-deep); font-size: 9px; white-space: nowrap; }
.share-presence-person i { width: 6px; height: 6px; border-radius: 50%; background: #9fc53b; }
.share-presence-empty { background: #f0f3f2; color: var(--muted); }
.share-presence-self { display: flex; align-items: center; gap: 6px; }
.share-presence-self input { width: 110px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font: inherit; font-size: 9px; }
.share-presence-self .button { min-height: 29px; padding: 6px 8px; font-size: 9px; }
.share-edit-head { display: grid; grid-template-columns: 1.2fr 1fr .7fr; gap: 10px; margin: 20px 0; }
.share-field { display: flex; flex-direction: column; gap: 6px; }
.share-field span, .share-comment-form label { color: var(--muted); font-size: 10px; font-weight: 800; }
.share-field input, .share-comment-form textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 11px; }
.share-field input:focus, .share-comment-form textarea:focus, .share-number:focus { outline: 2px solid #9cdab4; outline-offset: 1px; border-color: var(--mint-deep); }
.share-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; }
.share-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.share-table th, .share-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; text-align: right; white-space: nowrap; }
.share-table th:first-child, .share-table td:first-child { text-align: left; }
.share-table th:nth-child(2), .share-table td:nth-child(2) { min-width: 240px; text-align: left; white-space: normal; }
.share-table th { color: var(--muted); background: #fbfcfd; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.share-table tr:last-child td { border-bottom: 0; }
.share-table td strong, .share-table td small { display: block; }
.share-table td strong { color: var(--ink); font-size: 11px; }
.share-table td small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.share-row-comment { color: #71818f !important; line-height: 1.4; }
.share-number { width: 75px; padding: 8px 7px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font: inherit; font-size: 10px; text-align: right; }
.share-rate { width: 95px; }
.share-empty { padding: 28px !important; text-align: center !important; }
.share-total { display: flex; justify-content: flex-end; gap: 22px; align-items: baseline; margin-top: 20px; color: var(--muted); font-size: 11px; }
.share-total strong { color: var(--navy); font-size: 19px; }
.share-total-primary { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 800; }
.share-total-primary strong { color: var(--navy); font-size: 24px; }
.estimate-start-card { min-height: 210px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; padding: 24px; }
.estimate-start-card .estimate-start-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--mint-soft); color: var(--mint-deep); font-size: 24px; font-weight: 800; }
.estimate-start-card strong { color: var(--ink); font-size: 18px; }
.estimate-start-card span { max-width: 280px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.share-comment-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 9px 12px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.share-comment-form label { grid-column: 1 / -1; }
.share-comment-form textarea { min-height: 48px; resize: vertical; }
.share-comment-form .button { min-height: 40px; }
.share-comments { margin-top: 26px; }
.share-comments-empty { padding-top: 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.share-subheading { margin-bottom: 9px; color: var(--navy); font-size: 12px; font-weight: 850; }
.share-comment { padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; }
.share-comment + .share-comment { margin-top: 7px; }
.share-comment > div { display: flex; align-items: baseline; gap: 8px; }
.share-comment strong { color: var(--ink); font-size: 10px; }
.share-comment small { color: var(--muted); font-size: 9px; }
.share-comment p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; white-space: pre-wrap; }
.share-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 27px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.share-footer > div { display: flex; gap: 8px; }
.share-error { max-width: 520px; margin: 110px auto 0; padding: 30px; border: 1px solid var(--line); border-radius: 17px; background: #fff; text-align: center; }
.share-error-mark { display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto; border-radius: 11px; background: var(--amber-bg); color: #8c6b2a; font-weight: 900; }
.share-error h1 { margin: 17px 0 0; color: var(--navy); font-size: 26px; letter-spacing: -.05em; }
.share-error p { margin: 10px auto 22px; color: var(--muted); font-size: 12px; line-height: 1.6; }
@media (max-width: 650px) { .share-card-top, .share-notice, .share-footer { align-items: flex-start; flex-direction: column; }.share-notice small { max-width: none; text-align: left; }.share-access { order: -1; }.share-edit-head { grid-template-columns: 1fr; }.share-comment-form { grid-template-columns: 1fr; }.share-comment-form .button, .share-footer .button { width: 100%; }.share-footer > div { width: 100%; flex-direction: column; }.share-page { width: min(100% - 24px, 980px); padding-top: 20px; }.share-presence { grid-template-columns: 1fr; align-items: flex-start; }.share-presence-self { width: 100%; }.share-presence-self input { flex: 1; width: auto; } }
.legal-draft-note { margin-bottom: 28px; padding: 15px 17px; border: 1px solid #e9d8ac; border-radius: 11px; background: var(--amber-bg); color: #856827; font-size: 11px; line-height: 1.55; }
.legal-content { padding: 34px 0 15px; border-top: 1px solid var(--line); }
.legal-content h2 { margin: 30px 0 9px; color: var(--navy); font-size: 18px; letter-spacing: -.035em; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li { color: #566a7d; font-size: 12px; line-height: 1.7; }
.legal-content p { margin: 10px 0; }
.legal-content ul { margin: 9px 0 14px; padding-left: 21px; }
.legal-content li + li { margin-top: 5px; }
.legal-meta { padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted) !important; font-size: 10px !important; }
.legal-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; margin-top: 35px; padding-top: 19px; border-top: 1px solid var(--line); }
.legal-nav a { color: var(--mint-deep); font-size: 11px; font-weight: 800; text-decoration: none; }
.legal-nav a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.legal-consent { display: flex; align-items: flex-start; gap: 9px; margin-top: 18px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; color: var(--muted); font-size: 10px; line-height: 1.45; }
.legal-consent input { flex: 0 0 auto; width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--mint-strong); }
.legal-consent a { color: var(--mint-deep); font-weight: 750; text-decoration: underline; text-underline-offset: 2px; }
.auth-mode-switch { display: flex; align-items: center; gap: 10px; margin: 0 auto 0 0; color: var(--muted); font-size: 10px; }
.auth-mode-switch-button { min-height: 36px; padding: 0 13px; color: var(--mint-deep); font-size: 10px; font-weight: 800; }

.catalog-field-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.catalog-field-heading label { margin: 0; }
.catalog-field-hint { color: var(--muted); font-size: 10px; }
.catalog-result-main:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--mint-deep); outline-offset: -2px; }
.catalog-result.selected .catalog-result-main { background: #effaf3; }
.catalog-result.selected .catalog-result-main strong { color: var(--navy); }
.catalog-result-price { min-width: 76px; text-align: right; }
.catalog-loading { padding: 24px 16px; color: var(--muted); font-size: 11px; text-align: center; }

@media (max-width: 760px) {
  .public-nav, .public-hero, .public-counter, .public-workflow, .public-pro, .public-legal, .public-footer { width: min(100% - 30px, 560px); }
  .public-nav { min-height: 72px; }
  .public-nav-actions { gap: 8px; }
  .public-nav-actions .public-button-secondary { padding-inline: 10px; font-size: 10px; }
  .public-nav-actions .public-link-button { font-size: 10px; }
  .public-hero { grid-template-columns: 1fr; gap: 52px; padding: 58px 0 75px; }
  .public-hero-copy h1 { font-size: clamp(45px, 14vw, 68px); }
  .public-lead { font-size: 14px; }
  .public-hero-actions { align-items: stretch; flex-direction: column; }
  .public-button { width: 100%; }
  .public-preview { width: calc(100% - 12px); justify-self: start; }
  .public-counter { align-items: flex-start; flex-direction: column; gap: 7px; }
  .public-workflow { padding: 78px 0 82px; }
  .public-steps { grid-template-columns: 1fr; margin-top: 37px; }
  .public-steps article, .public-steps article + article { min-height: 0; padding: 20px 0; border-left: 0; }
  .public-steps h3 { margin-top: 19px; }
  .public-pro { grid-template-columns: 1fr; gap: 38px; padding: 42px 0 46px; }
  .public-legal { padding: 60px 0 42px; }
  .public-footer > span:nth-child(2) { width: 100%; margin-right: 0; }
  .legal-page { width: min(100% - 30px, 600px); padding-top: 25px; }
  .legal-heading { margin-top: 55px; }
}

@media (max-width: 760px) {
  .admin-user-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .admin-user-row > div:nth-child(2), .admin-user-row > div:nth-child(3) { display: none; }
  .admin-user-row select, .admin-user-expiry { grid-column: span 1; width: 100%; }
  .admin-user-row select { justify-self: stretch; }
  .admin-user-expiry input { width: 100%; }
}

/* Admin workspace: operate-first hierarchy for the owner dashboard. */
.admin-heading { align-items: flex-end; }
.admin-heading-actions { display: flex; align-items: center; gap: 10px; }
.admin-owner-badge, .admin-status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 9px; font-weight: 800; white-space: nowrap; }
.admin-status-chip.success { border-color: #ccebd8; background: #effaf3; color: var(--mint-deep); }
.admin-stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-bottom: 17px; }
.admin-stat-card { min-height: 102px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.admin-stat-card.featured { border-color: #bde6cc; background: var(--surface-tint); }
.admin-stat-card span, .admin-stat-card small { display: block; color: var(--muted); font-size: 9px; }
.admin-stat-card strong { display: block; margin: 12px 0 5px; color: var(--navy); font-size: 22px; letter-spacing: -.045em; }
.admin-stat-card small { font-size: 8px; }
.admin-focus-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 17px; margin-bottom: 17px; }
.admin-access-card, .admin-attention-card, .admin-activity-card, .admin-settings-card, .admin-import-card { padding: 20px; }
.admin-card-kicker { color: var(--mint-deep); font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.admin-access-main { display: flex; align-items: center; gap: 11px; margin-top: 14px; }
.admin-access-main h2 { margin: 0; color: var(--navy); font-size: 16px; letter-spacing: -.025em; }
.admin-access-main p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.admin-access-main .admin-status-chip { margin-left: auto; }
.admin-access-copy { max-width: 620px; margin-top: 15px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.admin-access-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.admin-access-actions .button { min-height: 31px; font-size: 10px; }
.admin-attention-count { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: var(--amber-bg); color: #966d22; font-size: 11px; font-weight: 900; }
.admin-attention-list { display: grid; gap: 8px; margin-top: 9px; }
.admin-attention-list > div { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); }
.admin-attention-list strong { color: var(--ink); font-size: 10px; }
.admin-attention-list .button { padding: 0; font-size: 9px; }
.admin-columns { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 17px; align-items: start; }
.admin-main-column, .admin-side-column { display: grid; gap: 17px; min-width: 0; }
.admin-activity-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 15px; }
.admin-activity-grid > div { padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; }
.admin-activity-grid strong, .admin-activity-grid span { display: block; }
.admin-activity-grid strong { color: var(--navy); font-size: 15px; }
.admin-activity-grid span { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.25; }
.admin-activity-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.admin-activity-foot .button { padding: 0; font-size: 9px; }
.admin-setting-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-top: 2px; }
.admin-setting-grid label { display: grid; gap: 6px; color: var(--muted); font-size: 9px; }
.admin-setting-grid .setting-number { width: 100%; min-height: 32px; text-align: left; }
.admin-feature-list { margin-top: 16px; border-top: 1px solid var(--line); }
.admin-feature-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.admin-feature-row strong, .admin-feature-row span { display: block; }
.admin-feature-row strong { color: var(--ink); font-size: 10px; }
.admin-feature-row span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.admin-import-card .card-header { align-items: flex-start; }
.admin-import-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 15px 0; }
.admin-import-flow > div { padding: 10px 9px; border: 1px solid var(--line); border-radius: 9px; }
.admin-import-flow span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-tint); color: var(--mint-deep); font-size: 9px; font-weight: 900; }
.admin-import-flow strong, .admin-import-flow small { display: block; }
.admin-import-flow strong { margin-top: 7px; color: var(--ink); font-size: 9px; }
.admin-import-flow small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.25; }
.admin-import-note, .admin-import-format-note { display: grid; gap: 3px; padding: 11px 12px; border: 1px solid #d5efdf; border-radius: 9px; background: var(--surface-tint); }
.admin-import-note { margin-bottom: 12px; }
.admin-import-note strong, .admin-import-format-note strong { color: var(--mint-deep); font-size: 9px; }
.admin-import-note span, .admin-import-format-note span { color: var(--muted); font-size: 8px; line-height: 1.4; }
.admin-import-card > .button { width: 100%; min-height: 34px; font-size: 10px; }
.rental-import-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.rental-import-steps > div { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; font-weight: 800; }
.rental-import-steps > div + div { opacity: .62; }
.rental-import-steps span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: #eef3f6; color: var(--muted); font-size: 9px; }
.rental-import-steps .active { color: var(--mint-deep); }
.rental-import-steps .active span { background: var(--mint); color: var(--mint-deep); }
.admin-import-format-note { grid-column: 1 / -1; }
.rental-import-steps + .form-grid .field-hint { margin-top: -1px; }
@media (max-width: 1120px) {
  .admin-columns { grid-template-columns: 1fr; }
  .admin-side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .admin-side-column .admin-import-card { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .admin-heading, .admin-heading-actions { align-items: stretch; flex-direction: column; }
  .admin-heading-actions .button, .admin-heading-actions .admin-owner-badge { justify-content: center; width: 100%; }
  .admin-stat-strip { grid-template-columns: repeat(2, 1fr); }
  .admin-focus-grid, .admin-side-column { grid-template-columns: 1fr; }
  .admin-access-main { align-items: flex-start; flex-wrap: wrap; }
  .admin-access-main .admin-status-chip { width: 100%; margin-left: 0; }
  .admin-activity-grid, .admin-setting-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-activity-foot { align-items: flex-start; flex-direction: column; }
  .rental-import-steps { gap: 4px; }
  .rental-import-steps > div { align-items: flex-start; flex-direction: column; gap: 4px; font-size: 8px; }
}

/* Theme control and the graphite / lime / cobalt visual system. */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); font-size: 10px; font-weight: 800; transition: background-color var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out); }
.theme-toggle:hover { border-color: var(--blue); background: var(--surface-tint); color: var(--ink); }
.theme-toggle[aria-pressed="true"] { border-color: var(--blue); }
.theme-toggle-icon { font-size: 15px; line-height: 1; }
.theme-toggle-text { white-space: nowrap; }
.public-nav .theme-toggle { display: inline-flex !important; flex: 0 0 auto; min-height: 38px; background: transparent; }
.share-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; }

html[data-theme="dark"] {
  color-scheme: dark;
  --navy: #e7eee9;
  --navy-2: #d5e0d9;
  --ink: #e7eee9;
  --muted: #a8b4ae;
  --faint: #84928b;
  --paper: #202932;
  --bg: #12181d;
  --surface-soft: #273139;
  --surface-tint: #2f3d28;
  --line: #39474f;
  --line-strong: #58676e;
  --mint: #d8f36a;
  --mint-strong: #d8f36a;
  --mint-deep: #d8f36a;
  --amber: #ffad80;
  --amber-bg: #3b2a24;
  --violet: #aaa0ff;
  --blue: #7890ff;
  --red: #ff8e8e;
  --shadow: 0 18px 40px rgba(0, 0, 0, .25);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .public-page,
html[data-theme="dark"] .share-body { background: var(--bg); color: var(--ink); }
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .button-primary,
html[data-theme="dark"] .public-button-primary,
html[data-theme="dark"] .stat-card.featured,
html[data-theme="dark"] .estimate-kpi.primary,
html[data-theme="dark"] .public-preview { background: #202832; }
html[data-theme="dark"] .sidebar-new-estimate { color: #202832; }
html[data-theme="dark"] .nav-item:hover,
html[data-theme="dark"] .nav-item.active,
html[data-theme="dark"] .sidebar-estimate-row:hover,
html[data-theme="dark"] .sidebar-estimate-row.active { background: #2d3947; }
html[data-theme="dark"] .button-primary:hover,
html[data-theme="dark"] .public-button-primary:hover { background: #2d3947; }
html[data-theme="dark"] .topbar { border-color: var(--line); background: rgba(18, 24, 29, .94); }
html[data-theme="dark"] .topbar-account:hover { background: var(--surface-soft); }
html[data-theme="dark"] .card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .estimate-kpi,
html[data-theme="dark"] .estimate-details,
html[data-theme="dark"] .composition-card,
html[data-theme="dark"] .stage-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .share-card,
html[data-theme="dark"] .share-error,
html[data-theme="dark"] .account-card,
html[data-theme="dark"] .personal-stat,
html[data-theme="dark"] .admin-stat-card,
html[data-theme="dark"] .admin-owner-badge,
html[data-theme="dark"] .admin-status-chip { background: var(--paper); color: var(--ink); }
html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .public-button-secondary,
html[data-theme="dark"] .stage-tab.active,
html[data-theme="dark"] .stage-reorder,
html[data-theme="dark"] .stage-edit-button,
html[data-theme="dark"] .detail-field input,
html[data-theme="dark"] .search-box,
html[data-theme="dark"] .filter-select,
html[data-theme="dark"] .line-input:hover,
html[data-theme="dark"] .line-input:focus,
html[data-theme="dark"] .form-field input,
html[data-theme="dark"] .form-field select,
html[data-theme="dark"] .form-field textarea,
html[data-theme="dark"] .catalog-combobox-control,
html[data-theme="dark"] .catalog-result-list,
html[data-theme="dark"] .row-action-menu,
html[data-theme="dark"] .share-field input,
html[data-theme="dark"] .share-comment-form textarea,
html[data-theme="dark"] .share-number,
html[data-theme="dark"] .theme-toggle { background: var(--paper); color: var(--ink); }
html[data-theme="dark"] .estimate-outline { border-color: var(--line); background: rgba(18, 24, 29, .95); }
html[data-theme="dark"] .modal-footer { border-color: var(--line); background: rgba(32, 41, 50, .98); }
html[data-theme="dark"] .pro-overlay { background: rgba(18, 24, 29, .94); }
html[data-theme="dark"] .stage-tabs { background: #273139; }
html[data-theme="dark"] .stage-card:hover,
html[data-theme="dark"] .estimate-row:hover,
html[data-theme="dark"] .quick-item:hover { background: #273139; }
html[data-theme="dark"] .data-table th,
html[data-theme="dark"] .share-table th,
html[data-theme="dark"] .admin-activity-grid > div { background: var(--surface-soft); }
html[data-theme="dark"] .share-notice,
html[data-theme="dark"] .share-comment,
html[data-theme="dark"] .legal-consent,
html[data-theme="dark"] .estimate-empty-note { background: var(--surface-soft); }
html[data-theme="dark"] .share-access,
html[data-theme="dark"] .share-intro,
html[data-theme="dark"] .share-live-notice,
html[data-theme="dark"] .catalog-result.selected,
html[data-theme="dark"] .catalog-result.selected .catalog-result-main,
html[data-theme="dark"] .analytics-scope-note { border-color: var(--line-strong); background: var(--surface-tint); }
html[data-theme="dark"] .public-preview { border-color: #46545e; box-shadow: 18px 22px 0 rgba(216, 243, 106, .2); }
html[data-theme="dark"] .public-legal-status,
html[data-theme="dark"] .free-limit,
html[data-theme="dark"] .legal-draft-note { border-color: #785442; background: var(--amber-bg); color: var(--amber); }
html[data-theme="dark"] .public-button-outline { color: var(--ink); }
html[data-theme="dark"] .empty-section,
html[data-theme="dark"] .activity-time { color: var(--faint); }

/* Focused public typography and a deliberately quiet one-off workspace. */
.public-button { font-size: 13px; font-weight: 750; letter-spacing: -.01em; }
.public-link-button { font-size: 12px; font-weight: 750; }
.public-hero-copy h1 { font-size: clamp(44px, 5.8vw, 76px); font-weight: 760; line-height: 1.02; letter-spacing: -.052em; }
.public-lead { font-size: 16px; line-height: 1.58; }
.public-section-heading h2, .public-pro h2, .public-legal h2 { font-weight: 760; letter-spacing: -.048em; }
.public-steps h3 { font-size: 17px; font-weight: 760; }
.public-steps p, .public-pro p { font-size: 12px; }
.public-pro-list { min-width: 0; }
.public-pro-list > div { min-width: 0; grid-template-columns: 27px minmax(0, 1fr); }
.public-pro-list strong, .public-pro-list small { min-width: 0; overflow-wrap: normal; word-break: normal; }
.public-pro-cta { margin-top: 23px; }

.brand { color: inherit; text-decoration: none; }
.guest-mode-shell .topbar { display: none; }
.guest-mode-shell .sidebar-new-estimate,
.guest-mode-shell .workspace-switcher,
.guest-mode-shell .main-nav,
.guest-mode-shell .sidebar-section-title,
.guest-mode-shell .tool-list,
.guest-mode-shell .sidebar-bottom { display: none; }
.guest-mode-shell .sidebar { justify-content: flex-start; min-height: 100vh; }
.guest-mode-shell .brand { padding-bottom: 0; }
.guest-mode-shell .view-root { padding-top: 42px; }
.guest-save-warning { display: flex; align-items: flex-start; gap: 9px; max-width: 620px; margin-top: 12px; color: #9a6d21; font-size: 11px; line-height: 1.45; }
.guest-save-warning-dot { flex: 0 0 7px; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #d99a22; }
.guest-save-link { padding: 0; border: 0; background: transparent; color: var(--mint-deep); font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.guest-save-link:hover { color: var(--navy); }

.pro-overlay { background: var(--paper); border: 1px solid var(--line); backdrop-filter: none; }
.pro-overlay strong { font-size: 16px; line-height: 1.25; }
.pro-overlay span { max-width: 300px; font-size: 13px; line-height: 1.5; }
.pro-overlay .button { min-height: 44px; padding-inline: 16px; font-size: 12px; }

.catalog-combobox-toggle { display: grid; place-items: center; padding: 0; }
.catalog-combobox-chevron { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-1px, -1px); transition: transform var(--motion-fast) var(--ease-out); }
.catalog-combobox-toggle[aria-expanded="true"] .catalog-combobox-chevron { transform: rotate(225deg) translate(-1px, -1px); }
.custom-favorite-choice { position: relative; cursor: pointer; }
.custom-favorite-choice input { position: absolute; width: 1px !important; height: 1px; opacity: 0; pointer-events: none; }
.custom-favorite-star { color: #b2bdc7; font-size: 19px; line-height: 1; }
.custom-favorite-choice input:checked + .custom-favorite-star { color: #d99a22; }
.custom-favorite-choice:focus-within .custom-favorite-star { outline: 2px solid var(--mint-deep); outline-offset: 3px; border-radius: 3px; }

html[data-theme="dark"] .pro-overlay { background: var(--paper); }
html[data-theme="dark"] .guest-save-warning { color: var(--amber); }

@media (max-width: 760px) {
  .public-hero-copy h1 { font-size: clamp(43px, 13vw, 66px); }
  .public-pro-cta { width: 100%; }
  .guest-mode-shell { display: block; }
  .guest-mode-shell .sidebar { display: flex; min-height: 0; height: auto; padding: 14px 16px; }
  .guest-mode-shell .main-content { min-height: calc(100svh - 70px); }
  .guest-mode-shell .view-root { padding-top: 25px; }
}

@media (max-width: 760px) {
  .theme-toggle-text { display: none; }
  .theme-toggle { width: 34px; padding: 0; }
  .share-header { align-items: flex-start; }
}

/* Прозрачный знак: без декоративной квадратной плашки вокруг PNG. */
.brand-mark,
.public-brand-mark {
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  height: auto !important;
  aspect-ratio: 1024 / 920;
  object-fit: contain;
  flex: 0 0 auto;
}
.brand-mark { width: 48px; }
.public-brand-mark { width: 50px; }
.share-brand > img {
  width: 42px;
  height: auto;
  aspect-ratio: 1024 / 920;
  padding: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  flex: 0 0 auto;
}

/* Product foundation: one operational palette, clear source-of-price states, and a truthful quick-estimate shell. */
@font-face { font-family: "Smetilishe Sans"; src: url("/assets/fonts/DejaVuSans.ttf") format("truetype"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Smetilishe Sans"; src: url("/assets/fonts/DejaVuSans-Bold.ttf") format("truetype"); font-style: normal; font-weight: 700; font-display: swap; }
:root {
  --navy: #202832;
  --navy-2: #2d3947;
  --ink: #202832;
  --muted: #64717e;
  --faint: #94a0aa;
  --paper: #fffefa;
  --bg: #f4f6f2;
  --line: #dbe3df;
  --line-strong: #b7c5c0;
  --mint: #d8f36a;
  --mint-strong: #91b327;
  --mint-deep: #566a15;
  --amber: #f4b844;
  --amber-bg: #fff4d8;
  --blue: #4262ff;
  --red: #d65f60;
  --shadow: 0 12px 30px rgba(32, 40, 50, .08);
  font-family: "Smetilishe Sans", "DejaVu Sans", Arial, sans-serif;
  font-synthesis: none;
}

.status-pulse.guest { background: var(--amber); box-shadow: 0 0 0 4px rgba(244, 184, 68, .16); }
.guest-mode-shell .sidebar { background: var(--navy); }
.guest-mode-shell .view-root { max-width: 1400px; }
.guest-mode-shell .estimate-topline { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.guest-mode-shell .estimate-actions .button[data-action="share-estimate"],
.guest-mode-shell .estimate-actions .button[data-action="send-rental-request"],
.guest-mode-shell .estimate-actions .button[data-action="export-excel"],
.guest-mode-shell .estimate-actions .button[data-action="export-client-excel"] { display: none; }
.guest-mode-shell .guest-save-warning { padding: 10px 12px; border: 1px solid #efd69b; border-radius: 10px; background: var(--amber-bg); color: #755b1d; }
.guest-mode-shell .guest-save-link { color: var(--mint-deep); }

.line-item-copy span { max-width: 100%; }
.price-source-field { color: var(--muted); }
.form-field select#modalPriceStatus,
.form-field input#modalPriceSource { min-height: 40px; }
.catalog-result-main > span:last-child { white-space: nowrap; }

html[data-theme="dark"] .guest-mode-shell .guest-save-warning { color: #f4d68d; background: #3b3424; border-color: #6f5a2c; }

/* Estimate context is part of the calculation contract, not decoration. */
.estimate-details { grid-template-columns: minmax(180px, 1.25fr) minmax(150px, 1fr) 145px minmax(150px, 1fr) 145px 145px 145px minmax(150px, .9fr); }
.detail-field select { width: 100%; min-height: 36px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 11px; font-weight: 700; }
.detail-field select:focus { border-color: #b9dfc8; box-shadow: 0 0 0 3px rgba(31,163,106,.08); outline: none; }
.detail-field-note span { min-height: 36px; display: flex; align-items: center; padding: 9px 10px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); font-size: 10px; font-weight: 700; }
@media (max-width: 1320px) { .estimate-details { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .estimate-details { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .estimate-details { grid-template-columns: 1fr; } }
.line-row:not(.header) .line-cell:nth-child(4)::before,
.composition-card .line-row:not(.header) .line-cell:nth-child(4)::before { content: "Период" !important; }

/* Quick estimate is a focused one-document workspace: keep only the brand strip. */
.guest-mode-shell { display: block; min-height: 100vh; }
.guest-mode-shell .sidebar { display: flex; width: 100%; min-height: 0; height: auto; padding: 14px 24px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.guest-mode-shell .brand { display: inline-flex; align-items: center; gap: 11px; }
.guest-mode-shell .brand-mark { width: 38px; height: 38px; }
.guest-mode-shell .brand-copy { display: block; }
.guest-mode-shell .brand-subtitle { display: none; }
.guest-mode-shell .main-content { min-height: calc(100svh - 70px); }
.guest-mode-shell .view-root { width: min(100% - 48px, 1400px); margin-inline: auto; padding-top: 42px; }
@media (max-width: 760px) {
  .guest-mode-shell .sidebar { position: static; transform: none; width: 100%; padding: 12px 16px; }
  .guest-mode-shell .view-root { width: min(100% - 32px, 1400px); padding-top: 25px; }
}

/* The guest flow asks only for context needed to choose a source and add the
   first line. Finance and shoot-period details stay available, but out of the
   critical path until the user opens them. */
.quick-estimate-fields { display: grid; gap: 12px; }
.quick-estimate-primary { margin: 0; }
.quick-estimate-advanced { overflow: hidden; margin: 0; }
.quick-estimate-advanced summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; color: var(--ink); cursor: pointer; list-style: none; }
.quick-estimate-advanced summary::-webkit-details-marker { display: none; }
.quick-estimate-advanced summary strong, .quick-estimate-advanced summary small { display: block; }
.quick-estimate-advanced summary strong { color: var(--navy); font-size: 11px; }
.quick-estimate-advanced summary small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.quick-estimate-chevron { color: var(--muted); font-size: 17px; transition: transform .16s ease; }
.quick-estimate-advanced[open] .quick-estimate-chevron { transform: rotate(180deg); }
.quick-estimate-advanced-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 18px 18px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .quick-estimate-advanced-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .quick-estimate-primary { grid-template-columns: 1fr; }
  .quick-estimate-advanced-grid { grid-template-columns: 1fr; padding-inline: 15px; }
}

/* Council slice: make the shoot context a single launch surface instead of a
   flat wall of fields. The values still use the existing estimate contract. */
.estimate-context-card { overflow: hidden; padding: 0; }
.estimate-context-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(100deg, rgba(228, 244, 236, .62), rgba(255, 255, 255, .92)); }
.estimate-context-head .eyebrow { margin-bottom: 5px; color: var(--mint-deep); }
.estimate-context-head strong, .estimate-context-head span { display: block; }
.estimate-context-head strong { color: var(--navy); font-size: 15px; letter-spacing: -.02em; }
.estimate-context-head span:not(.estimate-context-progress) { margin-top: 4px; color: var(--muted); font-size: 11px; }
.estimate-context-progress { flex: 0 0 auto; min-width: 49px; padding: 8px 10px; border: 1px solid #e7c36e; border-radius: 999px; color: #806119; background: #fff8df; font-size: 11px; font-weight: 850; text-align: center; }
.estimate-context-progress.ready { border-color: #a8dfbf; color: var(--mint-deep); background: #eaf8ef; }
.estimate-context-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 18px 20px; border: 0; box-shadow: none; background: transparent; }
.estimate-context-advanced { margin: 0; border-top: 1px solid var(--line); }
.estimate-context-advanced summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 20px; color: var(--ink); cursor: pointer; list-style: none; }
.estimate-context-advanced summary::-webkit-details-marker { display: none; }
.estimate-context-advanced summary strong, .estimate-context-advanced summary small { display: block; }
.estimate-context-advanced summary strong { color: var(--navy); font-size: 11px; }
.estimate-context-advanced summary small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.estimate-context-finance { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0 20px 18px; border: 0; box-shadow: none; background: transparent; }
.quick-estimate-primary.estimate-context-card { margin: 0; }
.quick-estimate-primary .estimate-context-fields { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1120px) {
  .estimate-context-fields, .quick-estimate-primary .estimate-context-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .estimate-context-fields, .quick-estimate-primary .estimate-context-fields, .estimate-context-finance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .estimate-context-head { align-items: flex-start; padding: 15px; }
  .estimate-context-fields, .quick-estimate-primary .estimate-context-fields, .estimate-context-finance { grid-template-columns: 1fr; padding: 15px; }
  .estimate-context-finance { padding-top: 0; }
}

/* Mobile navigation and touch fallbacks. */
body.mobile-nav-open { overflow: hidden; }
@media (max-width: 760px) {
  .mobile-menu-button { width: 44px; height: 44px; }
  .stage-drag-handle, .stage-reorder, .stage-edit-button, .line-menu-button, .favorite-row { min-width: 44px; min-height: 44px; }
  .stage-reorder-actions { gap: 5px; }
  .row-actions { min-width: 92px; gap: 5px; }
}
.history-list{display:grid;gap:10px}.history-item{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--line,#dbe3df)}.history-item:last-child{border-bottom:0}.history-item>div{display:grid;gap:4px;min-width:0}.history-item strong{color:var(--ink,#202832)}.history-item span,.history-item small{color:var(--muted,#64717e);font-size:12px}.history-item small{font-size:11px}
/* Internal finance model: visible only inside a registered workspace. */
.finance-panel { border-color: #d8e7dc; background: linear-gradient(145deg, #fbfdf9, #f2f8f2); }
.finance-panel .card-header { align-items: flex-start; }
.finance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.finance-grid > div { min-width: 0; padding: 12px; border: 1px solid #dce9df; border-radius: 12px; background: rgba(255,255,255,.72); }
.finance-grid span { display: block; color: #687681; font-size: 11px; line-height: 1.3; }
.finance-grid strong { display: block; margin-top: 5px; color: #182633; font-size: 16px; line-height: 1.15; }
.finance-note { margin-top: 12px; color: #687681; font-size: 12px; line-height: 1.45; }
@media (max-width: 720px) { .finance-grid { grid-template-columns: 1fr; } }
.plan-expired-warning { display:flex; align-items:center; gap:14px; margin:0 0 18px; padding:14px 16px; border:1px solid #e8c36b; border-radius:16px; background:#fff8e7; color:#28313d; }
.plan-expired-warning strong { white-space:nowrap; }
.plan-expired-warning span { flex:1; color:#667386; font-size:13px; line-height:1.45; }
@media (max-width: 720px) { .plan-expired-warning { align-items:flex-start; flex-wrap:wrap; } .plan-expired-warning span { flex-basis:100%; order:3; } }

/* Keep the first add-item decision short: quantity, period and rate stay above
   optional metadata, while comments and internal notes remain available. */
.modal-optional-fields { grid-column: 1 / -1; overflow: hidden; margin-top: 4px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.modal-optional-fields summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; color: var(--navy); cursor: pointer; font-size: 10px; font-weight: 850; list-style: none; }
.modal-optional-fields summary::-webkit-details-marker { display: none; }
.modal-optional-fields summary::after { color: var(--muted); content: "⌄"; font-size: 15px; line-height: 1; transition: transform .16s ease; }
.modal-optional-fields[open] summary { border-bottom: 1px solid var(--line); }
.modal-optional-fields[open] summary::after { transform: rotate(180deg); }
.modal-optional-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 13px; }
@media (max-width: 760px) { .modal-optional-grid { grid-template-columns: 1fr; } }

/* Rental connector settings: compact operational controls, with the current
   source state visible before an administrator edits the form. */
.connector-modal { width: min(700px, 100%); }
.connector-status-banner { display: flex; align-items: center; gap: 11px; margin-bottom: 17px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: #f7faf8; }
.connector-status-banner > div { min-width: 0; }
.connector-status-banner strong, .connector-status-banner small { display: block; }
.connector-status-banner strong { color: var(--navy); font-size: 11px; }
.connector-status-banner small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.connector-form-grid { gap: 13px; }
.connector-config-note { display: grid; gap: 4px; margin-top: 16px; padding: 12px 13px; border: 1px dashed #b9d9c5; border-radius: 11px; background: #f3fbf6; color: var(--ink); }
.connector-config-note strong { color: var(--mint-deep); font-size: 10px; }
.connector-config-note span { color: var(--muted); font-size: 9px; line-height: 1.45; }
@media (max-width: 760px) {
  .connector-modal .modal-header, .connector-modal .modal-body { padding-inline: 18px; }
  .connector-modal .modal-footer { grid-template-columns: 1fr; }
  .connector-status-banner { align-items: flex-start; }
}

/* Final UI pass for the shared staging review. Keep auth actions readable in
   both themes and make locked Pro actions recognizable by color, not badges. */
.modal-context:empty { display: none; }
.auth-recovery-link {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  font-size: inherit;
  font-weight: 800;
  text-decoration: none;
}
.auth-recovery-link:hover {
  transform: none;
  border-color: transparent;
  background: transparent;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-recovery-link { justify-self: start; margin-top: 6px; }
.auth-mode-switch {
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 0 auto 0 0;
}
.auth-mode-switch > span { color: var(--muted); font-size: 12px; }
.auth-mode-switch-button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}
.auth-mode-switch-button:hover {
  transform: none;
  border-color: var(--mint-strong);
  background: var(--surface-tint);
  color: var(--ink);
}
.modal-footer > .button { min-height: 42px; }

.estimate-actions .button[data-action="export-excel"],
.estimate-actions .button[data-action="export-client-excel"],
.estimate-actions .button[data-action="share-estimate"],
.estimate-actions .button[data-action="prepare-transfer"],
.estimate-actions .button[data-action="send-rental-request"] {
  border-color: #accd3b;
  background: var(--mint);
  color: var(--navy);
}
.estimate-actions .button[data-action="export-excel"]:hover,
.estimate-actions .button[data-action="export-client-excel"]:hover,
.estimate-actions .button[data-action="share-estimate"]:hover,
.estimate-actions .button[data-action="prepare-transfer"]:hover,
.estimate-actions .button[data-action="send-rental-request"]:hover {
  border-color: #bfdc4a;
  background: #ebff8b;
  color: var(--navy);
}
.estimate-actions .pro-label { display: none; }

.estimate-context-head {
  background: var(--surface-tint);
}
.estimate-context-head strong { font-size: 17px; }
.estimate-context-head span:not(.estimate-context-progress) {
  max-width: 680px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.detail-field select,
.detail-field select option {
  background: var(--paper);
  color: var(--ink);
}

.rental-import-explainer {
  display: grid;
  gap: 4px;
  margin: -4px 0 16px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}
.rental-import-explainer strong { color: var(--ink); font-size: 11px; }
.rental-import-explainer span { color: var(--muted); font-size: 10px; line-height: 1.45; }

html[data-theme="dark"] .button-primary,
html[data-theme="dark"] .public-button-primary {
  background: var(--mint);
  border-color: var(--mint);
  color: #202832;
}
html[data-theme="dark"] .button-primary:hover,
html[data-theme="dark"] .public-button-primary:hover {
  background: #ebff8b;
  border-color: #ebff8b;
  color: #202832;
}
html[data-theme="dark"] .estimate-actions .button[data-action="export-excel"],
html[data-theme="dark"] .estimate-actions .button[data-action="export-client-excel"],
html[data-theme="dark"] .estimate-actions .button[data-action="share-estimate"],
html[data-theme="dark"] .estimate-actions .button[data-action="prepare-transfer"],
html[data-theme="dark"] .estimate-actions .button[data-action="send-rental-request"] {
  background: var(--mint);
  border-color: var(--mint);
  color: #202832;
}
html[data-theme="dark"] .estimate-actions .button[data-action="export-excel"]:hover,
html[data-theme="dark"] .estimate-actions .button[data-action="export-client-excel"]:hover,
html[data-theme="dark"] .estimate-actions .button[data-action="share-estimate"]:hover,
html[data-theme="dark"] .estimate-actions .button[data-action="prepare-transfer"]:hover,
html[data-theme="dark"] .estimate-actions .button[data-action="send-rental-request"]:hover {
  background: #ebff8b;
  border-color: #ebff8b;
  color: #202832;
}
html[data-theme="dark"] .estimate-context-head {
  background: var(--surface-soft);
}
html[data-theme="dark"] .estimate-context-head .eyebrow { color: var(--mint); }
html[data-theme="dark"] .estimate-context-head span:not(.estimate-context-progress) { color: var(--muted); }
html[data-theme="dark"] .estimate-context-progress {
  border-color: #806a34;
  color: #f4d68d;
  background: #3b3424;
}
html[data-theme="dark"] .detail-field select,
html[data-theme="dark"] .detail-field select option {
  background: var(--paper);
  color: var(--ink);
}
html[data-theme="dark"] .rental-import-explainer { background: var(--surface-soft); }

@media (max-width: 760px) {
  .modal-footer { align-items: stretch; }
  .auth-mode-switch { width: 100%; justify-content: space-between; }
  .auth-mode-switch-button { flex: 0 0 auto !important; }
}
