/* Neox workspace: shared spacing, document workspace and project dossier. */
:root {
  --navy: #10283f;
  --blue: #066cb4;
  --ink: #17324b;
  --muted: #52677b;
  --line: #dce5ee;
  --bg: #f2f6fa;
}
body {
  font-variant-numeric: tabular-nums;
}
.sidebar {
  background: linear-gradient(170deg, #142f49, #0d2032);
  padding-top: 22px;
}
.brand {
  padding-bottom: 16px;
}
.nav {
  gap: 3px;
}
.nav .nav-group-title {
  color: #9db8ce;
  margin: 20px 12px 7px;
  font-size: 11px;
  font-weight: 600;
}
.nav button {
  border-radius: 9px;
  padding: 10px 14px;
  min-height: 44px;
  position: relative;
}
.nav button.active {
  background: #254c6d;
  box-shadow: inset 0 0 0 1px #416887;
}
.nav button.active:before {
  left: 0;
  background: #3fb6fc;
  height: 20px;
}
.sidebar-bottom {
  padding-top: 20px;
}
.topbar {
  background: #ffffffed;
}
.page-head h1 {
  letter-spacing: -0.8px;
}
.panel {
  box-shadow: none;
}
.panel-head {
  padding: 20px 24px;
}
.panel-body {
  padding: 24px;
}
.panel-body > .panel-body {
  padding: 0;
}
.fields,
.form-grid {
  gap: 20px;
}
.actions {
  gap: 10px;
}
.form-section-title {
  margin: 10px 0 0;
}
input,
select {
  min-height: 44px;
  padding: 10px 12px;
}
label input,
label select,
label textarea {
  margin-top: 7px;
}
button {
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #70ace8;
  outline-offset: 3px;
}
.material-table {
  min-width: 450px;
}
.material-table th {
  font-size: 12px;
}
.material-table td {
  padding: 13px 12px;
  vertical-align: middle;
}
.material-table td:first-child {
  width: 46%;
}
.material-table input[type="number"] {
  min-width: 80px;
  max-width: 130px;
  margin: 0;
}
.material-table .scope-pick {
  margin: 0;
  font-size: 13px;
  align-items: center;
  gap: 10px;
}
.material-table .scope-pick input {
  flex: none;
  margin: 0;
}
.material-table .scope-pick strong {
  font-size: 13px;
}
.material-table output {
  white-space: nowrap;
  font-size: 13px;
}
.material-table small {
  font-weight: 400;
  margin-top: 3px;
}
.estimate-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
}
.estimate-section h3 {
  margin-bottom: 14px;
}
.estimate-compact .form-grid {
  gap: 16px;
}
.estimate-compact .estimate-section {
  margin-bottom: 24px;
}
.estimate-summary {
  padding: 20px;
}
.term-count {
  max-width: 210px;
  margin: 18px 0;
}
.payment-fields {
  display: grid;
  gap: 13px;
  max-width: 360px;
}
.payment-fields > label {
  display: grid;
  grid-template-columns: 12px minmax(140px, 1fr) 100px;
  align-items: center;
  gap: 12px;
}
.payment-fields > label input {
  margin: 0;
}
.labour-widget {
  padding: 22px;
  margin: 28px 0;
  background: #eef5fb;
  border: 1px solid #c6d9eb;
  border-left: 4px solid #1777ba;
}
.labour-widget h2 {
  font-size: 22px;
}
#toast {
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    visibility 0.4s;
  pointer-events: none;
}
#toast.show {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.save-error {
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}
.save-error.fading {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
.notice.fading {
  opacity: 0;
  transition: opacity 0.45s ease;
}
@media screen and (min-width: 1200px) {
  .workspace:has(.editor, .calculation-layout) > main {
    height: auto;
    display: block;
    overflow: visible;
    padding: 22px 28px 18px;
  }
  .workspace:has(.editor, .calculation-layout) .page-head {
    margin-bottom: 14px;
    flex: none;
  }
  .workspace:has(.editor, .calculation-layout) .doc-actions {
    position: static;
    margin-bottom: 12px;
    gap: 8px;
    flex: none;
  }
  .workspace:has(.editor, .calculation-layout) .doc-actions button {
    padding: 8px 12px;
    font-size: 13px;
  }
  .workspace:has(.editor, .calculation-layout) .doc-help {
    margin: 0 0 10px;
  }
  .workspace:has(.editor, .calculation-layout) .data-disclosure {
    margin-bottom: 12px;
    flex: none;
    max-height: 130px;
    overflow: auto;
  }
  .workspace:has(.editor, .calculation-layout) .approval-banner {
    margin-bottom: 12px;
    padding: 12px 16px;
    flex: none;
  }
  .editor,
  .calculation-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    height: calc(100dvh - 56px);
    min-height: 560px;
    overflow: visible;
  }
  .editor-form,
  #calculation-form {
    position: relative;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: auto;
    padding-right: 10px;
    scrollbar-gutter: stable;
  }
  .preview-wrap,
  .calculation-preview {
    position: relative;
    top: auto;
    height: 100%;
    max-width: none;
    overflow: auto;
    overscroll-behavior: auto;
    scrollbar-gutter: stable;
  }
  .preview-bar {
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 1;
    padding: 8px 0 12px;
    margin: 0;
  }
}
.editor,
.calculation-layout {
  overscroll-behavior-y: auto;
}
@media screen {
  html:has(.editor, .calculation-layout) {
    overflow-y: scroll;
    scrollbar-gutter: stable;
  }
  html:has(.editor, .calculation-layout)::-webkit-scrollbar {
    width: 14px;
  }
  html:has(.editor, .calculation-layout)::-webkit-scrollbar-track {
    background: #eaf0f5;
  }
  html:has(.editor, .calculation-layout)::-webkit-scrollbar-thumb {
    background: #8298aa;
    border: 3px solid #eaf0f5;
    border-radius: 8px;
  }
  html:has(.editor, .calculation-layout)::-webkit-scrollbar-thumb:hover {
    background: #526f85;
  }
}
.project-directory {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.project-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  flex-wrap: wrap;
}
.project-search {
  width: 360px;
  max-width: 100%;
}
.segmented {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  background: #f1f5f9;
  gap: 3px;
}
.segmented button {
  background: transparent;
  border-color: transparent;
  min-height: 38px;
  padding: 7px 14px;
  font-size: 13px;
}
.segmented button.selected {
  background: white;
  box-shadow: 0 2px 5px #16334a12;
  border-color: #d8e3ed;
}
.project-filters {
  display: flex;
  gap: 8px;
  padding: 0 24px 22px;
  flex-wrap: wrap;
}
.project-filters button {
  border-color: transparent;
  color: #52677b;
  background: #f4f7fa;
  font-size: 13px;
}
.project-filters button.selected {
  background: #e2f1fc;
  color: #005b98;
  border-color: #b6d8f1;
}
.project-directory table th {
  background: #f6f9fc;
  font-size: 12px;
}
.project-directory table td {
  padding-top: 20px;
  padding-bottom: 20px;
}
.project-empty {
  margin: 0;
  padding: 30px 24px;
  color: var(--muted);
  line-height: 1.7;
}
.project-status {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  border-radius: 6px;
  padding: 5px 9px;
  background: #edf2f7;
  color: #485e72;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.project-status > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.project-status.ontrack,
.project-status.completed {
  background: #e3f4eb;
  color: #116342;
}
.project-status.delayed {
  background: #fff0df;
  color: #925200;
}
.project-progress-cell {
  min-width: 135px;
}
.progress-caption {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 12px;
  margin-bottom: 9px;
  color: var(--muted);
}
.progress-caption strong {
  color: var(--ink);
}
.project-progress {
  height: 6px;
  overflow: hidden;
  background: #e5edf5;
  border-radius: 20px;
}
.project-progress > span {
  display: block;
  height: 100%;
  width: 100%;
  background: #087abb;
  transform-origin: left;
  transition: transform 0.5s ease;
  border-radius: 20px;
}
.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  padding: 0 24px 24px;
  gap: 20px;
}
.project-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}
.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.project-card h2 {
  margin: 22px 0 6px;
  font-size: 21px;
  letter-spacing: -0.4px;
}
.project-card p {
  color: var(--muted);
}
.project-card dl {
  margin: 24px 0;
  font-size: 13px;
}
.project-card dl > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin: 10px 0;
}
.project-card dt {
  color: var(--muted);
}
.project-card dd {
  margin: 0;
  text-align: right;
}
.project-card footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}
.project-card footer small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 4px;
}
.project-back {
  margin-bottom: 10px;
}
.project-hero {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 30px;
  border-top: 3px solid #078bd0;
}
.project-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
.project-heading h1 {
  margin: 18px 0 8px;
  font-size: 30px;
  letter-spacing: -0.7px;
  overflow-wrap: anywhere;
}
.project-heading p {
  margin: 0;
  color: var(--muted);
}
.project-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
}
.project-hero-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) 1fr 1fr;
  gap: 36px;
  align-items: center;
}
.project-period,
.project-contract {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.project-period > span,
.project-contract > span {
  color: var(--muted);
}
.project-contract strong {
  font-size: 23px;
  letter-spacing: -0.5px;
}
.project-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid #cedce8;
  margin: 24px 0;
  overflow-x: auto;
}
.project-tabs button {
  border: 0;
  border-radius: 0;
  background: none;
  padding: 15px 18px;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.project-tabs .selected {
  color: #0065a7;
  border-bottom-color: #087abc;
}
.project-tabs .project-link {
  margin-left: auto;
}
.project-content {
  animation: panel-enter 0.25s ease both;
}
.project-section {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  margin-bottom: 22px;
  overflow: hidden;
}
.project-section > header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid #e8eef4;
}
.project-section > header h2 {
  font-size: 17px;
  margin: 0;
}
.project-section > p,
.project-section > details,
.project-section > .progress-caption,
.project-section > .project-progress {
  margin: 20px 24px;
}
.project-section > .project-progress {
  margin-top: -8px;
}
.project-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.project-phases {
  list-style: none;
  margin: 0;
  padding: 12px 24px;
}
.project-phases li {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  padding: 14px 0;
  min-height: 82px;
}
.project-phases li:not(:last-child):before {
  content: "";
  position: absolute;
  width: 2px;
  background: #e3eaf2;
  left: 15px;
  top: 56px;
  bottom: -4px;
}
.phase-mark {
  width: 32px;
  height: 32px;
  border: 1px solid #d4e0eb;
  border-radius: 50%;
  background: #f1f5fa;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 12px;
  color: #60778e;
  z-index: 1;
}
.project-phases .done .phase-mark {
  background: #0876b8;
  color: white;
  border-color: #0876b8;
}
.project-phases .current .phase-mark {
  border: 2px solid #0876b8;
  background: #edf7ff;
  color: #0068ab;
}
.project-phases li > div {
  flex: 1;
}
.project-phases strong {
  display: block;
  font-size: 14px;
  line-height: 1.5;
}
.project-phases small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.phase-disabled {
  opacity: 0.55;
}
.project-phases button {
  font-size: 12px;
  padding: 8px;
}
.project-explanation {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.next-phase {
  padding: 26px;
  background: linear-gradient(140deg, #f3f9fe, #fff);
}
.next-phase h3 {
  font-size: 20px;
  margin: 18px 0 10px;
}
.next-phase p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}
.phase-orbit {
  display: block;
  width: 34px;
  height: 34px;
  border: 7px solid #d9edfb;
  outline: 1px solid #bbddf4;
  border-radius: 50%;
  background: #198bc8;
}
.project-details {
  margin: 0;
  padding: 24px;
  display: grid;
  gap: 19px;
}
.project-details dt {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}
.project-details dd {
  margin: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.preserve-lines {
  white-space: pre-wrap;
}
.risk-list {
  padding: 8px 24px;
  list-style: none;
  margin: 0;
}
.risk-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #edf2f7;
}
.risk-list li > div {
  flex: 1;
}
.risk-list strong {
  font-size: 13px;
}
.risk-list small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
.risk-dot {
  width: 8px;
  height: 8px;
  background: #7199b5;
  border-radius: 50%;
  flex: none;
}
.risk-dot.high {
  background: #bd5c22;
}
.risk-dot.closed {
  background: #319374;
}
.project-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px 8px;
}
.project-stat-strip > div {
  display: flex;
  flex-direction: column;
  padding: 0 20px;
  border-right: 1px solid var(--line);
  gap: 10px;
}
.project-stat-strip > div:last-child {
  border: 0;
}
.project-stat-strip span {
  font-size: 12px;
  color: var(--muted);
}
.project-stat-strip strong {
  font-size: 24px;
  letter-spacing: -0.6px;
  overflow-wrap: anywhere;
}
.project-stat-strip small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.project-section .project-stat-strip {
  border: 0;
  border-radius: 0;
  margin: 0;
}
.finance-rows {
  padding: 0 24px;
}
.finance-rows > div {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  gap: 15px;
  border-bottom: 1px solid #edf2f7;
  font-size: 14px;
}
.project-files {
  padding: 4px 24px;
}
.project-files > div {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #edf2f7;
}
.project-files > div > div {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.project-files small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.file-emblem,
.report-emblem {
  display: grid;
  place-items: center;
  background: #e5f1fa;
  color: #06649e;
  border: 1px solid #c7dfef;
  border-radius: 6px;
  width: 36px;
  height: 44px;
  flex: none;
  font-size: 10px;
  font-weight: 700;
}
.report-emblem {
  width: 62px;
  height: 80px;
  font-size: 15px;
}
.report-intro {
  display: flex;
  gap: 24px;
  padding: 28px;
  align-items: center;
}
.report-intro > div:nth-child(2) {
  flex: 1;
}
.report-intro h3 {
  margin: 0 0 8px;
}
.report-intro p {
  margin: 0;
  line-height: 1.7;
  font-size: 14px;
  color: var(--muted);
}
.project-activity {
  list-style: none;
  margin: 0;
  padding: 8px 24px;
}
.project-activity li {
  padding: 18px 0;
  border-bottom: 1px solid #edf2f7;
}
.project-activity li > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.project-activity span,
.project-activity p {
  font-size: 12px;
  color: var(--muted);
}
.gantt-scroll {
  overflow: auto;
  padding: 0 24px 24px;
}
.gantt {
  width: max(100%, calc(var(--gantt-width) + 230px));
  font-size: 12px;
}
.gantt-heading,
.gantt-row {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 58px;
  align-items: center;
}
.gantt-heading {
  color: var(--muted);
  min-height: 44px;
}
.gantt-heading > div {
  display: flex;
  justify-content: space-between;
}
.gantt-row > div:first-child {
  padding-right: 16px;
}
.gantt-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.gantt-track {
  height: 58px;
  position: relative;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(10% - 1px),
    #edf2f8 calc(10% - 1px),
    #edf2f8 10%
  );
  border-bottom: 1px solid #f1f4f8;
}
.gantt-bar {
  position: absolute;
  top: 16px;
  height: 27px;
  background: #dae8f4;
  border: 1px solid #c9dceb;
  border-radius: 5px;
  overflow: hidden;
  font-size: 11px;
  padding: 5px 8px;
  white-space: nowrap;
}
.gantt-bar.active {
  background: #0877bc;
  color: white;
  border-color: #0877bc;
}
.gantt-bar.done {
  background: #d7eee4;
  color: #165b43;
  border-color: #b7dccc;
}
.gantt-unscheduled {
  position: absolute;
  top: 20px;
  color: var(--muted);
}
.today-line {
  position: absolute;
  inset: 0 auto 0;
  border-left: 2px solid #36a6dc;
}
.access-page {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #0c243b;
  padding: 48px;
  grid-template-columns: minmax(0, 520px) minmax(340px, 460px);
  gap: 70px;
  justify-content: center;
}
.access-art {
  color: white;
  z-index: 1;
  max-width: 520px;
}
.access-art .access-wordmark {
  font-size: 16px;
  font-weight: 600;
  color: #b7d9ef;
  margin-bottom: 40px;
}
.access-art h2 {
  font-size: 52px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -2px;
  margin: 0 0 24px;
}
.access-art p {
  color: #c0d5e5;
  font-size: 17px;
  line-height: 1.75;
  max-width: 400px;
}
.access-art .architect-lines {
  height: 100px;
  border-left: 2px solid #31a9ed;
  border-top: 2px solid #31a9ed;
  transform: skewY(-24deg);
  width: 160px;
  margin: 60px 0 20px;
  opacity: 0.6;
}
.access-bubbles {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.access-bubbles span {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 35%,
    #3996c744,
    #1666a322 50%,
    #1666a300 72%
  );
  width: 650px;
  height: 650px;
  left: -120px;
  top: -150px;
  transform: translate(var(--bubble-x, 0), var(--bubble-y, 0));
  transition: transform 1.4s ease-out;
  animation: bubble-arrive 1.2s ease both;
}
.access-bubbles span:nth-child(2) {
  left: 25%;
  top: 44%;
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle,
    #1768a738,
    #207cad15 48%,
    transparent 70%
  );
}
.access-bubbles span:nth-child(3) {
  left: 60%;
  top: -20%;
  width: 570px;
  height: 570px;
  background: radial-gradient(circle, #5bc4e82b, transparent 68%);
}
.access-card {
  z-index: 1;
  width: 460px;
  padding: 34px 36px;
  border-radius: 18px;
  border: 1px solid #d9e6ef;
  box-shadow: 0 24px 70px #03152655;
  animation: access-enter 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.access-logo {
  width: 160px;
  height: 106px;
  margin: 0 0 22px;
}
.access-card h1 {
  font-size: 28px;
  margin: 0 0 10px;
}
.access-card > p {
  line-height: 1.65;
}
.access-card form {
  margin-top: 24px;
  gap: 19px;
}
.access-card #register-account,
.access-card #back-login {
  margin-top: 18px;
  background: #f2f7fb;
  border-color: #dbe6ef;
}
.access-card .access-note {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid #e4ebf2;
  text-align: left;
  font-size: 11px;
}
@keyframes access-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes bubble-arrive {
  from {
    opacity: 0;
    scale: 1.15;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}
@keyframes panel-enter {
  from {
    opacity: 0.4;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media screen and (max-width: 1199px) {
  .project-overview-grid {
    grid-template-columns: 1fr;
  }
  .project-stat-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 0;
  }
  .access-page {
    gap: 30px;
    padding: 32px;
  }
  .access-art h2 {
    font-size: 40px;
  }
  .project-heading {
    flex-wrap: wrap;
  }
}
@media screen and (max-width: 760px) {
  .access-page {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .access-art {
    display: none;
  }
  .access-card {
    justify-self: center;
  }
  .project-hero {
    padding: 22px;
  }
  .project-hero-bottom {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .project-tabs .project-link {
    margin-left: 0;
  }
  .project-toolbar {
    padding: 18px;
  }
  .project-filters {
    padding: 0 18px 18px;
  }
  .project-heading h1 {
    font-size: 25px;
  }
  .report-intro {
    flex-wrap: wrap;
  }
  .project-card {
    padding: 18px;
  }
  .project-files > div {
    flex-wrap: wrap;
  }
  .project-activity li > div {
    flex-direction: column;
    gap: 6px;
  }
  .project-stat-strip {
    padding: 20px 0;
  }
  .project-stat-strip strong {
    font-size: 21px;
  }
  .project-phases {
    padding: 8px 16px;
  }
  .project-phases li {
    gap: 10px;
  }
  .project-phases strong {
    font-size: 13px;
  }
  .nav .nav-group-title {
    grid-column: 1/-1;
    margin: 14px 8px 4px;
  }
  .material-table-wrap {
    max-width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
  .access-bubbles span {
    transform: none;
  }
}
@media print {
  .workspace:has(.editor, .calculation-layout) > main,
  .editor,
  .calculation-layout,
  .preview-wrap,
  #calculation-form,
  .editor-form {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .access-art,
  .access-bubbles {
    display: none;
  }
  .project-report {
    font-size: 10pt !important;
  }
  .project-report > header {
    border-bottom: 3px solid #087abc;
    padding-bottom: 18px;
    margin-bottom: 18px;
  }
  .project-report h1 {
    font-size: 22pt;
  }
  .project-report .project-section {
    border: 0;
    border-radius: 0;
    margin: 20px 0;
    overflow: visible;
  }
  .project-report .project-section > header {
    padding: 8px 0;
    break-after: avoid;
  }
  .project-report .table-wrap {
    overflow: visible;
  }
  .project-report table {
    min-width: 0;
    width: 100%;
    font-size: 9pt;
  }
  .project-report tr {
    break-inside: avoid;
  }
  .project-report th,
  .project-report td {
    padding: 7px;
  }
  .project-report button {
    display: none;
  }
  .project-report .project-stat-strip {
    padding: 10px 0;
    break-inside: avoid;
  }
  .project-report .project-stat-strip strong {
    font-size: 14pt;
  }
  .project-report .project-stat-strip > div {
    padding: 0 10px;
  }
  .project-report > footer {
    border-top: 1px solid #aaa;
    padding-top: 12px;
    font-size: 8pt;
  }
  .project-report .project-details {
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 28px;
  }
  .project-report .project-files {
    padding: 0;
  }
  .project-report .project-empty {
    padding: 12px 0;
  }
  .project-report .project-activity li {
    break-inside: avoid;
    padding: 12px 0;
  }
  .project-report {
    page: projectreport;
  }
}
@page projectreport {
  size: A4;
  margin: 16mm;
  @bottom-right {
    content: "Pagina " counter(page) " / " counter(pages);
    font:
      8pt "Segoe UI",
      sans-serif;
    color: #52677b;
  }
}

.material-table .required-star {
  display: none;
}
@media screen and (min-width: 1200px) {
  body:has(.editor, .calculation-layout) {
    min-height: 100dvh;
    height: auto;
    overflow: visible;
  }
}

.startup-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: #10283f;
  color: white;
}
.startup-screen strong {
  font-size: 30px;
  letter-spacing: -0.8px;
}
.startup-screen > span:last-child {
  font-size: 14px;
  color: #b8d0e3;
}
.startup-mark {
  width: 48px;
  height: 48px;
  border: 2px solid #3b6788;
  border-top-color: #48bdff;
  border-radius: 50%;
  animation: startup-turn 1.2s linear infinite;
}
@keyframes startup-turn {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .startup-mark {
    animation: none;
  }
}

.payment-fields > label > .required-star {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  margin: 0;
}
.payment-fields > label > .payment-label {
  grid-column: 2;
  grid-row: 1;
}
.payment-fields > label > input {
  grid-column: 3;
  grid-row: 1;
  width: 100px;
}
.paper.reference-invoice {
  color: #18344d;
  border-top: 6px solid #087ba5;
}
.paper.reference-invoice .reference-header {
  padding-top: 20px;
  border-bottom: 1px solid #ccdce5;
  padding-bottom: 22px;
  margin-bottom: 24px;
}
.paper.reference-invoice .reference-header h2 {
  color: #123c59;
  font-size: 30px;
  letter-spacing: -0.5px;
}
.paper.reference-invoice .reference-logo img {
  max-width: 130px;
  max-height: 115px;
}
.paper.reference-invoice .reference-meta {
  background: #eef5f8;
  padding: 14px;
  border-radius: 6px;
}
.paper.reference-invoice .reference-meta > div {
  gap: 12px;
  margin-bottom: 8px;
}
.paper.reference-invoice .reference-client {
  border-left: 3px solid #087ba5;
  padding-left: 14px;
  margin-top: 24px;
}
.paper.reference-invoice .reference-project {
  padding: 12px 0;
}
.paper.reference-invoice .reference-invoice-table {
  border: 0;
}
.paper.reference-invoice .reference-invoice-table th {
  background: #173f59;
  color: white;
  padding: 14px 12px;
}
.paper.reference-invoice .reference-invoice-table td {
  border: 0;
  border-bottom: 1px solid #d7e3eb;
  padding: 12px;
}
.paper.reference-invoice .reference-invoice-table th {
  border: 0;
}
.paper.reference-invoice .reference-invoice-table .invoice-description td {
  padding: 7px 12px;
  color: #41586a;
}
.paper.reference-invoice .reference-invoice-table .invoice-total td {
  background: #e7f3f7;
  color: #123c59;
  border-top: 2px solid #087ba5;
  font-size: 16px;
  padding: 16px 12px;
}
.paper.reference-invoice .reference-footer {
  color: #526c7e;
  border-top: 1px solid #cbdde6;
}
@media print {
  .paper.reference-invoice {
    border-top: 5px solid #087ba5 !important;
  }
}

.mail-pdf-preview {
  margin-top: 24px;
  border: 1px solid #cbdbe7;
  border-radius: 12px;
  overflow: hidden;
  background: #edf3f8;
}
.mail-pdf-preview > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
}
.mail-pdf-preview > header strong {
  overflow-wrap: anywhere;
  min-width: 0;
  flex: 1;
}
.mail-pdf-preview iframe {
  display: block;
  width: 100%;
  height: 70vh;
  min-height: 360px;
  border: 0;
  background: #e3e9ee;
}

body:has(.access-layout),
body:has(.access-screen),
body:has(.login-layout),
body:has(.auth-stage) {
  margin: 0;
  padding: 0;
  max-width: none;
}
.reference-meta dt {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}
.reference-meta > div {
  grid-template-columns: max-content minmax(0, 1fr);
}
.paper.reference-invoice .reference-header {
  grid-template-columns: minmax(0, 1.2fr) minmax(70px, 0.6fr) minmax(230px, 1fr);
}

main.access-page {
  max-width: none;
  width: 100%;
  margin: 0;
  min-height: 100dvh;
}

.business-stack {
  display: grid;
  gap: 24px;
  padding: 28px;
}
#business-root:has(.business-analysis) {
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.business-analysis {
  --analysis-navy: #12364c;
  --analysis-blue: #0874b8;
  --analysis-line: #dce7ee;
  --analysis-muted: #526b7b;
  padding: 0;
  gap: 22px;
  color: var(--analysis-navy);
  font-variant-numeric: tabular-nums;
}
.analysis-icon {
  width: 18px;
  height: 18px;
  flex: none;
  vertical-align: middle;
}
.business-analysis button,
.business-analysis select,
.analysis-more summary {
  min-height: 44px;
  border-radius: 10px;
  font-size: 13px;
}
.business-analysis button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 160ms,
    border-color 160ms,
    box-shadow 160ms,
    transform 160ms;
}
.business-analysis button:active {
  transform: scale(0.98);
}
.business-analysis :focus-visible,
.analysis-details :focus-visible {
  outline: 3px solid #1585ce;
  outline-offset: 3px;
}
.business-toolbar,
.business-card-head,
.business-project-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.business-toolbar {
  flex-wrap: wrap;
}
.business-toolbar .actions {
  margin: 0;
  gap: 8px;
  flex-wrap: wrap;
}
.business-toolbar button {
  padding: 10px 13px;
}
.business-toolbar [data-business="assistant"] {
  color: white;
  background: #123c59;
  border-color: #123c59;
  box-shadow: 0 4px 10px #123c5914;
}
.business-toolbar [data-business="assistant"]:hover {
  background: #075c88;
}
.business-asof {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--analysis-muted);
}
.analysis-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #168466;
  box-shadow: 0 0 0 4px #1684660c;
  margin: 0 4px;
}
.analysis-private {
  border-left: 1px solid #cad9e4;
  padding-left: 10px;
  margin-left: 4px;
}
.analysis-more {
  position: relative;
}
.analysis-more summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border: 1px solid #cbdce8;
  cursor: pointer;
  background: white;
  list-style: none;
}
.analysis-more summary::-webkit-details-marker {
  display: none;
}
.analysis-more[open] summary {
  background: #e8f3fa;
}
.analysis-more > div {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  width: 238px;
  padding: 6px;
  border: 1px solid var(--analysis-line);
  background: white;
  border-radius: 13px;
  box-shadow: 0 16px 45px #173d5626;
}
.analysis-more > div button {
  width: 100%;
  justify-content: flex-start;
  border: 0;
}
.analysis-nav {
  position: sticky;
  top: 8px;
  z-index: 5;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 7px;
  border: 1px solid var(--analysis-line);
  border-radius: 14px;
  background: #ffffffed;
}
.analysis-nav button {
  border: 0;
  background: transparent;
  color: #526b7b;
  padding: 10px 16px;
}
.analysis-nav button[aria-current] {
  background: #12364c;
  color: white;
  box-shadow: 0 3px 8px #12364c1a;
}
.analysis-nav button:hover:not([aria-current]) {
  background: #eaf3f9;
  color: #12364c;
}
.analysis-nav > span {
  margin-left: auto;
  padding: 0 12px;
  font-size: 12px;
  color: #617785;
}
.business-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  overflow: hidden;
  border: 1px solid var(--analysis-line);
  border-radius: 20px;
  background: white;
  box-shadow: 0 6px 26px #153c5905;
  animation: business-arrive 380ms ease-out both;
}
.business-hero-main {
  position: relative;
  padding: 30px 32px;
  background: #11364e;
  color: #fff;
  overflow: hidden;
}
.business-hero-main:after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  border: 1px solid #8ad6ff20;
  border-radius: 32px;
  transform: rotate(35deg);
  right: -85px;
  top: -70px;
  pointer-events: none;
  box-shadow:
    0 0 0 25px #8ad6ff07,
    0 0 0 50px #8ad6ff04;
}
.analysis-eyebrow {
  display: block;
  color: #527084;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.13em;
  line-height: 1.5;
  margin-bottom: 9px;
}
.business-hero-main .analysis-eyebrow {
  color: #9acbdf;
}
.business-hero-main h2 {
  color: #deedf5;
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 13px;
}
.business-hero-main > strong {
  display: block;
  font-size: clamp(29px, 3.3vw, 47px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.business-hero-main > span:not(.analysis-eyebrow) {
  display: block;
  margin: 12px 0 18px;
  font-size: 12px;
  color: #b8d5e6;
}
.business-hero-main button {
  border-color: #7197ad;
  background: transparent;
  color: #f2faff;
  padding: 9px 13px;
  min-height: 38px;
}
.business-hero-main button:hover {
  background: #ffffff14;
}
.business-hero-side {
  min-width: 0;
  padding: 32px;
  align-self: center;
}
.business-balance-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.business-balance-pair > button {
  display: block;
  padding: 8px 0;
  text-align: left;
  border: 0;
  background: transparent;
  color: #12364c;
  min-width: 0;
}
.business-balance-pair > button:hover {
  background: #f2f7fb;
  box-shadow: 0 0 0 9px #f2f7fb;
}
.business-balance-pair span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #536b7e;
  font-size: 12px;
}
.business-balance-pair span svg {
  width: 14px;
  margin-left: auto;
}
.business-balance-pair strong {
  display: block;
  font-size: clamp(20px, 2.3vw, 30px);
  letter-spacing: -0.04em;
  margin: 9px 0;
  overflow-wrap: anywhere;
}
.business-balance-pair small {
  display: block;
  font-size: 11px;
  color: #536b7e;
  font-weight: 400;
}
.analysis-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2e9cce;
  flex: none;
}
.analysis-dot.due {
  background: #be7427;
}
.business-balance-bar {
  height: 7px;
  background: #2e9cce;
  margin-top: 24px;
  border-radius: 10px;
  overflow: hidden;
}
.business-balance-bar span {
  display: block;
  width: var(--bar-width);
  height: 100%;
  background: #d59a53;
  transform-origin: left;
  animation: business-grow-x 600ms ease-out both;
}
.analysis-balance-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  font-size: 11px;
  color: #607383;
}
.business-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.business-kpis button.stat {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  text-align: left;
  min-width: 0;
  padding: 21px;
  border: 1px solid var(--analysis-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}
.business-kpis button.stat:hover {
  border-color: #93bbd1;
  background: #fafdff;
  box-shadow: 0 6px 20px #1745610b;
}
.business-kpis .stat-top {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #496579;
  font-size: 12px;
  font-weight: 550;
}
.business-kpis .stat-top > svg:last-child {
  margin-left: auto;
  width: 14px;
  color: #658396;
}
.business-kpis .stat strong {
  display: block;
  margin: 17px 0 10px;
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.business-kpis .stat-detail {
  font-weight: 400;
  color: #597182;
  font-size: 11px;
  line-height: 1.5;
}
.business-data-note,
.business-card-note {
  margin: 0;
  font-size: 12px;
  color: #597182;
  line-height: 1.6;
}
.business-data-note {
  display: flex;
  gap: 8px;
  align-items: center;
}
.analysis-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  scroll-margin-top: 86px;
}
.analysis-section-heading h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.035em;
}
.analysis-section-heading .analysis-eyebrow {
  margin-bottom: 4px;
}
.analysis-section-heading > span {
  color: #526a7a;
  font-size: 12px;
}
.business-insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}
.business-card {
  min-width: 0;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--analysis-line);
  border-radius: 17px;
}
.business-card-head {
  align-items: flex-start;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.business-card-head h2,
.business-card-head h3 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: -0.025em;
  font-weight: 650;
}
.business-card-head p {
  margin: 0;
  color: #587083;
  font-size: 12px;
  line-height: 1.5;
}
.business-analysis .analysis-select {
  display: block;
  width: auto;
}
.analysis-select select {
  padding: 8px 30px 8px 11px;
  height: auto;
  background-color: #f8fafc;
  min-width: 0;
  width: auto;
  max-width: 100%;
  font-size: 12px;
  font-weight: 500;
}
.analysis-segment {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: #edf3f7;
  border-radius: 10px;
}
.analysis-segment button {
  background: transparent;
  border: 1px solid transparent;
  color: #526d80;
  min-height: 36px;
  padding: 7px 11px;
  font-size: 12px;
  border-radius: 8px;
}
.analysis-segment button[aria-pressed="true"] {
  color: #12364c;
  background: white;
  border-color: #dde7ee;
  box-shadow: 0 2px 3px #14354c0a;
}
.analysis-chart-summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin: 23px 0 25px;
}
.analysis-chart-summary strong {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.04em;
  display: block;
  line-height: 1.15;
}
.analysis-chart-summary span {
  font-size: 11px;
  color: #536d80;
}
.analysis-chart-summary > span {
  text-align: right;
}
.analysis-chart-summary small {
  display: block;
  margin-top: 5px;
  font-size: 10px;
}
.analysis-chart-axis {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #5c7586;
  gap: 12px;
}
.business-week-chart {
  display: grid;
  grid-template-columns: repeat(var(--week-columns), minmax(24px, 1fr));
  gap: 6px;
  max-width: 100%;
  padding: 6px 0 0;
  overflow-x: auto;
  background: repeating-linear-gradient(
    to top,
    transparent 0 49px,
    #e9f0f5 49px 50px
  );
  border-bottom: 1px solid #e4edf3;
}
.business-analysis button.business-week {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0;
  padding: 0 2px;
  min-width: 24px;
  border: 0;
  border-radius: 6px 6px 0 0;
  background: transparent;
  outline-offset: -3px;
}
.business-analysis button.business-week:hover {
  background: #e5f1f980;
}
.business-week-count {
  height: 20px;
  font-size: 11px;
  font-weight: 600;
  color: #42617a;
}
.business-week-track {
  display: flex;
  align-items: flex-end;
  height: 155px;
  width: min(36px, 75%);
}
.business-week-fill {
  display: block;
  width: 100%;
  height: var(--bar-height);
  border-radius: 5px 5px 0 0;
  background: #7dbad7;
  transform-origin: bottom;
  animation: business-grow-y 500ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.business-week.is-current .business-week-fill,
.business-week:hover .business-week-fill,
.business-week:focus-visible .business-week-fill {
  background: #0874b8;
}
.business-week-label {
  display: block;
  width: 100%;
  margin-top: 0;
  padding: 11px 0;
  font-size: 10px;
  color: #4a6a80;
  background: white;
}
.business-week.is-current .business-week-label {
  color: #0669a4;
  font-weight: 750;
}
.analysis-chart-hint {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #597182;
  margin-top: 12px;
  font-size: 11px;
}
.analysis-chart-hint svg {
  width: 15px;
}
.business-chart-data {
  margin-top: 18px;
  border-top: 1px solid #e6eef3;
  padding-top: 4px;
  font-size: 12px;
  color: #246187;
}
.business-chart-data summary {
  cursor: pointer;
  padding: 13px 0;
  font-weight: 600;
  min-height: 44px;
}
.analysis-quote-status {
  border-top: 1px solid #e5edf3;
  margin-top: 20px;
  padding-top: 22px;
}
.analysis-quote-status > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 19px;
}
.analysis-quote-status > div:first-child strong {
  font-size: 13px;
  font-weight: 600;
}
.analysis-quote-status > div:first-child span {
  font-size: 10px;
  color: #536d80;
}
.analysis-status-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  margin: 15px 0;
  font-size: 11px;
  color: #506c7e;
}
.analysis-status-row strong {
  text-align: right;
  color: #25475f;
}
.analysis-status-track {
  height: 5px;
  background: #edf3f7;
  border-radius: 5px;
  overflow: hidden;
}
.analysis-status-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.status-accepted {
  background: #248b85;
}
.status-open {
  background: #278dbf;
}
.status-draft {
  background: #a6bac8;
}
.status-rejected {
  background: #bd8865;
}
.analysis-cost-summary {
  padding: 19px;
  background: #f3f8fb;
  border: 1px solid #e5eef4;
  border-radius: 12px;
  margin-bottom: 23px;
}
.analysis-cost-summary > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.analysis-cost-summary > div:first-child span {
  font-size: 12px;
  color: #526c80;
}
.analysis-cost-summary > div:first-child strong {
  font-size: 23px;
  letter-spacing: -0.035em;
}
.analysis-cost-stack {
  display: flex;
  height: 9px;
  overflow: hidden;
  border-radius: 7px;
  background: #dfeaf1;
  margin: 17px 0;
}
.analysis-cost-stack > span {
  height: 100%;
}
.cost-materialCost {
  background: #1179b4;
}
.cost-labourCost {
  background: #5caec6;
}
.cost-otherCost {
  background: #a6bcca;
}
.analysis-cost-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.analysis-cost-legend > span {
  font-size: 10px;
  color: #4d6a7e;
}
.analysis-cost-legend i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  margin-right: 5px;
}
.analysis-cost-legend strong {
  display: block;
  color: #234b65;
  font-size: 12px;
  font-weight: 600;
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.analysis-cost-summary p {
  font-size: 10px;
  color: #5c7485;
  margin: 15px 0 0;
}
.analysis-project-label {
  font-size: 10px;
  color: #5a7385;
  margin-bottom: 17px;
}
.business-balance-bar.is-empty {
  background: #e1eaf0;
}
.business-project-list {
  display: grid;
  gap: 20px;
}
.business-project-row + .business-project-row {
  padding-top: 18px;
  border-top: 1px solid #e9eff4;
}
.business-project-row summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  min-height: 44px;
}
.business-project-row summary::-webkit-details-marker {
  display: none;
}
.analysis-project-index {
  font-size: 11px;
  color: #587a8f;
  font-weight: 600;
  width: 25px;
  flex: none;
}
.analysis-project-name {
  min-width: 0;
  flex: 1;
}
.analysis-project-name strong {
  font-size: 13px;
  font-weight: 650;
  display: block;
  overflow-wrap: anywhere;
}
.analysis-project-name small {
  display: block;
  font-size: 10px;
  color: #5a788b;
  margin-top: 3px;
}
.business-project-result {
  color: #19674f;
  font-size: 14px;
  font-weight: 650;
  text-align: right;
}
.business-project-result small {
  font-size: 9px;
  font-weight: 400;
  display: block;
  margin-bottom: 2px;
  color: #607987;
}
.business-project-result.is-negative {
  color: #a03c30;
}
.business-project-row summary > svg {
  width: 14px;
  transition: transform 180ms;
}
.business-project-row details[open] summary > svg {
  transform: rotate(180deg);
}
.analysis-cost-detail {
  background: #f3f7fa;
  padding: 13px;
  border-radius: 10px;
  margin-top: 14px;
  animation: business-arrive 180ms ease-out;
}
.analysis-cost-detail dl {
  margin: 0 0 10px;
}
.analysis-cost-detail dl > div {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  font-size: 12px;
  margin: 5px 0;
}
.analysis-cost-detail dd {
  margin: 0;
  font-weight: 600;
}
.analysis-cost-detail button {
  background: white;
  font-size: 12px;
}
.business-project-track {
  height: 7px;
  margin: 14px 0 8px;
  border-radius: 8px;
  overflow: hidden;
  background: #e3f0f7;
}
.business-project-cost {
  display: block;
  width: var(--bar-width);
  height: 100%;
  border-radius: inherit;
  background: #2684b0;
  transform-origin: left;
  animation: business-grow-x 500ms ease-out both;
}
.business-project-cost.is-over {
  background: #b46947;
}
.business-project-foot {
  font-size: 10px;
  color: #526d80;
}
.business-project-card > .business-card-note {
  border-top: 1px solid #e7eef4;
  padding-top: 17px;
  margin-top: 24px;
}
.business-empty {
  padding: 45px 22px;
  background: #f3f8fb;
  color: #577184;
  border-radius: 12px;
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
}
.business-empty strong {
  display: block;
  color: #254b64;
  font-size: 15px;
}
.business-empty p {
  margin-bottom: 0;
}
.business-regions {
  scroll-margin-top: 86px;
}
.business-hero {
  scroll-margin-top: 86px;
}
.analysis-region-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}
.analysis-map-panel {
  border: 1px solid #dce8f0;
  background: #f3f8fb;
  border-radius: 12px;
  padding: 18px;
  min-width: 0;
}
.analysis-map-caption {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
  color: #506d80;
  font-size: 10px;
}
.analysis-map-caption > span:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #2c536b;
}
.analysis-map-panel .empty {
  padding: 55px 16px;
  color: #526f82;
  font-size: 13px;
  line-height: 1.7;
}
.analysis-region-overview {
  min-width: 0;
}
.analysis-region-total {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 4px 0 22px;
}
.analysis-region-total strong {
  font-size: 38px;
  font-weight: 650;
  letter-spacing: -0.04em;
}
.analysis-region-total span {
  color: #587185;
  font-size: 12px;
  line-height: 1.6;
}
.business-analysis .table-wrap {
  border: 1px solid #e0eaf1;
  border-radius: 10px;
}
.business-analysis th {
  background: #f5f8fb;
  font-size: 10px;
  color: #536f83;
  font-weight: 600;
  white-space: nowrap;
}
.business-analysis td {
  font-size: 12px;
}
.business-analysis td,
.business-analysis th {
  padding: 13px 14px;
}
.business-analysis tbody tr:hover {
  background: #f3f9fd;
}
.analysis-region-count {
  display: inline-block;
  border-radius: 5px;
  padding: 2px 8px;
  color: #126288;
  background: #e9f4fa;
}
.analysis-region-foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #e4ecf2;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  color: #5a7385;
  font-size: 11px;
}
.analysis-region-foot details {
  max-width: 440px;
}
.analysis-region-foot summary {
  cursor: pointer;
  min-height: 28px;
  font-weight: 600;
  color: #256484;
}
.analysis-region-foot p {
  line-height: 1.7;
}
.region-heatmap {
  width: 100%;
  height: auto;
  max-height: 380px;
  margin-top: 15px;
  border-radius: 8px;
}
.region-heatmap text {
  font: 11px system-ui;
  fill: #254860;
}
.region-heatmap .region-map-label {
  font-size: 13px;
  font-weight: 600;
  paint-order: stroke;
  stroke: #eef6fa;
  stroke-width: 4px;
  stroke-linejoin: round;
}
.region-heatmap + p {
  font-size: 10px;
  line-height: 1.6;
}
.analysis-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 5px;
  font-size: 12px;
  color: #536d80;
}
.analysis-footer > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.analysis-footer button {
  white-space: nowrap;
  background: transparent;
}
dialog.analysis-details {
  width: min(900px, calc(100vw - 32px));
  max-height: 85dvh;
  padding: 0;
  border: 1px solid #d9e7f0;
  border-radius: 18px;
  color: #193d56;
  box-shadow: 0 24px 80px #0b2b4940;
}
.analysis-details[open] {
  animation: analysis-dialog-in 200ms ease-out;
}
.analysis-details::backdrop {
  background: #102e4c70;
  backdrop-filter: blur(3px);
}
.analysis-details header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #e1ebf2;
}
.analysis-details h2 {
  margin: 0;
  font-size: 21px;
}
.analysis-details header button {
  min-width: 44px;
  min-height: 44px;
  font-size: 23px;
}
.analysis-details-body {
  padding: 24px;
}
.analysis-details footer {
  padding: 16px 24px;
  font-size: 12px;
  background: #f4f8fb;
  color: #536b7e;
}
.analysis-details td,
.analysis-details th {
  font-size: 13px;
}
@keyframes business-arrive {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes business-grow-x {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes business-grow-y {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}
@keyframes analysis-dialog-in {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(5px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@media (max-width: 1250px) {
  .analysis-nav > span {
    display: none;
  }
  .analysis-region-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .business-analysis {
    padding: 0 !important;
    gap: 16px;
  }
  .business-analysis .business-hero {
    padding: 0;
    gap: 0;
  }
  .business-hero-main {
    padding: 24px;
  }
  .business-analysis .business-hero-side {
    padding: 24px;
  }
  .business-analysis .business-hero-main > strong {
    font-size: 32px;
  }
  .analysis-private,
  .analysis-nav .analysis-icon {
    display: none;
  }
  .business-toolbar .actions {
    width: 100%;
  }
  .business-toolbar .actions > button {
    flex: 1 1 auto;
  }
  .analysis-nav {
    gap: 0;
    padding: 4px;
  }
  .analysis-nav button {
    flex: 1;
    font-size: 10px;
    padding: 8px 6px;
  }
  .business-analysis .business-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .business-kpis button.stat {
    padding: 15px;
  }
  .business-kpis .stat strong {
    font-size: 23px;
  }
  .business-kpis .stat-top {
    font-size: 11px;
    flex-wrap: wrap;
  }
  .business-kpis .stat-top > svg {
    display: none;
  }
  .analysis-section-heading {
    align-items: start;
  }
  .analysis-section-heading > span {
    display: none;
  }
  .analysis-section-heading h2 {
    font-size: 20px;
  }
  .analysis-region-foot,
  .analysis-footer {
    flex-direction: column;
    align-items: start;
  }
  .analysis-project-index {
    display: none;
  }
  .analysis-chart-summary {
    gap: 8px;
    flex-wrap: wrap;
  }
  .analysis-chart-summary strong {
    font-size: 25px;
  }
  .analysis-details header,
  .analysis-details-body {
    padding: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .business-analysis *,
  .analysis-details {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

dialog.business-assistant {
  width: min(540px, calc(100vw - 32px));
  max-width: none;
  height: min(760px, calc(100dvh - 32px));
  max-height: none;
  margin: 16px 16px 16px auto;
  padding: 0;
  border: 1px solid #dbe7f0;
  border-radius: 20px;
  box-shadow: 0 24px 80px #0c26394d;
  color: #163b54;
  overflow: hidden;
}
dialog.business-assistant[open] {
  display: flex;
  flex-direction: column;
  animation: assistant-enter 0.25s ease-out;
}
.business-assistant header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border-bottom: 1px solid #e2eaf1;
  background: #f6faff;
}
.business-assistant header h2 {
  font-size: 20px;
  margin: 0 0 5px;
}
.business-assistant header span {
  font-size: 12px;
  color: #49677d;
}
.business-assistant header button {
  padding: 5px 13px;
  min-width: 40px;
  font-size: 23px;
}
.assistant-messages {
  flex: 1;
  overflow: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overscroll-behavior: contain;
}
.assistant-messages > p,
.assistant-answer {
  padding: 16px 18px;
  background: #eff5f9;
  border-radius: 14px;
  line-height: 1.65;
  font-size: 14px;
  margin: 0;
}
.assistant-messages p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.assistant-messages p.assistant-question {
  background: #e0effa;
  align-self: flex-end;
  margin-left: 40px;
}
.assistant-answer p {
  margin: 0 0 12px;
}
.assistant-answer small {
  color: #49677d;
  overflow-wrap: anywhere;
}
.business-assistant form {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  border-top: 1px solid #e2eaf1;
}
.business-assistant textarea {
  resize: vertical;
  min-height: 70px;
  max-height: 140px;
  padding: 12px;
  font-size: 14px;
}
@keyframes assistant-enter {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  dialog.business-assistant[open] {
    animation: none;
  }
  .business-hero,
  .business-balance-bar span,
  .business-week-fill,
  .business-project-cost {
    animation: none;
  }
  .business-week-tip {
    transition: none;
  }
}
@media (max-width: 1250px) {
  .business-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .business-insight-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1000px) {
  .business-hero {
    grid-template-columns: 1fr;
    gap: 23px;
  }
  .top-right {
    flex-wrap: wrap;
  }
}
@media (max-width: 620px) {
  .business-stack {
    padding: 16px;
    gap: 16px;
  }
  .business-hero {
    padding: 25px 21px;
  }
  .business-hero-main > strong {
    font-size: 34px;
  }
  .business-hero-side {
    padding: 17px;
  }
  .business-balance-pair {
    gap: 12px;
  }
  .business-kpis {
    grid-template-columns: 1fr;
  }
  .business-card {
    padding: 21px 18px;
  }
  .business-card-head {
    flex-wrap: wrap;
    margin-bottom: 18px;
  }
  .business-project-heading,
  .business-project-foot {
    flex-wrap: wrap;
    gap: 5px 12px;
  }
  .business-assistant form {
    grid-template-columns: 1fr;
  }
}
.business-report > section {
  margin: 20px 0;
}
.business-report > section h2 {
  font-size: 18px;
  margin: 0 0 10px;
  break-after: avoid-page;
}
@media print {
  .business-report > section h2 {
    font-size: 14pt;
    break-after: avoid;
  }
  .business-report table {
    break-before: avoid;
  }
  .business-report th,
  .business-report td {
    padding: 6px 7px !important;
  }
  .business-report thead {
    display: table-header-group;
  }
  .business-report tr {
    break-inside: avoid;
  }
}
/* Invoice studio: one renderer for the canvas, preview, print and PDF. */
.paper.invoice-canvas {
  width: 210mm;
  min-height: 297mm;
  max-width: none;
  box-sizing: border-box;
  padding: var(--invoice-margin);
  border-top: 0;
  font-family: Arial, sans-serif;
  line-height: 1.45;
  color: #18344d;
  overflow-wrap: break-word;
}
.invoice-grid {
  display: block;
}
.invoice-layout-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--invoice-gap);
  align-items: start;
  margin-bottom: var(--invoice-gap);
  break-inside: avoid;
}
.invoice-layout-row:last-child {
  margin-bottom: 0;
}
.preview-wrap .invoice-canvas {
  zoom: var(--invoice-preview-zoom, 1);
}
.invoice-block {
  position: relative;
  min-width: 0;
  box-sizing: border-box;
  break-inside: avoid;
}
.paper .invoice-block h2,
.paper .invoice-block h3 {
  font: inherit;
  color: inherit;
  margin: 0;
  letter-spacing: -0.4px;
}
.paper .invoice-block p {
  font: inherit;
  line-height: 1.55;
  margin: 0 0 2mm;
  white-space: normal;
}
.paper .invoice-block p:last-child {
  margin-bottom: 0;
}
.paper .invoice-block strong {
  font-weight: 700;
}
.invoice-logo-frame {
  width: 100%;
  aspect-ratio: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.invoice-logo-frame img {
  width: 100%;
  height: auto;
  max-width: none;
  object-fit: contain;
  filter: brightness(1.035);
  mix-blend-mode: multiply;
}
.invoice-meta,
.invoice-totals {
  margin: 0;
}
.invoice-meta > div,
.invoice-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 3mm;
  margin: 0 0 2mm;
  flex-wrap: wrap;
}
.invoice-meta dt {
  font-weight: 700;
  white-space: nowrap;
}
.invoice-meta dd,
.invoice-totals dd {
  margin: 0;
  text-align: right;
  margin-left: auto;
}
.invoice-meta dd {
  overflow-wrap: anywhere;
}
.invoice-totals dd {
  white-space: nowrap;
  font-weight: 600;
}
.invoice-totals .invoice-grand {
  border-top: 2px solid var(--invoice-accent);
  padding-top: 3mm;
  margin-top: 3mm;
  font-weight: 700;
  font-size: 1.15em;
}
.paper .invoice-details {
  width: 100%;
  font: inherit;
  border: 0;
  border-collapse: collapse;
  margin: 0;
}
.paper .invoice-details th {
  background: var(--invoice-accent);
  color: #09283c;
  text-transform: none;
  letter-spacing: 0;
  font: inherit;
  font-weight: 700;
  border: 0;
  padding: 3mm;
}
.paper .invoice-details td {
  font: inherit;
  border: 0;
  border-bottom: 1px solid #dbe6ed;
  padding: 4mm 3mm;
  vertical-align: top;
}
.paper .invoice-details th:last-child,
.paper .invoice-details td:last-child {
  text-align: right;
  white-space: nowrap;
}
.invoice-block hr {
  border: 0;
  border-top: 1px solid currentColor;
  margin: 2mm 0;
}
.invoice-term-heading {
  display: flex;
  justify-content: space-between;
  gap: 3mm;
  flex-wrap: wrap;
}
.invoice-term-steps {
  display: flex;
  gap: 2mm;
  flex-wrap: wrap;
  margin: 3mm 0;
}
.invoice-term-steps span {
  padding: 1mm 3mm;
  border: 1px solid #c2d8e6;
  border-radius: 1mm;
  font-size: 10px;
}
.invoice-term-steps .current {
  background: var(--invoice-accent);
  color: #09283c;
  border-color: var(--invoice-accent);
  font-weight: 700;
}
.invoice-block small {
  font-size: 0.85em;
}
.invoice-designer {
  width: calc(100vw - 32px);
  max-width: 1800px;
  height: calc(100dvh - 32px);
  max-height: none;
  padding: 0;
  border: 1px solid #c8d7e3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 100px #071f4650;
}
.invoice-designer[open] {
  display: flex;
  flex-direction: column;
}
.invoice-designer::backdrop {
  background: #0b223e88;
  backdrop-filter: blur(4px);
}
.designer-top {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 24px;
  border-bottom: 1px solid #e1e9ef;
  background: white;
}
.designer-top h2 {
  font-size: 22px;
  margin: 3px 0 0;
  letter-spacing: -0.5px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: #52718c;
}
.designer-history {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.designer-history button {
  font-size: 24px;
  padding: 0 12px;
  min-height: 38px;
}
.designer-top-actions {
  display: flex;
  gap: 8px;
}
.designer-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 10px 24px;
  background: #f9fbfd;
  border-bottom: 1px solid #dde7ee;
}
.designer-toolbar > div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.designer-toolbar button {
  padding: 7px 11px;
  min-height: 36px;
  font-size: 12px;
}
.designer-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.designer-toolbar select {
  margin: 0;
  width: 88px;
  padding: 7px;
}
.designer-toolbar .designer-mobile-picker {
  display: none;
}
.designer-body {
  display: grid;
  grid-template-columns: 215px minmax(240px, 1fr) 265px;
  min-height: 0;
  flex: 1;
}
.designer-layers,
.designer-properties {
  overflow: auto;
  padding: 22px 16px;
  background: white;
}
.designer-layers {
  border-right: 1px solid #dde7ee;
}
.designer-properties {
  border-left: 1px solid #dde7ee;
}
.designer-layers h3,
.designer-properties h3 {
  font-size: 16px;
  margin: 0 0 10px;
}
.designer-layers p,
.designer-layers small,
.designer-properties small {
  font-size: 11px;
  line-height: 1.6;
  color: #52687a;
}
[data-layers] {
  display: grid;
  gap: 4px;
  margin: 18px -5px;
}
[data-layers] button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 7px;
  border: 1px solid transparent;
  text-align: left;
  font-size: 12px;
  background: transparent;
  box-shadow: none;
}
[data-layers] button small {
  margin-left: auto;
  font-size: 10px;
  white-space: nowrap;
}
[data-layers] button.active {
  background: #e8f5ff;
  border-color: #a9d9f5;
  color: #005984;
}
.layer-grip {
  font-size: 17px;
  color: #718597;
}
.designer-layers details {
  border-top: 1px solid #dde7ee;
  padding-top: 14px;
  margin-top: 18px;
}
.designer-layers summary {
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 12px;
}
.designer-stage {
  background: #e9eff4;
  overflow: auto;
  padding: 35px;
  position: relative;
  overscroll-behavior: contain;
}
.designer-paper-space {
  margin: 0 auto;
}
.designer-stage .invoice-canvas {
  box-shadow: 0 8px 28px #193e5317;
}
.designer-stage.show-grid .invoice-grid {
  background-image: linear-gradient(to right, #b9d8e226 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
}
.designer-stage .invoice-block {
  cursor: grab;
  outline: 1px dashed #9bb6c366;
  outline-offset: 3px;
  touch-action: none;
}
.designer-stage .invoice-block.selected {
  outline: 2px solid #068bd4;
  outline-offset: 3px;
  z-index: 2;
}
.designer-stage .invoice-block:hover {
  outline-color: #078bd4;
}
.designer-stage .invoice-block.dragging {
  opacity: 0.75;
  cursor: grabbing;
  z-index: 5;
  box-shadow: 0 12px 30px #193e5333;
}
.designer-resize {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border: 1px solid white;
  background: #087bb6;
  cursor: ew-resize;
}
.designer-empty {
  display: block;
  font-size: 11px;
  color: #607b90;
  padding: 8px;
}
.designer-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.designer-properties label,
.designer-layers label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
}
.designer-properties input,
.designer-properties select,
.designer-properties textarea,
.designer-layers input {
  font-size: 12px;
  padding: 8px;
  min-width: 0;
  margin-top: 5px;
  border-radius: 7px;
}
.designer-properties input[type="color"],
.designer-layers input[type="color"] {
  width: 100%;
  height: 34px;
  padding: 3px;
}
.designer-properties fieldset {
  border: 0;
  border-top: 1px solid #dce6ed;
  padding: 16px 0 4px;
  margin-top: 16px;
  min-width: 0;
}
.designer-properties legend {
  font-size: 11px;
  font-weight: 700;
  color: #536d81;
  padding-right: 10px;
}
.designer-move {
  display: flex;
  gap: 6px;
  margin-top: 16px;
}
.designer-move button {
  flex: 1;
  padding: 6px;
  min-height: 32px;
}
.designer-block-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.designer-properties button {
  font-size: 12px;
}
.designer-layers .designer-default {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
  margin-top: 20px;
}
.designer-default input {
  width: 16px;
  height: 16px;
  flex: none;
  margin: 0;
}
.designer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background: white;
  border-top: 1px solid #dce6ed;
  padding: 11px 20px;
  font-size: 11px;
  color: #52687a;
}
.designer-status {
  color: #173b53;
}
.installment-overview {
  padding: 24px;
  background: white;
  border: 1px solid #dce7ef;
  border-radius: 16px;
  margin: 0 0 24px;
}
.installment-overview > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.installment-overview h2 {
  font-size: 20px;
  letter-spacing: -0.4px;
  margin: 4px 0 0;
}
.installment-count {
  padding: 7px 12px;
  border-radius: 30px;
  background: #eff6fa;
  font-size: 12px;
  color: #3c617c;
}
.installment-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.installment-card {
  border: 1px solid #d9e6ef;
  border-radius: 12px;
  padding: 18px;
  background: linear-gradient(150deg, #fff, #f6fafd);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.installment-card.paid {
  border-color: #add9cd;
  background: #f2fbf7;
}
.installment-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 10px;
}
.installment-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #e4f1fb;
  color: #0868a0;
  font-weight: 700;
}
.paid .installment-number {
  background: #d0f0df;
  color: #196447;
}
.installment-status {
  font-size: 11px;
  font-weight: 700;
  color: #4d677a;
}
.installment-card h3 {
  font-size: 14px;
  margin: 15px 0 8px;
}
.installment-card h3 small {
  font-weight: 400;
  color: #526f87;
}
.installment-amount {
  font-size: 24px;
  letter-spacing: -0.5px;
}
.installment-card p {
  font-size: 12px;
  color: #48657e;
  margin: 8px 0;
}
.installment-card > small {
  font-size: 11px;
  line-height: 1.5;
  color: #52697c;
  min-height: 34px;
  margin-bottom: 18px;
}
.installment-card button {
  width: 100%;
  margin-top: auto;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}
.installment-footnote {
  font-size: 11px;
  color: #546d81;
  margin: 16px 0 0;
}
.settings-page .settings {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.settings-page .settings > .required-legend {
  grid-column: 1/-1;
  margin-bottom: 0;
}
.settings-page #settings-text {
  grid-column: 1/-1;
}
.settings-nav {
  display: flex;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 12px;
  background: #f2f6faee;
  backdrop-filter: blur(14px);
  border: 1px solid #dce7ee;
  border-radius: 14px;
  margin-bottom: 24px;
  overflow: auto;
}
.settings-nav a {
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 8px;
  color: #294e6a;
  font-size: 13px;
  white-space: nowrap;
  transition:
    background 0.18s,
    color 0.18s;
}
.settings-nav a:hover,
.settings-nav a:focus-visible {
  background: #dfeff9;
  color: #075c91;
}
.settings-section {
  scroll-margin-top: 82px;
}
.settings-section .panel-head {
  background: linear-gradient(100deg, #fcfeff, #f3f8fb);
  border-radius: 14px 14px 0 0;
}
.settings-section .panel-head h2 {
  font-size: 18px;
  letter-spacing: -0.3px;
}
.design-launch {
  border: 1px solid #bcddec;
  border-radius: 12px;
  padding: 20px;
  background: linear-gradient(120deg, #ecf8fe, #f8fcfe);
}
.design-launch p {
  font-size: 13px;
  color: #496a83;
  margin: 6px 0 14px;
}
.account-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 30px;
  background: linear-gradient(115deg, #102d44, #195578);
  border-radius: 16px;
  color: white;
  margin-bottom: 24px;
}
.account-hero h2 {
  font-size: 23px;
  color: white;
  margin: 0 0 8px;
}
.account-hero p {
  color: #d2e6f2;
  font-size: 14px;
  margin: 0;
}
.account-summary {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.account-summary strong {
  font-size: 28px;
  display: block;
}
.account-summary span {
  font-size: 12px;
  color: #cee0ef;
}
.account-person {
  display: flex;
  align-items: center;
  gap: 12px;
}
.account-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #e8f3fa;
  color: #18557a;
  font-weight: 700;
  flex: none;
}
.account-role,
.account-state {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 6px;
  background: #edf3f8;
  font-size: 12px;
  color: #395a73;
}
.account-state.active {
  background: #e5f6ed;
  color: #226341;
}
.account-state.invited {
  background: #fff4d8;
  color: #80631b;
}
.account-state.disabled,
.account-state.deleted {
  background: #f3e9ec;
  color: #873e4b;
}
.account-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  align-items: end;
}
.account-toolbar label {
  max-width: 450px;
  flex: 1;
}
.accounting-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  padding: 30px;
  border-radius: 16px;
  background: linear-gradient(125deg, #102e43, #165777);
  color: white;
}
.accounting-hero h2 {
  font-size: 26px;
  letter-spacing: -0.6px;
  margin: 8px 0 12px;
  color: white;
}
.accounting-hero p {
  color: #cce3f0;
  font-size: 13px;
  line-height: 1.7;
  max-width: 530px;
  margin: 0;
}
.accounting-hero .eyebrow {
  color: #a9d9ee;
}
.accounting-steps {
  display: grid;
  gap: 12px;
  align-content: center;
}
.accounting-steps > div {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #e5f4fb;
  font-size: 13px;
}
.accounting-steps b {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid #7eacc0;
  border-radius: 9px;
  font-size: 12px;
}
.accounting-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.accounting-stats button {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  border-radius: 13px;
}
.accounting-stats button strong {
  font-size: 28px;
  letter-spacing: -0.7px;
}
.accounting-stats button span {
  color: #536e84;
  font-size: 12px;
}
.accounting-stats button[aria-pressed="true"] {
  border-color: #36a6d8;
  background: #edf8ff;
  box-shadow: inset 0 0 0 1px #36a6d8;
}
.accounting-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}
.accounting-tools label {
  flex: 1;
  min-width: 170px;
  max-width: 360px;
}
.accounting-tools select,
.accounting-tools input {
  margin-bottom: 0;
}
.accounting-empty {
  text-align: center;
  padding: 55px 20px;
  border: 1px dashed #bfd6e5;
  border-radius: 12px;
  background: #f8fbfd;
  color: #4d6c83;
}
.accounting-empty strong {
  display: block;
  color: #1f415c;
  margin-bottom: 8px;
}
.accounting-status {
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 20px;
  background: #f0f4f8;
  color: #506b80;
  white-space: nowrap;
}
.accounting-status.submitted {
  background: #e5f6ed;
  color: #226341;
}
.accounting-status.unknown {
  background: #fff4d8;
  color: #795d15;
}
@media (prefers-reduced-motion: no-preference) {
  .installment-card,
  .accounting-stats button {
    transition:
      transform 0.18s,
      box-shadow 0.18s,
      border-color 0.18s;
  }
  .installment-card:hover,
  .accounting-stats button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 18px #193e530c;
  }
  .designer-properties {
    animation: studio-in 0.2s ease-out;
  }
  @keyframes studio-in {
    from {
      translate: 5px 0;
    }
    to {
      translate: 0 0;
    }
  }
}
@media (max-width: 1050px) {
  .designer-body {
    grid-template-columns: 165px minmax(220px, 1fr) 225px;
  }
  .designer-top {
    padding: 15px;
    gap: 12px;
  }
  .designer-top h2 {
    font-size: 18px;
  }
  .designer-stage {
    padding: 24px;
  }
  .designer-top-actions button {
    font-size: 12px;
  }
  .settings-page .settings {
    grid-template-columns: 1fr;
  }
  .settings-page #settings-text {
    grid-column: auto;
  }
}
@media (max-width: 760px) {
  .designer-toolbar .designer-mobile-picker {
    display: flex;
  }
  .designer-mobile-picker select {
    width: 150px;
  }
  .invoice-designer {
    width: 100vw;
    height: 100dvh;
    max-width: 100vw;
    border-radius: 0;
    margin: 0;
  }
  .designer-body {
    grid-template-columns: minmax(180px, 1fr) 210px;
  }
  .designer-layers {
    display: none;
  }
  .designer-top {
    flex-wrap: wrap;
  }
  .designer-top-actions {
    margin-left: auto;
  }
  .designer-toolbar {
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
  }
  .designer-toolbar > div:last-of-type {
    display: none;
  }
  .designer-stage {
    padding: 18px;
  }
  .designer-bottom > span:last-child {
    display: none;
  }
  .designer-properties {
    padding: 15px 12px;
  }
  .accounting-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .accounting-stats {
    gap: 8px;
  }
  .accounting-stats button {
    padding: 14px 10px;
  }
  .account-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .account-summary {
    gap: 28px;
  }
  .installment-overview {
    padding: 18px;
  }
  .installment-overview > header {
    align-items: flex-start;
    flex-direction: column;
  }
  .installment-cards {
    grid-template-columns: 1fr;
  }
  .settings-nav {
    border-radius: 10px;
    padding: 8px;
  }
}
@page invoice {
  size: A4;
  margin: 0;
}
@media print {
  .paper.invoice-canvas {
    page: invoice;
    width: 100%;
    min-height: 0;
    max-width: none;
    padding: 0 !important;
    border: 0;
    box-shadow: none;
    zoom: 1 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .invoice-grid {
    break-inside: auto;
  }
  .invoice-block {
    break-inside: avoid;
  }
  .installment-overview {
    display: none !important;
  }
  .paper.invoice-canvas table,
  .paper.invoice-canvas th,
  .paper.invoice-canvas td {
    font: inherit;
  }
  .paper.invoice-canvas th {
    font-weight: 700;
  }
}

/* Quiet documents: shared logo position and aligned recipient / reference rows. */
.paper.reference-quote {
  width: 210mm;
  max-width: none;
  box-sizing: border-box;
  padding: 14mm;
  font-size: 12px;
}
.reference-quote .reference-header {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4mm;
  align-items: start;
}
.reference-quote .reference-title {
  grid-column: 1 / span 4;
  grid-row: 1;
  margin: 0;
}
.reference-quote .reference-company {
  grid-column: 1 / span 5;
  grid-row: 1;
  margin-top: 40px;
}
.reference-quote .reference-client {
  grid-column: 1 / span 6;
  grid-row: 2;
  margin: 0;
}
.reference-quote .reference-meta {
  grid-column: 7 / span 6;
  grid-row: 2;
  margin: 0;
  font-size: 11px;
}
.reference-quote .reference-logo {
  grid-column: 8 / span 4;
  grid-row: 1;
  width: 100%;
  align-self: start;
  aspect-ratio: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.reference-quote .reference-logo img {
  width: 100%;
  height: auto;
  max-height: none;
  filter: brightness(1.035);
  mix-blend-mode: multiply;
}
.preview-wrap .reference-quote {
  zoom: var(--invoice-preview-zoom, 1);
}
.invoice-term-heading {
  font-size: 11px;
  border-top: 1px solid #dbe2e8;
  border-bottom: 1px solid #dbe2e8;
  padding: 3mm 0;
  color: #263b4b;
}
.invoice-term-heading span {
  color: #536474;
}
.invoice-group-header th {
  background: #edf2f6;
  text-transform: none;
  letter-spacing: 0;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  font-weight: 650;
}
.invoice-group-header span {
  display: block;
  font-size: 15px;
  color: var(--ink);
}
.invoice-group-header small {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  color: var(--muted);
}
.invoice-term-label {
  display: block;
  margin-top: 5px;
  font-weight: 600;
  color: var(--ink);
}
.mail-view-actions {
  display: flex;
  justify-content: flex-end;
  margin: 12px 0;
}
.mail-html-frame {
  display: block;
  width: 100%;
  height: 75dvh;
  min-height: 520px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 4px;
}
.mail-rich-body {
  min-width: 0;
}
@media (max-width: 680px) {
  .invoice-group-header {
    display: block !important;
  }
  .invoice-group-header th {
    display: block;
    width: 100%;
  }
  .mail-html-frame {
    min-height: 440px;
  }
}
@page quote {
  size: A4;
  margin: 14mm;
}
@media print {
  .paper.reference-quote {
    page: quote;
    width: 100%;
    padding: 0 !important;
    zoom: 1 !important;
  }
  .reference-quote .reference-header {
    gap: 4mm;
  }
  .reference-quote .reference-logo img {
    max-height: none;
  }
  .mail-html-frame {
    display: none;
  }
}

/* Document Studio: apply selected typography and backgrounds to nested content. */
.invoice-canvas [data-design-part] {
  box-sizing: border-box;
}
.invoice-canvas span[data-design-part] {
  display: inline-block;
}
.paper .invoice-details {
  border-collapse: separate;
  border-spacing: 0;
}
.paper .invoice-details td {
  border-bottom: 0;
}
.invoice-totals .invoice-grand {
  border-top: 0;
  padding-top: 0;
}
.invoice-block .invoice-detail-rule {
  width: 100%;
  flex-basis: 100%;
  height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid #dbe6ed;
}
.invoice-grand .invoice-detail-rule {
  margin: 0 0 1mm;
}
.designer-stage [data-selection-mode="parts"] [data-design-part] {
  cursor: pointer;
}
.designer-stage
  [data-selection-mode="parts"]
  [data-design-part]:hover:not(:has([data-design-part]:hover)) {
  outline: 1px dashed #0876b8;
  outline-offset: 1px;
}
.designer-stage [data-design-part].part-selected {
  position: relative;
  outline: 2px solid #0876b8 !important;
  outline-offset: 2px;
}
.designer-stage [data-design-part]:focus-visible {
  outline: 3px solid #12364e;
  outline-offset: 3px;
}
.designer-stage hr[data-design-part]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -5px;
  height: 12px;
}
.designer-stage hr[data-design-part] {
  position: relative;
}
.designer-part-layers {
  padding: 8px 0 12px 12px;
  border-left: 2px solid #dbe6ed;
  margin-left: 12px;
}
.designer-part-layers button {
  font-size: 12px;
  min-height: 34px;
  padding: 6px 8px;
  text-align: left;
  width: 100%;
}
.designer-part-layers button[hidden] {
  display: none;
}
.designer-part-picker {
  margin: 12px 0;
}
.designer-part-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.designer-part-breadcrumb button {
  font-size: 11px;
  padding: 5px 7px;
}
.designer-part-input {
  display: flex;
  gap: 4px;
  align-items: center;
}
.designer-part-input input {
  min-width: 0;
  flex: 1;
}
.designer-part-input button {
  padding: 5px;
  min-width: 30px;
  width: 30px;
  flex: none;
}
.designer-properties details {
  border-top: 1px solid #dbe6ed;
  margin-top: 12px;
  padding-top: 10px;
}
.designer-properties summary {
  cursor: pointer;
  font-weight: 600;
  padding: 7px 0;
}
.designer-properties details label {
  margin-bottom: 8px;
}
.designer-toolbar {
  flex-wrap: wrap;
}
.paper .invoice-block p {
  line-height: var(--block-line-height, 1.55);
}
.paper .invoice-block strong,
.paper .invoice-block dt,
.paper .invoice-block dd,
.paper .invoice-block th,
.paper .invoice-block .invoice-grand {
  font-weight: inherit;
}
.paper .invoice-block td,
.paper .invoice-block th {
  color: inherit;
}
.paper .invoice-details th {
  background: transparent;
  color: inherit;
}
.paper .invoice-block h3 {
  font: inherit;
  font-weight: 700;
  margin: 3mm 0 2mm;
}
.paper .invoice-block ul {
  padding-left: 5mm;
  margin: 0;
}
.paper .invoice-block li {
  margin-bottom: 1.5mm;
}

@media print {
  .quote-closing {
    break-inside: avoid;
  }
  .paper .terms-appendix p {
    line-height: 1.5;
  }
  .invoice-layout-row:has(.invoice-block-footer) {
    break-before: avoid;
  }
}
.invoice-status-control {
  display: flex;
  align-items: center;
  gap: 8px;
}
.invoice-status-control select {
  margin: 0;
  width: auto;
}
.invoice-totals > .invoice-grand {
  display: block;
}
.invoice-total-values {
  display: flex;
  justify-content: space-between;
  gap: 3mm;
  padding-top: 3mm;
}
.invoice-canvas strong[data-design-part] {
  display: inline-block;
}
.designer-toolbar [data-selection-mode] {
  width: 190px;
}

/* The quote studio follows the reference quote, while every part keeps inline overrides. */
.quote-design-canvas .invoice-block-logo {
  height: 0;
  overflow: visible;
}
.quote-design-canvas .invoice-block-logo .invoice-logo-frame {
  height: 40mm;
}
.quote-design-canvas .invoice-block-company {
  min-height: 31mm;
}
.quote-design-canvas .invoice-block-client > strong,
.quote-design-canvas .invoice-meta dt {
  font-weight: 700;
}
.quote-design-canvas .invoice-block-project {
  margin-top: 3mm;
  margin-bottom: 2mm;
}
.quote-design-canvas .invoice-block-scope h3,
.quote-design-canvas .invoice-block-payment > strong,
.quote-design-canvas .signature-block h3 {
  background: #f2f2f2;
  padding: 1.5mm;
  display: block;
}
.quote-design-canvas .invoice-block-scope ul {
  list-style: none;
  padding: 0 1.5mm;
}
.quote-design-canvas .invoice-block-scope {
  margin-bottom: 3mm;
}
.quote-design-canvas .invoice-block-payment > strong,
.quote-design-canvas .signature-block h3 {
  border-top: 2px solid #171717;
  font-weight: 700;
}
.quote-design-canvas .invoice-block-payment dl > div {
  display: grid;
  grid-template-columns: 1fr 15% 30%;
  padding: 1mm 1.5mm;
}
.quote-design-canvas .invoice-block-payment dl dd {
  margin: 0;
}
.quote-design-canvas .invoice-block-payment dl dd:first-of-type {
  text-align: left;
}
.quote-design-canvas .invoice-block-signature [data-design-part="terms"] {
  font-style: italic;
  margin: 5mm 0;
}
.quote-design-canvas .invoice-block-signature [data-design-part="name-label"],
.quote-design-canvas .invoice-block-signature [data-design-part="date-label"] {
  display: inline-block;
}
.quote-design-canvas .invoice-block-signature [data-design-part="name-line"],
.quote-design-canvas .invoice-block-signature [data-design-part="date-line"] {
  display: inline-block;
  width: 75mm;
  border-color: #171717;
  margin: 0 0 0 2mm;
}
.quote-design-canvas
  .invoice-block-signature
  [data-design-part="date-label"]::before {
  content: "";
}
.quote-design-canvas .invoice-block-totals .invoice-totals > div {
  margin-bottom: 0;
}
.quote-design-canvas .invoice-block-totals .invoice-grand {
  font-size: inherit;
}
.designer-terms-editor {
  width: min(900px, 94vw);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid #dbe6ed;
  border-radius: 12px;
  padding: 24px;
}
.designer-terms-editor textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 45vh;
  resize: vertical;
  font:
    14px/1.5 Arial,
    sans-serif;
}
.designer-terms-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.text-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  min-height: 36px;
}
.text-editor-heading > label {
  display: block;
  margin: 0;
  font-weight: 600;
  color: #415b73;
}
.text-editor-heading .text-reset-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 7px;
  margin: 0;
  border: 1px solid #dbe6ed;
  border-radius: 8px;
  background: #fff;
  color: #536c80;
  box-shadow: none;
  cursor: pointer;
}
.text-editor-heading .text-reset-button:hover {
  background: #f1f5f9;
  border-color: #afc2d2;
  color: #18344d;
}
.text-editor-heading .text-reset-button:focus-visible {
  outline: 2px solid #0879bc;
  outline-offset: 3px;
}
.text-editor-heading .text-reset-button svg {
  width: 18px;
  height: 18px;
}
.mail-body-label > textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}
.invoice-remaining-summary {
  margin-top: 5mm;
  padding-top: 3mm;
  border-top: 1px solid #dbe6ed;
  font-size: 11px;
}
.invoice-remaining-summary > strong {
  display: block;
  margin-bottom: 2mm;
  font-weight: 700;
}
.invoice-remaining-summary [data-design-part="future-total"] {
  background: #f1f5f9;
  padding: 2mm;
  font-weight: 700;
}
.invoice-remaining-summary p {
  margin-top: 2mm;
  font-size: 9px;
  color: #536c80;
}
#modal .fields > label:has(input[name="kvk"]),
#modal .fields > label:has(input[name="vatId"]) {
  display: flex;
  flex-direction: column;
  align-self: stretch;
}
#modal .fields > label:has(input[name="kvk"]) > input,
#modal .fields > label:has(input[name="vatId"]) > input {
  margin-top: auto;
}

