@font-face {
  font-family: "NanumBarunGothic";
  src: local("NanumBarunGothic"), url("./fonts/NanumBarunGothic.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "NanumBarunGothic";
  src: local("NanumBarunGothic Bold"), local("NanumBarunGothicBold"), url("./fonts/NanumBarunGothicBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #f3f6f7;
  --panel: #ffffff;
  --line: #cfd9dd;
  --line-strong: #a9bac1;
  --text: #263238;
  --muted: #6b7c84;
  --primary: #167c86;
  --primary-dark: #0f5962;
  --primary-soft: #e3f1f2;
  --accent: #7b5a2f;
  --danger: #c43e3e;
  --warning: #b36b00;
  --ok: #247a49;
  --focus: #d9edf0;
  --row: #f8fafb;
  --menu: #315f6d;
  --menu-dark: #284f5b;
  --app-font-size: 13px;
  --small-font-size: calc(var(--app-font-size) - 1px);
  --brand-font-size: calc(var(--app-font-size) + 2px);
  --page-title-font-size: calc(var(--app-font-size) + 5px);
  --section-title-font-size: calc(var(--app-font-size) + 1px);
  --value-font-size: calc(var(--app-font-size) + 2px);
  --dialog-close-font-size: calc(var(--app-font-size) + 2px);
  font-family: "Malgun Gothic", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: var(--app-font-size);
}

[hidden] {
  display: none !important;
}

button,
select,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-width: 1180px;
  min-height: 100vh;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: #e9f0f2;
}

.login-panel {
  width: min(420px, 100%);
  border: 1px solid var(--line-strong);
  background: #fff;
  box-shadow: 0 10px 28px rgba(24, 48, 56, 0.14);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #f7fafb;
}

.login-brand strong,
.login-brand span {
  display: block;
}

.login-brand strong {
  font-size: calc(var(--app-font-size) + 4px);
}

.login-brand span {
  margin-top: 3px;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 10px;
  padding: 18px 20px 10px;
}

.login-form label {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 8px;
  color: #455a62;
  font-weight: 700;
  white-space: nowrap;
}

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

.login-save-options {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 2px;
}

.login-form .login-save-options label,
.compact-dialog-form .login-save-options label {
  min-height: 24px;
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: var(--small-font-size);
  cursor: pointer;
}

.login-form .login-save-options input[type="checkbox"],
.compact-dialog-form .login-save-options input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  margin: 0;
}

.login-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 12px 20px 18px;
}

.top-strip {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

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

.brand-logo {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-size: var(--brand-font-size);
}

.brand span:last-child {
  display: block;
  color: var(--muted);
  font-size: var(--small-font-size);
  margin-top: 2px;
}

.global-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-controls .compact {
  min-height: 28px;
  padding: 0 10px;
  white-space: nowrap;
}

.global-controls .top-user-identity {
  min-height: 28px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
}

.global-controls .top-user-identity:hover,
.global-controls .top-user-identity:focus-visible {
  background: transparent;
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.global-controls .admin-context-button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.global-controls .admin-context-button[hidden] {
  display: none !important;
}

.global-controls label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}

select,
input {
  height: 28px;
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 0 24px 0 8px;
  min-width: 92px;
}

input {
  padding-right: 8px;
}

.top-menu {
  height: 42px;
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 0 12px;
  background: #f9fbfb;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.top-memo-row {
  height: 30px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #f7fafb;
  border-bottom: 1px solid var(--line);
}

.manager-top-guide {
  min-height: 32px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-bottom: 1px solid #e1c98f;
  background: #fff8e7;
  color: #5d4818;
}

.manager-top-guide[hidden] {
  display: none;
}

.manager-top-guide strong {
  color: #755810;
}

.manager-top-guide span {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.top-memo-row label {
  color: var(--muted);
  font-weight: 700;
}

.top-memo-row input {
  width: 100%;
  height: 24px;
  min-width: 0;
}

.top-memo-row span {
  min-width: 68px;
  color: var(--muted);
  font-size: var(--small-font-size);
  text-align: right;
}

.top-menu button {
  min-width: 92px;
  flex: 0 0 auto;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #33484f;
}

.top-menu button.active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

.workspace {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: calc(100vh - 124px);
}

.workspace.side-collapsed {
  grid-template-columns: 42px 1fr;
}

.side-menu {
  background: var(--menu);
  color: #e9f0f2;
  min-width: 0;
}

.side-head {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: var(--menu-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 700;
}

.workspace.side-collapsed .side-head {
  justify-content: center;
  padding: 0;
}

.workspace.side-collapsed #sideTitle,
.workspace.side-collapsed .side-list button span {
  display: none;
}

.workspace.side-collapsed .side-list button {
  justify-content: center;
  padding: 7px 0;
}

.side-list {
  padding: 8px 0;
}

.side-list button {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: transparent;
  color: #e9f0f2;
  padding: 7px 10px 7px 14px;
  text-align: left;
}

.side-list button:hover,
.side-list button.active {
  background: rgba(255, 255, 255, 0.12);
}

.side-list button.active {
  border-left: 3px solid #d8e98c;
  padding-left: 11px;
}

.main-panel {
  min-width: 0;
  background: #fff;
}

.tab-row {
  min-height: 38px;
  height: auto;
  display: flex;
  align-items: end;
  gap: 2px;
  padding-left: 10px;
  background: #eef4f5;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  overflow-y: hidden;
}

.tab-row button {
  height: 30px;
  min-width: 168px;
  max-width: 280px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #f7fafb;
  color: #43545b;
  padding: 0 10px;
  white-space: nowrap;
}

.tab-title {
  min-width: 0;
  flex: 1 1 auto;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-tools {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.tab-pin {
  position: relative;
  width: 14px;
  min-width: 14px;
  flex: 0 0 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #a5b0b4;
  line-height: 1;
}

.tab-pin::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: 1px;
  top: 1px;
  background: currentColor;
  clip-path: polygon(24% 0, 76% 0, 72% 27%, 88% 42%, 88% 52%, 56% 52%, 56% 75%, 50% 100%, 44% 75%, 44% 52%, 12% 52%, 12% 42%, 28% 27%);
  transform: rotate(-45deg);
  transform-origin: 50% 50%;
}

.tab-pin.active {
  color: #687980;
}

.tab-pin:hover {
  background: transparent;
  color: #53676f;
}

.tab-row button.active {
  background: #fff;
  color: var(--primary-dark);
  font-weight: 700;
}

.tab-close {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-grid;
  place-items: center;
  color: #6f8087;
  font-weight: 700;
  line-height: 1;
}

.tab-close:hover {
  background: #dfe8eb;
  color: #25383f;
}

.page-title {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  border-bottom: 1px solid var(--line);
}

.page-title p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: var(--app-font-size);
}

.page-title p strong {
  color: var(--text);
  font-weight: 700;
}

.breadcrumb-separator {
  color: #8ca0a8;
}

.page-title h1 {
  display: none;
}

.help-button,
.dialog-help-button {
  width: 22px;
  height: 22px;
  border: 1px solid #9db4bb;
  border-radius: 50%;
  background: #fff;
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: calc(var(--app-font-size) - 2px);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.help-button:hover,
.dialog-help-button:hover {
  border-color: var(--primary);
  background: #eef7f5;
  color: var(--primary);
}

.title-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.action-gap {
  width: 50px;
  flex: 0 0 50px;
}

.plain-button,
.soft-button,
.primary-button,
.danger-button,
.icon-button {
  height: auto;
  min-height: max(30px, calc(var(--app-font-size) + 16px));
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
}

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

.soft-button {
  background: #f7fafb;
}

.soft-button.danger {
  border-color: #d6b1b1;
  background: #fff5f5;
  color: var(--danger);
}

.danger-button {
  border-color: #b85454;
  background: #b85454;
  color: #fff;
}

.icon-button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  font-weight: 700;
}

.icon-button.small {
  width: 24px;
  height: 24px;
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.server-pill,
.status-badge {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid var(--line);
  background: #f6f8f9;
  color: #3d4c53;
  white-space: nowrap;
}

.server-pill.dev {
  border-color: #8bb8be;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.status-badge.ok {
  color: var(--ok);
  border-color: #9dccb1;
  background: #edf8f2;
}

.status-badge.warn {
  color: var(--warning);
  border-color: #e3c181;
  background: #fff6df;
}

.status-badge.danger {
  color: var(--danger);
  border-color: #e3aaaa;
  background: #fff0f0;
}

.content-grid {
  display: block;
  min-height: calc(100vh - 186px);
}

.validation-panel {
  display: none;
}

.work-area {
  min-width: 0;
  padding: 12px 14px 16px;
  border-right: 0;
}

.validation-panel {
  display: none;
  background: #fbfcfc;
  padding: 12px;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 7px;
  align-items: end;
  padding: 10px;
  background: #eaf3f5;
  border: 1px solid var(--line);
}

.filter-bar label {
  display: grid;
  gap: 4px;
  color: #455a62;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
}

.accounting-toolbar {
  border: 1px solid var(--line);
  background: #eaf3f5;
  padding: 8px;
}

.winform-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  background: #eaf3f5;
  padding: 8px;
}

.winform-filters {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.winform-filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #455a62;
  white-space: nowrap;
}

.winform-filters input,
.winform-filters select {
  min-width: 110px;
}

.winform-filters .bank-balance-sum-filter {
  gap: 5px;
}

.winform-filters .bank-balance-sum-filter input[type="checkbox"] {
  width: 14px;
  min-width: 14px;
  max-width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
}

.payroll-filter-toolbar .payroll-filter-year select {
  width: 118px;
  min-width: 118px;
  min-height: max(30px, calc(var(--app-font-size) + 14px));
  padding-right: 30px;
}

.payroll-filter-toolbar .payroll-filter-month select {
  width: 88px;
  min-width: 88px;
  min-height: max(30px, calc(var(--app-font-size) + 14px));
  padding-right: 30px;
}

.payroll-filter-toolbar .payroll-filter-1 input {
  width: 108px;
  min-width: 108px;
}

.payroll-filter-toolbar .payroll-filter-2 select {
  width: 138px;
  min-width: 138px;
}

.payroll-filter-toolbar .payroll-default-date input {
  width: 132px;
  min-width: 132px;
}

.payroll-column-section-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  min-height: 36px;
  padding-top: 7px;
  border-top: 1px solid #cbdce2;
}

.payroll-column-section-label {
  flex: 0 0 calc(4em + 6px);
  color: #455a62;
  font-weight: 700;
}

.payroll-column-section-buttons {
  display: inline-flex;
  align-items: center;
}

.payroll-column-section-button {
  min-height: 30px;
  margin-left: -1px;
  padding: 4px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: #fff;
  color: var(--text);
  white-space: nowrap;
}

.payroll-column-section-button:first-child {
  margin-left: 0;
  border-radius: 3px 0 0 3px;
}

.payroll-column-section-button:last-child {
  border-radius: 0 3px 3px 0;
}

.payroll-column-section-button:hover {
  position: relative;
  z-index: 1;
  border-color: var(--primary);
  color: var(--primary-dark);
}

.payroll-column-section-button.active {
  position: relative;
  z-index: 2;
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.winform-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.winform-actions .inline-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #455a62;
  font-size: var(--small-font-size);
}

.winform-actions .inline-action input {
  width: 64px;
  height: 28px;
}

.budget-sheet-toolbar {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.budget-sheet-toolbar .winform-filters,
.budget-sheet-toolbar .winform-actions {
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.budget-sheet-toolbar .winform-filters {
  justify-content: flex-start;
}

.budget-sheet-toolbar .winform-actions {
  justify-content: flex-end;
}

.budget-sheet-toolbar .winform-filters label:nth-child(1) select {
  width: 120px;
}

.budget-sheet-toolbar .winform-filters label:nth-child(2) select,
.budget-sheet-toolbar .winform-filters label:nth-child(5) select {
  width: 100px;
}

.budget-sheet-toolbar .winform-filters label:nth-child(3) select {
  width: 210px;
}

.budget-sheet-toolbar .winform-filters label:nth-child(4) select {
  width: 190px;
}

.budget-support-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding-left: 4px;
  white-space: nowrap;
}

.budget-support-toggle > span {
  color: #314c56;
  font-weight: 600;
}

.budget-support-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 26px;
  color: var(--text);
  cursor: pointer;
}

.budget-support-toggle input[type="radio"] {
  width: 14px;
  min-width: 14px;
  height: 14px;
  margin: 0;
  flex: 0 0 14px;
}

.budget-support-toggle.budget-support-required {
  padding: 4px 7px;
  border: 1px solid #d84a4a;
  background: #fff0f0;
}

.winform-grid table {
  min-width: 1080px;
}

.row-order-col {
  width: 58px;
  min-width: 58px;
  text-align: center;
  white-space: nowrap;
}

.row-order-button {
  width: 23px;
  height: 23px;
  padding: 0;
  margin: 0 1px;
  border: 1px solid var(--line);
  background: #f7fafb;
  color: #32474f;
  font-size: 11px;
  line-height: 1;
}

.row-order-button:disabled {
  color: #a6b4ba;
  background: #eef3f5;
}

.grid-cell-input {
  width: 100%;
  min-width: 90px;
  height: 24px;
  border-color: transparent;
  background: transparent;
  padding: 0 4px;
}

.grid-cell-input:focus {
  border-color: var(--primary);
  background: #fff;
  outline: 2px solid var(--focus);
}

.winform-invalid-cell-container {
  background: #fff0f0 !important;
}

.grid-cell-input.winform-invalid-cell,
.winform-invalid-cell {
  border-color: #d84a4a !important;
  background: #fff0f0 !important;
  box-shadow: inset 0 0 0 1px #d84a4a;
}

.account-pick-cell {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 180px;
}

.account-pick-cell .grid-cell-input {
  min-width: 0;
}

.account-pick-cell .icon-button {
  flex: 0 0 30px;
}

.winform-check-col {
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  text-align: center;
  padding: 0 4px;
}

.winform-check-col input[type="checkbox"] {
  width: 14px;
  min-width: 14px;
  height: 14px;
  padding: 0;
  vertical-align: middle;
}

.grid-cell-input.readonly-cell {
  color: #495c63;
  background: #f4f7f8;
}

.grid-cell-input.disabled-cell,
.grid-cell-input:disabled {
  color: #8a96a3;
  background: #eef1f4;
}

.budget-sheet-grid table {
  min-width: 1500px;
}

@media print {
  html,
  body,
  body * {
    font-family: "NanumBarunGothic", "Malgun Gothic", "맑은 고딕", Arial, sans-serif !important;
  }

  .top-strip,
  .top-menu,
  .side-menu,
  .tab-row,
  .page-title,
  .winform-toolbar,
  .accounting-toolbar,
  .inline-search-panel {
    display: none !important;
  }

  .workspace,
  .content-grid {
    display: block;
    min-height: 0;
  }

  .main-panel,
  .work-area,
  .grid-wrap {
    border: 0;
    overflow: visible;
  }

  table {
    min-width: 0;
    font-size: 10px;
  }
}

.accounting-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 7px;
  align-items: center;
}

.accounting-filter-primary {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: 140px 150px 175px 145px;
  gap: 7px;
  align-items: center;
  width: 634px;
  min-width: 0;
}

.accounting-filter-primary > label:nth-child(4) {
  margin-left: 3px;
}

#accountingBankFilter {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
  flex: 0 0 110px;
}

#accountingAccountFilter {
  width: 144px;
  min-width: 144px;
  max-width: 144px;
  flex: 0 0 144px;
}

.accounting-filter-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  grid-template-columns: 110px 82px 130px 90px;
  grid-auto-rows: 32px;
  justify-content: end;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.accounting-filter-actions .soft-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 32px;
  min-height: 32px;
  margin: 0;
  white-space: nowrap;
}

.accounting-filter-actions #matchCaredButton { grid-column: 1; grid-row: 1; }
.accounting-filter-actions #divideAccountingButton { grid-column: 2; grid-row: 1; }
.accounting-filter-actions #getReceiptsButton { grid-column: 3; grid-row: 1; }
.accounting-filter-actions #closeAccountingButton { grid-column: 4; grid-row: 1; }
.accounting-filter-actions #bankCheckButton { grid-column: 1; grid-row: 2; }
.accounting-filter-actions #batchButton { grid-column: 2; grid-row: 2; }
.accounting-filter-actions #shareReceiptsButton { grid-column: 3; grid-row: 2; }
.accounting-filter-actions #cancelCloseAccountingButton { grid-column: 4; grid-row: 2; }
.accounting-filter-actions #receiptImportStatus { grid-column: 1 / span 3; grid-row: 3; }
.accounting-filter-actions #cancelReceiptImportButton { grid-column: 4; grid-row: 3; }

.receipt-import-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border-left: 3px solid #2f7d8a;
  background: #eef6f7;
  color: #245965;
  font-size: 0.92em;
  white-space: nowrap;
}

.accounting-filters label,
.inline-search-panel label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #455a62;
  white-space: nowrap;
}

.accounting-filters label input,
.accounting-filters label select,
.inline-search-panel label input,
.inline-search-panel label select {
  min-width: 0;
  flex: 1 1 auto;
}

.accounting-filters #accountingDateFrom,
.accounting-filters #accountingDateTo {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
  flex: 0 0 110px;
}

.month-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.accounting-toolbar .accounting-filters > .month-row {
  grid-column: 1;
  grid-row: 2;
  width: 634px;
  flex-wrap: nowrap;
  margin-top: 0;
}

.accounting-toolbar .month-row [data-accounting-month] {
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  padding-right: 3px;
  padding-left: 3px;
}

.accounting-toolbar .month-row #detailSearchButton,
.accounting-toolbar .month-row #cancelSearchButton {
  margin-left: auto;
}

.month-row-spacer {
  flex: 1 1 auto;
}

.month-row button {
  height: auto;
  min-height: max(27px, calc(var(--app-font-size) + 14px));
  min-width: 44px;
  padding: 3px 8px;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.month-row button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.accounting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.remain-panel {
  margin-top: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  overflow-x: auto;
}

.balance-summary-inline {
  display: flex;
  align-items: center;
  min-width: max-content;
  min-height: 40px;
  white-space: nowrap;
}

#accountingRemainPanel {
  margin-bottom: 10px;
}

#accountingRemainPanel:empty {
  display: none;
}

.balance-summary-inline h2 {
  align-self: stretch;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 12px;
  border-right: 1px solid var(--line-strong);
  background: #dce8ec;
  color: #243f49;
  font-size: var(--section-title-font-size);
}

.balance-inline-month {
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-right: 1px solid var(--line);
}

.balance-inline-month.unmatched {
  background: #fff5f5;
}

.balance-inline-month.matched {
  box-shadow: none;
}

.balance-inline-month > b {
  color: #243f49;
}

.balance-inline-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #61737a;
}

.balance-inline-item strong.ok {
  color: #216b49;
}

.balance-inline-item strong.danger {
  color: #b42323;
}

.balance-inline-item strong.neutral {
  color: #52666e;
}

.balance-status-text {
  padding: 0;
  border: 0;
  background: transparent;
  font-weight: 800;
  line-height: 1.4;
}

.balance-status-text.ok {
  color: #216b49;
}

.balance-status-text.danger {
  color: #b42323;
}

.balance-status-text.neutral {
  color: #52666e;
}

.balance-mismatch-review-button {
  min-width: 78px;
  min-height: 26px;
  padding: 3px 10px;
  border: 1px solid #a92121;
  border-radius: 3px;
  background: #c83232;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
  cursor: pointer;
}

.balance-mismatch-review-button:hover,
.balance-mismatch-review-button:focus-visible {
  border-color: #861818;
  background: #a92121;
  color: #fff;
}

.accounting-balance-detail-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: fixed;
}

.accounting-balance-detail-table th,
.accounting-balance-detail-table td {
  height: 33px;
  padding: 5px 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.accounting-balance-detail-table tr > *:last-child {
  border-right: 0;
}

.accounting-balance-detail-table tbody tr:last-child > * {
  border-bottom: 0;
}

.accounting-balance-detail-table thead tr:first-child th {
  background: #dce8ec;
  color: #243f49;
  font-weight: 800;
}

.accounting-balance-detail-table thead tr:last-child th {
  background: #edf3f5;
  color: #52666e;
}

.accounting-balance-detail-table thead th:first-child {
  width: 84px;
}

.accounting-balance-detail-table tbody th {
  border-left: 1px solid var(--line);
  background: #f2f6f7;
  color: #243f49;
}

.accounting-balance-detail-table tbody tr.unmatched th {
  background: #fff0f0;
}

.accounting-balance-detail-table tbody tr.unmatched td {
  background: #fffafa;
}

.balance-detail-amount {
  color: #18363f;
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

.balance-detail-amount.danger {
  color: #b42323;
  font-weight: 800;
}

.balance-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line-strong);
  background: #edf3f5;
}

.balance-summary-head h2 {
  margin: 0;
  color: #243f49;
  font-size: var(--section-title-font-size);
}

.balance-detail-button {
  margin: 0 8px;
  min-height: 27px;
  padding: 3px 10px;
}

.balance-summary-table-wrap {
  overflow-x: auto;
}

.ledger-balance-detail {
  margin-top: 0;
  margin-bottom: 12px;
}

.ledger-status-table {
  width: 100%;
  min-width: 900px;
  table-layout: fixed;
}

.ledger-status-table th:nth-child(1),
.ledger-status-table td:nth-child(1) {
  width: 142px;
}

.ledger-status-table th:nth-child(2),
.ledger-status-table td:nth-child(2) {
  width: 96px;
}

.ledger-status-table th:nth-child(3),
.ledger-status-table td:nth-child(3) {
  width: 66px;
}

.ledger-status-table th:nth-child(4),
.ledger-status-table td:nth-child(4) {
  width: 118px;
}

.ledger-status-table th:nth-child(6),
.ledger-status-table td:nth-child(6) {
  width: 142px;
}

.ledger-status-table .ledger-work-kind,
.ledger-status-table .ledger-work-time,
.ledger-status-table .ledger-note-date,
.ledger-status-table .ledger-io-kind {
  text-align: center;
  white-space: nowrap;
}

.ledger-status-table .ledger-work-kind {
  padding: 12px 8px;
  border-right-color: var(--line-strong);
  background: #edf3f5;
  vertical-align: top;
}

.ledger-status-table .ledger-work-kind strong,
.ledger-status-table .ledger-work-kind span {
  display: block;
}

.ledger-status-table .ledger-work-kind strong {
  color: #243f49;
}

.ledger-status-table .ledger-work-kind span {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--small-font-size);
  font-weight: 700;
}

.ledger-status-table .ledger-note-summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-status-table .ledger-note-money {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.balance-summary-table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  table-layout: fixed;
}

.balance-summary-table th,
.balance-summary-table td {
  height: 34px;
  padding: 5px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.balance-summary-table tr:last-child > * {
  border-bottom: 0;
}

.balance-summary-table tr > *:last-child {
  border-right: 0;
}

.balance-summary-table thead th {
  background: #dce8ec;
  color: #29454f;
  text-align: center;
  font-weight: 700;
}

.balance-summary-table thead th:nth-child(1) { width: 78px; }
.balance-summary-table thead th:nth-child(2),
.balance-summary-table thead th:nth-child(3),
.balance-summary-table thead th:nth-child(4) { width: 150px; }
.balance-summary-table thead th:nth-child(5) { width: 130px; }

.balance-summary-table tbody tr.unmatched td {
  background: #fff5f5;
}

.balance-summary-table tbody tr.unmatched .balance-month-cell {
  border-left: 1px solid var(--line);
  background: #fff0f0;
}

.balance-summary-table tbody tr.matched .balance-month-cell {
  border-left: 1px solid var(--line);
}

.balance-month-cell {
  background: #f2f6f7;
  color: #243f49;
  text-align: center;
  font-size: calc(var(--app-font-size) + 1px);
}

.balance-status-cell {
  text-align: center;
}

.balance-not-applicable {
  color: #9aa8ad;
}

.balance-overall-cell {
  text-align: center;
}

.balance-overall-cell strong.ok {
  color: #216b49;
}

.balance-overall-cell strong.danger {
  color: #b42323;
}

.balance-match {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 24px;
  padding: 1px 7px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-style: normal;
  font-weight: 800;
}

.balance-match.ok {
  color: #216b49;
  background: #edf8f2;
}

.balance-match.danger {
  color: #b42323;
  background: #fff0f0;
}

.balance-match.neutral {
  color: #52666e;
  background: #f4f7f8;
}

.inline-search-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  background: #eaf3f5;
  padding: 8px;
  margin-top: 10px;
}

.search-guide-inline {
  align-self: center;
  color: var(--muted);
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

.inline-search-panel #runAccountingSearchButton {
  justify-self: start;
  width: 78px;
}

.accounting-search-panel {
  grid-template-columns: 150px minmax(220px, 420px) 78px;
  justify-content: start;
}

.accounting-search-panel select,
.accounting-search-panel input {
  width: 100%;
  min-width: 0;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.summary-box {
  min-height: 58px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px 10px;
}

.summary-box span {
  display: block;
  color: var(--muted);
  margin-bottom: 5px;
}

.summary-box strong {
  font-size: calc(var(--app-font-size) + 7px);
  letter-spacing: 0;
}

.quick-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin: 0 0 10px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 6px;
}

.section-title h2 {
  margin: 0;
  font-size: var(--section-title-font-size);
}

.winform-list-count {
  margin-left: 4px;
  color: var(--muted);
  font-size: var(--small-font-size);
  font-weight: 500;
}

.subject-transfer-list-note {
  margin-left: 10px;
  color: var(--muted);
  font-size: var(--small-font-size);
  font-weight: 400;
  line-height: 1.5;
}

.subject-transfer-create-sequence {
  flex: 0 0 auto;
  align-self: end;
  white-space: nowrap;
}

.subject-transfer-sequence-cell {
  color: #244d59;
  font-weight: 700;
  text-align: center;
}

.winform-grid td[data-subject-transfer-column="transfer_sequence"],
.winform-grid td[data-subject-transfer-column="transfer_date"],
.winform-grid td[data-subject-transfer-column="b_code"] {
  text-align: center;
}

.winform-grid td[data-subject-transfer-column="transfer_sequence"] .grid-cell-input,
.winform-grid td[data-subject-transfer-column="transfer_date"] .grid-cell-input,
.winform-grid td[data-subject-transfer-column="b_code"] .grid-cell-input {
  text-align: center;
}

.winform-grid td.subject-transfer-sequence-column .subject-transfer-sequence-cell {
  padding-right: 0;
  padding-left: 0;
  text-align: center !important;
}

.winform-grid th.subject-transfer-column-transfer_sequence,
.winform-grid td.subject-transfer-sequence-column {
  width: 84px;
  min-width: 84px;
  max-width: 84px;
}

.winform-grid th.subject-transfer-column-from_dcode,
.winform-grid td.subject-transfer-account-cell {
  width: 390px;
  min-width: 390px;
}

.winform-grid th.subject-transfer-column-transfer_date,
.winform-grid td[data-subject-transfer-column="transfer_date"] {
  width: 124px;
  min-width: 124px;
  max-width: 124px;
}

.winform-grid th.subject-transfer-column-b_code,
.winform-grid td[data-subject-transfer-column="b_code"] {
  width: 140px;
  min-width: 140px;
  max-width: 140px;
}

