/* 비급여 진료비용 안내 (엑셀 연동 · 탭 + 검색) */

.npay-wrap {
  margin-top: 32px;
}

.npay-notice {
  background: #f4f8fb;
  border: 1px solid #d0e0ed;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 28px;
  font-size: 15px;
  line-height: 1.65;
  color: #3b4a64;
}

.npay-notice strong {
  color: #00457e;
}

.npay-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 20px;
}

.npay-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 auto;
}

.npay-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #c5d5e6;
  background: #fff;
  color: #00457e;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.npay-tab:hover {
  border-color: #1474d0;
  background: #eef5fb;
}

.npay-tab.is-active {
  background: linear-gradient(90deg, #1474d0, #005ab0);
  border-color: transparent;
  color: #fff;
}

.npay-search-wrap {
  flex: 0 1 280px;
  min-width: 200px;
}

.npay-search-wrap label {
  display: block;
  font-size: 13px;
  color: #6b7a90;
  margin-bottom: 6px;
}

.npay-search {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid #c5d5e6;
  border-radius: 8px;
  font-size: 15px;
}

.npay-search:focus {
  outline: none;
  border-color: #1474d0;
  box-shadow: 0 0 0 2px rgba(20, 116, 208, 0.15);
}

.npay-meta {
  font-size: 13px;
  color: #6b7a90;
  margin-bottom: 10px;
}

/* 비활성 탭은 UA [hidden]과 함께 쓰면 display 충돌에도 안전 */
.npay-panel:not(.is-active) {
  display: none !important;
}

.npay-panel.is-active {
  display: block;
}

.npay-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e5ebf3;
  border-radius: 12px;
  background: #fff;
}

.npay-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #e5ebf3;
  border-radius: 12px;
  background: #fafbfc;
}

.npay-pager-status {
  font-size: 14px;
  color: #3b4a64;
  text-align: center;
  min-width: 0;
  flex: 1 1 auto;
}

.npay-pager-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #c5d5e6;
  background: #fff;
  color: #00457e;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.npay-pager-btn:hover:not(:disabled) {
  border-color: #1474d0;
  background: #eef5fb;
}

.npay-pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 전역 table 규칙·반응형 스택 등과 충돌 시에도 표 그리드 유지 */
.npay-wrap .npay-table {
  display: table !important;
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 14px;
}

.npay-wrap .npay-table thead {
  display: table-header-group !important;
}

.npay-wrap .npay-table tbody {
  display: table-row-group !important;
}

.npay-wrap .npay-table tr {
  display: table-row !important;
}

.npay-wrap .npay-table thead th,
.npay-wrap .npay-table tbody td {
  display: table-cell !important;
}

.npay-wrap .npay-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #00457e;
  color: #fff;
  font-weight: 600;
  text-align: center;
  padding: 12px 10px;
  white-space: nowrap !important;
  vertical-align: middle;
  border-bottom: 2px solid #003359;
}

/* 한 줄 유지 → 행 높이 균일, 열 정렬 유지 (긴 텍스트는 가로 스크롤) */
.npay-wrap .npay-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  color: #333;
  vertical-align: middle;
  text-align: center;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal;
}

.npay-wrap .npay-table tbody tr:hover td {
  background: #fafcfe;
}

.npay-wrap .npay-table .npay-num {
  text-align: center;
  white-space: nowrap !important;
}

.npay-empty {
  padding: 48px 20px;
  text-align: center;
  color: #6b7a90;
  border: 1px dashed #c5d5e6;
  border-radius: 12px;
  background: #fafbfc;
}

@media (max-width: 769px) {
  .npay-tab {
    font-size: 14px;
    padding: 8px 14px;
  }

  .npay-wrap .npay-table {
    font-size: 13px;
  }

  .npay-wrap .npay-table thead th,
  .npay-wrap .npay-table tbody td {
    padding: 8px 6px;
  }
}
