/* WorkPilot 공통 스타일 */

/* Pretendard Variable — 단일 woff2 파일로 모든 weight 지원 (45~920) */
@font-face {
    font-family: 'Pretendard';
    font-weight: 45 920;          /* variable axis 범위 */
    font-style: normal;
    font-display: swap;
    src: local('Pretendard Variable'),                                  /* OS 설치 폰트 우선 사용 */
         url('/font/web/PretendardVariable.woff2') format('woff2-variations'),
         url('/font/web/PretendardVariable.woff2') format('woff2');     /* 폴백 — 구 브라우저 */
}

/* 전체 폰트 적용 — Tailwind 기본 system-ui 체인 앞에 Pretendard 추가 */
html, body, button, input, select, textarea {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    font-weight: 450;                 /* Variable axis — 기본 400보다 살짝 굵게 */
    -webkit-font-smoothing: auto;     /* subpixel — 글자 획이 또렷해지고 굵기감 살아남 */
    -moz-osx-font-smoothing: auto;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.01em;          /* Pretendard 권장 자간 — 한글 가독성↑ */
    font-feature-settings: 'ss10';    /* 한글 자형 미세 조정 (작은따옴표 등) */
}

/* 숫자 컬럼 정렬용 — 테이블의 금액/날짜/시간 등에 .tabular 부여 */
.tabular { font-variant-numeric: tabular-nums; }

* { box-sizing: border-box; }

/* 폼 컨트롤 라이트 모드 강제 — OS 다크모드에서 select 옵션·input 자동완성·time/color picker 어둡게 표시되는 문제 방지 */
html, body { color-scheme: light; }
select, input, textarea { color-scheme: light; }
select option { background-color: #ffffff; color: #1f2937; }  /* gray-800 */
select option:checked, select option:hover {
    background-color: #eef2ff;  /* indigo-50 */
    color: #4f46e5;             /* indigo-600 */
}

.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 2px; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.15s ease-out; }
