/* ============================================================
   EAST ASIA INVESTMENT - 디자인 시스템
   모바일 우선(mobile-first) 반응형. 브레이크포인트: 640 / 900 / 1200
   ============================================================ */

:root {
    /* EAST ASIA INVESTMENT — 심볼의 초록·라임 그라디언트에서 추출한 팔레트 */
    --primary: #2E8B33;        /* 딥 그린 : 헤더·푸터·버튼 */
    --primary-dark: #1E5C23;   /* 히어로·다크 배경 */
    --primary-light: #57A544;
    --primary-fg: #f5faf3;
    --accent: #A9CE3C;         /* 라임 : 강조·배지 (밝으므로 어두운 글자와 조합) */
    --accent-dark: #6F9B1E;    /* 흰 배경 위 라임 계열 텍스트용 */
    --accent-soft: #DCE96A;
    --bg: #f4f7f2;
    --card: #ffffff;
    --border: #e0e8dc;
    --fg: #17301a;             /* 워드마크가 검정이므로 제목은 진한 그린블랙 */
    --text: #23302a;
    --muted: #6b7a6e;
    --success: #059669;
    --success-bg: #d1fae5;
    --warning: #b45309;
    --warning-bg: #fef3c7;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    --radius-sm: .5rem;
    --radius: .875rem;
    --radius-lg: 1.25rem;
    --radius-xl: 1.75rem;
    --shadow-sm: 0 1px 2px rgba(18, 42, 20, .06);
    --shadow: 0 6px 20px -6px rgba(18, 42, 20, .14);
    --shadow-lg: 0 18px 48px -16px rgba(18, 42, 20, .28);
    --shadow-brand: 0 14px 34px -12px rgba(169, 206, 60, .55);
    --header-h: 60px;
    --ease: cubic-bezier(.22, .61, .36, 1);
    --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont,
                 "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    word-break: keep-all;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { letter-spacing: -.02em; }

::selection { background: var(--accent); color: #fff; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 { color: var(--fg); margin: 0 0 .5rem; line-height: 1.35; font-weight: 700; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.075rem; }

p { margin: 0 0 .75rem; }

/* ---------------- 레이아웃 ---------------- */

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

.page { padding: 20px 0 56px; }

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.page-head .sub { color: var(--muted); font-size: .875rem; margin: 0; }

.section { margin-bottom: 40px; }

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (min-width: 640px) {
    body { font-size: 16px; }
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.5rem; }
    .grid-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
    .grid-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .container { padding: 0 24px; }
}

/* ---------------- 헤더 ---------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}

/* 히어로 위에 겹쳐 있을 때는 투명하게 (홈에서만 .header-over 부여) */
.site-header.header-over {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.site-header.header-over .brand,
.site-header.header-over .site-nav > ul > li > a { color: #fff; }
.site-header.header-over .brand small { color: rgba(255, 255, 255, .7); }
.site-header.header-over .nav-toggle { border-color: rgba(255, 255, 255, .45); }
.site-header.header-over .nav-toggle span { background: #fff; }
.site-header.header-over .btn-outline {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .5);
    color: #fff;
}

.site-header.scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 4px 20px -12px rgba(18, 42, 20, .3);
}

/* 모바일 메뉴가 열리면 항상 불투명 배경 */
.site-header:has(.site-nav.open) {
    background: var(--card);
    backdrop-filter: none;
}
.site-header:has(.site-nav.open) .brand,
.site-header:has(.site-nav.open) .site-nav > ul > li > a { color: var(--fg); }
.site-header:has(.site-nav.open) .nav-toggle span { background: var(--primary); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: var(--header-h);
}

/* ---------------- 브랜드 (CI) ---------------- */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--primary);
    white-space: nowrap;
    line-height: 1;
}

