/* ==========================================
   스마트 QR 출석인증 시스템 - 컴포넌트 스타일
   ========================================== */

/* ------------------------------------------
   1. 성도 모바일 인증 화면 (Check-in View)
   ------------------------------------------ */
.checkin-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 0.5rem 0;
}

.checkin-hero-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  padding: 2.25rem 1.75rem;
  box-shadow: var(--shadow-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.checkin-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--primary-gradient);
}

.checkin-icon-circle {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .checkin-icon-circle {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.checkin-motto {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.85rem;
  letter-spacing: 0.04em;
  display: inline-block;
  padding: 0.25rem 0.85rem;
  background: var(--primary-light);
  border-radius: var(--radius-full);
}

.checkin-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.service-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

/* 최초 인증 입력 폼 */
.code-input-group {
  margin: 1.5rem 0;
  text-align: left;
}

.code-input-large {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 0.85rem 0.75rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-main);
  transition: all var(--transition-fast);
  font-family: monospace, var(--font-family);
}

.code-input-large:focus {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.2);
}

.device-registered-banner {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  margin-bottom: 1.5rem;
}

.device-registered-banner i {
  color: var(--success);
  font-size: 1.25rem;
}

.device-registered-banner .banner-text strong {
  display: block;
  font-size: 0.95rem;
  color: #065f46;
}

.device-registered-banner .banner-text span {
  font-size: 0.82rem;
  color: #047857;
}

[data-theme="dark"] .device-registered-banner {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .device-registered-banner .banner-text strong {
  color: #34d399;
}

[data-theme="dark"] .device-registered-banner .banner-text span {
  color: #a7f3d0;
}

/* 인증 확인 다이얼로그 모달 */
.confirm-message-box {
  background: var(--bg-card-subtle);
  border: 1px dashed var(--border-focus);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  margin: 1.25rem 0 1rem;
  text-align: center;
  position: relative;
  word-break: keep-all;
}

.confirm-text-main {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.5;
  word-break: keep-all;
}

.confirm-highlight {
  color: var(--primary);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.confirm-type-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0.25rem;
}

.confirm-type-badge.대면 {
  background: #10b981;
  color: white;
}

.confirm-type-badge.온라인 {
  background: #0284c7;
  color: white;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
}

.modal-footer .btn {
  white-space: nowrap !important;
  word-break: keep-all !important;
  font-size: 0.95rem;
  padding: 0.75rem 1.1rem;
}

.modal-footer .btn-secondary {
  flex: 0 0 auto;
}

.modal-footer .btn-success {
  flex: 1 1 auto;
}

/* 출석 완료 결과 카드 */
.success-result-card {
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.success-check-anim {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--success-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  80% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* ------------------------------------------
   2. QR 코드 관리자 생성기 & 디스플레이
   ------------------------------------------ */
.qr-admin-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.5rem;
}

.qr-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-card-subtle);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  min-height: 420px;
  text-align: center;
}

.qr-canvas-wrapper {
  background: white;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.25rem;
  display: inline-block;
  transition: transform var(--transition-normal);
}

.qr-canvas-wrapper:hover {
  transform: scale(1.02);
}

.qr-info-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

