/* Projects Base Styles - shadcn/ui inspired design system */
/* Shared styles for all project pages. Import before page-specific CSS. */

/* ============================================
   0. Web Font — Pretendard (self-hosted, static/fonts/)
   ============================================ */
@font-face {
    font-family: 'Pretendard';
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    src: url('../fonts/Pretendard-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Pretendard';
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    src: url('../fonts/Pretendard-Medium.woff2') format('woff2');
}
@font-face {
    font-family: 'Pretendard';
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    src: url('../fonts/Pretendard-SemiBold.woff2') format('woff2');
}
@font-face {
    font-family: 'Pretendard';
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    src: url('../fonts/Pretendard-Bold.woff2') format('woff2');
}

/* ============================================
   1. CSS Variables
   ============================================ */
:root {
    /* stacker 풍 미니멀 모노크롬 — 순백 배경, 니어블랙 텍스트/버튼, 바이올렛 미세 액센트 */
    --background: 0 0% 100%;           /* white */
    --foreground: 0 0% 9%;             /* near-black */
    --card: 0 0% 100%;                 /* white card (그림자로 분리) */
    --card-foreground: 0 0% 9%;
    --primary: 0 0% 9%;                /* black pill 버튼/헤딩 */
    --primary-foreground: 0 0% 100%;
    --secondary: 0 0% 95%;             /* light-gray pill (보조 버튼/칩) */
    --secondary-foreground: 0 0% 12%;
    --muted: 0 0% 96.5%;               /* 옅은 회색 섹션/블록 */
    --muted-foreground: 0 0% 42%;      /* 중간 회색 보조 텍스트 */
    --accent: 0 0% 94%;                /* hover 회색 surface */
    --accent-foreground: 0 0% 12%;
    --border: 0 0% 90%;                /* hairline */
    --input: 0 0% 90%;
    --ring: 44 90% 50%;                /* 머스터드 focus 액센트 */
    --radius: 0.5rem;
    --destructive: 0 72% 51%;
    --destructive-foreground: 0 0% 100%;
    /* 브랜드 포인트(머스터드 옐로우, Crowd 톤) — 아이콘·hover·강조·언더라인에 스파스하게. hsl(var(--brand)) */
    --brand: 44 96% 58%;
    --brand-foreground: 0 0% 9%;
    /* 다크 히어로/섹션 반전용 */
    --dark: 0 0% 8%;
    --dark-foreground: 0 0% 100%;
}

/* ============================================
   2. Back Button
   ============================================ */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 12px;
    background: hsl(var(--muted));
    border-radius: var(--radius);
    transition: background 0.2s, color 0.2s;
    margin-bottom: 32px;
    white-space: nowrap;
    flex-shrink: 0;
}

.back-btn:hover {
    background: hsl(var(--secondary));
    color: hsl(var(--foreground));
}

.back-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   3. Page Header
   ============================================ */
.page-header {
    text-align: left;
    margin-bottom: 32px;
}

.page-header h1 {
    margin: 0;
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.1;
    color: hsl(var(--foreground));
}

.page-header p {
    margin: 8px 0 0 0;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

/* ============================================
   4. Buttons
   ============================================ */
.btn {
    height: 40px;
    padding: 0 20px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    border-radius: 9999px;   /* DUNA pill 버튼 */
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    text-decoration: none;   /* 앵커 버튼 밑줄 제거 */
    white-space: nowrap;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease,
                background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn .spinner {
    animation: spin 1s linear infinite;
}

/* 버튼 hover sweep (레퍼런스 hvr-sweep-to-right 재현) — 왼→오 옐로우 패널이 채워지고
   글자색은 옐로우 위에서 읽히도록 어둡게 전환. ::before 는 z-index:-1 + isolation 으로
   버튼 배경 위·글자 아래에 그려진다(포커스 box-shadow 링을 clip 하지 않도록 overflow 미사용). */
.btn-primary,
.btn-secondary {
    position: relative;
    isolation: isolate;
}
.btn-primary::before,
.btn-secondary::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: hsl(var(--brand));
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 0.3s ease-out;
}
.btn-primary:hover:not(:disabled)::before,
.btn-secondary:hover:not(:disabled)::before {
    transform: scaleX(1);
}
.btn-primary:hover:not(:disabled),
.btn-secondary:hover:not(:disabled) {
    color: hsl(var(--brand-foreground));
}

/* Primary button */
.btn-primary {
    color: hsl(var(--primary-foreground));
    background: hsl(var(--primary));
}

.btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-primary.processing {
    background: hsl(var(--muted-foreground));
}

/* Secondary button — light-gray pill (stacker 'Sign in' 스타일, 보더 없음) */
.btn-secondary {
    color: hsl(var(--secondary-foreground));
    background: hsl(var(--secondary));
    border-color: transparent;
}

.btn-secondary:active:not(:disabled) {
    transform: translateY(1px);
}

/* Outline button */
.btn-outline {
    color: hsl(var(--foreground));
    background: transparent;
    border: 1px solid hsl(var(--input));
    transition: background 0.2s, border-color 0.2s;
}

.btn-outline:hover:not(:disabled) {
    background: hsl(var(--accent));
    border-color: hsl(var(--accent));
}

/* Destructive button */
.btn-destructive {
    color: hsl(var(--destructive-foreground));
    background: hsl(var(--destructive));
    border: none;
    transition: opacity 0.2s;
}

.btn-destructive:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-destructive:focus-visible {
    box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--destructive));
}

