:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #121a2b;
  --muted: #667085;
  --line: #dce3ee;
  --blue: #145ee9;
  --blue-soft: #eaf1ff;
  --green: #21a366;
  --amber: #f5b73b;
  --red: #d84a4a;
  --nav: #102239;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

button:hover {
  border-color: var(--blue);
}

.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.danger {
  border-color: #f3b5b5;
  background: #fff5f5;
  color: #b42318;
}

.small {
  min-height: 34px;
  padding: 0 12px;
}

.outline {
  padding: 0 16px;
}

.product-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: linear-gradient(180deg, #eef4ff, #f8fafc);
}

.auth-card {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 28px;
  box-shadow: 0 20px 60px rgba(16, 34, 57, 0.12);
}

.auth-card h1 {
  margin: 22px 0 8px;
}

.auth-card p {
  margin: 0 0 20px;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label,
.portfolio-select-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.auth-form input,
.portfolio-select-label select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 11px;
  background: var(--surface);
  color: var(--ink);
}

.form-error {
  margin-bottom: 14px;
  border: 1px solid #f3b5b5;
  border-radius: 7px;
  background: #fff5f5;
  color: #b42318;
  padding: 10px 12px;
  font-weight: 700;
}

.link-button {
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 700;
}

.portfolio-picker {
  display: none;
}

.top-portfolio-picker {
  min-width: 220px;
}

.portfolio-management-panel {
  margin-bottom: 16px;
}

.portfolio-create-form,
.member-add-form,
.member-row {
  display: grid;
  gap: 8px;
  align-items: center;
}

.portfolio-create-form {
  grid-template-columns: minmax(180px, 1fr) auto;
}

.portfolio-management-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 16px;
}

.portfolio-edit-form {
  align-content: start;
}

.portfolio-member-panel {
  display: grid;
  gap: 10px;
}

.member-head,
.member-row {
  grid-template-columns: minmax(180px, 1fr) 110px auto auto;
}

.member-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

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

.member-row {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.member-row small {
  display: block;
  color: var(--muted);
}

.member-add-form {
  grid-template-columns: minmax(180px, 1fr) 110px auto;
}

.readonly {
  opacity: 0.86;
}

.admin-access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.admin-access-grid h3 {
  margin: 0 0 8px;
}

.admin-access-grid p {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.admin-access-grid small {
  color: var(--muted);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  border-right: 1px solid #20344f;
  background: linear-gradient(180deg, #0f2137, #172c47);
  color: #fff;
  padding: 18px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--blue);
  font-weight: 850;
}

.brand span,
.object-switcher > span,
.user-pill small {
  display: block;
  color: #aebbd0;
  font-size: 12px;
}

nav {
  display: grid;
  gap: 5px;
  margin-bottom: 22px;
}

.nav-item,
.sidebar-footer button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  padding: 0 12px;
  background: transparent;
  color: #dce6f5;
  text-align: left;
}

.nav-item.active {
  background: var(--blue);
  color: #fff;
}

.nav-item span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 800;
}

.object-switcher {
  display: grid;
  gap: 9px;
  min-height: 0;
  overflow: auto;
}

.object-button {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  text-align: left;
}

.object-button.active {
  border-color: #79a8ff;
  background: rgba(20, 94, 233, 0.3);
}

.object-button span {
  color: #b9c7dc;
  font-size: 12px;
  line-height: 1.35;
}

.sidebar-footer {
  display: grid;
  gap: 16px;
  margin-top: auto;
  padding-top: 18px;
}

.user-pill {
  display: flex;
  gap: 10px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  padding-top: 16px;
}

.user-pill > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e8eef8;
  color: var(--nav);
  font-weight: 850;
}

.main {
  min-width: 0;
  padding: 24px 28px 36px;
}

.topbar,
.top-actions,
.panel-title {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.breadcrumbs {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 29px;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 15px;
}

.top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 330px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 0 11px;
}

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

.search input {
  width: 100%;
  border: 0;
  outline: 0;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.kpi-grid article,
.panel,
.detail-panel,
.object-hero {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.kpi-grid article {
  padding: 18px;
}

.kpi-grid span,
.kpi-grid small,
.panel-title span {
  color: var(--muted);
}

.kpi-grid strong {
  display: block;
  margin: 7px 0 3px;
  font-size: 27px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(360px, 0.8fr);
  gap: 16px;
}

.span-2 {
  grid-column: span 1;
}

.panel,
.detail-panel {
  min-width: 0;
  padding: 18px;
}

.component-assessment {
  display: grid;
  gap: 14px;
}

.assessment-score {
  border-radius: 9px;
  padding: 16px;
}

.assessment-score span,
.assessment-score small {
  display: block;
  font-weight: 800;
}

.assessment-score strong {
  display: block;
  margin: 4px 0;
  font-size: 34px;
  line-height: 1;
}

.component-assessment dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.component-assessment div {
  min-width: 0;
}

.component-assessment dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.component-assessment dd {
  margin: 4px 0 0;
  color: var(--text);
  line-height: 1.35;
}

.panel-title {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-subtitle {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.bar-board {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  align-items: end;
  height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  gap: 12px;
}

.bar-board div {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
}

.bar-board span {
  display: block;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #7eafff, var(--blue));
}

.bar-board b,
.bar-board small {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.horizontal-bars {
  display: grid;
  gap: 15px;
}

.horizontal-bars div {
  display: grid;
  grid-template-columns: 110px 1fr 38px;
  gap: 10px;
  align-items: center;
}

.horizontal-bars div div {
  display: block;
  height: 16px;
  border-radius: 999px;
  background: #edf1f5;
  overflow: hidden;
}

.horizontal-bars i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber));
}

.table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.excel-analysis-table {
  min-width: 1960px;
  table-layout: fixed;
  font-size: 11px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.excel-analysis-table .col-bkp { width: 136px; }
.excel-analysis-table .col-component { width: 210px; }
.excel-analysis-table .col-share { width: 86px; }
.excel-analysis-table .col-money { width: 96px; }
.excel-analysis-table .col-depth { width: 76px; }
.excel-analysis-table .col-depth-first { width: 96px; }
.excel-analysis-table .col-gnd { width: 66px; }
.excel-analysis-table .col-year { width: 94px; }
.excel-analysis-table .col-next { width: 128px; }
.excel-analysis-table .col-short { width: 48px; }
.excel-analysis-table .col-zn { width: 62px; }
.excel-analysis-table .col-depreciation { width: 108px; }
.excel-analysis-table .col-year-small { width: 70px; }

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

.excel-analysis-table th,
.excel-analysis-table td {
  padding: 5px 6px;
  border-bottom: 1px solid #d7deea;
  color: #000;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.excel-analysis-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #475467;
  font-size: 10px;
  line-height: 1.05;
  text-transform: none;
  vertical-align: bottom;
  border-bottom: 1px solid #b8c3d6;
}

.excel-analysis-table th:nth-child(1),
.excel-analysis-table th:nth-child(2),
.excel-analysis-table td:nth-child(1),
.excel-analysis-table td:nth-child(2) {
  text-align: left;
}

.excel-analysis-table th:nth-child(2),
.excel-analysis-table td:nth-child(2) {
  min-width: 0;
}

.excel-analysis-table th:nth-child(2),
.excel-analysis-table td:nth-child(2),
.excel-analysis-table th:nth-child(8),
.excel-analysis-table td:nth-child(8),
.excel-analysis-table th:nth-child(12),
.excel-analysis-table td:nth-child(12),
.excel-analysis-table th:nth-child(19),
.excel-analysis-table td:nth-child(19) {
  border-right: 1px solid #b8c3d6;
}

.excel-analysis-table .excel-input {
  background: #f5f8fc;
}

.excel-analysis-table .excel-input input {
  width: 100%;
  min-width: 54px;
  height: 24px;
  border: 1px solid #b8c3d6;
  border-radius: 4px;
  padding: 3px 5px;
  background: #fff;
  color: #111827;
  font: inherit;
  text-align: right;
}

.excel-analysis-table td:nth-child(2) input {
  min-width: 0;
  text-align: left;
}

.component-name-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.component-name-control:has(.photo-badge) {
  grid-template-columns: auto minmax(0, 1fr);
}

.excel-actions {
  display: flex;
  gap: 2px;
  align-items: center;
}

.condition-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.excel-bkp {
  min-width: 34px;
  font-weight: 800;
  color: #111827;
}

.excel-actions button {
  min-width: 22px;
  width: 22px;
  height: 22px;
  border: 1px solid #b8c3d6;
  border-radius: 4px;
  background: #fff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.excel-actions button:hover {
  border-color: #2563eb;
  background: #eaf2ff;
}

.excel-actions button.danger {
  color: #b42318;
}

.depth-control {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-width: 0;
}

.excel-analysis-table .depth-control input[type="number"] {
  min-width: 0;
}

.excel-analysis-table .excel-link {
  color: #4d98ff;
}

.zn-chip,
.assessment-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.assessment-chip {
  max-width: 74px;
  min-height: 20px;
}

.zn-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  font-size: 9px;
  line-height: 1;
}

.zn-edit-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.zn-edit-cell select {
  min-width: 56px;
}

.zn-reset {
  width: 20px;
  min-width: 20px;
  height: 20px;
  padding: 0;
  border-color: #ef4444;
  color: #b91c1c;
}

.zn-chip.ok,
.assessment-chip.ok,
.assessment-score.ok {
  background: #dcfce7;
  color: #166534;
}

.zn-chip.medium,
.assessment-chip.medium,
.assessment-score.medium {
  background: #d9f99d;
  color: #3f6212;
}

.zn-chip.warn,
.assessment-chip.warn,
.assessment-score.warn {
  background: #fef3c7;
  color: #92400e;
}

.zn-chip.danger,
.assessment-chip.danger,
.assessment-score.danger {
  background: #fee2e2;
  color: #991b1b;
}

.excel-group-row td,
.excel-total-row td {
  font-weight: 800;
}

.excel-group-row td {
  background: #f8fafc;
  border-top: 1px solid #8b96a8;
  border-bottom: 1px solid #8b96a8;
  padding-top: 4px;
  padding-bottom: 4px;
}

.excel-total-row td {
  background: #f1f5f9;
  border-top: 2px solid #111827;
}

.excel-group-row td:nth-child(2),
.excel-total-row td:nth-child(2) {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.excel-status {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-left: 3px;
  vertical-align: -1px;
}

.excel-status.ok {
  background: #68a995;
}

.excel-status.soon {
  background: #d9bd65;
}

.excel-status.overdue {
  background: #d75d4d;
}

.is-overridden-cell {
  background: #fff8e1;
  box-shadow: inset 0 0 0 1px #f6c453;
}

.override-badge {
  display: inline-block;
  margin-left: 4px;
  border: 1px solid #f6c453;
  border-radius: 999px;
  background: #fff8e1;
  color: #8a5a00;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
  padding: 2px 5px;
  vertical-align: 1px;
  white-space: nowrap;
}

th {
  background: var(--surface-soft);
  color: #475467;
  font-size: 12px;
  text-transform: uppercase;
}

td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

tbody tr {
  cursor: pointer;
}

tr.selected {
  background: var(--blue-soft);
  outline: 2px solid #8bb6ff;
  outline-offset: -2px;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
}

.green {
  background: var(--green);
}

.amber {
  background: var(--amber);
}

.report-preview p,
.report-card p {
  color: var(--muted);
  line-height: 1.5;
  margin: 10px 0 16px;
}

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

.summary-strip article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 13px;
}

.summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.object-hero {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: start;
  padding: 20px;
  margin-bottom: 16px;
}

.object-hero.compact {
  grid-template-columns: 140px minmax(0, 1fr) auto;
}

.building-image {
  height: 135px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(20, 94, 233, 0.24), rgba(33, 163, 102, 0.16)),
    linear-gradient(160deg, #d7e1ee 0 20%, #f7fafc 20% 30%, #b9c8d8 30% 45%, #eef3f8 45% 55%, #93a8bd 55% 70%, #d8e2ed 70%);
  position: relative;
  overflow: hidden;
}

.building-image::after {
  content: "";
  position: absolute;
  inset: 22px 42px 20px 58px;
  background:
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(255, 255, 255, 0.85) 22px 26px),
    repeating-linear-gradient(90deg, #64748b 0 34px, #e2e8f0 34px 42px);
  border: 5px solid white;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.16);
}

dl {
  margin: 14px 0 0;
}

.object-facts,
.detail-list {
  display: grid;
  gap: 10px;
}

.object-facts div,
.detail-list div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  font-weight: 650;
}

.analysis-view,
.photo-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
}

.segmented,
.tabs {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.segmented button,
.tabs button {
  border: 0;
  border-radius: 0;
  min-height: 34px;
  padding: 0 12px;
}

.segmented .active,
.tabs .active {
  background: var(--blue-soft);
  color: var(--blue);
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-header span {
  color: var(--muted);
  font-weight: 750;
}

.gauge {
  --score: 60%;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  margin: 4px auto 22px;
  border-radius: 50%;
  background: conic-gradient(var(--amber) 0 var(--score), #edf1f5 var(--score) 100%);
  position: relative;
}

.gauge::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: white;
}

.gauge strong,
.gauge span {
  position: relative;
  z-index: 1;
}

.gauge strong {
  font-size: 34px;
}

.gauge span {
  margin-top: 42px;
  color: var(--muted);
  font-size: 12px;
}

.hint-box {
  margin: 18px 0;
  border: 1px solid #e8ddff;
  border-radius: 8px;
  background: #fbf8ff;
  padding: 14px;
}

.hint-box p {
  margin-top: 9px;
  color: #475467;
  line-height: 1.45;
}

.override-note {
  border: 1px solid #f6c453;
  border-radius: 7px;
  background: #fff8e1;
  color: #8a5a00;
  display: grid;
  gap: 4px;
  padding: 9px 10px;
}

.override-note span {
  color: #8a5a00;
  font-size: 12px;
}

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

.edit-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.edit-form textarea {
  resize: vertical;
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--blue);
}

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

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

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

.span-all {
  grid-column: 1 / -1;
}

.full {
  width: 100%;
}

.analysis-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.photo-panel .tabs {
  margin-bottom: 14px;
}

.photo-analysis-tabs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--surface-soft);
}

.photo-analysis-tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.photo-analysis-tabs button.active {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--blue);
}

.photo-analysis-tabs b {
  margin-left: 4px;
  color: var(--muted);
}

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

.photo-workflow,
.photo-empty-state {
  grid-column: 1 / -1;
}

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

.photo-quality-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, .85fr) 1.2fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.photo-quality-panel span,
.photo-quality-panel small {
  color: var(--muted);
}

.photo-quality-panel > div > span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.photo-quality-panel strong {
  display: block;
  margin: 3px 0;
  font-size: 20px;
}

.photo-quality-panel ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.photo-quality-panel li {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 9px;
}

.photo-quality-panel b,
.photo-quality-panel li span {
  display: block;
}

.photo-workflow article,
.photo-empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.photo-workflow article.error,
.photo-analysis-error {
  border-color: #fecaca;
  background: #fff1f2;
}

