/* ==========================================================================
   스마트 목장사역일지 - Components CSS (컴포넌트 스타일)
   모바일 터치 친화적 & 어르신 목자님들도 편안한 시원한 가독성 디자인
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Typography & General Helpers
   -------------------------------------------------------------------------- */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-600); }
.text-urgent { color: var(--status-urgent); }

/* --------------------------------------------------------------------------
   2. Buttons (캡슐형 9999px rounded-full 형태 및 Soft Editorial 톤)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-full); /* 9999px 캡슐 형태 */
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  text-decoration: none;
  line-height: 1.25;
  user-select: none;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--primary-500); /* Deep Sage Green #3B5249 */
  color: #FFFDF9;
  box-shadow: 0 2px 8px rgba(59, 82, 73, 0.22);
}
.btn-primary:hover {
  background-color: var(--primary-600);
  box-shadow: 0 4px 14px rgba(59, 82, 73, 0.3);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-default);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background-color: var(--bg-subtle);
  border-color: var(--border-focus);
}

.btn-outline-primary {
  background-color: transparent;
  color: var(--primary-500);
  border-color: var(--primary-300);
}
.btn-outline-primary:hover {
  background-color: var(--primary-50);
  border-color: var(--primary-500);
}

.btn-amber {
  background-color: var(--amber-500);
  color: #FFFDF9;
}
.btn-amber:hover {
  background-color: var(--amber-600);
}

.btn-terracotta {
  background-color: var(--terracotta-500); /* Terracotta #8C5A3C */
  color: #FFFDF9;
}
.btn-terracotta:hover {
  background-color: var(--terracotta-600);
}

.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.825rem;
  border-radius: var(--radius-full); /* 캡슐 형태 */
}

.btn-lg {
  padding: 0.85rem 1.8rem;
  font-size: 1.05rem;
  border-radius: var(--radius-full); /* 캡슐 형태 */
}

.btn-block {
  width: 100%;
}

/* --------------------------------------------------------------------------
   3. Status Badges & Tags
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
}

.badge-draft {
  background-color: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.badge-submitted {
  background-color: var(--primary-50);
  color: var(--primary-700);
  border: 1px solid var(--primary-200);
}

.badge-leader-done {
  background-color: var(--sub-50);
  color: var(--sub-700);
  border: 1px solid var(--sub-200);
}

.badge-completed {
  background-color: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}

.badge-urgent {
  background-color: #f8fafc;
  color: #334155;
  border: 1px solid #94a3b8;
}

.badge-role {
  padding: 0.3rem 0.75rem;
  font-weight: 700;
  font-size: 0.8rem;
  border: 1px solid var(--border-default);
}
.badge-role-shepherd,
.badge-role-leader,
.badge-role-pastor,
.badge-role-admin,
.badge-role-sysadmin {
  background-color: #f8fafc;
  color: #334155;
}

/* --------------------------------------------------------------------------
   4. Cards & Containers (Soft Editorial 규격: 반경 16px, 내부 여백 24px, 앰비언트 그림자)
   -------------------------------------------------------------------------- */
.card {
  background-color: var(--bg-card); /* #FFFDF9 Warm Ivory White */
  border: 1px solid var(--border-default); /* 1px solid Warm Stone #E6DFD3 */
  border-radius: var(--radius-card); /* 16px (rounded-2xl) */
  padding: 1rem 1.15rem; /* 모바일·태블릿 가독성을 위해 여백 최적화 */
  box-shadow: var(--shadow-card); /* 0 4px 20px -2px rgba(44, 38, 35, 0.05) */
  transition: box-shadow var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}

.card-hover:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-300);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-family: var(--font-heading); /* 'Noto Serif KR', Georgia, serif */
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  letter-spacing: -0.015em;
}

.card-section {
  margin-bottom: var(--space-6);
}
.card-section:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   5. Form Controls
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: var(--space-2);
}

.form-label .required {
  color: var(--status-urgent);
  margin-left: 2px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-1);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg-surface); /* #FFFDF9 */
  border: 1px solid var(--border-default); /* #E6DFD3 */
  border-radius: var(--radius-md); /* 12px */
  font-size: 0.98rem;
  color: var(--text-main);
  box-shadow: inset 0 1px 2px rgba(44, 38, 35, 0.02);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary-500); /* Deep Sage Green */
  box-shadow: 0 0 0 3px rgba(59, 82, 73, 0.12);
  background-color: #ffffff;
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}

/* Quick tag selector chips */
.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.tag-chip {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
}

.tag-chip:hover {
  background-color: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-600);
}

