/**
 * 서툰어른연합 - 감성적이고 따뜻한 웜 베이지 & 어스 테마 디자인 시스템 (style.css v3.0)
 */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

:root {
  /* 모던 클린 화이트 & 테라코타 팔레트 */
  --bg-app: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-glass: rgba(255, 255, 255, 0.85);
  
  --primary: #c25e38;          /* 따뜻한 테라코타 브라운 */
  --primary-hover: #a84824;
  --primary-light: #faece7;
  --primary-focus: rgba(194, 94, 56, 0.2);

  --secondary: #635e59;
  --secondary-hover: #4d4843;
  --secondary-light: #eee9e0;

  --accent-amber: #d97706;     /* 앰버 골드 */
  --accent-amber-light: #fef3c7;
  --accent-olive: #65a30d;     /* 올리브 그린 */
  --accent-sage: #059669;      /* 세이지 그린 */
  --accent-sage-light: #ecfdf5;

  --text-main: #292524;        /* 딥 에스프레소 */
  --text-muted: #78716c;       /* 웜 챠콜 */
  --text-subtle: #a8a29e;

  --border-color: #e7e0d5;     /* 샌드 베이지 보더 */
  --border-focus: #c25e38;

  --success: #15803d;
  --success-bg: #f0fdf4;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --warning: #b45309;
  --warning-bg: #fffbeb;

  /* 부드러운 라운딩 & 웜 섀도우 */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 6px rgba(120, 100, 80, 0.04);
  --shadow-md: 0 6px 18px rgba(120, 100, 80, 0.07);
  --shadow-lg: 0 14px 32px rgba(120, 100, 80, 0.1);
  --shadow-warm-glow: 0 10px 28px rgba(194, 94, 56, 0.16);

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --------------------------------------------------------------------------
   3종 템플릿 테마 컬러 스킨 오버라이드
-------------------------------------------------------------------------- */
/* 1. 모던 오션 (Modern Ocean) 테마 스킨 */
[data-theme="modern_ocean"] {
  --bg-app: #f8fafc;
  --bg-subtle: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-glass: rgba(255, 255, 255, 0.88);
  
  --primary: #1d4ed8;          /* 딥 오션 블루 */
  --primary-hover: #1e40af;
  --primary-light: #eff6ff;
  --primary-focus: rgba(29, 78, 216, 0.2);

  --secondary: #475569;        /* 슬레이트 그레이 */
  --secondary-hover: #334155;
  --secondary-light: #f1f5f9;

  --accent-amber: #0284c7;     /* 스카이 블루 */
  --accent-amber-light: #e0f2fe;
  --accent-olive: #0d9488;     /* 틸 */
  --accent-sage: #2563eb;      /* 로열 블루 */
  --accent-sage-light: #dbeafe;

  --text-main: #0f172a;        /* 딥 슬레이트 */
  --text-muted: #64748b;       /* 쿨 그레이 */
  --text-subtle: #94a3b8;

  --border-color: #e2e8f0;     /* 쿨 그레이 보더 */
  --border-focus: #1d4ed8;

  --shadow-warm-glow: 0 10px 28px rgba(29, 78, 216, 0.16);
}

/* 2. 포레스트 세이지 (Forest Sage) 테마 스킨 */
[data-theme="forest_sage"] {
  --bg-app: #f7f9f7;
  --bg-subtle: #edf3ed;
  --bg-card: #ffffff;
  --bg-card-glass: rgba(255, 255, 255, 0.88);
  
  --primary: #15803d;          /* 딥 포레스트 그린 */
  --primary-hover: #166534;
  --primary-light: #f0fdf4;
  --primary-focus: rgba(21, 128, 61, 0.2);

  --secondary: #52525b;        /* 징크 그레이 */
  --secondary-hover: #3f3f46;
  --secondary-light: #f4f4f5;

  --accent-amber: #65a30d;     /* 올리브 라임 */
  --accent-amber-light: #f7fee7;
  --accent-olive: #16a34a;     /* 에메랄드 */
  --accent-sage: #059669;      /* 세이지 민트 */
  --accent-sage-light: #ecfdf5;

  --text-main: #142e1d;        /* 딥 포레스트 챠콜 */
  --text-muted: #576d5e;       /* 모스 그레이 */
  --text-subtle: #8da194;

  --border-color: #dbe5dc;     /* 페일 세이지 보더 */
  --border-focus: #15803d;

  --shadow-warm-glow: 0 10px 28px rgba(21, 128, 61, 0.16);
}

/* --------------------------------------------------------------------------
   기본 리셋 & 폰트 세팅
-------------------------------------------------------------------------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  min-height: 100vh;
  font-size: 0.94rem;
  background-image: none;
}

input, button, select, textarea, table, th, td {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif !important;
  font-size: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* --------------------------------------------------------------------------
   레이아웃 프레임워크
-------------------------------------------------------------------------- */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 글로벌 상단 헤더 */
.app-header {
  background: rgba(253, 251, 247, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all var(--transition-fast);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.brand-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary);
  background: var(--bg-subtle);
}

.nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 700;
}

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

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.user-badge:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.user-rank {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.logout-btn {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.logout-btn:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

/* 메인 바디 래퍼 */
.main-wrapper {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 20px 48px;
  display: flex;
  gap: 28px;
  flex: 1;
}

.main-content {
  flex: 1;
  min-width: 0;
  animation: fadeIn 0.35s ease-out;
}

/* 사이드바 */
.app-sidebar {
  width: 220px;
  flex-shrink: 0;
}

.sidebar-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: 8px 12px 10px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 6px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  text-decoration: none;
  background: transparent;
}

.sidebar-link:hover {
  color: var(--primary);
  background: var(--bg-subtle);
  transform: translateX(3px);
}

.sidebar-link.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   달력 (Calendar Grid) 컴포넌트
-------------------------------------------------------------------------- */
.cal-container {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.cal-header {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 12px 0;
  color: var(--text-muted);
}

.cal-header .sun { color: var(--danger); }
.cal-header .sat { color: #2563eb; }

.cal-body {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--border-color);
  gap: 1px;
}

.cal-day {
  background: #ffffff;
  min-height: 110px;
  min-width: 0;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
  transition: background-color var(--transition-fast);
}

.cal-day:hover {
  background-color: rgba(245, 240, 232, 0.4);
}

.cal-day.empty {
  background: #faf8f5;
}

.cal-day-num {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 2px;
}

.cal-day.sun .cal-day-num { color: var(--danger); }
.cal-day.sat .cal-day-num { color: #2563eb; }

.cal-day.today {
  background: #fffbeb;
}

.cal-day.today .cal-day-num {
  display: inline-flex;
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}

.cal-event-badge {
  font-size: 0.74rem;
  padding: 4px 6px;
  border-radius: 6px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
  text-decoration: none;
  transition: transform var(--transition-fast);
  box-sizing: border-box;
}

.cal-event-badge:hover {
  transform: translateY(-1px);
}

.cal-event-birthday {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.cal-event-meetup {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(194, 94, 56, 0.25);
}

/* --------------------------------------------------------------------------
   카드 & 컴포넌트
-------------------------------------------------------------------------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  transition: all var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

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

.card-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 통계 카드 그리드 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  text-decoration: none;
  color: inherit;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #d8cebf;
}

.stat-card-link {
  cursor: pointer;
}

.stat-card-link:active {
  transform: translateY(-1px) scale(0.99);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.stat-icon.terracotta { background: var(--primary-light); color: var(--primary); }
.stat-icon.amber { background: var(--accent-amber-light); color: var(--accent-amber); }
.stat-icon.sage { background: var(--accent-sage-light); color: var(--accent-sage); }
.stat-icon.sand { background: var(--bg-subtle); color: var(--text-muted); }

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

.stat-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2px;
  letter-spacing: -0.5px;
}

/* --------------------------------------------------------------------------
   버튼 시스템
-------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  outline: none;
}

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

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(194, 94, 56, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-warm-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
  color: var(--text-main);
}

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

.btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
}

.btn-sm {
  padding: 5px 11px;
  font-size: 0.82rem;
  border-radius: var(--radius-xs);
}

.btn-block {
  width: 100%;
}

/* --------------------------------------------------------------------------
   폼 & 인풋 컴포넌트
-------------------------------------------------------------------------- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-main);
  font-size: 0.94rem;
  font-family: inherit;
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-focus);
}

.form-control-sm {
  padding: 6px 10px;
  font-size: 0.85rem;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-col {
  flex: 1;
}

/* --------------------------------------------------------------------------
   테이블 & 상태 뱃지
-------------------------------------------------------------------------- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

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

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

.table tbody tr {
  transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
  background-color: rgba(245, 240, 232, 0.5);
}

/* 상태 뱃지 */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   모던 파일 첨부 버튼 (윈도우 기본 회색 버튼 탈피 -> 웹 테마 디자인 통일)
-------------------------------------------------------------------------- */
input[type="file"] {
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  margin-right: 12px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

input[type="file"]::file-selector-button:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   회비 납부 현황 테이블 (status-table) 전용 세련된 디자인 시스템
-------------------------------------------------------------------------- */
.status-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

.status-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 13px 6px;
  border-bottom: 2px solid var(--border-color);
  text-align: center;
  vertical-align: middle;
  letter-spacing: -0.3px;
}

.status-table td {
  padding: 10px 4px;
  vertical-align: middle;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.92rem;
}

/* O / X 모던 둥근 카드형 뱃지 (가독성 & 센터 정렬 극대화) */
.badge-status-o {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
  font-size: 0.98rem;
  font-weight: 900;
  border: 1px solid rgba(5, 150, 105, 0.3);
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.08);
  margin: 0 auto;
  line-height: 1;
}

.badge-status-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  font-size: 0.98rem;
  font-weight: 900;
  border: 1px solid rgba(239, 68, 68, 0.28);
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.06);
  margin: 0 auto;
  line-height: 1;
}

.badge-status-dash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #cbd5e1;
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 auto;
  line-height: 1;
}