.invoice-block-remaining .invoice-remaining-summary {
  margin: 0;
  padding: 4mm;
  border: 1px solid #dbe6ed;
  border-radius: 2mm;
  background: #f8fafc;
  break-inside: avoid;
}
.paper .invoice-block-remaining .invoice-remaining-summary > strong {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 3mm;
}
.invoice-block-remaining
  .invoice-remaining-summary
  [data-design-part="future-total"] {
  background: #e8f0f7;
  border-radius: 1mm;
  margin-top: 2mm;
}
.invoice-block-remaining .invoice-remaining-summary p {
  margin-bottom: 0;
}
/* Postvak: a focused two-pane workspace, sharing the Neox palette. */
#inbox-root .inbox-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 0 0 24px;
}
#inbox-root .inbox-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
}
#inbox-root .inbox-heading h2 {
  font-size: 24px;
  letter-spacing: -0.025em;
  margin: 6px 0 8px;
}
#inbox-root .inbox-heading p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
}
#inbox-root .inbox-layout {
  display: grid;
  grid-template-columns: minmax(290px, 360px) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 4px 20px #10283f08;
  min-height: 620px;
}
#inbox-root .panel {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-width: 0;
}
#inbox-root .inbox-messages {
  border-right: 1px solid var(--line);
  max-height: 78vh;
  overflow: auto;
  background: #fbfcfe;
  scroll-padding: 16px;
}
#inbox-root .inbox-list-tools {
  padding: 20px 18px 12px;
  background: #fbfcfe;
}
#inbox-root .inbox-list-tools > label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}
#inbox-root #inbox-search {
  width: 100%;
  min-height: 42px;
  font-size: 13px;
  border-radius: 9px;
  background: white;
}
#inbox-root .inbox-filters {
  display: flex;
  gap: 4px;
  background: #edf2f7;
  padding: 4px;
  border-radius: 9px;
  margin: 16px 0;
}
#inbox-root .inbox-filters button {
  flex: 1;
  padding: 8px 5px;
  min-height: 36px;
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 12px;
  border-radius: 6px;
  color: #52677b;
}
#inbox-root .inbox-filters button[aria-pressed="true"] {
  background: #fff;
  color: #10283f;
  box-shadow: 0 1px 4px #10283f16;
  font-weight: 700;
}
#inbox-root .inbox-list-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
#inbox-root .inbox-list-caption label {
  font-size: 0;
  display: block;
}
#inbox-root #inbox-sort {
  font-size: 11px;
  padding: 5px 22px 5px 4px;
  min-height: 32px;
  border: 0;
  background-color: transparent;
  width: auto;
}
#inbox-root .mail-row {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 7px 10px;
  padding: 18px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #e7edf3;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  width: 100%;
  min-width: 0;
}
#inbox-root .mail-row .inbox-avatar {
  grid-column: 1;
  grid-row: 1 / span 3;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e7edf4;
  color: #425d76;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