.winform-grid th.subject-transfer-column-transfer_money,
.winform-grid td[data-subject-transfer-column="transfer_money"] {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

.winform-grid th.subject-transfer-column-reason,
.winform-grid td[data-subject-transfer-column="reason"] {
  width: 380px;
  min-width: 380px;
}

.winform-grid td[data-subject-transfer-column="transfer_money"],
.winform-grid td[data-subject-transfer-column="reason"],
.winform-grid td[data-subject-transfer-column="memo"] {
  position: relative;
  padding: 0;
  vertical-align: stretch;
}

.winform-grid td[data-subject-transfer-column="transfer_money"] .grid-cell-input,
.winform-grid td[data-subject-transfer-column="reason"] .grid-cell-input,
.winform-grid td[data-subject-transfer-column="memo"] .grid-cell-input {
  position: absolute;
  inset: 5px 0;
  width: 100%;
  height: auto;
  min-height: 0;
  box-sizing: border-box;
  border-radius: 0;
}

.subject-transfer-account-cell {
  display: table-cell;
  padding: 4px 6px;
  vertical-align: middle;
}

.subject-transfer-account-pair {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 4px;
}

.subject-transfer-account-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 30px;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.subject-transfer-account-row + .subject-transfer-account-row {
  padding-top: 4px;
  border-top: 1px solid #d6e1e5;
}

.subject-transfer-account-side {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border: 1px solid #aec2ca;
  background: #edf3f5;
  color: #35535f;
  font-size: var(--small-font-size);
  font-weight: 700;
  white-space: nowrap;
}

.subject-transfer-account-side.increase {
  border-color: #a8c9c5;
  background: #edf7f5;
  color: #23635b;
}

.subject-transfer-account-value {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.subject-transfer-account-value .grid-cell-input {
  width: 100%;
}

.subject-transfer-account-value .muted-cell {
  min-height: 16px;
  padding: 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subject-transfer-account-row .icon-button {
  width: 30px;
  min-width: 30px;
  margin: 0;
}

.grid-wrap {
  border: 1px solid var(--line);
  background: #fff;
  overflow: auto;
}

.grid-wrap > table > thead > tr > th {
  border-right: 1px solid #bdced5;
  border-bottom: 1px solid #c4d5db;
  background: #e6f0f3;
}

.grid-wrap > table > thead > tr:last-child > th,
.grid-wrap > table > thead > tr > th[rowspan] {
  border-bottom: 2px solid #aebfc6;
}

.grid-wrap > table > thead > tr > th:last-child {
  border-right-color: #aebfc6;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid #e1e8ea;
  padding: 6px 7px;
  text-align: left;
  height: 30px;
  white-space: nowrap;
}

.accounting-note-table th:first-child,
.accounting-note-table td:first-child {
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  padding: 0;
  text-align: center;
}

.accounting-note-table input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  padding: 0;
  margin: 0;
  vertical-align: middle;
}

.accounting-note-table .accounting-cared-cell {
  width: 112px;
  min-width: 112px;
  max-width: 112px;
  padding: 3px 6px;
}

.accounting-note-table .accounting-cared-button {
  display: block;
  width: 100%;
  overflow: hidden;
  color: var(--primary-dark);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-note-table .accounting-cared-required,
.accounting-note-table .accounting-cared-button.required-empty {
  background: #fff0ed;
  color: #a63727;
  font-weight: 700;
}

.accounting-note-table .accounting-cared-cell.blocked-table-cell {
  padding: 0;
  background: #edf2f4;
}

.accounting-note-table .accounting-bank-title-cell {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.accounting-note-table .accounting-reference-cell {
  width: 112px;
  min-width: 112px;
  max-width: 112px;
  padding: 2px 4px;
}

.accounting-note-table .accounting-reference-select {
  width: 100%;
  min-width: 104px;
  max-width: 104px;
  height: 26px;
  padding-right: 24px;
}

.accounting-note-table th:nth-child(8),
.accounting-note-table th:nth-child(9),
.accounting-note-table th:nth-child(10) {
  width: 112px;
  min-width: 112px;
  max-width: 112px;
}

.accounting-note-table th:nth-child(11),
.accounting-note-table td:nth-child(11),
.accounting-note-table th:nth-child(12),
.accounting-note-table td:nth-child(12),
.accounting-note-table th:nth-child(13),
.accounting-note-table td:nth-child(13) {
  width: 94px;
  min-width: 94px;
  max-width: 94px;
}

.accounting-note-table th:nth-child(15) {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

.accounting-note-table td:nth-child(11) .cell-input,
.accounting-note-table td:nth-child(12) .cell-input {
  width: 100%;
  min-width: 0;
}

.bank-row-status-cell {
  min-width: 84px;
  text-align: center;
}

.bank-row-status-cell .status-pill {
  display: inline-flex;
  min-width: 64px;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.bank-row-status-cell .status-pill.neutral {
  color: #5f7077;
}

.bank-row-status-cell .status-pill.warn {
  color: #b42318;
  font-weight: 800;
}

.empty-cell {
  height: 72px;
  color: var(--muted);
  text-align: center;
}

.cell-link {
  min-width: 100%;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  text-align: left;
  padding: 0;
  text-decoration: none;
}

.table-sort-button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: 0;
  white-space: nowrap;
}

.table-sort-button:hover {
  color: var(--primary-dark);
}

.winform-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 22px;
  text-align: left;
}

.winform-sort-indicator {
  min-width: 10px;
  color: var(--primary-dark);
  font-size: 9px;
}

.payroll-grid .payroll-table-head th {
  border-color: #cbdce2;
  background: #e6f0f3;
  text-align: center;
  vertical-align: middle;
}

.payroll-grid .payroll-table-head tr:first-child th {
  top: 0;
}

.payroll-grid .payroll-table-head tr:nth-child(2) th {
  top: 29px;
}

.payroll-grid .payroll-group-header {
  height: 29px;
  padding: 4px 8px;
  color: #526c77;
  font-size: var(--small-font-size);
  font-weight: 600;
}

.payroll-grid .payroll-group-retire {
  background: #f1ece7;
  color: #695542;
}

.payroll-grid .payroll-retire-code {
  min-width: 72px;
  text-align: center;
}

.payroll-grid .payroll-employee-number-readonly {
  display: block;
  width: 100%;
  min-width: 90px;
  height: 24px;
  padding: 3px 4px;
  color: #495c63;
  line-height: 18px;
  pointer-events: none;
}

.payroll-grid .payroll-employee-name-header,
.payroll-grid .payroll-employee-name-cell {
  width: 132px;
  min-width: 132px;
  max-width: 132px;
}

.payroll-grid .payroll-employee-number-header,
.payroll-grid .payroll-employee-number-cell {
  width: 104px;
  min-width: 104px;
}

.payroll-grid .winform-check-col {
  position: sticky;
  left: 0;
  z-index: 4;
  background: #fff;
}

.payroll-grid thead .winform-check-col {
  z-index: 8;
  background: #e5eef1;
}

.payroll-grid .payroll-employee-name-header {
  position: sticky;
  left: 34px;
  z-index: 7;
  background: #e5eef1;
}

.payroll-grid .payroll-employee-name-cell {
  position: sticky;
  left: 34px;
  z-index: 3;
  background: #fff;
}

.payroll-grid .payroll-employee-name-header::after,
.payroll-grid .payroll-employee-name-cell::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  width: 1px;
  background: #b7cbd2;
  transform: scaleX(0.5);
  transform-origin: right center;
  pointer-events: none;
}

.payroll-grid tbody tr:nth-child(even) .winform-check-col,
.payroll-grid tbody tr:nth-child(even) .payroll-employee-name-cell {
  background: var(--row);
}

.payroll-grid tbody tr.selected .winform-check-col,
.payroll-grid tbody tr.selected .payroll-employee-name-cell {
  background: var(--focus);
}

.payroll-grid .payroll-retire-memo {
  min-width: 180px;
}

.payroll-grid .payroll-item-header {
  min-width: 104px;
  height: 32px;
  padding: 5px 8px;
  color: var(--text);
  font-weight: 700;
}

.payroll-grid .payroll-fixed-header {
  min-width: 96px;
  height: 61px;
  color: var(--text);
  font-weight: 700;
}

.payroll-grid .payroll-job-type-header,
.payroll-grid .payroll-job-type-select {
  width: calc(6em + 42px);
  min-width: calc(6em + 42px);
}

.payroll-grid .payroll-job-type-select {
  padding-right: 30px;
}

.payroll-grid .winform-check-col[rowspan="2"] {
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  padding: 0;
}

.download-cell-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid #8bb3d1;
  border-radius: 4px;
  background: #f5fbff;
  color: #155a86;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.download-cell-button:hover {
  background: #e4f3ff;
}

.muted-cell {
  color: var(--muted);
  font-size: 12px;
}

.cell-input {
  width: 100%;
  min-width: 180px;
  height: 24px;
  border-color: transparent;
  background: transparent;
  padding: 0 4px;
}

.cell-input:focus {
  border-color: var(--primary);
  background: #fff;
  outline: 2px solid var(--focus);
}

.employee-picker-button {
  text-align: left;
  border-color: transparent;
  background: transparent;
  color: var(--primary-dark);
  text-decoration: none;
  cursor: pointer;
}

.employee-picker-button:hover,
.employee-picker-button:focus {
  border-color: var(--primary);
  background: #f3faf8;
  outline: 2px solid var(--focus);
}

.employee-picker-input {
  cursor: pointer;
}

.blocked-cell {
  display: block;
  width: 100%;
  min-width: 100%;
  height: 100%;
  min-height: 32px;
  color: #829299;
  background: #edf2f4;
}

.winform-grid td.blocked-table-cell {
  height: 100%;
  padding: 0;
  background: #edf2f4;
}

.receipt-add-button {
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  height: 24px;
  border: 1px solid var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 0 6px;
  line-height: 20px;
  border-radius: 3px;
}

.receipt-add-button.has-receipt {
  width: 42px;
  min-width: 42px;
  border-color: #2e6b5f;
  background: #eaf5f2;
  color: #18483f;
}

.receipt-add-button.has-receipt::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 13px;
  margin-right: 4px;
  border: 1px solid #2e6b5f;
  background:
    linear-gradient(#b7d7cf 0 0) 2px 3px / 6px 1px no-repeat,
    linear-gradient(#b7d7cf 0 0) 2px 6px / 6px 1px no-repeat,
    linear-gradient(#b7d7cf 0 0) 2px 9px / 4px 1px no-repeat,
    #fff;
  vertical-align: -2px;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(24, 39, 45, 0.28);
}

.dialog-box {
  width: min(460px, calc(100vw - 32px));
  border: 1px solid var(--line-strong);
  background: #fff;
  box-shadow: 0 14px 40px rgba(21, 36, 43, 0.22);
}

.dialog-box.required-password-dialog {
  width: min(500px, calc(100vw - 32px));
}

.required-password-backdrop {
  z-index: 100;
  background: rgba(24, 39, 45, 0.48);
}

.required-password-body {
  display: grid;
  gap: 16px;
  padding: 22px 24px;
}

.required-password-guide {
  margin: 0;
  line-height: 1.6;
  color: #29454f;
}

.required-password-fields {
  display: grid;
  gap: 12px;
}

.required-password-fields label {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #455a62;
}

.required-password-fields input {
  width: 100%;
  min-width: 0;
}

.dialog-box.account-dialog {
  width: min(760px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto 1fr;
}

.dialog-box.bank-dialog {
  width: min(980px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto 1fr;
}

.dialog-box.receipt-dialog {
  width: min(720px, calc(100vw - 32px));
}

.dialog-box.help-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto 1fr;
}

.dialog-box.ssis-api-field-dialog {
  width: min(900px, calc(100vw - 32px));
  height: min(760px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.ssis-api-field-body {
  min-height: 0;
  overflow: auto;
  align-content: start;
  padding: 16px 20px 24px;
}

.ssis-api-field-section {
  display: grid;
  gap: 10px;
  padding-top: 10px;
}

.ssis-api-setting-warning {
  margin: 0;
  padding: 9px 10px;
  border-left: 3px solid #c06b2d;
  background: #fff6ec;
  color: #74411e;
}

.ssis-api-field-section h3 {
  margin: 0;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  color: var(--primary-dark);
  font-size: 14px;
}

.ssis-api-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.ssis-api-field {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(180px, 1.2fr);
  align-items: center;
  gap: 8px;
  color: #455a62;
}

.ssis-api-field > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ssis-api-field b {
  margin-left: 3px;
  color: #c13f32;
}

.ssis-api-field input,
.ssis-api-field select {
  width: 100%;
  min-width: 0;
}

@media (max-width: 760px) {
  .ssis-api-field-grid {
    grid-template-columns: 1fr;
  }

  .ssis-api-field {
    grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1.3fr);
  }
}

.help-dialog .dialog-body {
  overflow: auto;
  padding: 20px 30px 50px;
}

.help-guide {
  display: grid;
  gap: 14px;
  color: var(--text);
}

.help-guide section {
  display: grid;
  gap: 6px;
  padding-top: 10px;
}

.help-guide h3 {
  margin: 0 0 2px 0;
  padding-bottom: 6px;
  border-bottom: 2px solid #b9d0d7;
  font-size: calc(var(--section-title-font-size) + 1px);
  font-weight: 800;
  color: #123f4a;
}

.help-guide p,
.help-guide ul {
  margin: 0;
}

.help-guide section > p,
.help-guide section > ul,
.help-guide section > ol,
.help-guide section > .help-action-list {
  margin-left: 10px;
}

.help-guide ul {
  padding-left: 18px;
}

.help-step-intro {
  color: var(--muted);
}

.help-step-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: help-step;
  display: grid;
  gap: 5px;
}

.help-step-list li {
  counter-increment: help-step;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35em;
}

.help-step-list li::before {
  content: counter(help-step) ")";
  color: var(--primary-dark);
  font-weight: 700;
}

@media (max-width: 720px) {
  .help-dialog .dialog-body {
    padding: 20px;
  }
}

.help-guide li + li {
  margin-top: 4px;
}

.help-action-list {
  display: grid;
  border: 1px solid var(--line);
}

.help-action-list div {
  display: grid;
  grid-template-columns: minmax(92px, 150px) 1fr;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.help-action-list div:last-child {
  border-bottom: 0;
}

.help-action-list strong {
  color: var(--primary-dark);
}

.dialog-box.unit-dialog {
  width: min(520px, calc(100vw - 32px));
  height: min(580px, calc(100vh - 32px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.unit-dialog .dialog-body {
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.unit-dialog-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.unit-dialog-grid {
  height: auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.unit-dialog-grid table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.receipt-preview {
  display: grid;
  place-items: start center;
  min-height: 260px;
  max-height: min(460px, 52vh);
  border: 1px solid var(--line);
  background: #f7fafb;
  overflow: auto;
}

.receipt-preview img,
.receipt-preview iframe {
  width: 100%;
  max-height: min(440px, 50vh);
  border: 0;
  object-fit: contain;
  transition: transform 120ms ease;
}

.receipt-preview iframe {
  height: min(440px, 50vh);
}

.receipt-view-button {
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  text-align: left;
  padding: 0;
  text-decoration: none;
}

.bank-dialog .dialog-body {
  min-height: 0;
}

.bank-grid {
  height: 100%;
}

.account-dialog .dialog-body {
  min-height: 0;
  grid-template-rows: auto 1fr;
}

.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.dialog-head strong {
  flex: 1 1 auto;
  min-width: 0;
}

.dialog-head .dialog-help-button {
  flex: 0 0 auto;
}

.dialog-head [data-close-dialog] {
  width: auto;
  height: auto;
  border: 0;
  background: transparent;
  color: #52666e;
  padding: 0 2px;
  font-size: var(--dialog-close-font-size);
  line-height: 1;
}

.dialog-head [data-close-dialog]:hover {
  color: #111f25;
}

.dialog-actions {
  justify-content: flex-end;
  gap: 6px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.dialog-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.dialog-body input {
  width: 100%;
}

.dialog-search {
  min-width: 100%;
}

.dialog-filter-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px;
}

.dialog-filter-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #455a62;
}

.account-option-list {
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: auto;
  border: 1px solid var(--line);
}

.account-option-list button {
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: 110px 1fr 48px;
  gap: 8px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid #e6ecef;
  background: #fff;
  text-align: left;
  padding: 6px 8px;
}

.account-option-list button[hidden] {
  display: none !important;
}

.account-option-list button:hover {
  background: var(--focus);
}

.account-dialog:not(.subject-transfer-account-dialog) .account-option-list button {
  grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr) minmax(180px, 1.35fr);
  gap: 0;
  min-height: 35px;
  padding: 0;
  border-bottom: 0;
}

.account-dialog:not(.subject-transfer-account-dialog) .account-option-list button > span,
.account-dialog:not(.subject-transfer-account-dialog) .account-option-list button > strong {
  align-self: stretch;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 6px 10px;
  border-bottom: 1px solid #dce5e8;
}

.account-dialog:not(.subject-transfer-account-dialog) .account-option-list button > span + span,
.account-dialog:not(.subject-transfer-account-dialog) .account-option-list button > span + strong {
  border-left: 1px solid #c9d6da;
}

.account-dialog:not(.subject-transfer-account-dialog) .account-option-list button > [data-account-group-level="l"] {
  background: #eaf2f4;
  color: #254853;
  font-weight: 700;
}

.account-dialog:not(.subject-transfer-account-dialog) .account-option-list button > [data-account-group-level="m"] {
  background: #f3f7f8;
  color: #35545d;
  font-weight: 600;
}

.account-dialog:not(.subject-transfer-account-dialog) .account-option-list button.account-large-group-start:not(.account-first-visible) > span,
.account-dialog:not(.subject-transfer-account-dialog) .account-option-list button.account-large-group-start:not(.account-first-visible) > strong {
  border-top: 1px solid #c9d6da;
}

.account-dialog:not(.subject-transfer-account-dialog) .account-option-list button.account-middle-group-start:not(.account-large-group-start):not(.account-first-visible) > [data-account-group-level="m"],
.account-dialog:not(.subject-transfer-account-dialog) .account-option-list button.account-middle-group-start:not(.account-large-group-start):not(.account-first-visible) > strong {
  border-top: 1px solid #aebfc5;
}

.account-dialog:not(.subject-transfer-account-dialog) .account-option-list button:not(.account-large-group-end) > [data-account-group-level="l"],
.account-dialog:not(.subject-transfer-account-dialog) .account-option-list button:not(.account-middle-group-end) > [data-account-group-level="m"] {
  border-bottom-color: transparent;
}

.account-dialog:not(.subject-transfer-account-dialog) .account-option-list button:hover > span,
.account-dialog:not(.subject-transfer-account-dialog) .account-option-list button:hover > strong {
  background: var(--focus);
}

.account-hierarchy-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr) minmax(180px, 1.35fr);
  gap: 0;
  padding: 0;
  border-bottom: 1px solid #9fb3ba;
  background: #e6f0f3;
  color: #263f48;
  font-weight: 700;
}

.account-hierarchy-head span {
  padding: 8px 10px;
}

.account-hierarchy-head span + span {
  border-left: 1px solid #b7c7cc;
}

.account-option-list em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}

.subject-transfer-account-dialog .account-option-list button {
  grid-template-columns: 110px minmax(180px, 1fr) 170px;
}

.subject-transfer-account-dialog .dialog-body {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.subject-transfer-account-list-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 110px minmax(180px, 1fr) 170px;
  gap: 8px;
  min-height: 36px;
  align-items: center;
  padding: 0 8px;
  border-bottom: 1px solid var(--line-strong);
  background: #dfeaed;
  color: #294751;
  font-weight: 700;
}

.subject-transfer-account-list-head span:last-child {
  text-align: right;
}

.subject-transfer-account-dialog .account-option-list em {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.subject-transfer-account-dialog .account-option-list em strong {
  min-width: 92px;
  color: #244d59;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.dialog-box.employee-dialog {
  width: min(720px, calc(100vw - 32px));
  height: min(580px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.employee-picker-body {
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0;
  padding: 16px;
  background: #f7f9fa;
}

.employee-picker-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
}

.employee-picker-toolbar .dialog-search {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
}

.employee-picker-toolbar button {
  flex: 0 0 auto;
  min-height: 36px;
  white-space: nowrap;
}

.employee-option-table {
  min-height: 0;
  height: 100%;
  display: block;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.dialog-box.employee-dialog .employee-option-head,
.dialog-box.employee-dialog .employee-option-list button {
  display: grid;
  grid-template-columns: 140px minmax(190px, 1fr) minmax(220px, 1.2fr);
  gap: 0;
  align-items: center;
}

.employee-option-head {
  min-height: 34px;
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 2px solid #aebfc6;
  background: #e6f0f3;
  color: #3b4c53;
}

.dialog-box.employee-dialog .employee-option-head > *,
.dialog-box.employee-dialog .employee-option-list button > * {
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-right: 1px solid #bdced5;
  text-align: left;
}

.dialog-box.employee-dialog .employee-option-list button > * {
  border-bottom: 1px solid #dce5e8;
}

.dialog-box.employee-dialog .employee-option-head > *:last-child,
.dialog-box.employee-dialog .employee-option-list button > *:last-child {
  border-right: 0;
}

.employee-option-list {
  height: auto;
  max-height: none;
  overflow: visible;
  border: 0;
}

.dialog-box.employee-dialog .employee-option-list button {
  min-height: 36px;
  padding: 0;
  border-bottom: 0;
}

.employee-option-list button em {
  color: var(--muted);
  font-style: normal;
  text-align: left;
}

.employee-empty-message {
  padding: 48px 12px;
  color: var(--muted);
  text-align: center;
}

.employee-empty-message[hidden] {
  display: none;
}

.dialog-box.donor-dialog {
  width: min(720px, calc(100vw - 32px));
  height: min(580px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.donor-picker-body {
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0;
  padding: 16px;
  background: #f7f9fa;
}

.donor-picker-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
}

.donor-picker-toolbar .dialog-search {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  line-height: normal;
}

.donor-picker-toolbar button {
  flex: 0 0 auto;
  min-height: 36px;
  white-space: nowrap;
}

.donor-option-table {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.donor-option-head,
.donor-option-list button {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 1fr) minmax(170px, 1fr);
  align-items: center;
}

.donor-option-head {
  border-bottom: 2px solid #aebfc6;
  background: #e6f0f3;
  color: #3b4c53;
}

.donor-option-head > *,
.donor-option-list button > * {
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid #bdced5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.donor-option-head > *:last-child,
.donor-option-list button > *:last-child {
  border-right: 0;
}

.donor-option-list {
  min-height: 0;
  overflow: auto;
}

.donor-option-list button {
  width: 100%;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #e2e9ec;
  background: #fff;
  color: #263b44;
  text-align: left;
}

.donor-option-list button:hover,
.donor-option-list button:focus-visible {
  background: #edf7f8;
  outline: none;
}

.donor-option-list button[aria-current="true"] {
  background: #dff1f3;
  box-shadow: inset 3px 0 0 var(--primary);
}

.donor-option-list button[hidden] {
  display: none !important;
}

.donor-empty-message {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.donor-empty-message[hidden] {
  display: none !important;
}

.dialog-box.cared-dialog {
  width: min(660px, calc(100vw - 32px));
  height: min(580px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.cared-picker-body {
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0;
  padding: 16px;
  background: #f7f9fa;
}

.cared-picker-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
}

.cared-picker-toolbar .dialog-search {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
}

.cared-picker-toolbar button {
  flex: 0 0 auto;
  min-height: 36px;
  white-space: nowrap;
}

.cared-picker-summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  background: #fff;
  color: #2f454e;
}

.cared-picker-summary > span {
  font-weight: 700;
}

.cared-picker-summary > strong {
  color: var(--primary-dark);
}

.cared-option-table {
  min-height: 0;
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr);
  border: 1px solid var(--line-strong);
  background: #fff;
}

.cared-option-head,
.cared-dialog .cared-option-list button {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
}

.cared-option-head {
  border-bottom: 2px solid #aebfc6;
  background: #e6f0f3;
  color: #3b4c53;
}

.cared-option-head > *,
.cared-dialog .cared-option-list button > * {
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid #bdced5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cared-option-head > *:last-child,
.cared-dialog .cared-option-list button > *:last-child {
  border-right: 0;
}

.cared-dialog .cared-option-list {
  min-height: 0;
  overflow: auto;
}

.cared-dialog .cared-option-list button {
  width: 100%;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #e2e9ec;
  background: #fff;
  color: #263b44;
  text-align: left;
}

.cared-dialog .cared-option-list button:hover,
.cared-dialog .cared-option-list button:focus-visible {
  background: #edf7f8;
  outline: none;
}

.cared-dialog .cared-option-list button.selected {
  background: #dff1f3;
  box-shadow: inset 3px 0 0 var(--primary);
}

.cared-dialog .cared-option-list button[hidden] {
  display: none !important;
}

.cared-empty-message {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.cared-empty-message[hidden] {
  display: none !important;
}

.cared-name-cell {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto;
  align-items: center;
  gap: 5px;
  min-width: 150px;
}

.dialog-box.cared-detail-dialog {
  width: min(1120px, calc(100vw - 60px));
  height: min(820px, calc(100vh - 60px));
}

.cared-detail-body {
  display: block;
  overflow: auto;
  padding: 18px 22px 24px;
  background: #f7f9fa;
}

.cared-detail-section {
  margin: 0 0 18px;
}

.cared-detail-section h3 {
  margin: 0 0 10px;
  padding: 0 0 7px;
  border-bottom: 2px solid #78909a;
  color: #263b43;
  font-size: calc(var(--app-font-size) + 1px);
}

.cared-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
}

.cared-detail-field {
  display: grid;
  grid-template-rows: auto 34px;
  gap: 5px;
  min-width: 0;
  color: #455a62;
}

.cared-detail-field > span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  font-weight: 600;
}

.cared-detail-field input,
.cared-detail-field select,
.cared-detail-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  padding: 6px 8px;
}

.cared-detail-field textarea {
  min-height: 76px;
  resize: vertical;
}

.cared-detail-field.cared-detail-wide {
  grid-column: 1 / -1;
  grid-template-rows: auto minmax(76px, auto);
}

@media (max-width: 900px) {
  .dialog-box.cared-detail-dialog {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
  }

  .cared-detail-grid {
    grid-template-columns: 1fr;
  }
}

.budget-account-option-list {
  display: grid;
  grid-template-rows: auto;
  grid-auto-rows: auto;
  align-content: start;
}

.budget-account-option-list .budget-account-option {
  min-height: 35px;
  height: auto;
  align-self: start;
}

.budget-account-list-head,
.budget-account-option-list .budget-account-option {
  display: grid;
  grid-template-columns: 34px minmax(150px, 1fr) minmax(160px, 1.05fr) minmax(250px, 1.65fr) minmax(120px, .8fr);
  gap: 0;
}

.budget-account-list-head {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 30px;
  background: #eef4f6;
  border-bottom: 1px solid var(--line-strong);
  color: #31464f;
  font-weight: 700;
}

.budget-account-list-head span,
.budget-account-option-list .budget-account-option > span,
.budget-account-option-list .budget-account-option > strong {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-right: 1px solid #e6ecef;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.budget-account-list-head input[type="checkbox"],
.budget-account-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  box-sizing: border-box;
  margin: 0;
  display: grid;
  place-content: center;
  border: 1px solid #667b84;
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
}

.budget-account-list-head input[type="checkbox"]:checked,
.budget-account-option input[type="checkbox"]:checked,
.budget-account-list-head input[type="checkbox"]:indeterminate {
  border-color: #17768e;
  background: #17768e;
}

.budget-account-list-head input[type="checkbox"]:checked::after,
.budget-account-option input[type="checkbox"]:checked::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-1px) rotate(-45deg);
}

.budget-account-list-head input[type="checkbox"]:indeterminate::after {
  content: "";
  width: 8px;
  height: 2px;
  background: #fff;
}

.budget-account-list-head input[type="checkbox"]:focus-visible,
.budget-account-option input[type="checkbox"]:focus-visible {
  outline: 2px solid #65bfd0;
  outline-offset: 2px;
}

.account-dialog.budget-account-dialog .budget-account-option-list .budget-account-option {
  grid-template-columns: 34px minmax(150px, 1fr) minmax(160px, 1.05fr) minmax(250px, 1.65fr) minmax(120px, .8fr);
  padding: 0;
}

.budget-account-option-list .budget-account-option > [data-budget-account-group-level="l"] {
  background: #eaf2f4;
  color: #254853;
  font-weight: 700;
}

.budget-account-option-list .budget-account-option > [data-budget-account-group-level="m"] {
  background: #f3f7f8;
  color: #35545d;
  font-weight: 600;
}

.budget-account-option-list .budget-account-option:not(.budget-large-group-end) > [data-budget-account-group-level="l"],
.budget-account-option-list .budget-account-option:not(.budget-middle-group-end) > [data-budget-account-group-level="m"] {
  border-bottom-color: transparent;
}

.budget-account-option-list .budget-account-option.budget-large-group-start:not(:first-of-type) > span,
.budget-account-option-list .budget-account-option.budget-large-group-start:not(:first-of-type) > strong {
  border-top: 1px solid #c9d6da;
}

.budget-account-option-list .budget-account-option em {
  flex: 0 0 auto;
  min-width: 34px;
  text-align: left;
}

.budget-account-option-list .budget-account-option strong {
  color: #1f333b;
  font-weight: 700;
}

.account-empty-message {
  padding: 10px;
  border: 1px solid var(--line);
  border-top: 0;
  background: #f7fafb;
  color: var(--muted);
}

.receipt-target {
  display: grid;
  gap: 4px;
  padding: 8px;
  background: #f7fafb;
  border: 1px solid var(--line);
}

.receipt-nav-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.receipt-nav-row .soft-button {
  width: 32px;
  min-width: 32px;
  padding: 4px 0;
}

.receipt-nav-row #receiptZoomResetButton,
.receipt-nav-row #receiptZoomInButton,
.receipt-nav-row #receiptZoomOutButton,
.receipt-nav-row #receiptPrintButton {
  width: auto;
  min-width: 52px;
  padding: 4px 8px;
}

.receipt-zoom-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: max(30px, calc(var(--app-font-size) + 16px));
  min-width: 54px;
  text-align: center;
  border: 1px solid var(--line);
  background: #f4f7f8;
  padding: 4px 8px;
  color: var(--text);
}

.receipt-date {
  margin-left: auto;
  color: var(--muted);
  font-size: calc(var(--app-font-size) - 1px);
}

.receipt-list {
  margin: 10px 0;
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #f8fafb;
}

.receipt-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.receipt-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 132px 88px;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
}

.receipt-list li:last-child {
  border-bottom: 0;
}

.receipt-list li.selected {
  background: var(--focus);
}

.receipt-list a {
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receipt-list span {
  color: var(--muted);
  font-size: calc(var(--app-font-size) - 1px);
  text-align: right;
}

.receipt-upload-guide {
  margin-top: 6px;
  color: var(--muted);
  font-size: calc(var(--app-font-size) - 1px);
}

.dialog-box.receipt-dialog {
  width: min(1080px, calc(100vw - 32px));
  height: min(760px, calc(100vh - 32px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.receipt-dialog .dialog-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
}

.receipt-target {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: #edf3f5;
}

.receipt-target span {
  color: var(--muted);
}

.receipt-target-amount {
  margin-left: auto;
  padding-left: 16px;
  color: #173f4b;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.receipt-viewer-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 0;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.receipt-sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  border-right: 1px solid var(--line-strong);
  background: #f6f9fa;
}

.receipt-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line-strong);
  background: #dce8ec;
  color: #29454f;
}

.receipt-sidebar-head span {
  color: var(--primary-dark);
  font-weight: 800;
}

.receipt-dialog .receipt-list {
  min-height: 0;
  max-height: none;
  margin: 0;
  overflow-y: auto;
  border: 0;
  background: transparent;
}

.receipt-list-loading {
  display: grid;
  min-height: 120px;
  place-items: center;
  color: var(--muted);
}

.receipt-dialog .receipt-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  min-height: 0;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}

.receipt-dialog .receipt-list li.selected {
  box-shadow: inset 3px 0 0 var(--primary);
  background: #e8f5f7;
}

.receipt-thumbnail-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.receipt-thumbnail-frame {
  display: grid;
  width: 74px;
  height: 82px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.receipt-thumbnail-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.receipt-pdf-thumbnail {
  color: #a52b2b;
  font-size: calc(var(--app-font-size) + 2px);
  font-weight: 900;
}

.receipt-thumbnail-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.receipt-thumbnail-meta strong,
.receipt-thumbnail-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.receipt-thumbnail-meta small {
  color: var(--muted);
  font-size: var(--small-font-size);
}

.receipt-thumbnail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-right: 2px;
}

.receipt-thumbnail-actions a,
.receipt-delete-button {
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  font-size: var(--small-font-size);
  text-decoration: none;
  cursor: pointer;
}

.receipt-delete-button {
  color: var(--danger);
}

.receipt-viewer-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background: #eef2f3;
}

.receipt-viewer-main .receipt-nav-row {
  min-height: 40px;
  margin: 0;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line-strong);
  background: #fff;
}

.receipt-viewer-main .receipt-preview {
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  min-height: 0;
  max-height: none;
  margin: 10px;
  border-color: var(--line-strong);
  background: #fff;
}

.receipt-viewer-main .receipt-preview img {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  object-fit: contain;
}

.receipt-viewer-main .receipt-preview iframe {
  height: 100% !important;
  max-height: none;
}

.receipt-dialog .dialog-actions {
  align-items: center;
  gap: 8px;
}

.receipt-file-input {
  width: min(360px, 46vw);
  min-width: 0;
  height: 32px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  background: #fff;
}

@media (max-width: 820px) {
  .receipt-viewer-layout {
    grid-template-columns: 220px minmax(520px, 1fr);
    overflow-x: auto;
  }

  .receipt-date {
    display: none;
  }
}

.dialog-x-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.dialog-x-button:hover {
  color: var(--danger);
}

.bank-guide-dialog {
  width: min(900px, calc(100vw - 48px));
  height: min(680px, calc(100vh - 48px));
}

.bank-guide-dialog .dialog-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.bank-guide-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(82px, 1fr));
  gap: 8px;
  padding: 14px 18px 10px;
}

.bank-guide-actions .soft-button.active {
  border-color: var(--primary);
  background: #e8f3ff;
  color: var(--primary-dark);
}

.bank-guide-url {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 12px;
  color: var(--muted);
  font-size: calc(var(--app-font-size) - 1px);
}

.bank-guide-url span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-guide-frame {
  width: calc(100% - 36px);
  min-height: 260px;
  flex: 1;
  margin: 0 18px 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.bank-guide-content {
  min-height: 0;
  flex: 1;
  margin: 0 18px 16px;
  padding: 18px 20px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #fff;
  color: #263b43;
  line-height: 1.75;
  white-space: pre-wrap;
}

.bank-guide-content:has(.cared-loading-spinner) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
}

.bank-account-status-dialog {
  width: min(820px, calc(100vw - 40px));
}

.bank-account-type-dialog {
  width: min(560px, calc(100vw - 40px));
}

.bank-account-type-body {
  padding: 18px;
}

.bank-account-type-body > p {
  margin: 0 0 12px;
  color: var(--muted);
}

.bank-account-type-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bank-account-type-button {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.bank-account-type-button:hover,
.bank-account-type-button:focus-visible {
  border-color: var(--primary);
  background: #eef8fa;
  outline: none;
}

.bank-account-type-button strong,
.bank-account-type-button span {
  display: block;
}

.bank-account-type-button strong {
  margin-bottom: 8px;
  color: var(--primary-dark);
}

.bank-account-type-button span {
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 620px) {
  .bank-account-type-actions {
    grid-template-columns: 1fr;
  }
}

.bank-account-status-body {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.bank-account-status-summary {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--line-strong);
  background: #f5f8f9;
}

.bank-account-status-summary span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 13px;
  border-right: 1px solid var(--line);
  color: #52676f;
}

.bank-account-status-summary span.ok { color: #08727b; }
.bank-account-status-summary span.pending { color: #9a6700; }
.bank-account-status-summary span.error { color: #b42318; }

.bank-account-status-table-wrap {
  max-height: min(430px, calc(100vh - 270px));
  overflow: auto;
  border: 1px solid var(--line-strong);
}

.bank-account-status-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.bank-account-status-table th,
.bank-account-status-table td {
  padding: 9px 11px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  overflow-wrap: anywhere;
}

.bank-account-status-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #e7f0f3;
  color: #344c55;
  text-align: center;
}

.bank-account-status-table th:nth-child(1) { width: 22%; }
.bank-account-status-table th:nth-child(2) { width: 25%; }
.bank-account-status-table th:nth-child(3) { width: 14%; }
.bank-account-status-table th:nth-child(4) { width: 39%; }

.bank-account-status-table td:nth-child(2),
.bank-account-status-table td:nth-child(3) {
  text-align: center;
}

.bank-account-status-badge {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid #cbd7db;
  background: #f3f6f7;
  color: #52676f;
  font-weight: 700;
}

.bank-account-status-badge.ok {
  border-color: #79b9b3;
  background: #e6f5f2;
  color: #08727b;
}

.bank-account-status-badge.pending {
  border-color: #e3bd65;
  background: #fff7df;
  color: #8a5a00;
}

.bank-account-status-badge.error {
  border-color: #e0a29d;
  background: #fff0ee;
  color: #b42318;
}

.bank-account-status-guide {
  margin: 0;
  color: #52676f;
}

.settings-panel {
  max-width: 640px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px;
}

.settings-row {
  display: grid;
  grid-template-columns: 110px minmax(220px, 1fr) 70px;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.settings-row input[type="range"] {
  width: 100%;
}

.font-size-settings-row {
  grid-template-columns: 90px 260px 64px;
  width: max-content;
  max-width: 100%;
}

.font-size-settings-row input[type="number"] {
  width: 64px;
}

@media (max-width: 560px) {
  .font-size-settings-row {
    grid-template-columns: 80px minmax(140px, 1fr) 60px;
    width: 100%;
  }
}

.settings-actions {
  display: flex;
  gap: 6px;
}

.start-upload-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.start-upload-layout h3 {
  margin: 0 0 10px;
  font-size: calc(var(--app-font-size) + 1px);
  color: #263940;
}

.ssis-sync-page .start-upload-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.local-module-job-status {
  margin: 10px 0 0;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid #b8d2d8;
  background: #eef7f8;
  color: #235765;
  font-weight: 600;
  text-align: center;
}

.local-module-job-status[hidden] {
  display: none;
}

.ssis-sync-simple:not(.ssis-login-page) .winform-toolbar {
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  justify-content: stretch;
  column-gap: 14px;
}

.ssis-sync-targets {
  display: flex;
  align-items: center;
  min-height: 34px;
  border-left: 1px solid #c6d5da;
  padding-left: 14px;
  gap: 12px;
  white-space: nowrap;
}

.ssis-sync-targets-title {
  color: #263b43;
  font-weight: 700;
}

.ssis-sync-targets label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  cursor: pointer;
}

.ssis-sync-targets input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-width: 15px;
  margin: 0;
}

.ssis-sync-simple:not(.ssis-login-page) .winform-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

@media (max-width: 1100px) {
  .ssis-sync-simple:not(.ssis-login-page) .winform-toolbar {
    grid-template-columns: max-content minmax(0, 1fr);
  }

  .ssis-sync-simple:not(.ssis-login-page) .winform-actions {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

.ssis-sync-page .sync-settings-section {
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 1px solid #c7d1d5;
  background: #fff;
}

.ssis-sync-page .sync-settings-section h3 {
  margin: 0;
  padding: 8px 12px;
  border-bottom: 2px solid #8eabb4;
  background: #f9fbfb;
  color: #263b43;
  font-size: 13px;
  font-weight: 700;
}

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

.ssis-sync-page .sync-field {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  min-width: 0;
  min-height: 38px;
  margin: 0;
  border-right: 1px solid #c8d3d7;
  border-bottom: 1px solid #c8d3d7;
  background: #fff;
}

.ssis-sync-page .sync-field:nth-child(2n) {
  border-right: 0;
}

.ssis-sync-page .sync-field-wide {
  grid-column: 1 / -1;
  border-right: 0;
}

.ssis-sync-page .sync-field-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  padding: 6px 10px;
  border-right: 1px solid #c8d3d7;
  background: #e7eff2;
  color: #273b43;
  font-weight: 600;
  text-align: right;
}

.ssis-sync-page .sync-field-control {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 4px;
}

.ssis-sync-page .sync-field-control > input,
.ssis-sync-page .sync-field-control > select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 28px;
  border: 1px solid #b8c5ca;
  border-radius: 0;
  background: #fff;
}

.ssis-sync-page .sync-field-note {
  grid-column: 1 / -1;
  min-height: 30px;
  box-sizing: border-box;
  margin: 0;
  padding: 7px 12px;
  border-bottom: 1px solid #d7dfe2;
  background: #f7f9fa;
  color: #68787e;
  font-size: 12px;
}

.ssis-sync-page .sync-option-title {
  padding: 8px 12px;
  border-bottom: 1px solid #c8d3d7;
  background: #f7f9fa;
  color: #273b43;
  font-weight: 700;
}

.ssis-sync-page .sync-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid #c8d3d7;
  background: #fff;
}

.ssis-sync-page .sync-document-options {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.ssis-sync-page .sync-check-control {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-width: 0;
  min-height: 36px;
  box-sizing: border-box;
  margin: 0;
  padding: 7px 12px;
  border-right: 1px solid #e0e6e8;
  color: #273b43;
  font-weight: 400;
  line-height: 1.35;
  cursor: pointer;
}

.ssis-sync-page input[type="checkbox"] {
  appearance: auto;
  flex: 0 0 14px;
  width: 14px !important;
  min-width: 14px !important;
  height: 14px !important;
  min-height: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #148397;
}

@media (max-width: 1200px) {
  .ssis-sync-page .sync-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ssis-sync-page .sync-field {
    grid-column: 1;
    border-right: 0;
  }

  .ssis-sync-page .sync-document-options {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

.ssis-sync-page .legacy-form-box {
  max-width: none;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #c7d1d5;
  align-content: start;
}

.ssis-sync-page .legacy-form-box h3 {
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px 10px 7px;
  border-bottom: 2px solid #9db6be;
  background: #fff;
  color: #263b43;
  font-size: 13px;
}

.ssis-sync-page .legacy-form-box > label:not(.check-row),
.ssis-sync-page .start-upload-two-cols > label {
  min-width: 0;
  min-height: 38px;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  margin: 0;
  border-right: 1px solid #c8d3d7;
  border-bottom: 1px solid #c8d3d7;
  background: #fff;
  color: #273b43;
  font-weight: 600;
}

.ssis-sync-page .legacy-form-box > label:not(.check-row) > span:first-child,
.ssis-sync-page .start-upload-two-cols > label > span:first-child {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding: 6px 8px;
  border-right: 1px solid #c8d3d7;
  background: #e7eff2;
  text-align: right;
}

.ssis-sync-page .legacy-form-box > label:not(.check-row) > input,
.ssis-sync-page .legacy-form-box > label:not(.check-row) > select,
.ssis-sync-page .start-upload-two-cols > label > input {
  box-sizing: border-box;
  width: calc(100% - 8px);
  min-width: 0;
  height: 28px;
  margin: 4px;
  border: 1px solid #b8c5ca;
  border-radius: 0;
}

.ssis-sync-page .start-upload-two-cols {
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.ssis-sync-page .legacy-form-box > .legacy-help {
  grid-column: 1 / -1;
  min-height: 28px;
  padding: 6px 10px;
  border-bottom: 1px solid #d7dfe2;
  background: #f7f9fa;
}

.ssis-sync-page .legacy-form-box > .check-row {
  min-width: 0;
  min-height: 36px;
  margin: 0;
  padding: 6px 10px;
  border-right: 1px solid #c8d3d7;
  border-bottom: 1px solid #c8d3d7;
  background: #fff;
  color: #273b43;
}

.ssis-sync-page .pdf-check-list {
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px 10px;
  border-top: 1px solid #c8d3d7;
  background: #f8fafb;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ssis-sync-page .pdf-check-list .check-row {
  min-width: 0;
  padding: 3px 2px;
  border: 0;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .ssis-sync-page .start-upload-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.legacy-form-box .check-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legacy-form-box .check-row input {
  width: auto;
}

.section-title.compact {
  margin-top: 6px;
}

.notepad-editor {
  border: 1px solid var(--line);
  background: #fff;
}

.notepad-format-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: #fff;
}

.notepad-format-toolbar select {
  height: 28px;
  border: 1px solid var(--line);
  background: #fff;
}

.notepad-color-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid var(--line);
  background: #f8fafc;
  font-weight: 700;
}

.notepad-color-button input {
  width: 24px;
  height: 20px;
  border: 0;
  padding: 0;
  background: transparent;
}

.notepad-bold {
  font-weight: 800;
}

.notepad-strike {
  text-decoration: line-through;
}

.notepad-underline {
  text-decoration: underline;
}

.notepad-rich-editor {
  width: 100%;
  min-height: 520px;
  padding: 12px;
  font-family: "Malgun Gothic", "맑은 고딕", sans-serif;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
  overflow: auto;
  white-space: normal;
}

.notepad-rich-editor:focus {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.compact-dialog-form {
  border: 0;
  padding: 0;
}

.compact-dialog-form > label {
  white-space: nowrap;
}

.compact-dialog-form > .start-upload-certificate-consent,
.legacy-form-box > .start-upload-certificate-consent {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-height: 34px;
  padding: 4px 0;
  white-space: normal;
}

.start-upload-certificate-consent input[type="checkbox"] {
  flex: 0 0 14px;
  width: 14px;
  min-width: 14px;
  max-width: 14px;
  height: 14px;
  margin: 0;
}

.start-upload-certificate-consent span {
  width: auto;
  margin: 0;
}

.start-upload-certificate-status {
  margin: 4px 0 0;
  white-space: normal;
}

@media (max-width: 1100px) {
  .start-upload-layout {
    grid-template-columns: 1fr;
  }
}

.dialog-note {
  margin: 0;
  color: var(--muted);
  white-space: pre-line;
}

.save-toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 220px;
  max-width: 420px;
  padding: 12px 18px;
  background: #1776a2;
  color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 30px rgba(25, 38, 45, 0.2);
  font-weight: 700;
  display: grid;
  place-items: center;
  justify-content: center;
  align-content: center;
  text-align: center;
  line-height: 1.35;
}

.save-toast.alert {
  background: #ff8080;
  color: #241111;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #e5eef1;
  color: #3b4c53;
  font-weight: 700;
}

tbody tr:nth-child(even) {
  background: var(--row);
}

tbody tr.selected {
  background: var(--focus);
}

tbody tr.filtered-out {
  display: none;
}

.detail-split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 10px;
  margin-top: 10px;
}

.detail-panel,
.mini-panel {
  border: 1px solid var(--line);
  background: #fff;
}

.panel-head {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px;
  background: #f3f7f8;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 8px;
  padding: 10px;
}

.form-grid label {
  display: grid;
  gap: 4px;
  color: #455a62;
}

.form-grid input,
.form-grid select {
  width: 100%;
}

.validation-panel h2 {
  margin: 0 0 10px;
  font-size: 14px;
}

.validation-card {
  border: 1px solid var(--line);
  background: #fff;
  margin-bottom: 9px;
}

.validation-card strong {
  display: flex;
  justify-content: space-between;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: #f3f7f8;
}

.validation-card ul {
  margin: 0;
  padding: 8px 8px 8px 22px;
}

.validation-card li {
  margin-bottom: 6px;
}

.timeline {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.timeline div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #455a62;
}

.empty-note {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  background: #fbfcfc;
}

@media (max-width: 1280px) {
  .content-grid {
    display: block;
  }

  .filter-bar {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

.dialog-box.budget-account-dialog,
.dialog-box.account-dialog {
  width: 760px;
  height: 620px;
}

.dialog-box.budget-account-dialog {
  width: min(1080px, calc(100vw - 40px));
  height: min(680px, calc(100vh - 40px));
}

.budget-account-dialog-filter {
  grid-template-columns: 180px minmax(240px, 1fr);
  align-items: stretch;
}

.budget-account-dialog-filter > .dialog-search,
.budget-account-dialog-filter > .budget-account-type-tabs {
  box-sizing: border-box;
  height: 34px;
  min-height: 34px;
}

.budget-account-type-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-self: stretch;
  border: 1px solid var(--line-strong);
  background: #f5f7f8;
}

.budget-account-type-tabs button {
  min-height: 0;
  height: 100%;
  border: 0;
  border-right: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: #41545c;
  font-weight: 700;
}

.budget-account-type-tabs button:last-child {
  border-right: 0;
}

.budget-account-type-tabs button.active {
  background: #17768e;
  color: #fff;
}

.dialog-box.auto-budget-dialog {
  width: min(920px, calc(100vw - 40px));
  height: min(680px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.dialog-box.create-budget-dialog {
  width: min(1118px, calc(100vw - 36px));
  height: min(735px, calc(100vh - 36px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.dialog-box.divide-dialog {
  width: min(1120px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.divide-dialog-body {
  min-height: 0;
  align-content: start;
  overflow: auto;
  padding: 14px 16px 16px;
  background: #f8fafb;
}

.divide-source-summary,
.divide-command-section,
.divide-setting-box,
.divide-lines-section {
  border: 1px solid #bdcfd6;
  background: #fff;
}

.divide-section-title {
  color: #173f4b;
  font-size: var(--section-title-font-size);
}

.divide-source-summary {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: stretch;
}

.divide-source-summary > .divide-section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-right: 1px solid #bdcfd6;
  background: #e6f0f3;
}

.divide-source-summary dl {
  display: grid;
  grid-template-columns: 160px 120px minmax(240px, 1fr) 210px;
  margin: 0;
}

.divide-source-summary dl > div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  border-right: 1px solid #d5e0e4;
}

.divide-source-summary dl > div:last-child {
  border-right: 0;
}

.divide-source-summary dt,
.divide-source-summary dd {
  margin: 0;
  padding: 9px 10px;
}

.divide-source-summary dt {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef4f6;
  color: #40565f;
  font-weight: 700;
}

.divide-source-summary dd {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.divide-source-amount dd {
  color: #153f4d;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.divide-command-section {
  display: grid;
}

.divide-command-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid #d5e0e4;
}

.divide-command-row:last-child {
  border-bottom: 0;
}

.divide-row-label {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-right: 1px solid #bdcfd6;
  background: #e6f0f3;
  color: #294b57;
}

.divide-check-group,
.divide-prefix-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 7px 10px;
}

.divide-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  min-width: 0;
  white-space: nowrap;
}

.divide-check input[type="checkbox"],
.divide-grid input[type="checkbox"] {
  appearance: auto;
  width: 14px !important;
  min-width: 14px !important;
  height: 14px !important;
  margin: 0;
  padding: 0;
  accent-color: #17768e;
}

.divide-template-row {
  grid-template-columns: 88px 190px auto minmax(0, 1fr);
  gap: 8px;
  padding-right: 10px;
}

.divide-template-row .divide-row-label {
  margin-right: 0;
}

.divide-template-select {
  width: 190px;
  min-width: 190px;
}

.divide-preset-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.divide-preset-buttons .mini-button {
  white-space: nowrap;
}

.divide-setting-box {
  overflow: hidden;
}

.divide-setting-box > summary {
  padding: 9px 12px;
  cursor: pointer;
  background: #eef4f6;
  color: #294b57;
  font-weight: 800;
  list-style-position: inside;
}

.divide-setting-box[open] > summary {
  border-bottom: 1px solid #bdcfd6;
}

.divide-settings-content {
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(440px, 1.6fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.divide-prefix-options {
  align-content: center;
  display: grid;
  gap: 10px;
  padding: 0;
}

.divide-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  border-top: 1px solid #bdcfd6;
  border-left: 1px solid #bdcfd6;
}

.divide-settings-grid label {
  display: grid;
  grid-template-columns: minmax(108px, 1fr) minmax(86px, 0.8fr);
  align-items: center;
  min-width: 0;
  border-right: 1px solid #bdcfd6;
  border-bottom: 1px solid #bdcfd6;
}

.divide-settings-grid label > span {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  background: #eef4f6;
  color: #40565f;
  font-weight: 700;
}

.divide-settings-grid input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-left: 1px solid #bdcfd6;
  text-align: right;
}

.divide-settings-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.divide-lines-section {
  min-height: 250px;
  display: grid;
  grid-template-rows: auto minmax(150px, 1fr) auto;
}

.divide-lines-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 8px 10px;
  border-bottom: 1px solid #bdcfd6;
}

.divide-lines-heading span {
  color: #647880;
  font-size: var(--small-font-size);
}

.divide-grid {
  height: 100%;
  min-height: 150px;
  border: 0;
}

.divide-grid table {
  min-width: 780px;
  table-layout: fixed;
}

.divide-grid .divide-check-column {
  width: 38px;
}

.divide-grid .divide-memo-column {
  width: 27%;
}

.divide-grid .divide-type-column {
  width: 94px;
}

.divide-grid .divide-account-column {
  width: auto;
}

.divide-grid .divide-money-column {
  width: 150px;
}

.divide-grid th,
.divide-grid td {
  height: 36px;
}

.divide-grid td {
  border-right: 1px solid #d5e0e4;
  border-bottom: 1px solid #d5e0e4;
  background: #fff;
}

.divide-grid td.check-col {
  text-align: center;
  vertical-align: middle;
}

.divide-grid input:not([type="checkbox"]),
.divide-grid select {
  height: 35px;
  padding: 5px 8px;
}

.divide-grid input:focus,
.divide-grid select:focus {
  position: relative;
  z-index: 1;
  outline: 2px solid #2b92a6;
  outline-offset: -2px;
  background: #fffdf0;
}

.divide-grid [data-divide-money] {
  padding-right: 10px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.divide-total-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  min-height: 40px;
  padding: 7px 12px;
  border-top: 1px solid #bdcfd6;
  background: #edf3f5;
  font-variant-numeric: tabular-nums;
}

.divide-total-bar strong {
  min-width: 110px;
  display: inline-block;
  color: #153f4d;
  text-align: right;
}

.divide-balance {
  min-width: 130px;
  padding: 4px 9px;
  border: 1px solid #b5c6cc;
  background: #fff;
  text-align: center;
  font-weight: 800;
}

.divide-balance.is-matched {
  border-color: #80b6a5;
  background: #edf8f4;
  color: #176b56;
}

.divide-balance.is-mismatched {
  border-color: #d69a91;
  background: #fff0ee;
  color: #b2382d;
}

.divide-dialog .dialog-actions {
  min-height: 50px;
  background: #fff;
}

@media (max-width: 900px) {
  .divide-source-summary dl {
    grid-template-columns: 140px 110px minmax(220px, 1fr) 180px;
  }

  .divide-template-row {
    grid-template-columns: 88px minmax(150px, 190px) auto;
  }

  .divide-preset-buttons {
    grid-column: 2 / -1;
    padding-bottom: 8px;
  }

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

  .divide-settings-actions {
    justify-content: flex-end;
  }
}

.budget-sheet-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  align-items: start;
  padding: 12px 0 14px;
}

.budget-sheet-main {
  min-width: 0;
}

.budget-sheet-workspace .budget-split-grid {
  padding: 0;
}

.budget-status-panel {
  position: sticky;
  top: 0;
  display: grid;
  gap: 10px;
  width: 220px;
}

.budget-status-group {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.budget-status-group h3 {
  min-height: 34px;
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-strong);
  background: #17768e;
  color: #fff;
  font-size: var(--section-title-font-size);
}

.budget-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}

.budget-status-row:last-child {
  border-bottom: 0;
}

.budget-status-row span {
  min-width: 0;
  color: #465b63;
  line-height: 1.35;
}

.budget-status-row strong {
  max-width: 112px;
  text-align: right;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.budget-status-note,
.budget-support-status p {
  margin: 0;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  color: #667980;
  font-size: var(--small-font-size);
  line-height: 1.45;
}

.budget-status-note {
  background: #f1f3f4;
  text-align: right;
}

.budget-status-detail-row {
  background: #f1f3f4;
}

.budget-status-result-row span {
  font-weight: 700;
}

.budget-status-formula {
  margin: 0;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  background: #f1f3f4;
  color: #667980;
  text-align: right;
  font-size: var(--small-font-size);
}

.budget-support-status > strong {
  display: block;
  padding: 9px;
  text-align: right;
}

.danger-text {
  color: var(--danger);
}

.budget-split-grid {
  display: grid;
  gap: 14px;
  padding: 0 14px 14px;
}

.budget-split-grid.two-pane {
  grid-template-columns: repeat(2, minmax(590px, 1fr));
  overflow-x: auto;
}

.budget-split-grid.one-pane {
  grid-template-columns: minmax(590px, 1fr);
}

.budget-grid-section {
  border: 1px solid var(--line-strong);
  background: #fff;
}

.budget-grid-head {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: #17768e;
  color: #fff;
  font-weight: 700;
}

.budget-grid-head span {
  font-weight: 400;
}

.budget-summary-workspace,
.budget-pay-workspace,
.closing-summary-workspace {
  padding: 12px 14px 14px;
}

.budget-summary-workspace .budget-split-grid,
.closing-summary-workspace .budget-split-grid {
  padding: 0;
}

.budget-summary-side-grid table,
.closing-summary-table table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

.budget-summary-side-grid th,
.budget-summary-side-grid td,
.closing-summary-table th,
.closing-summary-table td {
  border-color: var(--line);
}

.budget-summary-side-grid th {
  background: #edf3f5;
}

.budget-summary-side-grid th:nth-child(1) {
  width: 30%;
}

.budget-summary-side-grid th:nth-child(2) {
  width: 45%;
}

.budget-summary-side-grid th:nth-child(3) {
  width: 25%;
}

.budget-summary-side-grid tfoot th,
.budget-summary-side-grid tfoot td,
.closing-summary-table tfoot th,
.closing-summary-table tfoot td {
  height: 34px;
  background: #dbe7eb;
  border-top: 1px solid var(--line-strong);
  font-weight: 700;
}

.closing-balance-summary {
  margin-bottom: 12px;
  border: 1px solid #9eafb6;
  background: #fff;
}

.closing-balance-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 7px 12px;
  border-bottom: 1px solid #9eafb6;
  background: #e7eff2;
}

.closing-balance-heading strong {
  color: #173f4d;
  font-size: calc(var(--base-font-size) + 1px);
}

.closing-balance-heading span {
  color: #586d75;
}

.closing-balance-summary table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.closing-balance-summary th,
.closing-balance-summary td {
  width: 33.333%;
  border-right: 1px solid #b6c2c7;
  text-align: center;
}

.closing-balance-summary th:last-child,
.closing-balance-summary td:last-child {
  border-right: 0;
}

.closing-balance-summary th {
  height: 34px;
  background: #f2f6f7;
  color: #405963;
  font-weight: 700;
}

.closing-balance-summary td {
  height: 54px;
  color: #243b44;
  font-size: calc(var(--base-font-size) + 4px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.closing-balance-summary td.income-value {
  color: #176b7a;
}

.closing-balance-summary td.expense-value {
  color: #80582c;
}

.closing-balance-summary td.balance-value {
  background: #edf6f7;
}

.closing-balance-summary td.balance-value.negative {
  color: #b33a3a;
  background: #fff1f1;
}

.accounting-report-grid tfoot .accounting-settlement-total-row th,
.accounting-report-grid tfoot .accounting-settlement-total-row td {
  height: 36px;
  padding: 6px 9px;
  border-top: 1px solid #8fa3ab;
  border-color: #aebdc3;
  background: #dbe7eb;
  color: #173f4d;
  font-weight: 700;
}

.accounting-report-grid tfoot .accounting-settlement-total-row th {
  text-align: center;
}

.budget-pay-section {
  min-width: 0;
}

.budget-pay-grid {
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-top: 0;
}

.budget-pay-grid table {
  min-width: 1280px;
  table-layout: fixed;
}

.budget-pay-grid col.budget-pay-check-column { width: 28px; }
.budget-pay-grid col.budget-pay-sequence-column { width: 44px; }
.budget-pay-grid col.budget-pay-employee-column { width: 138px; }
.budget-pay-grid col.budget-pay-job-column { width: 145px; }
.budget-pay-grid col.budget-pay-type-column { width: 230px; }
.budget-pay-grid col.budget-pay-kind-column { width: 105px; }
.budget-pay-grid col.budget-pay-money-column { width: 118px; }

.budget-pay-grid th,
.budget-pay-grid td {
  height: 31px;
  box-sizing: border-box;
}

.budget-pay-grid thead th {
  height: 42px;
  padding: 4px 5px;
  line-height: 1.2;
  text-align: center;
  vertical-align: middle;
}

.budget-pay-grid .check-col {
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  padding: 0;
  text-align: center;
}

.budget-pay-grid .check-col input[type="checkbox"] {
  display: block;
  width: 14px;
  min-width: 14px;
  height: 14px;
  margin: 0 auto;
}

.budget-pay-grid .sequence-cell {
  background: #f7f9fa;
  text-align: center;
}

.budget-pay-grid .number-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.budget-pay-grid tfoot th,
.budget-pay-grid tfoot td {
  height: 32px;
  padding: 5px 7px;
  border-color: #abb9bf;
  background: #e3e7e9;
  font-weight: 700;
}

.budget-pay-grid tfoot th {
  text-align: center;
}

.budget-pay-grid tfoot tr.grand-total th,
.budget-pay-grid tfoot tr.grand-total td {
  background: #d5dde0;
  color: #143d49;
}

.closing-summary-split {
  grid-template-columns: repeat(2, minmax(680px, 1fr));
  margin-bottom: 12px;
}

.closing-summary-table th {
  background: #edf3f5;
  white-space: nowrap;
}

.closing-summary-table th:nth-child(1),
.closing-summary-table th:nth-child(2) {
  width: 15%;
}

.closing-summary-table th:nth-child(3) {
  width: 24%;
}

.closing-summary-table th:nth-child(n + 4) {
  width: 15.333%;
}

.closing-summary-table td:nth-child(-n + 3) {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
  line-height: 1.4;
  vertical-align: middle;
}

.budget-sheet-grid table,
.budget-pay-grid table,
.budget-summary-grid table {
  min-width: 100%;
}

.budget-pay-grid table {
  min-width: max(100%, 1280px);
}

.budget-sheet-grid table {
  table-layout: fixed;
}

.budget-sheet-grid table:not(.budget-support-table) {
  min-width: 590px;
}

.budget-sheet-grid table.budget-support-table {
  min-width: 800px;
}

.budget-sheet-grid th.check-col,
.budget-sheet-grid td.check-col,
.budget-sheet-grid th:first-child,
.budget-sheet-grid td:first-child {
  width: 26px;
  min-width: 26px;
  max-width: 26px;
  box-sizing: border-box;
  padding: 0;
  text-align: center;
  vertical-align: middle;
}

.budget-sheet-grid .check-col input[type="checkbox"] {
  display: block;
  width: 14px;
  min-width: 14px;
  height: 14px;
  margin: 0 auto;
  padding: 0;
}

.budget-sheet-grid th:nth-child(2) {
  width: 29%;
}

.budget-sheet-grid th:nth-child(3),
.budget-sheet-grid th:nth-child(4) {
  width: 22%;
}

.budget-sheet-grid th:nth-child(5) {
  width: 19%;
}

.budget-sheet-grid .budget-support-table th:nth-child(2) {
  width: 24%;
}

.budget-sheet-grid .budget-support-table th:nth-child(3) {
  width: 16%;
}

.budget-sheet-grid .budget-support-table th:nth-child(4) {
  width: 14%;
}

.budget-sheet-grid .budget-support-table th:nth-child(5) {
  width: 14%;
}

.budget-sheet-grid .budget-support-table th:nth-child(n + 6) {
  width: 10%;
}

.budget-proof-heading {
  display: none;
}

.budget-account-row td {
  height: 30px;
  background: #cfdae2;
}

.budget-account-name-button {
  width: 100%;
  min-height: 28px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-weight: 700;
  text-decoration: none;
}

.budget-proof-row td {
  background: #fff;
  vertical-align: top;
}

.budget-proof-row .proof-cell {
  min-height: 58px;
  padding: 0;
}

.budget-proof-button {
  display: block;
  width: 100%;
  min-height: 58px;
  padding: 7px 9px;
  border: 0;
  background: #fff;
  color: var(--text);
  text-align: left;
  line-height: 1.35;
  white-space: pre-wrap;
  text-decoration: none;
}

.budget-proof-button:hover,
.budget-proof-button:focus-visible {
  background: var(--focus);
  outline: 1px solid var(--primary);
  outline-offset: -1px;
}

.budget-sheet-grid th,
.budget-pay-grid th,
.budget-summary-grid th {
  background: #edf3f5;
  border-color: var(--line-strong);
  white-space: nowrap;
}

.budget-sheet-grid td,
.budget-pay-grid td,
.budget-summary-grid td {
  padding: 0;
  border-color: var(--line);
}

.budget-sheet-grid .grid-cell-input,
.budget-pay-grid .grid-cell-input {
  width: 100%;
  min-width: 0;
  height: 28px;
  border: 0;
  background: transparent;
}

.budget-sheet-grid td.budget-gov-disabled-cell {
  background: #e3e7ea !important;
}

.budget-sheet-grid td.budget-gov-disabled-cell .grid-cell-input:disabled {
  background: transparent !important;
  cursor: not-allowed;
}

.budget-sheet-grid td.budget-gov-invalid-cell {
  background: #fff0f0 !important;
  box-shadow: inset 0 0 0 1px #d84a4a;
}

.budget-sheet-grid td.budget-gov-invalid-cell .grid-cell-input {
  background: #fff0f0 !important;
}

.budget-sheet-grid textarea,
.auto-budget-dialog textarea {
  width: 100%;
  min-height: 44px;
  border: 0;
  resize: vertical;
  padding: 6px;
  font: inherit;
}

.proof-cell {
  min-width: 280px;
}

.mini-button {
  height: 24px;
  margin: 3px 6px 6px;
  padding: 0 8px;
}

.check-col {
  width: 34px;
  min-width: 34px;
  text-align: center;
}

.check-col input {
  width: 14px;
  height: 14px;
  min-width: 14px;
  padding: 0;
}

.number-cell {
  text-align: right;
}

.summary-total {
  background: #e7f0d2;
  font-weight: 700;
  text-align: center;
}

.blank-col {
  width: 24px;
  background: #fff;
  border-top-color: #fff !important;
  border-bottom-color: #fff !important;
}

.auto-budget-dialog .dialog-body {
  min-height: 0;
  height: auto;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #f7f9fa;
}

.auto-budget-account-summary {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 210px;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.auto-budget-account-summary > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 7px 10px;
  border-right: 1px solid var(--line);
}

.auto-budget-account-summary > div:last-child {
  border-right: 0;
}

.auto-budget-account-summary span {
  color: #5b7078;
  font-size: var(--small-font-size);
}

.auto-budget-account-summary strong {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.auto-budget-example {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #c9dce1;
  background: #eaf3f5;
}

.auto-budget-example strong {
  color: #1c596c;
}

.auto-budget-example span {
  color: #243e48;
  font-weight: 600;
}

.auto-budget-example small {
  color: #60747c;
  text-align: right;
}

.auto-budget-table-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  border: 1px solid var(--line-strong);
  background: #fff;
  overflow: hidden;
}

.auto-budget-table-panel .auto-budget-grid {
  min-height: 0;
  height: 100%;
  border: 0;
  overflow: auto;
}

.auto-budget-grid th:last-child,
.auto-budget-grid td:last-child {
  width: 96px;
}

.auto-budget-grid table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

.auto-budget-grid input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
}

.auto-budget-grid tbody tr.is-cursor-row td {
  background: #fff4cc;
}

.auto-budget-grid tbody tr.is-cursor-row input {
  background: #fff4cc;
  outline: 2px solid #d9a928;
  outline-offset: -2px;
}

.auto-budget-dialog textarea {
  height: 380px;
  border: 1px solid var(--line-strong);
}

.auto-budget-total {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 12px;
  border-top: 1px solid var(--line-strong);
  background: #edf3f5;
}

.auto-budget-total strong {
  min-width: 130px;
  color: #153f4d;
  text-align: right;
}

.auto-budget-save-guide {
  padding: 7px 10px;
  background: #d8d8d8;
  text-align: center;
}

.auto-budget-dialog .dialog-actions {
  min-height: 50px;
}

.auto-budget-dialog .dialog-actions .check-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 4px;
}

.auto-budget-dialog .dialog-actions .check-label input {
  width: 14px;
  min-width: 14px;
  height: 14px;
  margin: 0;
}

.auto-budget-dialog .dialog-action-spacer {
  flex: 1 1 auto;
}

@media (max-width: 760px) {
  .auto-budget-account-summary {
    grid-template-columns: 1fr;
  }

  .auto-budget-account-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .auto-budget-account-summary > div:last-child {
    border-bottom: 0;
  }

  .auto-budget-example {
    grid-template-columns: 1fr;
  }

  .auto-budget-example small {
    text-align: left;
  }
}

.check-label {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.check-label input {
  width: 14px;
  min-width: 14px;
  height: 14px;
}

.create-budget-grid {
  display: block;
  min-height: 0;
  overflow: auto;
  padding: 0 12px 12px;
  background: #fff;
}

.create-budget-guide {
  min-height: 28px;
  margin: 0 -12px 30px;
  padding: 5px 10px;
  border-bottom: 1px solid #aeb9bd;
  background: #d6d6d6;
  color: #27373d;
  text-align: center;
}

.create-budget-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.create-budget-column {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.create-budget-group,
.create-budget-options {
  background: #fff;
}

.create-budget-group {
  border: 1px solid var(--line-strong);
}

.create-budget-group-title {
  min-height: 31px;
  padding: 5px 7px 5px 9px;
  background: #17768e;
  color: #fff;
}

.create-budget-group-title {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.create-budget-group-title strong {
  flex: 1 1 auto;
  font-weight: 700;
  text-align: center;
}

.create-budget-row-actions {
  position: absolute;
  right: 6px;
  top: 4px;
  display: inline-flex;
  gap: 3px;
}

.create-budget-group-title .icon-button,
.create-budget-row-action .icon-button {
  width: 22px;
  min-width: 22px;
  min-height: 22px;
  height: 22px;
  padding: 0;
  border-color: #96b7c1;
  background: #fff;
  color: #31535e;
  line-height: 1;
}

.create-budget-table-wrap {
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
}

.create-budget-group-direct .create-budget-table-wrap,
.create-budget-group-indirect .create-budget-table-wrap {
  height: auto;
  max-height: 257px;
  overflow-y: auto;
}

.create-budget-group-indirect .create-budget-table-wrap {
  max-height: 262px;
}

.create-budget-group-rate .create-budget-table-wrap,
.create-budget-group-grade .create-budget-table-wrap,
.create-budget-group-resident .create-budget-table-wrap,
.create-budget-group-basic .create-budget-table-wrap,
.create-budget-group-tax .create-budget-table-wrap,
.create-budget-group-bonus .create-budget-table-wrap,
.create-budget-group-employeeMeal .create-budget-table-wrap {
  height: auto;
  overflow: hidden;
}

.create-budget-grid table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}

.create-budget-grid th,
.create-budget-grid td {
  border: 1px solid var(--line);
  height: 29px;
  padding: 0;
  text-align: center;
}

.create-budget-grid th {
  height: 27px;
  padding: 3px 4px;
  background: #dbe7eb;
  color: #304b55;
  font-weight: 700;
  white-space: nowrap;
}

.create-budget-grid input {
  width: 100%;
  min-width: 0;
  height: 28px;
  border: 0;
  border-radius: 0;
  padding: 3px 6px;
  background: #fff;
}

.create-budget-grid input[readonly] {
  background: #f3f3f3;
  color: #43565e;
}

.create-budget-grid tr.is-cursor-row td {
  background: #fff4cf;
}

.create-budget-grid tr.is-cursor-row input {
  background: #fff4cf;
}

.create-budget-grid input.create-budget-money-input,
.create-budget-grid input[data-create-col="2"],
.create-budget-grid input[data-create-col="3"],
.create-budget-grid input[data-create-col="4"] {
  text-align: right;
}

.create-budget-amount-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  align-items: center;
  height: 28px;
  background: #fff;
}

.create-budget-amount-unit span {
  color: #536a73;
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
}

.create-budget-options {
  display: grid;
  gap: 3px;
  margin-top: 68px;
}

.create-budget-options label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: center;
  min-height: 23px;
}

.create-budget-options label > span {
  display: flex;
  align-items: center;
  padding: 0 6px;
  background: transparent;
  color: #344d56;
}

.create-budget-options select {
  width: 100%;
  min-width: 0;
  margin: 0;
}

@media (max-width: 980px) {
  .create-budget-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .create-budget-group-direct .create-budget-table-wrap,
  .create-budget-group-indirect .create-budget-table-wrap {
    height: auto;
    max-height: 218px;
  }

  .create-budget-options {
    margin-top: 0;
  }
}

.divide-grid input,
.divide-grid select {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
}

.divide-grid td {
  padding: 0;
}

.accounting-report-toolbar .winform-filters {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.accounting-upload-page {
  gap: 10px;
  padding: 0 14px 14px;
}

.accounting-upload-command-panel {
  min-width: 0;
  border: 1px solid #bdcfd6;
  border-top: 3px solid #218294;
  background: #f8fbfc;
}

.accounting-upload-mode-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 7px 12px;
  border-bottom: 1px solid #c7d8de;
  background: #e8f2f4;
}

.accounting-upload-mode-row > strong {
  flex: 0 0 74px;
  color: #294b57;
}

.accounting-upload-mode {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.accounting-upload-mode button {
  min-width: 112px;
  min-height: 30px;
  padding: 0 13px;
  border: 1px solid #afc4cc;
  border-right: 0;
  background: #fff;
  color: #334f59;
  cursor: pointer;
}

.accounting-upload-mode button:last-child {
  border-right: 1px solid #afc4cc;
}

.accounting-upload-mode button.active {
  border-color: #1e7e8f;
  background: #1e7e8f;
  color: #fff;
  font-weight: 700;
}

.accounting-upload-fields {
  display: flex;
  align-items: end;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px 12px;
}

.accounting-upload-field {
  display: grid;
  flex: 0 0 auto;
  gap: 5px;
  min-width: 0;
  color: #455e67;
}

.accounting-upload-field > span {
  min-height: 17px;
  font-size: calc(var(--app-font-size) - 1px);
  font-weight: 700;
}

.accounting-upload-field input,
.accounting-upload-field select {
  width: 100%;
  min-width: 0;
  min-height: 32px;
}

.upload-year-field {
  width: 112px;
}

.upload-bank-field {
  flex: 1 1 280px;
  max-width: 390px;
}

.upload-bank-name-field {
  width: 170px;
}

.upload-partner-field {
  flex: 0 1 300px;
}

.upload-file-field {
  flex: 1 1 320px;
  max-width: 460px;
}

.upload-file-field input[type="file"] {
  padding: 3px 5px;
  background: #fff;
}

.accounting-upload-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.accounting-upload-actions button {
  min-height: 32px;
  white-space: nowrap;
}

.accounting-upload-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #c8d8dd;
  background: #f4f8f9;
  color: #526a73;
}

.accounting-upload-meta strong {
  color: #1d4652;
}

.accounting-upload-mapping-panel,
.accounting-upload-preview-panel {
  min-width: 0;
  border: 1px solid #bdcfd6;
  border-top: 3px solid #218294;
  background: #fff;
}

.accounting-upload-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 7px 11px;
  border-bottom: 1px solid #c7d8de;
  background: #e8f1f4;
  color: #536b74;
}

.accounting-upload-section-head strong {
  color: #224753;
  font-size: calc(var(--app-font-size) + 1px);
}

.accounting-upload-mapping {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 8px;
  padding: 10px 11px 12px;
  background: #fff;
}

.accounting-upload-mapping label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: calc(var(--app-font-size) - 1px);
}

.accounting-upload-mapping label > span {
  font-weight: 700;
}

.accounting-upload-mapping select {
  min-width: 0;
}

.accounting-upload-grid {
  min-height: 340px;
  height: calc(100vh - 420px);
  border: 0;
}

.accounting-upload-grid th {
  border-color: #bdcfd5;
  background: #dce9ed;
  color: #263f48;
  white-space: nowrap;
}

.legacy-info-box.accounting-upload-guide {
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}

.bank-transaction-grid th[data-bank-column="bankDate"],
.bank-transaction-grid td[data-bank-column="bankDate"] {
  width: 100px;
  min-width: 100px;
}

.bank-transaction-grid th[data-bank-column="dataType"],
.bank-transaction-grid td[data-bank-column="dataType"] {
  width: 64px;
  min-width: 64px;
}

.bank-transaction-grid th[data-bank-column="dataFrom"],
.bank-transaction-grid td[data-bank-column="dataFrom"] {
  width: 80px;
  min-width: 80px;
}

.bank-transaction-grid td[data-bank-column="bankDate"] .grid-cell-input,
.bank-transaction-grid td[data-bank-column="dataType"] .grid-cell-input,
.bank-transaction-grid td[data-bank-column="dataFrom"] .grid-cell-input {
  min-width: 0;
}

.bank-transaction-grid tr.bank-balance-reference-row > td,
.bank-transaction-grid tr.bank-balance-reference-row > td .grid-cell-input {
  background: #ffe4e4 !important;
  color: #8f1f1f;
  font-weight: 800;
}

.bank-transaction-grid tr.bank-balance-reference-row > td {
  border-top-color: #d64b4b;
  border-bottom-color: #d64b4b;
}

.bank-balance-mismatch-guide {
  margin: 8px 0;
  padding: 9px 12px;
  border: 1px solid #d64b4b;
  background: #fff0f0;
  color: #7f1d1d;
  font-size: var(--body-font-size);
}

.bank-balance-mismatch-guide strong {
  margin-left: 6px;
  color: #b42318;
}

@media (max-width: 1250px) {
  .accounting-upload-fields {
    flex-wrap: wrap;
  }

  .accounting-upload-actions {
    margin-left: 0;
  }

  .accounting-upload-mapping {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
}

@media (max-width: 760px) {
  .accounting-upload-mode-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .accounting-upload-mode {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .accounting-upload-mode button {
    min-width: 0;
  }

  .accounting-upload-fields,
  .accounting-upload-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .accounting-upload-field,
  .upload-year-field,
  .upload-bank-name-field,
  .upload-bank-field,
  .upload-partner-field,
  .upload-file-field {
    width: 100%;
    max-width: none;
  }

  .accounting-upload-mapping {
    grid-template-columns: 1fr;
  }
}

.accounting-report-grid table {
  min-width: 100%;
}

.accounting-report-grid th {
  background: #edf3f5;
  white-space: nowrap;
}

.accounting-report-grid td {
  white-space: nowrap;
}

.ledger-report-page .accounting-report-grid table {
  width: 100%;
  min-width: 1120px;
  table-layout: fixed;
}

.ledger-report-page .accounting-report-grid [data-report-column="memo"] {
  width: 16%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ledger-report-page .accounting-report-grid [data-report-column="ltext"],
.ledger-report-page .accounting-report-grid [data-report-column="mtext"] {
  width: 14%;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.ledger-report-page .accounting-report-grid [data-report-column="stext"] {
  width: 18%;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.ledger-report-page .accounting-report-grid [data-report-column="date"] {
  width: 10%;
}

.ledger-report-page .accounting-report-grid [data-report-column="income"],
.ledger-report-page .accounting-report-grid [data-report-column="output"],
.ledger-report-page .accounting-report-grid [data-report-column="remain"] {
  width: 9.33%;
  min-width: 96px;
}

.ssis-login-page .winform-toolbar {
  justify-content: flex-end;
}

.trial-balance-report-page .accounting-report-grid table {
  width: 100%;
  min-width: 1180px;
  table-layout: fixed;
}

.trial-balance-report-page .accounting-report-grid th:nth-child(1),
.trial-balance-report-page .accounting-report-grid td:nth-child(1) {
  width: 54px;
}

.trial-balance-report-page .accounting-report-grid th:nth-child(2),
.trial-balance-report-page .accounting-report-grid td:nth-child(2) {
  width: 72px;
}

.trial-balance-report-page .accounting-report-grid th:nth-child(3),
.trial-balance-report-page .accounting-report-grid td:nth-child(3),
.trial-balance-report-page .accounting-report-grid th:nth-child(4),
.trial-balance-report-page .accounting-report-grid td:nth-child(4) {
  width: 140px;
}

.trial-balance-report-page .accounting-report-grid th:nth-child(5),
.trial-balance-report-page .accounting-report-grid td:nth-child(5) {
  width: 170px;
}

.trial-balance-report-page .accounting-report-grid th:nth-child(6),
.trial-balance-report-page .accounting-report-grid td:nth-child(6) {
  width: 116px;
}

.trial-balance-report-page .accounting-report-grid th:nth-child(7),
.trial-balance-report-page .accounting-report-grid td:nth-child(7) {
  width: 190px;
}

.trial-balance-report-page .accounting-report-grid th:nth-child(8),
.trial-balance-report-page .accounting-report-grid td:nth-child(8),
.trial-balance-report-page .accounting-report-grid th:nth-child(9),
.trial-balance-report-page .accounting-report-grid td:nth-child(9),
.trial-balance-report-page .accounting-report-grid th:nth-child(10),
.trial-balance-report-page .accounting-report-grid td:nth-child(10) {
  width: 150px;
}

.income-expense-statement-surface {
  min-width: 0;
  border: 1px solid #bdcfd6;
  border-top: 3px solid #218294;
  background: #fff;
}

.income-expense-statement-grid {
  min-height: 420px;
  height: calc(100vh - 320px);
  border: 0;
}

.income-expense-statement-grid table {
  width: 100%;
  min-width: 1120px;
  table-layout: fixed;
}

.income-expense-statement-grid thead th {
  border-color: #b9ccd3;
  background: #dce9ed;
  color: #263f48;
  text-align: center;
  white-space: nowrap;
}

.income-expense-statement-grid thead tr:first-child th:nth-child(1) { width: 70px; }
.income-expense-statement-grid thead tr:first-child th:nth-child(2),
.income-expense-statement-grid thead tr:first-child th:nth-child(3) { width: 150px; }
.income-expense-statement-grid thead tr:first-child th:nth-child(4) { width: 220px; }

.income-expense-statement-grid td,
.income-expense-statement-grid th {
  border-color: #c7d5da;
}

.income-expense-statement-grid .statement-group-cell {
  vertical-align: top;
  padding-top: 9px;
  background: #fbfcfc;
}

.income-expense-statement-grid .number-cell {
  width: 130px;
}

.income-expense-statement-grid .rate-cell {
  width: 72px;
}

.statement-subtotal-row th,
.statement-subtotal-row td {
  background: #f5f6f6;
  font-weight: 700;
}

.statement-major-total-row th,
.statement-major-total-row td {
  background: #edf2f3;
  font-weight: 700;
}

.statement-type-total-row th,
.statement-type-total-row td {
  border-top: 2px solid #879fa8;
  background: #dce7ea;
  font-weight: 700;
}

.income-expense-statement-note {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 4px 24px;
  padding: 12px 14px;
  border-top: 1px solid #cad9de;
  background: #fbf8ed;
  color: #786432;
  font-size: calc(var(--app-font-size) - 1px);
}

.budget-like-page {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.budget-like-page > .budget-sheet-toolbar {
  margin: 0;
  border-color: #bfd1d7;
  background: #e8f2f4;
}

.accounting-report-page .accounting-report-toolbar .winform-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
}

.accounting-report-page .accounting-report-toolbar label {
  min-height: 30px;
}

.accounting-report-page .accounting-report-toolbar input,
.accounting-report-page .accounting-report-toolbar select {
  min-height: 30px;
}

.opposite-report-note,
.recover-context-note {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #c4d6dc;
  border-left: 4px solid #228294;
  background: #f8fbfc;
  color: #536a72;
}

.opposite-report-note strong,
.recover-context-note strong {
  flex: 0 0 auto;
  color: #173b45;
  font-size: calc(var(--app-font-size) + 1px);
}

.opposite-report-list,
.recover-list-surface,
.accounting-missing-list {
  min-width: 0;
  border: 1px solid #b9ccd2;
  border-top: 3px solid #1e8192;
  background: #fff;
}

.accounting-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 7px 11px;
  border-bottom: 1px solid #c8d8dd;
  background: #edf4f6;
  color: #314c55;
}

.accounting-list-head strong {
  color: #183d47;
  font-size: calc(var(--app-font-size) + 1px);
}

.opposite-report-summary > div {
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
}

.opposite-report-summary > div span {
  color: #567078;
}

.opposite-report-summary > div b {
  margin-left: 4px;
  color: #173a44;
}

.opposite-report-list .accounting-report-grid,
.recover-list-surface .recover-grid,
.accounting-missing-list .accounting-missing-grid {
  border: 0;
}

.opposite-report-list .accounting-report-grid th,
.recover-list-surface .recover-grid th,
.accounting-missing-list .accounting-missing-grid th {
  border-color: #bdcfd5;
  background: #dce9ed;
  color: #263f48;
}

.recover-list-surface .recover-grid .check-col {
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  padding: 0 4px;
  text-align: center;
}

.recover-list-surface .recover-grid .check-col input[type="checkbox"] {
  width: 14px;
  min-width: 14px;
  max-width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  vertical-align: middle;
}

.recover-workspace .recover-toolbar {
  display: block;
}

.recover-workspace {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.recover-list-surface {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.recover-list-surface .recover-grid {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.recover-list-surface .recover-grid table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
}

.recover-list-surface .recover-grid th:nth-child(2),
.recover-list-surface .recover-grid td:nth-child(2) {
  width: 142px;
  min-width: 142px;
  max-width: 142px;
}

.recover-list-surface .recover-grid th:nth-child(3),
.recover-list-surface .recover-grid td:nth-child(3) {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}

.recover-list-surface .recover-grid th:nth-child(4),
.recover-list-surface .recover-grid td:nth-child(4) {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recover-list-surface .recover-grid th:nth-child(6),
.recover-list-surface .recover-grid td:nth-child(6) {
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recover-list-surface .recover-grid th:nth-child(7),
.recover-list-surface .recover-grid td:nth-child(7) {
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recover-list-surface .recover-grid th:nth-child(8),
.recover-list-surface .recover-grid td:nth-child(8),
.recover-list-surface .recover-grid th:nth-child(9),
.recover-list-surface .recover-grid td:nth-child(9) {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
}

.recover-list-surface .recover-grid th:nth-child(10),
.recover-list-surface .recover-grid td:nth-child(10) {
  width: 70px;
  min-width: 70px;
  max-width: 70px;
  text-align: center;
}

.accounting-note-table .accounting-unset-account {
  color: #c62828;
}

.account-transfer-report-grid table {
  width: 100%;
  min-width: 1040px;
  table-layout: fixed;
}

.account-transfer-report-grid [data-report-column="notedate"] {
  width: 112px;
}

.account-transfer-report-grid [data-report-column="no"] {
  width: 54px;
}

.account-transfer-report-grid [data-report-column="ltext"],
.account-transfer-report-grid [data-report-column="mtext"],
.account-transfer-report-grid [data-report-column="stext"] {
  width: 125px;
}

.account-transfer-report-grid [data-report-column="dcode"] {
  width: 86px;
}

.account-transfer-report-grid [data-report-column="dcodetext"],
.account-transfer-report-grid [data-report-column="account"],
.account-transfer-report-grid [data-report-column="account_name"] {
  width: 190px;
}

.account-transfer-report-grid [data-report-column="budget"] {
  width: 128px;
}

.account-transfer-report-grid [data-report-column="income"],
.account-transfer-report-grid [data-report-column="output"],
.account-transfer-report-grid [data-report-column="remain"] {
  width: 138px;
  min-width: 138px;
}

.recover-toolbar .accounting-task-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

.recover-toolbar .accounting-task-filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.recover-toolbar .accounting-task-search input {
  width: min(420px, 38vw);
}

.recover-title-action {
  white-space: nowrap;
}

.accounting-missing-page .accounting-missing-toolbar .winform-filters {
  flex-wrap: nowrap;
}

.accounting-missing-page #missingAccountKeywordInput {
  width: min(420px, 36vw);
}

.accounting-missing-grid .accounting-missing-account-cell {
  min-width: 190px;
  padding: 0;
}

.accounting-missing-grid .budget-account-name-button {
  width: 100%;
  min-height: 31px;
  justify-content: flex-start;
  border: 0;
  background: #fff8df;
  color: #145f70;
  text-align: left;
}

.accounting-missing-grid tr.edited td {
  background: #fff9e8;
}

.accounting-missing-grid tr.edited .budget-account-name-button {
  background: #fff0bd;
  font-weight: 700;
}

.missing-account-dialog .account-option-list {
  min-height: 300px;
  max-height: min(520px, calc(100vh - 240px));
}

@media (max-width: 900px) {
  .opposite-report-note,
  .recover-context-note,
  .opposite-report-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .opposite-report-summary > div {
    flex-wrap: wrap;
    gap: 8px 14px;
  }
}

.approval-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(560px, 1.25fr);
  gap: 12px;
  padding: 0 14px 14px;
}

.approval-list-pane,
.approval-editor-pane {
  min-width: 0;
}

.approval-list-grid,
.approval-sub-grid {
  background: #fff;
}

.approval-sub-grid {
  overflow-x: hidden;
}

.approval-list-grid {
  height: calc(100vh - 250px);
}

.approval-list-grid table {
  min-width: 620px;
  table-layout: fixed;
}

.approval-list-grid th:nth-child(1) { width: 30px; }
.approval-list-grid th:nth-child(2) { width: 72px; }
.approval-list-grid th:nth-child(3) { width: 94px; }
.approval-list-grid th:nth-child(4) { width: 68px; }
.approval-list-grid th:nth-child(5) { width: 90px; }
.approval-list-grid th:nth-child(7) { width: 96px; }

.approval-list-grid td:nth-child(2) .grid-cell-input,
.approval-list-grid td:nth-child(3) .grid-cell-input {
  min-width: 0;
}

.approval-new-state-pane {
  display: grid;
  min-height: calc(100vh - 250px);
  place-items: center;
  border: 1px solid #c5d6dc;
  border-top: 3px solid #218294;
  background: #f7fafb;
}

.approval-new-state {
  display: grid;
  place-items: center;
  min-width: 240px;
  min-height: 96px;
  padding: 18px 24px;
  color: #254b57;
  text-align: center;
}

.approval-new-state strong {
  font-size: calc(var(--app-font-size) + 2px);
}

.approval-editor-pane {
  border-left: 1px solid var(--line);
  padding-left: 12px;
}

.approval-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
}

.approval-form-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: calc(var(--app-font-size) - 1px);
}

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

.approval-sub-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  margin-top: 10px;
}

.approval-sub-toolbar span {
  margin-left: auto;
}

.approval-sub-grid table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.approval-sub-grid td {
  padding: 0;
}

.approval-sub-grid input,
.approval-sub-grid select {
  width: 100%;
  min-width: 0;
  height: 28px;
  border: 0;
  background: transparent;
}

.approval-item-grid table {
  table-layout: fixed;
}

.approval-item-grid th:nth-child(3),
.approval-item-grid td:nth-child(3),
.approval-item-grid th:nth-child(5),
.approval-item-grid td:nth-child(5) {
  width: 39px;
}

.approval-item-grid th:nth-child(4),
.approval-item-grid td:nth-child(4) {
  width: 100px;
}

.approval-item-grid th:nth-child(6),
.approval-item-grid td:nth-child(6),
.approval-item-grid th:nth-child(7),
.approval-item-grid td:nth-child(7) {
  width: 60px;
}

.approval-item-grid th:nth-child(8),
.approval-item-grid td:nth-child(8) {
  width: 85px;
}

.approval-item-grid th:nth-child(9),
.approval-item-grid td:nth-child(9) {
  width: 100px;
}

.approval-item-grid th:nth-child(10),
.approval-item-grid td:nth-child(10) {
  width: 28px;
}

.approval-detail-grid table {
  table-layout: fixed;
}

.approval-detail-grid .account-pick-cell {
  min-width: 0;
}

.approval-detail-grid th:nth-child(2),
.approval-detail-grid td:nth-child(2) {
  width: 150px;
}

.approval-detail-grid th:nth-child(3),
.approval-detail-grid td:nth-child(3) {
  width: 70px;
}

.approval-detail-grid th:nth-child(4),
.approval-detail-grid td:nth-child(4) {
  width: 95px;
}

.approval-detail-grid th:nth-child(5),
.approval-detail-grid td:nth-child(5) {
  width: 85px;
}

.approval-detail-grid th:nth-child(7),
.approval-detail-grid td:nth-child(7) {
  width: 110px;
}

.approval-detail-grid th:nth-child(8),
.approval-detail-grid td:nth-child(8) {
  width: 28px;
}

.approval-month-row,
.resolution-month-row {
  margin-top: 0;
}

.approval-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 0;
  padding-top: 8px;
  padding-bottom: 8px;
}

.approval-toolbar .winform-filters:empty {
  display: none;
}

.approval-toolbar .approval-month-row {
  grid-column: 1;
  grid-row: 1;
  flex-wrap: nowrap;
  margin: 0;
}

.approval-toolbar .winform-actions {
  grid-column: 2;
  grid-row: 1;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.approval-required-invalid {
  border: 1px solid #cf3f3f !important;
  background: #fff0f0 !important;
  outline: 2px solid rgba(207, 63, 63, 0.16);
}

button[data-delete-approval-detail],
button[data-delete-approval-item] {
  border: 0;
  background: transparent;
  color: #6a7478;
  box-shadow: none;
}

button[data-delete-approval-detail]:hover,
button[data-delete-approval-item]:hover {
  background: #f2f5f6;
  color: #b44343;
}

.accounting-upload-mode-normal .accounting-upload-grid th,
.accounting-upload-mode-normal .accounting-upload-grid td {
  text-align: left;
  vertical-align: middle;
}

.match-outside-action-col {
  width: 92px;
  min-width: 92px;
  text-align: center;
  white-space: nowrap;
}

.match-outside-voucher-dialog {
  width: min(1120px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  grid-template-rows: auto auto auto minmax(260px, 1fr) auto;
}

.match-outside-summary,
.match-outside-options {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

.match-outside-summary strong {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-outside-options {
  justify-content: space-between;
  background: #f7fafb;
}

.match-outside-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.match-outside-options input[type="checkbox"] {
  width: 14px;
  min-width: 14px;
  height: 14px;
  margin: 0;
}

.match-outside-target-grid {
  min-height: 260px;
  margin: 10px 12px 0;
}

.match-outside-target-grid table {
  min-width: 920px;
}

.match-outside-target-grid th:nth-child(1),
.match-outside-target-grid td:nth-child(1) {
  width: 52px;
  text-align: center;
}

.match-outside-target-grid th:nth-child(2),
.match-outside-target-grid td:nth-child(2) {
  width: 110px;
}

.match-outside-target-grid th:nth-child(6),
.match-outside-target-grid td:nth-child(6),
.match-outside-target-grid th:nth-child(8),
.match-outside-target-grid td:nth-child(8) {
  width: 100px;
}

.approval-list-grid .check-col input[type="checkbox"],
.approval-sub-grid .check-col input[type="checkbox"] {
  display: block;
  width: 14px;
  min-width: 14px;
  max-width: 14px;
  height: 14px;
  min-height: 14px;
  max-height: 14px;
  margin: 0 auto;
  padding: 0;
}

.approval-print-document {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.approval-print-paper {
  width: min(920px, 100%);
  min-height: 1120px;
  margin: 0 auto;
  padding: 42px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
  page-break-after: always;
}

.approval-print-paper header {
  text-align: center;
  margin-bottom: 22px;
}

.approval-print-paper h1 {
  margin: 0 0 8px;
  font-size: 26px;
}

.approval-print-paper h2 {
  margin: 22px 0 8px;
  font-size: 15px;
}

.approval-print-paper table {
  width: 100%;
  border-collapse: collapse;
}

.approval-print-paper th,
.approval-print-paper td {
  border: 1px solid var(--border);
  padding: 7px 8px;
  vertical-align: middle;
}

.approval-print-paper th {
  background: #f4f7f8;
  font-weight: 700;
}

.approval-print-meta {
  margin-bottom: 18px;
}

.approval-print-detail .number-cell {
  text-align: right;
}

.approval-print-paper footer {
  margin-top: 22px;
  text-align: right;
  color: var(--muted);
}

.resolution-manager-page {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 0 0 14px;
}

.resolution-toolbar {
  min-height: 0;
  padding-top: 8px;
  padding-bottom: 8px;
}

.resolution-toolbar .resolution-month-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.resolution-toolbar .resolution-month-filter > span {
  color: #314c56;
  font-weight: 700;
}

.resolution-toolbar .resolution-month-filter select {
  width: 110px;
  min-width: 110px;
}

.resolution-toolbar .winform-actions:empty {
  display: none;
}

.resolution-layout {
  display: grid;
  grid-template-columns: minmax(560px, .95fr) minmax(620px, 1.05fr);
  gap: 12px;
  min-width: 0;
}

.resolution-list-pane,
.resolution-editor-pane {
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.resolution-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 7px 10px;
  border-top: 2px solid var(--primary);
  border-bottom: 1px solid var(--line-strong);
  background: #dce8ec;
  color: #243f49;
}

.resolution-panel-head strong {
  font-size: var(--section-title-font-size);
}

.resolution-panel-head > span:not(.status-badge) {
  color: #52666e;
  font-size: var(--small-font-size);
  font-variant-numeric: tabular-nums;
}

.resolution-list-grid {
  height: calc(100vh - 286px);
  min-height: 420px;
  border: 0;
  background: #fff;
}

.resolution-list-grid table {
  min-width: 650px;
  table-layout: fixed;
}

.resolution-list-grid td,
.resolution-list-grid th {
  height: 34px;
  border-color: var(--line);
  white-space: nowrap;
}

.resolution-list-grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #edf3f5;
  border-color: var(--line-strong);
}

.resolution-list-grid th:nth-child(1) { width: 30px; }
.resolution-list-grid th:nth-child(2) { width: 150px; }
.resolution-list-grid th:nth-child(3) { width: 100px; }
.resolution-list-grid th:nth-child(4) { width: 56px; }
.resolution-list-grid th:nth-child(6) { width: 90px; }
.resolution-list-grid th:nth-child(7) { width: 96px; }

.resolution-list-grid tbody tr.selected td {
  background: #e8f5f7;
}

.resolution-list-grid tbody tr.selected td:first-child {
  box-shadow: inset 3px 0 0 var(--primary);
}

.resolution-list-grid tfoot th {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #dce8ec;
  color: #243f49;
}

.resolution-editor-body {
  height: calc(100vh - 286px);
  min-height: 420px;
  padding: 10px;
  overflow: auto;
  background: #f7f9fa;
}

.resolution-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line);
  background: #fff;
}

.resolution-form-grid label {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.resolution-form-grid label > span {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
  padding: 6px 9px;
  border-right: 1px solid var(--line);
  background: #edf3f5;
  color: #314c56;
  font-weight: 700;
  text-align: right;
}

.resolution-form-grid label > span em {
  color: #d33a3a;
  font-style: normal;
}

.resolution-form-grid label > input,
.resolution-form-grid label > select,
.resolution-form-grid label > textarea {
  min-width: 0;
  width: calc(100% - 12px);
  margin: 5px 6px;
  border-color: var(--line-strong);
  background: #fff;
}

.resolution-form-grid label > input[readonly] {
  color: #62747b;
  background: #f1f3f4;
}

.resolution-form-grid label.wide,
.resolution-form-grid label.full {
  grid-column: 1 / -1;
}

.resolution-form-grid label.full textarea {
  min-height: 150px;
  resize: vertical;
}

.resolution-empty-detail {
  display: grid;
  min-height: 100%;
  place-items: center;
  color: var(--muted);
  background: #f7f9fa;
}

.resolution-print-document {
  display: grid;
  gap: 18px;
  padding: 16px;
  background: #e8ecee;
}

.resolution-print-paper {
  box-sizing: border-box;
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 16mm 14mm 12mm;
  background: #fff;
  box-shadow: 0 2px 12px rgb(0 0 0 / 14%);
  break-after: page;
  font-family: "NanumBarunGothic", "Malgun Gothic", sans-serif;
  page: ssis-portrait;
}

.resolution-print-paper header h1 {
  margin: 8mm 0 6mm;
  text-align: center;
  font-size: 25pt;
  letter-spacing: 0;
}

.resolution-print-paper header > div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3mm;
  font-size: 9pt;
}

.resolution-print-paper table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.resolution-print-paper th,
.resolution-print-paper td {
  border: .4mm solid #333;
  padding: 1.6mm 2mm;
  font-size: 9pt;
}

.resolution-print-paper th {
  width: 14%;
  background: #f2f2f2;
  text-align: center;
}

.resolution-print-lines {
  margin-top: 4mm;
}

.resolution-print-lines th {
  width: auto;
}

.resolution-print-lines td {
  height: 8mm;
}

.resolution-print-lines th:first-child {
  width: 8%;
}

.resolution-print-lines th:nth-child(4) {
  width: 16%;
}

.resolution-print-bottom th {
  width: 14%;
}

.resolution-print-bottom tr:last-child td {
  height: 40mm;
  vertical-align: top;
}

.resolution-print-paper footer {
  display: flex;
  justify-content: space-between;
  margin-top: 8mm;
  color: #555;
  font-size: 8pt;
}

@media (max-width: 1280px) {
  .resolution-layout {
    grid-template-columns: 1fr;
  }

  .resolution-editor-pane {
    border-left: 0;
    padding-left: 0;
  }
}

@media print {
  .resolution-print-document {
    display: block;
    padding: 0;
    background: #fff;
  }

  .resolution-print-paper {
    margin: 0;
    box-shadow: none;
  }

  .dedicated-print-preview > .winform-toolbar {
    display: none !important;
  }
}

.info-panel {
  padding-bottom: 14px;
}

.legacy-info-box {
  margin: 0 14px;
  max-width: 720px;
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 18px 22px;
}

.legacy-info-box strong {
  display: block;
  margin-bottom: 14px;
  font-size: calc(var(--app-font-size) + 1px);
}

.legacy-info-box .inline-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}

.legacy-info-box .inline-field input,
.legacy-info-box .inline-field select {
  height: 30px;
  border: 1px solid var(--line-strong);
  padding: 0 8px;
  font: inherit;
}

.legacy-info-box ol {
  margin: 0;
  padding-left: 22px;
  line-height: 2;
}

.account-code-guide {
  width: 100%;
  max-width: none;
  margin: 10px 0 0;
  padding: 10px 12px;
}

.winform-grid tr.account-code-new-row > td {
  border-bottom-color: #c7d1d5;
  background: #eef1f2;
}

.winform-grid tr.account-code-new-row > td.account-code-editable-cell {
  border-bottom-color: #e1aaaa;
  background: #ffe4e4;
}

.winform-grid tr.account-code-new-row > td.account-code-locked-cell {
  background: #eef1f2;
}

.winform-grid tr.account-code-new-row .grid-cell-input {
  background: transparent;
}

.winform-grid tr.account-code-new-row .account-code-locked-cell .grid-cell-input {
  color: #7b898f;
  cursor: default;
}

.winform-grid tr.account-code-new-row .account-code-editable-cell .grid-cell-input:focus {
  background: #fff;
}

.winform-grid td.account-code-group-cell {
  vertical-align: middle;
  background: #f4f8f9;
  border-bottom-color: var(--line-strong);
}

.winform-grid td.account-code-group-cell.account-code-m-group {
  background: #f8fafb;
}

.winform-grid td.account-code-group-cell .grid-cell-input {
  min-height: 30px;
  background: transparent;
}

.bank-account-guide {
  width: 100%;
  max-width: none;
  margin: 10px 0 0;
  padding: 10px 12px;
}

.compact-form-row {
  margin: 0 14px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.compact-form-row .inline-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.compact-form-row input,
.compact-form-row select {
  height: 30px;
  border: 1px solid var(--line-strong);
  padding: 0 8px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.payment-check-page {
  padding-bottom: 14px;
}

.payment-check-box {
  width: min(505px, calc(100% - 28px));
  margin: 0 14px;
  display: grid;
  gap: 8px;
}

.payment-guide-line {
  min-height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: #fff;
  text-align: center;
}

.payment-fieldset {
  margin: 26px 0 0;
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 18px 24px;
  display: grid;
  gap: 8px;
}

.payment-fieldset label {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.payment-fieldset input {
  width: 100%;
}

.payment-fieldset .legacy-help {
  margin: 0 0 10px 86px;
  color: var(--muted);
}

.payment-actions {
  display: grid;
  grid-template-columns: 288px 160px;
  gap: 18px;
  margin-top: 62px;
}

.payment-actions button {
  height: 48px;
}

.cert-select-panel {
  min-height: 420px;
  padding: 14px;
  background: #f7fafb;
}

.certificate-upload-title-consent {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  margin: 0 5px 0 0;
  padding: 0 8px;
  border: 1px solid #c7d6db;
  background: #f7fafb;
  white-space: nowrap;
  color: var(--text);
}

.certificate-upload-title-consent input {
  flex: 0 0 14px;
  width: 14px;
  min-width: 14px;
  max-width: 14px;
  inline-size: 14px;
  min-inline-size: 14px;
  max-inline-size: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
}

.certificate-upload-title-consent span {
  margin: 0;
  padding: 0;
}

#saveButton.consent-required {
  border-color: #a9bbc1;
  background: #eef2f3;
  color: #6c7d83;
}

.certificate-state-section {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.certificate-state-head {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-strong);
  background: #eaf2f4;
}

.certificate-state-head > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.certificate-state-head span {
  color: #587078;
  font-size: var(--small-font-size);
  font-weight: 700;
}

.certificate-state-head strong {
  overflow-wrap: anywhere;
  color: #20383f;
  font-size: calc(var(--app-font-size) + 2px);
}

.certificate-state-head em {
  flex: 0 0 auto;
  min-width: 72px;
  padding: 6px 10px;
  border: 1px solid #72a5ad;
  background: #fff;
  color: #246873;
  font-style: normal;
  font-weight: 700;
  text-align: center;
}

.certificate-state-section.is-empty .certificate-state-head em,
.certificate-state-section.is-loading .certificate-state-head em {
  border-color: #b5c4c8;
  color: #6a7c82;
}

.certificate-empty-state {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}

.certificate-empty-state strong {
  color: var(--text);
  font-size: calc(var(--app-font-size) + 2px);
}

.certificate-registered-section {
  width: 100%;
}

.certificate-detail-title {
  min-height: 43px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.certificate-detail-title h2 {
  margin: 0;
  font-size: calc(var(--app-font-size) + 1px);
}

.certificate-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 14px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.certificate-info-grid > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  min-height: 42px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.certificate-info-grid span,
.certificate-info-grid strong {
  display: flex;
  align-items: center;
  padding: 8px 10px;
}

.certificate-info-grid span {
  justify-content: flex-end;
  background: var(--panel-soft);
  font-weight: 700;
}

.certificate-info-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 500;
}

.certificate-upload-status {
  margin: 0 14px 14px;
  padding: 9px 12px;
  border: 1px solid #b9d4d8;
  background: #eef7f7;
  color: var(--accent-strong);
  text-align: center;
}

@media (max-width: 900px) {
  .certificate-info-grid {
    grid-template-columns: 1fr;
  }

  .certificate-upload-title-consent {
    order: -1;
    width: 100%;
    justify-content: flex-end;
  }
}

.cert-select-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 12px;
  padding: 0 14px;
}

.cert-list-box,
.cert-detail-box {
  border: 1px solid var(--line-strong);
  background: #fff;
  min-height: 360px;
}

.cert-list-box {
  display: flex;
  flex-direction: column;
}

.cert-list-box button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
}

.cert-list-box button.selected {
  background: #e7f1f5;
  color: var(--accent-strong);
  font-weight: 700;
}

.cert-list-box small {
  color: var(--muted);
}

.cert-detail-box {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
}

.cert-detail-box label {
  display: grid;
  gap: 5px;
  color: var(--muted);
}

.legacy-form-box {
  margin: 0 14px;
  max-width: 760px;
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px 14px;
}

.legacy-form-box label {
  display: grid;
  gap: 5px;
  color: var(--muted);
}

.legacy-form-box.single {
  grid-template-columns: 1fr;
}

.legacy-form-box.wide {
  max-width: 1100px;
}

.add-user-form {
  margin: 12px;
}

.add-user-form .cared-required-mark {
  color: #d13b3b;
  font-weight: 800;
  margin-right: 3px;
}

.new-facility-registration-page {
  width: min(100%, 1060px);
  padding: 14px;
}

.new-facility-registration-page .new-facility-intro {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: min(100%, 980px);
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #bfd0d5;
  border-left: 4px solid #16818d;
  background: #f3f8f9;
}

.new-facility-registration-page .new-facility-intro strong {
  flex: 0 0 auto;
  color: #173c45;
  font-size: 14px;
}

.new-facility-registration-page .new-facility-intro span {
  color: #5e7178;
  font-size: 12px;
}

.new-facility-registration-page .add-user-form {
  width: min(100%, 980px);
  margin: 12px 0 0;
}

.new-facility-registration-page .facility-info-section {
  box-shadow: none;
}

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

.new-facility-registration-page .facility-form-field {
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 43px;
}

.new-facility-registration-page .facility-form-field > span {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
  padding: 8px 10px;
  white-space: nowrap;
}

.new-facility-registration-page .facility-form-field input,
.new-facility-registration-page .facility-form-field select,
.new-facility-registration-page .facility-form-field textarea {
  width: calc(100% - 14px);
  margin: 5px 7px;
}

.new-facility-registration-page .facility-form-field.wide input {
  width: calc(100% - 14px);
}

@media (max-width: 820px) {
  .new-facility-registration-page .new-facility-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .new-facility-registration-page .facility-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.legacy-form-box p {
  margin: 0;
  color: var(--muted);
}

.legacy-form-box .legacy-help {
  font-size: 12px;
  line-height: 1.35;
  color: #5f6b78;
}

.legacy-form-box .inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.start-upload-two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
}

.pdf-check-list {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 4px 10px;
}

.pdf-check-list .check-row {
  min-height: 24px;
  font-size: 13px;
}

.required-text {
  color: #c0392b;
  font-size: 12px;
  font-weight: 700;
}

.ssis-import-page {
  padding-bottom: 14px;
}

.ssis-import-settings textarea {
  width: 100%;
  min-height: 76px;
  border: 1px solid var(--line-strong);
  padding: 8px;
  font: inherit;
  resize: vertical;
}

.ssis-import-targets {
  max-width: none;
}

.ssis-import-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 16px;
}

.ssis-import-checks .check-row {
  display: grid;
  grid-template-columns: 18px minmax(70px, auto) 1fr;
  gap: 8px;
  align-items: center;
}

.ssis-import-checks small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ssis-import-log-grid td:nth-child(4) {
  min-width: 320px;
}

.employee-import-box {
  gap: 14px;
}

.employee-import-start {
  display: flex;
  justify-content: flex-end;
}

.employee-import-row {
  display: grid;
  grid-template-columns: 150px 150px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: #f8fafb;
  padding: 12px;
  min-width: 0;
  overflow: hidden;
}

.employee-import-instruction {
  grid-column: 1 / -1;
}

.employee-import-row em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}

.employee-import-file {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.employee-import-file b {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 700;
}

.employee-import-file .soft-button {
  flex: 0 0 auto;
}

.employee-import-row input[type="file"] {
  display: none;
}

@media (max-width: 900px) {
  .employee-import-row {
    grid-template-columns: 1fr;
  }

  .employee-import-row em {
    text-align: left;
  }

  .employee-import-file {
    grid-column: 1;
    justify-content: space-between;
  }
}

.minus-rate-page {
  display: grid;
  gap: 10px;
  width: min(720px, 100%);
  margin: 0;
}

.minus-rate-summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 14px;
  border: 1px solid #c7d8de;
  background: #edf4f6;
}

.minus-rate-summary > div {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.minus-rate-summary strong {
  flex: 0 0 auto;
  color: #244d5c;
  font-size: 14px;
}

.minus-rate-summary span {
  color: var(--muted);
  font-size: 12px;
}

.minus-rate-panel {
  margin: 0;
  padding: 0;
  border: 1px solid #c7d8de;
  background: #fff;
}

.minus-rate-table-head,
.minus-rate-field {
  display: grid;
  grid-template-columns: 190px minmax(220px, 1fr) 120px;
  align-items: stretch;
}

.minus-rate-table-head {
  min-height: 32px;
  border-bottom: 1px solid #b9ccd3;
  background: #dce9ed;
  color: #405861;
  font-size: 12px;
  font-weight: 700;
}

.minus-rate-table-head span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-right: 1px solid #c4d4da;
}

.minus-rate-table-head span:last-child {
  border-right: 0;
}

.minus-rate-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.minus-rate-field {
  min-height: 48px;
  border-bottom: 1px solid #d7e1e5;
  background: #fff;
}

.minus-rate-field:last-child {
  border-bottom: 0;
}

.minus-rate-field strong {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-right: 1px solid #d7e1e5;
  background: #edf4f6;
  color: var(--text);
  font-size: 13px;
}

.minus-rate-field small {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-right: 1px solid #d7e1e5;
  color: var(--muted);
  font-size: 11px;
}

.minus-rate-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
}

.minus-rate-field input {
  width: 76px;
  text-align: center;
}

.minus-rate-field em {
  font-style: normal;
  color: var(--muted);
}

.minus-rate-note {
  margin: 0;
  padding: 9px 12px;
  border-top: 1px solid #c7d8de;
  background: #f7fafb;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 720px) {
  .minus-rate-table-head,
  .minus-rate-field {
    grid-template-columns: 150px minmax(140px, 1fr) 100px;
  }
}

.pay-upload-panel {
  display: grid;
  gap: 12px;
  width: 100%;
}

.pay-upload-settings {
  width: min(1100px, 100%);
  border: 1px solid #c4d6dc;
  background: #f8fbfc;
}

.pay-upload-setting-row,
.pay-upload-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.pay-upload-file-row {
  border-top: 1px solid #d2e0e4;
  background: #fff;
}

.pay-upload-field,
.pay-upload-file-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #354b54;
  font-weight: 700;
}

.pay-upload-field > span,
.pay-upload-file-field > span {
  white-space: nowrap;
}

.pay-upload-field select {
  height: 30px;
}

.pay-upload-year {
  grid-template-columns: 62px 100px;
}

.pay-upload-month {
  grid-template-columns: 48px 92px;
}

.pay-upload-provider {
  grid-template-columns: 96px minmax(260px, 330px);
}

.pay-upload-file-field {
  flex: 1 1 640px;
  grid-template-columns: 62px minmax(280px, 1fr);
}

.pay-upload-file-field input[type="file"] {
  width: 100%;
  min-height: 32px;
  border: 1px solid #b9cbd2;
  background: #fff;
  color: #4b6069;
}

.pay-upload-file-field input[type="file"]::file-selector-button {
  height: 30px;
  margin-right: 10px;
  border: 0;
  border-right: 1px solid #b9cbd2;
  background: #e8f1f4;
  color: #294b58;
  padding: 0 14px;
  font: inherit;
  cursor: pointer;
}

#payUploadReadButton {
  flex: 0 0 84px;
}

.pay-upload-preview {
  min-width: 0;
  border: 1px solid #c4d6dc;
  background: #fff;
}

.pay-upload-preview-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 7px 12px;
  border-bottom: 1px solid #b9ccd3;
  background: #e4eef1;
}