.badge-status-before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #a8a29e;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(168, 162, 158, 0.12);
  border-radius: 6px;
  margin: 0 auto;
  line-height: 1;
}

/* 미납자 행 연한 레드 배경 */
.row-unpaid {
  background-color: rgba(254, 242, 242, 0.75) !important;
}

.row-unpaid:hover {
  background-color: rgba(254, 226, 226, 0.9) !important;
}

.badge-paid {
  background: var(--accent-sage-light);
  color: var(--accent-sage);
}

.badge-unpaid {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge-prepaid {
  background: var(--accent-amber-light);
  color: var(--accent-amber);
}

.badge-attend {
  background: #eff6ff;
  color: #1d4ed8;
}

.badge-absent {
  background: #fdf2f8;
  color: #db2777;
}

/* --------------------------------------------------------------------------
   알림 메시지 (Floating Toast Modal - 화면 흔들림 제로)
-------------------------------------------------------------------------- */
.floating-toast {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
  font-size: 0.94rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: toastSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.35s ease, transform 0.35s ease;
  max-width: 90vw;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

@keyframes toastSlideDown {
  from {
    opacity: 0;
    transform: translate(-50%, -30px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.toast-success {
  background: rgba(240, 253, 244, 0.96);
  color: #166534;
  border-color: #bbf7d0;
}

.toast-error {
  background: rgba(254, 242, 242, 0.96);
  color: #991b1b;
  border-color: #fecaca;
}

.toast-info {
  background: rgba(239, 246, 255, 0.96);
  color: #1e40af;
  border-color: #bfdbfe;
}

.toast-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  padding: 0 4px;
  line-height: 1;
}
.toast-close:hover {
  opacity: 1;
}

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid #bbf7d0;
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #fecaca;
}

.alert-info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* --------------------------------------------------------------------------
   갤러리 & 포토 그리드
-------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.gallery-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: #f5f0e8;
}

.gallery-info {
  padding: 14px 16px;
}

.gallery-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.gallery-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   푸터
-------------------------------------------------------------------------- */
.app-footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  padding: 32px 20px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: auto;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   애니메이션 & 트랜지션
-------------------------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseWarm {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

/* --------------------------------------------------------------------------
   모바일 전용 드로어 & 햄버거 버튼 UI
-------------------------------------------------------------------------- */
.mobile-hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  justify-content: space-around;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.mobile-hamburger-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

.mobile-drawer-overlay {
  display: none;
  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: 99998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.open {
  display: block;
  opacity: 1;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: #ffffff;
  z-index: 99999;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-drawer.open {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-subtle);
}

.btn-drawer-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
}

.mobile-drawer-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #fffdfa;
  border-bottom: 1px solid var(--border-color);
}

.drawer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #e07a5f);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 4px 10px rgba(194, 94, 56, 0.25);
}

.mobile-drawer-nav {
  flex: 1;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-nav-section {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 10px 4px;
}

.drawer-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.drawer-nav-link:hover,
.drawer-nav-link.active {
  background: rgba(194, 94, 56, 0.1);
  color: var(--primary);
}

.mobile-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-subtle);
}