#inbox-root .mail-row .mail-from {
  grid-column: 2;
  grid-row: 1;
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 500;
}
#inbox-root .mail-row time {
  grid-column: 3;
  grid-row: 1;
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#inbox-root .mail-row > strong {
  grid-column: 2 / -1;
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
#inbox-root .mail-row .inbox-snippet {
  grid-column: 2 / -1;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}
#inbox-root .mail-row.is-unread .mail-from,
#inbox-root .mail-row.is-unread > strong {
  font-weight: 700;
}
#inbox-root .inbox-unread {
  color: #066cb4;
  font-size: 9px;
  margin-right: 6px;
}
#inbox-root .mail-row.selected {
  background: #eaf3fb;
  box-shadow: inset 3px 0 #066cb4;
}
#inbox-root .mail-row .inbox-attachment-label {
  grid-column: 2 / -1;
  justify-self: start;
  font-size: 10px;
  border: 1px solid #ccd9e5;
  padding: 2px 7px;
  border-radius: 5px;
  color: #425d76;
}
#inbox-root #inbox-message {
  max-height: 78vh;
  overflow: auto;
  scroll-padding: 24px;
}
#inbox-root .inbox-welcome {
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}
#inbox-root .inbox-welcome-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: #edf4fa;
  color: #066cb4;
  font-size: 32px;
  margin-bottom: 20px;
}
#inbox-root .inbox-welcome h3 {
  font-size: 19px;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