.pay-upload-preview-head strong {
  color: #294b58;
}

.pay-upload-file-name {
  overflow: hidden;
  color: #60757e;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pay-upload-count {
  min-width: 54px;
  color: #294b58;
  font-weight: 700;
  text-align: right;
}

.pay-upload-preview .accounting-upload-grid {
  min-height: 360px;
  border: 0;
}

@media (max-width: 900px) {
  .pay-upload-setting-row {
    flex-wrap: wrap;
  }

  .pay-upload-provider {
    flex: 1 1 420px;
  }
}

.match-outside-guide {
  display: grid;
  gap: 6px;
}

.match-outside-guide strong {
  font-size: calc(var(--app-font-size) + 1px);
}

.match-outside-guide > span {
  font-weight: 700;
}

.segmented-readonly {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.segmented-readonly span,
.segmented-readonly button {
    min-width: 120px;
    padding: 7px 12px;
    text-align: center;
    border-right: 1px solid var(--line);
  }

  .segmented-readonly button {
    border-top: 0;
    border-bottom: 0;
    border-left: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
  }
  
.segmented-readonly span:last-child,
.segmented-readonly button:last-child {
    border-right: 0;
  }
  
.segmented-readonly .active {
    background: #1776a2;
    color: #fff;
    font-weight: 700;
  }

.legacy-step-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.legacy-step-list p {
  margin: 0;
}

.manager-guide-preview {
  min-height: 34px;
  background: #1f667c;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.font-install-panel,
.font-settings-panel {
  padding: 14px;
  background: #f7fafb;
}

.font-config-section {
  max-width: 760px;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.font-config-head {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-strong);
  background: #eaf2f4;
}

.font-config-head > div {
  display: grid;
  gap: 4px;
}

.font-config-head span {
  color: #587078;
  font-size: var(--small-font-size);
  font-weight: 700;
}

.font-config-head strong {
  color: #20383f;
  font-size: calc(var(--app-font-size) + 2px);
}

.font-config-head em,
.font-config-head output {
  min-width: 76px;
  padding: 6px 10px;
  border: 1px solid #86aeb5;
  background: #fff;
  color: #246873;
  font-style: normal;
  font-weight: 700;
  text-align: center;
}

.font-install-summary-actions {
  display: flex !important;
  grid-auto-flow: column;
  align-items: center;
  gap: 6px !important;
}

.font-install-summary-actions .soft-button {
  white-space: nowrap;
}

.font-install-list {
  padding: 0 14px;
}

.font-install-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 72px 94px;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
}

.font-install-row:last-of-type {
  border-bottom: 0;
}

.font-install-name {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.font-install-name span {
  color: var(--muted);
  font-size: var(--small-font-size);
  overflow-wrap: anywhere;
}

.font-install-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.font-install-badge {
  padding: 5px 7px;
  border: 1px solid #aabdc2;
  background: #f3f6f7;
  color: #667a80;
  text-align: center;
  font-size: var(--small-font-size);
  font-weight: 700;
}

.font-install-badge.is-installed {
  border-color: #7fb4a6;
  background: #edf7f3;
  color: #246b58;
}

.font-install-badge.is-required {
  border-color: #d5a7a3;
  background: #fff2f0;
  color: #a33a32;
}

.font-install-guide {
  margin: 0 14px 14px;
  padding: 10px 12px;
  border: 1px solid #ccd9dd;
  background: #f7fafb;
}

.font-install-guide p {
  margin: 0;
  color: #52676f;
  line-height: 1.6;
}

.font-size-control {
  display: grid;
  grid-template-columns: 100px minmax(220px, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
}

.font-size-slider-wrap {
  display: grid;
  gap: 2px;
  width: min(500px, 100%);
  justify-self: start;
}

.font-size-slider-wrap input {
  width: 100%;
  margin: 0;
}

.font-size-slider-wrap > div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: var(--small-font-size);
}

.font-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  padding: 10px 14px;
}

@media (max-width: 620px) {
  .font-install-row {
    grid-template-columns: minmax(0, 1fr) 72px;
  }

  .font-install-row a {
    grid-column: 1 / -1;
    margin-bottom: 10px;
  }

  .font-size-control {
    grid-template-columns: 1fr;
  }

  .font-size-control > strong {
    grid-column: 1 / -1;
  }

  .font-size-slider-wrap,
  .font-size-slider-wrap input {
    width: 100%;
  }

  .font-size-slider-wrap {
    justify-self: stretch;
  }
}

.new-user-settings-box {
  margin: 0 14px;
  max-width: 520px;
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 10px;
}

.new-user-settings-guide {
  margin: 4px 14px 12px;
  color: #455a62;
  line-height: 1.6;
}

.new-user-settings-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 130px;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}

