.closure-shell {
  padding: 0;
  overflow: visible;
}

.closure-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
}

.closure-tabs .btn {
  width: auto;
  min-width: 104px;
  height: 34px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #d8e0eb;
  border-radius: 5px;
  background: #fff;
  color: #425168;
  font-size: 13px;
  font-weight: 400;
  box-shadow: none;
}

.closure-tabs .btn.active {
  color: #fff;
  background: linear-gradient(180deg, #163e98, #0f57b8);
  border-color: transparent;
  box-shadow: none;
}

.closure-panel {
  padding: 0;
  background: transparent;
}

.closure-panel[hidden] {
  display: none;
}

.closure-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.closure-status-card {
  min-width: 0;
  min-height: 108px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #dbe5f2;
  border-radius: 10px;
}

.closure-status-card span,
.closure-status-card small {
  display: block;
}

.closure-status-card span {
  color: #66758c;
  font-size: 13px;
}

.closure-status-card strong {
  display: block;
  margin: 10px 0 7px;
  color: #1d2c45;
  font-size: 23px;
  white-space: nowrap;
}

.closure-status-card small {
  color: #8491a5;
  line-height: 1.5;
}

.closure-status-card.passed {
  border-top: 3px solid #20a36a;
}

.closure-status-card.passed strong {
  color: #16875a;
}

.closure-status-card.pending {
  border-top: 3px solid #e79b27;
}

.closure-status-card.pending strong {
  color: #b56b0b;
}

.closure-overview-lower {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(360px, 1.35fr);
  gap: 14px;
  margin-top: 14px;
}

.closure-overview-lower > div {
  min-width: 0;
  padding: 18px;
  background: #fff;
  border: 1px solid #dbe5f2;
  border-radius: 10px;
}

.closure-overview-lower h3 {
  margin: 0 0 9px;
  font-size: 15px;
}

.closure-overview-lower strong {
  color: #1268d8;
  font-size: 25px;
  white-space: nowrap;
}

.closure-overview-lower p {
  margin: 7px 0 0;
  color: #7a8799;
}

.closure-overview-lower ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.closure-overview-lower li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f6;
  color: #5e6b7e;
}

.closure-overview-lower li:last-child {
  border-bottom: 0;
}

.closure-overview-lower li b {
  color: #b2680b;
  white-space: nowrap;
}

.closure-ready {
  color: #16875a !important;
}

.closure-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.closure-section-head h2 {
  margin: 0 0 5px;
  font-size: 19px;
}

.closure-section-head p {
  margin: 0;
  color: #6e7c91;
  font-size: 13px;
}

.closure-section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.closure-section-actions .btn,
.closure-confirm-action .btn,
.closure-ledger-layout .invoice-detail-actions .btn,
.simulation-modal [data-closure-archive-form] .btn,
.simulation-modal [data-closure-exception-form] .btn,
.simulation-modal [data-project-close-form] .btn,
.simulation-modal [data-project-reopen-form] .btn {
  width: auto;
  height: 34px;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #d8e0eb;
  border-radius: 5px;
  background: #fff;
  color: #425168;
  font-size: 13px;
  font-weight: 400;
  box-shadow: none;
}