#inbox-root .inbox-welcome p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
}
#inbox-root .inbox-welcome-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 32px;
}
#inbox-root .inbox-reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
#inbox-root .inbox-reader-toolbar button {
  font-size: 12px;
  min-height: 36px;
  padding: 6px 10px;
  border-color: transparent;
  background: transparent;
}
#inbox-root #inbox-message > .panel-body {
  padding: 28px 32px;
}
#inbox-root #inbox-message h2 {
  font-size: 23px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  overflow-wrap: anywhere;
}
#inbox-root .inbox-sender {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
#inbox-root .mail-body {
  font-size: 14px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
#inbox-root .inbox-attachments-heading {
  font-size: 13px;
  margin: 32px 0 12px;
}
#inbox-root .inbox-attachments-heading span {
  font-size: 11px;
  color: var(--muted);
  margin-left: 6px;
}
#inbox-root .inbox-files {
  display: grid;
  gap: 10px;
}
#inbox-root .inbox-files > div {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: #f6f9fc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}
#inbox-root .inbox-files strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
#inbox-root .inbox-files small {
  font-size: 11px;
  margin-top: 5px;
}
#inbox-root .inbox-files .actions {
  gap: 6px;
  flex-wrap: wrap;
}
#inbox-root .inbox-files button {
  font-size: 11px;
  padding: 8px 10px;
  min-height: 36px;
  background: white;
}
#inbox-root .inbox-placeholder {
  padding: 36px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
