.nav-item.surplus-nav-item {
  margin-top: 12px;
  position: relative;
}

.nav-item.surplus-nav-item::before {
  background: rgba(218, 239, 224, 0.2);
  content: "";
  height: 1px;
  left: 12px;
  position: absolute;
  right: 12px;
  top: -7px;
}

.surplus-nav-tag {
  background: rgba(223, 241, 156, 0.16);
  border: 1px solid rgba(223, 241, 156, 0.28);
  border-radius: 999px;
  color: #dff19c;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-left: auto;
  padding: 3px 6px;
  text-transform: uppercase;
}

.nav-item.surplus-nav-item.is-active .surplus-nav-tag {
  background: #174b43;
  border-color: #174b43;
  color: #f4f7e8;
}

.surplus-page {
  color: #18322e;
  display: grid;
  gap: 20px;
  margin: 0 auto;
  max-width: 1560px;
  width: 100%;
}

.surplus-hero {
  align-items: flex-end;
  background:
    radial-gradient(circle at 88% 16%, rgba(223, 241, 156, 0.34), transparent 28%),
    linear-gradient(135deg, #0d4039 0%, #15594e 62%, #1b6759 100%);
  border: 1px solid rgba(10, 60, 52, 0.2);
  border-radius: 24px;
  box-shadow: 0 18px 44px rgba(17, 67, 58, 0.16);
  color: #fffdf6;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  min-height: 184px;
  overflow: hidden;
  padding: 28px 30px;
  position: relative;
}

.surplus-hero::after {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 50%;
  content: "";
  height: 230px;
  position: absolute;
  right: -64px;
  top: -116px;
  width: 230px;
}

.surplus-eyebrow {
  color: #dff19c;
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.surplus-hero h2 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 400;
  line-height: 1.04;
  margin: 0 0 10px;
  max-width: 680px;
}

.surplus-hero p {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  max-width: 680px;
}

.surplus-hero-actions {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 220px;
  position: relative;
  z-index: 1;
}

.surplus-approved-pill {
  align-items: center;
  background: rgba(223, 241, 156, 0.15);
  border: 1px solid rgba(223, 241, 156, 0.32);
  border-radius: 999px;
  color: #eff9c5;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 7px;
  padding: 7px 11px;
}

.surplus-approved-pill::before {
  background: #dff19c;
  border-radius: 50%;
  content: "";
  height: 7px;
  width: 7px;
}

.surplus-outline-button,
.surplus-primary-button,
.surplus-table-button,
.surplus-modal-button {
  align-items: center;
  border-radius: 11px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.surplus-outline-button:hover,
.surplus-primary-button:hover,
.surplus-table-button:hover,
.surplus-modal-button:hover {
  transform: translateY(-1px);
}

.surplus-outline-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: #fff;
}

.surplus-outline-button svg,
.surplus-primary-button svg,
.surplus-table-button svg,
.surplus-modal-button svg,
.surplus-scope-note svg {
  fill: currentColor;
  height: 17px;
  width: 17px;
}

.surplus-scope-note {
  align-items: center;
  background: #f2f8f3;
  border: 1px solid #cfe1d7;
  border-radius: 14px;
  color: #315c52;
  display: flex;
  font-size: 12px;
  gap: 10px;
  line-height: 1.5;
  padding: 12px 15px;
}

.surplus-scope-note strong {
  color: #174b43;
}

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

.surplus-kpi {
  animation: surplus-rise 340ms ease both;
  background: #fffef9;
  border: 1px solid #d7e1dc;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(25, 63, 55, 0.07);
  min-height: 136px;
  padding: 20px;
}

.surplus-kpi:nth-child(2) { animation-delay: 45ms; }
.surplus-kpi:nth-child(3) { animation-delay: 90ms; }
.surplus-kpi:nth-child(4) { animation-delay: 135ms; }

.surplus-kpi-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.surplus-kpi-label {
  color: #647a74;
  font-size: 11px;
  font-weight: 700;
}

.surplus-kpi-icon {
  align-items: center;
  background: #edf6f2;
  border-radius: 11px;
  color: #1a6759;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.surplus-kpi-icon.is-gold {
  background: #fff3d8;
  color: #a36a0a;
}

.surplus-kpi-icon.is-lime {
  background: #eff7c9;
  color: #405f25;
}

.surplus-kpi-icon svg {
  fill: currentColor;
  height: 18px;
  width: 18px;
}

.surplus-kpi strong {
  color: #18322e;
  display: block;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 9px;
}

.surplus-kpi small {
  color: #82938e;
  font-size: 10px;
}

.surplus-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.55fr);
}