.photo-analysis-error {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 12px;
  color: #9f1239;
}

.photo-analysis-error p {
  margin: 4px 0 0;
  color: #9f1239;
  font-size: 13px;
}

.photo-analysis-error .small {
  white-space: nowrap;
}

.photo-workflow span,
.photo-workflow small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.photo-workflow strong {
  display: block;
  margin: 4px 0;
  font-size: 18px;
}

.photo-empty-state p {
  margin: 6px 0 0;
  color: var(--muted);
}

.photo-upload-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(220px, 1fr) minmax(180px, 0.8fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
}

.photo-upload-form strong,
.photo-upload-form small {
  display: block;
}

.photo-upload-form small {
  margin-top: 3px;
  color: var(--muted);
}

.photo-upload-form input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  background: #fff;
}

.photo-upload-form .native-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.upload-file-trigger {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 44px;
  cursor: pointer;
}

.upload-file-trigger span,
.upload-file-trigger small {
  display: block;
}

.upload-file-trigger small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.photo-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}

.batch-review {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.batch-review.empty-review {
  background: var(--surface-soft);
}

.batch-review.empty-review span,
.batch-review.empty-review strong {
  display: block;
}

.batch-review.empty-review span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.batch-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.batch-review-head span,
.batch-review-head strong {
  display: block;
}

.batch-review-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.batch-review-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  gap: 8px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.batch-review-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.batch-review-filters select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
  background: #fff;
  font: inherit;
}

.review-bkp-progress {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
}

.review-bkp-progress button {
  flex: 0 0 auto;
  min-height: 48px;
  min-width: 168px;
  padding: 7px 10px;
  text-align: left;
}

.review-bkp-progress button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.review-bkp-progress strong,
.review-bkp-progress span {
  display: block;
}

.review-bkp-progress strong {
  font-size: 12px;
}

.review-bkp-progress span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.batch-review-table {
  display: grid;
  overflow-x: auto;
}

.batch-review-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(140px, 0.9fr) minmax(180px, 1fr) 112px minmax(240px, 1.5fr) 96px 154px;
  gap: 8px;
  align-items: center;
  min-width: 1120px;
  border-top: 1px solid var(--line);
  padding: 8px 0;
}

.material-toolbar,
.material-group {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.material-toolbar {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 16px;
}

.material-toolbar-title,
.material-group-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.material-toolbar-title span,
.material-group-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.material-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.material-stat-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.material-stat-grid strong,
.material-stat-grid span {
  display: block;
}

.material-stat-grid strong {
  font-size: 20px;
}

.material-stat-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.material-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: var(--surface);
}

.material-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.material-chip-list span {
  border: 1px solid #b7dcc9;
  border-radius: 999px;
  background: #effaf4;
  color: #17603a;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.material-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 12px;
}

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

.material-card-form {
  display: grid;
  gap: 12px;
}

.material-card-main,
.material-card-meta {
  display: grid;
  gap: 10px;
}

.material-card-main {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.material-card-meta {
  grid-template-columns: minmax(180px, 1fr) 82px auto;
  align-items: end;
}

.material-eyebrow,
.material-card label span,
.material-source span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.material-card input,
.material-card select,
.material-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
  font: inherit;
  background: #fff;
}

.material-card label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.material-card label input,
.material-card label select,
.material-card label textarea {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
}

.material-evidence {
  display: grid;
  gap: 5px;
}

.material-source {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 8px;
}

.material-source img,
.material-thumb-fallback {
  width: 72px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  background: #e6ebf2;
}

.material-thumb-fallback {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.portfolio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.portfolio-object-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.portfolio-object-tabs button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.object-create-form {
  margin-top: 14px;
}

.object-opening-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(360px, 1.2fr);
  gap: 18px;
  align-items: start;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 16px;
}

.object-opening-copy {
  display: grid;
  gap: 8px;
}

.object-opening-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.object-opening-copy h3,
.object-opening-copy p,
.object-opening-copy ol {
  margin: 0;
}

.object-opening-copy p,
.object-opening-copy li {
  color: var(--muted);
}

.object-opening-copy ol {
  display: grid;
  gap: 4px;
  padding-left: 20px;
}

.object-opening-panel .object-create-form {
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.object-action-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 260px;
}

.workflow-mini {
  display: inline-block;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 850;
}

.workflow-bar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 10px;
}

.workflow-object-header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 14px;
}

.workflow-object-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.workflow-object-header h2,
.workflow-object-header p {
  margin: 0;
}

.workflow-object-header p {
  color: var(--muted);
}

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

.workflow-steps button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  min-height: 54px;
  padding: 7px;
  text-align: left;
}

.workflow-steps button span {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.workflow-steps button strong,
.workflow-steps button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-steps button strong {
  font-size: 12px;
}

.workflow-steps button small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.workflow-steps button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.workflow-next-panel,
.workflow-warning {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 14px;
}

.workflow-next-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.workflow-warning {
  margin: 12px 0;
  border-color: #f3d19c;
  background: #fff8eb;
}

.workflow-warning p,
.workflow-next-panel p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 860px) {
  .material-stat-grid,
  .material-card-main,
  .material-card-meta {
    grid-template-columns: 1fr;
  }

  .material-card-grid {
    grid-template-columns: 1fr;
  }

  .workflow-bar,
  .object-opening-panel,
  .workflow-next-panel {
    grid-template-columns: 1fr;
  }

  .workflow-steps {
    grid-template-columns: 1fr 1fr;
  }
}

.suggested-bkp {
  display: grid;
  gap: 4px;
}

.suggested-bkp span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggested-bkp.unmatched span {
  color: #b45309;
}

.batch-review-row.head {
  border-top: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.batch-review-row select,
.batch-review-row textarea,
.batch-review-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
  font: inherit;
  background: #fff;
}

.batch-review-row textarea {
  resize: vertical;
}

.linklike {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.review-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.photo-card.selected {
  outline: 3px solid var(--blue);
}

.photo-card-actions {
  display: flex;
  justify-content: flex-end;
  padding: 8px 12px 12px;
}

.photo-card-actions button {
  min-height: 30px;
}

.photo-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.photo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 38px;
  min-width: 38px;
  height: 24px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 0 5px;
  background: #eff6ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.photo-badge:hover {
  border-color: var(--blue);
  background: #dbeafe;
}

.photo-badge-icon {
  position: relative;
  width: 12px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.photo-badge-icon::before {
  content: "";
  position: absolute;
  top: 1px;
  right: 1px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: currentColor;
}

.photo-badge-icon::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 1px;
  left: 1px;
  height: 4px;
  clip-path: polygon(0 100%, 38% 35%, 58% 66%, 74% 45%, 100% 100%);
  background: currentColor;
}

.condition-photo-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(3 37 67 / 36%);
}

.condition-photo-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1180px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.condition-photo-modal > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.condition-photo-modal > header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.condition-photo-modal > header h2 {
  margin: 2px 0 0;
  font-size: 22px;
}

.condition-photo-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  min-height: 0;
}

.condition-photo-stage {
  position: relative;
  display: grid;
  min-height: 520px;
  place-items: center;
  overflow: hidden;
  background: #f8fafc;
}

.condition-photo-stage > img,
.condition-photo-stage > .photo-art {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 210px);
  object-fit: contain;
}

.condition-photo-stage > .photo-art,
.condition-photo-image-fallback,
.condition-photo-image-fallback > .photo-art {
  width: 100%;
  height: 100%;
}

.condition-photo-info {
  min-height: 0;
  overflow: auto;
  border-left: 1px solid var(--line);
  padding: 16px;
}

.condition-photo-info h3 {
  margin: 8px 0 12px;
  font-size: 20px;
}

.condition-photo-info dl,
.condition-photo-findings article dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.condition-photo-info dl div,
.condition-photo-findings article dl div {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 8px;
}

.condition-photo-info dt,
.condition-photo-findings article dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.condition-photo-info dd,
.condition-photo-findings article dd {
  margin: 0;
}

