:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f7f9fd;
  --ink: #253244;
  --muted: #7d899b;
  --line: #dde5f0;
  --blue: #2f6df6;
  --blue-dark: #2157d6;
  --green: #22a06b;
  --amber: #b7791f;
  --red: #d14343;
  --teal: #13a6a3;
  --cyan: #42b7ff;
  --sidebar-bg: #0d3857;
  --sidebar-bg-strong: #0a2b42;
  --sidebar-muted: #b8c8d6;
  --shadow: 0 10px 30px rgba(34, 54, 84, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 400;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.18s ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background:
    radial-gradient(circle at 10% 0%, rgba(82, 190, 255, 0.32), transparent 26%),
    linear-gradient(158deg, #0d2f4c 0%, #0f5676 48%, #0e7b88 100%);
  color: #f8fafc;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 0 6px;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 7px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(218, 244, 255, 0.84));
  color: transparent;
  font-size: 13px;
  font-weight: 700;
}

.brand strong,
.brand-text span {
  display: block;
}

.brand strong {
  white-space: nowrap;
}

.brand-mark::before {
  content: "NEOS";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  color: #4f6d83;
  font-size: 11px;
}

.brand-text span {
  margin-top: 2px;
  color: var(--sidebar-muted);
  font-size: 12px;
}

.sidebar-toggle {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.13);
  color: #edf8ff;
  font-size: 16px;
  line-height: 1;
}

.nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  display: grid;
  gap: 3px;
  align-content: start;
}

.nav::-webkit-scrollbar {
  width: 6px;
}

.nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(219, 230, 239, 0.28);
}

.nav-item {
  width: 100%;
  border: 0;
  border-radius: 6px;
  min-height: 38px;
  padding: 9px 12px;
  background: transparent;
  color: #d5e1e9;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: linear-gradient(90deg, rgba(70, 166, 255, 0.36), rgba(19, 166, 163, 0.22));
  color: #ffffff;
}

.nav-item.active {
  box-shadow: inset 3px 0 0 #7ee7ff;
}