.qr-chip {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.service-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: var(--bg-card-subtle);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.service-type-btn {
  padding: 0.65rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.service-type-btn.active.inperson {
  background: var(--success);
  color: white;
  box-shadow: var(--shadow-sm);
}

.service-type-btn.active.online {
  background: var(--info);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* QR 풀스크린 프레젠테이션 뷰 (예배당 빔프로젝터용) */
.fullscreen-qr-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #090d16;
  color: white;
  z-index: 99999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background-image: radial-gradient(circle at 50% 30%, #1e1b4b 0%, #090d16 80%);
}

.fullscreen-qr-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

.fullscreen-close-btn {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.fullscreen-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.fullscreen-church-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #86efac;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.fs-lang-divider {
  color: #475569;
  font-size: 1.2rem;
}

.fullscreen-service-title {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  margin-bottom: 0.65rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.fs-service-item {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 2.1rem;
  font-weight: 900;
  color: #ffffff;
}

.fs-service-name {
  font-weight: 900;
  letter-spacing: -0.01em;
}

/* 17시 이전 낮 예배 (노란색 계열) */
.fs-service-name.service-color-day {
  color: #fde047 !important;
  text-shadow: 0 0 20px rgba(253, 224, 71, 0.45);
}

/* 17시 이후 저녁 예배 (주황색 계열) */
.fs-service-name.service-color-evening {
  color: #fb923c !important;
  text-shadow: 0 0 20px rgba(251, 146, 60, 0.45);
}

.fs-service-item .badge {
  font-size: 1.35rem;
  padding: 0.35rem 0.9rem;
  font-weight: 800;
  border-radius: 9999px;
  vertical-align: middle;
}

.fullscreen-service-subtitle {
  font-size: 1.25rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.fullscreen-qr-card {
  background: white;
  padding: 1.25rem;
  border-radius: 26px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 55px rgba(34, 197, 94, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#fs-qr-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

#fs-qr-container img,
#fs-qr-container canvas {
  width: min(560px, 54vh, 85vw) !important;
  height: min(560px, 54vh, 85vw) !important;
  display: block;
  image-rendering: pixelated;
}

.fullscreen-guide-multilang {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: center;
}

.fs-guide-line {
  font-size: 1.08rem;
  font-weight: 700;
  color: #e2e8f0;
  text-align: center;
}

/* ------------------------------------------
   언어 선택 스위처 (Language Selector)
   ------------------------------------------ */
.lang-switcher-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 0.3rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  color: var(--text-main);
}

.lang-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

/* ------------------------------------------
   3. 출석부 테이블 & 미인증 대체예배 처리
   ------------------------------------------ */
.attendance-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

/* 대면 장소 상단 시스템 상태 안내 바 (클릭 불가 정보 뱃지 스타일) */
.location-summary-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  background: var(--bg-card-subtle);
  padding: 0.65rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.location-summary-bar .summary-chip {
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  box-shadow: none;
  cursor: default !important;
  user-select: none;
  transition: none !important;
  transform: none !important;
}

[data-theme="dark"] .location-summary-bar {
  background: rgba(30, 41, 59, 0.5);
}

[data-theme="dark"] .location-summary-bar .summary-chip {
  background: rgba(19, 27, 46, 0.8);
  border-color: var(--border-color);
}

.location-summary-bar .summary-chip-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

/* 성전 목록 구분선 및 헤더 */
.location-section-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.5rem 0 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.location-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* GPS 매칭 테스트 결과 알림 박스 */
.gps-result-alert {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.15rem;
  margin-bottom: 1.25rem;
}

.gps-result-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  flex: 1;
}

.gps-result-text-group {
  flex: 0 1 auto;
  min-width: 260px;
}

.gps-result-minimap {
  width: 220px;
  height: 76px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  background: #e2e8f0;
  z-index: 1;
}

.minimap-tooltip {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 0.1rem 0.35rem !important;
  background: rgba(37, 99, 235, 0.9) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 4px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
}

.minimap-tooltip::before {
  display: none !important;
}

.gps-result-alert.match {
  background: #ecfdf5;
  border: 1px solid #10b981;
  color: #065f46;
}

.gps-result-alert.nomatch {
  background: #fffbeb;
  border: 1px solid #f59e0b;
  color: #92400e;
}

.gps-result-alert.error {
  background: #fef2f2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

[data-theme="dark"] .gps-result-alert.match {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

[data-theme="dark"] .gps-result-alert.nomatch {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fde68a;
}

[data-theme="dark"] .gps-result-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fecaca;
}

.gps-result-close-btn {
  background: transparent;
  border: none;
  color: currentColor;
  opacity: 0.6;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 1.15rem;
  line-height: 1;
  transition: opacity 0.15s;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 0.2rem;
}

.gps-result-close-btn:hover {
  opacity: 1;
}

@media (max-width: 1024px) {
  .attendance-summary-bar {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .location-summary-bar,
  .stats-summary-bar {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
}

@media (max-width: 640px) {
  .attendance-summary-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

.summary-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.summary-chip-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.summary-chip.all .summary-chip-icon { background: var(--primary-light); color: var(--primary); }
.summary-chip.inperson .summary-chip-icon { background: #d1fae5; color: #059669; }
.summary-chip.online .summary-chip-icon { background: #e0f2fe; color: #0284c7; }
.summary-chip.substitute .summary-chip-icon { background: #fef3c7; color: #d97706; }
.summary-chip.absent .summary-chip-icon { background: #f1f5f9; color: #64748b; }

.summary-chip-content {
  min-width: 0;
  flex: 1;
}

.summary-chip-content span {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-chip-content strong {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  letter-spacing: -0.02em;
  display: block;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.table-search-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  max-width: 480px;
}

.bulk-action-bar {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  animation: fadeIn 0.2s ease;
}

[data-theme="dark"] .bulk-action-bar {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
}

.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.custom-table th {
  background: var(--bg-card-subtle);
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.custom-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.custom-table tbody tr:hover {
  background-color: var(--bg-card-subtle);
}

.custom-table tbody tr:last-child td {
  border-bottom: none;
}

/* ------------------------------------------
   4. 출석 통계 대시보드 (Stats View)
   ------------------------------------------ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.chart-wrapper {
  position: relative;
  height: 280px;
  width: 100%;
  margin-top: 1rem;
}

/* ------------------------------------------
   5. 모달 팝업 공통
   ------------------------------------------ */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.active {
  display: flex;
  animation: fadeIn 0.2s ease forwards;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 540px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsive */
@media (max-width: 900px) {
  .qr-admin-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   대면 장소 (GPS) 관리 스타일
   ========================================================================== */
.modal-lg {
  max-width: 760px;
  width: 95%;
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.location-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.location-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.location-card.location-disabled {
  opacity: 0.6;
  background: var(--bg-card-subtle);
}

.location-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.location-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  display: flex;
  align-items: center;
}

.location-actions {
  display: flex;
  gap: 0.35rem;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.85rem;
}

.btn-icon:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-icon-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-color: var(--danger);
}

.location-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.location-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
}

.location-info-row .info-label {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
}

.location-info-row .info-val {
  font-weight: 500;
  color: var(--text-main);
  text-align: right;
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.4rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.76rem;
  padding: 0.15rem 0.4rem;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all var(--transition);
}

.map-link:hover {
  background: var(--primary);
  color: #ffffff;
}

.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ==========================================================================
   지도 위치 피커 (Map Picker) 스타일
   ========================================================================== */
.map-picker-section {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.9rem;
  margin-bottom: 0.5rem;
}

.map-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.map-search-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  max-width: 320px;
}

.map-search-group input {
  font-size: 0.84rem;
  padding: 0.35rem 0.6rem;
  height: 32px;
}

.map-search-group button {
  white-space: nowrap;
  height: 32px;
  padding: 0 0.65rem;
}

.map-quick-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.quick-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 0.2rem;
}

.quick-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full, 9999px);
  padding: 0.2rem 0.6rem;
  font-size: 0.76rem;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 500;
}

.quick-chip:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.quick-chip-gps {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.3);
  font-weight: 600;
}

.quick-chip-gps:hover {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
}

.map-picker-container {
  width: 100%;
  height: 270px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  z-index: 1; /* 모달 내 z-index 충돌 방지 */
  position: relative;
  background: #e5e7eb;
}

.map-picker-footer {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   Google 지도 링크 / 좌표 가져오기 카드 스타일
   ========================================================================== */
.google-maps-import-card {
  background: rgba(66, 133, 244, 0.06);
  border: 1px solid rgba(66, 133, 244, 0.25);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
}

.btn-google-maps-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #1a73e8;
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-google-maps-link:hover {
  background: #f8fafd;
  border-color: #1a73e8;
  color: #1557b0;
  box-shadow: 0 1px 3px rgba(66,133,244,0.2);
/* ==========================================================================
   관리자 로그인 화면 (Admin Login View) 스타일
   ========================================================================== */
.admin-login-container {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.admin-login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.75rem 2.25rem;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.admin-login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--primary-gradient);
}

.admin-login-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 1.5rem;
  border-radius: 20px;
  background: var(--primary-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 10px 25px rgba(22, 163, 74, 0.35);
}

.admin-login-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.admin-login-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.5;
  word-break: keep-all;
}

.admin-code-input {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-main);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  margin-bottom: 1.25rem;
}

.admin-code-input:focus {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.2);
}

/* 관리자 헤더 뱃지 및 로그아웃 버튼 */
.admin-user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-light);
  border: 1px solid rgba(22, 163, 74, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--primary);
}

[data-theme="dark"] .admin-user-badge {
  background: rgba(22, 163, 74, 0.15);
  border-color: rgba(22, 163, 74, 0.35);
  color: #4ade80;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-logout:hover {
  background: #fef2f2;
  color: var(--danger);
  border-color: #fecaca;
}

[data-theme="dark"] .btn-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}