.btn-destructive.processing {
    background: hsl(var(--muted-foreground));
}

/* Full-width button modifier */
.btn-full {
    width: 100%;
    height: 44px;
}

.btn-full svg {
    width: 18px;
    height: 18px;
}

/* Accent button — 머스터드 옐로우 (Crowd 포인트 컬러) */
.btn-accent {
    color: hsl(var(--brand-foreground));
    background: hsl(var(--brand));
    border-color: transparent;
}
.btn-accent:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px -6px hsl(var(--brand) / 0.6);
}
.btn-accent:active:not(:disabled) { transform: translateY(0); box-shadow: none; }

/* Squared 변형 (Crowd 히어로의 각진 CTA) */
.btn-square { border-radius: calc(var(--radius) - 2px); }
.btn-lg { height: 52px; padding: 0 32px; font-size: 0.95rem; }

/* ============================================
   4-b. Design-language utilities (Crowd 톤)
   ============================================ */

/* 섹션 상단 대문자 소형 라벨 ("EXPERTISE" 류) */
.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.75rem;
}
.eyebrow--accent { color: hsl(var(--brand)); }

/* 짧은 옐로우 강조 바 (구분/장식) */
.accent-bar {
    display: inline-block;
    width: 48px;
    height: 4px;
    border-radius: 2px;
    background: hsl(var(--brand));
}

/* 섹션 헤딩 스케일 — 굵고 큰 디스플레이 톤 */
.section-eyebrow-group { text-align: center; margin-bottom: 2.5rem; }
.section-title {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: hsl(var(--foreground));
}
.section-sub {
    margin: 0.9rem auto 0;
    max-width: 34rem;
    font-size: 1rem;
    line-height: 1.6;
    color: hsl(var(--muted-foreground));
}

/* 이미지 히어로 — 세부 페이지 상단 배너(다크 오버레이 + 흰 텍스트). --hero-bg 로 배경 지정 */
.page-hero {
    position: relative;
    color: #fff;
    background-color: #0c0c0c;
    background-image:
        linear-gradient(180deg, rgba(8, 8, 10, 0.6) 0%, rgba(8, 8, 10, 0.78) 100%),
        var(--hero-bg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 4.5rem clamp(1.25rem, 4vw, 3.5rem) 4rem;
}
.page-hero-inner { max-width: 960px; margin: 0 auto; }
.page-hero .page-eyebrow { color: hsl(var(--brand)); }
.page-hero .page-title { color: #fff; }
.page-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.page-hero-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.page-hero-back {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.12);
}
.page-hero-back:hover { color: hsl(var(--brand)); background: rgba(255, 255, 255, 0.18); }
.page-hero .status-badge { background: rgba(255, 255, 255, 0.16); color: #fff; }
.page-hero-sub {
    margin: 1.25rem 0 0;
    max-width: 46rem;
    font-size: 0.95rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
}

/* 밝은/어두운 섹션 리듬 */
.section { padding: 4.5rem 0; }
.section--muted { background: hsl(var(--muted)); }
.section--dark { background: hsl(var(--dark)); color: hsl(var(--dark-foreground)); }

/* 앱 페이지 헤더 chrome — 대문자 eyebrow(옐로우 바) + 굵은 타이틀.
   .page-header 안에서 .back-btn 아래에 .page-eyebrow + .page-title 을 쌓아 쓴다. */
.page-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
    margin: 0 0 0.6rem;
}
.page-eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 1px;
    background: hsl(var(--brand));
}
.page-title {
    margin: 0;
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: hsl(var(--foreground));
}
.page-title .me-scope-tag,
.page-title .badge { vertical-align: middle; }

