:root {
  --bg: #f6f7f5;
  --surface: #ffffff;
  --surface-muted: #eef3ef;
  --ink: #202723;
  --muted: #66716b;
  --line: #d9e0dc;
  --teal: #177e72;
  --teal-dark: #0d5f58;
  --amber: #b97818;
  --rose: #b34242;
  --green-soft: #e5f4ee;
  --amber-soft: #fff1d8;
  --rose-soft: #ffe8e5;
  --shadow: 0 16px 40px rgba(32, 39, 35, 0.08);
  color-scheme: light;
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Segoe UI",
    system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}

.hidden {
  display: none !important;
}

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

button {
  border: 0;
  cursor: pointer;
}

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

.auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.auth-panel {
  display: grid;
  gap: 20px;
  width: min(460px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-brand {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

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

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100vh;
  padding: 24px;
  background: #fbfcfa;
  border-right: 1px solid var(--line);
}

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

.team-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.team-card strong {
  font-size: 14px;
  line-height: 1.35;
}

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

.sidebar-nav {
  display: grid;
  gap: 5px;
  padding: 2px 0;
}

.sidebar-nav-label {
  padding: 0 8px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.sidebar-nav-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
  border-left: 3px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  font-weight: 800;
}

.sidebar-nav-item:hover {
  background: var(--surface-muted);
}

.sidebar-nav-item.active {
  border-left-color: var(--teal);
  background: #e6f3ef;
  color: var(--teal-dark);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #eaf0ec;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
}

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

.nav-count {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 11px;
  text-align: center;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

.brand h1,
.brand p,
.topbar h2,
.topbar p,
.panel h3 {
  margin: 0;
}

.brand h1 {
  font-size: 18px;
  line-height: 1.25;
}

.brand p,
.topbar p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.upload-box,
.panel,
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.upload-box {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.workspace-upload-box {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr) auto;
  align-items: end;
  gap: 14px;
  border-color: #bcded3;
  background: #f4faf7;
  box-shadow: none;
}

.workspace-upload-copy {
  display: grid;
  gap: 5px;
}

.workspace-upload-copy strong {
  color: var(--teal-dark);
  font-size: 14px;
}

.workspace-upload-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.workspace-upload-file {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.workspace-upload-file input[type="file"] {
  min-width: 0;
  padding: 8px;
  border: 1px dashed #a9c9bc;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.upload-box label,
.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.upload-box input[type="file"] {
  min-width: 0;
  padding: 9px;
  border: 1px dashed #b9c7bf;
  border-radius: 8px;
  background: #f8faf8;
  color: var(--ink);
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 800;
  white-space: nowrap;
}

.primary-button {
  background: var(--teal);
  color: #fff;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.ghost-button {
  background: var(--surface-muted);
  color: var(--ink);
}

.ghost-button:hover {
  background: #e0e9e3;
}

.danger-button {
  background: var(--rose-soft);
  color: var(--rose);
}

.danger-button:hover {
  background: #ffd6d0;
}

.icon-button {
  width: 38px;
  padding: 0;
  background: var(--surface-muted);
  color: var(--ink);
}

.project-list-head,
.panel-head,
.topbar,
.topbar-actions,
.split-actions {
  display: flex;
  align-items: center;
}

.project-list-head,
.panel-head,
.topbar {
  justify-content: space-between;
  gap: 14px;
}

.project-list-head {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.project-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 2px;
}

.project-item {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 13px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
}

.project-item.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(23, 126, 114, 0.14);
}

.project-item strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.workspace {
  display: grid;
  gap: 18px;
  align-content: start;
  width: 100%;
  min-width: 0;
  padding: 24px;
}

.topbar {
  min-height: 56px;
}

.topbar h2 {
  font-size: 24px;
  line-height: 1.25;
}

.topbar-actions,
.split-actions {
  gap: 10px;
}

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

.metric {
  display: grid;
  gap: 9px;
  padding: 17px;
  box-shadow: none;
}

.metric-button,
.dashboard-metric-button {
  width: 100%;
  color: var(--ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.metric-button:hover,
.metric-button:focus-visible,
.dashboard-metric-button:hover,
.dashboard-metric-button:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(23, 126, 114, 0.12);
  outline: 0;
}

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

.metric strong {
  font-size: 24px;
  line-height: 1.1;
}

.metric.warn strong {
  color: var(--rose);
}

.metric.accent strong {
  color: var(--amber);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  min-width: 0;
}

.panel {
  padding: 18px;
}

.panel h3 {
  font-size: 17px;
}

.detail-stack {
  display: grid;
  gap: 18px;
  width: 100%;
  min-width: 0;
}

.workspace > .page-view-panel,
.content-grid > .page-view-panel,
.detail-stack > .page-view-panel {
  width: 100%;
  min-width: 0;
}

.overview-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.overview-search {
  width: min(420px, 100%);
}

.ledger-contract-groups {
  display: flex;
  align-items: center;
  margin: 14px 0 12px;
}

.ledger-contract-filter button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 118px;
}

.ledger-contract-filter strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 23px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #edf2ef;
  color: var(--ink);
  font-size: 11px;
}

.ledger-contract-filter button.active strong {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.settled-label {
  color: var(--teal-dark);
  font-weight: 800;
}

.overview-wrap table {
  min-width: 1540px;
}

.overview-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.overview-pagination-summary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.overview-pagination-controls,
.overview-page-size,
.overview-page-buttons {
  display: flex;
  align-items: center;
}

.overview-pagination-controls {
  gap: 8px;
}

.overview-page-size {
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.overview-page-size select {
  min-height: 34px;
  padding: 0 8px;
}

.overview-page-buttons {
  gap: 4px;
}

.overview-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.overview-page-button:hover,
.overview-page-button.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.overview-page-ellipsis {
  width: 18px;
  color: var(--muted);
  text-align: center;
}

.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.invoice-metric {
  border-color: #b9d2df;
  background: #f1f7fa;
}

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

.dashboard-head {
  align-items: flex-start;
}

.dashboard-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

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

.dashboard-toolbar input {
  width: 108px;
}

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

.dashboard-focus {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) 150px minmax(170px, 0.9fr) minmax(230px, 1.1fr);
  align-items: center;
  gap: 22px;
  padding: 20px 22px;
  border: 1px solid #bcded3;
  border-radius: 8px;
  background: linear-gradient(110deg, #f0faf6, #ffffff 65%);
  box-shadow: var(--shadow);
}

.dashboard-focus-copy {
  display: grid;
  gap: 6px;
}

.dashboard-focus-copy span,
.dashboard-focus-copy small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-focus-copy strong {
  color: var(--teal-dark);
  font-size: 44px;
  line-height: 1;
}

.dashboard-donut {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--teal) 0 var(--recovery-angle, 0%), #dce9e3 var(--recovery-angle, 0%) 100%);
  box-shadow: inset 0 0 0 1px rgba(13, 95, 88, 0.12);
}

.dashboard-donut::before {
  width: 82px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.dashboard-donut span {
  position: absolute;
  color: var(--teal-dark);
  font-size: 18px;
  font-weight: 900;
}

.dashboard-legend {
  display: grid;
  gap: 10px;
}

.dashboard-legend div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-legend strong {
  color: var(--ink);
  font-size: 14px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-dot.received {
  background: var(--teal);
}

.legend-dot.receivable {
  background: #dce9e3;
  border: 1px solid #b7cbc1;
}

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

.dashboard-focus-stat div {
  display: grid;
  gap: 6px;
  padding-left: 12px;
  border-left: 3px solid var(--amber);
}

.dashboard-focus-stat div:last-child {
  border-left-color: var(--rose);
}

.dashboard-focus-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-focus-stat strong {
  color: var(--rose);
  font-size: 20px;
}

.dashboard-metric {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}

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

.dashboard-metric strong {
  min-width: 0;
  min-height: 46px;
  overflow: visible;
  font-size: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
}

.dashboard-metric.warning strong {
  color: var(--rose);
}

.dashboard-metric.success strong {
  color: var(--teal-dark);
}

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

.dashboard-section {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.dashboard-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-inline-year {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-inline-year input {
  width: 88px;
  min-height: 32px;
}

.dashboard-section-head h4 {
  margin: 0;
  font-size: 14px;
}

.dashboard-section-head span {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-table-wrap {
  margin-top: 10px;
  max-height: 360px;
}

.dashboard-table {
  min-width: 520px;
  font-size: 12px;
}

.dashboard-table th,
.dashboard-table td {
  padding: 8px;
}

.dashboard-risk-section {
  grid-column: 1 / -1;
}

.dashboard-risk-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.dashboard-risk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 6px;
  background: #fffaf2;
  color: var(--ink);
  text-align: left;
}

.dashboard-risk-item:hover {
  border-color: var(--amber);
}

.dashboard-risk-main,
.dashboard-risk-side {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dashboard-risk-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-risk-main small,
.dashboard-risk-side small {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-risk-side {
  justify-items: end;
}

.risk-tags {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.risk-tags em {
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--rose-soft);
  color: var(--rose);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

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

.overview-wrap tbody tr {
  cursor: pointer;
}

.overview-wrap tbody tr:hover {
  background: #f7faf8;
}

.overview-wrap tbody tr.selected {
  background: #e7f3ef;
  box-shadow: inset 4px 0 0 var(--teal);
}

.overview-wrap tbody tr.selected td {
  border-bottom-color: #b7d8cd;
}

.government-meeting {
  color: var(--teal-dark);
  font-weight: 800;
}

.amount-output {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f4f8f5;
  color: var(--teal-dark);
  font-weight: 900;
}

.stage-percent-summary {
  display: inline-flex;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stage-percent-summary.invalid {
  color: var(--rose);
}

.stack-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.module-project-section {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 13px;
  border: 1px solid #c9d9d1;
  border-radius: 8px;
  background: #f7faf8;
}

.module-project-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.module-project-head > div {
  display: grid;
  gap: 3px;
}

.module-project-head strong {
  font-size: 14px;
}

.module-project-head span {
  color: var(--muted);
  font-size: 11px;
}

.module-project-search-row {
  display: grid;
  grid-template-columns: minmax(240px, 520px) auto;
  align-items: center;
  gap: 10px;
}

.module-project-search-row input {
  height: 38px;
}

.module-search-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.current-project-label {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--teal-dark) !important;
  font-weight: 900;
}

.module-project-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 330px;
  overflow: auto;
}

.module-project-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-left: 4px solid transparent;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.module-project-card:hover {
  border-color: #9fc9bc;
  background: #f3f9f6;
}

.module-project-card.active {
  border-color: #9fc9bc;
  border-left-color: var(--teal);
  background: #e8f4f0;
  box-shadow: 0 0 0 2px rgba(23, 126, 114, 0.09);
}

.module-project-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.module-project-title strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-project-title em {
  flex: 0 0 auto;
  font-style: normal;
}

.module-project-payer,
.module-project-party,
.module-project-extra {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-project-amounts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.module-project-amounts > span {
  display: grid;
  gap: 2px;
  padding: 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 10px;
}

.module-project-amounts strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-form-disabled {
  opacity: 0.58;
}

.module-form-disabled::before {
  grid-column: 1 / -1;
  color: var(--amber);
  content: "请先从上方项目选择栏选择已保存的项目";
  font-size: 12px;
  font-weight: 900;
}

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

.file-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.file-summary a,
.artifact-link {
  overflow: hidden;
  color: var(--teal);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.file-summary a:hover,
.artifact-link:hover {
  color: var(--teal-dark);
}

.file-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.inline-upload-form {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.inline-upload-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.contract-status,
.artifact-type {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  background: var(--amber-soft);
  color: #8a5a00;
  font-size: 12px;
  font-weight: 800;
}

.contract-status.signed,
.artifact-type.final {
  background: var(--green-soft);
  color: var(--teal-dark);
}

.contract-status.negotiating {
  background: #eaf1f7;
  color: #315d7d;
}

.artifact-type.process {
  background: #eef2f6;
  color: #526273;
}

.artifact-grid {
  margin-top: 0;
}

.artifact-list,
.timeline {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.invoice-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
  font-size: 13px;
}

.invoice-summary strong {
  color: var(--rose);
}

.invoice-item.unpaid {
  border-left: 4px solid var(--amber);
}

.invoice-item.paid {
  border-left: 4px solid var(--teal);
}

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

.invoice-amounts span {
  display: grid;
  gap: 3px;
  padding: 9px;
  border-radius: 6px;
  background: #f5f7f5;
  color: var(--muted);
  font-size: 12px;
}

.invoice-amounts strong {
  color: var(--ink);
  font-size: 14px;
}

.invoice-payment-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(150px, 0.8fr) minmax(180px, 1.4fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border-radius: 8px;
  background: var(--amber-soft);
}

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

.invoice-paid-label {
  padding: 10px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
}

.invoice-payments {
  display: grid;
  gap: 6px;
}

.invoice-payments div {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(140px, 1fr);
  gap: 10px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

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

.timeline-item {
  border-left: 4px solid var(--teal);
  background: #f8fbfa;
}

.timeline-item.overdue {
  border-left-color: var(--rose);
  background: var(--rose-soft);
}

.artifact-item-head,
.timeline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.artifact-meta,
.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.artifact-note,
.timeline-note {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.artifact-actions,
.timeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 800;
}

.link-button:hover {
  color: var(--teal-dark);
}

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

.form-grid .wide {
  grid-column: span 2;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cfd8d2;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input,
select {
  height: 40px;
  padding: 0 11px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(23, 126, 114, 0.12);
}

.reminder-list {
  display: grid;
  align-content: start;
  flex: 0 0 auto;
  gap: 10px;
  margin-top: 16px;
  min-height: 120px;
  padding-right: 6px;
  overflow: visible;
  scrollbar-gutter: stable;
}

.reminder-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.reminder-pagination-summary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.reminder-pagination-controls,
.reminder-page-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reminder-page-buttons {
  gap: 4px;
}

.reminder-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.reminder-page-button:hover,
.reminder-page-button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.reminder-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  color: var(--muted);
}

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

.reminder-plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.reminder-plan-head h4 {
  margin: 0;
  font-size: 16px;
}

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

.reminder-plan-toolbar {
  display: flex;
  align-items: end;
  gap: 8px;
}

.reminder-plan-toolbar label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.reminder-plan-toolbar input {
  min-height: 34px;
}

.reminder-plan-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.reminder-plan-summary div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}

.reminder-plan-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.reminder-plan-summary strong {
  font-size: 20px;
}

.reminder-plan-tasks {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.reminder-plan-task {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.reminder-plan-task:hover {
  border-color: var(--teal);
  background: #f3faf8;
}

.reminder-plan-task.overdue {
  border-left: 4px solid var(--rose);
}

.reminder-plan-task span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.reminder-plan-task span:last-child {
  flex: 0 0 auto;
  justify-items: end;
}

.reminder-plan-task strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.reminder-plan-task small {
  color: var(--muted);
  font-size: 12px;
}

.reminder-plan-table-wrap {
  margin-top: 10px;
}

.reminder-plan-table-wrap table {
  min-width: 620px;
}

.reminder-panel {
  display: block;
  height: auto;
  min-height: 560px;
  overflow: visible;
  align-self: start;
}

.reminder-panel .panel-head,
.reminder-plan-section,
.reminder-month-section {
  flex: 0 0 auto;
}

.reminder-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: #fffaf2;
  color: var(--ink);
  text-align: left;
  cursor: default;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.reminder-item:hover,
.reminder-item:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(23, 126, 114, 0.12);
  outline: 0;
  transform: translateY(-1px);
}

.reminder-project-reference {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(23, 126, 114, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
}

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

.reminder-project-reference strong {
  font-size: 13px;
}

.reminder-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

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

.reminder-ledger-button {
  flex: 0 0 auto;
}

.reminder-item.overdue {
  border-left-color: var(--rose);
  background: var(--rose-soft);
}

.reminder-item.followup {
  border-left-color: var(--teal);
  background: #edf8f6;
}

.reminder-item.contract {
  border-left-color: #315d7d;
  background: #eef5f9;
}

.reminder-item.contract-scan {
  border-left-color: #8a5a15;
  background: #fff7e6;
}

.reminder-item.invoice {
  border-left-color: var(--rose);
  background: #fff4f2;
}

.reminder-item.partial {
  border-left-color: #315d7d;
  background: #eef5f9;
}

.task-owner {
  font-weight: 800;
}

.reminder-assignee {
  display: grid;
  grid-template-columns: auto minmax(180px, 280px);
  align-items: center;
  justify-content: start;
  gap: 9px;
  margin-top: 2px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  cursor: default;
}

.reminder-assignee select {
  min-height: 34px;
  padding: 5px 30px 5px 9px;
  background: #fff;
}

.task-toolbar,
.segmented-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.segmented-control {
  overflow: hidden;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.segmented-control button {
  min-height: 34px;
  padding: 0 11px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.segmented-control button.active {
  background: var(--ink);
  color: #fff;
}

.member-position-select {
  min-width: 140px;
}

.reminder-item strong {
  font-size: 14px;
  line-height: 1.35;
}

.reminder-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.table-wrap {
  margin-top: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fff;
}

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

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f2f6f3;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

td input,
td select {
  height: 34px;
  padding: 0 8px;
  font-size: 13px;
}

.cell-title {
  display: block;
  max-width: 280px;
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.amount-danger {
  color: var(--rose);
  font-weight: 900;
}

.overview-action {
  min-height: 30px;
  padding: 0 10px;
}

.stage-name {
  min-width: 130px;
}

.stage-trigger {
  min-width: 210px;
}

.stage-money {
  min-width: 112px;
}

.stage-paid-cell {
  min-width: 560px;
}

.stage-paid-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 250px;
}

.stage-paid-detail {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stage-progress {
  width: 100%;
  height: 5px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eeeb;
}

.stage-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.stage-payment-trigger {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #b9d2df;
  border-radius: 6px;
  background: #f1f7fa;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.stage-payment-trigger:hover {
  background: #e0f0f4;
}

.stage-paid-complete {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.stage-payment-form {
  display: grid;
  grid-template-columns: minmax(104px, 0.8fr) minmax(120px, 0.8fr) minmax(138px, 0.9fr) minmax(120px, 0.8fr) minmax(150px, 1.1fr) auto;
  gap: 7px;
  margin-top: 9px;
  padding: 9px;
  border: 1px solid #d5e3df;
  border-radius: 6px;
  background: #f8fbf9;
}

.stage-payment-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.stage-payment-form input {
  width: 100%;
  min-width: 0;
}

.stage-payment-form button {
  align-self: end;
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.stage-payments {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.stage-payments div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(100px, 1fr) auto;
  gap: 7px;
  align-items: center;
}

.stage-payment-revoke {
  min-height: 24px;
  padding: 0 6px;
  font-size: 11px;
}

.stage-payments strong {
  color: var(--ink);
}

.source-text {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-action {
  border: 1px solid transparent;
}

.status-action:hover {
  border-color: currentColor;
  filter: brightness(0.97);
}

.status-pill.overdue {
  background: var(--rose-soft);
  color: var(--rose);
}

.status-pill.due_soon,
.status-pill.watch {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-pill.paid {
  background: var(--green-soft);
  color: var(--teal-dark);
}

.status-pill.inactive {
  background: #edf0ee;
  color: var(--muted);
}

.status-pill.partial {
  background: #eef5f9;
  color: #315d7d;
}

.member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 290px;
}

.member-status-button,
.member-role-button,
.member-edit-button {
  min-height: 30px;
  padding: 0 10px;
}

.member-status-button:disabled,
.member-role-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.letter-panel textarea {
  min-height: 250px;
  margin-top: 14px;
  padding: 14px;
  resize: vertical;
  line-height: 1.7;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 88px;
  border: 1px dashed #cbd7d0;
  border-radius: 8px;
  color: var(--muted);
  background: #fafbfa;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 13px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(32, 39, 35, 0.38);
}

.modal-panel {
  width: min(980px, 100%);
  max-height: min(780px, calc(100vh - 48px));
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.team-settings-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.team-settings-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.member-edit-form {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #b9d2df;
  border-radius: 8px;
  background: #f4f8fa;
}

.member-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.member-edit-head > div {
  display: grid;
  gap: 3px;
}

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

.team-wrap table {
  min-width: 920px;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 760px) {
  .inline-upload-form {
    align-items: stretch;
    flex-direction: column;
  }

  .file-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .workspace-upload-box {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .workspace-upload-box button {
    width: 100%;
  }

  .module-project-head {
    align-items: stretch;
    flex-direction: column;
  }

  .module-project-search-row {
    grid-template-columns: 1fr;
  }

  .module-project-picker {
    grid-template-columns: 1fr;
    max-height: 420px;
  }

  .invoice-payment-form,
  .invoice-amounts,
  .invoice-payments div,
  .stage-payment-form,
  .stage-payments div {
    grid-template-columns: 1fr;
  }

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

  .reminder-plan-head,
  .reminder-plan-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .reminder-plan-summary {
    grid-template-columns: 1fr;
  }

  .reminder-plan-task {
    align-items: flex-start;
    flex-direction: column;
  }

  .reminder-plan-task span:last-child {
    justify-items: start;
  }
  .auth-screen {
    align-items: start;
    padding: 16px;
  }

  .auth-panel {
    padding: 18px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workspace {
    padding: 18px;
  }

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

  .topbar-actions,
  .split-actions {
    width: 100%;
  }

  .team-actions {
    grid-template-columns: 1fr;
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-nav-label {
    grid-column: 1 / -1;
  }

  .topbar-actions button,
  .split-actions button {
    flex: 1;
  }

  .metrics,
  .form-grid,
  .dashboard-metrics {
    grid-template-columns: 1fr;
  }

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

  .dashboard-focus {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .dashboard-focus-copy strong {
    font-size: 38px;
  }

  .dashboard-legend,
  .dashboard-focus-stat {
    width: 100%;
  }

  .dashboard-risk-section {
    grid-column: auto;
  }

  .dashboard-head,
  .dashboard-risk-item {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-toolbar {
    width: 100%;
  }

  .dashboard-toolbar button,
  .dashboard-toolbar label,
  .dashboard-toolbar input {
    width: 100%;
  }

  .ledger-contract-groups,
  .ledger-contract-filter {
    width: 100%;
  }

  .ledger-contract-filter button {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 7px;
  }

  .ledger-contract-filter {
    flex-wrap: wrap;
    overflow: visible;
  }

  .ledger-contract-filter button {
    flex: 1 1 50%;
    min-width: 50%;
  }

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

  .overview-pagination-controls {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .team-settings-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .team-settings-form button {
    width: 100%;
  }

  .reminder-assignee {
    grid-template-columns: 1fr;
  }

  .reminder-assignee select {
    width: 100%;
  }

  .reminder-project-reference,
  .reminder-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .reminder-ledger-button {
    width: 100%;
  }

  .reminder-actions {
    width: 100%;
    flex-direction: column;
  }

  .reminder-actions button {
    width: 100%;
  }

  .reminder-panel {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .reminder-list {
    padding-right: 0;
    overflow: visible;
  }

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

  .reminder-pagination-controls {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .dashboard-risk-side {
    justify-items: start;
  }

  .risk-tags {
    justify-content: flex-start;
  }

  .form-grid .wide {
    grid-column: auto;
  }

  .metric strong {
    font-size: 21px;
  }

  .modal {
    align-items: start;
    padding: 12px;
  }

  .modal-panel {
    max-height: calc(100vh - 24px);
    padding: 14px;
  }

  .modal-panel .panel-head {
    align-items: flex-start;
  }
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: normal;
}

.checkbox-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.invoice-issued-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 600;
}

.project-amount-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.amount-summary-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.amount-summary-cell span {
  color: var(--muted);
  font-size: 13px;
}

.amount-summary-cell strong {
  font-size: 18px;
  color: var(--ink);
}

.amount-summary-cell small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.amount-summary-cell.summary-invoiced strong {
  color: var(--amber);
}

.amount-summary-cell.summary-receivable.amount-danger strong {
  color: var(--rose);
}

.amount-summary-empty {
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.overview-wrap tbody tr.invoice-unpaid {
  background: var(--amber-soft);
}

.invoice-unpaid-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .project-amount-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.module-settled-filter {
  margin: 8px 0 4px;
}

.overview-wrap tbody tr.completed-unpaid {
  background: var(--rose-soft);
}

.completed-unpaid-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--rose-soft);
  color: var(--rose);
  font-size: 12px;
  font-weight: 600;
}

.completed-stage-toggle {
  margin-top: 4px;
}

.completed-stage-detail-row td {
  padding: 0;
}

.completed-stage-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  padding: 10px 16px;
  background: var(--rose-soft);
  border-top: 1px dashed var(--rose);
}

.completed-stage-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
  font-size: 13px;
}

.completed-stage-line strong {
  color: var(--ink);
}

.completed-stage-line span {
  color: var(--muted);
}

.completed-stage-line .amount-danger {
  color: var(--rose);
  font-weight: 600;
}

.reminder-item.deliverable-completed {
  border-left: 3px solid var(--rose);
  background: var(--rose-soft);
}

.stage-invoice-info {
  margin-top: 4px;
  color: var(--amber);
  font-size: 12px;
}
