.rr-match-main {
  max-width: 1240px;
  margin: 0 auto;
}

.rr-match-hero {
  margin: 1rem 0 0.9rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.rr-match-hero__title {
  margin: 0.2rem 0 0.4rem;
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
}

.rr-match-hero__lead {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
}

.rr-match-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.rr-match-kpi-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  padding: 1rem 1.05rem;
}

.rr-match-kpi-card__label {
  margin: 0;
  font-size: 0.83rem;
  color: #64748b;
  font-weight: 600;
}

.rr-match-kpi-card__value {
  margin: 0.35rem 0 0.2rem;
  font-size: 1.8rem;
  line-height: 1.1;
  color: #0f172a;
  font-weight: 800;
}

.rr-match-kpi-card__hint {
  margin: 0;
  font-size: 0.76rem;
  color: #94a3b8;
}

.rr-match-kpi-card--need {
  border-top: 3px solid #f97316;
}

.rr-match-kpi-card--ok {
  border-top: 3px solid #16a34a;
}

.rr-match-kpi-card--review {
  border-top: 3px solid #f59e0b;
}

.rr-match-kpi-card--manual {
  border-top: 3px solid #ef4444;
}

.rr-match-filter-panel,
.rr-match-table-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.rr-match-filter-panel {
  margin-bottom: 0.8rem;
  padding: 0.85rem 1rem;
}

.rr-match-filter-grid {
  display: grid;
  grid-template-columns: 140px 170px 190px 190px 1fr;
  gap: 0.55rem;
}

.rr-match-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}

.rr-match-filter-field span {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

.rr-match-filter-field input,
.rr-match-filter-field select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 0.45rem 0.55rem;
  font-size: 0.84rem;
}

.rr-match-table-wrap {
  overflow-x: auto;
}

.rr-match-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.rr-match-table th,
.rr-match-table td {
  padding: 0.58rem 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
  text-align: left;
}

.rr-match-table th {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 700;
  background: #f8fafc;
}

