.agency-closures-page { display: grid; gap: 18px; }
.agency-closures-heading { align-items: flex-end; display: flex; justify-content: space-between; }
.agency-closures-heading p { color: var(--text-muted); margin: 5px 0 0; }
.agency-closures-feedback { min-height: 20px; margin: 0; color: var(--success-color, #138a54); }
.agency-closures-feedback--error { color: var(--danger-color, #c73b3b); }
.agency-closures-config { align-items: center; display: flex; gap: 20px; justify-content: space-between; padding: 18px; }
.agency-closures-config > div { display: grid; gap: 5px; }
.agency-closures-config__form { display: grid; gap: 10px; min-width: min(540px, 64%); }
.agency-closures-config__controls { align-items: center; display: flex; gap: 10px; }
.agency-closures-config__form select { min-width: 280px; }
.agency-closures-config__existing { align-items: flex-start; display: flex; gap: 9px; }
.agency-closures-config__existing input { margin-top: 3px; }
.agency-closures-config__existing span { display: grid; gap: 2px; }
.agency-closures-config__existing small { color: var(--text-muted); line-height: 1.35; }
.agency-closures-summary { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.agency-closures-summary article { background: #fff; border: 1px solid var(--border-color); border-radius: 14px; display: grid; gap: 8px; padding: 18px; }
.agency-closures-summary span { color: var(--text-muted); }
.agency-closures-summary strong { font-size: 1.35rem; }
.agency-closures-create, .agency-closures-list { overflow: visible; padding: 18px; }
.agency-closures-create__form { display: grid; gap: 18px; }
.agency-closures-create__header, .agency-closures-list__toolbar { align-items: center; display: flex; justify-content: space-between; }
.agency-closures-list__toolbar { flex-wrap: wrap; justify-content: flex-end; }
.agency-closures-list__toolbar label { align-items: center; display: grid; gap: 5px; }
.agency-closures-list__toolbar input,
.agency-closures-list__toolbar select { min-height: 38px; }
.agency-closures-table { border-collapse: collapse; width: 100%; }
.agency-closures-table th, .agency-closures-table td { border-bottom: 1px solid var(--border-color); padding: 11px 10px; text-align: left; vertical-align: middle; }
.agency-closures-table th { color: var(--text-muted); font-size: .78rem; text-transform: uppercase; }
.agency-closures-table input[type='text'] { min-width: 105px; width: 100%; }
.agency-closures-adjustments { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.agency-closures-adjustments label { display: grid; gap: 7px; }
.agency-closures-adjustments__help { color: var(--text-muted); margin: -8px 0 0; }
.agency-closures-create__actions { display: flex; gap: 10px; justify-content: flex-end; }
.agency-closures-create__header-actions { display: flex; align-items: center; gap: 8px; }
.agency-closures-rejected { background: #fff7e7; border: 1px solid #efd18a; border-radius: 12px; padding: 14px 16px; }
.agency-closures-rejected ul { margin: 8px 0 0; padding-left: 20px; }
.agency-closures-status { border-radius: 999px; display: inline-flex; font-size: .78rem; font-weight: 700; padding: 5px 10px; }
.agency-closures-status--pending { background: #8a5100; color: #fff; }
.agency-closures-status--confirmed { background: #147347; color: #fff; }
.agency-closures-detail { display: grid; gap: 16px; min-width: 0; }
.agency-closures-detail__actions { display: flex; justify-content: flex-end; }
.agency-closures-detail__summary { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.agency-closures-detail__summary div { background: #f7f9fc; border-radius: 10px; display: grid; gap: 4px; padding: 10px 12px; }
.agency-closures-detail__summary dt { color: var(--text-muted); font-size: .78rem; font-weight: 700; }
.agency-closures-detail__summary dd { font-weight: 700; margin: 0; }
.agency-closures-detail__table-wrap { max-height: min(52vh, 560px); overflow: auto; }
.agency-closures-detail__table { min-width: 1260px; }
.agency-closures-detail__table th { position: sticky; top: 0; background: #fff; z-index: 1; }
.agency-closures-detail-button, .agency-closures-confirm { white-space: nowrap; }
@media (max-width: 900px) {
  .agency-closures-config, .agency-closures-heading { align-items: stretch; flex-direction: column; }
  .agency-closures-config__form { min-width: 0; width: 100%; }
  .agency-closures-config__controls { align-items: stretch; flex-direction: column; }
  .agency-closures-config__form select { min-width: 0; width: 100%; }
  .agency-closures-summary, .agency-closures-adjustments { grid-template-columns: 1fr; }
  .agency-closures-detail__summary { grid-template-columns: 1fr 1fr; }
  .agency-closures-list, .agency-closures-create { overflow-x: auto; }
  .agency-closures-table { min-width: 900px; }
}

/* Enterprise cash-transfer workspace; the table remains complete and scrollable. */
.agency-closures-page {
  --closure-ink: #172448;
  --closure-muted: #66728c;
  --closure-line: #dde4ef;
  --closure-line-soft: #e9edf4;
  --closure-surface: #fff;
  --closure-blue: #112262;
  --closure-yellow: #ffcc05;
  min-width: 0;
  gap: 16px;
  color: var(--closure-ink);
}

.agency-closures-page *,
.agency-closures-page *::before,
.agency-closures-page *::after {
  box-sizing: border-box;
}

.agency-closures-page .agency-closures-heading {
  min-height: 58px;
  padding: 0 2px;
  align-items: center;
  gap: 18px;
}

.agency-closures-page .agency-closures-heading > div:first-child {
  min-width: 0;
}

.agency-closures-page .agency-closures-heading h1 {
  margin: 0;
  color: var(--closure-ink);
  font-size: clamp(1.16rem, 1.7vw, 1.42rem);
  font-weight: 790;
  letter-spacing: -.025em;
}

.agency-closures-page .agency-closures-heading p {
  margin-top: 5px;
  color: var(--closure-muted);
  font-size: .73rem;
}

.agency-closures-page .agency-closures-heading__actions .table-excel-button {
  min-height: 40px;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgb(17 34 98 / 7%);
}

.agency-closures-page .agency-closures-feedback {
  min-height: 0;
  margin: -5px 2px 0;
  font-size: .71rem;
  font-weight: 680;
}

.agency-closures-page > * { min-width: 0; }
.agency-closures-page .agency-closures-feedback:empty { display: none; }

.agency-closures-page .agency-closures-feedback:not(:empty) {
  min-height: 36px;
  padding: 9px 11px;
  border: 1px solid #d8e6df;
  border-radius: 8px;
  background: #f3faf6;
}

.agency-closures-page .agency-closures-feedback--error:not(:empty) {
  border-color: #efcecc;
  background: #fff5f4;
}

.agency-closures-page .agency-closures-create__feedback {
  min-height: 0;
  margin: 0;
  color: var(--danger-color, #b42318);
  font-size: .75rem;
  font-weight: 700;
}

.agency-closures-page .agency-closures-create__feedback:not(:empty) {
  padding: 10px 12px;
  border: 1px solid #efcecc;
  border-radius: 8px;
  background: #fff5f4;
}

.agency-closures-page .agency-closures-select-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  white-space: nowrap;
}

.agency-closures-page .agency-closures-select-all input {
  margin: 0;
}

.agency-closures-page .agency-closures-candidate-limit {
  padding: 10px 12px;
  border: 1px solid #efd18a;
  border-radius: 8px;
  background: #fff7e7;
  color: #694900;
  font-size: .75rem;
}

.agency-closures-page .agency-closures-config,
.agency-closures-page .agency-closures-create,
.agency-closures-page .agency-closures-list {
  border: 1px solid var(--closure-line);
  border-radius: 14px;
  background: var(--closure-surface);
  box-shadow: 0 9px 28px rgb(17 34 98 / 6%);
}

.agency-closures-page .agency-closures-create-modal {
  z-index: 2100;
}

.agency-closures-page .agency-closures-create-modal > .agency-closures-create {
  width: min(1480px, 100%);
  max-height: calc(100vh - 44px);
}

.agency-closures-page .agency-closures-dialog .confirmation-dialog__surface {
  width: min(1480px, 96vw);
  max-height: calc(100vh - 32px);
}

.agency-closures-page .agency-closures-config {
  position: relative;
  min-height: 110px;
  padding: 18px 20px 18px 24px;
  overflow: visible;
  gap: 24px;
}

.agency-closures-page .agency-closures-config::before {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--closure-yellow);
  content: '';
}

.agency-closures-page .agency-closures-config > div {
  gap: 6px;
}

.agency-closures-page .agency-closures-config > div > span {
  color: var(--closure-muted);
  font-size: .7rem;
  font-weight: 700;
}

.agency-closures-page .agency-closures-config > div > strong {
  color: var(--closure-blue);
  font-size: 1rem;
  font-weight: 790;
}

.agency-closures-page .agency-closures-config__form {
  min-width: min(610px, 66%);
  gap: 11px;
}

.agency-closures-page .agency-closures-config__controls {
  min-width: 0;
}

.agency-closures-page .agency-closures-config__form select {
  min-width: 300px;
  min-height: 40px;
  border: 1px solid #c8d1e0;
  border-radius: 8px;
  background: #fbfcfe;
  color: #243254;
}

.agency-closures-page .agency-closures-config__form select:focus {
  border-color: var(--closure-blue);
  box-shadow: 0 0 0 3px rgb(17 34 98 / 10%);
  outline: 0;
}

.agency-closures-page .agency-closures-config__controls .primary-button {
  min-height: 40px;
  border-radius: 8px;
}

.agency-closures-page .agency-closures-config__existing {
  padding: 9px 10px;
  border: 1px solid #e2e7f0;
  border-radius: 9px;
  background: #f8f9fc;
}

.agency-closures-page .agency-closures-config__existing strong {
  color: #34415e;
  font-size: .72rem;
}

.agency-closures-page .agency-closures-config__existing small {
  font-size: .66rem;
}

.agency-closures-page .agency-closures-summary {
  gap: 12px;
}

.agency-closures-page .agency-closures-summary article {
  position: relative;
  min-height: 108px;
  padding: 18px 20px;
  overflow: hidden;
  border-color: var(--closure-line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0, rgb(17 34 98 / 6%), transparent 43%),
    #fff;
  box-shadow: 0 8px 24px rgb(17 34 98 / 6%);
}

.agency-closures-page .agency-closures-summary article::after {
  position: absolute;
  right: 20px;
  bottom: 0;
  left: 20px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--closure-yellow);
  content: '';
}

.agency-closures-page .agency-closures-summary article:nth-child(2)::after {
  background: #287657;
}

.agency-closures-page .agency-closures-summary span {
  font-size: .72rem;
  font-weight: 700;
}

.agency-closures-page .agency-closures-summary strong {
  color: var(--closure-blue);
  font-size: clamp(1.3rem, 2vw, 1.62rem);
  font-variant-numeric: tabular-nums;
  font-weight: 790;
  letter-spacing: -.025em;
}

.agency-closures-page .agency-closures-create,
.agency-closures-page .agency-closures-list {
  padding: 16px;
  overflow: auto;
  scrollbar-gutter: stable;
}

.agency-closures-page .agency-closures-list {
  max-height: min(68vh, 720px);
}

.agency-closures-page .agency-closures-create__header,
.agency-closures-page .agency-closures-list__toolbar {
  min-height: 42px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--closure-line-soft);
  gap: 14px;
}

.agency-closures-page .agency-closures-create__header h2 {
  margin: 0;
  color: var(--closure-ink);
  font-size: .94rem;
  font-weight: 780;
}

.agency-closures-page .agency-closures-list__toolbar label {
  color: var(--closure-muted);
  font-size: .7rem;
  font-weight: 700;
}

.agency-closures-page .agency-closures-list__toolbar input,
.agency-closures-page .agency-closures-list__toolbar select {
  min-width: 140px;
  padding: 6px 9px;
  border: 1px solid #c8d1e0;
  border-radius: 7px;
  background: #fff;
  color: #243254;
}

.agency-closures-page .agency-closures-list__toolbar select {
  min-height: 36px;
  border: 1px solid #c8d1e0;
  border-radius: 7px;
  background: #fff;
}

.agency-closures-page .agency-closures-table {
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  color: #293653;
  font-size: .72rem;
}

.agency-closures-page .agency-closures-table th,
.agency-closures-page .agency-closures-table td {
  height: 43px;
  padding: 9px 12px;
  border-bottom-color: var(--closure-line-soft);
  white-space: nowrap;
}

.agency-closures-page .agency-closures-table th {
  position: sticky;
  z-index: 3;
  top: 0;
  background: #f4f6fa;
  box-shadow: inset 0 -1px 0 #dce2ed;
  color: #4c5974;
  font-size: .64rem;
  font-weight: 780;
  letter-spacing: .025em;
}

.agency-closures-page .agency-closures-table tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

.agency-closures-page .agency-closures-table tbody tr:hover td {
  background: #fffbea;
}

.agency-closures-page .agency-closures-table th:first-child,
.agency-closures-page .agency-closures-table td:first-child {
  position: sticky;
  left: 0;
  box-shadow: 1px 0 0 #e1e6ef, 7px 0 14px rgb(17 34 98 / 3%);
}

.agency-closures-page .agency-closures-table th:first-child {
  z-index: 5;
  background: #eef2f8;
}

.agency-closures-page .agency-closures-table td:first-child {
  z-index: 2;
  background: #fff;
  color: var(--closure-blue);
  font-weight: 780;
}

.agency-closures-page .agency-closures-status {
  min-height: 26px;
  padding: 4px 9px;
  align-items: center;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 15%);
  font-size: .64rem;
  font-weight: 770;
}

.agency-closures-page .agency-closures-detail-button,
.agency-closures-page .agency-closures-confirm {
  min-height: 34px;
  border-radius: 7px;
}

.agency-closures-page .agency-closures-adjustments {
  padding: 14px;
  border: 1px solid var(--closure-line);
  border-radius: 11px;
  background: #f8f9fc;
}

.agency-closures-page .agency-closures-adjustments label {
  color: #4c5974;
  font-size: .72rem;
  font-weight: 700;
}

.agency-closures-page .agency-closures-adjustments input,
.agency-closures-page .agency-closures-table input[type='text'] {
  min-height: 38px;
  border: 1px solid #c8d1e0;
  border-radius: 7px;
  background: #fff;
  color: #243254;
}

.agency-closures-page .agency-closures-create__actions {
  padding-top: 3px;
}

.agency-closures-page .agency-closures-detail__summary {
  gap: 11px;
}

.agency-closures-page .agency-closures-detail__print-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.agency-closures-page .agency-closures-detail__print-header h3,
.agency-closures-page .agency-closures-detail__print-header span {
  margin: 0;
}

.agency-closures-page .agency-closures-detail__print-header div {
  display: grid;
  gap: 4px;
  text-align: right;
}

.agency-closures-page .agency-closures-detail__logo {
  width: 164px;
  height: auto;
}

.agency-closures-page .agency-closures-detail__summary div {
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid var(--closure-line);
  background: #f7f9fc;
}

.agency-closures-page .agency-closures-detail__summary dt {
  color: var(--closure-muted);
  font-size: .67rem;
}

.agency-closures-page .agency-closures-detail__summary dd {
  color: var(--closure-blue);
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .agency-closures-page .agency-closures-config,
  .agency-closures-page .agency-closures-heading {
    align-items: stretch;
  }

  .agency-closures-page .agency-closures-config__form {
    min-width: 0;
  }

  .agency-closures-page .agency-closures-list {
    max-height: none;
  }
}

@media (max-width: 620px) {
  .agency-closures-page {
    gap: 12px;
  }

  .agency-closures-page .agency-closures-adjustments,
  .agency-closures-page .agency-closures-detail__summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .agency-closures-page .agency-closures-config,
  .agency-closures-page .agency-closures-create,
  .agency-closures-page .agency-closures-list {
    padding: 14px;
    border-radius: 12px;
  }

  .agency-closures-page .agency-closures-config {
    padding-left: 18px;
  }

  .agency-closures-page .agency-closures-config__controls > *,
  .agency-closures-page .agency-closures-create__actions > * {
    width: 100%;
  }

  .agency-closures-page .agency-closures-heading { margin: 0; padding: 0; gap: 12px; }
  .agency-closures-page .agency-closures-heading h1 { font-size: 1.3rem; }
  .agency-closures-page .agency-closures-heading p { font-size: .84rem; line-height: 1.45; }
  .agency-closures-page .agency-closures-heading__actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; }
  .agency-closures-page .agency-closures-heading__actions > * { width: auto; flex: 0 1 auto; }
  .agency-closures-page .agency-closures-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .agency-closures-page .agency-closures-summary article { min-height: 80px; padding: 12px; gap: 5px; }
  .agency-closures-page .agency-closures-summary strong { font-size: 1.2rem; overflow-wrap: anywhere; }

  .agency-closures-page .agency-closures-list__toolbar {
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agency-closures-page .agency-closures-list__toolbar input,
  .agency-closures-page .agency-closures-list__toolbar select {
    width: 100%;
  }
  .agency-closures-page .agency-closures-list__toolbar button { width: auto; grid-column: 1 / -1; justify-self: end; }

  .agency-closures-page .agency-closures-create__actions {
    flex-direction: column-reverse;
  }

}

@media print {
  .agency-closures-page .agency-closures-heading__actions,
  .agency-closures-page .agency-closures-config,
  .agency-closures-page .agency-closures-create__actions,
  .agency-closures-page .agency-closures-list__toolbar {
    display: none !important;
  }

  .agency-closures-page .agency-closures-list {
    max-height: none;
    overflow: visible;
    border: 0;
    box-shadow: none;
  }

  .agency-closures-page .agency-closures-table th,
  .agency-closures-page .agency-closures-table td:first-child {
    position: static;
  }

  .document-print-root .agency-closures-detail__document {
    display: grid !important;
    gap: 18px;
    color: #17213d;
  }

  .document-print-root .agency-closures-detail__actions {
    display: none !important;
  }

  .document-print-root .agency-closures-detail__print-header,
  .document-print-root .agency-closures-detail__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .document-print-root .agency-closures-detail__print-header {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .document-print-root .agency-closures-detail__summary div {
    padding: 10px;
    border: 1px solid #dce2ec;
  }

  .document-print-root .agency-closures-detail__summary dt {
    color: #667085;
    font-size: 10px;
  }

  .document-print-root .agency-closures-detail__summary dd {
    margin: 4px 0 0;
    font-weight: 700;
  }

  .document-print-root .agency-closures-detail__table-wrap {
    overflow: visible;
  }

  .document-print-root .agency-closures-detail__table {
    width: 100%;
    border-collapse: collapse;
  }

  .document-print-root .agency-closures-detail__table th,
  .document-print-root .agency-closures-detail__table td {
    padding: 8px;
    border: 1px solid #dce2ec;
    text-align: left;
  }
}