.nav-group {
  margin: 12px 10px 4px;
  color: rgba(213, 225, 233, 0.58);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar-footer {
  flex-shrink: 0;
  margin-top: auto;
  display: grid;
  gap: 8px;
  color: var(--sidebar-muted);
  font-size: 12px;
}

.sidebar-collapsed .brand {
  justify-content: center;
  padding: 0;
}

.sidebar-collapsed .brand > div,
.sidebar-collapsed .nav-group,
.sidebar-collapsed .sidebar-footer {
  display: none;
}

.sidebar-collapsed .brand-mark {
  width: 40px;
  height: 40px;
}

.sidebar-collapsed .brand-mark::before {
  content: "NEOS";
  font-size: 11px;
  place-items: center;
  padding: 0;
}

.work-mode:not(.sidebar-collapsed) .brand {
  gap: 8px;
}

.work-mode:not(.sidebar-collapsed) .brand > div {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.work-mode:not(.sidebar-collapsed) .brand-mark {
  width: 34px;
  height: 34px;
}

.sidebar-collapsed .sidebar-toggle {
  position: absolute;
  top: 64px;
  left: 22px;
  margin: 0;
}

.sidebar-collapsed .nav {
  margin-top: 40px;
  padding: 0;
}

.sidebar-collapsed .nav-item {
  position: relative;
  display: grid;
  width: 48px;
  min-height: 44px;
  margin: 0 auto;
  place-items: center;
  padding: 0;
  font-size: 0;
  text-align: center;
}

.sidebar-collapsed .nav-item::before {
  content: attr(data-short);
  font-size: 12px;
  font-weight: 650;
}

.sidebar-collapsed .nav-item.active {
  box-shadow: inset 0 -3px 0 #58b7f3;
}

.access-switcher {
  display: grid;
  gap: 6px;
}

.access-switcher span,
.access-switcher small {
  color: #aab8c5;
  font-size: 12px;
}

.access-switcher select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 8px 9px;
  background: var(--sidebar-bg-strong);
  color: #f8fafc;
}

.workspace {
  min-width: 0;
  padding: 18px 20px 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 58px;
  margin: -18px -20px 18px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
}

.topbar h1,
.section-tools h2,
.panel h2,
.modal-header h2 {
  margin: 0;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.topbar h1 {
  font-size: 18px;
  font-weight: 650;
}

.section-tools h2,
.panel h2,
.modal-header h2 {
  font-size: 18px;
  font-weight: 650;
}

.topbar-actions,
.section-tools,
.toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.topbar-actions {
  flex: 1 1 auto;
  justify-content: flex-end;
}

.section-tools {
  margin-bottom: 12px;
  padding: 4px 0;
}

.section-tools p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.search,
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
}

.search {
  width: min(46vw, 620px);
  border-color: transparent;
  background: var(--surface-soft);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.primary-button,
.ghost-button,
.text-button,
.icon-button {
  border: 0;
  border-radius: 6px;
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
  font-size: 13px;
}

.primary-button {
  background: linear-gradient(135deg, #2f6df6, #16a7c8);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(47, 109, 246, 0.2);
}

.primary-button:hover {
  background: linear-gradient(135deg, var(--blue-dark), #0f8faa);
}

.big-action {
  min-height: 54px;
  padding: 0 20px;
  font-size: 16px;
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: inherit;
}

.workspace .ghost-button {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
}

.text-button {
  background: transparent;
  color: var(--blue);
  font-weight: 600;
}

.icon-button {
  width: 40px;
  padding: 0;
  background: var(--surface-soft);
}

.import-label {
  display: grid;
  place-items: center;
}

.import-label input {
  display: none;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.filters-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr)) auto;
  gap: 8px;
  margin: 0 0 12px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.home-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 12px;
  padding: 24px 26px;
  border: 1px solid rgba(47, 109, 246, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 84% 10%, rgba(126, 231, 255, 0.36), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #edf6ff 54%, #e9fbfa 100%);
  box-shadow: var(--shadow);
}

.home-hero h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: 0;
}

.home-hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.home-hero > span {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, #2f6df6, #13a6a3);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 18px 36px rgba(47, 109, 246, 0.24);
}

.metric,
.panel,
.card,
.kanban-column,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.metric {
  padding: 13px 14px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.forecast-panel {
  margin-bottom: 12px;
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.forecast-metric {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: var(--surface-soft);
}

.forecast-metric span,
.forecast-bar-row span,
.probability-row span {
  color: var(--muted);
  font-size: 12px;
}

.forecast-metric strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  font-weight: 650;
}

.forecast-bars {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.forecast-bar-row {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.forecast-bar-row strong,
.forecast-bar-row span {
  display: block;
}

.forecast-bar,
.probability-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: var(--line);
}

.forecast-bar span,
.probability-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f6df6, #18b6b3);
}

.split-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.panel {
  padding: 14px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.list {
  display: grid;
  gap: 8px;
}

.list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 6px;
  background: var(--surface-soft);
}

.list-item strong,
.list-item span {
  display: block;
}

.list-item span,
.card p,
.meta {
  color: var(--muted);
  font-size: 13px;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pipeline-stage {
  min-height: 108px;
  border-radius: 6px;
  padding: 10px;
  background: var(--surface-soft);
}

.pipeline-stage strong {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.property-grid {
  grid-template-columns: 1fr;
}

.load-more-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  min-height: 36px;
}

.load-more-row button[hidden] {
  display: none;
}

.card {
  overflow: hidden;
}

.card-body {
  padding: 13px 14px;
}

.card h3 {
  margin: 0 0 5px;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.28;
}

.trust-row {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
  border-radius: 6px;
  padding: 8px;
  background: var(--surface-soft);
}

.trust-row strong {
  font-size: 13px;
}

.trust-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.trust-high {
  background: #e8f7ef;
  color: var(--green);
}

.trust-good {
  background: #edf8f4;
  color: var(--teal);
}

.trust-neutral {
  background: #edf2ff;
  color: #1e4db7;
}

.trust-careful {
  background: #fff3dd;
  color: var(--amber);
}

.trust-risk {
  background: #fdecec;
  color: var(--red);
}

.card p {
  margin: 0 0 9px;
  line-height: 1.4;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.stacked-actions {
  display: grid;
  gap: 6px;
}

.property-photo,
.asset-preview {
  display: grid;
  min-height: 132px;
  place-items: center;
  background: #e7edf3;
  color: #233242;
  font-weight: 650;
}

.property-photo img,
.asset-preview img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

#propertiesGrid .card {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 148px;
  align-items: stretch;
}

#propertiesGrid .property-photo {
  min-height: 104px;
  border-right: 1px solid var(--line);
}

#propertiesGrid .property-photo img {
  height: 100%;
  min-height: 112px;
}

#propertiesGrid .card-body {
  min-width: 0;
}

#propertiesGrid .card h3,
#propertiesGrid .meta {
  overflow: hidden;
  text-overflow: ellipsis;
}

