/* ===== 기본 리셋 및 변수 ===== */
:root {
  --primary: #5B9BD5;
  --primary-light: #A8C8E8;
  --primary-dark: #2E75B6;
  --primary-bg: #EBF4FC;
  --primary-soft: #D6EAFA;
  --accent: #4A90D9;
  --white: #FFFFFF;
  --gray-50: #F8FAFB;
  --gray-100: #F0F4F8;
  --gray-200: #E2EAF0;
  --gray-300: #C5D5E4;
  --gray-400: #9DB3C8;
  --gray-500: #6B8CA8;
  --gray-600: #4A6B85;
  --gray-700: #2D4A5F;
  --gray-800: #1A2E3C;
  --success: #48A999;
  --success-bg: #E6F4F2;
  --warning: #E8A838;
  --warning-bg: #FEF5E4;
  --danger: #D95B5B;
  --danger-bg: #FDEAEA;
  --text-main: #1A2E3C;
  --text-sub: #4A6B85;
  --text-light: #7A9BB5;
  --border: #C5D5E4;
  --shadow-sm: 0 1px 3px rgba(91,155,213,0.1);
  --shadow-md: 0 4px 12px rgba(91,155,213,0.15);
  --shadow-lg: 0 8px 24px rgba(91,155,213,0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --nav-height: 64px;
  --sub-bar: 26px;
  --header-total: 90px;
  --bottom-nav: 72px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-size: 16px;
  color: var(--text-main);
  background: var(--gray-100);
  overflow: hidden;
}

/* ===== 앱 컨테이너 ===== */
#app {
  width: 100%;
  max-width: 430px;
  height: 100vh;
  margin: 0 auto;
  background: var(--white);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,0.15);
}

/* ===== 페이지 공통 ===== */
.page {
  display: none;
  flex-direction: column;
  height: 100%;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--white);
}
.page.active {
  display: flex;
}

/* ===== 상단 헤더 ===== */
.app-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 0 16px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  box-shadow: none;
}

/* ===== 회사명 서브바 ===== */
.header-sub-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 26px;
  background: linear-gradient(135deg, #1a3354 0%, var(--primary-dark) 100%);
  flex-shrink: 0;
  z-index: 9;
  box-shadow: 0 2px 8px rgba(46,117,182,0.25);
}
.header-sub-bar span {
  font-size: 10px;
  color: rgba(255,255,255,0.70);
  font-weight: 500;
  letter-spacing: 0.4px;
}
.header-sub-bar span:first-child {
  font-weight: 700;
  color: rgba(255,255,255,0.88);
}
.header-sub-bar span:last-child {
  font-style: italic;
  letter-spacing: 0.2px;
}
.app-header h1 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
}
.header-logo {
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.header-back {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 18px;
}
.header-back:hover { background: rgba(255,255,255,0.25); }
.header-action {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  border: none;
  color: white;
  font-size: 20px;
}
/* 텍스트형 헤더 버튼 */
.header-action-text {
  width: auto;
  min-width: 48px;
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.2px;
  background: rgba(255,255,255,0.18);
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  color: #fff;
  white-space: nowrap;
  transition: background 0.2s;
}
.header-action-text:hover {
  background: rgba(255,255,255,0.30);
}

/* ===== 스크롤 영역 ===== */
.page-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}
.page-content.with-bottom-nav {
  padding-bottom: calc(var(--bottom-nav) + 16px);
}

/* ===== 하단 네비게이션 ===== */
.bottom-nav {
  height: var(--bottom-nav);
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-shrink: 0;
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -2px 10px rgba(91,155,213,0.1);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  border: none;
  background: none;
}
.nav-item .nav-icon {
  font-size: 22px;
  transition: transform 0.2s;
}
.nav-item .nav-label {
  font-size: 10px;
  color: var(--gray-400);
  transition: color 0.2s;
  font-weight: 500;
  white-space: nowrap;
}
.nav-item.active .nav-label {
  color: var(--primary-dark);
  font-weight: 700;
}
.nav-item.active .nav-icon {
  transform: translateY(-2px);
}
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

