/**
 * 🕊️ hospice-web-pwa / funeral-guestbook.css
 * 소풍 디지털 부의금 방명록 & 정산기 단일 전용 디자인 시스템 (SSOT)
 * 포레스트 세이지 보더리스 서페이스, 모바일 1열 카드, 300줄 레고 블록 엄수 (v7.8.39)
 */

/* 1. 상단 내비게이션 및 액션 바 */
.guestbook-app-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding-bottom: 90px;
}

.top-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03), 0 4px 12px -2px rgba(30,54,42,0.05);
  border: 1px solid #e2ece6;
}

.nav-title-group h1 {
  font-size: 16px;
  font-weight: 800;
  color: #1e362a;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px 0;
}

.nav-title-group p {
  font-size: 11.5px;
  color: #64748b;
  margin: 0;
}

.nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.nav-link-btn {
  background: #f1f5f9;
  color: #334155;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.nav-link-btn:active {
  transform: scale(0.96);
}

#btnQuickFinishAssign {
  background: #3e6553 !important;
  color: #ffffff !important;
}

#btnOpenPrivacyModal {
  background: #e2ece6 !important;
  color: #1e362a !important;
}

/* 2. 대시보드 종합 요약 카드 */
.summary-section {
  background: #ffffff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 2px 8px -2px rgba(30,54,42,0.06);
  border: 1px solid #e2ece6;
}

.d-plus-banner {
  background: #f0f7f3;
  border: 1px solid #d1e5d9;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.d-plus-banner-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.d-plus-badge-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.d-plus-title {
  font-weight: 800;
  font-size: 13px;
  color: #1e362a;
  display: flex;
  align-items: center;
  gap: 4px;
}

.d-plus-golden-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  padding: 1px 7px;
  border-radius: 9999px;
  letter-spacing: 0.2px;
}

.btn-banner-thank {
  background: #3e6553;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(30, 54, 42, 0.15);
  transition: all 0.15s ease;
}

.btn-banner-thank:active {
  transform: scale(0.96);
}

.d-plus-banner-desc {
  font-size: 11.5px;
  color: #4b6356;
  line-height: 1.5;
  margin: 0;
}

.summary-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 12px;
}

.hero-label {
  font-size: 12.5px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 2px;
}

.hero-total-amount {
  font-size: 26px;
  font-weight: 900;
  color: #1e362a;
  letter-spacing: -0.5px;
}

.hero-stat-badge {
  text-align: right;
}

.badge-count {
  display: inline-block;
  background: #e2ece6;
  color: #1e362a;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 9999px;
  margin-bottom: 3px;
}

.badge-unassigned {
  font-size: 11px;
  color: #dc2626;
  font-weight: 700;
}

.beneficiary-slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-summary-badge {
  background: #3e6553;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.btn-privacy-badge {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.beneficiary-slider {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.beneficiary-slider::-webkit-scrollbar {
  display: none;
}

.bene-card {
  flex: 0 0 auto;
  min-width: 120px;
  background: #ffffff;
  border: 1px solid #eef3f0;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.bene-card.active {
  background: #eaf2ed;
  border-color: #c8e0d3;
  box-shadow: 0 2px 8px rgba(30, 54, 42, 0.08);
}

.bene-card-name {
  font-size: 12px;
  font-weight: 800;
  color: #1e362a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.bene-card-count {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
}

.bene-card-amount {
  font-size: 14.5px;
  font-weight: 800;
  color: #3e6553;
}

.bene-card.unassigned .bene-card-amount {
  color: #dc2626;
}

/* 3. 검색 & 초성 & 칩 필터 */
.controls-panel {
  background: #ffffff;
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid #e2ece6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.search-bar-wrap {
  position: relative;
  margin-bottom: 8px;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 8px 32px 8px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13.5px;
  outline: none;
  background: #f8fafc;
  color: #0f172a;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: #3e6553;
  background: #ffffff;
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  display: none;
}

.chosung-bar {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  padding: 4px 0 8px;
  scrollbar-width: none;
}

.chosung-bar::-webkit-scrollbar {
  display: none;
}

.chosung-btn {
  flex: 0 0 auto;
  min-width: 27px;
  height: 27px;
  border-radius: 6px;
  border: none;
  background: #f1f5f9;
  color: #475569;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chosung-btn.active {
  background: #3e6553;
  color: #ffffff;
}

.filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.bene-filter-scroll {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.bene-filter-scroll::-webkit-scrollbar {
  display: none;
}

.chip-filter {
  flex: 0 0 auto;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
}

.chip-filter.active {
  background: #1e362a;
  color: #ffffff;
}

.sort-select {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  outline: none;
}

/* 4. 명부 리스트 & 카드 & 도장 컨트롤러 */
.list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  padding: 0 4px;
}

