/**
 * 🎨 waitlist-manager.css
 * 호스피스 대기 순번 및 소풍 전광판 모달 스타일
 * 모던 고대비 파스텔 민트 BI & 다크모드 대응
 */

.wl-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  animation: wlFadeIn 0.2s ease-out;
}

.wl-modal-sheet {
  width: 100%;
  max-width: var(--app-max-width, 480px);
  height: 88vh;
  max-height: 88vh;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  padding: 20px 18px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
  animation: wlSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@keyframes wlFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes wlSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* 상단 헤더 */
.wl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.wl-header-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--sage-deep, #2d6a4f);
  background: rgba(45, 106, 79, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
}

.wl-header-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.wl-close-btn {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s;
}

.wl-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* 온기 전광판 티커 바 */
.wl-ticker-bar {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.wl-ticker-tag {
  background: #10b981;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.wl-ticker-track {
  font-size: 12.5px;
  color: #065f46;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.wl-ticker-time {
  font-size: 11px;
  color: #047857;
  opacity: 0.8;
  margin-left: 4px;
}

/* 🕊️ 암환우 가족 집단지성 안심 안내 배너 */
.wl-collective-banner {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1.5px solid #a7f3d0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.06);
}

.wl-collective-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.wl-collective-icon {
  font-size: 18px;
}

.wl-collective-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.wl-collective-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #065f46;
}

.wl-collective-badge {
  font-size: 10px;
  font-weight: 700;
  background: #10b981;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
}

.wl-collective-desc {
  font-size: 12px;
  color: #1e3a2b;
  line-height: 1.55;
  margin: 0 0 10px 0;
  word-break: keep-all;
}

.wl-collective-points {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(167, 243, 208, 0.6);
}

.point-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11.5px;
  color: #334155;
  line-height: 1.45;
  word-break: keep-all;
}

.point-dot {
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}

.wl-collective-footer {
  font-size: 11px;
  font-weight: 700;
  color: #047857;
  background: rgba(16, 185, 129, 0.1);
  padding: 7px 10px;
  border-radius: 8px;
  text-align: center;
  line-height: 1.4;
  word-break: keep-all;
}

/* 빈 상태 가이드 */
.wl-empty-guide {
  text-align: center;
  padding: 36px 20px;
  background: #f8fafc;
  border-radius: 16px;
  border: 1.5px dashed #cbd5e1;
  margin-top: 6px;
}

/* 섹션 타이틀 */
.wl-section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.wl-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #334155;
}

.wl-btn-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #2d6a4f;
  color: #ffffff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.wl-btn-add:hover {
  background: #1b4332;
}

/* 대기 카드 */
.wl-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.wl-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.wl-card:hover {
  border-color: #cbd5e1;
}

.wl-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.wl-card-name-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wl-hospital-name {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  word-break: keep-all;
}

.wl-status-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 4px;
  width: fit-content;
}

.wl-status-tag.waiting {
  background: #fef3c7;
  color: #b45309;
}

.wl-status-tag.admitted {
  background: #d1fae5;
  color: #047857;
}

.wl-rank-display {
  text-align: right;
  display: flex;
  flex-direction: column;
}

.wl-rank-sub {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
}

.wl-rank-num {
  font-size: 22px;
  font-weight: 900;
  color: #2d6a4f;
  line-height: 1.1;
}

.wl-rank-unit {
  font-size: 13px;
  font-weight: 700;
  margin-left: 2px;
}

.wl-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 10px;
}

/* 2대 다이얼러 액션 그리드 */
.wl-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.wl-btn-tel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.wl-btn-tel.primary {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.wl-btn-tel.primary:hover {
  background: #d1fae5;
}

.wl-btn-tel.secondary {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.wl-btn-tel.secondary:hover {
  background: #f1f5f9;
}

/* 카드 하단 버튼 */
.wl-card-footer-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px dashed #f1f5f9;
  padding-top: 8px;
}

.wl-btn-small {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s;
}

.wl-btn-small:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.wl-btn-small.delete {
  margin-left: auto;
  color: #ef4444;
  border-color: #fecaca;
}

.wl-btn-small.delete:hover {
  background: #fef2f2;
}

/* 순번 이력 타임라인 */
.wl-history-wrap {
  background: #f8fafc;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid #e2e8f0;
}

.wl-history-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 10px;
}

.wl-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wl-history-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.wl-history-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  margin-top: 5px;
  flex-shrink: 0;
}