.new-user-settings-row:last-child {
  border-bottom: 0;
}

.new-user-settings-row strong {
  padding: 0 10px;
}

.login-detail-grid th button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.login-detail-grid td {
  white-space: nowrap;
}

.partner-pay-layout {
  display: grid;
  grid-template-columns: 300px minmax(340px, 1fr);
  gap: 14px;
  padding: 0 14px 14px;
}

.partner-pay-summary,
.partner-pay-guide {
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 12px;
}

.partner-pay-summary > strong,
.partner-pay-guide > strong {
  display: block;
  margin-bottom: 10px;
}

.partner-pay-summary div {
  display: flex;
  justify-content: space-between;
  min-height: 28px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.partner-pay-summary div:last-child {
  border-bottom: 0;
}

.partner-pay-summary .total {
  margin-top: 8px;
  font-weight: 800;
}

.partner-pay-guide p {
  margin: 0 0 10px;
}

.partner-pay-guide label {
  display: inline-grid;
  gap: 4px;
  margin-right: 8px;
  color: var(--muted);
}

.partner-pay-guide input {
  width: 110px;
}

.partner-pay-grid {
  margin: 0 14px 14px;
}

.contract-paper {
  margin: 0 auto 18px;
  width: min(100%, 1180px);
  background: #fff;
  border: 1px solid var(--line-strong);
  padding: 22px;
}

.contract-consent-entry {
  min-height: min(620px, calc(100vh - 250px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.contract-consent-entry p {
  margin: 0;
  color: var(--muted);
}

.contract-consent-button {
  min-width: 180px;
  min-height: 44px;
  font-weight: 700;
}

.contract-paper h3 {
  margin: 0 0 18px;
  text-align: center;
  font-size: 22px;
}

.contract-document-section {
  margin-bottom: 24px;
}

.contract-section-heading {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid #2b7f89;
}

.contract-section-heading h3,
.contract-form-section > h3 {
  margin: 0;
  text-align: left;
  font-size: 15px;
  font-weight: 800;
}

.contract-pdf-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.contract-pdf-frame {
  display: block;
  width: 100%;
  height: 1050px;
  border: 1px solid var(--line);
  border-top: 0;
  background: #f4f6f7;
}

.contract-form-section {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 2px solid #2b7f89;
}

.contract-party-grid,
.contract-sign-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 12px;
}

.contract-party-grid .wide {
  grid-column: 1 / -1;
}

.contract-agreement-list {
  display: grid;
  gap: 0;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.contract-agreement-list label,
.contract-cms-agreements label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.contract-agreement-list input,
.contract-cms-agreements input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.contract-agreement-list span {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.contract-agreement-list small,
.contract-cms-notice {
  color: var(--muted);
}

.contract-cms-notice {
  margin-top: 8px;
}

.contract-cms-agreements {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.contract-toolbar-status {
  font-weight: 700;
}

.contract-toolbar-status.ok {
  color: #1c6b39;
}

.contract-toolbar-status.warn {
  color: #8a5a00;
}

@media (max-width: 900px) {
  .contract-paper {
    padding: 14px;
  }

  .contract-pdf-frame {
    height: 760px;
  }

  .contract-company,
  .contract-cms-grid,
  .contract-party-grid,
  .contract-sign-grid {
    grid-template-columns: 1fr;
  }

  .contract-company .wide,
  .contract-party-grid .wide {
    grid-column: auto;
  }
}

.contract-company,
.contract-cms-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.contract-company .wide {
  grid-column: span 3;
}

.contract-paper {
  width: 100%;
  max-width: none;
  padding: 20px;
  border: 0;
  background: #e9eef0;
}

.contract-print-page {
  box-sizing: border-box;
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto 18px;
  padding: 11mm 13mm;
  border: 1px solid #aeb9bd;
  background: #fff;
  color: #111;
  font-family: "Malgun Gothic", "맑은 고딕", sans-serif;
  font-size: 9pt;
  line-height: 1.42;
  box-shadow: 0 2px 8px rgba(32, 52, 60, 0.12);
}

.contract-print-page:last-child {
  margin-bottom: 0;
}

.contract-print-page h1 {
  margin: 0 0 8mm;
  text-align: center;
  font-size: 20pt;
  line-height: 1.2;
  letter-spacing: 0;
}

.contract-clause-section,
.cms-contract-section {
  margin: 0 0 4mm;
}

.contract-clause-section > h2,
.contract-clause-section > header,
.cms-contract-section > h2 {
  box-sizing: border-box;
  min-height: 7mm;
  margin: 0 0 2.5mm;
  padding: 1.2mm 2mm;
  border: 1px solid #777;
  background: #d9d9d9;
}

.contract-clause-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4mm;
}

.contract-clause-section h2,
.cms-contract-section h2 {
  margin: 0;
  text-align: left;
  font-size: 10pt;
  line-height: 1.35;
}

.contract-clause-section > p {
  margin: 0 2mm 2.2mm;
  text-align: justify;
}

.contract-section-consent {
  display: inline-flex !important;
  align-items: center;
  gap: 1.5mm !important;
  min-height: 0 !important;
  color: #111 !important;
  white-space: nowrap;
  font-weight: 700;
}

.contract-section-consent input {
  width: 3.5mm !important;
  min-width: 3.5mm !important;
  height: 3.5mm !important;
  margin: 0;
}

.contract-info-table,
.contract-entry-table,
.contract-signature-table {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.contract-print-page table {
  min-width: 0 !important;
  max-width: 100% !important;
}

.contract-print-page th,
.contract-print-page td {
  box-sizing: border-box;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.contract-info-table th,
.contract-info-table td,
.contract-entry-table th,
.contract-entry-table td {
  height: 8mm;
  padding: 1.2mm 2mm;
  border: 1px solid #777;
  vertical-align: middle;
}

.contract-info-table th,
.contract-entry-table th {
  width: 18%;
  background: #f1f1f1;
  text-align: center;
  font-weight: 700;
}

.contract-definition {
  margin-top: 2mm !important;
  text-align: center !important;
  font-size: 8.5pt;
}

.contract-circle-list,
.contract-number-list {
  margin: 0 2mm 2mm;
  padding-left: 6mm;
}

.contract-circle-list {
  list-style: none;
  counter-reset: contract-circle;
}

.contract-circle-list li {
  position: relative;
  margin-bottom: 1.5mm;
  counter-increment: contract-circle;
}

.contract-circle-list li::before {
  position: absolute;
  right: calc(100% + 1mm);
  content: counter(contract-circle) ".";
}

.contract-circle-list li:nth-child(1)::before { content: "①"; }
.contract-circle-list li:nth-child(2)::before { content: "②"; }
.contract-circle-list li:nth-child(3)::before { content: "③"; }
.contract-circle-list li:nth-child(4)::before { content: "④"; }
.contract-circle-list li:nth-child(5)::before { content: "⑤"; }
.contract-circle-list li:nth-child(6)::before { content: "⑥"; }
.contract-circle-list li:nth-child(7)::before { content: "⑦"; }

.contract-number-list li {
  margin-bottom: 1mm;
}

.contract-privacy-start,
.contract-continuation {
  font-size: 8.6pt;
  line-height: 1.4;
}

.contract-proof {
  margin-top: 5mm !important;
  text-align: center !important;
}

.contract-date-line {
  margin: 8mm 0 5mm;
  text-align: center;
  font-weight: 700;
}

.contract-signature-table th,
.contract-signature-table td {
  height: 10mm;
  padding: 1mm 2mm;
  border: 0;
  border-bottom: 1px solid #bbb;
  text-align: left;
}

.contract-signature-table th {
  width: 12%;
}

.contract-signature-table td {
  width: 38%;
}

.contract-signature-table td span {
  float: right;
}

.contract-page-three {
  font-size: 8.4pt;
  line-height: 1.33;
}

.contract-page-three h1 {
  margin-bottom: 6mm;
}

.contract-page-three .cms-contract-section > h2 {
  border: 0;
  border-bottom: 1px solid #555;
  background: transparent;
}

.contract-entry-table input,
.contract-entry-table select,
.contract-cms-signatures input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 6.5mm;
  padding: 0 1.5mm;
  border: 1px solid #aab4b8;
  background: #fff;
  color: #111;
  font: inherit;
}

.cms-note {
  margin: 2mm 1mm 0;
  font-size: 8pt;
}

.cms-terms {
  margin-top: 4mm;
}

.cms-term-block {
  position: relative;
  padding: 2mm 1.5mm 2.5mm;
  border-bottom: 1px solid #888;
}

.cms-term-block h3 {
  margin: 0 0 1.5mm;
  text-align: left;
  font-size: 8.7pt;
}

.cms-term-block p {
  margin: 0 0 0.8mm;
  text-align: justify;
}

.cms-term-block .contract-section-consent {
  width: 100%;
  justify-content: flex-end;
}

.cms-final-consent {
  margin: 3mm 2mm;
  text-align: center;
  font-weight: 700;
}

.contract-cms-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2mm 5mm;
  margin-top: 3mm;
}

.contract-cms-signatures label {
  display: grid;
  grid-template-columns: auto minmax(35mm, 1fr) auto;
  align-items: center;
  gap: 2mm;
  color: #111;
}

.contract-cms-signatures label:first-child {
  grid-column: 1 / -1;
  grid-template-columns: auto 45mm;
  justify-content: center;
}

@media (max-width: 1000px) {
  .contract-paper {
    padding: 8px;
    overflow-x: auto;
  }

  .contract-print-page {
    width: 100%;
    min-width: 720px;
    min-height: 0;
    padding: 18px;
  }
}

@page contract-page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  .user-contract-panel > .winform-toolbar,
  .user-contract-panel > .contract-ok {
    display: none !important;
  }

  .contract-paper {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    overflow: visible !important;
  }

  .contract-print-page {
    page: contract-page;
    width: 210mm !important;
    min-width: 210mm !important;
    max-width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    margin: 0 !important;
    padding: 11mm 13mm !important;
    border: 0 !important;
    box-shadow: none !important;
    break-after: page;
    page-break-after: always;
    overflow: hidden;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .contract-print-page table,
  .contract-print-page input,
  .contract-print-page select,
  .contract-print-page textarea {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .contract-print-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .contract-entry-table input,
  .contract-entry-table select,
  .contract-cms-signatures input {
    border-color: transparent;
    appearance: none;
  }
}

.my-info-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.my-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.my-info-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.my-info-panel h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.facility-settings-sheet {
  width: min(100%, 1040px);
  border: 0;
  background: transparent;
  padding: 0;
}

.facility-info-section + .facility-info-section {
  margin-top: 12px;
}

.facility-info-section {
  overflow: hidden;
  border: 1px solid #b9c8cd;
  background: #fff;
  box-shadow: 0 1px 2px rgb(32 60 70 / 7%);
}

.facility-info-section h3 {
  margin: 0;
  min-height: 36px;
  padding: 9px 12px 8px;
  border-top: 3px solid #1b8291;
  border-bottom: 1px solid #b9c8cd;
  background: #edf4f6;
  color: #203941;
  font-size: 13px;
  font-weight: 700;
}

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

.facility-form-field {
  min-width: 0;
  min-height: 40px;
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: stretch;
  border-bottom: 1px solid #c8d3d7;
  background: #fff;
  color: #202d33;
  font-size: 12px;
}

.facility-form-field:nth-child(odd):not(.wide) {
  border-right: 1px solid #c8d3d7;
}

.facility-form-grid .facility-form-field:nth-last-child(-n + 2):not(.wide),
.facility-form-grid .facility-form-field.wide:last-child {
  border-bottom: 0;
}

.facility-form-field.wide {
  grid-column: 1 / -1;
}

.facility-form-field > span {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 7px 10px;
  border-right: 1px solid #c8d3d7;
  background: #e8f0f2;
  color: #273b43;
  font-weight: 600;
  text-align: right;
}

.facility-form-field .facility-label-text {
  white-space: pre-line;
  line-height: 1.25;
  text-align: right;
}

.facility-form-field input,
.facility-form-field select,
.facility-form-field textarea {
  box-sizing: border-box;
  width: calc(100% - 12px);
  min-width: 0;
  height: 30px;
  min-height: 30px;
  margin: 4px 6px;
  padding: 5px 8px;
  border: 1px solid #afbec4;
  border-radius: 0;
  background: #fff;
  color: #202d33;
  font: inherit;
}

.facility-form-field textarea {
  min-height: 74px;
  margin: 5px 6px;
  padding: 7px 8px;
  resize: vertical;
}

.facility-form-field.facility-form-textarea {
  min-height: 84px;
}

.facility-form-field input:focus,
.facility-form-field select:focus,
.facility-form-field textarea:focus {
  border-color: #198493;
  outline: 1px solid #198493;
  outline-offset: -1px;
}

.facility-form-field input[readonly] {
  background: #f0f2f2;
  color: #66757b;
}

.facility-form-field select:disabled {
  background: #f0f2f2;
  color: #7a878c;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .facility-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .facility-form-field:nth-child(odd):not(.wide) {
    border-right: 0;
  }

  .facility-form-grid .facility-form-field:nth-last-child(2):not(.wide) {
    border-bottom: 1px solid #c8d3d7;
  }
}

.my-info-panel.side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.my-info-contract-panel {
  width: 100%;
}

.my-info-contract-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.contract-status {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 6px;
  font-weight: 700;
}

.contract-status.ok {
  color: #166534;
  background: #dcfce7;
}

.contract-status.warn {
  color: #b91c1c;
  background: #fee2e2;
}

.stamp-loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  gap: 10px;
  color: var(--muted);
}

.stamp-management-page {
  display: grid;
  gap: 14px;
}

.stamp-status-band {
  display: grid;
  grid-template-columns: 180px minmax(220px, 1fr);
  border: 1px solid var(--line-strong);
  background: #eaf3f5;
}

.password-security-page {
  display: grid;
  gap: 14px;
  max-width: 920px;
}

.password-security-summary {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(320px, 1fr);
  align-items: stretch;
  border: 1px solid var(--line-strong);
  background: #eaf3f5;
}

.password-security-summary > div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  min-height: 50px;
  padding: 8px 14px;
  border-right: 1px solid var(--line);
}

.password-security-summary span,
.password-security-summary p {
  color: #52676f;
}

.password-security-summary p {
  align-self: center;
  margin: 0;
  padding: 8px 14px;
}

.password-security-panel {
  border: 1px solid var(--line-strong);
  background: #fff;
}

.password-security-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: #edf4f6;
}

.password-security-heading h2 {
  margin: 0;
  font-size: calc(var(--app-font-size) + 1px);
}

.password-security-heading span {
  color: #52676f;
}

.password-security-fields {
  display: grid;
  padding: 18px 20px 8px;
}

.password-security-fields > label {
  display: grid;
  grid-template-columns: 140px minmax(240px, 430px);
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid #e3eaed;
  color: #344c55;
  font-weight: 700;
}

.password-input-wrap {
  position: relative;
  display: block;
}

.password-input-wrap input {
  width: 100%;
  padding-right: 58px;
}

.password-visibility-button {
  position: absolute;
  top: 50%;
  right: 7px;
  border: 0;
  background: transparent;
  color: #37606d;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-security-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 20px;
}

.password-security-rules span {
  padding: 5px 8px;
  border: 1px solid #d1dce0;
  background: #f5f7f8;
  color: #6b7d84;
}

.password-security-rules span.met {
  border-color: #78aeb2;
  background: #e7f4f3;
  color: #08727b;
  font-weight: 700;
}

.password-security-actions {
  display: flex;
  justify-content: flex-end;
  padding: 10px 20px 18px;
}

@media (max-width: 720px) {
  .password-security-summary,
  .password-security-fields > label {
    grid-template-columns: 1fr;
  }

  .password-security-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .password-security-fields > label {
    gap: 6px;
    padding: 10px 0;
  }
}

.stamp-status-band > div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  min-height: 46px;
  padding: 7px 12px;
  border-right: 1px solid var(--line);
}

.stamp-status-band > div:last-child {
  border-right: 0;
}

.stamp-status-label {
  color: #52676f;
}

.stamp-status-value.registered {
  color: #08727b;
}

.stamp-status-value.empty {
  color: #a33b3b;
}

.stamp-management-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 14px;
}