#inbox-root .inbox-placeholder strong {
  color: var(--ink);
}
#inbox-root #inbox-more {
  margin: 16px;
  width: calc(100% - 32px);
  font-size: 12px;
}
#inbox-root #inbox-status {
  font-size: 11px;
  line-height: 1.6;
  margin: 12px 4px;
  overflow-wrap: anywhere;
}
#inbox-root button:focus-visible,
#inbox-root h2:focus-visible {
  outline: 2px solid #066cb4;
  outline-offset: -3px;
}
@media (hover: hover) and (pointer: fine) {
  #inbox-root .mail-row:hover {
    background: #f0f5fa;
  }
  #inbox-root .mail-row.selected:hover {
    background: #e4eff9;
  }
}
@media (max-width: 1000px) {
  #inbox-root .inbox-layout {
    grid-template-columns: minmax(260px, 310px) minmax(0, 1fr);
  }
  #inbox-root #inbox-message > .panel-body {
    padding: 24px;
  }
}
@media (max-width: 760px) {
  #inbox-root .inbox-heading {
    align-items: flex-start;
    gap: 12px;
  }
  #inbox-root .inbox-heading h2 {
    font-size: 19px;
  }
  #inbox-root .inbox-heading p {
    font-size: 12px;
  }
  #inbox-root #inbox-refresh {
    font-size: 12px;
    padding: 10px;
    white-space: nowrap;
  }
  #inbox-root .inbox-layout {
    display: block;
    min-height: 420px;
  }
  #inbox-root .inbox-messages {
    max-height: none;
    border-right: 0;
  }
  #inbox-root #inbox-message {
    display: none;
    max-height: none;
  }
  #inbox-root.inbox-reading .inbox-messages {
    display: none;
  }
  #inbox-root.inbox-reading #inbox-message {
    display: block;
  }
  #inbox-root #inbox-message > .panel-body {
    padding: 20px;
  }
  #inbox-root #inbox-message h2 {
    font-size: 20px;
  }
}
/* Shared controls: consistent type, proportions and focus across the workspace. */
body {
  --control-radius: 8px;
  --control-text: 13px;
}
button,
.button {
  font-family: "Segoe UI Variable", "Segoe UI", sans-serif;
  font-size: var(--control-text);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  border-radius: var(--control-radius);
  min-height: 40px;
  padding: 9px 14px;
}
button.primary,
.button.primary {
  font-weight: 600;
  box-shadow: 0 1px 2px #10283f12;
}
button svg,
.button svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke-width: 1.75;
}
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
td > .actions,
td > .client-actions {
  gap: 6px;
}
.panel-body > button + button {
  margin-left: 8px;
}
#modal {
  border-radius: 16px;
  box-shadow: 0 24px 80px #10283f26;
}
#modal h2 {
  font-size: 21px;
  letter-spacing: -0.025em;
  line-height: 1.4;
}
#modal p {
  font-size: 14px;
  line-height: 1.65;
}
#modal form > .actions,
#modal .modal-footer {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
  gap: 8px;
}
.accounting-tools {
  gap: 20px;
  align-items: end;
}
.accounting-tools .actions {
  gap: 8px;
  justify-content: flex-end;
}
.accounting-tools .actions button {
  font-size: 13px;
  font-weight: 500;
  min-height: 40px;
  padding: 9px 13px;
  white-space: nowrap;
}
.accounting-stats button {
  font-family: inherit;
  text-align: left;
  border-radius: 10px;
}
.accounting-stats button > span {
  font-size: 12px;
  font-weight: 500;
}
.accounting-stats button > strong {
  font-size: 28px;
  letter-spacing: -0.03em;
}
[data-account-rows] button {
  font-size: 12px;
  font-weight: 500;
  min-height: 36px;
  padding: 8px 12px;
}
.clients-workspace {
  overflow: hidden;
}
.clients-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.clients-toolbar h2 {
  font-size: 16px;
  margin: 0 0 6px;
  font-weight: 600;
}
.clients-toolbar #clients-count {
  font-size: 12px;
}
.clients-toolbar label {
  width: min(340px, 100%);
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.clients-toolbar input {
  width: 100%;
  font-size: 13px;
  background: #fbfcfe;
}
.clients-table th {
  font-size: 11px;
  font-weight: 600;
  padding: 12px 24px;
  color: var(--muted);
  background: #f8fafc;
}
.clients-table td {
  padding: 20px 24px;
  font-size: 13px;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.clients-table td strong {
  font-weight: 600;
}
.clients-table small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
.client-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}
.client-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #eaf1f8;
  color: #315572;
  font-size: 14px;
  font-weight: 600;
}
.client-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.client-actions button {
  font-size: 12px;
  min-height: 34px;
  padding: 7px 10px;
}
.clients-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}
.clients-empty h3 {
  font-size: 16px;
  color: var(--ink);
}
.clients-empty p {
  font-size: 13px;
}
.client-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 0 24px;
  border-bottom: 1px solid var(--line);
}
.client-profile .client-avatar {
  width: 48px;
  height: 48px;
  font-size: 20px;
  border-radius: 14px;
}
.client-profile strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
}
.client-profile span:not(.client-avatar) {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.client-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 24px;
  margin: 24px 0;
}
.client-info dt {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 7px;
}
.client-info dd {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  overflow-wrap: anywhere;
}
.client-details .data-disclosure {
  border: 1px solid var(--line);
  border-radius: 9px;
  margin: 12px 0;
  background: #fff;
}
.client-details summary {
  font-size: 13px;
  font-weight: 500;
  padding: 14px 16px;
  cursor: pointer;
}
.client-privacy {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.client-privacy > summary {
  padding: 14px 0;
  color: var(--muted);
}
.client-privacy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.client-privacy-actions button {
  font-size: 12px;
}
.client-danger-zone {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid #edd9dd;
  border-radius: 9px;
  background: #fffafb;
}
.client-danger-zone > span {
  font-size: 13px;
  font-weight: 600;
}
.client-danger-zone button {
  color: #a52e43;
  border-color: #e9cbd2;
  font-size: 12px;
}
#inbox-root .inbox-heading {
  justify-content: flex-end;
  margin-top: -68px;
  margin-bottom: 26px;
  min-height: 42px;
}
@media (max-width: 900px) {
  .clients-table {
    min-width: 0;
  }
  .clients-table thead {
    display: none;
  }
  .clients-table tbody {
    display: block;
  }
  .clients-table tr:not([hidden]) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    gap: 16px;
  }
  .clients-table td {
    display: block;
    padding: 0;
    border: 0;
    min-width: 0;
  }
  .clients-table td:first-child,
  .clients-table td:last-child {
    grid-column: 1/-1;
  }
  .client-actions {
    justify-content: flex-end;
  }
  .clients-toolbar {
    padding: 20px;
  }
  .accounting-tools .actions {
    justify-content: flex-start;
  }
}
@media (max-width: 520px) {
  .clients-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .clients-toolbar label {
    width: 100%;
  }
  .client-info {
    grid-template-columns: 1fr;
  }
  .accounting-tools .actions button {
    white-space: normal;
  }
  #inbox-root .inbox-heading {
    margin-top: 0;
    margin-bottom: 16px;
  }
  .client-actions button {
    min-height: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  button,
  .button {
    transition: none;
  }
}
/* Clear invoice details and calm, accessible confirmations. */
.paper [data-block-type="client"] [data-design-part="heading"],
.paper .invoice-block-client [data-design-part="heading"] {
  font-weight: 700;
}
.paper .invoice-bank-panel {
  background: #f1f6fa;
  border: 1px solid #dce7ef;
  border-radius: 7px;
  padding: 10px 12px;
  line-height: 1.65;
  margin: 10px 0 0;
}
.paper .invoice-line-quantity {
  display: block;
  margin-top: 4px;
  color: #52687a;
  font-size: 0.9em;
}
.invoice-addition-line .line-top label {
  flex: 1;
  min-width: 0;
}
.invoice-addition-line .line-fields {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1.3fr 0.8fr;
  gap: 12px;
}
.neox-confirmation {
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 1px solid #dde6ee;
  border-radius: 18px;
  color: #19354b;
  background: #fff;
  box-shadow: 0 24px 90px #112b4840;
}
.neox-confirmation::backdrop {
  background: #10273e66;
  backdrop-filter: blur(3px);
}
.neox-confirmation form {
  padding: 28px;
}
.neox-confirmation .confirmation-symbol {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
  border: 1px solid #d9e8f3;
  border-radius: 12px;
  background: #edf6fc;
  color: #0874ad;
}
.confirmation-symbol svg {
  width: 24px;
  height: 24px;
}
.neox-confirmation h2 {
  font-size: 20px;
  line-height: 1.35;
  margin: 0 0 12px;
  letter-spacing: -0.3px;
}
.neox-confirmation p {
  font-size: 14px;
  line-height: 1.65;
  color: #52687a;
  margin: 0 0 28px;
  white-space: pre-line;
}
.confirmation-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.confirmation-actions button {
  min-height: 40px;
  padding: 10px 14px;
  font-size: 13px;
  border-radius: 8px;
}
.confirmation-actions .confirm-danger {
  color: #fff;
  background: #9d3642;
  border-color: #9d3642;
}
.confirmation-actions .confirm-danger:hover {
  background: #852b36;
}
@media (prefers-reduced-motion: no-preference) {
  .neox-confirmation[open] {
    animation: neox-dialog-enter 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .neox-confirmation[open]::backdrop {
    animation: neox-backdrop-enter 160ms ease-out both;
  }
  .project-view > section,
  .report-grid > .report-card,
  .project-result-report {
    animation: neox-content-enter 260ms ease-out both;
  }
  .report-grid > .report-card:nth-child(2) {
    animation-delay: 35ms;
  }
  .report-grid > .report-card:nth-child(3) {
    animation-delay: 70ms;
  }
  .rail-button,
  .project-tabs button,
  .quote-metric-link {
    transition:
      background-color 150ms ease,
      box-shadow 150ms ease,
      color 150ms ease;
  }
  .project-progress > span {
    transition: width 380ms ease;
  }
}
@keyframes neox-dialog-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes neox-backdrop-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes neox-content-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 520px) {
  .invoice-addition-line .line-fields {
    grid-template-columns: 1fr 1fr;
  }
  .neox-confirmation form {
    padding: 24px;
  }
  .confirmation-actions {
    flex-wrap: wrap;
  }
}
/* Status is always expressed with a label as well as colour. */
.quote-status {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-width: 260px;
}
.quote-status .badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: normal;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
  border-radius: 7px;
  padding: 7px 10px;
  text-align: left;
}
.quote-status .badge:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.quote-status > small {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}
.badge.yellow {
  background: #fff3ce;
  color: #795500;
}
.badge.gray {
  background: #edf0f3;
  color: #52606e;
}
.approval-banner.pending {
  background: #fff9e8;
  border-color: #ecd79d;
}
.approval-banner.rejected {
  background: #fff0f0;
  border-color: #edc3c3;
}
.document-status .quote-status {
  max-width: 240px;
}
@media (min-width: 901px) {
  .document-table:has(.quote-status) th:nth-child(1) {
    width: 22%;
  }
  .document-table:has(.quote-status) th:nth-child(2) {
    width: 17%;
  }
  .document-table:has(.quote-status) th:nth-child(3) {
    width: 13%;
  }
  .document-table:has(.quote-status) th:nth-child(4) {
    width: 23%;
  }
  .document-table:has(.quote-status) th:nth-child(5) {
    width: 14%;
  }
  .document-table:has(.quote-status) th:nth-child(6) {
    width: 11%;
  }
}