.wl-history-content {
  display: flex;
  flex-direction: column;
  font-size: 11.5px;
  line-height: 1.35;
}

.wl-history-hosp {
  font-weight: 700;
  color: #334155;
}

.wl-history-desc {
  color: #64748b;
}

.wl-history-date {
  font-size: 10px;
  color: #94a3b8;
}

/* 토스트 */
.wl-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1100;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.wl-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 3단 필터 탭 바 */
.wl-filter-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 12px;
}

.wl-filter-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 8px 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.wl-filter-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* 원터치 스텝퍼 버튼 ([-] 진전 / [+] 밀림) */
.wl-rank-stepper-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-step-action {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-step-action:active {
  transform: scale(0.92);
}

.btn-step-action.step-down {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}

.btn-step-action.step-down:hover {
  background: #d1fae5;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-step-action.step-up {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.btn-step-action.step-up:hover {
  background: #ffedd5;
}

.step-sign {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.step-text {
  font-size: 9.5px;
  font-weight: 800;
  margin-top: 1px;
}

/* DPR 병상 회전 속도 및 입원 예측 배너 */
.wl-dpr-prediction-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 10px;
}

.dpr-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  margin-bottom: 3px;
}

.dpr-label {
  font-weight: 700;
  color: #166534;
}

.dpr-val {
  font-size: 11.5px;
  color: #15803d;
}

.dpr-sub-desc {
  font-size: 11px;
  color: #475569;
  line-height: 1.35;
}

/* 127개 호스피스 전수 검색 모달 */
.wl-hosp-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.7);
  z-index: 1200;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.wl-hosp-search-box {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  max-height: 80vh;
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.search-box-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.btn-close-search {
  background: none;
  border: none;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
}

.wl-search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13.5px;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 12px;
}

.wl-search-input:focus {
  border-color: #10b981;
}

.wl-search-results-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wl-hosp-result-item {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wl-hosp-result-item:hover {
  background: #f0fdf4;
  border-color: #a7f3d0;
}

.result-item-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 2px;
}

.result-item-addr {
  font-size: 11px;
  color: #64748b;
}