/* --------------------------------------------------------------------------
   반응형 (Mobile & Tablet)
-------------------------------------------------------------------------- */
@media (max-width: 900px) {
  /* 1. 글로벌 헤더 반응형 */
  .header-nav {
    display: none !important;
  }
  .desktop-only {
    display: none !important;
  }
  .mobile-hamburger-btn {
    display: flex !important;
  }
  .header-inner {
    padding: 0 16px;
  }
  
  /* 2. 본문 래퍼 및 레이아웃 */
  .main-wrapper {
    flex-direction: column;
    padding: 14px 12px 32px;
    gap: 16px;
    max-width: 100%;
  }

  /* 3. 사이드바 ➔ 상단 가로 스크롤 칩 탭 바로 전환 */
  .app-sidebar {
    width: 100%;
    margin-bottom: 4px;
  }
  .sidebar-wrapper {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
  }
  .sidebar-title {
    display: none;
  }
  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 4px 2px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }
  .sidebar-link {
    white-space: nowrap;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    font-weight: 700;
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    margin-bottom: 0;
  }
  .sidebar-link.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(194, 94, 56, 0.3);
  }

  /* 4. 카드 및 본문 영역 */
  .main-content {
    width: 100%;
    min-width: 0;
  }
  .card {
    padding: 16px 14px;
    margin-bottom: 16px;
  }
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .card-header > div:last-child {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  /* 5. 폼 인풋 (iOS 자동 줌인 방지) */
  .form-control,
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important; /* iOS 자동 줌 방지 표준 */
  }

  /* 6. 데이터 테이블 터치 반응형 */
  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 12px;
  }
  .table {
    min-width: 600px; /* 테이블 가로 스크롤 보장 */
  }

  /* 7. 갤러리 그리드 모바일 2열 */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .gallery-thumb {
    height: 140px;
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .gallery-thumb {
    height: 180px;
  }
  .btn {
    padding: 8px 14px;
    font-size: 0.86rem;
  }
  .card-title {
    font-size: 1.2rem;
  }
}

/* --------------------------------------------------------------------------
   📱 갤럭시 Z 폴드 접힘(커버 화면: 폭 280px ~ 360px) 극단적 좁은 화면 최적화
-------------------------------------------------------------------------- */
@media (max-width: 360px) {
  .header-inner {
    padding: 0 10px !important;
  }
  .brand-logo {
    font-size: 0.95rem !important;
    gap: 4px !important;
  }
  .brand-badge {
    display: none !important; /* 초슬림 화면에서 뱃지 숨김으로 로고 영역 확보 */
  }
  .main-wrapper {
    padding: 10px 8px 24px !important;
    gap: 12px !important;
  }
  .card {
    padding: 12px 10px !important;
    border-radius: var(--radius-sm) !important;
  }
  .card-title {
    font-size: 1.1rem !important;
  }
  .sidebar-link {
    font-size: 0.78rem !important;
    padding: 5px 10px !important;
  }
  .mobile-drawer {
    width: 260px !important;
  }
}

/* --------------------------------------------------------------------------
   📱 갤럭시 Z 폴드 펼침 / 태블릿 (메인 화면: 폭 601px ~ 900px) 적응형 레이아웃
-------------------------------------------------------------------------- */
@media (min-width: 601px) and (max-width: 900px) {
  .main-wrapper {
    max-width: 95%;
    margin: 0 auto;
  }
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
  }
}

/* --------------------------------------------------------------------------
   📱 대시보드 및 공통 모바일 반응형 위젯
-------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .dashboard-charts-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .stat-card {
    padding: 12px 10px !important;
    gap: 10px !important;
  }
  .stat-icon {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.3rem !important;
    border-radius: 12px !important;
  }
  .stat-label {
    font-size: 0.76rem !important;
  }
  .stat-value {
    font-size: 1.1rem !important;
  }
  .photo-grid-wrap {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .photo-card-item > div:first-of-type {
    height: 140px !important;
  }
}

@media (max-width: 420px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 360px) {
  .photo-grid-wrap {
    grid-template-columns: 1fr !important;
  }
}

/* --------------------------------------------------------------------------
   ✨ [공통 시맨틱 컴포넌트] 인라인 스타일 배제 및 템플릿 확장용 기본 스타일
-------------------------------------------------------------------------- */
.welcome-hero {
  margin-bottom: 24px;
}

.welcome-kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}

.welcome-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin: 0;
}

.welcome-name {
  color: var(--primary);
}

.welcome-rank {
  font-size: 0.9em;
  font-weight: 600;
  color: var(--text-main);
}

.welcome-desc {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin: 6px 0 0 0;
  line-height: 1.5;
}

/* 30일 체험판 배너 */
.banner-trial {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.banner-trial-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.banner-trial-tag {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.banner-trial-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  display: block;
}

.banner-trial-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 2px 0 0 0;
  line-height: 1.4;
}