/* 마일스톤 진행바 (레퍼런스 milestones — 연회색 트랙 위 옐로우 fill) */
.milestone-track {
    position: relative;
    width: 100%;
    height: 6px;
    border-radius: 9999px;
    background: hsl(var(--muted));
    overflow: hidden;
}
.milestone-fill {
    position: absolute;
    inset: 0 auto 0 0;
    height: 100%;
    border-radius: 9999px;
    background: hsl(var(--brand));
    transform-origin: 0 50%;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 스탯 원형 아이콘 (레퍼런스 stats — 옐로우 원 + 아이콘) */
.stat-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    background: hsl(var(--brand));
    color: hsl(var(--brand-foreground));
}
.stat-circle svg { width: 26px; height: 26px; }

/* 사이트 푸터 — 월드맵 배경(레퍼런스 map-bg) 고정 + 스크롤 리빌 */
.site-footer {
    position: relative;
    margin-top: 4rem;
    background-color: hsl(var(--muted));
    background-image: var(--map-bg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;   /* 스크롤 시 맵이 고정돼 드러나는 패럴랙스감 */
    border-top: 1px solid hsl(var(--border));
}
.site-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem clamp(1.25rem, 4vw, 3.5rem);
}
.site-footer-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}
.site-footer-title {
    margin: 0.4rem 0 0;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: hsl(var(--foreground));
}
.site-footer-sub { margin: 0.5rem 0 0; color: hsl(var(--muted-foreground)); }
.site-footer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid hsl(var(--border));
}
.site-footer-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.site-footer-nav { display: flex; gap: 1.5rem; }
.site-footer-nav a {
    color: hsl(var(--foreground));
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.site-footer-nav a:hover { color: hsl(var(--brand)); }
.site-footer-copy { color: hsl(var(--muted-foreground)); font-size: 0.85rem; }

/* 스크롤 리빌 (레퍼런스 image-transition clip-path) — 진입 시 아래→위로 드러나고, 벗어나면 다시 숨김 */
.reveal-clip {
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    opacity: 0;
    transform: translateY(28px);
    transition: clip-path 0.9s ease-out, opacity 0.9s ease-out, transform 0.9s ease-out;
}
.reveal-clip.is-revealed {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .reveal-clip { transition: none; opacity: 1; clip-path: none; transform: none; }
}

/* ============================================
   5. Form Controls
   ============================================ */

/* File input — 네이티브 "파일 선택" 버튼을 웜 pill 로 테마 */
input[type="file"] {
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
    max-width: 100%;
}
input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 8px 16px;
    border-radius: 9999px;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
input[type="file"]::file-selector-button:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--accent));
    transform: translateY(-1px);
}
/* 구형 WebKit 폴백 */
input[type="file"]::-webkit-file-upload-button {
    margin-right: 12px;
    padding: 8px 16px;
    border-radius: 9999px;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}

/* Input Section (card container for inputs) */
.input-section {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 10px 28px -16px rgb(0 0 0 / 0.14);
    margin-bottom: 16px;
}

/* Form Section (card container for forms) */
.form-section {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 10px 28px -16px rgb(0 0 0 / 0.14);
    margin-bottom: 16px;
}

/* Input Group */
.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    margin-bottom: 8px;
}