/* 인라인 호스피스 등록 뷰 (View B) */
.wl-add-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wl-add-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.wl-btn-back {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wl-btn-back:hover {
  background: #e2e8f0;
}

.wl-add-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.wl-selected-confirm-box {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: wlFadeIn 0.2s ease-out;
}

.wl-selected-hosp-top {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wl-selected-hosp-title {
  font-size: 15px;
  font-weight: 800;
  color: #166534;
}

.wl-selected-hosp-sub {
  font-size: 11.5px;
  color: #475569;
}

.wl-selected-rank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #bbf7d0;
}

.wl-rank-stepper-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-rank-step {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-rank-step:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.wl-rank-number-val {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  min-width: 44px;
  text-align: center;
}

.wl-btn-submit-case {
  width: 100%;
  background: #2d6a4f;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 13px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 4px 12px rgba(45, 106, 79, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.wl-btn-submit-case:hover {
  background: #1b4332;
}

.wl-btn-submit-case:active {
  transform: scale(0.98);
}

.wl-hosp-result-item.selected {
  background: #ecfdf5;
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.wl-add-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 12px;
}

.wl-inline-search-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

/* 🕊️ 세련된 미니멀 순번 스텝퍼 & 인라인 직접 타이핑 위젯 */
.wl-pure-stepper {
  display: inline-flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 2px 3px;
  gap: 2px;
  transition: all 0.15s ease;
}

.wl-pure-stepper:focus-within {
  border-color: #10b981;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12);
}

.pure-step-btn {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.1s ease;
  user-select: none;
  padding: 0;
  line-height: 1;
}

.pure-step-btn:active {
  transform: scale(0.92);
}

.pure-step-btn.step-down {
  color: #059669;
}

.pure-step-btn.step-down:hover {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.pure-step-btn.step-up {
  color: #d97706;
}

.pure-step-btn.step-up:hover {
  background: #fffbeb;
  border-color: #fde68a;
}

.pure-rank-input-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}

.pure-rank-input {
  width: 36px;
  min-width: 36px;
  border: none;
  background: transparent;
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  outline: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  -moz-appearance: textfield;
  appearance: textfield;
}

.pure-rank-input::-webkit-outer-spin-button,
.pure-rank-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pure-rank-unit {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-left: 1px;
}

/* 2단 깔끔 액션 바 */
.wl-clean-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.wl-btn-tel-pure {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #2d6a4f;
  color: #ffffff;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 0.15s;
}

.wl-btn-tel-pure:hover {
  background: #1b4332;
}

.wl-btn-share-pure {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wl-btn-share-pure:hover {
  background: #e2e8f0;
}

.wl-btn-delete-pure {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #ef4444;
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.wl-btn-delete-pure:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
}

.btn-direct-add-hosp.already {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #cbd5e1;
  cursor: default;
}

.btn-direct-add-hosp.already:hover {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #cbd5e1;
}

/* 💾 스텝퍼 우측 변경사항 저장 버튼 */
.wl-stepper-save-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.wl-btn-save-rank {
  height: 28px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.wl-btn-save-rank:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
  color: #047857;
}

.wl-btn-save-rank:active {
  transform: scale(0.95);
}

/* 127개 목록 내 1터치 바로 등록 버튼 */
.wl-hosp-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  transition: all 0.15s ease;
}

.wl-hosp-result-item:hover {
  border-color: #86efac;
  background: #f0fdf4;
}

.wl-hosp-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 10px;
}

.btn-direct-add-hosp {
  background: #ecfdf5;
  color: #065f46;
  border: 1.5px solid #a7f3d0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-direct-add-hosp:hover {
  background: #2d6a4f;
  color: #ffffff;
  border-color: #2d6a4f;
}

/* ⭐ 관심 병원 등록 버튼 */
.btn-toggle-favorite {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.btn-toggle-favorite:hover {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.btn-toggle-favorite.active {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #b45309;
  font-weight: 800;
}

/* 관심 병원 탭 내 전용 카드 */
.wl-favorite-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.15s ease;
}

.wl-favorite-card:hover {
  border-color: #cbd5e1;
}

.wl-fav-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.wl-fav-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.wl-btn-fav-transfer {
  flex: 1;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 7px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.wl-btn-fav-transfer:hover {
  background: #2d6a4f;
  color: #ffffff;
  border-color: #2d6a4f;
}

.wl-btn-fav-remove {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wl-btn-fav-remove:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

/* ⏱️ 각 병원 카드 내 접이식(아코디언) 타임라인 */
.wl-card-history-section {
  margin-top: 10px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 8px;
}

.wl-card-history-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wl-card-history-toggle:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.wl-card-history-body {
  margin-top: 6px;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: wlFadeIn 0.2s ease-out;
}

.wl-card-history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 4px;
}

.wl-card-history-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* 🌟 최초 접수 시작점 전용 배지 및 행 스타일 */
.wl-card-history-row.is-initial-log {
  background: #f0fdf4;
  border-radius: 6px;
  padding: 4px 6px;
  border-bottom: none;
  margin-top: 2px;
}

.wl-log-text-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.wl-initial-badge {
  font-size: 9.5px;
  font-weight: 800;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
  line-height: 1.2;
}

/* 🕊️ 최초 대기 등록 순번 입력 미니 모달 */
.wl-prompt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  animation: wlFadeIn 0.2s ease-out;
}

.wl-prompt-card {
  width: 100%;
  max-width: 320px;
  background: #ffffff;
  border-radius: 20px;
  padding: 20px 18px 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: wlSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.wl-prompt-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wl-prompt-icon {
  font-size: 24px;
  line-height: 1;
}

.wl-prompt-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wl-prompt-hospital {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.wl-prompt-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--sage-deep, #2d6a4f);
}

.wl-prompt-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
  margin: 0;
}

.wl-prompt-input-row {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 8px 14px;
  gap: 6px;
  transition: all 0.15s ease;
}

.wl-prompt-input-row:focus-within {
  border-color: #10b981;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.wl-prompt-input {
  width: 90px;
  font-size: 26px;
  font-weight: 900;
  color: #0f172a;
  text-align: center;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  -moz-appearance: textfield;
  appearance: textfield;
}

.wl-prompt-input::-webkit-outer-spin-button,
.wl-prompt-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.wl-prompt-unit {
  font-size: 15px;
  font-weight: 800;
  color: #475569;
}

.wl-prompt-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.wl-prompt-btn-cancel {
  flex: 1;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wl-prompt-btn-cancel:hover {
  background: #e2e8f0;
}

.wl-prompt-btn-confirm {
  flex: 2;
  background: var(--sage-deep, #2d6a4f);
  border: none;
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s;
  box-shadow: 0 2px 6px rgba(45, 106, 79, 0.25);
}

.wl-prompt-btn-confirm:hover {
  background: #1b4332;
}