/* --------------------------------------------------------------------------
   6. Attendance Grid & Member Row (컴팩트 원터치 출석부)
   -------------------------------------------------------------------------- */
.member-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.4rem;
}

.member-card {
  background-color: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  transition: all var(--transition-fast);
}

.member-card.status-present {
  background-color: var(--primary-50);
  border-color: var(--primary-300);
}

.member-card.status-absent {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.member-card.status-online {
  background-color: var(--sub-50);
  border-color: var(--sub-200);
}

.member-info {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  overflow: hidden;
}

.member-avatar {
  display: none;
}

.member-meta {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
}

.member-role {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.attendance-buttons {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.btn-att {
  padding: 0.22rem 0.52rem;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid var(--border-default);
  background: #ffffff;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1.2;
}

.btn-att.active-present {
  background-color: var(--primary-500);
  border-color: var(--primary-600);
  color: #ffffff;
}

.btn-att.active-absent {
  background-color: #475569;
  border-color: #334155;
  color: #ffffff;
}

.btn-att.active-online {
  background-color: var(--sub-600);
  border-color: var(--sub-700);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   7. VIP Status Tracker Card (VIP 영혼구원 단계 - 미니멀 톤)
   -------------------------------------------------------------------------- */
.vip-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
  position: relative;
}

.vip-badge-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background-color: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--border-default);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.vip-step-tracker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin: var(--space-3) 0;
  padding: 0 var(--space-2);
}

.vip-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  z-index: 1;
  cursor: pointer;
}

.vip-step-circle {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  border: 2px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.vip-step-item.active .vip-step-circle {
  background-color: var(--primary-500);
  border-color: var(--primary-500);
  color: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-100);
}

.vip-step-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}
.vip-step-item.active .vip-step-label {
  color: var(--primary-700);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   8. 3-Step Feedback Timeline & Comment Thread
   -------------------------------------------------------------------------- */
.feedback-thread {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
}

.comment-box {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-xs);
  position: relative;
  transition: all var(--transition-fast);
}

/* Role-specific comment styling (미니멀 톤) */
.comment-box.role-leader {
  background-color: #ffffff;
  border-left: 3px solid var(--sub-500);
}

.comment-box.role-pastor {
  background-color: #ffffff;
  border-left: 3px solid var(--primary-500);
}

.comment-box.role-shepherd-reply {
  background-color: #f8fafc;
  border-left: 3px solid #94a3b8;
  margin-left: var(--space-4);
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.comment-author {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid var(--border-default);
}
.author-avatar.leader { background-color: #f8fafc; color: var(--text-main); }
.author-avatar.pastor { background-color: #f8fafc; color: var(--text-main); }
.author-avatar.shepherd { background-color: #f8fafc; color: var(--text-main); }

.author-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}

.comment-time {
  font-size: 0.78rem;
  color: var(--text-light);
}

.comment-body {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.65;
  white-space: pre-wrap;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px dashed var(--border-subtle);
}

.reaction-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all var(--transition-fast);
}

.reaction-btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
}

.reaction-btn.active {
  background: var(--primary-100);
  border-color: var(--primary-500);
  color: var(--primary-700);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   9. Metrics & Summary Cards (담임목사 & 조장 대시보드용)
   -------------------------------------------------------------------------- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.metric-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  margin: var(--space-1) 0;
  line-height: 1.1;
}

.metric-sub {
  font-size: 0.78rem;
  color: var(--text-light);
}

/* --------------------------------------------------------------------------
   10. Modal Dialog
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--bg-surface); /* #FFFDF9 */
  border-radius: var(--radius-card); /* 16px */
  border: 1px solid var(--border-default); /* #E6DFD3 */
  box-shadow: var(--shadow-xl);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform var(--transition-smooth);
}

.modal-backdrop.open .modal-content {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-family: var(--font-heading);
  letter-spacing: -0.015em;
  color: var(--text-main);
}

.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  background-color: var(--bg-subtle);
}

/* --------------------------------------------------------------------------
   11. Toast Notifications
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background-color: #1e293b;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  animation: slide-toast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-success {
  background-color: #166534;
}

.toast.toast-amber,
.toast.toast-warning {
  background-color: #92400e;
}

.toast.toast-error {
  background-color: #991b1b;
}

/* 폼 유효성 에러 강조 스타일 */
.input-error {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
  outline: none !important;
  animation: field-shake 0.35s ease-in-out;
}

@keyframes field-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

@keyframes slide-toast {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* --------------------------------------------------------------------------
   12. 8-Week History Matrix Dashboard (최근 8주 사역일지 현황판)
   -------------------------------------------------------------------------- */
.matrix-container {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-card);
}