/* Settings: separate document text sections in the established two-column layout. */
.settings-page .settings-toolbar {
  justify-content: flex-end;
}
.settings-page #settings-quote-text,
.settings-page #settings-invoice-text {
  min-width: 0;
}
.purchase-progress {
  margin-top: 24px;
}
.purchase-progress table {
  width: 100%;
  table-layout: auto;
}
.purchase-progress td:not(:first-child),
.purchase-progress th:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.purchase-progress .purchase-source {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 4px;
}
.purchase-progress .purchase-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.purchase-progress-intro {
  padding: 16px 22px 0;
  margin: 0;
  line-height: 1.6;
}
.purchase-progress {
  padding: 0 22px;
  margin-top: 16px;
}
.purchase-progress small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.purchase-progress th:first-child {
  width: 29%;
}
.purchase-progress tbody th {
  font-weight: 600;
}
.purchase-progress th,
.purchase-progress td {
  padding: 16px 12px;
  vertical-align: middle;
}
.purchase-progress td {
  white-space: nowrap;
}
.purchase-progress-ohw {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  padding: 20px 34px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-alt, #f5f9fc);
  border-radius: 0 0 16px 16px;
}
.purchase-progress-ohw strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}
.purchase-progress-ohw small {
  margin-left: auto;
  color: var(--muted);
}
@media (max-width: 700px) {
  .purchase-progress {
    padding: 0 8px;
  }
  .purchase-progress th,
  .purchase-progress td {
    padding: 12px 5px;
    font-size: 11px;
  }
  .purchase-progress small {
    font-size: 10px;
  }
  .purchase-progress button {
    padding: 8px;
    min-width: 0;
    font-size: 11px;
  }
}

