:root {
  --ink: #16221d;
  --text: #33423b;
  --muted: #738079;
  --line: #dfe5e1;
  --canvas: #f3f5f4;
  --surface: #fff;
  --green: #176a4b;
  --green-dark: #113f30;
  --green-soft: #e8f4ee;
  --red: #b9473d;
  --red-soft: #fff0ee;
  --amber: #a76519;
  --amber-soft: #fff4e5;
  --blue: #3d6f91;
  --blue-soft: #eaf3f8;
  --violet: #685c91;
  --shadow: 0 14px 38px rgba(25, 42, 34, .08);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #eef2ee;
}

.auth-panel {
  width: min(100%, 390px);
  display: grid;
  gap: 25px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(22, 38, 31, .1);
}

.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-brand > span:last-child { display: grid; gap: 2px; }
.auth-brand strong { font-size: 16px; }
.auth-brand small { color: var(--muted); font-size: 8px; }
.auth-panel h1 { margin: 5px 0 7px; font-size: 25px; }
.auth-panel p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.auth-form { display: grid; gap: 15px; }
.auth-form label { display: grid; gap: 7px; color: var(--ink); font-size: 10px; font-weight: 700; }
.auth-form input { width: 100%; min-height: 40px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); font: inherit; font-size: 12px; outline: none; }
.auth-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.auth-form .button { justify-content: center; min-height: 42px; }
.auth-error { padding: 9px 10px; border-left: 3px solid var(--red); background: var(--red-soft); color: var(--red) !important; }

@media (max-width: 480px) {
  .auth-page { padding: 14px; }
  .auth-panel { padding: 24px; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--canvas); font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 14px; letter-spacing: 0; }
button, input { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(23, 106, 75, .18); outline-offset: 2px; }