.matrix-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.matrix-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.matrix-legend {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}

/* Single Ranch 8-Week Grid (목자용) */
.matrix-weeks-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--space-2);
}

@media (max-width: 640px) {
  .matrix-weeks-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.week-box {
  background-color: var(--bg-subtle);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 72px;
}

.week-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.week-box.status-completed {
  background-color: #ffffff;
  border-color: var(--primary-300);
}

.week-box.status-leader_commented {
  background-color: #ffffff;
  border-color: var(--sub-200);
}

.week-box.status-submitted {
  background-color: #ffffff;
  border-color: var(--primary-200);
}

.week-box.status-unwritten {
  background-color: #f8fafc;
  border-style: dashed;
  border-color: #cbd5e1;
}

.week-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.week-icon {
  font-size: 1.15rem;
  line-height: 1;
  margin: 2px 0;
}

.week-status-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Multi-Ranch Table Matrix (담임목사, 조장, 관리자용) */
.matrix-table-wrapper {
  overflow-x: auto;
  margin-top: var(--space-2);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.matrix-table th, .matrix-table td {
  padding: 0.55rem 0.65rem;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}

.matrix-table th {
  background-color: var(--bg-subtle);
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.matrix-table td.cell-ranch {
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}

.cell-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.cell-status-chip:hover {
  transform: scale(1.15);
}

/* --------------------------------------------------------------------------
   13. In-App Notification Center (인앱 알림 센터)
   -------------------------------------------------------------------------- */
.noti-bell-btn {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.noti-bell-btn:hover {
  background: var(--bg-subtle);
}

.noti-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--status-urgent);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

.noti-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 12px;
  width: 340px;
  max-width: 90vw;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  display: none;
  animation: fadeIn 0.15s ease;
}

.noti-popover.open {
  display: block;
}

.noti-popover-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.95rem;
}

.noti-list {
  max-height: 360px;
  overflow-y: auto;
}

.noti-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.noti-item:hover {
  background-color: var(--bg-subtle);
}

.noti-item.unread {
  background-color: #f0fdf4;
  border-left: 3px solid var(--primary-500);
}

.noti-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text-main);
}

.noti-message {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.noti-time {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   14. Member Management UI (교회관리자 목원 관리 & 교적 관리 컴팩트 테이블)
   -------------------------------------------------------------------------- */
.member-mgmt-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-2);
}

.member-mgmt-table th, .member-mgmt-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: middle;
}

.member-mgmt-table th {
  background-color: var(--bg-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
}

.registry-compact-table th,
.registry-compact-table td {
  padding: 0.42rem 0.48rem !important;
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   14-B. Church Dashboard Table & District Management Table
   -------------------------------------------------------------------------- */
.church-dashboard-table, .district-mgmt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.church-dashboard-table th, .church-dashboard-table td,
.district-mgmt-table th, .district-mgmt-table td {
  padding: 0.8rem 0.95rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: middle;
}

.church-dashboard-table th,
.district-mgmt-table th {
  background-color: var(--bg-subtle);
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.church-dashboard-table tbody tr:hover,
.district-mgmt-table tbody tr:hover {
  background-color: #f8fafc;
}

.church-dashboard-table td .church-title-link,
.district-mgmt-table td .dist-title-cell {
  font-weight: 800;
  color: var(--primary-900);
}

/* --------------------------------------------------------------------------
   15. Prayer Extract UI (계층형 기도제목 추출 모달)
   -------------------------------------------------------------------------- */
.prayer-extract-box {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
  user-select: all;
}

/* --------------------------------------------------------------------------
   16. Voice Input (STT) Buttons & Animations
   -------------------------------------------------------------------------- */
.btn-voice-input {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-voice-input:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-voice-input.voice-listening {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
  animation: pulse-recording 1.2s infinite ease-in-out;
}

@keyframes pulse-recording {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* --------------------------------------------------------------------------
   17. 2-Step Login Page & Card Components (미니멀 & 비AI 감성)
   -------------------------------------------------------------------------- */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 1.5rem 1rem;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background-color: var(--bg-card); /* #FFFDF9 Warm Ivory White */
  border: 1px solid var(--border-default); /* #E6DFD3 Warm Stone */
  border-radius: var(--radius-card); /* 16px */
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-card); /* 0 4px 20px -2px rgba(44, 38, 35, 0.05) */
}

.login-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-brand-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.85rem auto;
  border-radius: var(--radius-full); /* 원형/캡슐 */
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  color: #FFFDF9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 2px 8px rgba(59, 82, 73, 0.25);
}

.login-title {
  font-family: var(--font-heading); /* 'Noto Serif KR', Georgia, serif */
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.015em;
  margin-bottom: 0.35rem;
}

.login-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.login-section {
  margin-bottom: 1.35rem;
}

.login-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.church-select-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.church-card-btn {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  padding: 1rem 1.15rem;
  background: var(--bg-surface); /* #FFFDF9 */
  border: 1px solid var(--border-default); /* #E6DFD3 */
  border-radius: var(--radius-md); /* 12px */
  cursor: pointer;
  transition: all var(--transition-fast);
}

.church-card-btn:hover {
  border-color: var(--primary-500);
  background: var(--primary-50);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.church-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

.church-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.church-card-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.badge-jo {
  background: #fef3c7;
  color: #92400e;
}

.badge-chowon {
  background: #e5f1ec;
  color: #1b4332;
}

.church-card-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.25rem 0;
  color: var(--text-light);
  font-size: 0.78rem;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}

.login-divider span {
  padding: 0 0.75rem;
}

.sysadmin-card-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sysadmin-card-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.sysadmin-card-content {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.sysadmin-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e293b;
}

.sysadmin-card-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.login-arrow {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.login-back-bar {
  margin-bottom: 0.75rem;
}

.btn-text-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: color var(--transition-fast);
}

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

.login-church-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-700);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.quick-user-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.user-chip-btn {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-chip-btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-400);
  color: var(--primary-800);
}