/* ===== 로그인 페이지 ===== */
#page-login {
  background: linear-gradient(160deg, #1a3a5c 0%, var(--primary-dark) 40%, var(--primary) 100%);
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}
#page-login::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 260px; height: 260px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  pointer-events: none;
}
#page-login::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  pointer-events: none;
}
.login-container {
  width: calc(100% - 48px);
  max-width: 360px;
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo-img {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  padding: 18px 32px;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.1);
}
.login-logo-img img {
  width: 200px;
  height: auto;
  display: block;
  object-fit: contain;
}
.login-logo p {
  color: rgba(255,255,255,0.72);
  font-size: 12px;
  margin-top: 0;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
}
.login-company-name {
  color: rgba(255,255,255,0.88) !important;
  font-size: 13px !important;
  margin-top: 6px !important;
  letter-spacing: 0.5px !important;
  text-transform: none !important;
  font-weight: 600 !important;
}
.login-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  box-shadow: var(--shadow-lg);
}
.login-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  text-align: center;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-control {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--text-main);
  background: var(--gray-50);
  transition: all 0.2s;
  outline: none;
  -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(91,155,213,0.15);
}
.form-control::placeholder { color: var(--gray-400); }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-appearance: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(91,155,213,0.4);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(91,155,213,0.5); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--primary-bg);
  color: var(--primary-dark);
  border: 1.5px solid var(--primary-light);
}
.btn-secondary:hover { background: var(--primary-soft); }
.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1.5px solid rgba(217,91,91,0.3);
}
.btn-success {
  background: linear-gradient(135deg, #3a9a8a, var(--success));
  color: var(--white);
}
.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  width: auto;
  border-radius: var(--radius-sm);
}
.btn-outline {
  background: transparent;
  color: var(--primary-dark);
  border: 1.5px solid var(--primary);
}

/* ===== 정렬 버튼 ===== */
.sort-btn {
  padding: 5px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.sort-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary-dark);
  background: var(--primary-bg);
}
.sort-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(91,155,213,0.3);
}

/* ===== 카드 ===== */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 0 16px 12px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-title .icon {
  font-size: 16px;
}

/* ===== 섹션 헤더 ===== */
.section-header {
  padding: 16px 16px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== 홈 대시보드 ===== */
.home-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 20px 20px 28px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.home-banner::after {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.home-banner::before {
  content: '';
  position: absolute;
  right: 30px; bottom: -30px;
  width: 80px; height: 80px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.home-banner .greeting {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 4px;
}
.home-banner .user-name {
  font-size: 22px;
  font-weight: 800;
}
.home-banner .user-info {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 4px;
}
.home-banner .company-name {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.82;
  margin-top: 10px;
  background: rgba(255,255,255,0.15);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

/* ===== 메뉴 그리드 ===== */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
}
.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.menu-item:hover, .menu-item:active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  background: var(--primary-bg);
}
.menu-item .menu-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--primary-bg);
}
.menu-item .menu-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  text-align: center;
  line-height: 1.3;
}