.banner-trial-dday {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

/* 브랜드 로고 공통 스타일 (잘림 방지 및 반응형) */
.brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.brand-icon {
  font-size: 1.35rem;
  line-height: 1;
  margin-right: 8px;
  flex-shrink: 0;
}

.brand-badge {
  margin-left: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-logo-img {
  max-height: 40px;
  max-width: 240px;
  object-fit: contain;
  display: block;
}

/* 통계 카드 변형 및 내부 요소 */
.stat-hero-top {
  display: flex;
  align-items: center;
}

.stat-hero-badges {
  display: none;
}

.stat-hero-link {
  display: none;
}

.stat-card--warning {
  border-color: rgba(220, 38, 38, 0.35);
  background: #fffaf9;
}

.stat-icon--balance { background: var(--primary-light); color: var(--primary); }
.stat-icon--warning { background: #fee2e2; color: #b91c1c; }
.stat-icon--calendar { background: var(--accent-sage-light); color: var(--accent-sage); }
.stat-icon--gift { background: var(--accent-amber-light); color: var(--accent-amber); }
.stat-icon--members { background: var(--bg-subtle); color: var(--text-muted); }

.stat-label--warning { color: #991b1b; font-weight: 700; }
.stat-value--primary { color: var(--primary); }
.stat-value--danger { color: var(--danger); }
.stat-value--amber { color: var(--accent-amber); }

.stat-unit { font-size: 0.85em; font-weight: 600; margin-left: 2px; }
.stat-subtext { font-size: 0.76rem; font-weight: 500; color: #b91c1c; margin-left: 4px; }
.stat-arrow { font-size: 0.75rem; color: var(--text-muted); display: inline-block; transition: transform 0.2s ease; }
.stat-card:hover .stat-arrow { transform: translateX(3px); }

/* 명예의 전당 배너 */
.banner-hall {
  background: #2d2621;
  color: #ffffff;
  padding: 22px 28px;
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  border: 1px solid #4a3e35;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 6px 20px rgba(45, 38, 33, 0.15);
}

.banner-hall-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fde68a;
  margin-bottom: 4px;
}

.banner-hall-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.02em;
}

.banner-hall-desc {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.88rem;
  margin: 4px 0 0 0;
  line-height: 1.45;
}

.banner-hall-btn {
  background: #fde68a;
  color: #78350f;
  font-weight: 800;
  border: none;
  padding: 9px 20px;
  font-size: 0.88rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.banner-hall-btn:hover {
  background: #fef08a;
  transform: translateY(-2px);
  color: #78350f;
}

/* 총무/회장 전용 미납 현황 위젯 */
.widget-unpaid {
  border: 1px solid #fed7aa;
  background: var(--bg-card);
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(194, 94, 56, 0.06);
}

.widget-unpaid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
}

.widget-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #c2410c;
  margin-bottom: 3px;
}

.widget-count {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.widget-actions {
  display: flex;
  gap: 8px;
}

.widget-unpaid-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--accent-sage);
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  margin: 14px 0;
}

.empty-icon {
  font-size: 2rem;
  margin-bottom: 6px;
}

.empty-title {
  font-size: 1.05rem;
  color: var(--text-main);
  display: block;
}

.empty-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.rank-tag {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 10px;
}

.unpaid-months {
  font-weight: 700;
  color: var(--danger);
  font-size: 0.92rem;
}

.unpaid-amount {
  font-weight: 800;
  font-size: 1rem;
  color: var(--danger);
}

/* 동적 시각화 그리드 & 카드 */
.dashboard-charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.chart-card {
  margin-bottom: 0;
}

.chart-card--donut {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-kicker {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 4px;
}

.unit-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.chart-canvas-wrap {
  position: relative;
  height: 240px;
  width: 100%;
}

.donut-chart-wrap {
  position: relative;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-center-label {
  position: absolute;
  text-align: center;
  pointer-events: none;
}

.donut-percent {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
}

.donut-sublabel {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.donut-summary {
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.45;
}

.text-highlight {
  color: var(--text-main);
}

.donut-subinfo {
  font-size: 0.78rem;
  color: var(--primary);
  margin-top: 2px;
}

/* 재정 건전성 및 정산 예측 대시보드 */
.card-financial {
  margin-bottom: 24px;
}

.card-financial-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.metric-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

.metric-subtext {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 3px;
}

.metric-card--amber {
  background: #fffbeb;
  border-color: #fde68a;
}
.metric-card--amber .metric-label { color: #92400e; }
.metric-card--amber .metric-value { color: var(--accent-amber); }
.metric-card--amber .metric-subtext { color: #b45309; }

.metric-card--sage {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.metric-card--sage .metric-label { color: #166534; }
.metric-card--sage .metric-value { color: var(--accent-sage); }
.metric-card--sage .metric-subtext { color: #15803d; }

.metric-card--danger {
  background: #fef2f2;
  border-color: #fecaca;
}
.metric-card--danger .metric-label { color: #991b1b; }
.metric-card--danger .metric-value { color: var(--danger); }
.metric-card--danger .metric-subtext { color: #b91c1c; }

.metric-card--blue {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.metric-card--blue .metric-label { color: #1e40af; }
.metric-card--blue .metric-value { color: #2563eb; }
.metric-card--blue .metric-subtext { color: #3b82f6; }

/* 복지 요약 바 */
.welfare-summary-bar {
  background: #fffaf5;
  border: 1px dashed #fbd5b5;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.84rem;
}

.welfare-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.welfare-title {
  color: #9a3412;
  font-weight: 700;
}

.welfare-desc {
  color: var(--text-main);
}

.welfare-divider {
  color: #fbd5b5;
  margin: 0 4px;
}

.welfare-tag {
  font-size: 0.78rem;
  color: #c2410c;
  background: #ffedd5;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 600;
}

/* 정산 프로그레스 바 */
.projection-summary-bar {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.projection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
  gap: 8px;
}

.projection-label {
  font-weight: 700;
  color: var(--text-main);
}

.projection-total {
  font-weight: 800;
  color: var(--text-main);
  margin-right: 4px;
}

.projection-breakdown {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.projection-ratio-wrap {
  font-size: 0.84rem;
}

.projection-ratio {
  font-weight: 800;
  margin-left: 4px;
}

.ratio-high { color: var(--danger); }
.ratio-normal { color: var(--primary); }

.projection-progress-track {
  height: 10px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.projection-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 70%, #ef4444 100%);
  border-radius: 6px;
  transition: width 0.6s ease;
}

.projection-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
  font-size: 0.84rem;
}

.projection-desc {
  color: var(--text-muted);
}

.projection-note {
  font-size: 0.78rem;
}

.projection-final-amount {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

/* 생일 축하 배너 */
.banner-birthday {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  padding: 20px 24px;
}

.banner-birthday-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #b45309;
  margin-bottom: 4px;
}

.banner-birthday-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #92400e;
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}

.banner-birthday-desc {
  color: #b45309;
  font-size: 0.92rem;
  margin: 0;
  line-height: 1.5;
}

.bday-name {
  color: #92400e;
}

.bday-gift-note {
  display: inline-block;
  margin-left: 4px;
  color: #78350f;
}

/* 행사 및 입출금 2열 그리드 */
.dashboard-events-tx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.event-preview-box {
  padding: 16px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.event-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.event-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.meta-label {
  font-weight: 700;
  color: var(--text-main);
}

.event-rsvp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.rsvp-status-wrap {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.recent-tx-table th, .recent-tx-table td {
  padding: 10px 12px;
}

.amount-in { color: var(--accent-sage); }
.amount-out { color: var(--danger); }

.card-empty-state {
  text-align: center;
  padding: 36px 0;
  color: var(--text-subtle);
  font-size: 0.9rem;
}

.card-gallery-preview {
  margin-top: 24px;
}


/* --------------------------------------------------------------------------
   ✨ [신규 템플릿] 모두의매트(modoomat.com) 클린 미니멀 & 플로팅 아일랜드 테마
   - 비(Non)-AI 인간 디자이너 감성의 고품격 에디토리얼 디자인 시스템
   - 캡슐형 플로팅 글래스 네비게이션 헤더
   - 모던 웜 오트 & 에어 뉴트럴 서페이스 (인위적인 무지개 그라데이션 완전 제거)
   - IBM Plex Mono 숫자 & Noto Serif 감성 키커 서체 악센트
   - 라운드 알약(pill) 캡슐 버튼, 미니멀 라인 배지, 섬세한 여백
-------------------------------------------------------------------------- */
[data-template="modoomat"],
body[data-template="modoomat"] {
  --bg-app: #ffffff !important;
  --bg-subtle: #f5f2eb !important;
  --bg-card: #ffffff !important;
  --border-color: #eae5dc !important;
  --text-main: #18181b !important;
  --text-muted: #6b6762 !important;
  --text-subtle: #9c968f !important;
  --radius-xs: 8px !important;
  --radius-sm: 14px !important;
  --radius-md: 22px !important;
  --radius-lg: 32px !important;
  --radius-full: 9999px !important;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.02), 0 4px 16px rgba(0, 0, 0, 0.03) !important;
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.02) !important;
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.06) !important;
}

[data-template="modoomat"] body,
body[data-template="modoomat"] {
  background-color: #fcfbf9 !important;
  background-image: 
    radial-gradient(at 15% 15%, rgba(245, 240, 230, 0.6) 0px, transparent 45%),
    radial-gradient(at 85% 85%, rgba(248, 245, 240, 0.8) 0px, transparent 45%) !important;
  background-attachment: fixed !important;
  color: #18181b !important;
  font-family: "General Sans", "Pretendard", -apple-system, sans-serif !important;
  letter-spacing: -0.025em !important;
}

/* 1. 모두의매트 타이포그래피 & 고정밀 숫자 폰트 (IBM Plex Mono) */
[data-template="modoomat"] .stat-value,
body[data-template="modoomat"] .stat-value,
[data-template="modoomat"] .metric-value,
body[data-template="modoomat"] .metric-value,
[data-template="modoomat"] .font-mono,
body[data-template="modoomat"] .font-mono,
[data-template="modoomat"] .td-amount,
body[data-template="modoomat"] .td-amount,
[data-template="modoomat"] .td-date,
body[data-template="modoomat"] .td-date,
[data-template="modoomat"] .donut-percent,
body[data-template="modoomat"] .donut-percent,
[data-template="modoomat"] .projection-total,
body[data-template="modoomat"] .projection-total,
[data-template="modoomat"] .projection-final-amount,
body[data-template="modoomat"] .projection-final-amount,
[data-template="modoomat"] .banner-trial-dday,
body[data-template="modoomat"] .banner-trial-dday {
  font-family: "IBM Plex Mono", "Pretendard", monospace !important;
  font-variant-numeric: tabular-nums !important;
  letter-spacing: -0.04em !important;
}

[data-template="modoomat"] h1,
[data-template="modoomat"] h2,
[data-template="modoomat"] h3,
body[data-template="modoomat"] h1,
body[data-template="modoomat"] h2,
body[data-template="modoomat"] h3 {
  font-family: "General Sans", "Pretendard", sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
}

/* 감성 명조체 악센트 (Noto Serif KR) */
[data-template="modoomat"] .welcome-kicker,
body[data-template="modoomat"] .welcome-kicker,
[data-template="modoomat"] .card-kicker,
body[data-template="modoomat"] .card-kicker,
[data-template="modoomat"] .widget-kicker,
body[data-template="modoomat"] .widget-kicker,
[data-template="modoomat"] .banner-hall-kicker,
body[data-template="modoomat"] .banner-hall-kicker,
[data-template="modoomat"] .banner-birthday-kicker,
body[data-template="modoomat"] .banner-birthday-kicker {
  font-family: "General Sans", "Noto Serif KR", sans-serif !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.1em !important;
  font-weight: 600 !important;
  color: #8c8275 !important;
  text-transform: uppercase !important;
}

[data-template="modoomat"] .welcome-desc,
body[data-template="modoomat"] .welcome-desc {
  font-family: "Noto Serif KR", "Pretendard", serif !important;
  font-style: normal !important;
  color: #78716c !important;
  font-size: 0.95rem !important;
}

/* 2. 플로팅 알약/캡슐 아일랜드 헤더 */
[data-template="modoomat"] .app-header,
body[data-template="modoomat"] .app-header {
  position: sticky !important;
  top: 14px !important;
  z-index: 1000 !important;
  background: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;
  padding: 0 16px !important;
}

[data-template="modoomat"] .header-inner,
body[data-template="modoomat"] .header-inner {
  max-width: 1240px !important;
  width: 96% !important;
  margin: 0 auto !important;
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(234, 229, 220, 0.9) !important;
  border-radius: 9999px !important;
  padding: 8px 20px !important;
  height: 64px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

[data-template="modoomat"] .brand-logo,
body[data-template="modoomat"] .brand-logo {
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  text-decoration: none !important;
}

[data-template="modoomat"] .brand-name,
body[data-template="modoomat"] .brand-name {
  white-space: nowrap !important;
  overflow: visible !important;
  display: inline-block !important;
  font-size: 1.2rem !important;
}

[data-template="modoomat"] .brand-icon,
body[data-template="modoomat"] .brand-icon {
  flex-shrink: 0 !important;
  font-size: 1.35rem !important;
  line-height: 1 !important;
  margin-right: 8px !important;
}

[data-template="modoomat"] .brand-badge,
body[data-template="modoomat"] .brand-badge {
  background: #f4f1eb !important;
  color: #78716c !important;
  border: 1px solid #e5dfd5 !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  padding: 2px 8px !important;
  border-radius: 9999px !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

[data-template="modoomat"] .header-nav,
body[data-template="modoomat"] .header-nav {
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
  flex-shrink: 1 !important;
}

[data-template="modoomat"] .nav-link,
body[data-template="modoomat"] .nav-link {
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  color: #52525b !important;
  padding: 6px 11px !important;
  border-radius: 9999px !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  white-space: nowrap !important;
}

[data-template="modoomat"] .nav-link:hover,
body[data-template="modoomat"] .nav-link:hover {
  color: var(--primary) !important;
  background: rgba(0, 0, 0, 0.04) !important;
}

[data-template="modoomat"] .nav-link.active,
body[data-template="modoomat"] .nav-link.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(194, 94, 56, 0.22) !important;
}

[data-template="modoomat"] .header-user,
body[data-template="modoomat"] .header-user {
  flex-shrink: 0 !important;
}

[data-template="modoomat"] .user-badge,
body[data-template="modoomat"] .user-badge {
  border-radius: 9999px !important;
  border: 1px solid #e5dfd5 !important;
  background: #ffffff !important;
}

/* 3. 모두의매트 카드 컴포넌트 & 섹션 구조 */
[data-template="modoomat"] .card,
body[data-template="modoomat"] .card {
  border-radius: var(--radius-md) !important;
  border: 1px solid #eae5dc !important;
  box-shadow: var(--shadow-sm) !important;
  background: #ffffff !important;
  padding: 24px !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

[data-template="modoomat"] .stat-card,
body[data-template="modoomat"] .stat-card {
  border-radius: var(--radius-md) !important;
  border: 1px solid #eae5dc !important;
  box-shadow: var(--shadow-sm) !important;
  background: #ffffff !important;
  padding: 20px 22px !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

[data-template="modoomat"] .stat-card:hover,
body[data-template="modoomat"] .stat-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--shadow-md) !important;
  border-color: #dcd4c6 !important;
}

/* 톤온톤 미니멀 아이콘 래퍼 (유치한 원색 박스 제거) */
[data-template="modoomat"] .stat-icon,
body[data-template="modoomat"] .stat-icon {
  border-radius: 9999px !important;
  width: 48px !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f7f4ee !important;
  border: 1px solid #eae3d7 !important;
  font-size: 1.35rem !important;
  box-shadow: none !important;
}

/* ==========================================================================
   모두의매트(modoomat) 비대칭 벤토 그리드 (Asymmetric Bento Grid) 레이아웃
   ========================================================================== */
[data-template="modoomat"] .stats-grid,
body[data-template="modoomat"] .stats-grid {
  display: grid !important;
  grid-template-columns: 1.6fr 1fr 1fr !important;
  grid-template-rows: auto auto !important;
  gap: 16px !important;
  margin-bottom: 28px !important;
}

/* 1. 좌측 2열 높이의 대형 히어로 카드: 모임 통장 잔액 */
[data-template="modoomat"] .stat-card--hero,
body[data-template="modoomat"] .stat-card--hero {
  grid-column: 1 / 2 !important;
  grid-row: 1 / 3 !important;
  background: linear-gradient(145deg, #ffffff 0%, #fbf9f5 100%) !important;
  border: 1px solid #dfd8cb !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 10px 25px rgba(45, 38, 33, 0.05) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 24px 26px !important;
  min-height: 220px !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

[data-template="modoomat"] .stat-card--hero:hover,
body[data-template="modoomat"] .stat-card--hero:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 14px 32px rgba(45, 38, 33, 0.09) !important;
  border-color: #cbbeaa !important;
}

[data-template="modoomat"] .stat-card--hero .stat-hero-top,
body[data-template="modoomat"] .stat-card--hero .stat-hero-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

[data-template="modoomat"] .stat-card--hero .stat-hero-badges,
body[data-template="modoomat"] .stat-card--hero .stat-hero-badges {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

[data-template="modoomat"] .stat-card--hero .stat-kicker,
body[data-template="modoomat"] .stat-card--hero .stat-kicker {
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  color: var(--primary) !important;
}

[data-template="modoomat"] .stat-card--hero .stat-live-pill,
body[data-template="modoomat"] .stat-card--hero .stat-live-pill {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
  padding: 2px 8px !important;
  border-radius: 9999px !important;
  display: inline-flex !important;
  align-items: center !important;
}

[data-template="modoomat"] .stat-card--hero .stat-info,
body[data-template="modoomat"] .stat-card--hero .stat-info {
  margin-top: 18px !important;
  margin-bottom: auto !important;
}

[data-template="modoomat"] .stat-card--hero .stat-label,
body[data-template="modoomat"] .stat-card--hero .stat-label {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: #78716c !important;
  margin-bottom: 6px !important;
}

[data-template="modoomat"] .stat-card--hero .stat-value,
body[data-template="modoomat"] .stat-card--hero .stat-value {
  font-size: 2.2rem !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em !important;
  color: var(--primary) !important;
  font-family: "IBM Plex Mono", monospace !important;
}

[data-template="modoomat"] .stat-card--hero .stat-hero-link,
body[data-template="modoomat"] .stat-card--hero .stat-hero-link {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: #8c8275 !important;
  padding-top: 14px !important;
  border-top: 1px dashed #eae3d7 !important;
  margin-top: 16px !important;
  transition: color 0.2s ease !important;
}

[data-template="modoomat"] .stat-card--hero:hover .stat-hero-link,
body[data-template="modoomat"] .stat-card--hero:hover .stat-hero-link {
  color: var(--primary) !important;
}

/* 2. 우측 상단 가로 배너형 카드 (미납 관리 또는 내 이번달 회비) */
[data-template="modoomat"] .stats-grid > .stat-card:nth-child(2),
body[data-template="modoomat"] .stats-grid > .stat-card:nth-child(2) {
  grid-column: 2 / 4 !important;
  grid-row: 1 / 2 !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 18px 22px !important;
}

[data-template="modoomat"] .stats-grid > .stat-card:nth-child(2) .stat-icon,
body[data-template="modoomat"] .stats-grid > .stat-card:nth-child(2) .stat-icon {
  margin-bottom: 0 !important;
  flex-shrink: 0 !important;
}

/* 3. 우측 하단 보조 카드 1 (지원금 적립액) */
[data-template="modoomat"] .stats-grid > .stat-card:nth-child(3),
body[data-template="modoomat"] .stats-grid > .stat-card:nth-child(3) {
  grid-column: 2 / 3 !important;
  grid-row: 2 / 3 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

/* 4. 우측 하단 보조 카드 2 (활동 회원 수) */
[data-template="modoomat"] .stats-grid > .stat-card:nth-child(4),
body[data-template="modoomat"] .stats-grid > .stat-card:nth-child(4) {
  grid-column: 3 / 4 !important;
  grid-row: 2 / 3 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

/* 카드가 3개만 존재할 경우 3번째 카드가 우측 하단 전폭 차지 */
[data-template="modoomat"] .stats-grid > .stat-card:last-child:nth-child(3),
body[data-template="modoomat"] .stats-grid > .stat-card:last-child:nth-child(3) {
  grid-column: 2 / 4 !important;
  grid-row: 2 / 3 !important;
}

/* 4. 모두의매트 배너 & 위젯 고도화 */
/* 체험판 배너 */
[data-template="modoomat"] .banner-trial,
body[data-template="modoomat"] .banner-trial {
  border-radius: var(--radius-md) !important;
  background: #ffffff !important;
  border: 1px solid #eae5dc !important;
  box-shadow: var(--shadow-sm) !important;
  padding: 18px 24px !important;
}

[data-template="modoomat"] .banner-trial-tag,
body[data-template="modoomat"] .banner-trial-tag {
  background: #f4efe8 !important;
  color: #786f63 !important;
  border: 1px solid #e4ddd1 !important;
}

/* 명예의 전당 배너 (매트 옵시디언 & 골드 헤어라인) */
[data-template="modoomat"] .banner-hall,
body[data-template="modoomat"] .banner-hall {
  background: #1c1a18 !important;
  border: 1px solid #332f2a !important;
  border-radius: var(--radius-md) !important;
  color: #faf8f5 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
  padding: 24px 30px !important;
}

[data-template="modoomat"] .banner-hall-kicker,
body[data-template="modoomat"] .banner-hall-kicker {
  color: #e6ca85 !important;
}

[data-template="modoomat"] .banner-hall-title,
body[data-template="modoomat"] .banner-hall-title {
  color: #ffffff !important;
  font-family: "General Sans", "Pretendard", sans-serif !important;
}

[data-template="modoomat"] .banner-hall-desc,
body[data-template="modoomat"] .banner-hall-desc {
  font-family: "Noto Serif KR", serif !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-template="modoomat"] .banner-hall-btn,
body[data-template="modoomat"] .banner-hall-btn {
  background: #faf8f5 !important;
  color: #1c1a18 !important;
  border: none !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;
}

[data-template="modoomat"] .banner-hall-btn:hover,
body[data-template="modoomat"] .banner-hall-btn:hover {
  background: #ffffff !important;
  transform: translateY(-2px) !important;
}

/* 생일 축하 배너 (웜 오트 페이퍼 텍스처) */
[data-template="modoomat"] .banner-birthday,
body[data-template="modoomat"] .banner-birthday {
  background: #faf7f2 !important;
  border: 1px solid #ebe4d8 !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-sm) !important;
  padding: 22px 26px !important;
}

[data-template="modoomat"] .banner-birthday-title,
body[data-template="modoomat"] .banner-birthday-title {
  font-family: "Noto Serif KR", "Pretendard", serif !important;
  color: #2c2723 !important;
}

[data-template="modoomat"] .banner-birthday-desc,
body[data-template="modoomat"] .banner-birthday-desc {
  color: #5f574f !important;
}

/* 재정 건전성 카드 & 4대 지표 */
[data-template="modoomat"] .card-financial,
body[data-template="modoomat"] .card-financial {
  background: #ffffff !important;
  border: 1px solid #eae5dc !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-sm) !important;
}

[data-template="modoomat"] .metric-card,
body[data-template="modoomat"] .metric-card {
  border-radius: var(--radius-sm) !important;
  border: 1px solid #eae5dc !important;
  background: #fcfbf9 !important;
  padding: 16px 18px !important;
  transition: all 0.2s ease !important;
}

[data-template="modoomat"] .metric-card:hover,
body[data-template="modoomat"] .metric-card:hover {
  background: #ffffff !important;
  border-color: #dcd4c6 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
}

[data-template="modoomat"] .welfare-summary-bar,
body[data-template="modoomat"] .welfare-summary-bar {
  background: #fbf9f5 !important;
  border: 1px dashed #e2dbd0 !important;
  border-radius: var(--radius-sm) !important;
}

[data-template="modoomat"] .projection-summary-bar,
body[data-template="modoomat"] .projection-summary-bar {
  background: #f8f6f0 !important;
  border-radius: var(--radius-sm) !important;
}

/* 5. 모두의매트 버튼 & 배지 캡슐화 */
[data-template="modoomat"] .btn,
body[data-template="modoomat"] .btn {
  border-radius: 9999px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

[data-template="modoomat"] .btn-primary,
body[data-template="modoomat"] .btn-primary {
  box-shadow: 0 4px 14px rgba(194, 94, 56, 0.22) !important;
}

[data-template="modoomat"] .badge,
body[data-template="modoomat"] .badge {
  border-radius: 9999px !important;
  padding: 3px 10px !important;
  font-weight: 700 !important;
  font-size: 0.76rem !important;
}

/* 5-1. 폼 컨트롤 인풋 & 셀렉트 미니멀라이즈 */
[data-template="modoomat"] .form-control,
[data-template="modoomat"] input[type="text"],
[data-template="modoomat"] input[type="password"],
[data-template="modoomat"] input[type="date"],
[data-template="modoomat"] select,
[data-template="modoomat"] textarea,
body[data-template="modoomat"] .form-control,
body[data-template="modoomat"] input[type="text"],
body[data-template="modoomat"] input[type="password"],
body[data-template="modoomat"] input[type="date"],
body[data-template="modoomat"] select,
body[data-template="modoomat"] textarea {
  border-radius: var(--radius-sm) !important;
  border: 1px solid #eae5dc !important;
  background-color: #ffffff !important;
  font-family: inherit !important;
  transition: all 0.2s ease !important;
}

[data-template="modoomat"] .form-control:focus,
body[data-template="modoomat"] .form-control:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(194, 94, 56, 0.12) !important;
}

/* 6. 테이블 및 서브페이지 모던화 */
[data-template="modoomat"] .table thead th,
body[data-template="modoomat"] .table thead th {
  background: #fbf9f5 !important;
  border-bottom: 1px solid #eae5dc !important;
  color: #71717a !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  padding: 12px 16px !important;
}

[data-template="modoomat"] .table tbody td,
body[data-template="modoomat"] .table tbody td {
  border-bottom: 1px solid #f4f1eb !important;
  padding: 14px 16px !important;
}

[data-template="modoomat"] .table tbody tr:hover td,
body[data-template="modoomat"] .table tbody tr:hover td {
  background: #faf8f5 !important;
}

[data-template="modoomat"] .table-container,
body[data-template="modoomat"] .table-container {
  border-radius: var(--radius-md) !important;
  border: 1px solid #eae5dc !important;
  overflow: hidden !important;
  background: #ffffff !important;
  box-shadow: var(--shadow-sm) !important;
}

[data-template="modoomat"] .sidebar-wrapper,
body[data-template="modoomat"] .sidebar-wrapper {
  border-radius: var(--radius-md) !important;
  border: 1px solid #eae5dc !important;
  background: #ffffff !important;
  box-shadow: 0 4px 16px rgba(45, 38, 33, 0.03) !important;
  padding: 16px !important;
}

[data-template="modoomat"] .sidebar-title,
body[data-template="modoomat"] .sidebar-title {
  font-family: "General Sans", "Pretendard", sans-serif !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  color: #78716c !important;
  letter-spacing: -0.01em !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid #f4f1eb !important;
  margin-bottom: 12px !important;
}

[data-template="modoomat"] .sidebar-link,
body[data-template="modoomat"] .sidebar-link {
  border-radius: 9999px !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  padding: 8px 14px !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  color: #52525b !important;
}

[data-template="modoomat"] .sidebar-link:hover,
body[data-template="modoomat"] .sidebar-link:hover {
  background: #f7f4ee !important;
  color: var(--primary) !important;
}

[data-template="modoomat"] .sidebar-link.active,
body[data-template="modoomat"] .sidebar-link.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(194, 94, 56, 0.22) !important;
}

[data-template="modoomat"] .modal-content,
body[data-template="modoomat"] .modal-content {
  border-radius: 20px !important;
  border: 1px solid #eae5dc !important;
  box-shadow: 0 20px 50px rgba(45, 38, 33, 0.12) !important;
}

[data-template="modoomat"] .page-title,
body[data-template="modoomat"] .page-title,
[data-template="modoomat"] .card-title,
body[data-template="modoomat"] .card-title {
  font-family: "General Sans", "Pretendard", sans-serif !important;
  letter-spacing: -0.02em !important;
}

[data-template="modoomat"] .main-wrapper,
body[data-template="modoomat"] .main-wrapper {
  padding-top: 36px !important;
}

/* 7. 반응형 레이아웃 튜닝 */
@media (max-width: 900px) {
  .dashboard-charts-grid {
    grid-template-columns: 1fr !important;
  }
  [data-template="modoomat"] .app-header,
  body[data-template="modoomat"] .app-header {
    top: 8px !important;
    padding: 0 10px !important;
  }
  [data-template="modoomat"] .header-inner,
  body[data-template="modoomat"] .header-inner {
    height: 56px !important;
    padding: 6px 14px !important;
    width: 98% !important;
  }
  [data-template="modoomat"] .brand-name,
  body[data-template="modoomat"] .brand-name {
    font-size: 1.05rem !important;
  }
  [data-template="modoomat"] .main-wrapper,
  body[data-template="modoomat"] .main-wrapper {
    padding-top: 20px !important;
  }
  [data-template="modoomat"] .stats-grid,
  body[data-template="modoomat"] .stats-grid {
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto !important;
    gap: 12px !important;
  }
  [data-template="modoomat"] .stat-card--hero,
  body[data-template="modoomat"] .stat-card--hero,
  [data-template="modoomat"] .stats-grid > .stat-card:nth-child(2),
  body[data-template="modoomat"] .stats-grid > .stat-card:nth-child(2),
  [data-template="modoomat"] .stats-grid > .stat-card:nth-child(3),
  body[data-template="modoomat"] .stats-grid > .stat-card:nth-child(3),
  [data-template="modoomat"] .stats-grid > .stat-card:nth-child(4),
  body[data-template="modoomat"] .stats-grid > .stat-card:nth-child(4) {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}