.closure-section-actions .btn.primary,
.closure-ledger-layout .invoice-detail-actions .btn.primary,
.simulation-modal [data-closure-archive-form] .btn.primary,
.simulation-modal [data-closure-exception-form] .btn.primary,
.simulation-modal [data-project-close-form] .btn.primary,
.simulation-modal [data-project-reopen-form] .btn.primary {
  border-color: transparent;
  background: linear-gradient(180deg, #163e98, #0f57b8);
  color: #fff;
  box-shadow: none;
}

.closure-section-actions > span {
  padding: 6px 11px;
  color: #9b5a0a;
  background: #fff5e5;
  border: 1px solid #f2d29e;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.closure-overview-layout,
.closure-ledger-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 20px;
  align-items: start;
}

.closure-overview-main,
.closure-ledger-main {
  min-width: 0;
}

.closure-overview-layout .invoice-record-detail,
.closure-ledger-layout .invoice-record-detail {
  display: block !important;
}

.closure-overview-main .table-wrap,
.closure-ledger-main .table-wrap {
  border: 1px solid #dbe5f2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 16px #1949800d;
  overflow: auto;
}

.closure-overview-main .table,
.closure-ledger-main .table {
  min-width: 760px;
}

.project-workbench.project-closure-page .closure-overview-main .business-record-table th,
.project-workbench.project-closure-page .closure-ledger-main .business-record-table th {
  text-align: center !important;
}

.project-workbench.project-closure-page [data-closure-panel="overview"] .business-record-table td:nth-child(1),
.project-workbench.project-closure-page [data-closure-panel="overview"] .business-record-table td:nth-child(3),
.project-workbench.project-closure-page [data-closure-panel="overview"] .business-record-table td:nth-child(4),
.project-workbench.project-closure-page [data-closure-panel="overview"] .business-record-table td:nth-child(6),
.project-workbench.project-closure-page [data-closure-panel="archives"] .business-record-table td:nth-child(1),
.project-workbench.project-closure-page [data-closure-panel="archives"] .business-record-table td:nth-child(3),
.project-workbench.project-closure-page [data-closure-panel="archives"] .business-record-table td:nth-child(4),
.project-workbench.project-closure-page [data-closure-panel="archives"] .business-record-table td:nth-child(6),
.project-workbench.project-closure-page [data-closure-panel="exceptions"] .business-record-table td:nth-child(1),
.project-workbench.project-closure-page [data-closure-panel="exceptions"] .business-record-table td:nth-child(3),
.project-workbench.project-closure-page [data-closure-panel="exceptions"] .business-record-table td:nth-child(4),
.project-workbench.project-closure-page [data-closure-panel="exceptions"] .business-record-table td:nth-child(7) {
  text-align: center !important;
}

.project-workbench.project-closure-page [data-closure-panel="overview"] .business-record-table td:nth-child(2),
.project-workbench.project-closure-page [data-closure-panel="overview"] .business-record-table td:nth-child(5),
.project-workbench.project-closure-page [data-closure-panel="archives"] .business-record-table td:nth-child(2),
.project-workbench.project-closure-page [data-closure-panel="archives"] .business-record-table td:nth-child(5),
.project-workbench.project-closure-page [data-closure-panel="exceptions"] .business-record-table td:nth-child(2),
.project-workbench.project-closure-page [data-closure-panel="exceptions"] .business-record-table td:nth-child(5),
.project-workbench.project-closure-page [data-closure-panel="exceptions"] .business-record-table td:nth-child(6) {
  text-align: left !important;
}

.closure-overview-main tbody tr,
.closure-ledger-main tbody tr {
  cursor: pointer;
}

.closure-check-result {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.closure-check-result.passed {
  color: #087653;
  background: #e8f8f1;
}

.closure-check-result.pending {
  color: #9b5a0a;
  background: #fff3df;
}

.closure-check-result.advisory {
  color: #245ca4;
  background: #edf4ff;
}

.closure-ledger-main .business-operation-links {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 4px;
  white-space: nowrap;
}

.closure-confirm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}

.closure-confirm-main,
.closure-confirm-action {
  padding: 20px;
  background: #fff;
  border: 1px solid #dbe5f2;
  border-radius: 10px;
}

.closure-confirm-main h2 {
  margin: 0 0 12px;
  font-size: 19px;
}

.closure-check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #edf1f6;
}

.closure-check-row i {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-style: normal;
  font-weight: 800;
}

.closure-check-row.passed i {
  color: #16875a;
  background: #e7f7f0;
}

.closure-check-row.pending i {
  color: #b2680b;
  background: #fff3df;
}

.closure-check-row b,
.closure-check-row span {
  display: block;
}

.closure-check-row span {
  margin-top: 4px;
  color: #778398;
  font-size: 12px;
}

.closure-nonblocking {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.closure-nonblocking > div {
  padding: 13px;
  background: #f4f8fd;
  border-radius: 8px;
}

.closure-nonblocking b,
.closure-nonblocking span {
  display: block;
}

.closure-nonblocking span {
  margin-top: 5px;
  color: #718096;
  font-size: 12px;
}

.closure-confirm-action {
  text-align: center;
}

.closure-final-state {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
}

.closure-final-state.ready,
.closure-final-state.closed {
  color: #087653;
  background: #e8f8f1;
}

.closure-final-state.blocked {
  color: #9b5a0a;
  background: #fff3df;
}

.closure-confirm-action h3 {
  margin: 16px 0 9px;
}

.closure-confirm-action p {
  min-height: 58px;
  margin: 0 0 16px;
  color: #6f7c90;
  font-size: 13px;
  line-height: 1.65;
}

.closure-confirm-action .btn {
  width: 100%;
}

.closure-confirm-action .btn.primary {
  border-color: transparent;
  background: linear-gradient(180deg, #163e98, #0f57b8);
  color: #fff;
  box-shadow: none;
}

.closure-action-note {
  margin: 0 0 16px;
  padding: 12px 14px;
  color: #526178;
  background: #f4f8fd;
  border-radius: 8px;
  line-height: 1.65;
}

[data-project-reopen-form] > label {
  display: grid;
  gap: 7px;
  color: #526178;
  font-size: 13px;
}

@media (max-width: 980px) {
  .closure-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .closure-overview-lower {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .closure-pending-card {
    grid-column: 1 / -1;
  }

  .closure-overview-layout,
  .closure-ledger-layout,
  .closure-confirm-layout {
    grid-template-columns: 1fr;
  }

  .closure-overview-layout .invoice-record-detail,
  .closure-ledger-layout .invoice-record-detail {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .closure-tabs {
    overflow-x: auto;
  }

  .closure-card-grid,
  .closure-overview-lower,
  .closure-nonblocking {
    grid-template-columns: 1fr;
  }

  .closure-pending-card {
    grid-column: auto;
  }

  .closure-panel {
    padding: 12px;
  }

  .closure-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
