/* 시간부자 (Time is Money) - Global Styles */

/* ── 기본 초기화 ── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans KR', sans-serif;
  background-color: #F7F3EC;
  color: #1C1C1C;
  overflow-x: hidden;
}

/* ── 타이포그래피 ── */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
}

p {
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
}

/* ── 스크롤바 커스텀 ── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #F7F3EC;
}
::-webkit-scrollbar-thumb {
  background: #C9A96E;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #1A4A3C;
}

/* ── 선택 색상 ── */
::selection {
  background: rgba(201, 169, 110, 0.3);
  color: #1A4A3C;
}

/* ── 공통 컴포넌트 스타일 ── */

/* 섹션 구분선 */
.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #C9A96E, transparent);
  margin-bottom: 24px;
}

/* 배지 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* 버튼 기본 */
button, .btn {
  cursor: pointer;
  transition: all 0.2s ease;
}

/* 입력 필드 기본 */
input, textarea, select {
  font-family: 'Noto Sans KR', sans-serif;
  outline: none;
  transition: border-color 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  border-color: #1A4A3C !important;
  box-shadow: 0 0 0 2px rgba(26, 74, 60, 0.1);
}

/* ── 페이지 전환 ── */
.page-transition {
  animation: fadeInUp 0.4s ease both;
}

/* ── 로딩 스피너 ── */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(26, 74, 60, 0.2);
  border-top-color: #1A4A3C;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── 토스트 알림 ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  background: #1A4A3C;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  border-left: 4px solid #C9A96E;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  animation: slideInRight 0.3s ease;
}

.toast.error {
  background: #8B2020;
  border-left-color: #FF6B6B;
}

.toast.success {
  background: #1A4A3C;
  border-left-color: #C9A96E;
}

/* ── 모달 오버레이 ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: #fff;
  max-width: 480px;
  width: 100%;
  padding: 40px;
  position: relative;
  animation: fadeInUp 0.3s ease;
}

/* ── 대시보드 레이아웃 ── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #0F2E25;
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.main-content {
  background: #F7F3EC;
  padding: 32px;
}

/* ── 카드 ── */
.card {
  background: #fff;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  padding: 28px;
}

.card-dark {
  background: #1A4A3C;
  padding: 28px;
}

/* ── 반응형 유틸리티 ── */
@media (max-width: 1024px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    height: auto;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 20px;
  }
}