.user-chip-btn.active {
  background: var(--primary-500);
  border-color: var(--primary-600);
  color: #FFFDF9;
  box-shadow: 0 1px 3px rgba(59, 82, 73, 0.2);
}

.btn-ambiguous-pick {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-default);
  background: #ffffff;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-ambiguous-pick:hover {
  background: var(--terracotta-50);
  border-color: var(--terracotta-500);
  color: var(--terracotta-600);
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
}

.header-ministry-select {
  background-color: var(--primary-50);
  border: 1px solid var(--primary-300);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--primary-800);
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
}

.header-ministry-select:hover,
.header-ministry-select:focus {
  border-color: var(--primary-600);
  background-color: #ffffff;
  box-shadow: 0 1px 4px rgba(45, 106, 79, 0.15);
}

/* 겸임 사역자 헤더 사역 역할 버튼 그룹 (라운드 캡슐형) */
.header-ministry-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #f1f5f9;
  padding: 3px 4px;
  border-radius: 9999px;
  border: 1px solid var(--border-default);
}

.btn-ministry-mode {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9999px;
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1.25;
}

.btn-ministry-mode:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.85);
}

.btn-ministry-mode.active {
  background-color: #ffffff;
  color: var(--primary-800);
  border-color: var(--primary-300);
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-ministry-mode .ministry-mode-icon {
  font-size: 0.8rem;
  line-height: 1;
}

.btn-ministry-mode .ministry-mode-text {
  font-size: 0.74rem;
  letter-spacing: -0.02em;
}

@media (max-width: 640px) {
  .header-ministry-btn-group {
    margin-top: 4px;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }
  .btn-ministry-mode {
    padding: 2px 7px;
    font-size: 0.7rem;
  }
}

/* --------------------------------------------------------------------------
   21. Toggle Switch & KPI Dashboard Components
   -------------------------------------------------------------------------- */
.toggle-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  user-select: none;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
}

.switch .slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .slider {
  background-color: var(--primary-600);
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
}

/* KPI Metric Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.kpi-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
  padding: 1.05rem 1.15rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

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

.kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.kpi-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.kpi-card-icon {
  font-size: 1.15rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}

.kpi-card-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary-900);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.kpi-card-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 5px;
  line-height: 1.4;
}

/* Modern Dashboard Tables */
.table-modern-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: #ffffff;
}

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

.table-modern th {
  background-color: var(--bg-subtle);
  color: var(--text-main);
  font-weight: 700;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
  font-size: 0.8rem;
}

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

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

.table-modern tr:hover td {
  background-color: #fafbfc;
}

/* ==========================================================================
   Executive Comparison Charts (목장모임 지난주/금주 & 조모임 지난달/이번달 비교 차트)
   ========================================================================== */

.comparison-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

@media (max-width: 640px) {
  .comparison-charts-grid {
    grid-template-columns: 1fr;
  }
}

.comparison-chart-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.2s ease;
}

.comparison-chart-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-300);
}

.comparison-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.comparison-chart-title-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comparison-chart-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-900);
  margin: 0;
  letter-spacing: -0.01em;
}