/* Direct correspondence in Postvak */
#inbox-root .inbox-heading {
  gap: 10px;
}
#modal.mail-compose {
  width: min(680px, calc(100vw - 32px));
}
#modal.mail-compose .form-grid {
  gap: 20px;
}
#modal.mail-compose .compose-from {
  margin: 0;
  padding: 12px 16px;
  background: var(--surface-soft, #eef6fb);
  border-radius: 10px;
  color: var(--muted, #60778a);
  font-size: 13px;
}
#modal.mail-compose .compose-from strong {
  color: var(--text, #19394f);
  margin-left: 8px;
  overflow-wrap: anywhere;
}
#modal.mail-compose textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.65;
}
#modal.mail-compose input,
#modal.mail-compose textarea {
  width: 100%;
  box-sizing: border-box;
}
#modal.mail-compose .modal-footer {
  border-top: 1px solid var(--border, #dce7ee);
  padding-top: 20px;
}
@media (max-width: 600px) {
  #inbox-root .inbox-heading {
    margin-top: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  #modal.mail-compose textarea {
    min-height: 160px;
  }
}

/* Mail folders share the existing Postvak canvas. */
#inbox-root .inbox-folders {
  display: flex;
  gap: 6px;
  padding: 6px;
  margin: 0 0 20px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--border, #dce7ee);
  border-radius: 14px;
  background: var(--surface-soft, #eaf2f8);
}
#inbox-root .inbox-folders button {
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  border-radius: 10px;
  color: var(--text, #19394f);
}
#inbox-root .inbox-folders button[aria-current="page"] {
  background: var(--surface, #fff);
  color: #076fa6;
  border-color: #d8e8f2;
  box-shadow: 0 2px 6px #18394f0a;
  font-weight: 650;
}
#inbox-root .inbox-folders button:hover {
  background: #dceefa;
  color: #164563;
}
#inbox-root .inbox-reader-toolbar {
  flex-wrap: wrap;
  gap: 10px;
}
#inbox-root .mail-move-button {
  margin-left: auto;
  min-height: 44px;
}
@media (max-width: 600px) {
  #inbox-root .inbox-folders {
    width: 100%;
    box-sizing: border-box;
  }
  #inbox-root .inbox-folders button {
    flex: 1;
    padding: 10px 7px;
  }
}