.stamp-preview-section,
.stamp-upload-section {
  border: 1px solid var(--line-strong);
  background: #fff;
}

.stamp-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #edf4f6;
}

.stamp-section-heading h2 {
  margin: 0;
  font-size: calc(var(--app-font-size) + 1px);
}

.stamp-section-heading span {
  color: var(--muted);
}

.stamp-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 290px;
  margin: 18px;
  border: 1px dashed var(--line-strong);
  background: #fff;
  color: var(--muted);
}

.stamp-preview img {
  max-width: calc(100% - 32px);
  max-height: 250px;
  object-fit: contain;
}

.stamp-preview-empty {
  display: grid;
  gap: 8px;
  text-align: center;
}

.stamp-preview-empty strong {
  color: #344c55;
}

.stamp-file-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 18px;
}

.stamp-file-control span {
  overflow: hidden;
  color: #52676f;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stamp-file-rules {
  margin: 0 18px;
  border-top: 1px solid var(--line);
}

.stamp-file-rules > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  min-height: 42px;
  border-bottom: 1px solid var(--line);
}

.stamp-file-rules dt,
.stamp-file-rules dd {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 8px 12px;
}

.stamp-file-rules dt {
  background: #edf4f6;
  font-weight: 700;
}

.stamp-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 18px;
}