#propertiesGrid .card h3 {
  display: block;
  white-space: nowrap;
}

#propertiesGrid .card-body > p:not(.meta) {
  display: none;
}

#propertiesGrid .tags {
  flex-wrap: nowrap;
  overflow: hidden;
  white-space: nowrap;
}

#propertiesGrid .tag,
#propertiesGrid .status {
  flex: 0 0 auto;
}

#propertiesGrid .meta {
  display: block;
  max-height: 19px;
  white-space: nowrap;
}

#propertiesGrid .meta + .meta {
  display: none;
}

#propertiesGrid .card-actions {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  align-items: start;
  justify-content: stretch;
  border-top: 0;
  border-left: 1px solid var(--line);
}

#propertiesGrid .card-actions button {
  display: none;
  width: 100%;
  min-height: 28px;
  padding: 0 8px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
}

#propertiesGrid .card-actions button[data-view-property],
#propertiesGrid .card-actions button[data-edit] {
  display: block;
}

#propertiesGrid .card:hover {
  z-index: 2;
}

#propertiesGrid .card:hover .card-actions,
#propertiesGrid .card:focus-within .card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 260px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 35, 55, 0.16);
}

#propertiesGrid .card:hover .card-actions button,
#propertiesGrid .card:focus-within .card-actions button {
  display: block;
}

.asset-preview audio,
.audio-card audio,
.audio-recorder audio {
  width: 100%;
}

.audio-card {
  min-width: 0;
}

.storage-audio-panel {
  margin-bottom: 16px;
}

.trash-hero {
  align-items: stretch;
}

.trash-hint {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  color: var(--muted);
}

.trash-hint strong {
  color: var(--ink);
  white-space: nowrap;
}

.trash-card .property-photo {
  min-height: 220px;
}

.trash-card .property-photo img {
  height: 240px;
}

.project-card {
  min-height: 320px;
}