.rr-match-table__filename {
  max-width: 230px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rr-match-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.17rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.rr-match-badge--match-ok {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.rr-match-badge--match-review {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.rr-match-badge--match-need {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.rr-match-badge--match-fail {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

.rr-match-reason {
  display: block;
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.72rem;
}

.rr-match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.rr-match-action-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 8px;
  padding: 0.25rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
}

.rr-match-action-btn:hover {
  border-color: #94a3b8;
}

.rr-match-empty {
  text-align: center;
  color: #64748b;
  padding: 2rem 0.8rem;
}

.rr-match-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.rr-match-modal[hidden] {
  display: none;
}

.rr-match-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.rr-match-modal__dialog {
  position: relative;
  width: min(640px, 96vw);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
}

.rr-match-modal__head,
.rr-match-modal__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.rr-match-modal__foot {
  border-top: 1px solid #e2e8f0;
  border-bottom: 0;
}

.rr-match-modal__close {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.3rem;
}

.rr-match-modal__body {
  padding: 0.9rem 1rem;
}

.rr-match-modal__section {
  margin-bottom: 0.75rem;
}

.rr-match-modal__section h3 {
  margin: 0 0 0.4rem;
  font-size: 0.86rem;
}

.rr-match-modal__section input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 0.45rem 0.55rem;
}

.rr-match-modal__list {
  margin: 0;
  padding-left: 1.1rem;
  color: #475569;
}

.rr-match-modal__candidates {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.rr-match-candidate-btn {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 8px;
  padding: 0.3rem 0.55rem;
  font-size: 0.74rem;
  cursor: pointer;
}

@media (max-width: 1180px) {
  .rr-match-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rr-match-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rr-match-filter-field--grow {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .rr-match-kpi-grid {
    grid-template-columns: 1fr;
  }

  .rr-match-filter-grid {
    grid-template-columns: 1fr;
  }
}

/* —— 청구결과 버튼 —— */
.claim-result-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.6rem;
  padding: 0.28rem 0.55rem;
  border: 0;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  pointer-events: auto;
  transition: filter 0.15s, transform 0.1s;
}

.claim-result-btn:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

/* 결과확인 — 청구완료·발신완료·완료 공통 파란색 */
.claim-result-btn--confirm,
.claim-result-btn--done,
.claim-result-btn--sent {
  background: #eaf2ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.claim-result-btn--confirm:hover,
.claim-result-btn--done:hover,
.claim-result-btn--sent:hover {
  background: #dbeafe;
}

.claim-result-btn--hold {
  background: #ffedd5;
  color: #c2410c;
  box-shadow: inset 0 0 0 1px rgba(194, 65, 12, 0.22);
}

.claim-result-btn--failed {
  background: #fee2e2;
  color: #b91c1c;
  box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.22);
}

/* —— 청구 발신 결과 모달 —— */
.rr-claim-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.rr-claim-modal[hidden] {
  display: none;
}

.rr-claim-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}

.rr-claim-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border-radius: 18px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.rr-claim-modal__dialog--preview {
  width: min(520px, 94vw);
}

.rr-claim-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.15rem;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.rr-claim-modal__head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.rr-claim-modal__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #64748b;
  max-width: 36rem;
}

.rr-claim-modal__close {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  color: #64748b;
  flex-shrink: 0;
}

.rr-claim-modal__body {
  padding: 1rem 1.15rem 1.1rem;
  overflow-y: auto;
  flex: 1;
}

.rr-claim-modal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 0.85rem 1.15rem;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.rr-claim-banner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  margin-bottom: 0.9rem;
  border: 1px solid transparent;
}

.rr-claim-banner--ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.rr-claim-banner--sent {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.rr-claim-banner--warn {
  background: #fff7ed;
  border-color: #fed7aa;
}

.rr-claim-banner--danger {
  background: #fef2f2;
  border-color: #fecaca;
}

.rr-claim-banner__icon {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.rr-claim-banner__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

.rr-claim-banner__desc {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #475569;
}

.rr-claim-hold-list {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.78rem;
  color: #c2410c;
}

.rr-claim-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.rr-claim-summary-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.7rem 0.75rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.rr-claim-summary-card__label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}

.rr-claim-summary-card__value {
  margin: 0.28rem 0 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

.rr-claim-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.75rem;
}

.rr-claim-section__title {
  margin: 0 0 0.55rem;
  font-size: 0.84rem;
  font-weight: 800;
  color: #0f172a;
}

.rr-claim-dl {
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.rr-claim-dl__row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.28rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.8rem;
}

.rr-claim-dl__row:last-child {
  border-bottom: 0;
}

.rr-claim-dl__row dt {
  margin: 0;
  color: #64748b;
  font-weight: 600;
  flex-shrink: 0;
}

.rr-claim-dl__row dd {
  margin: 0;
  text-align: right;
  color: #0f172a;
  font-weight: 600;
}

.rr-claim-table-wrap {
  overflow-x: auto;
}

.rr-claim-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.rr-claim-table th,
.rr-claim-table td {
  padding: 0.45rem 0.4rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.rr-claim-table th {
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
}

.rr-claim-attach-status {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.68rem;
  font-weight: 700;
}

.rr-claim-attach-view {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 6px;
  padding: 0.15rem 0.4rem;
  font-size: 0.68rem;
  cursor: not-allowed;
  opacity: 0.65;
}

.rr-claim-consents {
  display: grid;
  gap: 0.35rem;
}

.rr-claim-consent-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: #334155;
}

.rr-claim-consent-ok {
  color: #16a34a;
  font-weight: 700;
  white-space: nowrap;
}

.rr-claim-consent-at {
  margin: 0.5rem 0 0;
  font-size: 0.72rem;
  color: #94a3b8;
}

.rr-claim-package-grid {
  display: grid;
  gap: 0.35rem;
}

.rr-claim-package-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  padding: 0.25rem 0;
  border-bottom: 1px dashed #e2e8f0;
}

.rr-claim-package-row:last-child {
  border-bottom: 0;
}

.rr-claim-package-row strong {
  color: #0f172a;
}

.rr-claim-preview-note {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
}

.rr-claim-preview-sheet {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
}

.rr-claim-preview-sheet h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: #0f172a;
}

.rr-claim-preview-sheet p {
  margin: 0.25rem 0;
  font-size: 0.84rem;
  color: #334155;
}

@media (max-width: 900px) {
  .rr-claim-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .rr-claim-summary-grid {
    grid-template-columns: 1fr;
  }

  .rr-claim-modal__foot {
    flex-direction: column;
    align-items: stretch;
  }

  .rr-claim-modal__foot .rr-btn {
    width: 100%;
    justify-content: center;
  }
}