.input-group input[type="text"] {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font-size: 0.875rem;
    border: 1px solid hsl(var(--input));
    border-radius: var(--radius);
    outline: none;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.input-group input[type="text"]:focus {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.input-group input[type="text"]::placeholder {
    color: hsl(var(--muted-foreground));
}

.input-hint {
    margin: 8px 0 0 0;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

/* Form Group */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    margin-bottom: 8px;
}

.form-group input[type="text"] {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-size: 0.875rem;
    border: 1px solid hsl(var(--input));
    border-radius: var(--radius);
    outline: none;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.form-group input[type="text"]::placeholder {
    color: hsl(var(--muted-foreground));
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

/* Filter Section */
.filter-section {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 10px 28px -16px rgb(0 0 0 / 0.14);
    margin-bottom: 16px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    letter-spacing: normal;
    text-transform: none;
}

.filter-group select {
    height: 40px;
    padding: 0 32px 0 12px;
    font-size: 0.875rem;
    border: 1px solid hsl(var(--input));
    border-radius: var(--radius);
    outline: none;
    background: hsl(var(--background)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 12px center;
    cursor: pointer;
    min-width: 100px;
    font-family: inherit;
    color: hsl(var(--foreground));
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-group select:focus {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

/* ============================================
   6. Progress
   ============================================ */
.progress-section {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: hsl(var(--secondary));
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: hsl(var(--primary));
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.progress-text {
    margin-top: 8px;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    text-align: center;
}

/* ============================================
   7. Result Summary
   ============================================ */
.result-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.summary-item {
    flex: 1;
    min-width: 100px;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 12px 16px;
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    margin-bottom: 4px;
}

.summary-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

/* ============================================
   8. Result List
   ============================================ */
.result-list-container {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.result-list-container h3 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.result-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-item {
    padding: 12px 16px;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--background));
}

.result-company {
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 8px;
}

/* ============================================
   9. Legend
   ============================================ */
.legend {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: hsl(var(--muted));
    border-radius: var(--radius);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: hsl(var(--foreground));
}

.legend-item .symbol {
    font-size: 1rem;
    font-weight: 600;
    width: 20px;
    text-align: center;
}

.legend-item .symbol.circle {
    color: hsl(142 76% 36%);
    font-size: 1.15rem;
}

.legend-item .symbol.triangle {
    color: hsl(45 93% 37%);
}

.legend-item .symbol.x {
    color: hsl(0 84% 50%);
}

.legend-item .symbol.dash {
    color: hsl(var(--muted-foreground));
}

.legend-item .symbol.sharepoint {
    color: hsl(200 80% 50%);
}

.legend-item .symbol.na {
    color: hsl(var(--muted-foreground));
}

/* ============================================
   10. Status Badge
   ============================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.status-badge.pending {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

.status-badge.processing {
    background: hsl(48 96% 89%);
    color: hsl(25 95% 53%);
}

.status-badge.success {
    background: hsl(142 76% 90%);
    color: hsl(142 76% 36%);
}

.status-badge.failed {
    background: hsl(0 84% 92%);
    color: hsl(0 84% 60%);
}

.status-badge.skipped {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

/* ============================================
   11. Company List Table (base, no grid-template-columns)
   ============================================ */
.company-list-container {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    overflow: hidden;
}

.company-list-header {
    display: grid;
    padding: 12px 16px;
    background: hsl(var(--muted));
    border-bottom: 1px solid hsl(var(--border));
    font-weight: 500;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.company-list-item {
    display: grid;
    padding: 12px 16px;
    border-bottom: 1px solid hsl(var(--border));
    transition: background 0.15s ease;
    align-items: center;
    font-size: 0.875rem;
}

.company-list-item:last-child {
    border-bottom: none;
}

.company-list-item:hover {
    background: hsl(var(--muted) / 0.5);
}

.col-num {
    color: hsl(var(--muted-foreground));
    font-weight: 500;
    font-size: 0.75rem;
}

.col-name {
    font-weight: 500;
    color: hsl(var(--foreground));
}

/* ============================================
   12. Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 64px 24px;
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    background: hsl(var(--muted));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-icon svg {
    width: 24px;
    height: 24px;
    color: hsl(var(--muted-foreground));
}

.empty-state h3 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.empty-state p {
    margin: 0;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

/* ============================================
   13. Modal
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 50;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: hsl(var(--foreground) / 0.8);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    animation: dialogIn 0.2s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid hsl(var(--border));
}

.modal-header h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: hsl(var(--muted-foreground));
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background 0.2s, color 0.2s;
}

.close-btn:hover {
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(85vh - 65px);
}

/* ============================================
   14. Info Section
   ============================================ */
.info-section {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 20px;
}

.info-section h3 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.info-section h4 {
    margin: 20px 0 8px 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.info-hint {
    margin: 0 0 16px 0;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    opacity: 0.8;
}

.doc-type-list {
    margin: 0;
    padding: 0 0 0 20px;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.doc-type-list li {
    margin: 6px 0;
}

.doc-type-list strong {
    color: hsl(var(--foreground));
}

.date-info {
    margin: 0 0 8px 0;
    font-size: 0.875rem;
    color: hsl(var(--primary));
    font-weight: 500;
}

.validation-rules {
    margin: 0;
    padding: 0 0 0 20px;
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
}

.validation-rules li {
    margin: 4px 0;
}

.validation-rules strong {
    color: hsl(var(--foreground));
}

/* ============================================
   15. File Link
   ============================================ */
.file-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: hsl(var(--foreground));
    text-decoration: none;
    font-size: 0.875rem;
    padding: 4px 8px;
    background: hsl(var(--secondary));
    border-radius: var(--radius);
    transition: background 0.15s;
}

.file-link:hover {
    background: hsl(var(--accent));
}

.file-link svg {
    width: 14px;
    height: 14px;
}

/* ============================================
   16. Animations
   ============================================ */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes dialogIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ============================================
   17. Responsive Base
   ============================================ */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.5rem;
    }

    .filter-section {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }

    .result-summary {
        flex-direction: column;
    }

    .summary-item {
        min-width: auto;
    }

    .legend {
        flex-direction: column;
        gap: 8px;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
}

/* ============================================
   전역 우상단 햄버거 + 풀스크린 오버레이 메뉴 (_site_nav.html, 모든 페이지)
   ============================================ */
.site-menu-btn {
    position: fixed;
    top: 18px;
    right: clamp(1rem, 3vw, 2rem);
    z-index: 1001;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 9px;
    background: transparent;
    border: 0;
    cursor: pointer;
}
.site-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: hsl(var(--brand));
    transition: transform 0.3s ease, opacity 0.2s ease, background 0.3s ease;
}
body.nav-open .site-menu-btn span { background: #fff; }
body.nav-open .site-menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .site-menu-btn span:nth-child(2) { opacity: 0; }
body.nav-open .site-menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 오버레이 — 두 패널이 우상단부터 border-radius 로 펼쳐진다 */
.site-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    visibility: hidden;
}
.site-nav-overlay::before,
.site-nav-overlay::after {
    content: "";
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(12, 12, 12, 1);
    border-bottom-left-radius: 200%;
    transform: translateX(100%) translateY(-100%);
    transition: transform cubic-bezier(0.77, 0, 0.175, 1) 0.6s, border-radius linear 0.8s;
    z-index: -1;
}
.site-nav-overlay::before {
    background: rgba(22, 22, 22, 0.85);
    transition-delay: 0.2s;
}
body.nav-open .site-nav-overlay { visibility: visible; }
body.nav-open .site-nav-overlay::before,
body.nav-open .site-nav-overlay::after {
    transform: translateX(0) translateY(0);
    border-radius: 0;
}
body.nav-open .site-nav-overlay::after { transition-delay: 0.1s; }
body.nav-open .site-nav-overlay::before { transition-delay: 0s; }

/* 메뉴 항목 — 순차 페이드업 */
.site-nav-content {
    position: fixed;
    inset: 0;
    display: flex;
    /* 인증 영역이 메뉴 목록 아래로 오도록 세로 배치. 기본 row 면 목록 옆에 나란히 붙는다.
       자식이 목록 하나뿐이던 시절과 중앙 정렬 결과는 동일하다. */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    visibility: hidden;
}
body.nav-open .site-nav-content { visibility: visible; }
.site-nav-list { list-style: none; margin: 0; padding: 0; text-align: center; }
.site-nav-list li {
    margin: 0.25rem 0;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.3s ease, transform 0.4s ease;
}
body.nav-open .site-nav-list li { opacity: 1; transform: translateY(0); }
body.nav-open .site-nav-list li:nth-child(1) { transition-delay: 0.50s; }
body.nav-open .site-nav-list li:nth-child(2) { transition-delay: 0.57s; }
body.nav-open .site-nav-list li:nth-child(3) { transition-delay: 0.64s; }
body.nav-open .site-nav-list li:nth-child(4) { transition-delay: 0.71s; }
body.nav-open .site-nav-list li:nth-child(5) { transition-delay: 0.78s; }
body.nav-open .site-nav-list li:nth-child(6) { transition-delay: 0.85s; }
body.nav-open .site-nav-list li:nth-child(7) { transition-delay: 0.92s; }
/* 인증 항목(로그아웃/로그인)도 주 메뉴와 같은 배열이라 링크·버튼을 한 규칙으로 묶는다. */
.site-nav-list a,
.site-nav-list button {
    display: inline-block;
    padding: 0.25rem 1rem;
    color: rgba(255, 255, 255, 0.68);
    text-decoration: none;
    font-family: inherit;
    font-size: clamp(1.8rem, 5.5vw, 3.1rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease;
}
.site-nav-list a:hover,
.site-nav-list button:hover { color: hsl(var(--brand)); }

/* 인증 항목 — 배열은 주 메뉴와 동일하고 글씨만 작게 해서 맨 아래에 둔다. */
.site-nav-auth-item { margin-top: 1rem; }
.site-nav-auth-item a,
.site-nav-auth-item button {
    font-size: clamp(1.05rem, 2.6vw, 1.5rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
}
.site-nav-logout:disabled { opacity: 0.55; cursor: default; }
.site-nav-user {
    margin: 0.9rem 0 0;
    color: rgba(255, 255, 255, 0.32);
    font-size: 0.8rem;
    text-align: center;
    /* 긴 이메일이 오버레이 밖으로 밀리지 않게. */
    max-width: min(90vw, 22rem);
    margin-inline: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}
body.nav-open .site-nav-user { opacity: 1; transition-delay: 0.99s; }
