@font-face {
  font-family: DM Sans;
  src: url("fonts/dm-sans-variable.ttf") format("truetype");
  font-weight: 100 1000;
  font-display: swap;
}
:root {
  --copper: #b45324;
  --ink: #202731;
  --muted: #596473;
  --line: #d4dae1;
  --bg: #f4f5f7;
  --red: #be123c;
  --blue: #1d4ed8;
  --green: #15803d;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--bg);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button,
.button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
button:hover {
  border-color: var(--copper);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--copper);
  border-color: var(--copper);
  color: white;
}
.danger {
  color: var(--red);
}
input,
select,
textarea {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}
textarea {
  min-height: 100px;
  resize: vertical;
}
input[type="checkbox"],
input[type="radio"] {
  width: 24px;
  min-height: 24px;
  accent-color: var(--copper);
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}
.check {
  flex-direction: row;
  align-items: center;
}
h1 {
  font-size: 24px;
  line-height: 1.3;
  margin: 0 0 6px;
  font-weight: 600;
}
h2 {
  font-size: 18px;
  margin: 0 0 16px;
}
h3 {
  font-size: 14px;
}
p {
  margin: 0 0 12px;
}
.muted,
small {
  color: var(--muted);
}
small {
  font-size: 12px;
}
.shell {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  min-height: 100vh;
}
.rail {
  background: white;
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  color: var(--copper);
  margin-bottom: 12px;
}
.brand img {
  width: 34px;
  height: 24px;
}
.brand span {
  min-width: 0;
  font-size: 18px;
}
.brand small {
  display: block;
  line-height: 1.3;
  white-space: normal;
  color: var(--copper);
  font-size: 13px;
}
.rail button {
  text-align: left;
  border-color: transparent;
  height: 44px;
  background: transparent;
}
.rail button.active {
  background: #fff1e8;
  color: var(--copper);
}
.rail .rail-foot {
  margin-top: auto;
  padding-top: 32px;
}
.topbar {
  height: 64px;
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.workspace {
  padding: 28px;
  max-width: 1600px;
  margin: auto;
}
.heading,
.row,
.toolbar,
.tabs,
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.heading {
  justify-content: space-between;
  margin-bottom: 24px;
}
.row {
  flex-wrap: wrap;
}
.toolbar {
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: end;
}
.toolbar label {
  min-width: 160px;
}
.toolbar .search {
  flex: 1;
  min-width: 220px;
}
.tabs {
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.tabs button {
  border: 0;
  border-radius: 0;
  background: transparent;
}
.tabs button.active {
  color: var(--copper);
  box-shadow: inset 0 -3px var(--copper);
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.metric {
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.metric strong {
  display: block;
  font-size: 30px;
  margin-top: 8px;
}
.metric.alert strong {
  color: var(--red);
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}
table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
  background: white;
}
th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #e7eaf0;
}
th {
  font-size: 12px;
  color: var(--muted);
  background: #fafbfc;
}
th button {
  padding: 0;
  min-height: 30px;
  background: transparent;
  border: 0;
  color: inherit;
}
td button {
  min-height: 44px;
}
.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: #f4f5f7;
  gap: 6px;
}
.status.red {
  background: var(--red);
  border-color: var(--red);
  color: white;
}
.status.green {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.status.blue {
  color: var(--blue);
  border-color: #b8c9f8;
  background: #edf3ff;
}
.status.yellow {
  background: #facc15;
  color: #422f00;
  border-color: #e1b800;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}
.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.notice {
  border-left: 4px solid var(--copper);
  background: #fff6ef;
  padding: 12px 16px;
  margin-bottom: 20px;
}
.notice.error {
  border-color: var(--red);
  background: #fff0f4;
  color: #9f1239;
}
.saved {
  color: var(--green);
}
.unsaved {
  color: var(--red);
}
.auth {
  max-width: 440px;
  margin: 8vh auto;
  padding: 32px;
}
.auth .brand {
  justify-content: center;
}
.auth form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dialog-backdrop {
  position: fixed;
  inset: 0;
  background: #20273166;
  display: flex;
  justify-content: flex-end;
  z-index: 10;
}
.panel {
  background: white;
  width: min(680px, 100%);
  height: 100vh;
  overflow: auto;
  padding: 28px;
  box-shadow: -8px 0 30px #20273120;
}
.panel.wide {
  width: min(1040px, 100%);
}
.panel header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 24px;
}
.panel footer {
  position: sticky;
  bottom: -28px;
  padding: 16px 0;
  background: white;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.field-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 12px;
}
.preview.tablet {
  max-width: 600px;
  margin: auto;
  border: 8px solid #202731;
  border-radius: 20px;
  padding: 24px;
}
.map {
  position: relative;
  min-height: 320px;
  overflow: auto;
  background: #f4f5f7;
}
.map img {
  display: block;
  width: 100%;
  max-height: 600px;
  object-fit: contain;
}
.map-point {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 44px;
  background: white;
  border: 2px solid var(--copper);
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  background: #f5f6f8;
  padding: 16px;
}
.recovery {
  font-family: monospace;
  font-size: 16px;
}
.loading {
  padding: 48px;
}
.section-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
:focus-visible {
  outline: 3px solid #b4532466;
  outline-offset: 2px;
}
.subtle {
  background: #fafbfc;
}
.full {
  grid-column: 1/-1;
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 160px minmax(0, 1fr);
  }
  .rail {
    padding: 12px 8px;
  }
  .brand {
    gap: 8px;
  }
  .workspace {
    padding: 20px;
  }
  .topbar {
    padding: 0 20px;
  }
  .metrics {
    gap: 8px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .shell {
    display: block;
  }
  .rail {
    position: static;
    display: flex;
    flex-direction: row;
    overflow: auto;
    border-bottom: 1px solid var(--line);
    padding: 8px;
  }
  .rail .brand,
  .rail-foot,
  .rail > small {
    display: none;
  }
  .rail button {
    flex-shrink: 0;
  }
  .topbar {
    padding: 0 16px;
  }
  .workspace {
    padding: 16px;
  }
  .heading {
    align-items: start;
    gap: 12px;
  }
  .heading h1 {
    font-size: 21px;
  }
  .metrics {
    grid-template-columns: 1fr;
  }
  .metric {
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .metric strong {
    font-size: 26px;
    margin: 0;
  }
  .panel {
    padding: 20px;
  }
  .toolbar > * {
    flex: 1;
  }
  .actions {
    flex-wrap: wrap;
  }
}
.map-scroll {
  overflow: auto;
  max-height: 680px;
}
.area-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.area-polygon {
  fill: #b4532428;
  stroke: #b45324;
  stroke-width: 3;
  pointer-events: all;
  cursor: pointer;
}
.area-polygon.red {
  fill: #be123c33;
  stroke: #be123c;
}
.area-polygon.green {
  fill: #15803d33;
  stroke: #15803d;
}
.area-polygon.yellow {
  fill: #facc1533;
  stroke: #b89900;
}
.area-polygon:focus {
  stroke-width: 8;
}
.map:has(img) {
  min-height: 0;
}
.map img {
  max-height: none;
}
.rate-bar {
  width: 100%;
  height: 24px;
  accent-color: var(--copper);
}
@media print {
  .rail,
  .topbar,
  button,
  .tabs,
  .toolbar {
    display: none !important;
  }
  .shell {
    display: block;
  }
  .workspace {
    padding: 0;
  }
  .card {
    break-inside: avoid;
  }
  .map-point {
    display: block !important;
  }
}
.facts {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(0, 3fr);
  gap: 8px 16px;
  margin: 0;
}
.facts dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: capitalize;
}
.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.facts .facts {
  grid-template-columns: 1fr;
}
.report-filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1000px) and (min-width: 600px) {
  .report-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 599px) {
  .report-filters {
    grid-template-columns: 1fr;
  }
}
/* Consinova suite shell: Projects proportions, Forms copper identity. */
.rail {
  border-left: 5px solid var(--copper);
  border-right: 0;
  padding-left: 7px;
}
.brand {
  margin-bottom: 0;
  flex-shrink: 0;
}
.rail > small {
  font-weight: 400;
}
.rail button {
  min-height: 40px;
  height: auto;
  padding: 10px 12px;
}
.topbar {
  padding-inline: 24px;
  color: var(--muted);
  font-size: 13px;
  gap: 16px;
}
.workspace {
  padding: 24px;
  margin: 0;
}
.shell > main,
.workspace,
.grid > *,
.stack > *,
.heading > *,
.row > *,
.actions,
label {
  min-width: 0;
}
h1 {
  font-size: 26px;
  font-weight: 400;
}
.heading {
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.heading p {
  margin-bottom: 0;
}
.heading > :first-child {
  flex: 1 1 260px;
}
.heading .actions {
  flex: 0 1 auto;
}
.row,
.actions {
  flex-wrap: wrap;
}
button {
  overflow-wrap: anywhere;
  max-width: 100%;
}
button,
input,
select {
  min-height: 40px;
}
input,
select,
textarea {
  min-width: 0;
  max-width: 100%;
}
input[type="checkbox"],
input[type="radio"] {
  flex: 0 0 24px;
}
label:has(> input[type="checkbox"]),
label:has(> input[type="radio"]) {
  flex-direction: row;
  align-items: center;
}
.toolbar > label {
  flex: 0 1 200px;
  min-width: min(160px, 100%);
}
.toolbar > .search {
  flex: 1 1 240px;
  min-width: min(220px, 100%);
}
.card {
  padding: 20px;
  border-radius: 6px;
}
.metrics {
  gap: 12px;
}
.metric {
  padding: 16px;
  border-radius: 6px;
}
.metric:first-child {
  background: #fff1e8;
  border-color: #ead3c6;
}
.metric.alert {
  background: #fff1f2;
  border-color: #be123c;
}
.metric.review {
  background: #eff6ff;
  border-color: #93c5fd;
}
.metric.review strong {
  color: #1d4ed8;
}
.metric.attention {
  background: #fffbeb;
  border-color: #eab308;
}
.metric.attention strong {
  color: #854d0e;
}
.metric > span {
  font-size: 12px;
  font-weight: 600;
}
.metric > small {
  display: block;
  margin-top: 4px;
}
.dashboard-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}
.dashboard-metrics strong {
  font-size: 30px;
  overflow-wrap: anywhere;
}
.dashboard-lists {
  gap: 20px;
  align-items: start;
}
.dashboard-list {
  margin-bottom: 0;
}
.dashboard-list h2 {
  margin: 0;
}
.dashboard-list > .row {
  justify-content: space-between;
  margin-bottom: 16px;
}
.dashboard-item {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.dashboard-item > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.dashboard-item small {
  display: block;
  margin-top: 4px;
}
.dashboard-item button {
  flex-shrink: 0;
}
.dashboard-note {
  margin-top: 20px;
  font-size: 12px;
}
.panel {
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 24px;
  height: 100dvh;
}
.panel header {
  gap: 16px;
}
.panel header h2 {
  overflow-wrap: anywhere;
}
.panel header button {
  flex-shrink: 0;
}
.panel footer {
  bottom: -24px;
  z-index: 1;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}
.panel .grid {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}
.panel .toolbar > *,
.panel .row > label {
  flex: 1 1 180px;
}
.panel .toolbar > button,
.panel .row > button {
  flex: 0 1 auto;
}
.panel .field-card {
  min-width: 0;
}
.table-wrap {
  max-width: 100%;
}
@media (max-width: 1100px) {
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .topbar,
  .workspace {
    padding-inline: 20px;
  }
  .rail {
    padding-left: 7px;
  }
  .topbar {
    height: auto;
    min-height: 64px;
    padding-block: 12px;
    flex-wrap: wrap;
  }
  .topbar > .row {
    gap: 8px 12px;
  }
}
@media (max-width: 640px) {
  .rail {
    border-left: 0;
    border-top: 5px solid var(--copper);
    padding: 8px;
  }
  .rail button {
    white-space: nowrap;
  }
  .workspace {
    padding: 20px 16px;
  }
  .topbar {
    padding-inline: 16px;
  }
  .topbar > .row {
    width: 100%;
    justify-content: space-between;
  }
  .topbar > .row > span {
    overflow-wrap: anywhere;
  }
  .heading > :first-child {
    flex-basis: 100%;
  }
  .toolbar > label,
  .toolbar > .search {
    flex: 1 1 100%;
    min-width: 0;
  }
  .toolbar > button {
    flex: 0 1 auto;
  }
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-metrics .metric {
    display: block;
    padding: 12px;
  }
  .dashboard-metrics strong {
    margin-top: 8px;
    font-size: 26px;
  }
  .dashboard-lists {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 16px;
  }
  .panel {
    padding: 20px 16px;
  }
  .panel footer {
    bottom: -20px;
  }
}
/* Workspace navigation and report explorers share the copper application shell. */
.rail > button {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}
.rail > button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.rail > small {
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.07em;
}
.rail {
  overflow-y: auto;
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}
.library-grid > .card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.library-grid .actions {
  margin-top: auto;
}
.metrics > button.metric {
  text-align: left;
  white-space: normal;
  height: auto;
  color: inherit;
}
.metrics > button.metric:hover {
  box-shadow: 0 0 0 2px var(--copper, #b4633c);
}
.workflow-view {
  border: 1px solid var(--line, #d4dae1);
  border-radius: 6px;
  padding: 16px;
}
.workflow-stages,
.breadcrumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.workflow-connections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 8px;
}
.workflow-connections .field-card {
  margin: 0;
}
.workflow-connections small {
  display: block;
  margin-top: 6px;
}
.workflow-stages [aria-current] {
  background: #eff6ff;
  border-color: #1d4ed8;
  color: #1d4ed8;
}
.trend-chart {
  width: 100%;
  max-height: 220px;
  display: block;
  border-bottom: 1px solid #d4dae1;
}
.report-filters > label {
  min-width: 0;
}
.report-filters input,
.report-filters select {
  width: 100%;
}
.table-wrap td button {
  margin: 2px;
}
.workspace > .actions {
  margin: 16px 0;
}
.panel .workflow-view {
  margin-bottom: 12px;
}
.metrics .metric {
  min-width: 0;
  overflow-wrap: anywhere;
}
.breadcrumbs button {
  min-width: 0;
}
.workspace > h1 {
  margin-bottom: 12px;
}
@media (max-width: 600px) {
  .library-grid {
    grid-template-columns: 1fr;
  }
  .workflow-connections {
    grid-template-columns: 1fr;
  }
  .report-filters {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rail > button svg {
    width: 15px;
  }
  .workspace > .actions {
    flex-wrap: wrap;
  }
}

.report-metrics .metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
}
.report-metrics .metric > span,
.report-metrics .metric > strong,
.report-metrics .metric > small {
  max-width: 100%;
  flex-shrink: 0;
}

.trend-scroll {
  width: 100%;
  overflow-x: auto;
}
.trend-scroll .trend-chart {
  min-width: 640px;
  height: 180px;
}
