/* =============================================
   카카오페이 테마 — 산지 모바일
   - 진한 검정 텍스트(#1A1A1A) 기반 고가독성
   - 카드: 순백 배경 + 미세 그림자, 큰 둥근 모서리
   - 강조: NH 그린(#059669) + 카카오 옐로우(#FEE500) 보조
   ============================================= */

:root {
  --kp-yellow: #FEE500;
  --kp-yellow-deep: #FADA0A;
  --kp-text: #1A1A1A;
  --kp-text-sub: #5C5C5C;
  --kp-text-mute: #8B8B8B;
  --kp-bg: #F2F3F5;
  --kp-card: #FFFFFF;
  --kp-line: #ECEEF1;
  --nh-green: #009A4E;
  --nh-green-deep: #007E40;
  --nh-blue: #0070E0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Noto Sans KR', sans-serif;
  background: var(--kp-bg) !important;
  color: var(--kp-text);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
.dark body { background: #0F1115 !important; color: #F0F0F0; }

/* === App container — 모바일 dvh 사용으로 주소창 가려짐 방지 === */
#app {
  height: 100dvh !important;
  min-height: 100dvh !important;
  background: var(--kp-bg);
}
.dark #app { background: #0F1115; }

/* === Glass / Bento Cards (카카오 스타일로 단순화) === */
.glass-card,
.bento-card,
.bento-card-wide,
.status-card {
  background: var(--kp-card) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid var(--kp-line) !important;
  border-radius: 18px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  text-align: left;
  transition: transform 0.12s, box-shadow 0.12s;
}
.bento-card,
.bento-card-wide {
  padding: 18px !important;
}
.dark .glass-card,
.dark .bento-card,
.dark .bento-card-wide,
.dark .status-card {
  background: #1A1D24 !important;
  border-color: #262A33 !important;
}
.bento-card:active,
.glass-card:active,
.status-card:active { transform: scale(0.985); }

/* === Status side bar 색상 유지 === */
.status-bar { width: 5px; flex-shrink: 0; border-radius: 5px 0 0 5px; }
.status-pending { background: linear-gradient(to bottom, #FBBF24, #F59E0B); }
.status-active { background: linear-gradient(to bottom, #60A5FA, #3B82F6); }
.status-complete { background: linear-gradient(to bottom, #34D399, #10B981); }
.status-return { background: linear-gradient(to bottom, #C084FC, #A855F7); }
.status-confirm { background: linear-gradient(to bottom, #22D3EE, #06B6D4); }

/* === Chips: 더 굵게, 진하게 === */
.chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.chip-pending { background: #FFF3D6; color: #8A5A00; }
.chip-active { background: #DCEBFF; color: #0050B3; }
.chip-complete { background: #D6F5DF; color: #006C2F; }
.chip-return { background: #ECE0FF; color: #4B1FA8; }
.chip-confirm { background: #C8F1F8; color: #054E5E; }
.dark .chip-pending { background: rgba(251,191,36,0.18); color: #FCD34D; }
.dark .chip-active { background: rgba(96,165,250,0.18); color: #93C5FD; }
.dark .chip-complete { background: rgba(52,211,153,0.18); color: #6EE7B7; }
.dark .chip-return { background: rgba(192,132,252,0.18); color: #D8B4FE; }
.dark .chip-confirm { background: rgba(34,211,238,0.18); color: #67E8F9; }

/* === Tab Bar (탭 더 굵게) === */
.tab-bar {
  display: flex;
  gap: 4px;
  padding: 5px;
  background: #EAECF0;
  border-radius: 16px;
}
.dark .tab-bar { background: #20232B; }

.tab-item {
  flex: 1;
  padding: 12px 6px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  border-radius: 12px;
  transition: all 0.2s;
  white-space: nowrap;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7B7B7B;
}
.tab-active {
  background: white;
  color: var(--kp-text) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.dark .tab-active { background: #2A2F3A; color: #FFFFFF !important; }
.tab-inactive { color: #7B7B7B; }
.dark .tab-inactive { color: #8B919C; }

/* === Form Elements === */
.input-modern {
  padding: 15px 16px;
  border: 1.5px solid #DDE0E5;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  background: white;
  color: var(--kp-text);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  min-height: 52px;
}
.dark .input-modern {
  background: #1A1D24;
  border-color: #2E333D;
  color: #F0F0F0;
}
.input-modern:focus {
  border-color: var(--nh-green);
  box-shadow: 0 0 0 3px rgba(0, 154, 78, 0.15);
  outline: none;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--kp-text);
  margin-bottom: 8px;
}
.dark .form-label { color: #D5D8DE; }

/* === Buttons === */
.btn-primary {
  padding: 16px 24px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 800;
  color: #1A1A1A;
  text-align: center;
  background: var(--kp-yellow);
  box-shadow: 0 2px 6px rgba(250, 218, 10, 0.35);
  transition: all 0.12s;
  border: none;
  cursor: pointer;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.01em;
}
.btn-primary:active { transform: scale(0.97); background: var(--kp-yellow-deep); }

.btn-outline {
  padding: 16px 24px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 800;
  color: var(--kp-text);
  text-align: center;
  background: #F2F3F5;
  border: 1.5px solid #DDE0E5;
  transition: all 0.12s;
  cursor: pointer;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dark .btn-outline { color: #F0F0F0; background: #20232B; border-color: #2E333D; }
.btn-outline:active { background: #E5E7EB; }

/* === Empty State === */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
}
.empty-state p {
  font-size: 16px;
  font-weight: 600;
  color: var(--kp-text-sub);
}

/* === Scrollbar 숨김 === */
::-webkit-scrollbar { width: 0; height: 0; }
::selection { background: rgba(254, 229, 0, 0.4); color: var(--kp-text); }
* { -webkit-tap-highlight-color: transparent; }
[x-cloak] { display: none !important; }

/* =============================================
   타이포그래피 — 카카오페이식 진한 검정 + 굵은 폰트
   기존 Tailwind 클래스를 덮어쓰기
   ============================================= */

/* 본문 기본 텍스트 색상 강화 */
.text-gray-900, .text-gray-800, .text-gray-700 { color: var(--kp-text) !important; }
.dark .text-gray-900, .dark .text-gray-800, .dark .text-gray-700 { color: #F0F0F0 !important; }
.text-gray-600 { color: #3A3A3A !important; font-weight: 600 !important; }
.dark .text-gray-600 { color: #D5D8DE !important; }
.text-gray-500 { color: var(--kp-text-sub) !important; font-weight: 600 !important; }
.dark .text-gray-500 { color: #A8ADB7 !important; }
.text-gray-400 { color: var(--kp-text-mute) !important; font-weight: 600 !important; }
.dark .text-gray-400 { color: #8B919C !important; }
.text-gray-300 { color: #C5C9D0 !important; }

/* Tailwind 폰트 사이즈 보강 — 가독성 확대 */
.text-xs { font-size: 13px !important; line-height: 1.5 !important; font-weight: 600 !important; }
.text-sm { font-size: 15px !important; line-height: 1.55 !important; font-weight: 600 !important; }
.text-base { font-size: 17px !important; line-height: 1.5 !important; font-weight: 600 !important; }
.text-lg { font-size: 19px !important; line-height: 1.4 !important; font-weight: 700 !important; }
.text-xl { font-size: 22px !important; font-weight: 800 !important; }
.text-2xl { font-size: 28px !important; font-weight: 800 !important; }
.text-3xl { font-size: 32px !important; font-weight: 900 !important; }

/* 임의 사이즈 강제 최소화 (이전 너무 작은 텍스트 회피) */
.text-\[10px\] { font-size: 12.5px !important; font-weight: 700 !important; }
.text-\[11px\] { font-size: 13px !important; font-weight: 700 !important; }
.text-\[9px\] { font-size: 12px !important; font-weight: 700 !important; }
.text-\[7px\] { font-size: 11px !important; font-weight: 700 !important; }

/* font-medium → font-semibold 격상해서 두께 강조 */
.font-medium { font-weight: 700 !important; }
.font-semibold { font-weight: 800 !important; }
.font-bold { font-weight: 800 !important; }
.font-extrabold { font-weight: 900 !important; }

/* 테이블 가독성 확대 */
table { font-size: 15px; font-weight: 600; }
th, td { padding: 13px 10px !important; color: var(--kp-text); }
.dark th, .dark td { color: #E5E7EB; }
th { font-weight: 800; color: var(--kp-text-sub) !important; }

/* 아이콘 / 터치 영역 확대 */
.header-btn,
button.w-9 { min-width: 44px; min-height: 44px; }

/* 리스트 간격 확대 */
.space-y-2 > * + * { margin-top: 0.75rem !important; }
.space-y-2\.5 > * + * { margin-top: 0.85rem !important; }
.space-y-3 > * + * { margin-top: 1rem !important; }

/* 체크박스/라디오 확대 */
input[type="checkbox"],
input[type="radio"] { width: 22px !important; height: 22px !important; accent-color: var(--nh-green); }

/* =============================================
   카카오페이식 강조 컬러 — 브랜드 그린/옐로우
   ============================================= */
.text-brand-500, .text-brand-600 { color: var(--nh-green) !important; }
.dark .text-brand-500, .dark .text-brand-600 { color: #4ADE80 !important; }
.text-brand-700 { color: var(--nh-green-deep) !important; }
.bg-brand-500, .bg-brand-600 { background-color: var(--nh-green) !important; }
.bg-brand-50 { background-color: #E6F8EE !important; }
.dark .bg-brand-50 { background-color: rgba(0,154,78,0.15) !important; }
.border-brand-500, .border-brand-600 { border-color: var(--nh-green) !important; }

/* =============================================
   하단 네비게이션 — 카카오페이 스타일
   ============================================= */
.kp-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: #FFFFFF;
  border-top: 1px solid var(--kp-line);
  z-index: 40;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.dark .kp-bottom-nav {
  background: #15171D;
  border-top-color: #262A33;
}
.kp-bottom-nav .nav-row {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: 64px;
  position: relative;
}
.kp-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 0;
  color: #8E939E;
  font-size: 12px;
  font-weight: 700;
  transition: color 0.15s;
  min-height: 56px;
}
.kp-nav-btn.active {
  color: var(--kp-text);
}
.dark .kp-nav-btn { color: #7B8290; }
.dark .kp-nav-btn.active { color: #FFFFFF; }
.kp-nav-btn svg { width: 24px; height: 24px; }
.kp-nav-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* === 중앙 FAB '등록' 버튼 === */
.kp-fab {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--nh-green) 0%, #00C261 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 154, 78, 0.35), 0 0 0 4px #FFFFFF;
  transition: transform 0.15s;
  color: #FFFFFF;
  cursor: pointer;
}
.dark .kp-fab {
  box-shadow: 0 6px 18px rgba(0, 154, 78, 0.45), 0 0 0 4px #15171D;
}
.kp-fab:active { transform: translateX(-50%) scale(0.92); }
.kp-fab-spacer { flex: 1; min-width: 64px; }
.kp-fab-label {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 800;
  color: var(--nh-green);
  white-space: nowrap;
}
.dark .kp-fab-label { color: #4ADE80; }

/* === 등록 안내 그리드 카드 === */
.kp-reg-card {
  background: #FFFFFF;
  border: 1px solid var(--kp-line);
  border-radius: 18px;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  transition: transform 0.12s, background 0.12s;
}
.dark .kp-reg-card {
  background: #1A1D24;
  border-color: #262A33;
}
.kp-reg-card:active {
  transform: scale(0.96);
  background: #F7F8FA;
}
.dark .kp-reg-card:active { background: #20232B; }
.kp-reg-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}
.kp-reg-card-label {
  font-size: 14px;
  font-weight: 800;
  color: var(--kp-text);
}
.dark .kp-reg-card-label { color: #F0F0F0; }
.kp-reg-card-desc {
  font-size: 12px;
  font-weight: 600;
  color: var(--kp-text-mute);
  line-height: 1.4;
}

/* === 메인 영역 하단 패딩 — 하단 네비 가림 방지 === */
main#mainContent {
  padding-bottom: calc(92px + env(safe-area-inset-bottom, 0)) !important;
}