.badge-edit-guest {
  background: #e2ece6;
  color: #1e362a;
  border: none;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.stamp-control-box {
  background: #f8fafc;
  border: 1.5px solid #e2ece6;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.select-stamp-bene {
  padding: 5px 10px;
  border: 1.5px solid #3e6553;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 800;
  background: #ffffff;
  color: #1e362a;
  outline: none;
}

.btn-stamp-action {
  border: none;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-stamp-csv {
  background: #0284c7;
  color: #ffffff;
}

.btn-stamp-kakao {
  background: #d97706;
  color: #ffffff;
}

/* 5. 140명 개별 조문객 카드 (모바일 1열) */
.guest-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid #e2ece6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.guest-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.badge-no {
  font-size: 10.5px;
  font-weight: 800;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-photo-link {
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.guest-name {
  font-size: 16px;
  font-weight: 800;
  color: #1e362a;
  letter-spacing: -0.3px;
}

.guest-affiliation {
  font-size: 11.5px;
  color: #64748b;
  background: #f8fafc;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  display: inline-block;
  margin-top: 2px;
}

.guest-amount-wrap {
  text-align: right;
}

.guest-amount {
  font-size: 17px;
  font-weight: 900;
  color: #1e362a;
}

.bene-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 11px;
  margin-top: 3px;
}

.bene-tag.assigned {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.bene-tag.unassigned {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* 카드 내부 답례 및 커피 액션 버튼 */
.btn-card-notice {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.btn-card-coffee {
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fef08a;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.btn-card-thank-toggle {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.btn-card-thank-toggle.thanked {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

/* 도장 원터치 배정 버튼 그룹 */
/* 도장 원터치 배정 버튼 그룹 (V7.7.0 초슬림 1/3 압축) */
.assignment-bar {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.btn-stamp-action {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-stamp-action.btn-stamp-apply {
  background: var(--color-primary-pale, #E2ECE6);
  color: var(--color-primary-deep, #1E362A);
  flex: 1;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(30, 54, 42, 0.05);
}

.btn-stamp-action.btn-stamp-apply:hover {
  background: #3e6553;
  color: #ffffff;
}

.btn-stamp-action.btn-stamp-cancel {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  flex: 1;
  justify-content: center;
  font-weight: 800;
}

.btn-stamp-action.btn-stamp-change {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
  flex: 1;
  justify-content: center;
  font-size: 11.5px;
}

.btn-stamp-action.btn-stamp-custom {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  padding: 6px 10px;
  font-size: 11px;
}

/* 6. 완료 카드 & 하단 플로팅 바 & FAB */
.bottom-finish-card {
  background: #ffffff;
  border: 1.5px solid #a7f3d0;
  border-radius: 16px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(16,185,129,0.06);
}

.bottom-unassigned-notice {
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
  background: #fffbeb;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #fef3c7;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.btn-finish-save {
  width: 100%;
  height: 48px;
  font-size: 15px;
  font-weight: 800;
  background: #16a34a;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(22,163,74,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.bottom-floating-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: var(--app-max-width, 440px);
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  padding: 10px 14px env(safe-area-inset-bottom, 12px);
  display: flex;
  gap: 8px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
  border-top: 1px solid #e2ece6;
  z-index: 100;
}

.action-btn {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: none;
  cursor: pointer;
}

.action-btn-primary {
  background: #3e6553;
  color: #ffffff;
}

.action-btn-secondary {
  background: #e2ece6;
  color: #1e362a;
}

.action-btn-gold {
  background: #f1f5f9;
  color: #475569;
}

.gift-fab-btn {
  position: fixed;
  bottom: 74px;
  right: 16px;
  background: #1e362a;
  color: #ffffff;
  border: 1.5px solid #3e6553;
  border-radius: 9999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 8px 24px rgba(30,54,42,0.3);
  cursor: pointer;
  z-index: 99;
}

.gift-fab-badge {
  background: #f59e0b;
  color: #000000;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 9999px;
}

/* 7. 모달 공통 스타일 및 가족 모달 */
#funeralGuestbookApp .modal-overlay,
.funeral-guestbook-container .modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#funeralGuestbookApp .modal-overlay.open,
.funeral-guestbook-container .modal-overlay.open {
  display: flex !important;
}

.modal-card {
  background: #ffffff;
  border-radius: 18px;
  width: 100%;
  max-width: 440px;
  max-height: 85dvh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: #1e362a;
  margin: 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}

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

.edit-modal-body {
  padding: 16px;
}

.header-action-btn {
  background: #e2ece6;
  color: #1e362a;
  border: none;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.family-modal-body {
  padding: 14px;
  overflow-y: auto;
  max-height: 70vh;
}

.family-photo-banner {
  background: #1e362a;
  color: #ffffff;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.family-photo-banner-title {
  font-size: 13px;
  font-weight: 800;
}

.family-photo-banner-sub {
  font-size: 11px;
  color: #cbd5e1;
  margin-top: 2px;
}

.family-group-card {
  background: #ffffff;
  border: 1px solid #e2ece6;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}

.family-group-header {
  background: #f8fafc;
  padding: 8px 12px;
  border-bottom: 1px solid #e2ece6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.family-group-title {
  font-size: 13px;
  font-weight: 800;
  color: #1e362a;
}

.family-jump-btn {
  background: #3e6553;
  color: #ffffff;
  border: none;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.family-member-row {
  padding: 9px 12px;
  border-bottom: 1px solid #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-copy-account {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.modal-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.btn-modal-action {
  flex: 1;
  height: 42px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-modal-save {
  background: #3e6553;
  color: #ffffff;
}

.btn-modal-cancel {
  background: #f1f5f9;
  color: #475569;
}

.btn-modal-delete {
  background: #fee2e2;
  color: #dc2626;
}

/* 토스트 메시지 */
.toast-message {
  position: fixed;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(30, 54, 42, 0.95);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 9999px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  z-index: 20000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* 11. 가족 명부 수정 모달 모던 카드 레이아웃 */
.fam-edit-card {
  background: #ffffff;
  border: 1px solid #e2ece6;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(30, 54, 42, 0.04);
}

.fam-edit-photo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.fam-avatar-preview {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2ece6;
  background: #f8fafc;
}

.fam-photo-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.fam-btn-photo-del {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.fam-form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.fam-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fam-input-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.fam-edit-input {
  width: 100%;
  height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 12.5px;
  color: #1e293b;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.fam-edit-input:focus {
  outline: none;
  border-color: #3e6553;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(62, 101, 83, 0.12);
}

.fam-account-box {
  background: #f8fafc;
  border: 1px solid #e2ece6;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}

.fam-account-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 6px;
}

.fam-bene-toggle-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
}

.fam-bene-toggle-badge input[type="checkbox"] {
  accent-color: #16a34a;
  width: 16px;
  height: 16px;
}

.fam-btn-del-card {
  width: 100%;
  height: 32px;
  background: #fff;
  border: 1px dashed #fca5a5;
  color: #ef4444;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* 초슬림 콤팩트 가족 명부 카드 & 툴바 (스크롤 피로도 80% 제거 V7.8.41) */
.fam-quick-tools-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.btn-fam-tool {
  flex: 1;
  height: 36px;
  border: 1px solid #C8E0D3;
  background: #F0F7F3;
  color: #1E362A;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-fam-tool:hover {
  background: #E2ECE6;
  border-color: #3E6553;
}

.fam-slim-card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 6px 8px;
  margin-bottom: 6px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.fam-slim-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.fam-slim-row-1 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.fam-slim-row-2 {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fam-slim-num {
  font-size: 11px;
  font-weight: 800;
  color: #94A3B8;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.fam-slim-input {
  height: 28px;
  padding: 3px 6px;
  border: 1px solid #CBD5E1;
  border-radius: 5px;
  background: #F8FAFC;
  font-size: 11.5px;
  color: #1E293B;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.fam-slim-input:focus {
  outline: none;
  border-color: #3E6553;
  background: #FFFFFF;
  box-shadow: 0 0 0 2px rgba(62, 101, 83, 0.1);
}

.fam-slim-input.fam-role {
  width: 78px;
  flex-shrink: 0;
  font-weight: 700;
}

.fam-slim-input.fam-name {
  flex: 1;
  min-width: 60px;
  font-weight: 800;
  color: #0F172A;
}

.fam-slim-input.fam-phone {
  flex: 1.1;
  min-width: 85px;
}

.fam-slim-input.fam-bank {
  width: 56px;
  flex-shrink: 0;
}

.fam-slim-input.fam-account {
  flex: 1.4;
  min-width: 95px;
}

.fam-slim-check-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: #15803D;
  background: #DCFCE7;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  user-select: none;
}

.fam-slim-check-label input {
  accent-color: #16A34A;
  width: 13px;
  height: 13px;
  margin: 0;
}

.btn-fam-del-slim {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: #94A3B8;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-fam-del-slim:hover {
  background: #FEE2E2;
  color: #DC2626;
}