@media (max-width: 900px) {
  .stamp-status-band,
  .stamp-management-layout {
    grid-template-columns: 1fr;
  }

  .stamp-status-band > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stamp-status-band > div:last-child {
    border-bottom: 0;
  }
}

.contract-stamp-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 150px;
  min-height: 92px;
  padding: 8px;
  background: #fff;
}

.contract-stamp-cell img {
  width: 112px;
  height: 76px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}

.pay-setting-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(1120px, 100%);
  margin: 0;
}

.pay-setting-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}

.pay-setting-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 46px;
  padding: 9px 14px;
  border: 1px solid #c7d8de;
  background: #edf4f6;
}

.pay-setting-summary strong {
  flex: 0 0 auto;
  color: #244d5c;
  font-size: 14px;
}

.pay-setting-summary span {
  color: var(--muted);
  font-size: 12px;
}

.pay-setting-group {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: start;
  overflow: hidden;
}

.pay-setting-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 70px;
  margin: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-strong);
  background: #e6f0f3;
}

.pay-setting-group header > div {
  min-width: 0;
}

.pay-setting-group header p {
  margin: 4px 0 0;
  color: #667b84;
  font-size: 11px;
}

.pay-setting-group-d_pay {
  border-top: 3px solid #27889b;
}

.pay-setting-group-i_pay {
  border-top: 3px solid #517da6;
}

.pay-setting-group-minus {
  border-top: 3px solid #8a6d55;
}

.pay-setting-group h3 {
  margin: 0;
  font-size: 15px;
}

.pay-setting-items {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 12px 14px 14px;
}

.pay-setting-items label {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.pay-setting-order {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.pay-setting-fixed {
  color: #72828a;
  font-size: 10px;
  text-align: center;
}

.pay-setting-count {
  display: grid;
  grid-template-columns: auto 76px;
  align-items: center;
  gap: 6px;
  color: #536a74;
  font-size: 11px;
  white-space: nowrap;
}

.pay-setting-count select {
  width: 76px;
  min-width: 76px;
  min-height: max(30px, calc(var(--app-font-size) + 14px));
  padding-right: 28px;
}

.pay-setting-items input {
  width: 100%;
  min-width: 0;
}

.pay-setting-items input[readonly] {
  background: #f3f4f6;
  color: var(--muted);
}

.batch-print-document {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.batch-print-summary-paper,
.batch-print-placeholder-paper,
.batch-print-data-paper,
.batch-print-receipt-paper {
  width: min(820px, 100%);
  min-height: 520px;
  margin: 0 auto;
  padding: 48px;
  border: 1px solid var(--border);
  background: #fff;
  break-after: page;
}

.batch-print-summary-paper h1,
.batch-print-placeholder-paper h2,
.batch-print-data-paper h2,
.batch-print-receipt-paper h2 {
  margin: 0 0 18px;
  text-align: center;
}

.batch-print-summary-paper p,
.batch-print-placeholder-paper p,
.batch-print-data-paper p,
.batch-print-receipt-paper p {
  text-align: center;
}

.batch-print-summary-paper table,
.batch-print-data-paper table {
  width: 100%;
  margin-top: 24px;
  border-collapse: collapse;
}

.batch-print-summary-paper th,
.batch-print-summary-paper td,
.batch-print-data-paper th,
.batch-print-data-paper td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  text-align: left;
}

.batch-print-datetime {
  margin-top: 24px;
  text-align: right;
  color: var(--muted);
  font-size: calc(var(--app-font-size) - 1px);
}

.batch-print-receipt-meta {
  margin-bottom: 14px;
  text-align: center;
  color: var(--muted);
  font-size: calc(var(--app-font-size) - 1px);
}

.batch-print-receipt-body {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 420px;
}

.batch-print-receipt-body img,
.batch-print-receipt-body iframe {
  width: 100%;
  max-width: 720px;
  height: 680px;
  border: 1px solid var(--border);
  object-fit: contain;
  background: #fff;
}

@media print {
  .no-print,
  .topbar,
  .sidebar,
  .tab-strip,
  .breadcrumb,
  .work-header {
    display: none !important;
  }

  .main-shell,
  .work-area {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }

    .batch-print-summary-paper,
    .batch-print-placeholder-paper,
    .batch-print-data-paper,
    .batch-print-receipt-paper,
    .approval-print-paper,
    .cover-paper {
      border: 0 !important;
      box-shadow: none !important;
      width: 100% !important;
    min-height: 0;
    page-break-after: always;
  }
}

.contract-paper label {
  display: grid;
  gap: 5px;
  color: var(--muted);
}

.contract-paper section > label {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.contract-paper section > label input {
  width: 14px;
  height: 14px;
  min-width: 14px;
}

.contract-ok {
  margin-top: 14px;
  padding: 10px;
  border: 1px solid #b7dac1;
  background: #edf8f0;
  color: #1b6a33;
  font-weight: 700;
}

.batch-users-status {
  display: flex;
  gap: 18px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
}

.batch-users-layout {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) 320px;
  gap: 14px;
  padding: 14px;
}

.batch-users-grid {
  height: calc(100vh - 280px);
  background: #fff;
}

.batch-users-grid input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-width: 14px;
}

.batch-users-grid th:first-child,
.batch-users-grid td:first-child {
  width: 38px;
  min-width: 38px;
  text-align: center;
}

.certificate-audit-status {
  display: inline;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #566267;
  font-weight: 400;
  text-align: inherit;
}

.certificate-audit-status.success {
  color: #176a38;
}

.certificate-audit-status.warning {
  color: #8a5700;
}

.certificate-audit-status.danger {
  color: #a32929;
}

.certificate-audit-status.neutral {
  color: #667075;
}

.certificate-audit-status.plain {
  color: inherit;
}

.certificate-audit-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  background: #f7fafb;
  color: var(--muted);
}

.batch-users-log {
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 12px;
  min-height: 220px;
}

.batch-users-log strong {
  display: block;
  margin-bottom: 8px;
}

.batch-users-log p {
  margin: 0 0 10px;
  color: var(--muted);
}

.batch-users-log ul {
  margin: 0;
  padding-left: 18px;
}

.person-charge-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.person-charge-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
}

.person-charge-grid {
  height: calc(100vh - 315px);
  margin: 14px;
  background: #fff;
}

.person-charge-grid .dirty-row {
  background: #fff8e6;
}

.person-charge-grid tr.selected {
  background: var(--focus);
}

.person-charge-grid .paid-memo-input {
  min-width: 220px;
}

.report-detail-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: calc(100vw - 40px);
  max-width: none;
  height: min(760px, calc(100vh - 48px));
  border-top: 3px solid #218294;
}

.report-detail-head {
  min-height: 54px;
  padding: 8px 14px;
  background: #edf4f6;
}

.report-detail-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.report-detail-head strong {
  color: #1d414c;
  font-size: calc(var(--app-font-size) + 2px);
}

.report-detail-head span {
  color: #647b83;
  font-size: calc(var(--app-font-size) - 1px);
}

.report-detail-body {
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  gap: 0;
  padding: 0;
}

.report-detail-toolbar {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto auto;
  align-items: end;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #c5d6dc;
  background: #f8fbfc;
}

.report-detail-search {
  display: grid;
  grid-template-columns: 54px minmax(220px, 420px);
  align-items: center;
  gap: 7px;
  color: #405a63;
  font-weight: 700;
}

.report-detail-search input {
  min-height: 32px;
}

.report-detail-search-actions,
.report-detail-work-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.report-detail-toolbar button {
  min-height: 32px;
}

.report-detail-grid {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

.report-detail-grid-host {
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.report-detail-grid > table {
  width: 100%;
  min-width: 1380px;
}

.report-detail-grid th {
  border-color: #bdcfd5;
  background: #dce9ed;
  color: #263f48;
  white-space: nowrap;
}

.report-detail-grid .check-col,
.report-detail-grid .check-col input[type="checkbox"] {
  width: 14px;
  min-width: 14px;
  height: 14px;
}

.report-detail-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 0;
  color: #526c75;
}

.report-detail-grid .dirty-row {
  background: #fff8e6;
}

@media (max-width: 820px) {
  .report-detail-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .report-detail-search {
    grid-template-columns: 48px minmax(0, 1fr);
  }
}

.accounting-report-grid tr[data-accounting-report-detail] {
  cursor: pointer;
}

.accounting-report-grid tr[data-accounting-report-detail]:hover {
  background: #eef6ff;
}

.batch-print-panel {
  width: min(980px, 100%);
  padding: 12px 14px 24px;
}

.batch-print-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.batch-print-criteria,
.batch-print-setting-section {
  border: 1px solid var(--line-strong);
  background: #fff;
}

.batch-print-section-heading {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-strong);
  background: #e7f0f3;
  color: #203e49;
}

.batch-print-section-heading strong {
  font-weight: 700;
}

.batch-print-selection-count {
  color: #58717b;
  font-size: calc(var(--app-font-size) - 1px);
}

.batch-print-criteria-fields {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 12px;
}

.batch-print-criteria-fields label {
  display: grid;
  grid-template-columns: auto 130px;
  align-items: center;
  gap: 10px;
  color: #294853;
  font-weight: 600;
}

.batch-print-criteria-fields select {
  width: 130px;
  min-width: 130px;
}

.batch-print-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 8px 12px 10px;
}

.batch-print-setting-section.is-options .batch-print-choice-grid {
  grid-template-columns: repeat(2, minmax(0, 220px));
}

.batch-print-check {
  min-width: 0;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid #e4ebee;
  color: #273f48;
  cursor: pointer;
}

.batch-print-check:hover {
  background: #f2f7f8;
}

.batch-print-check span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.batch-print-check input {
  width: 14px;
  height: 14px;
  min-width: 14px;
}

.batch-print-loading-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: rgb(29 47 55 / 32%);
}

.batch-print-loading-box {
  min-width: 310px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 24px;
  border: 1px solid #9eb2ba;
  background: #fff;
  box-shadow: 0 14px 36px rgb(22 39 46 / 22%);
  color: #294650;
  text-align: center;
}

.batch-print-loading-spinner {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 3px solid #c8d8de;
  border-top-color: #16889a;
  border-radius: 50%;
  animation: cared-loading-spin 0.75s linear infinite;
}

@media (max-width: 850px) {
  .batch-print-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .batch-print-criteria-fields {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 560px) {
  .batch-print-choice-grid,
  .batch-print-setting-section.is-options .batch-print-choice-grid {
    grid-template-columns: 1fr;
  }
}

.cover-print-preview {
  padding: 18px 14px 24px;
  overflow: auto;
}

.cover-paper {
  box-sizing: border-box;
  width: min(210mm, 100%);
  min-height: 0;
  aspect-ratio: 210 / 297;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(108px, 20%, 224px) clamp(34px, 9%, 72px) clamp(46px, 8%, 90px);
}

.cover-paper h1 {
  margin: clamp(42px, 9%, 96px) 0 0;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: 0;
}

.cover-yearmonth {
  font-size: 24px;
  font-weight: 700;
}

.cover-user {
  margin-top: auto;
  margin-bottom: clamp(18px, 8%, 76px);
  font-size: 22px;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .approval-layout {
    grid-template-columns: 1fr;
  }

  .approval-editor-pane {
    border-left: 0;
    padding-left: 0;
  }

  .batch-print-groups {
    grid-template-columns: 1fr;
  }

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

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

  .my-info-grid {
    grid-template-columns: 1fr;
  }

  .pay-setting-layout {
    grid-template-columns: 1fr;
  }
}
/* Target management follows the Hope-eum master/list work pattern. */
.cared-management-page {
  min-width: 980px;
  color: #26343b;
}

.cared-search-band {
  display: flex;
  align-items: end;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #c7d5da;
  background: #eaf2f4;
}

.cared-search-band label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
}

.cared-search-band input,
.cared-search-band select,
.cared-form-field input,
.cared-form-field select,
.cared-form-field textarea {
  min-width: 0;
  min-height: 32px;
  border: 1px solid #b9c8ce;
  background: #fff;
  padding: 6px 8px;
  color: #202d33;
}

.cared-search-band label {
  grid-template-columns: auto minmax(120px, 180px);
  align-items: center;
}

.cared-facility-type {
  margin-left: auto;
  padding-bottom: 7px;
  color: #52656d;
}

.cared-import-button {
  min-height: 32px;
  white-space: nowrap;
}

.cared-master-detail {
  display: grid;
  grid-template-columns: minmax(410px, 450px) minmax(720px, 1fr);
  min-height: 620px;
  margin-top: 12px;
  border: 1px solid #c7d1d5;
  background: #fff;
}

.cared-list-pane {
  min-width: 0;
  border-right: 1px solid #c7d1d5;
}

.cared-list-pane header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  border-bottom: 1px solid #d5dde0;
}

.cared-list-table {
  max-height: 680px;
  overflow: auto;
}

.cared-list-table table {
  width: 100%;
  min-width: 410px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}

.cared-list-table .cared-number-col {
  width: 44px;
}

.cared-list-table .cared-code-col {
  width: 150px;
}

.cared-list-table .cared-name-col {
  width: 76px;
}

.cared-list-table .cared-sex-col {
  width: 48px;
}

.cared-list-table .cared-birthday-col {
  width: 92px;
}

.cared-list-table th,
.cared-list-table td {
  height: 29px;
  padding: 4px 6px;
  border-right: 1px solid #d8e0e3;
  border-bottom: 1px solid #d8e0e3;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cared-list-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #dce7eb;
  color: #263b43;
  font-weight: 700;
}

.cared-list-table tbody tr {
  cursor: pointer;
}

.cared-list-table tbody tr:hover,
.cared-list-table tbody tr.selected {
  background: #fff5d6;
}

.cared-list-table .cared-loading-cell {
  height: 130px;
  color: #65767d;
  white-space: normal;
}

.cared-loading-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  border: 2px solid #bed0d6;
  border-top-color: #1f9db2;
  border-radius: 50%;
  vertical-align: -3px;
  animation: cared-loading-spin 0.75s linear infinite;
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  color: #65767d;
  font-weight: 600;
}

@keyframes cared-loading-spin {
  to { transform: rotate(360deg); }
}

.cared-detail-pane {
  min-width: 0;
}

.cared-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid #bfcbd0;
  background: #f5f7f8;
  color: #263b43;
}

.cared-profile-head strong {
  color: #157f94;
  font-size: 13px;
}

.cared-profile-head span {
  color: #66777e;
  font-size: 12px;
}

.cared-profile-head em {
  color: #e5483f;
  font-style: normal;
  font-weight: 800;
}

.cared-detail-tabs {
  display: flex;
  height: 44px;
  border-bottom: 1px solid #bfcbd0;
  background: #f5f7f8;
}

.cared-detail-tabs button {
  min-width: 126px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid #ccd5d8;
  border-radius: 0;
  background: transparent;
  color: #5a686e;
  font-weight: 600;
}

.cared-detail-tabs button.active {
  background: #fff;
  color: #157f94;
  box-shadow: inset 0 3px 0 #23a6ba;
}

.cared-detail-content {
  max-height: 680px;
  overflow: auto;
  padding: 10px 12px 14px;
}

.cared-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(210px, 1fr));
  gap: 0;
  border-top: 1px solid #c8d3d7;
  border-left: 1px solid #c8d3d7;
}

.cared-info-section + .cared-info-section {
  margin-top: 16px;
}

.cared-info-section h3 {
  margin: 0;
  padding: 7px 0 6px;
  border-bottom: 2px solid #9db6be;
  color: #263b43;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.cared-form-field {
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: stretch;
  border-right: 1px solid #c8d3d7;
  border-bottom: 1px solid #c8d3d7;
  background: #fff;
  font-size: 12px;
  font-weight: 400;
}

.cared-form-field > span {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 6px 8px;
  border-right: 1px solid #c8d3d7;
  background: #e7eff2;
  color: #273b43;
  font-weight: 600;
  text-align: right;
}

.cared-required-mark {
  margin-right: 4px;
  color: #e5483f;
  font-style: normal;
  font-weight: 800;
}

.cared-form-field input,
.cared-form-field select,
.cared-form-field textarea,
.cared-form-field output {
  width: calc(100% - 8px);
  min-width: 0;
  box-sizing: border-box;
  margin: 3px 4px;
  border: 1px solid #b8c5ca;
  border-radius: 0;
  background: #fff;
  color: #202d33;
  font: inherit;
}

.cared-form-field input,
.cared-form-field select,
.cared-form-field output {
  height: 27px;
  min-height: 27px;
  padding: 4px 7px;
}

.cared-form-field output {
  display: flex;
  align-items: center;
  background: #f6f7f7;
}

.cared-form-field.wide {
  grid-column: 1 / -1;
}

.cared-form-field textarea {
  min-height: 96px;
  padding: 7px;
  resize: vertical;
}