.condition-photo-findings {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.condition-photo-findings article {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.condition-photo-findings article strong {
  font-size: 16px;
}

.condition-photo-findings article p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.condition-photo-gallery {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 10px 12px;
}

.condition-photo-gallery > div {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.condition-photo-gallery button[data-condition-photo-select] {
  display: grid;
  grid-template-columns: 54px minmax(90px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.condition-photo-gallery button[data-condition-photo-select].active {
  border-color: var(--blue);
  background: #eff6ff;
}

.condition-photo-gallery img,
.condition-photo-gallery button[data-condition-photo-select] > span {
  width: 54px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  background: #f1f5f9;
}

.condition-photo-gallery small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .condition-photo-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .condition-photo-stage {
    min-height: 340px;
  }

  .condition-photo-info {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

.photo-filter-notice {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 12px;
  background: #eff6ff;
}

.photo-filter-notice span,
.photo-filter-notice strong,
.photo-filter-notice small {
  display: block;
}

.photo-filter-notice span,
.photo-filter-notice small {
  color: var(--muted);
  font-size: 12px;
}

.photo-card strong,
.photo-card small {
  display: block;
  padding: 0 12px;
}

.photo-card strong {
  margin-top: 10px;
}

.photo-card img,
.photo-preview img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.photo-card small {
  margin: 4px 0 12px;
  color: var(--muted);
}

.photo-status {
  display: inline-block;
  margin: 8px 12px 0;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 11px;
  padding: 4px 8px;
}

.photo-art {
  height: 150px;
  display: flex;
  align-items: end;
  justify-content: end;
  padding: 12px;
  background: linear-gradient(135deg, #cbd5e1, #f8fafc);
}

.photo-art span {
  border-radius: 5px;
  padding: 6px 9px;
  background: var(--red);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.photo-art.roof { background: repeating-linear-gradient(15deg, #7c2d12 0 11px, #9a3412 11px 20px); }
.photo-art.facade { background: linear-gradient(90deg, #e2e8f0, #f8fafc 60%, #cbd5e1); }
.photo-art.window { background: linear-gradient(135deg, #94a3b8, #e2e8f0); }
.photo-art.bath { background: linear-gradient(135deg, #d8d3ca, #f5f0e8); }
.photo-art.pipes { background: linear-gradient(135deg, #64748b, #b45309); }
.photo-art.balcony { background: linear-gradient(135deg, #cbd5e1, #94a3b8); }

.photo-preview {
  position: relative;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.photo-preview img,
.photo-preview .photo-art {
  height: 220px;
}

.finding-overlay {
  position: absolute;
  z-index: 2;
  border: 2px solid #2563eb;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.12);
  cursor: pointer;
}

.finding-overlay span {
  position: absolute;
  top: -24px;
  left: -2px;
  border-radius: 999px;
  padding: 3px 7px;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
}

.finding-overlay.severity-hoch,
.finding-overlay.severity-kritisch {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.14);
}

.finding-overlay.severity-hoch span,
.finding-overlay.severity-kritisch span {
  background: #dc2626;
}

.photo-model-context {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.photo-model-context summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

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

.context-grid article {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  background: #fff;
}

.context-grid span,
.context-grid small,
.context-components span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.context-components {
  display: grid;
  gap: 6px;
}

.context-components p {
  margin: 0;
}

.photo-report-groups {
  display: grid;
  gap: 14px;
}

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

.photo-report-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.photo-report-head span {
  display: block;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.photo-report-head h4 {
  margin: 2px 0 0;
}

.photo-report-kpis {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.photo-report-kpis b {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--surface-soft);
  font-size: 12px;
}

.photo-report-context {
  margin: 0 0 10px;
  color: var(--muted);
}

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

.photo-report-sheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(260px, 42%) 1fr;
  padding: 12px;
}

.photo-report-image {
  min-height: 220px;
}

.photo-report-image img,
.photo-report-image .photo-art {
  border-radius: 7px;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  width: 100%;
}

.photo-report-sheet-body {
  display: grid;
  align-content: start;
  gap: 9px;
}

.photo-report-sheet-body header {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.photo-report-sheet-body header span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.photo-report-sheet-body h4 {
  margin: 2px 0 0;
}

.photo-report-sheet-body dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.photo-report-sheet-body dl div {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.photo-report-sheet-body dt,
.report-material-grid dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.photo-report-sheet-body dd,
.report-material-grid dd {
  margin: 2px 0 0;
}

.photo-report-sheet-body em {
  color: var(--muted);
  font-size: 12px;
}

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

.report-material-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.report-material-row header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 48px minmax(150px, 1fr) repeat(4, max-content);
  padding-bottom: 8px;
}

.report-material-row header span {
  background: var(--surface-soft);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  padding: 4px 8px;
  white-space: nowrap;
}

.report-material-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
  margin-top: 10px;
}

.report-material-row p {
  background: var(--surface-soft);
  border-radius: 7px;
  margin: 10px 0 0;
  padding: 10px;
}

@media (max-width: 900px) {
  .photo-report-sheet,
  .report-material-row header,
  .report-material-grid {
    grid-template-columns: 1fr;
  }

  .report-material-row header span {
    width: fit-content;
  }
}

.finding-list {
  display: grid;
  gap: 12px;
}

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

.finding-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.finding-form select,
.finding-form textarea,
.finding-form input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 9px;
  font: inherit;
}

.finding-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.finding-actions span {
  color: var(--muted);
  margin-left: auto;
}

.finding-note-preview {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--ink);
  display: grid;
  gap: 8px;
  padding: 10px;
}

.finding-note-preview strong {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.finding-note-preview ol {
  margin: 0;
  padding-left: 20px;
}

.finding-note-preview p {
  margin: 0;
}

.finding-note-preview span {
  color: var(--muted);
}

.finding-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.risk-dot {
  border-radius: 999px;
  padding: 4px 8px;
  background: #e2e8f0;
  color: var(--ink);
  font-size: 12px;
}

.risk-dot.hoch,
.risk-dot.kritisch {
  background: #fee2e2;
  color: #991b1b;
}

.risk-dot.mittel {
  background: #fef3c7;
  color: #92400e;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline article {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.timeline article > span {
  color: var(--blue);
  font-size: 22px;
  font-weight: 850;
}

.measure-summary {
  margin-bottom: 16px;
}

.measure-overview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
  margin-bottom: 16px;
}

.measure-overview .panel-title {
  margin-bottom: 10px;
  gap: 12px;
}

.measure-plan-kpis {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.measure-plan-kpis span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
}

.measure-gantt {
  --gantt-meta-width: 360px;
  --gantt-plan-width: 224px;
  --gantt-grid-width: 2720px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  scrollbar-color: #aebbd0 #eef2f7;
  scrollbar-width: thin;
}

.gantt-row {
  display: grid;
  grid-template-columns: var(--gantt-meta-width) minmax(var(--gantt-grid-width), 1fr);
  min-width: calc(var(--gantt-meta-width) + var(--gantt-grid-width));
  border-bottom: 1px solid var(--line);
}

.gantt-row:last-child {
  border-bottom: 0;
}

.gantt-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.gantt-row.is-leading {
  background: #fffaf0;
}

.gantt-row.is-delayed {
  background: #f5fbff;
}

.gantt-row.selected-measure-row {
  background: #eef6ff;
}

.gantt-meta,
.gantt-plan,
.gantt-quarter,
.gantt-drop,
.gantt-total-cell {
  padding: 8px;
  border-right: 1px solid var(--line);
}

.gantt-meta,
.gantt-plan {
  position: sticky;
  background: inherit;
  z-index: 3;
}

.gantt-meta {
  left: 0;
}

.gantt-plan {
  left: var(--gantt-meta-width);
  border-right: 0;
  box-shadow: inset -1px 0 #9fb2cc, 10px 0 16px rgba(15, 23, 42, 0.08);
}

.gantt-head .gantt-meta,
.gantt-head .gantt-plan {
  background: #f8fafc;
  z-index: 6;
}

.gantt-meta {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-content: center;
}

.gantt-meta strong,
.gantt-meta small {
  grid-column: 2;
}

.gantt-bkp {
  grid-row: 1 / span 2;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 4px 5px;
  text-align: center;
  font-weight: 850;
  font-size: 11px;
}

.gantt-meta strong {
  font-size: 13px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-investment {
  grid-column: 3;
  align-self: center;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.gantt-meta small,
.gantt-plan small,
.bundle-card small,
.bundle-card p {
  color: var(--muted);
}

.gantt-meta small {
  display: none;
}

.gantt-plan small,
.measure-overview .panel-subtitle {
  display: none;
}

.gantt-plan-chip {
  grid-column: 2 / 4;
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  padding: 3px 6px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-plan-chip.is-overridden {
  border-color: #f6c453;
  background: #fff8e1;
  color: #8a5a00;
}

.gantt-zn {
  grid-column: 2 / 4;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  max-width: 210px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-zn.ok {
  background: #dcfce7;
  color: #166534;
}

.gantt-zn.medium {
  background: #d9f99d;
  color: #3f6212;
}

.gantt-zn.warn {
  background: #fef3c7;
  color: #92400e;
}

.gantt-zn.danger {
  background: #fee2e2;
  color: #991b1b;
}

.measure-plan-kpis .is-warning {
  border-color: #f59e0b;
  color: #92400e;
  background: #fffbeb;
}

.gantt-detail-grid {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  gap: 3px;
  margin-top: 4px;
}

.gantt-detail-grid b {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  padding: 3px 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-detail-grid b.is-overridden {
  border-color: #f6c453;
  background: #fff8e1;
  color: #8a5a00;
}

.gantt-plan {
  display: grid;
  align-content: center;
  gap: 4px;
  padding-right: 14px;
}

.plan-head-grid {
  grid-template-columns: 86px 56px 58px;
  align-items: center;
  gap: 4px;
}

.gantt-grid {
  display: grid;
  grid-template-columns: repeat(80, minmax(34px, 1fr));
}

.gantt-quarter {
  text-align: center;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 2px;
  padding: 6px 3px;
}

.gantt-quarter strong {
  font-size: 10px;
}

.gantt-quarter span {
  color: var(--muted);
  font-size: 10px;
}

.gantt-drop {
  position: relative;
  min-height: 48px;
  border-right: 1px dashed #d8e1ee;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.7), rgba(255, 255, 255, 0.7));
  overflow: visible;
  padding: 0;
}

.gantt-drop.move-target {
  cursor: copy;
}

.gantt-drop.move-target:hover {
  background: #dbeafe;
  box-shadow: inset 0 0 0 2px rgba(31, 102, 214, 0.28);
}

.gantt-quarter.year-start,
.gantt-drop.year-start,
.gantt-total-cell.year-start {
  border-left: 2px solid #b8c7da;
}

.gantt-drop.drag-over {
  background: #dbeafe;
  box-shadow: inset 0 0 0 2px rgba(31, 102, 214, 0.35);
}

.gantt-drop.allocated {
  background: #f0f6ff;
}

.gantt-drop.technical-due {
  background: repeating-linear-gradient(135deg, #fff7ed, #fff7ed 6px, #ffedd5 6px, #ffedd5 12px);
}

.technical-marker {
  position: absolute;
  inset: 18px 4px auto 4px;
  border: 1px dashed #f59e0b;
  border-radius: 999px;
  color: #a15c00;
  background: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 850;
  line-height: 20px;
  text-align: center;
}

.gantt-bar {
  position: absolute;
  inset: 8px auto auto 4px;
  width: calc((var(--duration, 1) * 100%) - 8px);
  z-index: 1;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 6px 22px;
  color: #fff;
  cursor: grab;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px;
  text-align: left;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.14);
  user-select: none;
  touch-action: none;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
}

.gantt-bar:hover {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.36), 0 12px 24px rgba(15, 23, 42, 0.2);
}

.gantt-bar.selected {
  box-shadow: 0 0 0 3px rgba(31, 102, 214, 0.28), 0 12px 24px rgba(15, 23, 42, 0.18);
}

.gantt-bar:active {
  cursor: grabbing;
}

.gantt-bar.dragging {
  opacity: 0.9;
  z-index: 8;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.38), 0 16px 30px rgba(15, 23, 42, 0.26);
}

.gantt-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 800;
}

.gantt-bar strong {
  font-size: 10px;
  justify-self: end;
  white-space: nowrap;
}

.resize-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20px;
  cursor: ew-resize;
  z-index: 4;
}

.resize-handle::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.65);
}

.gantt-bar:hover .resize-handle::after,
.gantt-bar.selected .resize-handle::after,
.gantt-bar.dragging .resize-handle::after {
  width: 3px;
  background: rgba(255, 255, 255, 0.95);
}

.resize-handle.left {
  left: 0;
}

.resize-handle.left::after {
  left: 8px;
}

.resize-handle.right {
  right: 0;
}

.resize-handle.right::after {
  right: 8px;
}

.bar-tools {
  display: none;
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0.92;
  pointer-events: auto;
  transition: opacity 0.12s ease;
  z-index: 5;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  padding: 3px;
}

.gantt-bar:not(:hover):not(.selected) .bar-tools {
  opacity: 0;
  pointer-events: none;
}

.bar-tools button {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.bar-tools b {
  color: #fff;
  font-size: 10px;
  white-space: nowrap;
  min-width: 22px;
  text-align: center;
}

.bar-tools {
  display: none;
}

.priority-hoch {
  background: #dc2626;
}

.priority-mittel {
  background: #1f66d6;
}

.priority-tief {
  background: #16a34a;
}

.gantt-total {
  background: #f8fafc;
  font-weight: 850;
}

.gantt-total-cell,
.gantt-year-total {
  min-height: 52px;
  text-align: center;
  color: var(--muted);
}

.year-total-grid {
  grid-template-columns: repeat(20, minmax(136px, 1fr));
}

.gantt-year-total {
  border-right: 1px solid var(--line);
  padding: 10px 8px;
  display: grid;
  gap: 3px;
  align-content: center;
}

.gantt-year-total span {
  font-size: 11px;
  color: var(--muted);
}

.gantt-year-total strong {
  color: var(--ink);
  white-space: nowrap;
}

.gantt-total-cell.active,
.gantt-year-total.active {
  color: var(--blue);
  background: #eaf2ff;
}

.measure-bundle-panel {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.bundle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

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

.bundle-card span {
  color: var(--blue);
  font-weight: 850;
}

.bundle-card strong,
.bundle-card small,
.bundle-card p {
  display: block;
  margin-top: 5px;
}

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

.empty-state {
  color: var(--muted);
  margin: 0;
}

.measure-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.priority {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1;
}

.priority.hoch {
  background: #fee4e2;
  color: #b42318;
}

.priority.mittel {
  background: #fff3d6;
  color: #a15c00;
}

.priority.tief {
  background: #dcfae6;
  color: #067647;
}

.timeline small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.measure-edit-form {
  display: grid;
  grid-template-columns: 150px 110px 150px auto;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}

.measure-edit-form.compact {
  grid-template-columns: 112px 82px 118px auto;
  gap: 5px;
  margin: 0;
}

.measure-edit-form.compact label {
  font-size: 10px;
}

.measure-edit-form.compact input,
.measure-edit-form.compact select {
  min-height: 28px;
  padding: 4px 6px;
  font-size: 12px;
}

.measure-edit-form.compact button {
  min-height: 28px;
  padding: 4px 8px;
}

.measure-edit-form.inline {
  grid-template-columns: 86px 56px 58px;
  margin: 0;
  gap: 4px;
}

.measure-edit-form.inline select,
.measure-edit-form.inline input {
  min-height: 26px;
  padding: 4px 5px;
  font-size: 11px;
  border-radius: 5px;
}

.measure-edit-form.inline.is-saving {
  opacity: 0.72;
}

.measure-edit-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.measure-edit-form input,
.measure-edit-form select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 7px 9px;
  font: inherit;
}

.cashflow-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
  margin-bottom: 16px;
}

.cashflow-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.cashflow-header p {
  margin-top: 5px;
  color: var(--muted);
}

.scenario-form {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 8px;
  align-items: end;
}

.scenario-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.scenario-form input {
  width: 96px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
}

.cashflow-summary,
.cashflow-table {
  margin-top: 12px;
}

.dcf-metrics-panel {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.dcf-control-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.dcf-control-badges span {
  border: 1px solid #bfd4ff;
  border-radius: 999px;
  background: #eef5ff;
  color: #174ea6;
  font-size: 12px;
  font-weight: 850;
  padding: 6px 10px;
  white-space: nowrap;
}

.dcf-control-note {
  margin-top: 10px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #f5f8ff;
  color: var(--muted);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}

.dcf-control-note strong {
  color: var(--ink);
}

.dcf-metrics-table {
  margin-top: 10px;
  border: 1px solid #d6e0ee;
  border-radius: 8px;
  overflow: auto;
  background: #fff;
}

.dcf-metrics-table table {
  width: max-content;
  min-width: 1040px;
  background: #fff;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.dcf-col-label {
  width: 260px;
}

.dcf-col-money {
  width: 130px;
}

.dcf-col-percent,
.dcf-col-factor {
  width: 78px;
}

.dcf-col-area {
  width: 100px;
}

.dcf-metrics-table th,
.dcf-metrics-table td {
  border-bottom: 1px solid #dbe4f0;
  padding: 8px 10px;
  font-size: 12px;
  text-transform: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.dcf-metrics-table thead th {
  border-bottom-color: #ccd8e8;
  background: #f6f8fb;
  color: #526176;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-align: right;
}

.dcf-metrics-table thead tr:first-child th {
  padding-bottom: 4px;
  color: #334155;
  font-size: 11px;
}

.dcf-metrics-table thead tr:nth-child(2) th {
  padding-top: 4px;
}

.dcf-metrics-table thead th:first-child {
  text-align: left;
}

.dcf-metrics-table tbody th {
  color: var(--ink);
  background: #fff;
  font-weight: 850;
  text-align: left;
}

.dcf-metrics-table tbody th small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 10px;
  font-weight: 750;
}

.dcf-metrics-table td {
  text-align: right;
  font-weight: 700;
  color: #111827;
}

.dcf-metrics-table tbody tr:last-child th,
.dcf-metrics-table tbody tr:last-child td {
  border-bottom: 0;
}

.dcf-metrics-table tbody tr:hover th,
.dcf-metrics-table tbody tr:hover td {
  background: #f8fbff;
}

.dcf-metrics-table .dcf-row-total th,
.dcf-metrics-table .dcf-row-total td {
  background: #f8fafc;
  font-weight: 900;
}

.dcf-metrics-table .dcf-row-measure th,
.dcf-metrics-table .dcf-row-measure td {
  background: #fffaf0;
}

.dcf-metrics-table .dcf-row-measure th {
  border-left: 3px solid #f59e0b;
  padding-left: 7px;
}

.dcf-metrics-table .dcf-row-tail th,
.dcf-metrics-table .dcf-row-tail td {
  background: #f7fbf9;
}

.dcf-metrics-table td:nth-child(2),
.dcf-metrics-table td:nth-child(4),
.dcf-metrics-table td:nth-child(7) {
  font-weight: 850;
}

.cashflow-table table {
  min-width: 680px;
}

.portfolio-cashflow-panel {
  margin-bottom: 16px;
}

.mini-cashflow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.mini-cashflow span {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 10px;
}

.mini-cashflow b {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.report-card .summary-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 16px 0;
}

.report-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.report-section h3 {
  margin-bottom: 10px;
}

.report-dcf-table table {
  min-width: 860px;
}

.report-toolbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.buttonlike {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  display: inline-flex;
  min-height: 34px;
  padding: 7px 10px;
  text-decoration: none;
}

.report-document {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #111827;
  padding: 22px;
}

.report-preview-frame {
  background: #e5e7eb;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  padding: 16px;
}

.report-preview-frame iframe {
  background: #fff;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  display: block;
  height: min(78vh, 1200px);
  margin: 0 auto;
  max-width: 1120px;
  width: 100%;
}

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

.report-export-panel article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.report-export-panel span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-export-panel strong {
  display: block;
  font-size: 20px;
  margin: 4px 0 8px;
}

.report-cover {
  border-left: 8px solid var(--blue);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.7fr);
  gap: 28px;
  margin-bottom: 22px;
  min-height: 220px;
  padding: 18px 0 18px 22px;
}

.report-cover > div:first-child {
  align-self: center;
}

.report-cover span,
.report-cover-grid span,
.report-kpis span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-cover h1 {
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: 0;
  line-height: 1.02;
  margin: 8px 0;
}

.report-cover p {
  color: var(--muted);
  font-size: 18px;
}

.report-cover-grid {
  align-self: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-cover-grid article,
.report-kpis article {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.report-cover-grid strong,
.report-kpis strong {
  display: block;
  font-size: 18px;
  margin-top: 4px;
}

.report-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

.report-note {
  background: #f8fafc;
  border-left: 3px solid var(--blue);
  border-radius: 0 6px 6px 0;
  color: var(--text);
  margin: 10px 0 14px;
  padding: 10px 12px;
}

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

.report-bars {
  display: grid;
  gap: 8px;
}

.report-bar-row {
  align-items: center;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 86px;
  gap: 10px;
}

.report-bar-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-bar-row div {
  background: #e5e7eb;
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
}

.report-bar-row span {
  background: var(--blue);
  display: block;
  height: 100%;
}

.report-bar-row span.good { background: #16a34a; }
.report-bar-row span.mid { background: #f59e0b; }
.report-bar-row span.bad { background: #dc2626; }

.report-bar-row b {
  text-align: right;
}

.report-compact-table table {
  font-size: 12px;
  min-width: 1120px;
}

.report-timeline {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.report-timeline-years {
  background: #f8fafc;
  display: grid;
  grid-template-columns: repeat(20, minmax(44px, 1fr));
}

.report-timeline-years span {
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  padding: 8px 4px;
  text-align: center;
}

.report-timeline-row {
  align-items: center;
  display: grid;
  grid-template-columns: 210px minmax(880px, 1fr);
  min-height: 38px;
}

.report-timeline-row strong {
  border-right: 1px solid var(--line);
  font-size: 12px;
  padding: 8px 10px;
}

.report-timeline-row > div {
  background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(5% - 1px), #dbeafe calc(5% - 1px), #dbeafe 5%);
  height: 100%;
  position: relative;
}

.report-timeline-row span {
  align-items: center;
  background: var(--blue);
  border-radius: 5px;
  color: white;
  display: flex;
  font-size: 11px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  min-width: 42px;
  padding: 0 6px;
  position: absolute;
  top: 7px;
}

.report-year-chart {
  align-items: end;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  display: flex;
  gap: 5px;
  min-height: 170px;
  overflow-x: auto;
  padding: 16px 8px 30px;
}

.report-year-bar {
  align-items: center;
  display: grid;
  flex: 0 0 42px;
  gap: 4px;
  justify-items: center;
}

.report-year-bar span {
  align-self: end;
  background: var(--blue);
  border-radius: 4px 4px 0 0;
  display: block;
  width: 24px;
}

.report-year-bar b,
.report-year-bar small {
  color: var(--muted);
  font-size: 10px;
}

.photo-matrix {
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  grid-template-columns: 90px repeat(4, minmax(64px, 1fr));
  margin: 12px 0;
  overflow: hidden;
}

.photo-matrix > * {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 8px;
  text-align: center;
}

.photo-matrix strong {
  background: #f8fafc;
}

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

.report-text-form label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.report-text-form textarea {
  min-height: 120px;
  resize: vertical;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 16px;
  align-items: start;
}

.admin-grid .detail-panel {
  position: sticky;
  top: 20px;
}

.admin-grid table {
  min-width: 720px;
}

@media (max-width: 1180px) {
  .product-shell,
  .portfolio-grid,
  .analysis-view,
  .photo-view,
  .object-hero,
  .object-hero.compact,
  .admin-grid,
  .report-cover,
  .report-grid-2,
  .report-export-panel,
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .object-switcher {
    max-height: 260px;
  }

  .admin-grid .detail-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .main {
    padding: 16px;
  }

  .topbar,
  .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .search {
    width: 100%;
  }

  .photo-grid,
  .summary-strip,
  .report-card .summary-strip,
  .report-kpis,
  .report-cover-grid,
  .measure-edit-form,
  .cashflow-header,
  .scenario-form,
  .mini-cashflow {
    grid-template-columns: 1fr;
  }

  .scenario-form input {
    width: 100%;
  }

  .edit-form {
    grid-template-columns: 1fr;
  }
}

/* 2026 product redesign layer: bright SaaS analytics UI */
:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-strong: #eef3fa;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --surface-soft: #f8fafc;
  --surface-tint: #eef6ff;
  --ink: #101828;
  --text: #101828;
  --muted: #667085;
  --muted-2: #8a95a6;
  --line: #e4eaf2;
  --line-strong: #cad5e4;
  --blue: #1f66ff;
  --blue-soft: #e9f1ff;
  --green: #20c975;
  --lime: #9be043;
  --violet: #7c5cff;
  --orange: #ff9f1c;
  --amber: #f7b731;
  --red: #ef4444;
  --nav: #f9fbfe;
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 30px;
  --shadow-sm: 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow: 0 22px 70px rgba(16, 24, 40, 0.1);
  --shadow-ring: 0 0 0 4px rgba(31, 102, 255, 0.12);
  font-family: Arial, sans-serif;
}

html {
  min-width: 0;
  background: var(--bg);
  font-family: Arial, sans-serif;
  overflow-x: hidden;
}

body {
  min-width: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(31, 102, 255, 0.12), transparent 28vw),
    radial-gradient(circle at 88% 4%, rgba(155, 224, 67, 0.12), transparent 26vw),
    linear-gradient(135deg, #f8fbff 0%, #f2f6fb 48%, #fbfcff 100%);
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(31, 102, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 102, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.62), transparent 72%);
}

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

button,
.buttonlike {
  min-height: 42px;
  border: 1px solid rgba(202, 213, 228, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 2px 0 rgba(16, 24, 40, 0.02);
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

button:hover,
.buttonlike:hover {
  border-color: rgba(31, 102, 255, 0.42);
  box-shadow: 0 12px 26px rgba(31, 102, 255, 0.1);
  transform: translateY(-1px);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 0;
  border-color: var(--blue) !important;
  box-shadow: var(--shadow-ring) !important;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.loading-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 190px;
}

.loading-button.is-loading {
  opacity: 0.9;
}

.loading-button.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.primary,
.buttonlike.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue), #14b8ff);
  color: #fff;
  box-shadow: 0 16px 32px rgba(31, 102, 255, 0.24);
}

.danger {
  border-color: #ffd5d5;
  background: #fff6f6;
  color: #b42318;
}

.ghost,
.outline,
.small.ghost {
  background: rgba(255, 255, 255, 0.68);
}

.small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.link-button {
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--blue);
  padding: 0;
}

.product-shell {
  width: 100%;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 0;
  min-height: 100vh;
}

.sidebar {
  top: 16px;
  height: calc(100vh - 32px);
  margin: 16px 0 16px 16px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.9)),
    linear-gradient(135deg, rgba(31, 102, 255, 0.08), rgba(32, 201, 117, 0.06));
  color: var(--ink);
  box-shadow: var(--shadow);
  padding: 18px;
  overflow: hidden;
}

.brand {
  margin-bottom: 22px;
  padding: 8px 6px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, var(--blue), var(--violet) 54%, var(--green));
  box-shadow: 0 16px 34px rgba(31, 102, 255, 0.28);
  color: #fff;
  letter-spacing: 0;
}

.brand strong {
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand span,
.object-switcher > span,
.user-pill small {
  color: var(--muted);
}

nav {
  gap: 7px;
  margin-bottom: 22px;
}

.nav-item,
.sidebar-footer button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: #3f4d63;
  font-weight: 850;
  padding: 0 12px;
}

.nav-item:hover,
.sidebar-footer button:hover {
  background: #fff;
  border-color: var(--line);
  color: var(--blue);
  transform: translateY(-1px);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(31, 102, 255, 0.14), rgba(32, 201, 117, 0.1));
  color: #0f3ea3;
  border-color: rgba(31, 102, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 12px 28px rgba(31, 102, 255, 0.08);
}

.nav-item span {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 10px;
}

.nav-item.active span {
  background: var(--blue);
  color: #fff;
}

.mobile-logout-nav {
  display: none;
}

.object-switcher {
  gap: 10px;
  padding-right: 2px;
  scrollbar-width: thin;
}

.object-button {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 13px 14px;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
}

.object-button:hover {
  background: #fff;
}

.object-button.active {
  border-color: rgba(31, 102, 255, 0.38);
  background: linear-gradient(135deg, #ffffff, #eef6ff);
  box-shadow: 0 12px 28px rgba(31, 102, 255, 0.12);
}

.object-button span {
  color: var(--muted);
}

.sidebar-footer {
  gap: 12px;
  padding-top: 16px;
}

.user-pill {
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.user-pill > span {
  background: linear-gradient(135deg, #e9f1ff, #effaf4);
  color: var(--blue);
}

.main {
  width: 100%;
  min-width: 0;
  padding: 24px clamp(18px, 3vw, 42px) 44px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: -8px 0 22px;
  padding: 14px 0 18px;
  backdrop-filter: blur(18px);
}

.breadcrumbs {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  font-size: 19px;
  line-height: 1.2;
}

h3 {
  font-size: 15px;
}

.top-actions {
  align-items: center;
  gap: 10px;
}

.search,
.auth-form input,
.portfolio-select-label select,
.edit-form input,
.edit-form textarea,
.edit-form select,
.measure-edit-form input,
.measure-edit-form select,
.scenario-form input,
.report-text-form textarea,
.photo-upload-form input,
select,
textarea {
  min-height: 44px;
  border: 1px solid rgba(202, 213, 228, 0.95);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.search {
  width: min(360px, 38vw);
  padding: 0 14px;
}

.search span {
  color: var(--blue);
  font-weight: 850;
}

.search input {
  background: transparent;
}

.panel,
.detail-panel,
.object-hero,
.kpi-grid article,
.auth-card,
.report-document,
.report-export-panel article,
.bundle-card,
.summary-strip article,
.cashflow-panel,
.hint-box,
.component-remove-panel,
.photo-quality-panel,
.photo-workflow article,
.photo-empty-state,
.photo-card,
.batch-review,
.photo-filter-notice,
.photo-model-context,
.report-preview-frame {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel,
.detail-panel {
  padding: clamp(16px, 2vw, 24px);
}

.panel-title {
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-subtitle {
  color: var(--muted);
  font-size: 14px;
}

.kpi-grid {
  gap: 16px;
  margin-bottom: 18px;
}

.kpi-grid article {
  position: relative;
  overflow: hidden;
  min-height: 146px;
  padding: 20px;
}

.kpi-grid article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--violet), var(--orange));
  opacity: 0.9;
}

.kpi-grid article::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 90px;
  height: 32px;
  border-radius: 999px 999px 10px 10px;
  background:
    linear-gradient(135deg, transparent 0 20%, rgba(31, 102, 255, 0.18) 20% 32%, transparent 32% 44%, rgba(32, 201, 117, 0.18) 44% 62%, transparent 62% 74%, rgba(124, 92, 255, 0.18) 74%),
    linear-gradient(180deg, rgba(31, 102, 255, 0.08), transparent);
}

.kpi-grid span,
.kpi-grid small,
.panel-title span,
dt {
  color: var(--muted);
}

.kpi-grid span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.kpi-grid strong {
  margin: 10px 0 5px;
  font-size: clamp(27px, 3vw, 38px);
  letter-spacing: 0;
}

.portfolio-grid,
.analysis-view,
.photo-view,
.admin-grid,
.report-grid-2,
.report-export-panel {
  gap: 18px;
}

.portfolio-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.75fr);
}

.bar-board {
  height: clamp(240px, 30vw, 340px);
  border: 0;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  box-shadow: inset 0 0 0 1px var(--line);
}

.bar-board span {
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, #7c5cff, var(--blue) 58%, #14b8ff);
  box-shadow: 0 10px 24px rgba(31, 102, 255, 0.22);
}

.horizontal-bars div {
  grid-template-columns: minmax(88px, 120px) 1fr 42px;
}

.horizontal-bars div div {
  height: 18px;
  background: #eef3f9;
}

.horizontal-bars i,
.report-bar-row span {
  background: linear-gradient(90deg, var(--green), var(--lime), var(--orange));
}

.table-scroll,
.dcf-metrics-table {
  max-width: 100%;
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  border-bottom: 1px solid #edf1f6;
  padding: 14px 16px;
}

th {
  background: #f7faff;
  color: #667085;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

tbody tr {
  transition: background 0.14s ease, box-shadow 0.14s ease;
}

tbody tr:hover {
  background: #f9fbff;
}

tr.selected {
  background: #edf5ff;
  outline: 2px solid rgba(31, 102, 255, 0.34);
}

.excel-analysis-table {
  min-width: 1880px;
  font-size: 11px;
}

.excel-analysis-table th {
  background: #f8fbff;
  color: #536176;
}

.excel-analysis-table td {
  color: #111827;
}

.excel-analysis-table .excel-input input,
.measure-edit-form.inline input,
.measure-edit-form.inline select {
  border-radius: 10px;
  border-color: #d7e0ed;
  background: #fff;
}

.zn-chip,
.assessment-chip,
.priority,
.override-badge,
.gantt-plan-chip,
.dcf-control-badges span,
.photo-status {
  border-radius: 999px;
  font-weight: 900;
}

.object-hero {
  grid-template-columns: minmax(200px, 270px) minmax(0, 1fr) auto;
  gap: 24px;
  padding: 22px;
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.9)),
    linear-gradient(135deg, rgba(31, 102, 255, 0.1), rgba(32, 201, 117, 0.08));
}

.object-hero.compact {
  grid-template-columns: 150px minmax(0, 1fr) auto;
}

.building-image {
  height: 155px;
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 18px 36px rgba(31, 102, 255, 0.12);
}

.object-facts div,
.detail-list div {
  grid-template-columns: minmax(118px, 0.42fr) minmax(0, 1fr);
}

.segmented,
.tabs,
.photo-analysis-tabs {
  border: 1px solid rgba(202, 213, 228, 0.95);
  border-radius: 999px;
  background: #f7faff;
  padding: 4px;
  gap: 4px;
  overflow: visible;
}

.segmented button,
.tabs button,
.photo-analysis-tabs button {
  min-height: 34px;
  border-radius: 999px;
}

.segmented .active,
.tabs .active,
.photo-analysis-tabs button.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 8px 18px rgba(31, 102, 255, 0.1);
}

.detail-header {
  align-items: flex-start;
}

.gauge {
  width: 164px;
  height: 164px;
  background: conic-gradient(var(--blue) 0 var(--score), #e9eef6 var(--score) 100%);
}

.gauge::after {
  inset: 18px;
}

.edit-form,
.portfolio-create-form,
.member-add-form,
.component-remove-panel,
.cashflow-panel {
  border-radius: 20px;
  background: linear-gradient(180deg, #fbfdff, #ffffff);
}

.edit-form label,
.measure-edit-form label,
.scenario-form label,
.report-text-form label,
.auth-form label,
.portfolio-select-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.checkbox-row input {
  accent-color: var(--blue);
}

.photo-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.photo-upload-form {
  border: 1px dashed rgba(31, 102, 255, 0.32);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(31, 102, 255, 0.08), rgba(32, 201, 117, 0.07)),
    #ffffff;
  padding: 18px;
}

.photo-card {
  overflow: hidden;
  padding: 12px;
}

.photo-card.selected {
  border-color: rgba(31, 102, 255, 0.52);
  box-shadow: 0 0 0 4px rgba(31, 102, 255, 0.12), var(--shadow-sm);
}

.photo-card img,
.photo-card .photo-art,
.photo-preview img,
.photo-preview .photo-art {
  border-radius: 18px;
}

.photo-workflow,
.photo-quality-panel,
.batch-review {
  border-radius: 24px;
}

.photo-workflow article {
  box-shadow: none;
}

.photo-analysis-error,
.form-error {
  border-radius: 18px;
  border-color: #ffd0d0;
  background: #fff7f7;
}

.measure-overview,
.timeline,
.measure-gantt {
  max-width: 100%;
}

.measure-gantt {
  border-radius: 24px;
  border: 1px solid var(--line);
  overflow: auto;
  background: #fff;
}

.gantt-row {
  background: #fff;
}

.gantt-meta,
.gantt-plan,
.gantt-quarter,
.gantt-drop,
.gantt-total-cell {
  border-color: #edf1f6;
}

.gantt-meta,
.gantt-plan {
  background: rgba(255, 255, 255, 0.96);
}

.gantt-bar {
  min-height: 34px;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.priority-hoch {
  background: linear-gradient(90deg, #ef4444, #ff8a4c);
}

.priority-mittel {
  background: linear-gradient(90deg, var(--blue), #14b8ff);
}

.priority-tief {
  background: linear-gradient(90deg, #16a34a, var(--lime));
}

.report-document {
  padding: clamp(18px, 3vw, 34px);
}

.report-cover {
  border-left: 0;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(31, 102, 255, 0.1), rgba(124, 92, 255, 0.08)),
    #fff;
  padding: 26px;
}

.report-cover h1 {
  letter-spacing: 0;
}

.report-cover-grid article,
.report-kpis article {
  border-radius: 18px;
  background: #fff;
}

.report-preview-frame {
  padding: 18px;
  background: linear-gradient(180deg, #eef3f9, #f8fafc);
}

.report-preview-frame iframe {
  border-radius: 18px;
}

.auth-gate {
  background:
    radial-gradient(circle at 20% 18%, rgba(31, 102, 255, 0.16), transparent 32vw),
    radial-gradient(circle at 80% 10%, rgba(32, 201, 117, 0.14), transparent 28vw),
    linear-gradient(135deg, #f8fbff, #eef4fb);
}

.auth-card {
  border-radius: 30px;
  padding: 34px;
}

.empty-state {
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .product-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: auto;
    margin: 0;
    border-width: 0 0 1px;
    border-radius: 0 0 28px 28px;
    padding: 12px clamp(14px, 3vw, 24px);
  }

  .brand {
    margin-bottom: 10px;
  }

  .sidebar nav {
    display: flex;
    gap: 8px;
    margin: 0;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-height: 42px;
    padding: 0 14px;
  }

  .object-switcher,
  .sidebar-footer {
    display: none;
  }

  .main {
    padding-top: 22px;
  }

  .topbar {
    position: static;
    margin-top: 0;
    padding-top: 0;
  }

  .portfolio-grid,
  .analysis-view,
  .photo-view,
  .object-hero,
  .object-hero.compact,
  .admin-grid,
  .report-cover,
  .report-grid-2,
  .report-export-panel,
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .building-image {
    min-height: 150px;
  }
}

@media (max-width: 900px) {
  .kpi-grid,
  .summary-strip,
  .report-card .summary-strip,
  .report-kpis,
  .report-cover-grid,
  .mini-cashflow,
  .admin-access-grid,
  .portfolio-management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .search {
    width: min(100%, 520px);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  .main {
    padding: 16px 12px 96px;
  }

  .sidebar {
    border-radius: 0 0 24px 24px;
    padding: 10px 12px;
  }

  .brand {
    padding: 4px 2px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .brand span {
    display: none;
  }

  .sidebar nav {
    margin-left: -4px;
    margin-right: -4px;
    padding: 2px 4px 6px;
  }

  .nav-item {
    min-height: 42px;
    border-radius: 999px;
    font-size: 13px;
  }

  .nav-item span {
    display: none;
  }

  h1 {
    font-size: clamp(28px, 9vw, 36px);
  }

  .top-actions,
  .panel-title,
  .cashflow-header,
  .report-toolbar,
  .measure-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions > *,
  .panel-title > *,
  .report-toolbar-actions,
  .condition-actions,
  .segmented,
  .tabs {
    width: 100%;
  }

  .top-actions button,
  .condition-actions button,
  .report-toolbar-actions button,
  .report-toolbar-actions a {
    width: 100%;
    justify-content: center;
  }

  .search,
  .top-portfolio-picker {
    width: 100%;
  }

  .kpi-grid,
  .photo-grid,
  .summary-strip,
  .report-card .summary-strip,
  .report-kpis,
  .report-cover-grid,
  .mini-cashflow,
  .portfolio-management-grid,
  .admin-access-grid,
  .report-export-panel,
  .scenario-form,
  .member-row,
  .member-add-form,
  .portfolio-create-form {
    grid-template-columns: 1fr;
  }

  .panel,
  .detail-panel,
  .object-hero,
  .kpi-grid article,
  .auth-card,
  .report-document {
    border-radius: 22px;
  }

  .object-hero,
  .object-hero.compact {
    padding: 16px;
  }

  .object-facts div,
  .detail-list div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .edit-form,
  .measure-edit-form {
    grid-template-columns: 1fr !important;
  }

  .table-scroll {
    margin-inline: -2px;
  }

  table:not(.excel-analysis-table):not(.dcf-metrics-table table) {
    min-width: 680px;
  }

  .excel-analysis-table {
    min-width: 1480px;
  }

  .photo-upload-form {
    grid-template-columns: 1fr;
  }

  .report-cover {
    padding: 18px;
  }

  .report-timeline,
  .report-year-chart,
  .measure-gantt {
    overflow-x: auto;
  }
}

@media (max-width: 420px) {
  .main {
    padding-left: 10px;
    padding-right: 10px;
  }

  .panel,
  .detail-panel,
  .kpi-grid article,
  .object-hero {
    padding: 14px;
  }

  .nav-item {
    padding: 0 12px;
  }

  .segmented,
  .tabs {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

  .segmented button,
  .tabs button {
    width: 100%;
  }

  .bar-board {
    grid-template-columns: repeat(5, minmax(34px, 1fr));
    height: 260px;
    overflow-x: auto;
  }

  .horizontal-bars div,
  .report-bar-row {
    grid-template-columns: 1fr;
  }
}

/* Reference-led refinement: crisp white SaaS command center */
:root {
  --bg: #fbfbfa;
  --bg-strong: #f5f5f3;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-soft: #f8f8f7;
  --surface-tint: #f3f8df;
  --ink: #151515;
  --text: #151515;
  --muted: #6f7378;
  --muted-2: #a1a5aa;
  --line: #e9e9e6;
  --line-strong: #dbdbd7;
  --blue: #2563eb;
  --blue-soft: #eef4ff;
  --green: #9fdb1d;
  --lime: #b9ef28;
  --violet: #7c5cff;
  --orange: #ff9f1c;
  --amber: #ffd43b;
  --red: #e5484d;
  --nav: #ffffff;
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 18px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(17, 17, 17, 0.04), 0 14px 34px rgba(17, 17, 17, 0.035);
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.05), 0 20px 48px rgba(17, 17, 17, 0.055);
  --shadow-ring: 0 0 0 4px rgba(185, 239, 40, 0.28);
  font-family: Arial, sans-serif;
}

html,
body {
  background: var(--bg);
  font-family: Arial, sans-serif;
}

body {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

body::before {
  display: none;
}

.product-shell {
  display: grid;
  grid-template-columns: 316px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  margin: 0;
  padding: 22px 14px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  color: var(--ink);
  overflow: hidden;
}

.brand {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: 0 0 34px;
  padding: 0 2px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #050505;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.08em;
}

.brand strong {
  display: block;
  color: #151515;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.1;
}

.brand span {
  margin-top: 4px;
  color: #5f6368;
  font-size: 13px;
  font-weight: 650;
}

.sidebar nav {
  display: grid;
  gap: 10px;
  margin: 0 0 30px;
}

.nav-item,
.sidebar-footer button {
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: #34373b;
  gap: 14px;
  padding: 0 8px;
  font-size: 15px;
  font-weight: 760;
  transform: none;
}

.nav-item:hover,
.sidebar-footer button:hover {
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
  color: #111;
  transform: none;
}

.nav-item span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #ededec;
  color: #404348;
  font-size: 11px;
  font-weight: 900;
}

.nav-item.active {
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
  color: #101010;
}

.nav-item.active span {
  background: #111;
  color: var(--lime);
  box-shadow: 0 0 0 3px rgba(185, 239, 40, 0.24);
}

.object-switcher {
  gap: 8px;
  padding: 0;
  overflow: auto;
  scrollbar-width: thin;
}

.object-switcher > span {
  margin: 4px 0 4px;
  color: #4e5359;
  font-size: 14px;
  font-weight: 760;
}

.object-button {
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  color: #171717;
  gap: 5px;
  padding: 12px 16px;
}

.object-button:hover {
  border-color: #dadad6;
  background: #fafafa;
  box-shadow: var(--shadow-sm);
}

.object-button.active {
  border-color: #dededb;
  background: linear-gradient(135deg, #eeeeec, #ffffff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.object-button strong {
  color: #171717;
  font-size: 13px;
  font-weight: 850;
}

.object-button span {
  color: #6f7378;
  font-size: 12px;
}

.sidebar-footer {
  gap: 0;
  margin: auto -14px 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.sidebar-footer button {
  min-height: 58px;
  border-radius: 0;
  padding: 0 22px;
}

.user-pill {
  min-height: 78px;
  border-top: 1px solid var(--line);
  padding: 14px 18px;
  color: #151515;
}

.user-pill > span {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #eeeeec;
  color: #151515;
  font-weight: 850;
}

.user-pill strong {
  font-size: 14px;
}

.user-pill small {
  color: #6f7378;
}

.main {
  padding: 34px clamp(28px, 3.3vw, 58px) 54px;
  background: #fbfbfa;
}

.topbar {
  position: static;
  align-items: start;
  margin: 0 0 40px;
  padding: 0;
  backdrop-filter: none;
}

.breadcrumbs {
  margin: 6px 0 14px;
  color: #25282c;
  font-size: 14px;
  font-weight: 850;
}

h1 {
  color: #050505;
  font-family: Arial, sans-serif;
  font-size: clamp(48px, 5.2vw, 76px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.94;
}

h1::after {
  content: ".";
  color: var(--lime);
  margin-left: 3px;
  font-weight: 900;
}

h2 {
  color: #171717;
  font-size: 21px;
  font-weight: 850;
  line-height: 1.2;
}

h3 {
  color: #171717;
  font-size: 16px;
  font-weight: 850;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

button,
.buttonlike {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.035);
  color: #151515;
  font-size: 14px;
  font-weight: 850;
  padding: 0 18px;
  transform: none;
}

button:hover,
.buttonlike:hover {
  border-color: #d7d7d2;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transform: none;
}

.primary,
.buttonlike.primary {
  border-color: transparent;
  background: var(--lime);
  box-shadow: none;
  color: #151515;
}

.primary:hover,
.buttonlike.primary:hover {
  background: #c7f23b;
  box-shadow: 0 12px 30px rgba(185, 239, 40, 0.28);
}

.danger {
  border-color: #f2cece;
  background: #fff8f8;
  color: #b42318;
}

.small {
  min-height: 40px;
  border-radius: 9px;
  padding: 0 14px;
  font-size: 13px;
}

.outline,
.ghost,
.small.ghost {
  background: #fff;
}

.search,
.auth-form input,
.portfolio-select-label select,
.edit-form input,
.edit-form textarea,
.edit-form select,
.measure-edit-form input,
.measure-edit-form select,
.scenario-form input,
.report-text-form textarea,
.photo-upload-form input,
select,
textarea {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(17, 17, 17, 0.015);
  color: #151515;
}

.search {
  width: min(430px, 34vw);
  padding: 0 16px;
}

.search span {
  position: relative;
  width: 18px;
  overflow: hidden;
  color: transparent;
}

.search span::before {
  content: "⌕";
  color: #6f7378;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.search input::placeholder {
  color: #777b80;
}

.panel,
.detail-panel,
.object-hero,
.kpi-grid article,
.auth-card,
.report-document,
.report-export-panel article,
.bundle-card,
.summary-strip article,
.cashflow-panel,
.hint-box,
.component-remove-panel,
.photo-quality-panel,
.photo-workflow article,
.photo-empty-state,
.photo-card,
.batch-review,
.photo-filter-notice,
.photo-model-context,
.report-preview-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.panel,
.detail-panel {
  padding: 26px;
}

.panel-title {
  align-items: start;
  gap: 16px;
  margin-bottom: 22px;
}

.panel-subtitle {
  color: #73777d;
  font-size: 14px;
}

.portfolio-management-panel {
  display: none;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 28px;
}

.kpi-grid article {
  min-height: 148px;
  padding: 30px 28px 24px 128px;
  overflow: hidden;
}

.kpi-grid article::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 32px;
  width: 72px;
  height: 72px;
  border: 1px dashed #dcdeda;
  border-radius: 50%;
  background: #fbfbfa;
  opacity: 1;
}

.kpi-grid article::after {
  content: "";
  position: absolute;
  left: 53px;
  top: 58px;
  width: 22px;
  height: 22px;
  border: 2px solid #44484d;
  border-top-color: transparent;
  border-left-color: transparent;
  border-radius: 6px;
  background: transparent;
  transform: rotate(-45deg);
}

.kpi-grid span {
  color: #53575d;
  font-size: 13px;
  font-weight: 760;
  text-transform: none;
}

.kpi-grid strong {
  margin: 8px 0 4px;
  color: #151515;
  font-size: clamp(26px, 2vw, 34px);
  font-weight: 550;
  letter-spacing: -0.03em;
}

.kpi-grid small {
  color: #75797f;
  font-size: 14px;
}

.portfolio-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(420px, 0.9fr);
  gap: 28px;
}

.analysis-view,
.photo-view,
.admin-grid,
.report-grid-2,
.report-export-panel {
  gap: 28px;
}

.bar-board {
  height: 250px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  gap: 18px;
  padding: 28px 10px 18px;
  box-shadow: none;
}

.bar-board span {
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #d9d9d7, #c9c9c7);
  box-shadow: none;
}

.bar-board b,
.bar-board small {
  color: #686c72;
  font-size: 13px;
  font-weight: 760;
}

.horizontal-bars {
  gap: 23px;
  padding: 18px 2px;
}

.horizontal-bars div {
  grid-template-columns: 128px minmax(0, 1fr) 32px;
  gap: 16px;
}

.horizontal-bars div div {
  height: 19px;
  border-radius: 999px;
  background: #eeeeec;
}

.horizontal-bars i,
.report-bar-row span {
  background: linear-gradient(90deg, var(--lime), #d8ff5a);
}

.table-scroll,
.dcf-metrics-table {
  max-width: 100%;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  overflow: auto;
}

table {
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 15px 16px;
}

th {
  background: #fff;
  color: #5f6368;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: #fbfbfa;
}

tr.selected {
  background: #f6fbdf;
  outline: 0;
}

td small {
  color: #73777d;
}

.dot {
  width: 13px;
  height: 13px;
  margin-right: 8px;
}

.green {
  background: var(--lime);
}

.amber {
  background: #ffd43b;
}

.excel-analysis-table {
  min-width: 1860px;
  font-size: 11px;
}

.excel-analysis-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fbfbfa;
  color: #5f6368;
  border-bottom-color: var(--line-strong);
}

.excel-analysis-table td {
  color: #171717;
}

.excel-analysis-table .excel-input input,
.measure-edit-form.inline input,
.measure-edit-form.inline select {
  border-radius: 7px;
  border-color: #ddddda;
}

.zn-chip.ok,
.assessment-chip.ok,
.assessment-score.ok {
  background: #eef9cd;
  color: #3f6212;
}

.zn-chip.medium,
.assessment-chip.medium,
.assessment-score.medium {
  background: #f3fbcb;
  color: #586a00;
}

.zn-chip.warn,
.assessment-chip.warn,
.assessment-score.warn {
  background: #fff4c2;
  color: #8a5a00;
}

.zn-chip.danger,
.assessment-chip.danger,
.assessment-score.danger {
  background: #ffe1dd;
  color: #9f1f18;
}

.object-hero {
  grid-template-columns: 240px minmax(0, 1fr) auto;
  gap: 28px;
  margin-bottom: 28px;
  padding: 26px;
  background: #fff;
}

.object-hero.compact {
  grid-template-columns: 150px minmax(0, 1fr) auto;
}

.building-image {
  height: 152px;
  border-radius: 16px;
  box-shadow: none;
  background:
    linear-gradient(135deg, rgba(185, 239, 40, 0.25), rgba(255, 255, 255, 0.2)),
    linear-gradient(160deg, #d7d8d5 0 20%, #f5f5f2 20% 30%, #c7cacd 30% 45%, #f7f7f5 45% 55%, #aeb4bb 55% 70%, #e0e2e2 70%);
}

.building-image::after {
  border-radius: 6px;
}

.object-facts div,
.detail-list div {
  grid-template-columns: 150px 1fr;
}

dt {
  color: #73777d;
}

dd {
  color: #171717;
  font-weight: 760;
}

.segmented,
.tabs,
.photo-analysis-tabs {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f7f5;
  padding: 4px;
}

.segmented button,
.tabs button,
.photo-analysis-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.segmented .active,
.tabs .active,
.photo-analysis-tabs button.active {
  background: #fff;
  color: #151515;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.08);
}

.detail-panel {
  align-self: start;
}

.detail-header span {
  color: #73777d;
  font-weight: 850;
}

.gauge {
  background: conic-gradient(var(--lime) 0 var(--score), #eeeeec var(--score) 100%);
}

.edit-form,
.portfolio-create-form,
.member-add-form,
.component-remove-panel,
.cashflow-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfbfa;
}

.photo-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.photo-upload-form {
  border: 1px dashed #d2d7c3;
  border-radius: 18px;
  background: #fbfdf4;
  padding: 18px;
}

.photo-card {
  border-radius: 18px;
  box-shadow: none;
}

.photo-card.selected {
  border-color: var(--lime);
  box-shadow: 0 0 0 4px rgba(185, 239, 40, 0.22);
}

.photo-card img,
.photo-card .photo-art,
.photo-preview img,
.photo-preview .photo-art {
  border-radius: 14px;
}

.photo-workflow,
.photo-quality-panel,
.batch-review {
  border-radius: 18px;
}

.photo-status,
.priority,
.zn-chip,
.assessment-chip,
.override-badge,
.gantt-plan-chip,
.dcf-control-badges span {
  border-radius: 999px;
  font-weight: 850;
}

.measure-gantt {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  overflow: auto;
}

.gantt-meta,
.gantt-plan {
  background: #fff;
}

.gantt-quarter,
.gantt-drop,
.gantt-total-cell,
.gantt-meta,
.gantt-plan {
  border-color: var(--line);
}

.gantt-bar {
  min-height: 32px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(17, 17, 17, 0.16);
}

.priority-hoch {
  background: #e5484d;
}

.priority-mittel {
  background: #2563eb;
}

.priority-tief {
  background: #8dcc1a;
}

.cashflow-panel,
.dcf-control-note {
  background: #fbfbfa;
}

.report-document {
  padding: 34px;
}

.report-cover {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fbfbfa;
  padding: 28px;
}

.report-cover h1 {
  font-size: clamp(42px, 5vw, 68px);
}

.report-cover-grid article,
.report-kpis article,
.report-export-panel article {
  border-radius: 16px;
  background: #fff;
}

.report-preview-frame {
  background: #f2f2f0;
}

.report-preview-frame iframe {
  border-radius: 12px;
}

.report-card p,
.report-preview p {
  color: #5f6368;
}

.summary-strip {
  gap: 14px;
}

.summary-strip article {
  border-radius: 16px;
  background: #fbfbfa;
  box-shadow: none;
}

.auth-gate {
  background: #fbfbfa;
}

.auth-card {
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.empty-state {
  color: #777b80;
}

@media (max-width: 1180px) {
  .product-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: auto;
    padding: 14px 18px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .brand {
    grid-template-columns: 44px minmax(0, 1fr);
    margin-bottom: 14px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 25px;
  }

  .sidebar nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0;
    padding-bottom: 2px;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 14px 0 8px;
  }

  .nav-item span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
  }

  .object-switcher,
  .sidebar-footer {
    display: none;
  }

  .main {
    padding: 28px clamp(18px, 4vw, 38px) 44px;
  }

  .topbar {
    margin-bottom: 28px;
  }

  .portfolio-grid,
  .analysis-view,
  .photo-view,
  .object-hero,
  .object-hero.compact,
  .admin-grid,
  .report-cover,
  .report-grid-2,
  .report-export-panel {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .main {
    padding: 22px 12px 80px;
  }

  .brand {
    margin-bottom: 10px;
  }

  .brand span {
    display: block;
  }

  .sidebar nav {
    margin-inline: -6px;
    padding-inline: 6px;
  }

  .nav-item {
    min-height: 42px;
    font-size: 13px;
  }

  .nav-item span {
    display: grid;
    width: 28px;
    height: 28px;
    font-size: 10px;
  }

  .topbar,
  .top-actions,
  .panel-title,
  .cashflow-header,
  .report-toolbar,
  .measure-heading {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(42px, 14vw, 56px);
  }

  .search,
  .top-portfolio-picker,
  .top-actions > *,
  .panel-title > *,
  .condition-actions,
  .segmented,
  .tabs {
    width: 100%;
  }

  .kpi-grid,
  .photo-grid,
  .summary-strip,
  .report-card .summary-strip,
  .report-kpis,
  .report-cover-grid,
  .mini-cashflow,
  .admin-access-grid,
  .report-export-panel,
  .scenario-form,
  .member-row,
  .member-add-form,
  .portfolio-create-form {
    grid-template-columns: 1fr;
  }

  .kpi-grid article {
    min-height: 128px;
    padding: 22px 20px 20px 104px;
  }

  .kpi-grid article::before {
    left: 20px;
    top: 26px;
    width: 62px;
    height: 62px;
  }

  .kpi-grid article::after {
    left: 41px;
    top: 48px;
  }

  .panel,
  .detail-panel {
    padding: 18px;
  }

  .object-hero,
  .object-hero.compact {
    padding: 18px;
  }

  .object-facts div,
  .detail-list div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  table:not(.excel-analysis-table):not(.dcf-metrics-table table) {
    min-width: 680px;
  }

  .excel-analysis-table {
    min-width: 1480px;
  }
}

@media (max-width: 420px) {
  .main {
    padding-left: 10px;
    padding-right: 10px;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand span {
    font-size: 12px;
  }

  h1 {
    font-size: 40px;
  }

  .panel,
  .detail-panel,
  .object-hero,
  .kpi-grid article {
    border-radius: 16px;
  }

  .segmented,
  .tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .bar-board {
    grid-template-columns: repeat(5, minmax(42px, 1fr));
    overflow-x: auto;
  }
}

/* Final typography and tile shaping */
*,
*::before,
*::after {
  font-family: Arial, sans-serif;
}

.kpi-grid article,
.summary-strip article,
.report-export-panel article,
.bundle-card,
.photo-card,
.object-button,
.panel,
.detail-panel {
  position: relative;
}

.kpi-grid article {
  border-radius: 24px;
  border-color: #e7e7e3;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 248, 0.98)),
    #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(17, 17, 17, 0.04),
    0 18px 44px rgba(17, 17, 17, 0.055);
}

.kpi-grid article::before {
  border-style: solid;
  border-color: #e2e3df;
  background:
    radial-gradient(circle at 35% 30%, #ffffff 0 28%, transparent 29%),
    linear-gradient(145deg, #fbfbfa, #f0f1ee);
}

.kpi-grid article::after {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 0;
  background: none;
  color: #303338;
  content: "⌁";
  font-size: 29px;
  font-weight: 500;
  line-height: 1;
  transform: none;
}

.kpi-grid article:nth-child(2)::after {
  content: "$";
  left: 53px;
  top: 51px;
  font-size: 25px;
  font-weight: 700;
}

.kpi-grid article:nth-child(3)::after {
  content: "◇";
  left: 50px;
  top: 51px;
  font-size: 30px;
}

.kpi-grid article:nth-child(4)::after {
  content: "□";
  left: 52px;
  top: 51px;
  font-size: 27px;
}

.kpi-grid article > span::after,
.summary-strip article > span::after,
.report-export-panel article > span::after {
  content: "";
  display: block;
  width: 34px;
  height: 4px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--lime);
}

.summary-strip article,
.report-export-panel article,
.bundle-card {
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffffff, #fbfbfa);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.panel,
.detail-panel,
.object-hero,
.report-card,
.photo-card {
  border-radius: 24px;
}

.panel::before,
.detail-panel::before,
.report-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.panel-title h2::after {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  margin-top: 12px;
  border-radius: 999px;
  background: #d6f45a;
}

@media (max-width: 760px) {
  .kpi-grid article::after {
    left: 41px;
    top: 44px;
  }

  .kpi-grid article:nth-child(2)::after,
  .kpi-grid article:nth-child(3)::after,
  .kpi-grid article:nth-child(4)::after {
    left: 41px;
    top: 44px;
  }
}

/* Sidebar collapse overrides */
.product-shell.sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr) !important;
}

.product-shell.sidebar-collapsed .sidebar {
  width: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  border-right: 0 !important;
  overflow: hidden !important;
  opacity: 0;
  pointer-events: none;
}

.sidebar-toggle {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  height: 42px;
  margin: 0 0 10px;
  border-color: var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 0;
  box-shadow: var(--shadow-sm);
}

.sidebar-toggle:hover {
  border-color: #cfd4dc;
  background: #fbfbfa;
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.08);
}

.sidebar-toggle:focus-visible {
  outline: 3px solid rgba(185, 239, 40, 0.45);
  outline-offset: 2px;
}

.sidebar-toggle-bars,
.sidebar-toggle-bars::before,
.sidebar-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #151515;
  transition: transform 150ms ease, opacity 150ms ease, width 150ms ease;
}

.sidebar-toggle-bars {
  position: relative;
}

.sidebar-toggle-bars::before,
.sidebar-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.sidebar-toggle-bars::before {
  transform: translateY(-6px);
}

.sidebar-toggle-bars::after {
  transform: translateY(6px);
}

.sidebar-toggle:not(.is-collapsed) .sidebar-toggle-bars {
  background: transparent;
}

.sidebar-toggle:not(.is-collapsed) .sidebar-toggle-bars::before {
  transform: rotate(45deg);
}

.sidebar-toggle:not(.is-collapsed) .sidebar-toggle-bars::after {
  transform: rotate(-45deg);
}

.sidebar-toggle.is-collapsed .sidebar-toggle-bars::before {
  width: 14px;
}

.sidebar-toggle.is-collapsed .sidebar-toggle-bars::after {
  width: 10px;
}

.topbar > div:first-child {
  min-width: 0;
}

@media (max-width: 1180px) {
  .product-shell.sidebar-collapsed {
    grid-template-columns: 1fr !important;
  }
}

/* Workspace density overrides */
.product-shell.workspace-mode {
  grid-template-columns: 284px minmax(0, 1fr);
}

.main.workspace-mode {
  padding: 22px clamp(18px, 2vw, 34px) 38px;
}

.workspace-mode .topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.workspace-mode .topbar > div:first-child {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
}

.workspace-mode .sidebar-toggle {
  grid-row: 1 / span 2;
  margin: 0;
}

.workspace-mode .breadcrumbs {
  margin: 0;
  font-size: 12px;
}

.workspace-mode h1 {
  font-size: clamp(28px, 2.4vw, 42px);
  line-height: 1;
}

.workspace-mode .top-actions {
  margin-left: auto;
  gap: 8px;
}

.workspace-mode .top-actions button,
.workspace-mode .top-actions .buttonlike,
.workspace-mode .top-portfolio-picker select,
.workspace-mode .search,
.workspace-mode .search input {
  min-height: 38px;
}

.workspace-mode .search {
  width: min(320px, 26vw);
}

.compact-object-context,
.workspace-mode .object-hero.compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 16px;
  border-radius: 14px;
}

.compact-object-context .workflow-bar,
.workspace-mode .object-hero.compact .workflow-bar {
  margin-bottom: 2px;
}

.compact-object-context .workflow-object-header,
.workspace-mode .object-hero.compact .workflow-object-header {
  min-height: 0;
  padding: 10px 12px;
}

.compact-object-context h2,
.workspace-mode .object-hero.compact h2 {
  font-size: 18px;
}

.workspace-mode .workflow-bar {
  padding: 7px;
}

.workspace-mode .workflow-steps button {
  min-height: 42px;
  padding: 5px 7px;
}

.workspace-mode .workflow-steps button small {
  display: none;
}

.workspace-mode .panel,
.workspace-mode .detail-panel,
.workspace-mode .batch-review,
.workspace-mode .material-group,
.workspace-mode .material-toolbar,
.workspace-mode .photo-quality-panel,
.workspace-mode .photo-workflow article {
  border-radius: 14px;
}

.workspace-mode .panel,
.workspace-mode .detail-panel {
  padding: 16px;
}

.workspace-mode .panel-title {
  margin-bottom: 12px;
}

.workspace-mode .panel-title h2::after {
  display: none;
}

.workspace-mode .analysis-view {
  grid-template-columns: minmax(0, 1fr);
}

.workspace-mode .analysis-view .detail-panel {
  display: none;
}

.workspace-mode .object-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.workspace-mode .object-kpis article,
.portfolio-grid .kpi-grid article {
  min-height: 86px;
  padding: 16px 18px;
}

.workspace-mode .object-kpis article::before,
.workspace-mode .object-kpis article::after {
  display: none;
}

.workspace-mode .object-kpis strong {
  font-size: 24px;
}

.workspace-mode .table-panel {
  padding: 12px;
}

.workspace-mode .excel-analysis-table th,
.workspace-mode .excel-analysis-table td {
  padding: 8px 9px;
}

.workspace-mode .excel-analysis-table .excel-input input,
.workspace-mode .measure-edit-form.inline input,
.workspace-mode .measure-edit-form.inline select {
  min-height: 28px;
}

.portfolio-cashflow-panel {
  padding: 18px;
}

.portfolio-cashflow-panel .panel-title,
.portfolio-cashflow-panel .cashflow-panel .panel-title {
  margin-bottom: 10px;
}

.portfolio-cashflow-panel .dcf-metrics-panel {
  display: none;
}

.portfolio-grid .span-2 {
  grid-column: 1 / -1;
}

.portfolio-grid article:has(#portfolioRows) {
  grid-row: 1;
}

.portfolio-grid article:has(#budgetBars),
.portfolio-grid article:has(#portfolioBkpBars),
.portfolio-grid .report-preview {
  min-height: 0;
}

.portfolio-grid .bar-board {
  height: 170px;
}

.portfolio-grid table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.object-opening-panel {
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
}

.object-opening-copy ol {
  display: none;
}

.photo-view {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  gap: 14px;
}

.workspace-mode .photo-workflow,
.workspace-mode .photo-quality-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

.workspace-mode .photo-workflow article {
  flex: 1 1 190px;
  min-height: 56px;
  padding: 9px 12px;
}

.workspace-mode .photo-quality-panel > div {
  min-width: 220px;
}

.workspace-mode .photo-quality-panel ul {
  flex: 1 1 420px;
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
}

.workspace-mode .photo-quality-panel li {
  padding: 7px 9px;
}

.workspace-mode .photo-upload-form {
  grid-template-columns: minmax(170px, 0.8fr) minmax(220px, 1fr) minmax(180px, 0.6fr) auto;
  padding: 10px;
}

.workspace-mode .photo-analysis-tabs {
  padding: 4px;
}

.workspace-mode .batch-review {
  padding: 10px;
}

.workspace-mode .batch-review-filters {
  padding: 8px;
}

.workspace-mode .batch-review-row {
  padding: 6px 0;
}

.workspace-mode .photo-grid {
  gap: 12px;
}

.workspace-mode .photo-card img,
.workspace-mode .photo-card .photo-art {
  height: 126px;
}

.workspace-mode .photo-detail-actions {
  justify-content: flex-start;
}

.dense-toolbar {
  align-items: center;
}

.material-toolbar.dense-toolbar {
  grid-template-columns: minmax(190px, 0.9fr) minmax(360px, 1.4fr) auto;
  gap: 10px;
  margin-top: 0;
  padding: 10px;
}

.material-toolbar.dense-toolbar .material-stat-grid {
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  gap: 6px;
}

.material-toolbar.dense-toolbar .material-stat-grid div {
  padding: 8px 10px;
}

.material-toolbar.dense-toolbar .material-stat-grid strong {
  font-size: 17px;
}

.material-toolbar.dense-toolbar .material-filters {
  grid-column: 1 / -1;
}

.material-filters.dense-toolbar {
  grid-template-columns: minmax(130px, 0.6fr) minmax(220px, 1fr) minmax(220px, 1fr) auto;
}

.review-table {
  display: grid;
  overflow-x: auto;
}

.review-table-row {
  display: grid;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  min-width: 1180px;
}

.review-table-row.head {
  position: sticky;
  top: 0;
  z-index: 3;
  border-top: 0;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.material-table-row {
  grid-template-columns: 104px minmax(190px, 1fr) minmax(150px, 0.8fr) minmax(170px, 1fr) minmax(170px, 1fr) minmax(150px, 0.8fr) 74px minmax(220px, 1.2fr) minmax(360px, 1.6fr);
  padding: 7px 0;
}

.material-table-row .photo-status {
  margin: 0;
  justify-self: start;
}

.material-table-row input,
.material-table-row select,
.material-table-row textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 8px;
  background: #fff;
  font: inherit;
}

.material-table-row textarea {
  resize: vertical;
}

.material-component-name {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-source.compact {
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px;
  padding: 5px;
}

.material-source.compact img,
.material-source.compact .material-thumb-fallback {
  width: 46px;
  height: 34px;
}

.material-source.compact .linklike {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-table-row .material-card-actions {
  flex-wrap: nowrap;
  gap: 6px;
}

.material-table-row .material-card-actions .small {
  min-height: 34px;
  padding-inline: 10px;
}

.material-photo-review {
  display: grid;
  grid-template-columns: minmax(420px, 48%) minmax(420px, 1fr);
  gap: 14px;
  align-items: start;
}

.material-action-error {
  display: block;
  margin: 0 0 10px;
}

.material-summary-strip {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  margin-bottom: 12px;
}

.material-summary-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.material-summary-strip span,
.material-summary-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.material-summary-strip strong {
  display: block;
  font-size: 16px;
}

.material-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}

.material-summary-grid article {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
}

.material-summary-grid header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.material-summary-grid header b {
  border-radius: 7px;
  background: #eef9e8;
  color: #3f6212;
  padding: 3px 7px;
}

.material-summary-grid p,
.material-summary-grid small {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-summary-grid footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.material-summary-grid footer span {
  border-radius: 999px;
  background: #fff;
  padding: 3px 7px;
  text-transform: none;
}

.material-photo-stage,
.material-insight-list {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 12px;
}

.material-photo-stage {
  position: sticky;
  top: 72px;
}

.material-photo-stage > img,
.material-photo-fallback {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 8px;
  background: #f1f5f9;
  object-fit: cover;
}

.material-photo-caption,
.material-insight-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-top: 10px;
}

.material-photo-caption span,
.material-insight-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.material-photo-caption strong,
.material-insight-head strong {
  display: block;
  font-size: 18px;
}

.material-photo-stats {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.material-photo-stats li {
  min-width: 64px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 5px 7px;
  text-align: center;
}

.material-photo-stats b,
.material-photo-stats span {
  display: block;
}

.material-photo-stats span {
  color: var(--muted);
  font-size: 11px;
}

.material-photo-rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.material-photo-rail button {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: 58px;
  padding: 6px;
  text-align: left;
}

.material-photo-rail button.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(20, 94, 233, 0.14);
}

.material-photo-rail img,
.material-photo-rail button > span {
  grid-row: 1 / span 2;
  width: 46px;
  height: 40px;
  border-radius: 7px;
  background: #f1f5f9;
  object-fit: cover;
}

.material-photo-rail strong,
.material-photo-rail small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.material-insight-head {
  margin: 0 0 2px;
}

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

.material-insight-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.material-insight-card header strong,
.material-insight-card header small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-insight-card header strong {
  font-size: 16px;
}

.material-insight-card header small {
  color: var(--muted);
  font-size: 12px;
}

.material-insight-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.standard-badge,
.condition-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef5ff;
  color: #145ee9;
  font-size: 12px;
  font-weight: 850;
}

.condition-badge {
  background: #eef9e8;
  color: #3f6212;
}

.condition-badge.medium {
  background: #f0f9d8;
  color: #4d7c0f;
}

.condition-badge.warn {
  background: #fff3cd;
  color: #92400e;
}

.condition-badge.danger {
  background: #fee2e2;
  color: #991b1b;
}

.material-insight-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 8px;
}

.material-insight-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.material-insight-grid .span-all {
  grid-column: 1 / -1;
}

.material-insight-grid .wide {
  grid-column: span 1;
}

.material-insight-grid input,
.material-insight-grid select,
.material-insight-grid textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  padding: 6px 8px;
}

.material-insight-grid textarea {
  min-height: 54px;
  resize: vertical;
}

.measure-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.workspace-mode .measure-summary article {
  min-height: 70px;
  padding: 12px 14px;
}

.workspace-mode .measure-summary article > span::after {
  display: none;
}

.workspace-mode .cashflow-panel {
  padding: 10px;
}

.workspace-mode .dcf-metrics-panel .panel-title,
.workspace-mode .dcf-control-note {
  display: none;
}

.workspace-mode .dcf-metrics-table {
  max-height: 230px;
}

.workspace-mode .measure-overview {
  padding: 10px;
}

.workspace-mode .measure-gantt {
  --gantt-meta-width: 330px;
  --gantt-plan-width: 188px;
}

.workspace-mode .measure-bundle-panel {
  margin-top: 12px;
}

.workspace-mode .bundle-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.workspace-mode .report-toolbar,
.workspace-mode .workflow-warning {
  margin-bottom: 10px;
}

.workspace-mode .workflow-warning {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 9px 12px;
}

.workspace-mode .workflow-warning p {
  margin: 0;
}

.workspace-mode .report-card {
  padding: 14px;
}

.workspace-mode .report-preview-frame {
  padding: 8px;
}

.workspace-mode .report-preview-frame iframe {
  height: min(82vh, 1240px);
}

@media (max-width: 1180px) {
  .product-shell.workspace-mode {
    display: block;
  }

  .workspace-mode .topbar,
  .workspace-mode .topbar > div:first-child,
  .material-toolbar.dense-toolbar,
  .material-filters.dense-toolbar,
  .material-photo-review,
  .photo-view {
    grid-template-columns: 1fr;
  }

  .material-photo-stage {
    position: static;
  }

  .workspace-mode .topbar {
    display: grid;
  }

  .workspace-mode .top-actions {
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  .workspace-mode .topbar > div:first-child {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .workspace-mode .object-kpis,
  .workspace-mode .photo-quality-panel ul {
    grid-template-columns: 1fr 1fr;
  }

  .compact-object-context,
  .workspace-mode .object-hero.compact {
    grid-template-columns: 1fr;
  }
}

/* List-first workspace overrides */
.product-shell[data-active-view="condition"] .main,
.product-shell[data-active-view="measures"] .main {
  padding-top: 14px;
}

.product-shell[data-active-view="condition"] .topbar,
.product-shell[data-active-view="measures"] .topbar {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.product-shell[data-active-view="condition"] .topbar > div:first-child,
.product-shell[data-active-view="measures"] .topbar > div:first-child {
  display: grid;
  grid-template-columns: auto minmax(180px, max-content) auto;
  align-items: center;
  gap: 10px;
}

.product-shell[data-active-view="condition"] .breadcrumbs,
.product-shell[data-active-view="measures"] .breadcrumbs {
  margin: 0;
  overflow: hidden;
  max-width: 46vw;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-shell[data-active-view="condition"] h1,
.product-shell[data-active-view="measures"] h1 {
  overflow: hidden;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-shell[data-active-view="condition"] h1::after,
.product-shell[data-active-view="measures"] h1::after {
  margin-left: 4px;
}

.product-shell[data-active-view="condition"] .top-actions,
.product-shell[data-active-view="measures"] .top-actions {
  flex-wrap: nowrap;
  gap: 8px;
}

.product-shell[data-active-view="condition"] .top-actions button,
.product-shell[data-active-view="condition"] .top-actions .buttonlike,
.product-shell[data-active-view="condition"] .top-portfolio-picker select,
.product-shell[data-active-view="condition"] .search,
.product-shell[data-active-view="condition"] .search input,
.product-shell[data-active-view="measures"] .top-actions button,
.product-shell[data-active-view="measures"] .top-actions .buttonlike,
.product-shell[data-active-view="measures"] .top-portfolio-picker select,
.product-shell[data-active-view="measures"] .search,
.product-shell[data-active-view="measures"] .search input {
  min-height: 34px;
}

.product-shell[data-active-view="condition"] .search,
.product-shell[data-active-view="measures"] .search {
  width: min(360px, 24vw);
}

.product-shell[data-active-view="condition"] .object-hero,
.product-shell[data-active-view="measures"] .object-hero {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px;
  border-radius: 12px;
}

.product-shell[data-active-view="condition"] .workflow-object-header,
.product-shell[data-active-view="measures"] .workflow-object-header {
  display: none;
}

.product-shell[data-active-view="condition"] .workflow-bar,
.product-shell[data-active-view="measures"] .workflow-bar {
  display: flex;
  gap: 8px;
  padding: 6px;
  overflow-x: auto;
}

.product-shell[data-active-view="condition"] .workflow-steps,
.product-shell[data-active-view="measures"] .workflow-steps {
  display: flex;
  flex: 1 1 auto;
  gap: 6px;
  min-width: 0;
}

.product-shell[data-active-view="condition"] .workflow-steps button,
.product-shell[data-active-view="measures"] .workflow-steps button {
  flex: 1 0 132px;
  grid-template-columns: 20px minmax(0, 1fr);
  min-height: 34px;
  padding: 4px 7px;
}

.product-shell[data-active-view="condition"] .workflow-steps button span,
.product-shell[data-active-view="measures"] .workflow-steps button span {
  width: 20px;
  height: 20px;
  font-size: 11px;
}

.product-shell[data-active-view="condition"] .workflow-steps button strong,
.product-shell[data-active-view="measures"] .workflow-steps button strong {
  font-size: 12px;
}

.product-shell[data-active-view="condition"] .workflow-bar > .primary,
.product-shell[data-active-view="measures"] .workflow-bar > .primary {
  flex: 0 0 auto;
  min-height: 34px;
  white-space: nowrap;
}

.product-shell[data-active-view="condition"] .object-kpis {
  display: flex;
  gap: 8px;
  margin: 0 0 8px;
  overflow-x: auto;
}

.product-shell[data-active-view="condition"] .object-kpis article {
  flex: 1 0 210px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: center;
  min-height: 54px;
  padding: 9px 12px;
}

.product-shell[data-active-view="condition"] .object-kpis span,
.product-shell[data-active-view="condition"] .object-kpis small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-shell[data-active-view="condition"] .object-kpis strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  margin: 0;
  font-size: 21px;
}

.product-shell[data-active-view="condition"] .analysis-view {
  display: block;
}

.product-shell[data-active-view="condition"] .analysis-view .detail-panel {
  display: none !important;
}

.product-shell[data-active-view="condition"].component-editor-open .analysis-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
  gap: 12px;
}

.product-shell[data-active-view="condition"].component-editor-open .analysis-view .detail-panel {
  display: block !important;
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 92px);
  overflow: auto;
  padding: 14px;
}

.product-shell[data-active-view="condition"].component-editor-open .detail-header {
  align-items: center;
  margin-bottom: 10px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  color: #141414;
  font-size: 18px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}

.icon-button:hover {
  border-color: #b8c3d6;
  background: #f7f8fb;
  box-shadow: none;
}

.detail-header .icon-button {
  margin-left: auto;
}

.compact-component-form {
  gap: 8px;
  margin-top: 10px;
}

.compact-component-form label {
  gap: 4px;
}

.compact-component-form input,
.compact-component-form textarea {
  min-height: 34px;
  padding: 6px 8px;
}

.product-shell[data-active-view="condition"].component-editor-open .component-assessment {
  margin-bottom: 10px;
}

.product-shell[data-active-view="condition"] .table-panel {
  padding: 10px;
}

.product-shell[data-active-view="condition"] .table-panel .panel-title {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.product-shell[data-active-view="condition"] .table-panel .panel-title h2 {
  font-size: 18px;
  white-space: nowrap;
}

.product-shell[data-active-view="condition"] .segmented,
.product-shell[data-active-view="condition"] .condition-actions {
  justify-self: end;
}

.product-shell[data-active-view="condition"] .condition-actions {
  display: flex;
  gap: 8px;
}

.product-shell[data-active-view="condition"] .excel-analysis-table {
  min-width: 1760px;
}

.product-shell[data-active-view="condition"] .excel-analysis-table .col-bkp {
  width: 148px;
}

.product-shell[data-active-view="condition"] .excel-analysis-table th,
.product-shell[data-active-view="condition"] .excel-analysis-table td {
  padding: 6px 7px;
  white-space: nowrap;
}

.product-shell[data-active-view="condition"] .excel-analysis-table .excel-input input {
  min-height: 28px;
}

.product-shell[data-active-view="measures"] #measureHero,
.product-shell[data-active-view="measures"] .measure-summary,
.product-shell[data-active-view="measures"] .cashflow-panel {
  display: none;
}

.product-shell[data-active-view="measures"] .panel {
  padding: 10px;
}

.product-shell[data-active-view="measures"] .panel > .panel-title {
  display: none;
}

.product-shell[data-active-view="measures"] .measure-overview {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.product-shell[data-active-view="measures"] .measure-overview > .panel-title {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 8px 0;
  background: #fbfbfa;
}

.product-shell[data-active-view="measures"] .measure-overview > .panel-title h3 {
  font-size: 15px;
  white-space: nowrap;
}

.product-shell[data-active-view="measures"] .measure-plan-kpis {
  flex-wrap: nowrap;
  margin-left: auto;
  overflow-x: auto;
}

.product-shell[data-active-view="measures"] .measure-plan-kpis span {
  flex: 0 0 auto;
}

.product-shell[data-active-view="measures"] .measure-gantt {
  --gantt-meta-width: 310px;
  --gantt-plan-width: 176px;
  border-radius: 10px;
}

.product-shell[data-active-view="measures"] .gantt-meta,
.product-shell[data-active-view="measures"] .gantt-plan,
.product-shell[data-active-view="measures"] .gantt-quarter,
.product-shell[data-active-view="measures"] .gantt-drop,
.product-shell[data-active-view="measures"] .gantt-total-cell {
  padding: 5px 6px;
}

.product-shell[data-active-view="measures"] .gantt-row {
  min-height: 42px;
}

.product-shell[data-active-view="measures"] .gantt-meta strong {
  font-size: 12px;
}

.product-shell[data-active-view="measures"] .measure-bundle-panel {
  display: none;
}

@media (max-width: 1180px) {
  .product-shell[data-active-view="condition"] .topbar,
  .product-shell[data-active-view="measures"] .topbar {
    grid-template-columns: 1fr;
  }

  .product-shell[data-active-view="condition"] .topbar > div:first-child,
  .product-shell[data-active-view="measures"] .topbar > div:first-child,
  .product-shell[data-active-view="condition"] .table-panel .panel-title {
    grid-template-columns: 1fr;
  }

  .product-shell[data-active-view="condition"] .top-actions,
  .product-shell[data-active-view="measures"] .top-actions {
    flex-wrap: wrap;
  }
}

/* Basisdaten: use the wide header space */
#basisHero {
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 18px 22px;
  align-items: start;
}

#basisHero .workflow-bar {
  grid-column: 1 / -1;
}

#basisHero .building-image {
  height: 122px;
}

#basisHero > div:not(.building-image) {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  min-width: 0;
}

#basisHero h2 {
  margin: 0;
}

#basisHero .object-facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 8px;
  margin: 0;
}

#basisHero .object-facts div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfbfa;
  padding: 8px 10px;
}

#basisHero .object-facts dt,
#basisHero .object-facts dd {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#basisHero .object-facts dt {
  font-size: 11px;
  font-weight: 850;
}

#basisHero .object-facts dd {
  font-size: 13px;
}

#basisHero .object-edit-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px 10px;
  margin-top: 0;
  padding: 12px;
}

#basisHero .object-edit-form label {
  gap: 4px;
}

#basisHero .object-edit-form input,
#basisHero .object-edit-form select {
  min-height: 38px;
  padding: 7px 9px;
}

#basisHero .object-edit-form .span-all {
  grid-column: 1 / -1;
}

#basisHero .object-save-row {
  position: sticky;
  bottom: 10px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #dce8bd;
  border-radius: 10px;
  background: rgba(250, 255, 240, 0.96);
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.08);
  padding: 8px;
}

#basisHero .object-save-row small {
  color: #5f6670;
  font-size: 12px;
  font-weight: 800;
}

.form-status {
  display: block;
  margin-top: 4px;
}

.form-status-dirty {
  color: #9a6a00;
}

.form-status-saving {
  color: #2563eb;
}

.form-status-saved {
  color: #2f6f18;
}

.form-status-error {
  color: #b42318;
}

#basisHero .object-save-row button {
  flex: 0 0 auto;
  min-height: 38px;
}

@media (max-width: 1280px) {
  #basisHero .object-facts,
  #basisHero .object-edit-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #basisHero {
    grid-template-columns: 1fr;
  }

  #basisHero .object-facts,
  #basisHero .object-edit-form {
    grid-template-columns: 1fr;
  }
}

/* One-line Gantt list refinement */
.product-shell[data-active-view="measures"] .measure-gantt {
  --gantt-meta-width: 560px;
  border-radius: 6px;
  box-shadow: none;
}

.product-shell[data-active-view="measures"] .gantt-row {
  min-height: 40px;
  font-size: 13px;
  line-height: 1.15;
}

.product-shell[data-active-view="measures"] .gantt-head {
  min-height: 40px;
  font-size: 11px;
  letter-spacing: 0;
  background: #fff;
  border-bottom: 1px solid #cfd8e3;
}

.product-shell[data-active-view="measures"] .gantt-head .gantt-meta {
  display: grid;
  white-space: nowrap;
}

.product-shell[data-active-view="measures"] .gantt-meta {
  grid-template-columns: 56px minmax(180px, 1fr) 128px 86px;
  gap: 0;
  align-items: center;
  align-content: center;
  padding: 0;
  border-right: 1px solid #c5d0df;
}

.product-shell[data-active-view="measures"] .gantt-meta > * {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 4px 8px;
  border-right: 1px solid #d6dee8;
}

.product-shell[data-active-view="measures"] .gantt-meta > *:last-child {
  border-right: 0;
}

.product-shell[data-active-view="measures"] .gantt-meta-head span {
  color: #5f6670;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.product-shell[data-active-view="measures"] .gantt-bkp {
  grid-row: auto;
  grid-column: 1;
  min-width: 0;
  justify-content: center;
  padding: 4px 8px;
  font-size: 13px;
  line-height: 1.15;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-weight: 650;
}

.product-shell[data-active-view="measures"] .gantt-meta strong {
  grid-column: 2;
  min-width: 0;
  font-size: 13px;
  line-height: 1.15;
  font-weight: 500;
}

.product-shell[data-active-view="measures"] .gantt-investment {
  grid-column: 3;
  justify-self: end;
  justify-content: flex-end;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 500;
  white-space: nowrap;
}

.product-shell[data-active-view="measures"] .gantt-zn {
  grid-column: 4;
  justify-self: stretch;
  max-width: 100%;
  min-height: 40px;
  border-radius: 0;
  padding: 4px 8px;
  justify-content: center;
  font-size: 12px;
  line-height: 1.15;
  background: transparent;
}

.product-shell[data-active-view="measures"] .gantt-zn.ok,
.product-shell[data-active-view="measures"] .gantt-zn.medium {
  background: #eefbd9;
  color: #3f6212;
}

.product-shell[data-active-view="measures"] .gantt-zn.warn {
  background: #fff7d6;
  color: #7a4a00;
}

.product-shell[data-active-view="measures"] .gantt-zn.danger {
  background: #ffe8e8;
  color: #991b1b;
}

.product-shell[data-active-view="measures"] .gantt-plan-chip,
.product-shell[data-active-view="measures"] .gantt-meta small,
.product-shell[data-active-view="measures"] .gantt-plan small {
  display: none;
}

.product-shell[data-active-view="measures"] .gantt-quarter {
  min-height: 40px;
  padding: 5px 3px;
  background: #fff;
}

.product-shell[data-active-view="measures"] .gantt-quarter strong,
.product-shell[data-active-view="measures"] .gantt-quarter span {
  font-size: 10px;
  line-height: 1.15;
}

.product-shell[data-active-view="measures"] .gantt-drop {
  min-height: 40px;
  background: #fff;
}

.product-shell[data-active-view="measures"] .gantt-bar {
  top: 7px;
  min-height: 26px;
  padding: 4px 16px;
  border-radius: 6px;
  box-shadow: none;
}

.product-shell[data-active-view="measures"] .gantt-bar span,
.product-shell[data-active-view="measures"] .gantt-bar strong {
  font-size: 10px;
  line-height: 1.15;
  font-weight: 650;
}

.product-shell[data-active-view="measures"] .gantt-group-row {
  min-height: 32px;
  background: #f7faff;
  border-top: 1px solid #9fb2cc;
  border-bottom: 1px solid #9fb2cc;
}

.product-shell[data-active-view="measures"] .gantt-group-row .gantt-meta,
.product-shell[data-active-view="measures"] .gantt-group-row .gantt-total-cell {
  min-height: 32px;
  background: #f7faff;
}

.product-shell[data-active-view="measures"] .gantt-group-row .gantt-meta > * {
  min-height: 32px;
}

.product-shell[data-active-view="measures"] .gantt-group-row .gantt-meta strong,
.product-shell[data-active-view="measures"] .gantt-group-row .gantt-investment,
.product-shell[data-active-view="measures"] .gantt-group-row .gantt-meta span {
  font-weight: 850;
}

.product-shell[data-active-view="measures"] .technical-marker {
  inset: 10px 4px auto 4px;
}

/* Condition worksheet: match the compact row rhythm of the measures Gantt */
.product-shell[data-active-view="condition"] .excel-analysis-table tbody tr {
  height: 40px;
}

.product-shell[data-active-view="condition"] .excel-analysis-table th,
.product-shell[data-active-view="condition"] .excel-analysis-table td {
  padding: 4px 6px;
  line-height: 1.15;
}

.product-shell[data-active-view="condition"] .excel-analysis-table .excel-input input {
  height: 30px;
  min-height: 30px;
  padding: 4px 7px;
  border-radius: 7px;
}

.product-shell[data-active-view="condition"] .excel-actions {
  min-height: 30px;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: visible;
}

.product-shell[data-active-view="condition"] .excel-actions button {
  flex: 0 0 26px;
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border-radius: 6px;
  line-height: 1;
}

.product-shell[data-active-view="condition"] .excel-bkp {
  flex: 0 0 38px;
  min-width: 38px;
}

.product-shell[data-active-view="condition"] .excel-actions .compact-icon {
  color: #b42318;
  font-size: 15px;
}

.product-shell[data-active-view="condition"] .component-name-control .photo-badge {
  width: 38px;
  min-width: 38px;
  height: 30px;
  min-height: 30px;
  border-radius: 7px;
  padding: 0 5px;
  box-shadow: none;
}

.product-shell[data-active-view="condition"] .excel-group-row td,
.product-shell[data-active-view="condition"] .excel-total-row td {
  height: 32px;
  padding-top: 3px;
  padding-bottom: 3px;
}

.product-shell[data-active-view="condition"] .zn-chip {
  padding: 4px 8px;
}

/* Portfolio KPI cards: quieter tiles with topic-specific icons */
.view[data-panel="portfolio"] > .kpi-grid {
  gap: 14px;
  margin-bottom: 18px;
}

.view[data-panel="portfolio"] > .kpi-grid article {
  min-height: 104px;
  border-radius: 12px;
  padding: 18px 18px 16px 78px;
  border-color: #ecefeb;
  background: #fff;
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.045);
}

.view[data-panel="portfolio"] > .kpi-grid article::before {
  left: 18px;
  top: 22px;
  width: 42px;
  height: 42px;
  border: 1px solid #e4e8e2;
  border-radius: 12px;
  background: #f7faf4;
}

.view[data-panel="portfolio"] > .kpi-grid article::after {
  left: 28px;
  top: 31px;
  width: 22px;
  height: 22px;
  color: #3b3f45;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  transform: none;
}

.view[data-panel="portfolio"] > .kpi-grid .kpi-condition::after {
  content: "↯";
}

.view[data-panel="portfolio"] > .kpi-grid .kpi-investment::after {
  content: "CHF";
  left: 24px;
  top: 33px;
  width: 30px;
  font-size: 11px;
  letter-spacing: 0;
}

.view[data-panel="portfolio"] > .kpi-grid .kpi-reserve::after {
  content: "◇";
}

.view[data-panel="portfolio"] > .kpi-grid .kpi-budget::after {
  content: "↗";
}

.view[data-panel="portfolio"] > .kpi-grid span {
  color: #5f6670;
  font-size: 12px;
  font-weight: 800;
}

.view[data-panel="portfolio"] > .kpi-grid article > span::after {
  width: 24px;
  height: 3px;
  margin-top: 7px;
}

.view[data-panel="portfolio"] > .kpi-grid strong {
  margin: 6px 0 3px;
  font-size: clamp(24px, 1.8vw, 31px);
  line-height: 1.08;
}

.view[data-panel="portfolio"] > .kpi-grid small {
  color: #737982;
  font-size: 13px;
}

.photo-upload-form .native-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  opacity: 0;
}

.account-menu-wrap {
  position: relative;
  flex: 0 0 auto;
}

.topbar-account {
  align-self: flex-start;
  margin-left: 4px;
}

.account-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 230px;
  min-height: 44px;
  padding: 0 12px 0 7px;
}

.account-menu-button span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eef2f7;
  color: #151515;
  font-size: 12px;
  font-weight: 900;
}

.account-menu-button b {
  max-width: 138px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-button i {
  color: #6f7378;
  font-style: normal;
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  display: grid;
  gap: 7px;
  min-width: 250px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 18px 44px rgba(17, 17, 17, 0.13);
}

.account-menu small {
  color: #6f7378;
  line-height: 1.35;
}

.account-menu button {
  justify-self: stretch;
  margin-top: 6px;
}

#objectOpeningInlineList:empty {
  display: none;
}

#objectOpeningInlineList {
  margin-bottom: 12px;
}

.portfolio-create-cta {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.portfolio-create-cta .panel-title {
  align-items: center;
}

.portfolio-create-cta .object-opening-panel {
  grid-template-columns: minmax(180px, 0.55fr) minmax(420px, 1.45fr);
  align-items: stretch;
  margin-top: 0;
  border-radius: 12px;
  background: #fbfdf4;
  padding: 12px;
}

.portfolio-create-cta .object-opening-copy {
  align-content: center;
  gap: 6px;
  padding: 4px 6px;
}

.portfolio-create-cta .object-opening-copy p {
  max-width: 34ch;
  font-size: 13px;
  line-height: 1.4;
}

.portfolio-create-cta .object-opening-panel .object-create-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.portfolio-create-cta .object-create-form label {
  min-width: 0;
}

.portfolio-empty-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 10px 0;
}

.portfolio-empty-state span {
  color: var(--muted);
}

@media (max-width: 900px) {
  .portfolio-create-cta .object-opening-panel,
  .portfolio-create-cta .object-opening-panel .object-create-form {
    grid-template-columns: 1fr;
  }

  .account-menu-button b {
    display: none;
  }
}

@media (max-width: 760px) {
  .topbar {
    position: relative;
  }

  .topbar-account {
    display: none;
  }

  .mobile-logout-nav {
    display: flex;
    margin-left: auto;
  }

  .mobile-logout-nav span {
    display: none;
  }

  .photo-upload-form {
    position: relative;
  }

  .photo-upload-form .upload-file-trigger,
  .photo-upload-form button[type="submit"] {
    width: 100%;
    justify-content: center;
  }

  .portfolio-empty-state {
    align-items: stretch;
    flex-direction: column;
  }
}