/* 심볼: 골조는 currentColor 라서 어두운 배경에서 자동으로 흰색이 된다 */
.brand-mark {
    flex: none;
    display: block;
    overflow: visible;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

/* 워드마크는 영문 전용. 로고와 같은 굵은 그로테스크 + 자간 넓은 서브라인 */
.brand-text strong {
    font-family: "Arial Black", "Archivo Black", Impact, "Helvetica Neue", sans-serif;
    font-size: 1.1875rem;
    font-weight: 900;
    letter-spacing: -.01em;
    line-height: 1;
    color: inherit;
    white-space: nowrap;
}

.brand-text em {
    font-size: .5rem;
    font-weight: 500;
    font-style: normal;
    letter-spacing: .3em;
    line-height: 1;
    color: var(--muted);
    white-space: nowrap;
}

.site-header.header-over .brand-text em { color: rgba(255, 255, 255, .78); }
.admin-side .brand-text em { color: rgba(255, 255, 255, .68); }

@media (max-width: 380px) {
    .brand-text strong { font-size: 1.0625rem; }
    .brand-text em { font-size: .4375rem; letter-spacing: .22em; }
}

.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 0 8px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: transform .2s;
}

.site-nav { display: none; }

.site-nav.open {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    background: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 8px 16px 16px;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-nav a {
    display: block;
    padding: 12px 8px;
    font-weight: 600;
    color: var(--fg);
    border-radius: var(--radius-sm);
}

/* 밝은 배경 위에서는 라임 원색이 흐려 보이므로 진한 라임을 쓴다 */
.site-nav a:hover, .site-nav a.active { background: var(--bg); color: var(--accent-dark); }

/* 히어로 위 투명 헤더에서는 글자가 흰색이다.
   이때 활성 메뉴에 밝은 배경이 깔리면 흰 글씨가 묻히므로 배경도 반투명 흰색으로 바꾼다. */
.site-header.header-over .site-nav > ul > li > a:hover,
.site-header.header-over .site-nav > ul > li > a.active {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

/* 모바일 슬라이드 메뉴는 흰 패널이므로 다시 진한 라임으로 */
.site-header:has(.site-nav.open) .site-nav > ul > li > a:hover,
.site-header:has(.site-nav.open) .site-nav > ul > li > a.active {
    background: var(--bg);
    color: var(--accent-dark);
}

.site-nav .nav-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.site-nav .nav-actions .btn { flex: 1; }

@media (min-width: 900px) {
    .nav-toggle { display: none; }
    .site-nav { display: block !important; position: static; box-shadow: none; border: 0; padding: 0; }
    .site-nav ul { flex-direction: row; align-items: center; gap: 4px; }
    .site-nav a { padding: 8px 14px; }
    .site-nav .nav-actions { margin: 0 0 0 12px; padding: 0 0 0 12px; border-top: 0; border-left: 1px solid var(--border); }
    .site-nav .nav-actions .btn { flex: none; }
}

/* ---------------- 버튼 ---------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: .9375rem;
    font-weight: 700;
    font-family: inherit;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .1s;
    white-space: nowrap;
    text-align: center;
}

.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: var(--shadow); }
.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    box-shadow: var(--shadow-brand);
}
.btn-accent:hover { filter: brightness(1.06); color: #fff; transform: translateY(-1px); }
.btn-outline { background: var(--card); border-color: var(--border); color: var(--fg); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--accent); }
.btn-danger { background: var(--card); border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .8125rem; }
.btn-lg { padding: 14px 26px; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------------- 카드 ---------------- */

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card-body { padding: 16px; }
.card-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.card-head h3 { margin: 0; font-size: 1rem; }

/* 공고 카드 */
.job-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform .32s var(--ease-out), box-shadow .32s var(--ease-out), border-color .2s;
    height: 100%;
}

.job-card:hover {
    transform: translateY(-6px);
    border-color: rgba(169, 206, 60, .45);
    box-shadow: var(--shadow-lg);
}

/* ---------------- 공고 상세 대표 이미지 ----------------
   등록된 사진이 있으면 그 사진을, 없으면 직종별 기본 아트워크(_CategoryArt)를
   같은 자리에 같은 비율로 보여준다. */

.job-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--primary);
    box-shadow: var(--shadow-sm);
    /* 업로드 이미지를 세로형(4:5)으로 규격화해 저장하므로 표시도 같은 비율로 맞춘다 */
    aspect-ratio: 4 / 5;
}