.cared-form-field input[readonly] {
  background: #f0f2f2;
  color: #66757b;
}

.cared-address-table {
  border-top: 1px solid #c8d3d7;
  border-left: 1px solid #c8d3d7;
}

.cared-address-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  min-height: 34px;
  border-right: 1px solid #c8d3d7;
  border-bottom: 1px solid #c8d3d7;
}

.cared-address-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 6px 8px;
  border-right: 1px solid #c8d3d7;
  background: #e7eff2;
  color: #273b43;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

.cared-address-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 3px 4px;
}

.cared-address-controls input:not([type="checkbox"]) {
  box-sizing: border-box;
  height: 27px;
  min-width: 0;
  border: 1px solid #b8c5ca;
  border-radius: 0;
  background: #fff;
  padding: 4px 7px;
  color: #202d33;
  font: inherit;
}

.cared-address-controls .cared-postal-input {
  flex: 0 0 104px;
}

.cared-address-controls .cared-address-input {
  flex: 1 1 auto;
}

.cared-address-same {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  min-width: 0;
  margin: 0 2px 0 0;
  padding: 0;
  color: #34474f;
  font-size: 12px;
  white-space: nowrap;
}

.cared-address-same input {
  flex: 0 0 14px;
  width: 14px;
  min-width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
}

.cared-related-table {
  height: 260px;
  overflow: auto;
  border: 1px solid #c8d3d7;
  border-top: 0;
}

.cared-related-table table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}

.cared-related-table th,
.cared-related-table td {
  height: 30px;
  padding: 5px 7px;
  border-right: 1px solid #c8d3d7;
  border-bottom: 1px solid #d7e0e3;
  text-align: center;
}

.cared-related-table th {
  position: sticky;
  top: 0;
  background: #d8e4e8;
  color: #263b43;
  font-weight: 700;
}

.cared-related-table tbody tr.selected {
  background: #fff5d6;
}

.cared-related-table .empty-cell {
  height: 220px;
  color: #7b898e;
}

.cared-empty-detail {
  display: grid;
  min-height: 420px;
  place-items: center;
  color: #708087;
}

@media (max-width: 1200px) {
  .cared-master-detail {
    grid-template-columns: 410px minmax(660px, 1fr);
  }

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

/* Donation workbench: Hope-eum density with the reporting fields kept explicit. */
.donation-management-page {
  min-width: 1060px;
}

.donation-search-band {
  align-items: center;
  min-height: 54px;
  padding: 8px 12px;
  gap: 12px;
}

.donation-search-band label {
  grid-template-columns: auto auto;
  gap: 7px;
  align-items: center;
}

.donation-search-band label > span:first-child {
  white-space: nowrap;
}

.donation-search-band input,
.donation-search-band select {
  height: 29px;
  min-height: 29px;
}

.donation-date-range {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.donation-date-range input {
  width: 138px;
}

.donation-date-range i {
  color: #6b7b81;
  font-style: normal;
}

.donation-keyword-filter input {
  width: 210px;
}

.donation-api-scope {
  margin-left: auto;
  color: #61747b;
  font-size: 12px;
  white-space: nowrap;
}

.donation-master-detail {
  grid-template-columns: minmax(390px, 430px) minmax(670px, 1fr);
  min-height: 650px;
}

.donation-list-table {
  max-height: 708px;
}

.donation-list-table table {
  min-width: 390px;
}

.donation-list-table th:nth-child(1),
.donation-list-table td:nth-child(1) {
  width: 30px;
}

.donation-list-table th:nth-child(2),
.donation-list-table td:nth-child(2) {
  width: 46px;
}

.donation-list-table .donation-check-col {
  padding: 0;
}

.donation-list-table input[type="checkbox"] {
  box-sizing: border-box;
  width: 14px;
  min-width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
  vertical-align: middle;
}

.donation-list-table .number-cell {
  padding-right: 9px;
  text-align: right;
}

.donation-list-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-height: 36px;
  padding: 6px 10px;
  border-top: 1px solid #bfcbd0;
  background: #e1e9ec;
  color: #4c6068;
  font-size: 12px;
}

.donation-list-summary strong {
  color: #203a43;
}

.donation-detail-content {
  max-height: 708px;
  padding: 10px 12px 18px;
}

.donation-info-section h3 {
  padding-left: 3px;
  border-bottom-color: #77aab3;
  color: #27434a;
}

.donation-form-grid {
  grid-template-columns: repeat(3, minmax(190px, 1fr));
}

.donation-form-field {
  grid-template-columns: 112px minmax(0, 1fr);
}

.donation-form-field > span {
  white-space: normal;
  word-break: keep-all;
}

.donation-form-field .number-cell {
  text-align: right;
}

.donation-picker-control {
  width: calc(100% - 8px);
  height: 27px;
  margin: 3px 4px;
  padding: 4px 28px 4px 7px;
  border: 1px solid #b8c5ca;
  border-radius: 0;
  background: #fff;
  color: #202d33;
  text-align: left;
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donation-picker-control::after {
  content: "⌕";
  position: absolute;
  right: 8px;
  top: 3px;
  color: #2b7f8e;
  font-size: 16px;
}

.donation-linked-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding-right: 4px;
}

.donation-linked-control input {
  width: calc(100% - 4px);
  margin-right: 0;
}

.donation-linked-control button {
  height: 27px;
  min-width: 108px;
  padding: 3px 8px;
  white-space: nowrap;
}

.donation-source-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  border-top: 1px solid #c8d3d7;
  border-left: 1px solid #c8d3d7;
}

.donation-source-summary span {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  min-height: 34px;
  align-items: stretch;
  border-right: 1px solid #c8d3d7;
  border-bottom: 1px solid #c8d3d7;
}

.donation-source-summary b,
.donation-source-summary i,
.donation-source-summary span:not(:has(b)) {
  font-size: 12px;
}

.donation-source-summary b,
.donation-source-summary i {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 100%;
  box-sizing: border-box;
  font-style: normal;
}

.donation-source-summary b {
  justify-content: flex-end;
  padding: 6px 8px;
  border-right: 1px solid #c8d3d7;
  background: #e7eff2;
  color: #273b43;
}

.donation-source-summary i {
  padding: 6px 8px;
  background: #fff;
  color: #273b43;
}

.donation-source-summary.empty {
  display: block;
  padding: 14px;
  border: 1px solid #c8d3d7;
  background: #f7f9fa;
  color: #65767d;
  font-size: 12px;
}

.donation-goods-picker-dialog {
  width: min(760px, calc(100vw - 40px));
  height: 580px;
  max-height: calc(100vh - 40px);
}

.donation-goods-picker-dialog .dialog-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.donation-goods-picker-dialog .dialog-filter-row .dialog-search {
  box-sizing: border-box;
  width: 100%;
}

.donation-goods-option-list {
  min-height: 0;
  overflow: auto;
  border: 1px solid #c4d0d5;
  background: #fff;
}

.donation-goods-option-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: 94px minmax(130px, 1fr) minmax(220px, 1.4fr);
  align-items: center;
  min-height: 32px;
  border-bottom: 1px solid #aebdc3;
  background: #dce7eb;
  color: #263b43;
  font-size: 12px;
  font-weight: 700;
}

.donation-goods-option-header span {
  height: 32px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-right: 1px solid #c5d2d7;
}

.donation-goods-option-list button {
  display: grid;
  grid-template-columns: 94px minmax(130px, 1fr) minmax(220px, 1.4fr);
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 6px 10px;
  border: 0;
  border-bottom: 1px solid #d8e0e3;
  border-radius: 0;
  background: #fff;
  color: #26343b;
  text-align: left;
}

.donation-goods-option-list button:hover,
.donation-goods-option-list button:focus-visible {
  background: #fff5d6;
}

.donation-goods-option-list button strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donation-goods-option-list button em {
  color: #60737a;
  font-style: normal;
}

@media (max-width: 1320px) {
  .donation-form-grid {
    grid-template-columns: repeat(2, minmax(230px, 1fr));
  }

  .donation-source-summary {
    grid-template-columns: repeat(2, minmax(230px, 1fr));
  }
}

/* Dedicated A4 ledger forms based on the Hope-eum print samples. */
.ssis-print-document {
  background: #dfe4e6;
  padding: 20px;
}

.ssis-print-form {
  position: relative;
  box-sizing: border-box;
  margin: 0 auto 20px;
  padding: 14mm 7mm 13mm;
  background: #fff;
  color: #000;
  font-family: "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-size: 10pt;
  letter-spacing: 0;
  box-shadow: 0 1px 5px rgb(0 0 0 / 18%);
  break-after: page;
}

.ssis-print-form.portrait {
  width: 210mm;
  min-height: 297mm;
  page: ssis-portrait;
}

.ssis-print-form.landscape {
  width: 297mm;
  min-height: 210mm;
  page: ssis-landscape;
}

.ssis-print-form h1 {
  margin: 0;
  color: #000;
  font-size: 25pt;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.ssis-form-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  color: #000;
  font-size: 9pt;
}

.ssis-form-table th,
.ssis-form-table td {
  box-sizing: border-box;
  height: 7mm;
  padding: 1.2mm 1.5mm;
  border: 0.3mm solid #000;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

.ssis-form-table thead th,
.ssis-form-table .grand-total th,
.ssis-form-table .grand-total td {
  background: #d2d2d2;
  font-weight: 700;
  text-align: center;
}

.ssis-form-table .subtotal th,
.ssis-form-table .subtotal td {
  background: #eee;
  font-weight: 700;
}

.ssis-form-table .number {
  text-align: right;
  white-space: nowrap;
}

.ssis-form-table .center {
  text-align: center;
}

.ssis-form-footer {
  position: absolute;
  right: 7mm;
  bottom: 5mm;
  left: 7mm;
  display: grid;
  grid-template-columns: 1fr 1.5fr auto 1.5fr;
  align-items: end;
  gap: 6mm;
  color: #145183;
  font-size: 8pt;
}

.ssis-form-footer b {
  color: #000;
  font-weight: 400;
}

.ssis-form-footer span:last-child {
  text-align: right;
}

.ssis-ledger-header h1 {
  margin-bottom: 7mm;
}

.ssis-print-conditions {
  display: grid;
  gap: 1mm;
  margin-bottom: 3mm;
  font-size: 9pt;
}

.cash-book th:nth-child(1) { width: 12%; }
.cash-book th:nth-child(2) { width: 24%; }
.cash-book th:nth-child(3) { width: 26%; }
.cash-book th:nth-child(n+4) { width: 12.66%; }
.cash-book td { height: 7.7mm; }

.ssis-resolution-title {
  margin: 4mm 0 9mm !important;
  text-decoration: underline;
  text-underline-offset: 2mm;
}

.ssis-resolution-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  margin-bottom: 0;
  font-size: 9pt;
}

.ssis-resolution-top b {
  padding: 2.5mm 8mm;
  border: 0.3mm solid #000;
  border-bottom: 0;
}

.ssis-resolution-top b:last-child {
  border: 0;
  text-align: right;
}

.resolution-meta th { width: 12%; text-align: center; }
.resolution-meta td { width: 21.33%; text-align: center; }
.resolution-lines th:nth-child(1) { width: 7%; }
.resolution-lines th:nth-child(2) { width: 17%; }
.resolution-lines th:nth-child(3) { width: 27%; }
.resolution-lines th:nth-child(4) { width: 14%; }
.resolution-lines th:nth-child(5) { width: 18%; }
.resolution-lines th:nth-child(6) { width: 17%; }
.resolution-lines td { height: 8mm; }

.resolution-bottom th {
  width: 12%;
  text-align: center;
}

.resolution-bottom tr:first-child th,
.resolution-bottom tr:first-child td { height: 16mm; }
.resolution-bottom tr:last-child th,
.resolution-bottom tr:last-child td { height: 68mm; }
.resolution-bottom td { text-align: center; }

.approval-lines td { height: 8mm; }
.approval-reason th { width: 16%; }
.approval-reason td { height: 45mm; vertical-align: top; }
.approval-request { margin: 0; padding: 2mm 0; font-size: 9pt; line-height: 1.7; }
.approval-items th:nth-child(1) { width: 28%; }
.approval-items th:nth-child(2) { width: 11%; }
.approval-items th:nth-child(3) { width: 9%; }
.approval-items th:nth-child(4) { width: 9%; }
.approval-items th:nth-child(5) { width: 14%; }
.approval-items th:nth-child(6) { width: 14%; }
.approval-items th:nth-child(7) { width: 15%; }
.approval-items td { height: 8mm; }

.ssis-print-form.approval-page {
  padding-top: 6mm;
  padding-bottom: 11mm;
  font-size: 8.5pt;
}

.approval-page .ssis-resolution-title {
  margin: 0 0 5mm !important;
  font-size: 22pt;
}

.approval-page .ssis-form-table {
  font-size: 8pt;
}

.approval-page .resolution-meta th,
.approval-page .resolution-meta td,
.approval-page .approval-lines td,
.approval-page .approval-items td {
  height: 6mm;
  padding-top: 0.7mm;
  padding-bottom: 0.7mm;
}

.approval-page .approval-reason td {
  height: 27mm;
}

.approval-page .approval-request {
  padding: 1mm 0;
  font-size: 8pt;
  line-height: 1.45;
}

.ledger-one th:nth-child(1) { width: 28%; }
.ledger-one th:nth-child(2) { width: 13%; }
.ledger-one th:nth-child(n+3) { width: 19.66%; }
.ledger-one td { height: 8mm; }
.ledger-two th:nth-child(-n+3) { width: 10%; }
.ledger-two th:nth-child(4) { width: 12%; }
.ledger-two th:nth-child(5) { width: 24%; }
.ledger-two th:nth-child(n+6) { width: 11.33%; }
.ledger-two td { height: 7.5mm; }

.budget-print-header h1 { margin: 1mm 0 8mm; }
.budget-print-header > div {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  margin-bottom: 2mm;
  font-size: 9pt;
}
.budget-print-header > div b:nth-child(2) { text-align: center; }
.budget-print-header > div b:last-child { text-align: right; }
.budget-print-table col.budget-l { width: 11%; }
.budget-print-table col.budget-m { width: 11%; }
.budget-print-table col.budget-s { width: 14%; }
.budget-print-table col.budget-prior,
.budget-print-table col.budget-current,
.budget-print-table col.budget-change { width: 13%; }
.budget-print-table col.budget-proof { width: 25%; }
.budget-print-table td { height: 10mm; }

.budget-summary-print th,
.budget-summary-print td {
  height: 9mm;
}

.budget-pay-print {
  font-size: 7.5pt;
}

.budget-pay-print th,
.budget-pay-print td {
  height: 9mm;
  padding-right: 0.8mm;
  padding-left: 0.8mm;
}

@page ssis-portrait {
  size: A4 portrait;
  margin: 0;
}

@page ssis-landscape {
  size: A4 landscape;
  margin: 0;
}

@media print {
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .app-shell {
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }

  .app-shell > .top-strip,
  .app-shell > .global-header,
  .app-shell > .top-menu,
  .app-shell > .manager-top-guide,
  .app-shell > .top-memo-row,
  .app-shell .side-menu,
  .app-shell .tab-row,
  .app-shell .page-title,
  .app-shell .validation-panel,
  .batch-print-document > .winform-toolbar {
    display: none !important;
  }

  .workspace,
  .main-panel,
  .content-grid,
  .work-area,
  .batch-print-document,
  .ssis-print-document {
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #fff !important;
    overflow: visible !important;
  }

  .ssis-print-form {
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
  }
}

/* Official Hope-eum form output. Keep these rules after the legacy print styles. */
.ssis-print-document {
  padding: 18px;
  background: #dfe4e6;
}

.ssis-print-form {
  padding: 12mm 9mm 14mm;
  font-family: "NanumBarunGothic", "나눔바른고딕", "Malgun Gothic", sans-serif;
  font-size: 8.5pt;
  line-height: 1.25;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.ssis-print-form.portrait {
  width: 210mm;
  height: 297mm;
  min-height: 297mm;
  overflow: hidden;
}

.ssis-print-form.landscape {
  width: 297mm;
  height: 210mm;
  min-height: 210mm;
  overflow: hidden;
}

.ssis-print-form h1 {
  margin: 0 0 6mm;
  font-size: 20pt;
  font-weight: 800;
  line-height: 1.1;
}

.ssis-print-conditions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5mm 7mm;
  margin: 0 0 3mm;
  font-size: 8pt;
}

.landscape .ssis-print-conditions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ssis-print-conditions b {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ssis-form-table {
  border: 0.35mm solid #333;
  font-size: 7.7pt;
  line-height: 1.25;
}

.ssis-form-table th,
.ssis-form-table td {
  height: 6.7mm;
  padding: 0.8mm 1mm;
  border: 0.2mm solid #777;
  overflow: hidden;
  overflow-wrap: break-word;
}

.ssis-form-table thead th,
.ssis-form-table .grand-total th,
.ssis-form-table .grand-total td {
  background: #cfd6d9;
}

.ssis-form-table .subtotal th,
.ssis-form-table .subtotal td {
  background: #e8e8e8;
}

.ssis-form-footer {
  right: 9mm;
  bottom: 5mm;
  left: 9mm;
  grid-template-columns: 1fr 1.4fr 40px 1.4fr;
  gap: 3mm;
  color: #28608b;
  font-size: 7pt;
}

.ssis-ledger-header h1,
.budget-print-header h1 {
  margin-bottom: 6mm;
}

.cash-book th:nth-child(1) { width: 12%; }
.cash-book th:nth-child(2) { width: 23%; }
.cash-book th:nth-child(3) { width: 25%; }
.cash-book th:nth-child(n+4) { width: 13.33%; }
.cash-book td { height: 7.8mm; }

.cash-book-conditions {
  display: grid;
  width: max-content;
  gap: 1.5mm;
  margin: 0 0 2mm;
  font-size: 8pt;
}

.ledger-main col.ledger-account { width: 12%; }
.ledger-main col.ledger-date { width: 12%; }
.ledger-main col.ledger-memo { width: 28%; }
.ledger-main col.ledger-money { width: 8%; }
.ledger-main td { height: 6.35mm; }
.ledger-main .ledger-hierarchy-total th,
.ledger-main .ledger-hierarchy-total td { height: 6.35mm; }

.ledger-print-conditions {
  display: grid;
  grid-template-columns: max-content max-content;
  column-gap: 4mm;
  margin: 0 0 2mm;
  font-size: 8pt;
  line-height: 1.35;
}
.ledger-print-conditions b:nth-child(2) { text-align: left; }
.ledger-print-conditions b:last-child { grid-column: 1 / -1; }

.ledger-sub {
  font-size: 7.5pt;
}
.ledger-sub col.sub-date { width: 8%; }
.ledger-sub col.sub-memo { width: 10%; }
.ledger-sub col.sub-money { width: 9.11%; }
.ledger-sub td { height: 10mm; }

.income-expense-print col.statement-l,
.income-expense-print col.statement-m,
.income-expense-print col.statement-s { width: 15%; }
.income-expense-print col.statement-money { width: 11%; }
.income-expense-print col.statement-rate { width: 5.5%; }
.income-expense-print td { height: 6.8mm; }

.ledger-sub-report-grid table {
  min-width: 1360px;
  table-layout: fixed;
}

.ledger-sub-report-grid col.ledger-sub-no { width: 36px; }
.ledger-sub-report-grid col.ledger-sub-date { width: 80px; }
.ledger-sub-report-grid col.ledger-sub-voucher { width: 120px; }
.ledger-sub-report-grid col.ledger-sub-memo { width: 380px; }
.ledger-sub-report-grid col.ledger-sub-money { width: 82px; }
.ledger-sub-report-grid tbody td:nth-child(1),
.ledger-sub-report-grid tbody td:nth-child(2),
.ledger-sub-report-grid tbody td:nth-child(3) { text-align: center; }
.ledger-sub-report-grid tbody td:nth-child(4) {
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.settlement-print th:nth-child(1),
.settlement-print th:nth-child(2),
.settlement-print th:nth-child(3) { width: 13%; }
.settlement-print th:nth-child(4) { width: 8%; }
.settlement-print th:nth-child(n+5) { width: 13.25%; }
.settlement-print td { height: 10.2mm; }

.budget-print-header .ssis-print-conditions {
  margin-bottom: 2mm;
}

.budget-print-conditions {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.budget-print-conditions b:nth-child(2) { text-align: center; }
.budget-print-conditions b:last-child { text-align: right; }

.budget-print-table {
  font-size: 6.8pt;
}
.budget-print-table col.budget-l { width: 11%; }
.budget-print-table col.budget-m { width: 12%; }
.budget-print-table col.budget-d { width: 18%; }
.budget-print-table col.budget-prior,
.budget-print-table col.budget-current,
.budget-print-table col.budget-change { width: 11%; }
.budget-print-table col.budget-proof { width: 26%; }
.budget-print-table td { height: 8mm; }
.budget-print-table .proof-cell {
  font-size: 6.4pt;
  line-height: 1.2;
  white-space: normal;
}

.subject-transfer-print {
  font-size: 6.6pt;
}
.subject-transfer-header h1 { margin: 7mm 0 12mm; }
.subject-transfer-print col.transfer-no { width: 3%; }
.subject-transfer-print col.transfer-account { width: 11%; }
.subject-transfer-print col.transfer-date { width: 8%; }
.subject-transfer-print col.transfer-money { width: 9%; }
.subject-transfer-print col.transfer-reason { width: 11%; }
.subject-transfer-print td { height: 8.2mm; }

.budget-summary-print td,
.budget-pay-print td { height: 8.4mm; }
.budget-pay-print { font-size: 6.7pt; }

.ssis-form-footer.no-page-count {
  grid-template-columns: 1fr 1.5fr 1.5fr;
}

.budget-summary-page {
  padding: 18mm 13mm 14mm;
  font-family: "NanumBarunGothic", "나눔바른고딕", "Malgun Gothic", sans-serif;
}

.budget-summary-print-header h1 {
  margin: 0 0 10mm;
  font-size: 20pt;
  font-weight: 700;
}

.budget-summary-print-panes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 0.6mm;
}

.budget-summary-page .budget-summary-print {
  border-collapse: collapse;
  font-size: 8.5pt;
}

.budget-summary-page .budget-summary-print col.summary-group { width: 37%; }
.budget-summary-page .budget-summary-print col.summary-item { width: 38%; }
.budget-summary-page .budget-summary-print col.summary-amount { width: 25%; }

.budget-summary-page .budget-summary-print th,
.budget-summary-page .budget-summary-print td {
  height: 9.2mm;
  padding: 1mm 1.4mm;
  border: 0.25mm solid #444;
}

.budget-summary-page .budget-summary-print thead tr:first-child th {
  height: 10mm;
  background: #d7d7d7;
  font-size: 10pt;
}

.budget-summary-page .budget-summary-print thead tr:nth-child(2) th,
.budget-summary-page .budget-summary-print .grand-total th,
.budget-summary-page .budget-summary-print .grand-total td {
  background: #e2e2e2;
  font-weight: 700;
}

.budget-summary-page .budget-summary-print .grand-total th {
  text-align: center;
}

.ssis-form-title-with-approval {
  position: relative;
  min-height: 23mm;
}

.ssis-form-title-with-approval .ssis-resolution-title {
  margin: 5mm 30mm 6mm !important;
  position: relative;
  top: 5mm;
  text-decoration: underline;
  text-underline-offset: 2mm;
}

.ssis-approval-box {
  position: absolute;
  top: 0;
  right: 0;
  width: 27mm;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 6.5pt;
}

.ssis-approval-box th,
.ssis-approval-box td {
  border: 0.2mm solid #777;
  text-align: center;
}

.ssis-approval-box th { height: 5mm; background: #fff; }
.ssis-approval-box td { height: 14mm; }
.ssis-approval-box .approval-box-label {
  width: 7mm;
  height: 19mm;
  font-weight: 500;
  line-height: 1.8;
}

.ssis-print-form.resolution-page,
.ssis-print-form.approval-page {
  padding-top: 19mm;
  padding-right: 13mm;
  padding-left: 13mm;
}

.resolution-page .ssis-form-table th,
.approval-page .ssis-form-table th {
  background: #fff;
}

.ssis-resolution-top {
  grid-template-columns: 1.05fr 0.95fr;
  font-size: 7.5pt;
}

.ssis-resolution-top b {
  padding: 1.6mm 3mm;
}

.resolution-meta th { width: 10%; }
.resolution-meta td { width: 23.33%; }
.resolution-lines th:nth-child(1) { width: 6%; }
.resolution-lines th:nth-child(2) { width: 20%; }
.resolution-lines th:nth-child(3) { width: 29%; }
.resolution-lines th:nth-child(4) { width: 13%; }
.resolution-lines th:nth-child(5) { width: 17%; }
.resolution-lines th:nth-child(6) { width: 15%; }
.resolution-lines td { height: 6.7mm; }

.resolution-bottom tr:first-child th,
.resolution-bottom tr:first-child td { height: 12mm; }
.resolution-bottom tr:last-child th,
.resolution-bottom tr:last-child td { height: 35mm; }

.approval-page .resolution-meta th,
.approval-page .resolution-meta td,
.approval-page .approval-lines td,
.approval-page .approval-items td { height: 5.7mm; }
.approval-page .approval-reason td { height: 24mm; }
.approval-page .approval-request { padding: 1.2mm 0; font-size: 7.2pt; line-height: 1.35; }
.approval-page .approval-items td { height: 5.4mm; }

.approval-page .ssis-form-title-with-approval {
  min-height: 25.5mm;
}

.approval-page .ssis-form-title-with-approval .ssis-resolution-title {
  top: 11mm;
  font-weight: 500;
}

.approval-page .resolution-meta th,
.approval-page .resolution-meta td { height: 6.7mm; }
.approval-page .approval-lines td { height: 7mm; }
.approval-page .approval-items td { height: 5.7mm; }
.approval-page .approval-reason th,
.approval-page .approval-request { color: #1e24b5; }
.approval-page .approval-reason td { height: 27mm; }
.approval-page .approval-request {
  padding: 2mm 0;
  font-size: 8pt;
  line-height: 1.7;
}

@media print {
  .ssis-print-document {
    padding: 0 !important;
    background: #fff !important;
  }

  .ssis-print-form {
    margin: 0 !important;
    break-after: page;
    page-break-after: always;
  }

  .ssis-print-form:last-child {
    break-after: auto;
    page-break-after: auto;
  }
}

.contract-paper .contract-cms-signatures label {
  color: #111;
  gap: 2mm;
}

.ssis-api-report-page {
  min-width: 1040px;
  color: #24343a;
}

.api-report-commandbar,
.api-report-summarybar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #c7d6da;
  background: #eaf2f4;
}

.api-report-period,
.api-report-actions,
.api-report-summarybar label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.api-report-period label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.api-report-period select {
  width: 104px;
  height: 34px;
}

.api-report-credential,
.api-report-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.api-report-credential.ok,
.api-report-status.completed { color: #17613a; background: #e1f3e8; }
.api-report-credential.warn,
.api-report-status.review,
.api-report-status.failed { color: #9b3131; background: #fde7e7; }
.api-report-status.running { color: #075d70; background: #dff2f5; }
.api-report-status.pending { color: #645316; background: #fff4ce; }
.api-report-status.skipped,
.api-report-status.cancelled { color: #5d686d; background: #edf0f1; }

.api-report-progress {
  padding: 10px 12px;
  border-right: 1px solid #c7d6da;
  border-left: 1px solid #c7d6da;
  background: #fff;
}

.api-report-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.api-report-progress > div strong { margin-right: auto; }

.api-report-progress progress {
  width: 100%;
  height: 10px;
  accent-color: #16818d;
}

.api-report-summarybar {
  justify-content: flex-start;
  border-top: 0;
  background: #f7fafb;
}

.api-report-summarybar input,
.api-report-period .api-report-select-all input,
.api-report-grid input[type="checkbox"] {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px;
  margin: 0;
}

.api-report-period .api-report-select-all {
  gap: 5px;
  margin-left: 2px;
  white-space: nowrap;
}

.api-report-summarybar .api-report-note {
  margin-left: auto;
  color: #65777e;
}

.api-report-selection-summary {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 620px;
  gap: 10px;
  padding-left: 10px;
  border-left: 1px solid #c7d6da;
}

.api-report-selection-summary > strong { white-space: nowrap; }
.api-report-selection-summary > span {
  overflow: hidden;
  color: #52666e;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-report-grid {
  max-height: calc(100vh - 340px);
  border-top: 0;
}

.api-report-grid table {
  width: 100%;
  table-layout: fixed;
}

.api-report-grid th:nth-child(1), .api-report-grid td:nth-child(1) { width: 38px; }
.api-report-grid th:nth-child(2), .api-report-grid td:nth-child(2) { width: 52px; }
.api-report-grid th:nth-child(3), .api-report-grid td:nth-child(3) { width: 235px; }
.api-report-grid th:nth-child(4), .api-report-grid td:nth-child(4) { width: 100px; }
.api-report-grid th:nth-child(5), .api-report-grid td:nth-child(5) { width: 170px; }
.api-report-grid th:nth-child(6), .api-report-grid td:nth-child(6) { width: 84px; }

.api-report-grid td {
  height: 42px;
  vertical-align: middle;
}

.api-report-grid td strong,
.api-report-grid td small {
  display: block;
}

.api-report-grid td small {
  margin-top: 2px;
  color: #7b898e;
  font-size: 11px;
}

.api-report-grid .review-count {
  color: #9b1c1c;
  background: #fde7e7;
  font-weight: 700;
}

.api-report-grid .review-none {
  color: #68777d;
}
.api-report-message {
  overflow: hidden;
  white-space: nowrap;
}

.api-report-message > span {
  display: inline-block;
  max-width: calc(100% - 70px);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.api-report-grid .api-report-message {
  overflow: visible;
  padding-top: 8px;
  padding-bottom: 8px;
  line-height: 1.45;
  white-space: normal;
}

.api-report-grid .api-report-message > span {
  display: inline;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.api-report-source-button {
  margin-left: 8px;
  vertical-align: middle;
  white-space: nowrap;
}
.api-report-check, .api-report-order { text-align: center; }
.api-credentials-dialog { width: 520px; }

.api-report-results-page {
  min-width: 1180px;
}

.result-commandbar > div,
.api-report-result-heading > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.api-report-result-period,
.api-report-result-period label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.api-report-result-period {
  margin-left: 12px;
}

.api-report-result-period label {
  font-weight: 700;
}

.api-report-result-period select {
  width: 104px;
  height: 34px;
}

.result-commandbar > div span,
.api-report-result-heading > div span {
  color: #64767d;
}

.api-report-history-grid {
  max-height: 260px;
  border-top: 0;
}

.api-report-history-grid table,
.api-report-result-grid table {
  width: 100%;
  table-layout: fixed;
}

.api-report-history-grid th:nth-child(1),
.api-report-history-grid td:nth-child(1) { width: 155px; }
.api-report-history-grid th:nth-child(2),
.api-report-history-grid td:nth-child(2) { width: 120px; }
.api-report-history-grid th:nth-child(3),
.api-report-history-grid td:nth-child(3) { width: 90px; }
.api-report-history-grid th:nth-child(n+4):nth-child(-n+7),
.api-report-history-grid td:nth-child(n+4):nth-child(-n+7) { width: 78px; }
.api-report-history-grid th:nth-child(8),
.api-report-history-grid td:nth-child(8) { width: 155px; }

.api-report-history-grid tbody tr {
  cursor: pointer;
}

.api-report-history-grid tbody tr:hover td,
.api-report-history-grid tbody tr.selected td {
  background: #e8f4f5;
}

.api-report-history-grid tbody tr.selected td:first-child {
  box-shadow: inset 3px 0 #16818d;
}

.api-report-result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  margin-top: 18px;
  padding: 8px 12px;
  border: 1px solid #c7d6da;
  background: #f7fafb;
}

.api-report-result-grid {
  max-height: calc(100vh - 545px);
  min-height: 220px;
  border-top: 0;
}

.api-report-result-grid th:nth-child(1),
.api-report-result-grid td:nth-child(1) { width: 50px; }
.api-report-result-grid th:nth-child(2),
.api-report-result-grid td:nth-child(2) { width: 210px; }
.api-report-result-grid th:nth-child(3),
.api-report-result-grid td:nth-child(3) { width: 90px; }
.api-report-result-grid th:nth-child(n+4):nth-child(-n+7),
.api-report-result-grid td:nth-child(n+4):nth-child(-n+7) { width: 78px; }
.api-report-result-grid th:nth-child(8),
.api-report-result-grid td:nth-child(8) { width: 120px; }
.api-report-result-grid th:nth-child(10),
.api-report-result-grid td:nth-child(10) { width: 155px; }

.result-success { color: #17613a; font-weight: 700; }
.result-failed { color: #b3261e; font-weight: 700; }

.person-charge-report-toolbar .winform-filters {
  display: flex;
  align-items: center;
  gap: 12px;
}

.person-charge-report-toolbar .winform-filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.person-charge-report-toolbar select {
  width: 112px;
}

.company-information-page {
  display: grid;
  grid-template-columns: minmax(420px, 720px) minmax(260px, 340px);
  align-items: start;
  gap: 14px;
  padding: 14px;
  max-width: 1100px;
}

.company-information-card,
.company-stamp-card {
  border: 1px solid #bdcdd2;
  background: #fff;
}

.company-information-head {
  min-height: 54px;
  padding: 10px 14px;
  border-bottom: 1px solid #bdcdd2;
  background: #edf5f7;
}

.company-information-head div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.company-information-head span {
  color: #172f37;
  font-weight: 700;
}

.company-information-head strong {
  color: #64767d;
  font-size: 12px;
  font-weight: 400;
}

.company-information-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: #c7d6da;
}

.company-information-fields label {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  min-height: 48px;
  background: #fff;
}

.company-information-fields label.wide {
  grid-column: 1 / -1;
}

.company-information-fields label > span {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 12px;
  background: #e7f0f3;
  color: #263c44;
  font-weight: 700;
}

.company-information-fields input {
  width: calc(100% - 16px);
  min-width: 0;
  height: 32px;
  margin: 8px;
  border: 1px solid #b8c8cd;
  padding: 0 9px;
}

.company-information-fields input:focus {
  border-color: #16818d;
  box-shadow: 0 0 0 1px #16818d;
  outline: 0;
}

.company-stamp-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  margin: 14px;
  border: 1px solid #c8d5d9;
  background: #fff;
}

.company-stamp-preview.is-empty {
  color: #718187;
  background: #f8fafb;
}

.company-stamp-preview img {
  display: block;
  max-width: calc(100% - 28px);
  max-height: 230px;
  object-fit: contain;
}

.company-information-loading {
  grid-column: 1 / -1;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c7d6da;
  background: #fff;
  color: #62747b;
}

.managed-facility-layout {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}

.managed-facility-toolbar {
  margin: 12px 12px 0;
}

.managed-facility-list-pane,
.managed-facility-detail-pane,
.login-record-pane {
  min-width: 0;
  border: 1px solid #c2d1d6;
  background: #fff;
}

.managed-facility-pane-head,
.login-record-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 8px 12px;
  border-bottom: 1px solid #c2d1d6;
  background: #e8f1f4;
}

.managed-facility-list {
  max-height: calc(100vh - 330px);
  overflow: auto;
}

.managed-facility-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  min-height: 52px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid #dde6e8;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.managed-facility-item.active {
  padding-left: 9px;
  border-left: 3px solid #16818d;
  background: #eaf5f6;
}

.managed-facility-item span,
.login-record-pane-head span {
  color: #687a81;
  font-size: 12px;
}

.managed-facility-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 9px 12px;
  border-bottom: 1px solid #c2d1d6;
  background: #f3f7f8;
}

.managed-facility-detail-head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.managed-facility-detail-scroll {
  max-height: calc(100vh - 342px);
  overflow: auto;
  padding: 12px 14px 18px;
}

.managed-facility-field-group + .managed-facility-field-group {
  margin-top: 14px;
}

.managed-facility-field-group h3 {
  margin: 0 0 6px;
  padding: 8px 10px;
  border-top: 2px solid #6daeb5;
  border-bottom: 1px solid #c8d7dc;
  background: #edf4f6;
  font-size: 13px;
}

.managed-facility-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 1px;
  padding: 1px;
  background: #c7d6da;
}

.managed-facility-field-grid.shipping-row {
  grid-template-columns: minmax(250px, 0.7fr) minmax(420px, 1.3fr);
}

.managed-facility-field {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  min-height: 38px;
  background: #fff;
}

.managed-facility-field.wide {
  grid-column: 1 / -1;
}

.managed-facility-field > span {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 7px 10px;
  border-right: 1px solid #c7d6da;
  background: #e8f1f4;
  color: #354f58;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.managed-facility-field .grid-cell-input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.managed-facility-field .grid-cell-input[readonly] {
  background: #f3f5f6;
  color: #66767c;
}

.managed-facility-field textarea {
  min-height: 76px;
  resize: vertical;
}

.notepad-owner-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 10px;
  padding: 7px 10px;
  border: 1px solid #c7d6da;
  background: #eaf2f4;
}

.notepad-owner-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.notepad-owner-toolbar select {
  min-width: 250px;
}

.notepad-owner-description,
.compact-owner-toolbar span {
  color: #62747b;
  font-size: 12px;
}

.compact-owner-toolbar {
  justify-content: space-between;
}

.user-notepad-admin-warning {
  border-color: #df8f8f;
  border-left: 4px solid #c83535;
  background: #fbe3e3;
}

.user-notepad-admin-warning strong {
  color: #9f2020;
  line-height: 1.45;
}

.new-facility-registration-page {
  box-sizing: border-box;
  width: min(1080px, calc(100% - 32px));
  margin: 0;
  padding: 16px 18px 28px;
}

.nfr-guide {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid #b9cbd0;
  border-left: 4px solid #167f8c;
  background: #f1f7f8;
  color: #536970;
}

.nfr-guide strong {
  flex: 0 0 auto;
  color: #173a43;
  font-size: 14px;
}

.nfr-guide span {
  font-size: 12px;
}

.nfr-guide em {
  color: #c72d2d;
  font-style: normal;
  font-weight: 800;
}

.nfr-form {
  margin-top: 12px;
}

.nfr-section {
  overflow: hidden;
  margin: 0 0 12px;
  border: 1px solid #b9c8cd;
  background: #fff;
}

.nfr-section h3 {
  box-sizing: border-box;
  min-height: 38px;
  margin: 0;
  padding: 9px 13px 8px;
  border-top: 3px solid #1b8291;
  border-bottom: 1px solid #b9c8cd;
  background: #eaf2f4;
  color: #203a42;
  font-size: 13px;
  font-weight: 700;
}

.nfr-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 42px;
  border-bottom: 1px solid #c8d3d7;
}

.nfr-section .nfr-row:last-child {
  border-bottom: 0;
}

.nfr-field {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  background: #fff;
}

.nfr-field + .nfr-field {
  border-left: 1px solid #c8d3d7;
}

.nfr-field.wide {
  grid-column: 1 / -1;
}

.nfr-label {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
  padding: 8px 11px;
  border-right: 1px solid #c8d3d7;
  background: #e7f0f2;
  color: #293f47;
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
}

.nfr-field input,
.nfr-field select,
.nfr-field textarea {
  box-sizing: border-box;
  width: calc(100% - 14px);
  min-width: 0;
  height: 30px;
  margin: 5px 7px;
  padding: 5px 8px;
  border: 1px solid #aebdc3;
  border-radius: 0;
  background: #fff;
  color: #202d33;
  font: inherit;
}

.nfr-field textarea {
  min-height: 68px;
  resize: vertical;
}

.nfr-memo-field {
  min-height: 78px;
}

.nfr-field input[readonly] {
  background: #f1f3f3;
  color: #617279;
}

.nfr-field input:focus,
.nfr-field select:focus,
.nfr-field textarea:focus {
  border-color: #16818d;
  outline: 1px solid #16818d;
  outline-offset: -1px;
}

@media (max-width: 860px) {
  .new-facility-registration-page {
    width: 100%;
    padding: 12px;
  }

  .nfr-guide {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .nfr-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .nfr-field + .nfr-field {
    border-top: 1px solid #c8d3d7;
    border-left: 0;
  }
}

/* 신규 시설 등록은 공통 시설 폼보다 좁고 일정한 2열 구조를 사용한다. */
.new-facility-registration-page {
  box-sizing: border-box;
  width: min(100%, 1060px);
  padding: 16px;
}

.new-facility-registration-page .new-facility-intro,
.new-facility-registration-page .add-user-form {
  box-sizing: border-box;
  width: min(100%, 1000px);
}

.new-facility-registration-page .add-user-form {
  margin: 12px 0 0;
}

.new-facility-registration-page .facility-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row;
  align-items: stretch;
}

.new-facility-registration-page .facility-form-field {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  min-height: 42px;
  margin: 0;
}

.new-facility-registration-page .facility-form-field.wide {
  grid-column: 1 / -1;
}

.new-facility-registration-page .facility-form-field > span {
  box-sizing: border-box;
  min-width: 0;
  padding: 8px 10px;
}

.new-facility-registration-page .facility-form-field input,
.new-facility-registration-page .facility-form-field select,
.new-facility-registration-page .facility-form-field textarea {
  box-sizing: border-box;
  width: calc(100% - 14px);
  min-width: 0;
  margin: 5px 7px;
}

@media (max-width: 820px) {
  .new-facility-registration-page .facility-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .new-facility-registration-page .facility-form-field {
    border-right: 0;
  }
}

.notepad-empty-owner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  border: 1px solid #c7d6da;
  background: #fff;
  color: #63767d;
}

body.notepad-popup-mode {
  overflow: auto;
  background: #eef3f5;
}

body.notepad-popup-mode .app-shell > .top-strip,
body.notepad-popup-mode .app-shell > .top-menu,
body.notepad-popup-mode .app-shell > .manager-top-guide,
body.notepad-popup-mode .app-shell > .top-memo-row,
body.notepad-popup-mode .side-menu,
body.notepad-popup-mode .tab-row,
body.notepad-popup-mode .validation-panel,
body.notepad-popup-mode .page-title > div:first-child {
  display: none !important;
}

body.notepad-popup-mode .workspace,
body.notepad-popup-mode .main-panel,
body.notepad-popup-mode .content-grid,
body.notepad-popup-mode .work-area {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
}

body.notepad-popup-mode .page-title {
  min-height: 48px;
  justify-content: flex-end;
  padding: 8px 14px;
  border-bottom: 1px solid #c7d6da;
  background: #fff;
}

body.notepad-popup-mode .content-grid {
  padding: 12px 14px 16px;
}

body.notepad-popup-mode .user-notepad-panel {
  max-width: none;
}

body.notepad-popup-mode .notepad-rich-editor {
  min-height: calc(100vh - 190px);
}

.managed-facility-empty,
.managed-facility-detail-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: #6c7d83;
}

.login-record-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}