.comparison-chart-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.chart-legend-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.chart-legend-dot.past {
  background-color: #94a3b8;
}

.chart-legend-dot.current-ranch {
  background-color: #059669;
}

.chart-legend-dot.current-district {
  background-color: #6366f1;
}

/* Quick KPI pills row at top of chart */
.chart-kpi-summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.15rem;
}

.chart-kpi-pill {
  background: #f8fafc;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chart-kpi-pill-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.chart-kpi-pill-value-group {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
}

.chart-kpi-pill-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-900);
  line-height: 1.2;
}

/* Delta Badges */
.delta-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  white-space: nowrap;
}

.delta-pill.up {
  background: #dcfce7;
  color: #15803d;
}

.delta-pill.down {
  background: #fee2e2;
  color: #be123c;
}

.delta-pill.same {
  background: #f1f5f9;
  color: #64748b;
}

/* Grouped Horizontal Bars */
.chart-bars-container {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.chart-bar-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.chart-bar-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.chart-bar-group-label {
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
}

.chart-bar-pair {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: #fafbfc;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0,0,0,0.03);
}

.chart-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.chart-bar-period-tag {
  width: 45px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
  flex-shrink: 0;
}

.chart-bar-track {
  flex: 1;
  height: 18px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.chart-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #ffffff;
  min-width: 22px;
}

.chart-bar-fill.fill-past {
  background-color: #94a3b8;
}

.chart-bar-fill.fill-current-ranch {
  background: linear-gradient(90deg, #10b981, #059669);
  box-shadow: 0 1px 2px rgba(5, 150, 105, 0.25);
}

.chart-bar-fill.fill-current-district {
  background: linear-gradient(90deg, #6366f1, #4f46e5);
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.25);
}

/* 4-Period Ranch Gradients & Solids */
.chart-bar-fill.fill-ranch-w4 { background-color: #cbd5e1; color: #475569; }
.chart-bar-fill.fill-ranch-w3 { background-color: #94a3b8; color: #ffffff; }
.chart-bar-fill.fill-ranch-w2 { background-color: #64748b; color: #ffffff; }
.chart-bar-fill.fill-ranch-w1 {
  background: linear-gradient(90deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(5, 150, 105, 0.25);
}

/* 4-Period District Gradients & Solids */
.chart-bar-fill.fill-dist-m4 { background-color: #cbd5e1; color: #475569; }
.chart-bar-fill.fill-dist-m3 { background-color: #a5b4fc; color: #312e81; }
.chart-bar-fill.fill-dist-m2 { background-color: #818cf8; color: #ffffff; }
.chart-bar-fill.fill-dist-m1 {
  background: linear-gradient(90deg, #6366f1, #4f46e5);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.25);
}

/* 4-Period Chart Legend Dots */
.chart-legend-dot.w4 { background-color: #cbd5e1; }
.chart-legend-dot.w3 { background-color: #94a3b8; }
.chart-legend-dot.w2 { background-color: #64748b; }
.chart-legend-dot.w1 { background-color: #059669; }

.chart-legend-dot.m4 { background-color: #cbd5e1; }
.chart-legend-dot.m3 { background-color: #a5b4fc; }
.chart-legend-dot.m2 { background-color: #818cf8; }
.chart-legend-dot.m1 { background-color: #4f46e5; }

.chart-bar-value-outside {
  width: 58px;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-main);
  text-align: left;
  flex-shrink: 0;
}

/* District Status 4-Month Micro Grid */
.district-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border-default);
}

.district-status-card {
  background: #f8fafc;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.district-status-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--primary-900);
}

.district-status-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.district-month-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 4px;
}

.district-month-cell {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: 4px;
  padding: 3px 2px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.district-month-cell.is-held {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.district-month-cell.is-current {
  border-color: #a5b4fc;
  background: #eef2ff;
}

.district-month-cell .m-name {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
}

.district-month-cell.is-current .m-name {
  color: #4338ca;
}

.district-month-cell .m-att {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-main);
}

/* ==========================================================================
   22. Ranch Seasonal Design Theme Selector (목장별 계절 디자인 테마 4종 선택기)
   ========================================================================== */
.ranch-theme-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.9rem;
  margin-bottom: var(--space-4);
}

.ranch-theme-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ranch-theme-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ranch-theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-default);
  background: #f8fafc;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ranch-theme-btn:hover {
  background: #ffffff;
  border-color: var(--primary-400);
  color: var(--text-main);
}

.ranch-theme-btn.active {
  background: var(--primary-50);
  border-color: var(--primary-500);
  color: var(--primary-800);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.theme-swatch-pair {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.theme-swatch-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.12);
}