.surplus-panel {
  background: #fffef9;
  border: 1px solid #d7e1dc;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(25, 63, 55, 0.06);
  overflow: hidden;
}

.surplus-panel-head {
  align-items: flex-start;
  border-bottom: 1px solid #e2e9e5;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px 20px;
}

.surplus-panel-head h3 {
  color: #1c3732;
  font-size: 14px;
  margin: 0 0 4px;
}

.surplus-panel-head p {
  color: #7b8f89;
  font-size: 10px;
  margin: 0;
}

.surplus-progress-wrap {
  padding: 22px 20px 20px;
}

.surplus-progress-row {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.surplus-progress-row strong {
  color: #194f45;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 28px;
  font-weight: 400;
}

.surplus-progress-row span {
  color: #688079;
  font-size: 11px;
}

.surplus-progress-track {
  background: #e8efeb;
  border-radius: 999px;
  height: 11px;
  overflow: hidden;
}

.surplus-progress-bar {
  background: linear-gradient(90deg, #176657, #93bb55);
  border-radius: inherit;
  height: 100%;
  transition: width 280ms ease;
}

.surplus-progress-legend {
  display: flex;
  gap: 20px;
  margin-top: 14px;
}

.surplus-progress-legend span {
  align-items: center;
  color: #647a74;
  display: inline-flex;
  font-size: 10px;
  gap: 7px;
}

.surplus-progress-legend i {
  background: #176657;
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.surplus-progress-legend span:last-child i {
  background: #d8e1dc;
}

.surplus-workflow {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
}

.surplus-workflow-step {
  align-items: center;
  display: grid;
  gap: 11px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
}

.surplus-workflow-step > span:first-child {
  align-items: center;
  background: #e9f3ed;
  border-radius: 9px;
  color: #176657;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.surplus-workflow-step strong {
  color: #29443e;
  display: block;
  font-size: 11px;
  margin-bottom: 2px;
}

.surplus-workflow-step small {
  color: #82938e;
  display: block;
  font-size: 9px;
}

.surplus-step-status {
  background: #e5f5ef;
  border-radius: 999px;
  color: #18705f;
  font-size: 8px;
  font-weight: 800;
  padding: 5px 8px;
  text-transform: uppercase;
}

.surplus-step-status.is-current {
  background: #fff0c7;
  color: #9a6508;
}

.surplus-table-panel {
  background: #fffef9;
  border: 1px solid #d7e1dc;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(25, 63, 55, 0.06);
  overflow: hidden;
}

.surplus-table-toolbar {
  align-items: center;
  border-bottom: 1px solid #e2e9e5;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px 20px;
}

.surplus-table-toolbar h3 {
  color: #1c3732;
  font-size: 14px;
  margin: 0 0 4px;
}

.surplus-table-toolbar p {
  color: #7b8f89;
  font-size: 10px;
  margin: 0;
}

.surplus-tools {
  align-items: center;
  display: flex;
  gap: 9px;
}

.surplus-search {
  align-items: center;
  background: #fff;
  border: 1px solid #d4dfda;
  border-radius: 11px;
  display: flex;
  min-width: 250px;
  padding: 0 11px;
}

.surplus-search svg {
  fill: #789089;
  height: 17px;
  width: 17px;
}

.surplus-search input,
.surplus-filter {
  background: transparent;
  border: 0;
  color: #2b4540;
  font: inherit;
  font-size: 11px;
  height: 40px;
  outline: none;
}

.surplus-search input {
  min-width: 0;
  padding: 0 8px;
  width: 100%;
}

.surplus-filter {
  background: #fff;
  border: 1px solid #d4dfda;
  border-radius: 11px;
  padding: 0 30px 0 11px;
}

.surplus-table-scroll {
  overflow-x: auto;
}

.surplus-table {
  border-collapse: collapse;
  min-width: 1040px;
  width: 100%;
}

.surplus-table th {
  background: #f8faf6;
  color: #71847e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 12px 16px;
  text-align: left;
  text-transform: uppercase;
}

.surplus-table th.is-number,
.surplus-table td.is-number {
  text-align: right;
}

.surplus-table td {
  border-top: 1px solid #e5ebe8;
  color: #304b45;
  font-size: 11px;
  padding: 13px 16px;
  vertical-align: middle;
}

.surplus-person {
  align-items: center;
  display: flex;
  gap: 10px;
}

.surplus-person-mark {
  align-items: center;
  background: #e2efea;
  border-radius: 10px;
  color: #1c6256;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.surplus-person strong {
  color: #223d38;
  display: block;
  font-size: 11px;
  margin-bottom: 2px;
}

.surplus-person small {
  color: #869791;
  font-size: 9px;
}

.surplus-net {
  color: #145d50;
  font-weight: 800;
}

.surplus-status {
  align-items: center;
  background: #fff0c7;
  border-radius: 999px;
  color: #94610a;
  display: inline-flex;
  font-size: 8px;
  font-weight: 800;
  gap: 6px;
  padding: 6px 9px;
  text-transform: uppercase;
}

.surplus-status::before {
  background: currentColor;
  border-radius: 50%;
  content: "";
  height: 6px;
  width: 6px;
}

.surplus-status.is-paid {
  background: #e2f3ec;
  color: #1c725f;
}

.surplus-table-button {
  background: #fff;
  border: 1px solid #cbdad4;
  color: #1b5d51;
  min-height: 34px;
  padding: 0 12px;
}

.surplus-table-button.is-primary {
  background: #174f45;
  border-color: #174f45;
  color: #fff;
}

.surplus-empty {
  color: #7d918a;
  padding: 32px 20px;
  text-align: center;
}

.surplus-table-foot {
  align-items: center;
  background: #fafbf7;
  border-top: 1px solid #e2e9e5;
  color: #7a8e88;
  display: flex;
  font-size: 9px;
  justify-content: space-between;
  padding: 11px 20px;
}

.surplus-modal-layer {
  align-items: center;
  background: rgba(8, 34, 29, 0.62);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 22px;
  position: fixed;
  z-index: 1000;
}

.surplus-modal {
  animation: surplus-modal-in 180ms ease both;
  background: #fffef9;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(2, 28, 23, 0.3);
  max-height: calc(100vh - 44px);
  max-width: 620px;
  overflow: auto;
  width: 100%;
}

.surplus-modal.is-small {
  max-width: 540px;
}

.surplus-modal-head {
  align-items: flex-start;
  border-bottom: 1px solid #dfe8e3;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 20px 22px;
}

.surplus-modal-head h3 {
  color: #18352f;
  font-size: 17px;
  margin: 0 0 4px;
}

.surplus-modal-head p {
  color: #7d918b;
  font-size: 10px;
  margin: 0;
}

.surplus-close {
  align-items: center;
  background: #eff4f1;
  border: 0;
  border-radius: 10px;
  color: #4f6962;
  cursor: pointer;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.surplus-close svg {
  fill: currentColor;
  height: 17px;
  width: 17px;
}

.surplus-modal-body {
  padding: 22px;
}

.surplus-person-summary {
  align-items: center;
  background: #f1f7f3;
  border: 1px solid #d4e3dc;
  border-radius: 14px;
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding: 13px;
}

.surplus-person-summary .surplus-person-mark {
  height: 42px;
  width: 42px;
}

.surplus-person-summary strong {
  color: #183d35;
  display: block;
  font-size: 13px;
  margin-bottom: 3px;
}

.surplus-person-summary small {
  color: #758b84;
  font-size: 10px;
}

.surplus-details {
  border: 1px solid #dce6e1;
  border-radius: 14px;
  overflow: hidden;
}

.surplus-detail-row {
  align-items: center;
  border-top: 1px solid #e4ebe7;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 11px 13px;
}

.surplus-detail-row:first-child {
  border-top: 0;
}

.surplus-detail-row span {
  color: #71867f;
  font-size: 10px;
}

.surplus-detail-row strong {
  color: #29473f;
  font-size: 11px;
  text-align: right;
}

.surplus-detail-row.is-total {
  background: #edf5c9;
  padding-bottom: 14px;
  padding-top: 14px;
}

.surplus-detail-row.is-total span,
.surplus-detail-row.is-total strong {
  color: #244433;
  font-size: 13px;
  font-weight: 800;
}

.surplus-field {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.surplus-field label {
  color: #304e46;
  font-size: 10px;
  font-weight: 800;
}

.surplus-field select {
  background: #fff;
  border: 1px solid #cddbd5;
  border-radius: 11px;
  color: #25453d;
  font: inherit;
  font-size: 11px;
  height: 42px;
  padding: 0 12px;
}

.surplus-warning {
  align-items: flex-start;
  background: #fff7df;
  border: 1px solid #f0d99a;
  border-radius: 12px;
  color: #795817;
  display: flex;
  font-size: 9px;
  gap: 9px;
  line-height: 1.5;
  margin-top: 16px;
  padding: 11px;
}

.surplus-warning svg {
  fill: currentColor;
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
}

.surplus-modal-foot {
  align-items: center;
  background: #fafbf7;
  border-top: 1px solid #dfe8e3;
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  padding: 15px 22px;
}

.surplus-modal-button {
  background: #fff;
  border: 1px solid #cbd9d3;
  color: #2d554c;
}

.surplus-modal-button.is-primary {
  background: #155448;
  border-color: #155448;
  color: #fff;
}

.surplus-receipt-success {
  padding: 4px 0 20px;
  text-align: center;
}

.surplus-success-mark {
  align-items: center;
  background: #e5f5ed;
  border: 8px solid #f2f9f5;
  border-radius: 50%;
  color: #176657;
  display: inline-flex;
  height: 72px;
  justify-content: center;
  margin-bottom: 13px;
  width: 72px;
}

.surplus-success-mark svg {
  fill: currentColor;
  height: 28px;
  width: 28px;
}

.surplus-receipt-success h3 {
  color: #173b33;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 5px;
}

.surplus-receipt-success p {
  color: #7b8e88;
  font-size: 10px;
  margin: 0;
}

.surplus-receipt-code {
  color: #687e77;
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  text-align: center;
}

@keyframes surplus-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes surplus-modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1120px) {
  .surplus-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .surplus-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .surplus-page {
    gap: 14px;
  }

  .surplus-hero {
    align-items: flex-start;
    border-radius: 18px;
    flex-direction: column;
    min-height: 0;
    padding: 22px 19px;
  }

  .surplus-hero-actions {
    align-items: stretch;
    min-width: 0;
    width: 100%;
  }

  .surplus-kpis {
    grid-template-columns: 1fr;
  }

  .surplus-kpi {
    min-height: 118px;
  }

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

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

  .surplus-search {
    min-width: 0;
  }

  .surplus-filter {
    width: 100%;
  }

  .surplus-modal-layer {
    align-items: flex-end;
    padding: 0;
  }

  .surplus-modal,
  .surplus-modal.is-small {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-height: 92vh;
    max-width: none;
  }

  .surplus-modal-foot {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .surplus-modal-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .surplus-kpi,
  .surplus-modal {
    animation: none;
  }

  .surplus-progress-bar,
  .surplus-outline-button,
  .surplus-primary-button,
  .surplus-table-button,
  .surplus-modal-button {
    transition: none;
  }
}