/* 메뉴 아이콘 컬러 */
.mi-c1 .menu-icon { background: #EBF4FC; }
.mi-c2 .menu-icon { background: #E8F5E9; }
.mi-c3 .menu-icon { background: #FFF3E0; }
.mi-c4 .menu-icon { background: #F3E5F5; }
.mi-c5 .menu-icon { background: #E3F2FD; }
.mi-c6 .menu-icon { background: #E8EAF6; }
.mi-c7 .menu-icon { background: #FCE4EC; }

/* ===== 프로필 카드 ===== */
.profile-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: white;
}
.profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: white;
  border: 2px solid rgba(255,255,255,0.4);
  flex-shrink: 0;
}
.profile-hero-info h2 {
  font-size: 20px;
  font-weight: 800;
}
.profile-hero-info p {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 2px;
}
.profile-badges {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-white { background: rgba(255,255,255,0.2); color: white; }
.badge-blue { background: var(--primary-bg); color: var(--primary-dark); }
.badge-green { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* ===== 정보 리스트 ===== */
.info-list {
  padding: 0 16px;
}
.info-item {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
  gap: 12px;
}
.info-item:last-child { border-bottom: none; }
.info-icon {
  width: 36px; height: 36px;
  background: var(--primary-bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.info-content {
  flex: 1;
}
.info-label {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}
.info-value {
  font-size: 15px;
  color: var(--text-main);
  font-weight: 500;
}
.info-value.empty { color: var(--gray-400); font-style: italic; font-size: 13px; }

/* ===== 요청/제출 공통 ===== */
.doc-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 12px;
}
.doc-type-item {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--white);
}
.doc-type-item.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
}
.doc-type-item .doc-icon { font-size: 24px; }
.doc-type-item .doc-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}
.doc-type-item .doc-desc {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.4;
}
.doc-type-item.selected .doc-name { color: var(--primary-dark); }

/* ===== 업로드 박스 ===== */
.upload-box {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--gray-50);
}
.upload-box:hover { border-color: var(--primary); background: var(--primary-bg); }
.upload-box .upload-icon { font-size: 32px; margin-bottom: 8px; }
.upload-box p { font-size: 13px; color: var(--text-sub); }
.upload-box .upload-hint { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* ===== 공지사항 리스트 ===== */
.notice-list {
  padding: 0 16px;
}
.notice-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: all 0.2s;
}
.notice-item:last-child { border-bottom: none; }
.notice-item:hover { background: var(--primary-bg); margin: 0 -16px; padding: 14px 16px; border-radius: var(--radius-sm); }
.notice-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.notice-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  flex: 1;
  line-height: 1.4;
}
.notice-date {
  font-size: 11px;
  color: var(--text-light);
  white-space: nowrap;
  flex-shrink: 0;
}
.notice-preview {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notice-pin {
  font-size: 11px;
  color: var(--primary-dark);
  font-weight: 700;
  background: var(--primary-bg);
  padding: 2px 7px;
  border-radius: 10px;
  margin-right: 6px;
}

/* ===== 알림 배너 ===== */
.alert-banner {
  margin: 0 16px 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.5;
}
.alert-info {
  background: var(--primary-bg);
  color: var(--primary-dark);
  border: 1px solid var(--primary-light);
}
.alert-warning {
  background: var(--warning-bg);
  color: #7A5000;
  border: 1px solid rgba(232,168,56,0.3);
}
.alert-success {
  background: var(--success-bg);
  color: #1A6A5F;
  border: 1px solid rgba(72,169,153,0.3);
}
.alert-danger {
  background: var(--danger-bg);
  color: #7A1818;
  border: 1px solid rgba(217,91,91,0.3);
}
.alert-icon { font-size: 16px; flex-shrink: 0; }

/* ===== 관리자 탭 ===== */
.admin-tabs {
  display: flex;
  gap: 0;
  background: var(--gray-100);
  margin: 12px 16px;
  border-radius: var(--radius-md);
  padding: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE */
  scroll-snap-type: x mandatory;
}
.admin-tabs::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.admin-tab {
  flex: 0 0 auto;
  min-width: 64px;
  padding: 9px 10px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: none;
  white-space: nowrap;
  scroll-snap-align: start;
}
.admin-tab.active {
  background: var(--white);
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}
/* 관리자 탭 컨텐츠 영역 */
.admin-tab-content {
  display: none;
}
.admin-tab-content:first-of-type,
.admin-tab-content[style*='block'] {
  display: block;
}
/* admin-main 을 page-content처럼 스크롤 */
#admin-main {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 32px;
}

/* ===== 테이블 ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  background: var(--gray-100);
  color: var(--text-sub);
  font-weight: 700;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--text-main);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }

/* ===== 모달 ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 430px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
  animation: slideUp 0.3s ease;
}
.modal-center {
  align-items: center;
}
.modal-center .modal {
  border-radius: var(--radius-xl);
  max-width: 360px;
  margin: 0 16px;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-handle {
  width: 40px; height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  margin: 0 auto 16px;
}
.modal-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 16px;
}

/* ===== 체크박스 / 셀렉트 ===== */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.checkbox-chip {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--white);
  color: var(--text-sub);
  user-select: none;
}
.checkbox-chip.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
  color: var(--primary-dark);
  font-weight: 700;
}
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%236B8CA8' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ===== 상태 뱃지 ===== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.status-pending { background: var(--warning-bg); color: var(--warning); }
.status-done { background: var(--success-bg); color: var(--success); }
.status-approved { background: var(--success-bg); color: var(--success); }
.status-rejected { background: var(--danger-bg); color: var(--danger); }

/* ===== 업로드 미리보기 ===== */
.file-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--primary-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--primary-light);
}
.file-preview-icon { font-size: 28px; }
.file-preview-info { flex: 1; }
.file-preview-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}
.file-preview-date {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}
.file-preview-img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  max-height: 200px;
  object-fit: contain;
}