.project-units-preview {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.project-units-preview span {
  display: block;
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}

.project-units-panel {
  margin-top: 16px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 4px;
  padding: 0 8px;
  background: #edf2ff;
  color: #1e4db7;
  font-size: 12px;
  font-weight: 500;
}

.status.success {
  background: #e8f7ef;
  color: var(--green);
}

.status.warning {
  background: #fff3dd;
  color: var(--amber);
}

.status.danger {
  background: #fdecec;
  color: var(--red);
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-column {
  min-height: 480px;
  padding: 14px;
}

.kanban-column h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.deal-card {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.deal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.deal-actions .primary-button,
.deal-actions .ghost-button {
  min-height: 34px;
  padding: 0 10px;
}

.probability-row {
  display: grid;
  gap: 6px;
}

.probability-row div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.forecast-events {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.forecast-event-button {
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.investment-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
  gap: 16px;
  margin-bottom: 16px;
}

.description-builder {
  display: grid;
  grid-template-columns: minmax(360px, 1.4fr) minmax(280px, 0.8fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.description-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.description-form textarea[name="output"] {
  min-height: 460px;
  line-height: 1.5;
}

.description-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.description-side {
  display: grid;
  gap: 16px;
}

.financing-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(300px, 0.85fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.financing-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.financing-result-panel {
  display: grid;
  gap: 16px;
}

.financing-match-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.conveyor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.conveyor-step {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-soft);
}

.conveyor-step p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.legal-method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.method-card {
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-soft);
}

.method-card div:first-child {
  display: grid;
  gap: 4px;
}

.method-card div:first-child span,
.method-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.method-card p {
  margin: 0;
}

.method-card .ghost-button,
.financing-program-card .ghost-button {
  justify-self: start;
}

.metric-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.metric-card span,
.metric-card small {
  color: var(--muted);
  font-size: 12px;
}

.metric-card strong {
  font-size: 18px;
}

.checkbox-line {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.compact-form {
  display: grid;
  gap: 8px;
}

.compact-form input,
.compact-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--surface);
}

.mini-file-row {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.mini-file-row span {
  color: var(--muted);
  font-size: 12px;
}

.report-card.is-highlight {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.06);
}

.financing-program-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.85fr);
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.financing-program-card.is-highlight {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.06);
}

.financing-program-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.financing-program-main > div {
  display: grid;
  gap: 3px;
}

.financing-program-main strong {
  font-size: 17px;
  line-height: 1.2;
}

.financing-program-main span,
.financing-program-card p,
.financing-program-card .meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.financing-program-card p,
.financing-program-card .meta {
  margin: 0;
}

.financing-program-card .tags-row {
  justify-content: flex-start;
  align-content: start;
}

.financing-program-card .deal-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.source-pills {
  display: grid;
  gap: 10px;
}

.source-pill {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.source-pill.is-filled {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}

.source-pill strong {
  font-size: 13px;
}

.source-pill span {
  color: var(--muted);
  font-size: 12px;
}

.description-checklist {
  display: grid;
  gap: 8px;
}

.check-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.check-row span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
  font-weight: 700;
}

.check-row.is-ok span {
  background: rgba(34, 197, 94, 0.14);
  color: #166534;
}

.readiness-card {
  display: grid;
  gap: 10px;
}

.readiness-score {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.readiness-score strong {
  font-size: 30px;
  line-height: 1;
}

.readiness-score.success {
  color: #166534;
  background: rgba(34, 197, 94, 0.12);
}

.readiness-score.warning {
  color: #92400e;
  background: rgba(245, 158, 11, 0.14);
}

.readiness-score.danger {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.12);
}

.readiness-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.readiness-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.investment-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.investment-result-panel {
  min-width: 0;
}

.investment-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.investment-broker-notes {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.investment-broker-notes article {
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
  color: var(--ink);
  line-height: 1.45;
}

.investment-chart {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.investment-chart article {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) minmax(120px, auto);
  gap: 10px;
  align-items: center;
}

.report-cards {
  display: grid;
  gap: 12px;
}

.report-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.9fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.report-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.report-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.report-card-metrics span {
  display: grid;
  gap: 2px;
  border-radius: 8px;
  padding: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
}

.report-card-metrics b {
  color: var(--ink);
  font-size: 14px;
}

.quality-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quality-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.quality-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.quality-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.quality-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.quality-score {
  display: grid;
  min-width: 48px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 800;
}

.client-report-mode {
  background: #e7ebf0;
}

.client-report-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px;
}

.client-report-page {
  min-height: 980px;
  margin-bottom: 18px;
  padding: 48px;
  border: 1px solid #cfd7e2;
  background: #fff;
  box-shadow: var(--shadow);
}

.report-cover {
  display: grid;
  align-content: space-between;
  background:
    linear-gradient(90deg, rgba(15, 139, 141, 0.22), rgba(36, 107, 254, 0.12)),
    #15202b;
  color: #fff;
}

.report-brand-row,
.report-cover-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.report-brand-row strong {
  font-size: 28px;
  letter-spacing: 0;
}

.report-cover-title {
  max-width: 720px;
}

.report-cover-title h1 {
  margin: 10px 0 16px;
  font-size: 54px;
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.property-cover .report-cover-title h1 {
  max-width: 900px;
  font-size: 38px;
  line-height: 1.08;
}

.selection-cover,
.route-cover {
  background:
    linear-gradient(90deg, rgba(15, 139, 141, 0.26), rgba(246, 169, 78, 0.16)),
    #13212c;
}

.report-cover-title p:last-child,
.report-cover-meta {
  color: #dbe6ef;
}

.report-section-heading {
  margin-bottom: 24px;
}

.report-section-heading h2 {
  margin: 6px 0 0;
  font-size: 34px;
  letter-spacing: 0;
}

.report-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}

.report-kpi-strip.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-kpi-strip article,
.report-scenario-grid article {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfe;
}

.report-kpi-strip span,
.report-scenario-grid span,
.report-kpi-strip small {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.report-kpi-strip strong,
.report-scenario-grid strong {
  font-size: 26px;
}

.report-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.report-info-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.report-info-block h3 {
  margin: 0 0 14px;
}

.report-info-block dl {
  display: grid;
  grid-template-columns: minmax(120px, 0.75fr) minmax(0, 1.25fr);
  gap: 10px 14px;
  margin: 0;
}

.report-info-block dt {
  color: var(--muted);
}

.report-info-block dd {
  margin: 0;
  font-weight: 700;
}

.report-narrative {
  display: grid;
  gap: 10px;
}

.report-narrative p {
  margin: 0;
  border-left: 4px solid var(--blue);
  padding: 10px 14px;
  background: var(--surface-soft);
  line-height: 1.5;
}

.report-table table {
  font-size: 13px;
}

.report-scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.report-disclaimer {
  margin-top: 28px;
  color: var(--muted);
  line-height: 1.5;
}

.report-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.report-route-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding-left: 24px;
}

.report-route-list li {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  line-height: 1.5;
}

.report-route-list strong,
.report-route-list span,
.report-route-list small {
  display: block;
}

.report-route-list span,
.report-route-list small,
.report-route-list p {
  color: var(--muted);
}

.report-route-list p {
  margin: 8px 0 0;
}

.report-map-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.report-map-links a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.search-command-panel {
  display: grid;
  gap: 10px;
}

.search-command-panel label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.search-command {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  font-size: 18px;
  background: #fff;
}

.search-help {
  color: var(--muted);
  font-size: 13px;
}

.universal-results {
  display: grid;
  gap: 10px;
}

.search-result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.search-result-card strong {
  display: block;
  margin-top: 6px;
  font-size: 17px;
}

.search-match-list {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.search-score {
  color: var(--muted);
  font-size: 12px;
}

.map-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 16px;
}

.map-canvas {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(36, 107, 254, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(36, 107, 254, 0.06) 1px, transparent 1px),
    linear-gradient(135deg, #eef5f8, #f8fbff);
  background-size: 44px 44px, 44px 44px, auto;
}

.map-grid-bg::before {
  content: "Карта-схема CRM: точки с координатами ставятся по lat/lon, остальные временно раскладываются по адресу";
  position: absolute;
  left: 18px;
  top: 16px;
  max-width: 420px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.map-marker {
  position: absolute;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.22);
  transform: translate(-50%, -50%);
}

.map-marker.has-rail {
  background: var(--teal);
}

.map-marker.has-bts {
  background: var(--amber);
}

.map-zone-marker {
  position: absolute;
  min-width: 118px;
  min-height: 76px;
  border: 2px dashed var(--teal);
  border-radius: 50%;
  background: rgba(15, 139, 141, 0.1);
  color: var(--teal);
  transform: translate(-50%, -50%);
}

.map-zone-marker span {
  display: block;
  padding: 8px;
  font-size: 11px;
  font-weight: 800;
}

.map-legend {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-legend span {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 12px;
}

.map-side,
.map-list,
.zone-grid {
  display: grid;
  gap: 10px;
  align-content: start;
}

.map-list {
  max-height: 620px;
  overflow: auto;
}

.map-list-row,
.zone-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.map-list-row span,
.zone-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.property-report-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.property-report-photos img,
.property-report-photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-soft);
}

.property-report-photo-placeholder {
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 800;
}

.sensitivity-heatmap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.heatmap-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.heatmap-group h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: 1.1fr repeat(3, minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
}

.heatmap-grid strong,
.heatmap-grid span {
  display: grid;
  min-height: 34px;
  place-items: center;
  border-radius: 8px;
  padding: 6px;
  font-size: 12px;
  text-align: center;
}

.heatmap-grid strong {
  background: var(--surface-soft);
  color: var(--muted);
}

.heat-good {
  background: #e8f7ef;
  color: var(--green);
}

.heat-mid {
  background: #fff3dd;
  color: var(--amber);
}

.heat-bad {
  background: #fdecec;
  color: var(--red);
}

.table-wrap {
  overflow-x: auto;
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #8a94a3;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  background: #fbfcfd;
}

td {
  font-size: 13px;
  color: #3f4854;
}

td strong {
  font-weight: 600;
}

tbody tr:hover {
  background: #fbfdff;
}

tr:last-child td {
  border-bottom: 0;
}

.empty-state {
  display: grid;
  min-height: 170px;
  place-items: center;
  gap: 6px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
}

dialog {
  width: min(760px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

.detail-dialog {
  width: min(1120px, calc(100vw - 32px));
}

.detail-modal {
  padding: 22px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.detail-main,
.detail-side {
  display: grid;
  align-content: start;
  gap: 14px;
}

.detail-hero {
  display: grid;
  min-height: 360px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, #dde7f0, #f7d9c4);
  color: #233242;
  font-weight: 800;
}

.detail-hero img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.detail-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.detail-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
}

.contract-preview-content {
  display: grid;
  gap: 12px;
}

.contract-preview-frame,
.contract-preview-image {
  width: 100%;
  min-height: 70vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.contract-preview-image {
  max-height: 70vh;
  object-fit: contain;
}

.workflow-section {
  display: grid;
  gap: 14px;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.workflow-step {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfe;
}

.workflow-step span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--line);
  color: var(--muted);
  font-weight: 800;
}

.workflow-step strong,
.workflow-step small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.workflow-step small {
  color: var(--muted);
  line-height: 1.35;
}

.workflow-step.is-done {
  border-color: rgba(25, 117, 210, 0.28);
  background: #f4f8ff;
}

.workflow-step.is-done span {
  background: var(--blue);
  color: #fff;
}

.request-match-list {
  display: grid;
  gap: 10px;
}

.request-match-list article {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfe;
}

.request-match-list p {
  margin: 0;
}

.selection-list {
  display: grid;
  gap: 10px;
}

.selection-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfe;
}

.selection-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.selection-actions,
.deal-selections {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.selection-row .selection-actions {
  grid-column: 1 / -1;
}

.report-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.esign-hero-panel {
  margin-bottom: 16px;
}

.esign-flow-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.esign-step {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.esign-step span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

.esign-step p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.source-card {
  display: grid;
  gap: 10px;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.source-card.muted-card {
  background: #fbfcfe;
}

.source-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.source-card-top strong,
.source-card-top span {
  display: block;
}

.source-card-top span,
.source-card p {
  color: var(--muted);
  font-size: 13px;
}

.source-card p {
  margin: 0;
  line-height: 1.45;
}

.source-link {
  align-self: end;
  justify-self: start;
  min-height: auto;
  padding: 0;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 24px;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch span {
  display: block;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--line);
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  transition: transform 0.16s ease;
}

.switch input:checked + span {
  background: var(--blue);
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.flat-table {
  box-shadow: none;
}

.detail-list {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.detail-list dt {
  color: var(--muted);
  font-size: 13px;
}

.detail-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.photo-strip a {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-soft);
}

.photo-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.match-summary {
  margin-bottom: 14px;
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.match-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.match-card .primary-button,
.match-card .ghost-button {
  min-height: 36px;
}

.match-photo {
  display: grid;
  height: 180px;
  place-items: center;
  background: linear-gradient(135deg, #dde7f0, #f7d9c4);
  color: #233242;
  font-weight: 800;
}

.match-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.match-body {
  padding: 14px;
}

.match-body h3 {
  margin: 0 44px 8px 0;
  font-size: 17px;
}

.match-body p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.45;
}

.match-score {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

#entityForm {
  padding: 22px;
}

.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-header {
  margin-bottom: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.field-label-row label {
  margin-bottom: 0;
}

.voice-actions,
.audio-recorder-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.voice-actions .text-button {
  min-height: 28px;
  padding: 0;
  font-size: 12px;
}

.audio-recorder {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
}

.audio-recorder audio {
  margin-top: 10px;
}

.checkbox-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.checkbox-group legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 6px 12px 6px 0;
  color: var(--ink);
}

.checkbox-group input {
  width: auto;
}

.attached-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.attached-files span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  background: #f4f8ff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.modal-error {
  margin-top: 14px;
  color: #b42318;
  font-size: 14px;
  font-weight: 700;
}

.modal-error:empty {
  display: none;
}

.modal-actions {
  margin-top: 20px;
  justify-content: flex-end;
}

@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
  }

  .nav {
    flex: none;
    overflow: visible;
    padding-right: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sidebar-footer {
    grid-template-columns: 1fr auto auto;
    align-items: center;
  }

  .metrics-grid,
  .quality-grid,
  .forecast-grid,
  .investment-layout,
  .financing-layout,
  .conveyor-grid,
  .legal-method-grid,
  .financing-program-card,
  .report-card,
  .search-result-card,
  .map-panel,
  .cards-grid,
  .property-grid,
  .source-grid,
  .esign-flow-grid,
  .filters-bar,
  .workflow-steps,
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forecast-bar-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .workspace {
    padding: 18px;
  }

  .topbar,
  .topbar-actions,
  .section-tools,
  .toolbar-actions,
  .split-layout {
    display: grid;
    grid-template-columns: 1fr;
  }

  .search,
  .primary-button,
  .big-action {
    width: 100%;
  }

  .trash-hint {
    display: grid;
  }

  .nav,
  .metrics-grid,
  .quality-grid,
    .forecast-grid,
    .investment-layout,
    .investment-form,
    .financing-layout,
    .financing-form,
    .conveyor-grid,
    .legal-method-grid,
    .financing-program-card,
    .description-builder,
  .description-form,
  .investment-kpi-grid,
  .sensitivity-heatmap,
  .cards-grid,
  .property-grid,
  .source-grid,
  .esign-flow-grid,
  .pipeline,
  .form-grid,
  .filters-bar,
  .workflow-steps,
  .detail-grid,
  .photo-strip,
  .match-grid {
    grid-template-columns: 1fr;
  }

  .investment-chart article {
    grid-template-columns: 1fr;
  }

  .report-card,
  .report-card-metrics,
  .search-result-card,
  .map-panel,
  .property-report-photos,
  .report-kpi-strip,
  .report-kpi-strip.compact,
  .report-two-column,
  .report-scenario-grid {
    grid-template-columns: 1fr;
  }

  .client-report-shell {
    padding: 0;
  }

  .client-report-page {
    min-height: auto;
    padding: 22px;
  }

  .report-brand-row,
  .report-cover-meta {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .report-cover-title h1 {
    font-size: 28px;
  }

  .property-cover .report-cover-title h1 {
    font-size: 24px;
  }

  .report-section-heading h2 {
    font-size: 28px;
  }

  .detail-hero,
  .detail-hero img {
    min-height: 240px;
    height: 260px;
  }
}

@media print {
  .sidebar,
  .topbar,
  .section-tools,
  .investment-input-panel,
  .nav,
  .toolbar-actions,
  .primary-button,
  .ghost-button,
  .text-button,
  .no-print {
    display: none !important;
  }

  .app-shell,
  .workspace,
  .investment-layout,
  .split-layout {
    display: block;
    padding: 0;
  }

  .view {
    display: none;
  }

  #investments {
    display: block;
  }

  .panel,
  .table-wrap {
    box-shadow: none;
    break-inside: avoid;
  }

  body.client-report-mode {
    background: #fff;
  }

  body.client-report-mode .client-report-shell {
    max-width: none;
    padding: 0;
  }

  body.client-report-mode .client-report-page {
    min-height: 100vh;
    margin: 0;
    border: 0;
    box-shadow: none;
    page-break-after: always;
  }

  body.client-report-mode .client-report-page:last-child {
    page-break-after: auto;
  }
}