.login-detail-panel > .winform-toolbar {
  margin: 12px 12px 0;
}

.login-detail-grid {
  min-height: 300px;
  max-height: calc(100vh - 330px);
  overflow-x: hidden;
  border: 0;
}

.login-detail-grid table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.login-detail-grid th:nth-child(1) { width: 29%; }
.login-detail-grid th:nth-child(2) { width: 24%; }
.login-detail-grid th:nth-child(3) { width: 15%; }
.login-detail-grid th:nth-child(4) { width: 32%; }

.login-detail-grid th,
.login-detail-grid td {
  min-width: 0;
  padding-right: 7px;
  padding-left: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1100px) {
  .company-information-page,
  .login-record-layout,
  .managed-facility-layout {
    grid-template-columns: 1fr;
  }

  .managed-facility-field-grid {
    grid-template-columns: 1fr;
  }

  .managed-facility-field.wide {
    grid-column: auto;
  }
}

@page cover-page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  .batch-print-loading-backdrop {
    display: none !important;
  }

  .cover-print-preview {
    padding: 0 !important;
    overflow: visible !important;
  }

  .cover-paper {
    page: cover-page;
    box-sizing: border-box !important;
    width: 210mm !important;
    min-width: 210mm !important;
    max-width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    aspect-ratio: auto !important;
    margin: 0 !important;
    padding: 68mm 22mm 26mm !important;
    border: 0 !important;
    box-shadow: none !important;
    break-after: auto !important;
    page-break-after: auto !important;
    overflow: hidden !important;
  }

  .cover-paper h1 {
    margin-top: 24mm !important;
  }

  .cover-user {
    margin-top: auto !important;
    margin-bottom: 24mm !important;
  }
}

.resolution-page .resolution-meta col.resolution-subject-label { width: 7%; }
.resolution-page .resolution-meta col.resolution-subject-value { width: 39%; }
.resolution-page .resolution-meta col.resolution-info-label { width: 8%; }
.resolution-page .resolution-meta col.resolution-info-value { width: 26%; }
.resolution-page .resolution-meta col.resolution-date-label { width: 6%; }
.resolution-page .resolution-meta col.resolution-date-value { width: 14%; }

.resolution-page .resolution-meta th,
.resolution-page .resolution-meta td {
  border-color: #252525;
}

.resolution-page .resolution-meta td:nth-child(2) {
  padding-right: 1.5mm;
  padding-left: 1.5mm;
  text-align: left;
}

.resolution-page .resolution-meta td:last-child {
  white-space: nowrap;
}

.resolution-page .ssis-resolution-top {
  box-sizing: border-box;
  border: 0.35mm solid #252525;
  border-bottom: 0;
}

.resolution-page .ssis-resolution-top b {
  box-sizing: border-box;
  border: 0;
}

.resolution-page .ssis-resolution-top b + b {
  border-left: 0.35mm solid #252525;
}

.resolution-page .resolution-meta {
  border-collapse: separate;
  border-spacing: 0;
  border-top: 0.35mm solid #252525;
  border-left: 0.35mm solid #252525;
}

.resolution-page .resolution-meta th,
.resolution-page .resolution-meta td {
  border: 0;
  border-right: 0.35mm solid #252525;
  border-bottom: 0.35mm solid #252525;
}

@media print {
  .ssis-print-form.landscape,
  .ssis-print-form.budget-page {
    page: ssis-landscape !important;
    box-sizing: border-box !important;
    width: 297mm !important;
    min-width: 297mm !important;
    max-width: 297mm !important;
    height: 210mm !important;
    min-height: 210mm !important;
    max-height: 210mm !important;
  }

  .resolution-page .resolution-meta,
  .resolution-page .resolution-meta th,
  .resolution-page .resolution-meta td {
    border-color: #111 !important;
  }

  .resolution-page .resolution-meta th,
  .resolution-page .resolution-meta td {
    border-width: 0 0.35mm 0.35mm 0 !important;
    border-style: solid !important;
  }

  .resolution-page .ssis-resolution-top,
  .resolution-page .resolution-meta {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Keep voucher and approval PDF rules single-stroked. Adjacent tables share one border. */
.resolution-page .ssis-form-table,
.approval-page .ssis-form-table {
  box-sizing: border-box;
  border: 0;
  border-top: 0.22mm solid #50585b;
  border-left: 0.22mm solid #50585b;
  border-collapse: separate;
  border-spacing: 0;
}

.resolution-page .ssis-form-table th,
.resolution-page .ssis-form-table td,
.approval-page .ssis-form-table th,
.approval-page .ssis-form-table td {
  border: 0;
  border-right: 0.22mm solid #50585b;
  border-bottom: 0.22mm solid #50585b;
}

.resolution-page .resolution-meta + .resolution-lines,
.resolution-page .resolution-lines + .resolution-bottom,
.approval-page .resolution-meta + .approval-lines,
.approval-page .approval-lines + .approval-reason {
  border-top: 0;
}

.resolution-page .ssis-resolution-top {
  border-width: 0.22mm;
  border-color: #50585b;
}

.resolution-page .ssis-resolution-top b + b {
  border-left-width: 0.22mm;
  border-left-color: #50585b;
}

.resolution-page .ssis-approval-box,
.approval-page .ssis-approval-box {
  border: 0;
  border-top: 0.22mm solid #50585b;
  border-left: 0.22mm solid #50585b;
  border-collapse: separate;
  border-spacing: 0;
}

.resolution-page .ssis-approval-box th,
.resolution-page .ssis-approval-box td,
.approval-page .ssis-approval-box th,
.approval-page .ssis-approval-box td {
  border: 0;
  border-right: 0.22mm solid #50585b;
  border-bottom: 0.22mm solid #50585b;
}

@media print {
  .resolution-page .ssis-form-table,
  .approval-page .ssis-form-table {
    border-width: 0.22mm 0 0 0.22mm !important;
    border-style: solid !important;
    border-color: #50585b !important;
  }

  .resolution-page .ssis-form-table th,
  .resolution-page .ssis-form-table td,
  .approval-page .ssis-form-table th,
  .approval-page .ssis-form-table td {
    border-width: 0 0.22mm 0.22mm 0 !important;
    border-style: solid !important;
    border-color: #50585b !important;
  }

  .resolution-page .resolution-meta + .resolution-lines,
  .resolution-page .resolution-lines + .resolution-bottom,
  .approval-page .resolution-meta + .approval-lines,
  .approval-page .approval-lines + .approval-reason {
    border-top-width: 0 !important;
  }
}

/* Approval form follows the original form's wider account hierarchy area. */
.approval-page .approval-meta col.approval-account-label { width: 7%; }
.approval-page .approval-meta col.approval-account-value { width: 31%; }
.approval-page .approval-meta col.approval-info-label { width: 8%; }
.approval-page .approval-meta col.approval-info-value { width: 24%; }
.approval-page .approval-meta col.approval-date-label { width: 8%; }
.approval-page .approval-meta col.approval-date-value { width: 22%; }

.approval-page .approval-meta th,
.approval-page .approval-meta td {
  width: auto;
}

.approval-page .approval-meta td:nth-child(2) {
  padding-right: 2mm;
  padding-left: 2mm;
  text-align: left;
  word-break: keep-all;
}

.approval-page .approval-lines col.approval-line-no { width: 6%; }
.approval-page .approval-lines col.approval-line-account { width: 23%; }
.approval-page .approval-lines col.approval-line-memo { width: 29%; }
.approval-page .approval-lines col.approval-line-money { width: 12%; }
.approval-page .approval-lines col.approval-line-client { width: 16%; }
.approval-page .approval-lines col.approval-line-source { width: 14%; }

.dialog-box.accounting-client-dialog {
  width: min(860px, calc(100vw - 40px));
  height: min(620px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid #9fb5bd;
  box-shadow: 0 18px 48px rgb(30 54 62 / 24%);
}

.accounting-client-dialog-head {
  min-height: 58px;
  padding: 10px 16px;
  background: #f4f8f9;
  border-bottom: 1px solid #c4d2d7;
}

.accounting-client-dialog-head > div {
  display: grid;
  gap: 2px;
}

.accounting-client-dialog-head strong {
  color: #173f4a;
  font-size: 16px;
}

.accounting-client-dialog-head span {
  color: #667b83;
  font-size: 12px;
}

.accounting-client-dialog-body {
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  gap: 12px;
  padding: 14px 16px 16px;
  background: #f7f9fa;
}

.accounting-client-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.accounting-client-toolbar .dialog-search {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border-color: #aebfc5;
  background: #fff;
}

.accounting-client-toolbar .dialog-search:focus {
  border-color: #188194;
  box-shadow: 0 0 0 2px rgb(24 129 148 / 12%);
  outline: 0;
}

.accounting-client-add-button {
  flex: 0 0 auto;
  min-width: 92px;
  height: 38px;
  white-space: nowrap;
}

.accounting-client-add-dialog {
  width: min(760px, calc(100vw - 36px));
  max-height: min(760px, calc(100vh - 40px));
}

.accounting-client-add-dialog .dialog-head > div {
  display: grid;
  gap: 3px;
}

.accounting-client-add-dialog .dialog-head span {
  color: #687c83;
  font-size: 12px;
  font-weight: 400;
}

.accounting-client-add-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  padding: 18px;
  background: #f7f9fa;
}

.accounting-client-add-form label {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  border: 1px solid #c6d2d6;
  background: #fff;
}

.accounting-client-add-form label > span {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px;
  border-right: 1px solid #c6d2d6;
  background: #e7f0f2;
  color: #294750;
  font-weight: 600;
  white-space: nowrap;
}

.accounting-client-add-form label > span em {
  margin-right: 3px;
  color: #d64242;
  font-style: normal;
}

.accounting-client-add-form input,
.accounting-client-add-form textarea {
  width: 100%;
  min-width: 0;
  border: 0;
  background: #fff;
  color: #243a42;
  outline: 0;
}

.accounting-client-add-form input {
  height: 36px;
  padding: 0 10px;
}

.accounting-client-add-form textarea {
  min-height: 74px;
  padding: 9px 10px;
  resize: vertical;
}

.accounting-client-add-form input:focus,
.accounting-client-add-form textarea:focus {
  box-shadow: inset 0 0 0 2px rgb(24 129 148 / 25%);
}

.accounting-client-add-form .field-invalid {
  background: #fff0f0;
  box-shadow: inset 0 0 0 2px #d94a4a;
}

.accounting-client-add-wide,
.accounting-client-add-actions {
  grid-column: 1 / -1;
}

.accounting-client-add-actions {
  justify-content: flex-end;
  margin: 2px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid #d4dee1;
}

.accounting-client-similar {
  overflow: hidden;
  border: 1px solid #b9c9cf;
  background: #fff;
}

.accounting-client-similar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 10px;
  border-bottom: 1px solid #b9c9cf;
  background: #eef4f5;
  color: #294750;
}

.accounting-client-similar-title span {
  color: #177889;
  font-size: 12px;
  font-weight: 700;
}

.accounting-client-similar-head,
.accounting-client-similar-list > button {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px minmax(210px, 1.25fr);
  align-items: stretch;
}

.accounting-client-similar-head {
  min-height: 30px;
  border-bottom: 1px solid #c9d5d9;
  background: #dfeaed;
  color: #34515a;
  font-size: 12px;
  font-weight: 700;
}

.accounting-client-similar-head span,
.accounting-client-similar-list > button > strong,
.accounting-client-similar-list > button > span {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 5px 9px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-client-similar-head span + span,
.accounting-client-similar-list > button > * + * {
  border-left: 1px solid #d5dfe2;
}

.accounting-client-similar-list {
  max-height: 142px;
  overflow-y: auto;
}

.accounting-client-similar-list > button {
  width: 100%;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #e2e9eb;
  background: #fff;
  color: #2b4148;
  cursor: pointer;
}

.accounting-client-similar-list > button:hover,
.accounting-client-similar-list > button:focus-visible {
  background: #eaf5f6;
  outline: 0;
}

.accounting-client-similar-list > button > strong {
  font-weight: 700;
}

.accounting-client-similar-empty {
  margin: 0;
  padding: 13px 10px;
  color: #6b7e84;
  text-align: center;
}

@media (max-width: 660px) {
  .accounting-client-toolbar {
    flex-wrap: wrap;
  }

  .accounting-client-toolbar .dialog-search {
    flex-basis: calc(100% - 108px);
  }

  .accounting-client-result-count {
    width: 100%;
  }

  .accounting-client-add-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .accounting-client-add-wide,
  .accounting-client-add-actions {
    grid-column: auto;
  }
}

.accounting-client-result-count {
  flex: 0 0 auto;
  color: #64777e;
  font-size: 12px;
  white-space: nowrap;
}

.accounting-client-result-count strong {
  color: #176f7e;
  font-variant-numeric: tabular-nums;
}

.accounting-client-table {
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  border: 1px solid #b9c9cf;
  background: #fff;
}

.accounting-client-list-head,
.accounting-client-option-list > button {
  display: grid;
  grid-template-columns: minmax(210px, 1.05fr) 160px minmax(240px, 1.4fr);
  align-items: stretch;
}

.accounting-client-list-head {
  background: #dfeaed;
  color: #294751;
  font-weight: 700;
  border-bottom: 1px solid #aebfc5;
}

.accounting-client-list-head span,
.accounting-client-option-list > button > strong,
.accounting-client-option-list > button > span {
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 5px 10px;
  text-align: left;
}

.accounting-client-list-head span + span,
.accounting-client-option-list > button > strong + span,
.accounting-client-option-list > button > span + span {
  border-left: 1px solid #d8e1e4;
}

.accounting-client-option-list {
  min-height: 0;
  overflow: auto;
  background: #fff;
}

.accounting-client-option-list > button {
  width: 100%;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #e4eaec;
  background: #fff;
  color: #263d45;
  cursor: pointer;
}

.accounting-client-option-list > button[hidden] {
  display: none;
}

.accounting-client-option-list > button:hover {
  background: #eef7f8;
}

.accounting-client-option-list > button.selected {
  background: #e3f1f3;
  box-shadow: inset 3px 0 #188194;
}

.accounting-client-option-list > button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid #188194;
  outline-offset: -2px;
}

.accounting-client-option-list > button > strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.accounting-client-option-list > button > strong small {
  flex: 0 0 auto;
  color: #7b8c92;
  font-size: 11px;
  font-weight: 400;
}

.accounting-client-option-list > button > span {
  color: #536970;
}

.accounting-client-option-list .accounting-client-memo {
  display: flex;
  align-items: center;
  overflow: hidden;
  align-self: stretch;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-client-option-list .accounting-client-muted {
  color: #8a999e;
}

.accounting-client-none-option > strong {
  color: #5a6d74;
}

.accounting-client-table > .account-empty-message {
  position: absolute;
  align-self: center;
  justify-self: center;
  color: #7a8c92;
  pointer-events: none;
}

@media (max-width: 720px) {
  .accounting-client-list-head,
  .accounting-client-option-list > button {
    grid-template-columns: minmax(160px, 1fr) 130px minmax(180px, 1.2fr);
  }
}

.table-align-left,
.table-align-left input,
.table-align-left select,
.table-align-left textarea,
.table-align-left button {
  text-align: left !important;
}

.table-align-center,
.table-align-center input,
.table-align-center select,
.table-align-center textarea,
.table-align-center button {
  text-align: center !important;
}

.table-align-right,
.table-align-right input,
.table-align-right select,
.table-align-right textarea,
.table-align-right button {
  text-align: right !important;
}

@media print {
  /* Fractional screen borders can disappear in Chromium PDF output. */
  .ssis-print-form:not(.resolution-page):not(.approval-page) .ssis-form-table {
    box-sizing: border-box !important;
    border: 0 !important;
    border-top: 0.3mm solid #40484b !important;
    border-left: 0.3mm solid #40484b !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }

  .ssis-print-form:not(.resolution-page):not(.approval-page) .ssis-form-table th,
  .ssis-print-form:not(.resolution-page):not(.approval-page) .ssis-form-table td {
    border: 0 !important;
    border-right: 0.3mm solid #50585b !important;
    border-bottom: 0.3mm solid #50585b !important;
  }

  .resolution-page .ssis-form-table,
  .approval-page .ssis-form-table,
  .resolution-page .ssis-approval-box,
  .approval-page .ssis-approval-box {
    box-sizing: border-box !important;
    border: 0 !important;
    border-top: 0.22mm solid #50585b !important;
    border-left: 0.22mm solid #50585b !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }

  .resolution-page .ssis-form-table th,
  .resolution-page .ssis-form-table td,
  .approval-page .ssis-form-table th,
  .approval-page .ssis-form-table td,
  .resolution-page .ssis-approval-box th,
  .resolution-page .ssis-approval-box td,
  .approval-page .ssis-approval-box th,
  .approval-page .ssis-approval-box td {
    border-width: 0 0.22mm 0.22mm 0 !important;
    border-style: solid !important;
    border-color: #50585b !important;
  }

  /* Adjacent approval/resolution tables share one boundary line. */
  .resolution-page .resolution-meta + .resolution-lines,
  .resolution-page .resolution-lines + .resolution-bottom,
  .approval-page .approval-meta + .approval-lines,
  .approval-page .approval-lines + .approval-reason {
    border-top: 0 !important;
  }

  .contract-info-table,
  .contract-entry-table,
  .contract-signature-table {
    box-sizing: border-box !important;
    border: 0 !important;
    border-top: 0.3mm solid #555 !important;
    border-left: 0.3mm solid #555 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }

  .contract-info-table th,
  .contract-info-table td,
  .contract-entry-table th,
  .contract-entry-table td,
  .contract-signature-table th,
  .contract-signature-table td {
    border: 0 !important;
    border-right: 0.3mm solid #666 !important;
    border-bottom: 0.3mm solid #666 !important;
  }
}