/* ===== 구분선 ===== */
.divider {
  height: 8px;
  background: var(--gray-100);
  margin: 4px 0;
}

/* ===== 빈 상태 ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--text-light);
  text-align: center;
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 14px; color: var(--text-sub); }
.empty-state .empty-sub { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* ===== 로딩 ===== */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 토스트 ===== */
#toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 398px;
}
.toast {
  padding: 13px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  pointer-events: auto;
  box-shadow: var(--shadow-md);
}
.toast-success { background: var(--success); color: white; }
.toast-error { background: var(--danger); color: white; }
.toast-info { background: var(--primary); color: white; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* ===== 복지몰 ===== */
.welfare-coming {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 32px;
  gap: 16px;
}
.welfare-coming .coming-icon {
  font-size: 80px;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.welfare-coming h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
}
.welfare-coming p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.6;
}
.coming-badge {
  background: var(--primary-bg);
  color: var(--primary-dark);
  border: 1.5px solid var(--primary-light);
  padding: 8px 24px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

/* ===== 관리자 전용 접근 제한 ===== */
.access-denied {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 32px;
  gap: 12px;
}
.access-denied .denied-icon { font-size: 64px; }
.access-denied h2 { font-size: 20px; font-weight: 800; color: var(--text-main); }
.access-denied p { font-size: 14px; color: var(--text-sub); }

/* ===== 반응형 ===== */
@media (max-width: 430px) {
  #app { max-width: 100%; box-shadow: none; }
}
@media (min-width: 768px) {
  body { display: flex; align-items: center; justify-content: center; background: #1A2E3C; min-height: 100vh; }
  #app { height: 90vh; max-height: 900px; border-radius: 36px; overflow: hidden; }
}

/* ===== 유틸리티 ===== */
.text-center { text-align: center; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.p-16 { padding: 16px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.font-bold { font-weight: 700; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-sub { color: var(--text-sub); }
.text-light { color: var(--text-light); }
.text-primary { color: var(--primary-dark); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* ===== 상세보기 ===== */
.detail-content {
  padding: 16px;
  line-height: 1.7;
  font-size: 14px;
  color: var(--text-main);
}
.detail-content img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 8px 0;
}

/* ===== 진행 바 ===== */
.progress-step {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 16px;
  overflow-x: auto;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  position: relative;
}
.step-item::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.step-item:last-child::before { display: none; }
.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-500);
  position: relative;
  z-index: 1;
}
.step-item.active .step-dot {
  background: var(--primary);
  color: white;
}
.step-item.done .step-dot {
  background: var(--success);
  color: white;
}
.step-label {
  font-size: 10px;
  color: var(--text-light);
  text-align: center;
}
.step-item.active .step-label { color: var(--primary-dark); font-weight: 700; }