/* ---- 공고 상세 : PC 는 왼쪽 이미지 · 오른쪽 내용 2단 ---- */
.job-detail { display: block; }

@media (min-width: 900px) {
    .job-detail {
        display: grid;
        grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
        gap: 26px;
        align-items: start;
    }

    /* 오른쪽 내용을 내려도 이미지는 따라온다 */
    .job-detail-media { position: sticky; top: calc(var(--header-h) + 16px); }
}

.job-hero img,
.job-hero .cat-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 아래쪽을 살짝 눌러 뱃지가 항상 읽히게 한다 */
.job-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 45%;
    background: linear-gradient(to top, rgba(8, 26, 12, .55), transparent);
    pointer-events: none;
}

.job-hero-badges {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 1;
}

.job-card .thumb {
    position: relative;
    /* 저장 규격과 같은 세로형 4:5 — 카드에서도 잘리지 않는다 */
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--primary);
}

.job-card .thumb img,
.job-card .thumb .cat-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s var(--ease-out);
}

.job-card:hover .thumb img,
.job-card:hover .thumb .cat-art { transform: scale(1.06); }

/* 이미지 위 텍스트 가독성용 그라디언트 */
.job-card .thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8, 30, 12, .72) 0%, rgba(8, 30, 12, .12) 42%, transparent 68%);
    pointer-events: none;
}

.job-card .thumb .badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

/* 카드 이미지 하단에 얹는 지역·회사 정보 */
.job-card .thumb .overlay {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    z-index: 2;
    color: #fff;
    font-size: .8125rem;
    font-weight: 600;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}

.job-card .info { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }

.job-card .title {
    font-weight: 700;
    color: var(--fg);
    font-size: 1.0625rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    transition: color .2s;
}

.job-card:hover .title { color: var(--accent-dark); }

.job-card .meta { font-size: .8125rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }

.job-card .pay {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.job-card .pay strong { font-size: 1.3125rem; color: var(--accent-dark); letter-spacing: -.02em; }
.job-card .pay span { font-size: .8125rem; color: var(--muted); }
.job-card .pay .go { font-size: .8125rem; font-weight: 700; color: var(--primary); }

/* ---------------- 배지 / 태그 ---------------- */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}

.badge-cat { background: rgba(46, 139, 51, .1); color: var(--primary); }

/* 이미지 위에 얹는 유리 배지 (공고 카드 썸네일 · 상세 대표 이미지) */
.badge-glass {
    background: rgba(8, 30, 12, .55);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .28);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.badge-open { background: var(--success-bg); color: var(--success); }
.badge-closed { background: #e2e8f0; color: var(--muted); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-accent { background: rgba(169, 206, 60, .14); color: var(--accent-dark); }

/* ---------------- 폼 ---------------- */

.form { display: flex; flex-direction: column; gap: 16px; }

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

.field > label, .field-label {
    font-size: .875rem;
    font-weight: 700;
    color: var(--fg);
}

.field .req { color: var(--danger); }

.field .hint { font-size: .8125rem; color: var(--muted); }

input[type=text], input[type=password], input[type=tel], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], input[type=search],
input[type=email], select, textarea {
    width: 100%;
    padding: 11px 12px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(87, 165, 68, .12);
}

textarea { resize: vertical; min-height: 96px; line-height: 1.6; }

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: .9375rem;
    cursor: pointer;
}

.check input[type=checkbox] { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--primary); }

.form-row { display: grid; gap: 16px; }

@media (min-width: 640px) {
    .form-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 8px;
}

.form-actions .btn { flex: 1 1 140px; }