.app-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar[hidden], .topbar[hidden] { display: none !important; }
.sidebar { position: sticky; top: 0; z-index: 30; display: flex; height: 100vh; flex-direction: column; padding: 21px 15px 15px; border-right: 1px solid var(--line); background: #fbfcfb; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 25px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; }
.brand-mark img { display: block; width: 100%; height: 100%; }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy strong { font-size: 15px; }
.brand-copy small { margin-top: 2px; color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.1px; }
.nav-list { display: grid; gap: 5px; }
.nav-item { position: relative; display: grid; grid-template-columns: 19px 1fr auto; align-items: center; gap: 10px; min-height: 43px; padding: 0 11px; border: 0; border-radius: 6px; color: #66736c; background: transparent; cursor: pointer; text-align: left; transition: .18s ease; }
.nav-item:hover { color: var(--ink); background: #f0f3f1; }
.nav-item.is-active { color: var(--green); background: var(--green-soft); font-weight: 750; }
.nav-item.is-active::before { content: ""; position: absolute; left: -15px; width: 3px; height: 24px; border-radius: 0 3px 3px 0; background: var(--green); }
.nav-item b { min-width: 22px; padding: 3px 6px; border-radius: 9px; color: var(--muted); background: #edf0ee; font-size: 9px; text-align: center; }
.nav-item i { width: 6px; height: 6px; border-radius: 50%; background: #cf5b4d; }
.sidebar-spacer { flex: 1; }
.protected-value { display: grid; grid-template-columns: 30px 1fr; gap: 10px; margin: 0 3px 17px; padding: 14px 12px; border: 1px solid #d9e5de; border-radius: 7px; background: #f3f9f6; }
.protected-value > .icon { display: grid; place-items: center; width: 28px; height: 28px; padding: 6px; border-radius: 50%; color: var(--green); background: #dfeee7; }
.protected-value div { display: flex; flex-direction: column; }
.protected-value small { color: var(--muted); font-size: 8px; }
.protected-value strong { margin-top: 3px; font-size: 16px; }
.protected-value div span { margin-top: 2px; color: #89938e; font-size: 8px; }
.workspace-user { display: grid; grid-template-columns: 35px 1fr 14px; align-items: center; gap: 9px; padding: 11px 7px 3px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.workspace-user > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.workspace-user strong, .workspace-user small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-user strong { font-size: 10px; }
.workspace-user small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.avatar { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 auto; border-radius: 50%; color: white; background: #385a4a; font-size: 10px; font-weight: 800; }
.avatar.large { width: 46px; height: 46px; font-size: 11px; }
.avatar.muted { color: #43564d; background: #e8ecea; }

.main-content { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 68px; padding: 0 32px; border-bottom: 1px solid var(--line); background: rgba(251,252,251,.94); backdrop-filter: blur(14px); }
.topbar-left, .top-actions, .heading-actions { display: flex; align-items: center; gap: 9px; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; color: #8a948e; font-size: 11px; }
.breadcrumbs i { color: #bcc3bf; font-style: normal; }
.breadcrumbs strong { color: var(--ink); }
.mobile-menu { display: none !important; }
.notification-dot { position: absolute; right: 7px; top: 7px; width: 6px; height: 6px; border: 1px solid white; border-radius: 50%; background: #cc574a; }

.icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex: 0 0 auto; }
.icon.tiny { width: 13px; height: 13px; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.icon-button { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: white; cursor: pointer; transition: .17s ease; }
.icon-button:hover { border-color: #bdc7c1; background: #f7f9f8; }
.icon-button.subtle { width: 31px; height: 31px; border-color: transparent; background: transparent; }
.icon-button.subtle:hover { background: #edf1ef; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 0 14px; border: 1px solid transparent; border-radius: 6px; font-size: 11px; font-weight: 750; cursor: pointer; transition: .16s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: var(--green); }
.button-primary:hover { background: #115b3f; }
.button-secondary { border-color: #d5ddd8; background: white; }
.button-secondary:hover { border-color: #aebbb4; }
.button-ghost { border-color: transparent; color: var(--muted); background: transparent; }
.button-dark { color: white; background: #17261f; }
.button-dark:hover { background: #0d1914; }
.button.full { width: 100%; }
.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 5px; border: 0; color: var(--green); background: transparent; font-size: 9px; font-weight: 800; cursor: pointer; }

.view-root { min-height: calc(100vh - 68px); }
.page { max-width: 1450px; margin: 0 auto; padding: 31px 32px 45px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.page-heading.compact { align-items: flex-start; }
.eyebrow { margin: 0 0 6px; color: var(--green); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.1px; }
.page-heading h1 { margin: 0; font-size: clamp(27px, 3vw, 34px); line-height: 1.1; }
.page-heading > div > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.surface { border: 1px solid var(--line); border-radius: 7px; background: white; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 63px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-size: 13px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 8px; }

.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 15px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.metric-strip article { min-height: 91px; padding: 17px 20px; border-right: 1px solid var(--line); }
.metric-strip article:last-child { border-right: 0; }
.metric-strip article > span { color: var(--muted); font-size: 9px; }
.metric-strip article > div { display: flex; align-items: baseline; gap: 9px; margin-top: 9px; }
.metric-strip strong { font-size: 25px; line-height: 1; }
.metric-strip small { color: #88928d; font-size: 8px; }
.metric-strip .metric-risk strong { color: var(--red); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(310px, .72fr); gap: 15px; }
.deal-list-head, .deal-row { display: grid; grid-template-columns: minmax(285px, 1fr) 118px 120px 95px 18px; align-items: center; gap: 13px; padding: 0 18px; }
.deal-list-head { min-height: 37px; color: #8e9892; background: #fafbfa; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .55px; }
.deal-row { width: 100%; min-height: 77px; border: 0; border-top: 1px solid #edf0ee; background: white; text-align: left; cursor: pointer; transition: .16s ease; }
.deal-row:hover { background: #f8faf9; }
.deal-row.is-critical { box-shadow: inset 3px 0 var(--red); }
.deal-object { display: flex; align-items: center; min-width: 0; gap: 10px; }
.deal-object img, .object-monogram { width: 50px; height: 41px; flex: 0 0 auto; border-radius: 4px; object-fit: cover; }
.object-monogram { display: grid; place-items: center; color: white; background: #4c7790; font-size: 9px; font-weight: 800; }
.object-monogram.coral { background: #b3735d; }
.object-monogram.violet { background: #74688f; }
.deal-object > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.deal-object strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.deal-object small { margin-top: 5px; color: var(--muted); font-size: 8px; }
.phase-badge { display: inline-flex; justify-self: start; padding: 5px 7px; border-radius: 3px; font-size: 8px; font-weight: 750; }
.phase-badge.finance { color: var(--red); background: var(--red-soft); }
.phase-badge.notary { color: var(--green); background: var(--green-soft); }
.phase-badge.docs { color: var(--amber); background: var(--amber-soft); }
.phase-badge.reserved { color: var(--blue); background: var(--blue-soft); }
.readiness { display: grid; grid-template-columns: 1fr 30px; align-items: center; gap: 7px; }
.readiness > span { height: 5px; border-radius: 4px; background: #e9eeeb; overflow: hidden; }
.readiness i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.deal-row.is-critical .readiness i { background: var(--red); }
.readiness b { font-size: 9px; }
.notary-date { display: flex; flex-direction: column; }
.notary-date strong { font-size: 9px; }
.notary-date small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.task-count { display: grid; place-items: center; min-width: 22px; height: 22px; border-radius: 11px; color: var(--red); background: var(--red-soft); font-size: 9px; font-weight: 800; }
.task-list { padding: 2px 17px 8px; }
.task { display: grid; grid-template-columns: 30px 1fr 31px; align-items: center; gap: 10px; min-height: 76px; border-bottom: 1px solid #edf0ee; }
.task:last-child { border-bottom: 0; }
.task-state { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--muted); background: #f0f3f1; }
.task-state .icon { width: 14px; height: 14px; }
.task.critical .task-state { color: var(--red); background: var(--red-soft); }
.task.warning .task-state { color: var(--amber); background: var(--amber-soft); }
.task > div { display: flex; min-width: 0; flex-direction: column; }
.task strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.task p { overflow: hidden; margin: 4px 0; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.task small { color: #a0a8a4; font-size: 7px; }
.critical-deal-band { display: grid; grid-template-columns: minmax(330px, 1.3fr) minmax(190px, .6fr) auto; align-items: center; gap: 28px; margin-top: 15px; padding: 17px 20px; border: 1px solid #d9cbc9; border-radius: 7px; background: #fff9f8; }
.band-property { display: flex; align-items: center; min-width: 0; gap: 14px; }
.band-property img { width: 82px; height: 61px; border-radius: 5px; object-fit: cover; }
.band-property h2 { overflow: hidden; margin: 4px 0; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.band-property p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.risk-label { display: inline-flex; align-items: center; gap: 5px; color: var(--red); font-size: 7px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.risk-label i { width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.band-progress > span { display: flex; align-items: baseline; justify-content: space-between; }
.band-progress small { color: var(--muted); font-size: 8px; }
.band-progress strong { font-size: 13px; }
.band-progress > div { height: 6px; margin: 8px 0 6px; border-radius: 5px; background: #eadfdd; overflow: hidden; }
.band-progress i { display: block; height: 100%; border-radius: inherit; background: var(--red); }
.band-progress p { margin: 0; color: #98726e; font-size: 7px; }

.intake-stepper { display: flex; align-items: center; max-width: 590px; margin: 26px auto 35px; }
.intake-stepper > div { display: flex; align-items: center; gap: 8px; color: #97a09b; }
.intake-stepper > div > span { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #ccd4cf; border-radius: 50%; background: white; font-size: 9px; font-weight: 800; }
.intake-stepper strong { font-size: 9px; white-space: nowrap; }
.intake-stepper > i { height: 1px; flex: 1; margin: 0 13px; background: #d5dcd8; }
.intake-stepper .is-active { color: var(--green); }
.intake-stepper .is-active > span { color: white; border-color: var(--green); background: var(--green); }
.intake-layout { display: grid; grid-template-columns: minmax(440px, 1.35fr) minmax(320px, .65fr); max-width: 1040px; margin: 0 auto; gap: 15px; }
.upload-panel { min-height: 470px; padding: 22px; }
.deal-basics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 14px; }
.deal-basics label { display: grid; gap: 5px; text-align: left; }
.deal-basics label > span { color: var(--muted); font-size: 8px; font-weight: 750; }
.deal-basics input { width: 100%; min-height: 34px; box-sizing: border-box; padding: 0 9px; border: 1px solid #d5ddd8; border-radius: 5px; color: var(--ink); background: white; font: inherit; font-size: 9px; outline: none; }
.deal-basics input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(27, 111, 78, .1); }
.drop-zone { display: flex; align-items: center; justify-content: center; min-height: 425px; flex-direction: column; padding: 38px; border: 1.5px dashed #bcc7c1; border-radius: 6px; background: #fbfcfb; text-align: center; cursor: pointer; transition: .18s ease; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--green); background: #f3f9f6; }
.drop-zone h2 { margin: 19px 0 6px; font-size: 18px; }
.drop-zone > p { margin: 0 0 20px; color: var(--muted); font-size: 9px; }
.upload-symbol { position: relative; display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; color: var(--green); background: var(--green-soft); }
.upload-symbol > .icon { width: 29px; height: 29px; }
.upload-symbol i { position: absolute; right: -1px; bottom: 3px; display: grid; place-items: center; width: 26px; height: 26px; border: 3px solid white; border-radius: 50%; color: white; background: var(--green); }
.upload-symbol i .icon { width: 13px; height: 13px; }
.divider { display: flex; align-items: center; width: min(260px, 100%); gap: 10px; margin: 22px 0 13px; }
.divider i { height: 1px; flex: 1; background: var(--line); }
.divider small { color: #9da5a1; font-size: 8px; }
.demo-button { display: inline-flex; align-items: center; gap: 7px; padding: 8px; border: 0; color: var(--green); background: transparent; font-size: 9px; font-weight: 800; cursor: pointer; }
.demo-button:hover { text-decoration: underline; }
.selected-files { display: grid; width: min(390px, 100%); gap: 6px; margin-top: 15px; text-align: left; }
.selected-file { display: grid; grid-template-columns: 24px 1fr 16px 28px; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #dfe7e2; border-radius: 5px; background: white; }
.file-type-mini { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; color: var(--green); background: var(--green-soft); font-size: 7px; font-weight: 850; text-transform: uppercase; }
.selected-file strong { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.selected-file small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.selected-file > .icon { width: 16px; height: 16px; color: var(--green); }
.selected-file .remove-file { width: 28px; height: 28px; }
.start-analysis { margin-top: 11px; }
.check-scope { overflow: hidden; }
.secure-badge { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 10px; color: var(--green); background: var(--green-soft); font-size: 7px; font-weight: 800; }
.secure-badge .icon { width: 10px; height: 10px; }
.check-scope ul { display: grid; gap: 22px; margin: 0; padding: 27px 24px 23px; list-style: none; }
.check-scope li { display: grid; grid-template-columns: 35px 1fr; align-items: center; gap: 11px; }
.scope-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; }
.scope-icon .icon { width: 16px; height: 16px; }
.scope-icon.buyer { color: var(--blue); background: var(--blue-soft); }
.scope-icon.property { color: var(--green); background: var(--green-soft); }
.scope-icon.notary { color: var(--amber); background: var(--amber-soft); }
.scope-icon.backup { color: var(--violet); background: #f0edf8; }
.check-scope li strong { font-size: 9px; }
.check-scope li p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.privacy-note { display: grid; grid-template-columns: 18px 1fr; gap: 9px; margin: 0 24px 24px; padding: 12px; border-radius: 5px; color: #4b6558; background: #f1f6f3; }
.privacy-note .icon { width: 16px; height: 16px; }
.privacy-note p { margin: 0; font-size: 8px; line-height: 1.45; }

.processing-page { display: grid; place-items: center; min-height: calc(100vh - 68px); padding: 28px; }
.processing-shell { display: grid; grid-template-columns: .85fr 1fr; width: min(870px, 100%); min-height: 500px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: var(--shadow); overflow: hidden; }
.document-stack { position: relative; display: grid; place-items: center; background: #eaf1ed; overflow: hidden; }
.document { position: absolute; display: block; width: 210px; height: 285px; border-radius: 3px; background: white; box-shadow: 0 18px 38px rgba(30,54,42,.13); }
.document.back { transform: rotate(-8deg) translate(-15px, 5px); opacity: .65; }
.document.middle { transform: rotate(5deg) translate(12px, 0); opacity: .8; }
.document.front { z-index: 2; padding: 26px 22px; }
.doc-head { display: block; width: 75px; height: 10px; margin-bottom: 23px; border-radius: 2px; background: #2b5d47; }
.document.front b { display: block; height: 5px; margin-top: 12px; background: #e2e8e4; }
.document.front b:nth-of-type(2) { width: 79%; }
.doc-seal { position: absolute; right: 24px; bottom: 28px; display: grid; place-items: center; width: 52px; height: 52px; border: 2px solid #acd0bd; border-radius: 50%; color: var(--green); }
.doc-seal .icon { width: 24px; height: 24px; }
.scan-beam { position: absolute; z-index: 4; left: 14%; right: 14%; top: 22%; height: 2px; background: #45b281; box-shadow: 0 0 18px 5px rgba(69,178,129,.33); animation: scan 2.4s ease-in-out infinite; }
@keyframes scan { 0%,100% { transform: translateY(0); } 50% { transform: translateY(285px); } }
.processing-content { padding: 55px 50px; }
.processing-content h1 { margin: 4px 0 7px; font-size: 25px; }
.processing-content > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 9px; }
.progress-track { height: 7px; margin: 29px 0 8px; border-radius: 6px; background: #e8eeea; overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .25s ease; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 8px; }
.progress-meta strong { color: var(--green); }
.process-list { display: grid; margin: 27px 0 0; padding: 0; list-style: none; }
.process-list li { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 10px; min-height: 55px; border-bottom: 1px solid #edf0ee; color: #929b96; }
.process-list li > span { display: block; width: 14px; height: 14px; border: 1px solid #cdd5d1; border-radius: 50%; }
.process-list li > div { display: flex; flex-direction: column; }
.process-list li strong { font-size: 9px; }
.process-list li small { margin-top: 3px; font-size: 7px; }
.process-list li > b { font-size: 7px; font-weight: 600; }
.process-list li.is-active { color: var(--ink); }
.process-list li.is-active > span { border: 3px solid #b9ddcc; border-top-color: var(--green); animation: spin .8s linear infinite; }
.process-list li.is-active > b, .process-list li.is-done > b { color: var(--green); }
.process-list li.is-done { color: var(--ink); }
.process-list li.is-done > span { position: relative; border-color: var(--green); background: var(--green); }
.process-list li.is-done > span::after { content: ""; position: absolute; left: 3px; top: 2px; width: 5px; height: 3px; border-left: 1.5px solid white; border-bottom: 1.5px solid white; transform: rotate(-45deg); }
@keyframes spin { to { transform: rotate(360deg); } }

.deal-page { min-height: 100vh; background: #eef1ef; }
.deal-toolbar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 10px 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(13px); }
.deal-toolbar-title { display: flex; align-items: center; min-width: 0; gap: 10px; }
.deal-toolbar-title img { width: 45px; height: 39px; border-radius: 4px; object-fit: cover; }
.deal-toolbar-title > div { min-width: 0; }
.deal-toolbar-title p { margin: 0 0 2px; color: var(--muted); font-size: 7px; text-transform: uppercase; letter-spacing: .5px; }
.deal-toolbar-title h1 { overflow: hidden; margin: 0; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.deal-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.save-state { display: inline-flex; align-items: center; gap: 5px; margin-right: 5px; color: var(--muted); font-size: 8px; }
.save-state i { width: 6px; height: 6px; border-radius: 50%; background: #49a277; }
.deal-body { max-width: 1450px; margin: 0 auto; padding: 18px 22px 35px; }
.deal-overview { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); min-height: 126px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.score-block { display: flex; align-items: center; gap: 15px; padding: 18px 22px; border-right: 1px solid var(--line); }
.score-ring { --score: 68; position: relative; display: grid; place-items: center; width: 76px; height: 76px; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(var(--red) calc(var(--score) * 1%), #ecefed 0); }
.score-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: white; }
.score-ring > span { position: relative; z-index: 1; display: flex; align-items: baseline; }
.score-ring strong { font-size: 22px; }
.score-ring small { color: var(--muted); font-size: 8px; }
.score-block > div:last-child { display: flex; flex-direction: column; }
.score-block > div:last-child > span { color: var(--muted); font-size: 8px; }
.score-block > div:last-child > strong { margin-top: 4px; color: var(--red); font-size: 16px; }
.score-block p { max-width: 190px; margin: 5px 0 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.overview-stat { display: flex; justify-content: center; flex-direction: column; padding: 20px 22px; border-right: 1px solid var(--line); }
.overview-stat:last-child { border-right: 0; }
.overview-stat span { color: var(--muted); font-size: 8px; }
.overview-stat strong { margin-top: 8px; font-size: 13px; }
.overview-stat small { margin-top: 5px; color: #87918c; font-size: 8px; }
.closing-path { display: flex; align-items: center; min-height: 82px; margin: 13px 0; padding: 13px 24px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.path-step { display: flex; align-items: center; gap: 8px; color: #8f9993; }
.path-step > span { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid #cfd7d2; border-radius: 50%; background: white; font-size: 8px; font-weight: 800; }
.path-step > span .icon { width: 13px; height: 13px; }
.path-step > div { display: flex; flex-direction: column; white-space: nowrap; }
.path-step strong { font-size: 9px; }
.path-step small { margin-top: 3px; font-size: 7px; }
.path-step.is-done { color: var(--green); }
.path-step.is-done > span { color: white; border-color: var(--green); background: var(--green); }
.path-step.is-warning { color: var(--red); }
.path-step.is-warning > span { color: white; border-color: var(--red); background: var(--red); }
.path-step.is-current { color: var(--ink); }
.path-step.is-current > span { color: var(--green); border-color: var(--green); }
.closing-path > i { height: 1px; flex: 1; margin: 0 16px; background: #dbe1dd; }
.deal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 13px; }
.deal-main { min-width: 0; overflow: hidden; }
.deal-tabs { display: flex; gap: 26px; height: 52px; padding: 0 21px; border-bottom: 1px solid var(--line); }
.deal-tabs button { position: relative; display: flex; align-items: center; gap: 6px; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 9px; font-weight: 750; cursor: pointer; }
.deal-tabs button::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: transparent; }
.deal-tabs button.is-active { color: var(--green); }
.deal-tabs button.is-active::after { background: var(--green); }
.deal-tabs button span { display: grid; place-items: center; min-width: 18px; height: 18px; border-radius: 9px; color: #707b75; background: #edf0ee; font-size: 7px; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 19px 21px 17px; }
.empty-state { display: grid; justify-items: center; max-width: 430px; margin: 20px auto 28px; padding: 34px 24px; border: 1px dashed #cbd7d0; border-radius: 6px; background: #fbfcfb; text-align: center; }
.empty-state-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 13px; border-radius: 50%; color: var(--green); background: var(--green-soft); }
.empty-state-icon .icon { width: 19px; height: 19px; }
.empty-state h3 { margin: 0; font-size: 13px; }
.empty-state p { max-width: 310px; margin: 8px 0 17px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.panel-heading h2 { margin: 0; font-size: 13px; }
.panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 8px; }
.risk-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 21px 19px; }
.risk-summary { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 5px; }
.risk-summary > .icon { display: grid; place-items: center; width: 29px; height: 29px; padding: 6px; border-radius: 50%; }
.risk-summary.danger > .icon { color: var(--red); background: var(--red-soft); }
.risk-summary.warning > .icon { color: var(--amber); background: var(--amber-soft); }
.risk-summary:not(.danger):not(.warning) > .icon { color: var(--green); background: var(--green-soft); }
.risk-summary div { display: flex; min-width: 0; flex-direction: column; }
.risk-summary small { color: var(--muted); font-size: 7px; }
.analysis-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 21px 17px; padding: 10px 12px; border-left: 3px solid var(--amber); background: var(--amber-soft); color: var(--text); font-size: 9px; line-height: 1.5; }
.analysis-note .icon { flex: 0 0 15px; color: var(--amber); }
.risk-summary strong { margin-top: 3px; font-size: 9px; }
.risk-summary p { margin: 4px 0 0; color: #7e8983; font-size: 7px; line-height: 1.4; }
.blocker-list { border-top: 1px solid var(--line); }
.blocker { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding: 18px 21px; border-bottom: 1px solid var(--line); }
.blocker:last-child { border-bottom: 0; }
.blocker.is-running { background: #f6faf8; }
.blocker.is-resolved { background: #f8faf9; opacity: .72; }
.blocker.is-resolved .severity { color: var(--green); background: var(--green-soft); }
.severity { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; }
.blocker.critical .severity { color: var(--red); background: var(--red-soft); }
.blocker.warning .severity { color: var(--amber); background: var(--amber-soft); }
.severity .icon { width: 15px; height: 15px; }
.blocker-copy { min-width: 0; }
.severity-label { color: var(--red); font-size: 7px; font-weight: 800; text-transform: uppercase; letter-spacing: .45px; }
.blocker.warning .severity-label { color: var(--amber); }
.blocker-copy h3 { margin: 5px 0; font-size: 11px; }
.blocker-copy p { max-width: 660px; margin: 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.blocker-meta { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 10px; color: #7f8a84; font-size: 7px; }
.blocker-meta span { display: inline-flex; align-items: center; gap: 4px; }
.blocker-meta .icon { width: 11px; height: 11px; }
.blocker-actions { display: flex; align-items: flex-start; gap: 5px; }
.document-groups { border-top: 1px solid var(--line); }
.document-groups section { padding: 18px 21px; border-bottom: 1px solid var(--line); }
.document-groups section:last-child { border-bottom: 0; }
.document-groups h3 { margin: 0 0 12px; font-size: 10px; }
.document-groups h3 span { margin-left: 5px; color: var(--muted); font-size: 8px; font-weight: 600; }
.document-row { display: grid; grid-template-columns: 34px 1fr auto 31px; align-items: center; gap: 10px; min-height: 57px; padding: 5px 8px; border-top: 1px solid #edf0ee; }
.file-type { display: grid; place-items: center; width: 30px; height: 34px; border-radius: 3px; color: white; background: #c75248; font-size: 7px; font-weight: 800; }
.file-type.empty { color: var(--muted); background: #eef1ef; }
.file-type.empty .icon { width: 13px; height: 13px; }
.document-row > div { display: flex; min-width: 0; flex-direction: column; }
.document-row strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.document-row small { margin-top: 4px; color: var(--muted); font-size: 7px; }
.doc-status { padding: 5px 7px; border-radius: 10px; font-size: 7px; font-weight: 800; }
.doc-status.good { color: var(--green); background: var(--green-soft); }
.doc-status.warning { color: var(--amber); background: var(--amber-soft); }
.doc-status.danger { color: var(--red); background: var(--red-soft); }
.people-list { border-top: 1px solid var(--line); }
.person { display: grid; grid-template-columns: 46px 1fr auto; gap: 13px; padding: 18px 21px; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person.primary { background: #fbfcfb; }
.person-role { color: var(--muted); font-size: 7px; font-weight: 750; text-transform: uppercase; letter-spacing: .45px; }
.person h3 { margin: 4px 0; font-size: 11px; }
.person p { margin: 0; color: var(--muted); font-size: 8px; }
.person-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.person-tags span { padding: 4px 6px; border-radius: 3px; color: #66736c; background: #eef1ef; font-size: 7px; }
.person-side { display: flex; align-items: flex-end; flex-direction: column; gap: 11px; }
.contact-state { display: inline-flex; align-items: center; gap: 5px; font-size: 7px; font-weight: 750; }
.contact-state i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.contact-state.good { color: var(--green); }
.contact-state.warning { color: var(--amber); }
.contact-state.neutral { color: var(--muted); }
.timeline-list { padding: 0 21px 22px; border-top: 1px solid var(--line); }
.timeline-list article { display: grid; grid-template-columns: 32px 1fr; gap: 11px; padding: 16px 0; border-bottom: 1px solid #edf0ee; }
.timeline-list article:last-child { border-bottom: 0; }
.timeline-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; }
.timeline-icon .icon { width: 14px; height: 14px; }
.timeline-icon.system { color: var(--green); background: var(--green-soft); }
.timeline-icon.mail { color: var(--blue); background: var(--blue-soft); }
.timeline-icon.success { color: var(--green); background: #edf7f2; }
.timeline-list strong { font-size: 9px; }
.timeline-list p { margin: 4px 0; color: var(--muted); font-size: 8px; }
.timeline-list small { color: #9ba39f; font-size: 7px; }
.deal-side { display: grid; align-content: start; gap: 13px; }
.next-actions .section-heading > span { color: var(--red); font-size: 8px; font-weight: 800; }
.mini-action-list { padding: 5px 16px 10px; }
.mini-action-list article { display: grid; grid-template-columns: 25px 1fr 14px; align-items: center; gap: 9px; min-height: 58px; border-bottom: 1px solid #edf0ee; }
.mini-action-list article:last-child { border-bottom: 0; }
.priority { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; color: var(--muted); background: #eef1ef; font-size: 8px; font-weight: 800; }
.priority.high { color: var(--red); background: var(--red-soft); }
.mini-action-list div { display: flex; min-width: 0; flex-direction: column; }
.mini-action-list strong { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.mini-action-list p { margin: 3px 0 0; color: var(--muted); font-size: 7px; }
.mini-action-list > article > .icon { width: 12px; height: 12px; color: #929b96; }
.empty-side-state { padding: 19px 7px; color: var(--muted); font-size: 8px; text-align: center; }
.coordinator-card { padding: 17px; }
.coordinator-head { display: grid; grid-template-columns: 35px 1fr 7px; align-items: center; gap: 10px; }
.assistant-mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 7px; color: white; background: var(--green-dark); }
.assistant-mark .icon { width: 18px; height: 18px; }
.coordinator-head > div { display: flex; flex-direction: column; }
.coordinator-head span { color: var(--muted); font-size: 7px; }
.coordinator-head strong { margin-top: 3px; font-size: 10px; }
.coordinator-dot { width: 7px; height: 7px; border-radius: 50%; background: #5bb187; box-shadow: 0 0 0 3px #e5f2eb; }
.coordinator-card > p { margin: 16px 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.coordinator-card ul { display: grid; gap: 8px; margin: 0 0 17px; padding: 0; list-style: none; }
.coordinator-card li { display: flex; align-items: center; gap: 6px; color: #57655e; font-size: 8px; }
.coordinator-card li .icon { width: 12px; height: 12px; color: var(--green); }
.deal-contact { overflow: hidden; }
.contact-row { display: grid; grid-template-columns: 35px 1fr 31px; align-items: center; gap: 9px; padding: 14px 16px; }
.contact-row > div { display: flex; min-width: 0; flex-direction: column; }
.contact-row strong { font-size: 9px; }
.contact-row small { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }

.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 9px; min-width: 260px; max-width: 360px; padding: 12px 14px; border: 1px solid #d6e2dc; border-radius: 6px; color: #294d3d; background: white; box-shadow: var(--shadow); font-size: 9px; font-weight: 750; animation: toast-in .22s ease; }
.toast .icon { width: 15px; height: 15px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.notification-panel { position: fixed; z-index: 80; top: 57px; right: 20px; width: 310px; border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: 0 16px 40px rgba(22,34,29,.14); overflow: hidden; }
.notification-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 15px 16px 12px; border-bottom: 1px solid var(--line); }
.notification-panel > header > div { display: flex; flex-direction: column; }
.notification-panel > header strong { font-size: 10px; }
.notification-panel > header small { margin-top: 4px; color: var(--muted); font-size: 7px; }
.notification-item { display: grid; grid-template-columns: 29px 1fr; align-items: center; gap: 9px; width: 100%; min-height: 62px; padding: 10px 15px; border: 0; border-bottom: 1px solid #edf0ee; background: white; text-align: left; cursor: pointer; }
.notification-item:last-child { border-bottom: 0; }
.notification-item:hover { background: #f8faf9; }
.notification-item > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.notification-item strong { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.notification-item small { margin-top: 4px; color: var(--muted); font-size: 7px; }
.notification-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; }
.notification-icon .icon { width: 14px; height: 14px; }
.notification-icon.danger { color: var(--red); background: var(--red-soft); }
.notification-icon.warning { color: var(--amber); background: var(--amber-soft); }
.notification-icon.neutral { color: var(--blue); background: var(--blue-soft); }

#modalRoot:empty { display: none; }
.modal-overlay { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(19, 32, 26, .42); }
.modal { width: min(520px, 100%); border: 1px solid #d8e1db; border-radius: 8px; background: white; box-shadow: 0 24px 70px rgba(17, 35, 26, .24); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 19px; border-bottom: 1px solid var(--line); }
.modal-header > div { min-width: 0; }
.modal-header h2 { overflow: hidden; margin: 0; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.modal-header p { margin: 5px 0 0; color: var(--muted); font-size: 8px; }
.modal-body { display: grid; gap: 12px; padding: 19px; }
.modal-form { display: grid; gap: 11px; padding: 19px; }
.modal-form label { display: grid; gap: 5px; }
.modal-form label > span { color: var(--muted); font-size: 8px; font-weight: 750; }
.modal-form input { min-height: 36px; padding: 0 10px; border: 1px solid #d5ddd8; border-radius: 5px; color: var(--ink); background: white; font: inherit; font-size: 9px; outline: none; }
.modal-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(27, 111, 78, .1); }
.modal-form textarea { width: 100%; padding: 9px 10px; resize: vertical; border: 1px solid #d5ddd8; border-radius: 5px; color: var(--ink); background: white; font: inherit; font-size: 9px; line-height: 1.5; outline: none; }
.modal-form textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(27, 111, 78, .1); }
.modal-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 7px; padding-top: 13px; border-top: 1px solid var(--line); }
.modal-status { display: flex; align-items: center; gap: 7px; padding: 10px 11px; border-radius: 5px; color: #2c6b4e; background: var(--green-soft); font-size: 9px; font-weight: 750; }
.modal-status .icon { width: 14px; height: 14px; }
.modal-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.modal-fields div { padding: 10px; border: 1px solid #e6ece8; border-radius: 5px; background: #fbfcfb; }
.modal-fields dt { color: var(--muted); font-size: 7px; }
.modal-fields dd { margin: 4px 0 0; font-size: 9px; font-weight: 750; }
.modal-note { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.workspace-modal { width: min(760px, 100%); max-height: min(840px, calc(100vh - 40px)); overflow: auto; }
.workspace-body { gap: 20px; }
.workspace-section { display: grid; gap: 11px; }
.workspace-section + .workspace-section { padding-top: 18px; border-top: 1px solid var(--line); }
.workspace-section h3 { margin: 0; font-size: 11px; }
.billing-section { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); background: #fbfcfb; }
.billing-section p { margin: 4px 0 0; color: var(--muted); font-size: 8px; }
.billing-controls { display: flex; align-items: end; gap: 8px; }
.billing-controls label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; font-weight: 750; }
.billing-controls input { width: 58px; min-height: 33px; padding: 0 7px; border: 1px solid #d5ddd8; border-radius: 5px; color: var(--ink); background: white; font: inherit; font-size: 9px; }
.workspace-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.workspace-section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }
.workspace-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 9px; align-items: end; }
.workspace-form.compact { grid-template-columns: 1fr 1fr auto; }
.workspace-form label { display: grid; gap: 5px; color: var(--muted); font-size: 8px; font-weight: 750; }
.workspace-form input, .workspace-form select { width: 100%; min-height: 35px; padding: 0 9px; border: 1px solid #d5ddd8; border-radius: 5px; color: var(--ink); background: white; font: inherit; font-size: 9px; outline: none; }
.workspace-form input:focus, .workspace-form select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(27, 111, 78, .1); }
.team-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 5px; }
.team-table { width: 100%; border-collapse: collapse; font-size: 9px; }
.team-table th { padding: 9px 10px; color: var(--muted); background: #f8faf8; font-size: 7px; text-align: left; }
.team-table td { padding: 9px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.team-table td:first-child { display: grid; gap: 2px; }
.team-table small { color: var(--muted); font-size: 8px; }
.member-state { color: var(--muted); font-size: 8px; }
.member-state.active { color: var(--green); font-weight: 750; }
.audit-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.audit-list li { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 8px; }
.audit-list li:last-child { border-bottom: 0; }
.audit-list span, .audit-list small { color: var(--muted); }
.workspace-footer { display: flex; justify-content: flex-end; padding-top: 4px; }
.danger-button { color: var(--red) !important; }
.outbox-page { display: grid; gap: 20px; }
.delivery-state { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); color: var(--muted); background: white; font-size: 8px; font-weight: 750; }
.delivery-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.delivery-state.ready { color: var(--green); }
.delivery-state.ready i { background: var(--green); }
.outbox-list { overflow: hidden; }
.outbox-row { width: 100%; display: grid; grid-template-columns: 32px minmax(0, 1fr) 110px 16px; gap: 12px; align-items: center; padding: 14px 18px; border: 0; border-bottom: 1px solid var(--line); background: white; color: inherit; text-align: left; cursor: pointer; }
.outbox-row:hover { background: #fbfcfb; }
.outbox-row:last-child { border-bottom: 0; }
.outbox-state { display: grid; place-items: center; width: 30px; height: 30px; color: var(--blue); background: var(--blue-soft); border-radius: 50%; }
.outbox-state.sent { color: var(--green); background: var(--green-soft); }
.outbox-state.failed { color: var(--red); background: var(--red-soft); }
.outbox-copy { display: grid; gap: 4px; min-width: 0; }
.outbox-copy strong, .outbox-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outbox-copy strong { font-size: 10px; }
.outbox-copy small, .outbox-meta small { color: var(--muted); font-size: 8px; }
.outbox-meta { display: grid; gap: 3px; justify-items: end; }
.outbox-meta b { font-size: 8px; }
.delivery-hint { align-self: center; color: var(--muted); font-size: 8px; }
.ocr-list { overflow: hidden; }
.ocr-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ocr-row:last-child { border-bottom: 0; }
.ocr-row > div { display: grid; gap: 4px; min-width: 0; }
.ocr-row strong, .ocr-row p, .ocr-row small { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.ocr-row strong { font-size: 10px; }
.ocr-row p, .ocr-row small { color: var(--muted); font-size: 8px; }
.ocr-row small { color: var(--red); }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 205px minmax(0, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .critical-deal-band { grid-template-columns: 1fr auto; }
  .band-progress { display: none; }
  .deal-overview { grid-template-columns: 1.3fr repeat(3, 1fr); }
  .deal-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .risk-summary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; width: 232px; transform: translateX(-103%); box-shadow: 12px 0 30px rgba(22,34,29,.14); transition: transform .2s ease; }
  .app-shell.menu-open .sidebar { transform: translateX(0); }
  .mobile-menu { display: inline-grid !important; }
  .breadcrumbs { display: none; }
  .topbar { padding: 0 18px; }
  .page { padding: 25px 18px 38px; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .metric-strip article:nth-child(2) { border-right: 0; }
  .metric-strip article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .deal-list-head { display: none; }
  .deal-row { grid-template-columns: minmax(0, 1fr) 95px 18px; padding: 10px 14px; }
  .deal-row > .phase-badge, .deal-row > .readiness { display: none; }
  .intake-layout { grid-template-columns: 1fr; }
  .upload-panel { min-height: 420px; }
  .drop-zone { min-height: 375px; }
  .processing-shell { grid-template-columns: 1fr; }
  .document-stack { min-height: 250px; }
  .document { width: 145px; height: 195px; }
  .scan-beam { left: 29%; right: 29%; }
  @keyframes scan { 0%,100% { transform: translateY(0); } 50% { transform: translateY(190px); } }
  .processing-content { padding: 36px 30px; }
  .deal-toolbar { align-items: flex-start; flex-direction: column; gap: 11px; }
  .deal-toolbar-title { width: 100%; }
  .deal-toolbar-actions { width: 100%; }
  .save-state { display: none; }
  .deal-toolbar-actions .button { flex: 1; }
  .deal-overview { grid-template-columns: 1fr 1fr; }
  .score-block { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--line); }
  .overview-stat { border-top: 1px solid var(--line); }
  .overview-stat:nth-child(2) { border-top: 0; }
  .overview-stat:nth-child(3) { border-top: 0; border-right: 0; }
  .deal-layout { grid-template-columns: 1fr; }
  .deal-side { grid-template-columns: 1fr 1fr; }
  .deal-contact { display: none; }
}

@media (max-width: 600px) {
  .top-actions > .icon-button { display: none; }
  .top-actions .button { padding: 0 11px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .metric-strip article { min-height: 85px; padding: 15px; }
  .metric-strip article > div { flex-direction: column; gap: 4px; }
  .deal-row { grid-template-columns: minmax(0, 1fr) 18px; }
  .deal-row > .notary-date { display: none; }
  .deal-object img, .object-monogram { width: 45px; }
  .critical-deal-band { grid-template-columns: 1fr; gap: 15px; }
  .critical-deal-band .button { width: 100%; }
  .band-property img { width: 68px; }
  .intake-stepper strong { display: none; }
  .upload-panel { min-height: 0; padding: 12px; }
  .deal-basics { grid-template-columns: 1fr; }
  .drop-zone { min-height: 390px; padding: 30px 15px; }
  .document-stack { display: none; }
  .processing-page { padding: 14px; }
  .processing-content { padding: 30px 22px; }
  .deal-toolbar { padding: 9px 11px; }
  .deal-toolbar-title img { display: none; }
  .deal-toolbar-title h1 { max-width: 240px; }
  .deal-toolbar-actions .button-secondary { max-width: 52px; padding: 0; }
  .deal-toolbar-actions .button-secondary span:last-child { display: none; }
  .deal-body { padding: 12px 10px 24px; }
  .deal-overview { grid-template-columns: 1fr; }
  .score-block { grid-column: auto; }
  .overview-stat { min-height: 82px; border-top: 1px solid var(--line) !important; border-right: 0; }
  .closing-path { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 16px; }
  .closing-path > i { display: none; }
  .deal-tabs { gap: 18px; padding: 0 14px; overflow-x: auto; }
  .deal-tabs button { white-space: nowrap; }
  .panel-heading { padding: 17px 15px; }
  .risk-summary-grid { padding: 0 15px 16px; }
  .blocker { grid-template-columns: 30px 1fr; padding: 16px 15px; }
  .blocker-actions { grid-column: 1 / -1; padding-left: 42px; }
  .blocker-actions .button { flex: 1; }
  .document-groups section { padding: 16px 14px; }
  .document-row { grid-template-columns: 32px 1fr auto; }
  .document-row > .icon-button { display: none; }
  .person { grid-template-columns: 42px 1fr; padding: 16px 14px; }
  .person-side { grid-column: 1 / -1; align-items: center; justify-content: space-between; flex-direction: row; padding-left: 55px; }
  .deal-side { grid-template-columns: 1fr; }
  .toast-region { right: 10px; bottom: 10px; left: 10px; }
  .toast { min-width: 0; }
  .notification-panel { top: 61px; right: 10px; left: 10px; width: auto; }
  .modal-fields { grid-template-columns: 1fr; }
  .workspace-form, .workspace-form.compact { grid-template-columns: 1fr; }
  .workspace-form .button { width: 100%; }
  .billing-section { align-items: flex-start; flex-direction: column; }
  .billing-controls { width: 100%; }
  .billing-controls .button { flex: 1; }
  .audit-list li { grid-template-columns: 1fr; gap: 3px; }
  .outbox-row { grid-template-columns: 30px minmax(0, 1fr) 16px; padding: 13px; }
  .outbox-meta { display: none; }
  .ocr-row { grid-template-columns: 30px minmax(0, 1fr); padding: 13px; }
  .ocr-row .button, .ocr-row > .member-state { grid-column: 2; justify-self: start; }
}