/* Gmail-inspired attachment labels, visible before opening a message. */
#inbox-root .mail-attachment-summary {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-top: 3px;
}
#inbox-root .mail-attachment-summary > svg {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  color: var(--muted);
}
#inbox-root .mail-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: calc(100% - 25px);
  border: 1px solid #d5e0e9;
  border-radius: 8px;
  padding: 5px 7px;
  background: var(--surface, #fff);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.4;
}
#inbox-root .mail-file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#inbox-root .mail-file-kind {
  flex: none;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 4px;
  background: #edf1f5;
  color: #465d73;
}
#inbox-root .mail-file-kind.pdf {
  background: #fce8e7;
  color: #a1322e;
}
#inbox-root .mail-file-kind.sheet {
  background: #e1f3e8;
  color: #216640;
}
#inbox-root .mail-file-kind.document {
  background: #e4effe;
  color: #245e9d;
}
#inbox-root .mail-file-kind.image {
  background: #f0e8fa;
  color: #6b4496;
}
#inbox-root .mail-file-more {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 4px;
}

/* Requested project refinements; no movement of controls on hover. */
.project-icon-action {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.project-icon-action .small-icon {
  width: 20px;
  height: 20px;
}
.risk-actions {
  flex-shrink: 0;
  gap: 8px;
}
.project-icon-action.is-complete {
  color: #286f56;
  background: #eaf6f0;
  border-color: #c7e5d5;
}
.project-contract-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.purchase-progress-dialog .form-grid {
  align-items: end;
}
.purchase-progress-dialog .form-grid > label:not(.scope-pick) {
  display: block;
  align-self: end;
}
.project-cost-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1000px) {
  .project-cost-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.terms-editor textarea {
  min-height: 55vh;
  line-height: 1.65;
  resize: vertical;
}

.dimension-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.dimension-heading h3 {
  margin: 0;
}
.dimension-heading button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dimension-field small {
  display: block;
  color: #64748b;
  margin-top: 6px;
}
.dimension-dialog {
  width: min(850px, calc(100vw - 32px));
  max-width: 850px;
}
.dimension-visibility {
  border: 1px solid #dbe3eb;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
}
.dimension-visibility legend {
  padding: 0 6px;
  font-weight: 600;
}
.dimension-config-row {
  display: grid;
  grid-template-columns: 1fr 1fr 44px;
  gap: 12px;
  align-items: end;
  margin: 16px 0;
}
.dimension-config-row .icon-button {
  width: 44px;
  height: 44px;
  padding: 10px;
}
@media (max-width: 600px) {
  .dimension-visibility {
    grid-template-columns: 1fr;
  }
  .dimension-config-row {
    grid-template-columns: minmax(0, 1fr) 44px;
  }
  .dimension-config-row label:first-child {
    grid-column: 1 / -1;
  }
}