.field-error, .validation-summary-errors {
    color: var(--danger);
    font-size: .8125rem;
    font-weight: 600;
}

.validation-summary-errors ul { margin: 0; padding-left: 18px; }

.alert {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: .9375rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.alert-error { background: var(--danger-bg); color: var(--danger); border-color: rgba(220, 38, 38, .2); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: rgba(180, 83, 9, .2); }
.alert-success { background: var(--success-bg); color: var(--success); border-color: rgba(5, 150, 105, .2); }
.alert-info { background: rgba(46, 139, 51, .07); color: var(--primary); border-color: rgba(46, 139, 51, .15); }

/* ---------------- 필터 바 ---------------- */

.filter-bar {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}

.filter-row { display: grid; gap: 12px; }

@media (min-width: 700px) {
    .filter-row { grid-template-columns: 1fr 1fr auto; align-items: end; }
}

.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
}

.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip:has(input:checked) { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------------- 테이블 ---------------- */

.table-wrap {
    overflow-x: auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    -webkit-overflow-scrolling: touch;
}

table.data {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: .875rem;
}

table.data th, table.data td {
    padding: 11px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

table.data th {
    background: #f8fafc;
    color: var(--muted);
    font-weight: 700;
    font-size: .8125rem;
    position: sticky;
    top: 0;
}

table.data tbody tr:hover { background: #fafbfc; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.wrap { white-space: normal; min-width: 200px; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------- 정의 목록 (상세 정보) ---------------- */

.spec-list { display: grid; gap: 0; margin: 0; }

.spec-list > div {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    font-size: .9375rem;
}

.spec-list > div:last-child { border-bottom: 0; }
.spec-list dt { color: var(--muted); font-weight: 600; margin: 0; }
.spec-list dd { margin: 0; font-weight: 600; color: var(--text); }

@media (min-width: 640px) {
    .spec-list > div { grid-template-columns: 140px 1fr; }
}

/* ---------------- 통계 타일 ---------------- */

.stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow-sm);
}

.stat .label { font-size: .8125rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.stat .value { font-size: 1.5rem; font-weight: 800; color: var(--primary); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: .875rem; font-weight: 600; color: var(--muted); }
.stat.accent .value { color: var(--accent-dark); }
.stat.success .value { color: var(--success); }
.stat.danger .value { color: var(--danger); }

/* ---------------- 탭 (내 일당, 관리자 목록 필터) ---------------- */

.tab-row { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }

.tab-row a {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 700;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--muted);
}

.tab-row a.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------------- 히어로 ---------------- */

.hero {
    background: linear-gradient(140deg, var(--primary) 0%, var(--primary-dark) 60%, #0F2B14 100%);
    color: var(--primary-fg);
    padding: 44px 0 48px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -60px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(169, 206, 60, .16);
}

.hero .eyebrow {
    display: inline-block;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--accent-soft);
    margin-bottom: 10px;
}

.hero h1 {
    color: #fff;
    font-size: 1.75rem;
    line-height: 1.35;
    margin-bottom: 12px;
    position: relative;
}

.hero p { color: rgba(248, 250, 252, .82); max-width: 34rem; margin-bottom: 22px; position: relative; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; position: relative; }

.hero-actions .btn { flex: 1 1 140px; }

@media (min-width: 640px) {
    .hero { padding: 64px 0 68px; }
    .hero h1 { font-size: 2.5rem; }
    .hero-actions .btn { flex: none; min-width: 150px; }
}

/* ---------------- CTA 밴드 ---------------- */

.cta-band {
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    display: grid;
    gap: 16px;
}

.cta-band h2 { color: #fff; margin: 0; }
.cta-band p { color: rgba(255, 255, 255, .78); margin: 4px 0 0; font-size: .9375rem; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-band .actions .btn { flex: 1 1 140px; }

@media (min-width: 800px) {
    .cta-band { grid-template-columns: 1fr auto; align-items: center; }
    .cta-band .actions .btn { flex: none; }
}

/* ---------------- 푸터 ---------------- */

.site-footer {
    background: var(--primary-dark);
    color: rgba(248, 250, 252, .7);
    padding: 32px 0 40px;
    margin-top: 48px;
    font-size: .875rem;
}

.site-footer a { color: rgba(248, 250, 252, .82); }
.site-footer a:hover { color: var(--accent-soft); }
.site-footer .cols { display: grid; gap: 20px; margin-bottom: 20px; }
.site-footer h4 { color: #fff; font-size: .9375rem; margin-bottom: 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.site-footer .copy { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 16px; font-size: .8125rem; }

@media (min-width: 700px) {
    .site-footer .cols { grid-template-columns: 2fr 1fr 1fr; }
}

/* ---------------- 페이징 ---------------- */

.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.pager .page-info { font-size: .875rem; color: var(--muted); font-weight: 600; }

/* ---------------- 토스트 ---------------- */

.toast {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 20px;
    z-index: 500;
    padding: 14px 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-weight: 700;
    font-size: .9375rem;
    background: var(--primary);
    color: #fff;
    animation: toast-in .25s ease-out;
}

.toast.success { background: var(--success); }
.toast.warning { background: var(--warning); }
.toast.error { background: var(--danger); }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

@media (min-width: 640px) {
    .toast { left: auto; right: 24px; max-width: 380px; }
}

/* ---------------- QR 스캔 ---------------- */

.scanner {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    aspect-ratio: 1;
    background: #0F2B14;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.scanner video, .scanner canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.scanner .frame {
    position: absolute;
    inset: 14%;
    border: 3px solid rgba(255, 255, 255, .85);
    border-radius: var(--radius);
    box-shadow: 0 0 0 100vmax rgba(14, 33, 54, .45);
    pointer-events: none;
}

.scanner .frame::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: var(--accent);
    animation: scanline 2.2s ease-in-out infinite;
}

@keyframes scanline {
    0%, 100% { top: 0; }
    50% { top: calc(100% - 2px); }
}

.scanner .placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 10px;
    text-align: center;
    color: rgba(255, 255, 255, .8);
    padding: 24px;
}

.scan-result {
    max-width: 460px;
    margin: 16px auto 0;
    padding: 18px;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 700;
}

.scan-result .big { font-size: 1.375rem; margin-bottom: 6px; }
.scan-result .detail { font-size: .875rem; font-weight: 600; opacity: .85; }

/* QR 표출 화면 (현장 게시용) */
.qr-stage {
    display: grid;
    gap: 20px;
    place-items: center;
    text-align: center;
    padding: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.qr-stage img {
    width: min(340px, 78vw);
    height: auto;
    border-radius: var(--radius);
    border: 8px solid #fff;
    box-shadow: var(--shadow);
}

.qr-stage .manual-code {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: .35em;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.qr-stage .countdown {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--accent-dark);
}

.qr-stage .bar {
    width: min(340px, 78vw);
    height: 6px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.qr-stage .bar > i {
    display: block;
    height: 100%;
    background: var(--accent);
    transition: width .95s linear;
}

/* ---------------- 유틸 ---------------- */

.muted { color: var(--muted); }
.small { font-size: .8125rem; }
.strong { font-weight: 700; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 16px; }
.flex-1 { flex: 1; }
.hide-mobile { display: none; }
.pre-line { white-space: pre-line; }

@media (min-width: 640px) {
    .hide-mobile { display: initial; }
}

.empty {
    padding: 48px 20px;
    text-align: center;
    color: var(--muted);
    background: var(--card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

.empty .icon { font-size: 2.5rem; margin-bottom: 8px; }

.list-plain { list-style: none; margin: 0; padding: 0; }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check-list li { display: flex; gap: 8px; align-items: flex-start; font-size: .9375rem; }
.check-list li::before { content: "✓"; color: var(--success); font-weight: 800; flex: none; }

/* 스크린리더 전용 */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
