.jobstats-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.page-nav-link-wrap {
    text-align: right;
    margin-bottom: 10px;
}
.page-nav-link {
    font-size: 13px;
    font-weight: 600;
    color: #7a829a;
    text-decoration: none;
    padding: 5px 12px;
    border: 1px solid #e6e8ef;
    border-radius: 20px;
    background: #f4f5f9;
    transition: background 0.15s, color 0.15s;
    display: inline-block;
}
.page-nav-link:hover {
    background: #3C3744;
    color: #fff;
    border-color: #3C3744;
}

.jobstats-header {
    text-align: center;
    margin-bottom: 30px;
}
.jobstats-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #3C3744;
    margin: 0 0 8px;
}
.jobstats-sub {
    color: #555;
    font-size: 14px;
    margin: 0 0 6px;
}
.jobstats-meta {
    color: #777;
    font-size: 13px;
    margin: 0;
}

.jobstats-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 18px 0 26px;
}
.jobstats-filter label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #444;
}
.jobstats-filter select {
    padding: 6px 10px;
    border: 1px solid #ccd3e0;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    color: #3C3744;
}

/* ===== 날짜 선택 달력 ===== */
.date-picker-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #444;
}
.date-picker-wrap  { position: relative; }

.date-picker-btn {
    padding: 6px 12px;
    border: 1px solid #ccd3e0;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    color: #3C3744;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: border-color 0.15s, background 0.15s;
}
.date-picker-btn:hover {
    border-color: #3C3744;
    background: #f7f8fb;
}

.cal-popup {
    position: fixed;
    background: #fff;
    border: 1px solid #dde1ea;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(60,55,68,0.14);
    padding: 14px;
    z-index: 1000;
    width: 280px;
}

/* 직업군 분포 섹션 날짜 버튼 */
.date-picker-btn-sm {
    padding: 3px 10px;
    border: 1px solid #ccd3e0;
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    color: #3C3744;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: border-color 0.15s, background 0.15s;
    margin-left: 8px;
    vertical-align: middle;
}
.date-picker-btn-sm:hover {
    border-color: #3C3744;
    background: #f7f8fb;
}

.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.cal-nav button {
    background: none;
    border: 1px solid #e0e3ec;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #3C3744;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cal-nav button:hover { background: #f0f2f7; }
.cal-title {
    font-size: 14px;
    font-weight: 700;
    color: #3C3744;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.cal-dow {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: #aab0c0;
    padding: 4px 0;
}
.cal-day {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 2px;
    border-radius: 6px;
    color: #ccc;
    cursor: default;
    user-select: none;
}
.cal-empty { visibility: hidden; }
.cal-no-data { color: #d0d3dc; }
.cal-has-data {
    color: #3C3744;
    cursor: pointer;
    background: #f4f5f9;
}
.cal-has-data:hover { background: #e3e6f0; }
.cal-selected {
    background: #3C3744;
    color: #fff;
    cursor: pointer;
}
.cal-today { outline: 2px solid #B4C5E4; outline-offset: -2px; }

.jobstats-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f7f8fb;
    border-radius: 12px;
    color: #555;
}
.jobstats-empty .hint {
    margin-top: 8px;
    font-size: 12px;
    color: #888;
}
.jobstats-empty code {
    background: #ececf3;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.jobstats-chart-wrap {
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 28px;
    height: 760px;
    overflow: hidden;
}

/* === 역대 추이 라인 === */
.jobstats-timeseries-wrap {
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 28px;
}
.ts-range {
    font-size: 11px;
    font-weight: 600;
    color: #B4C5E4;
    margin-left: 8px;
}
.ts-chart-box {
    position: relative;
    height: 320px;
}
.ts-period-bar {
    display: flex;
    gap: 6px;
    margin: 10px 0 14px;
}
.ts-period-btn {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #7a829a;
    background: #f4f5f9;
    border: 1px solid #e6e8ef;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.ts-period-btn:hover {
    background: #e8eaf2;
    color: #3C3744;
}
.ts-period-btn.active {
    background: #3C3744;
    border-color: #3C3744;
    color: #fff;
}
.ts-empty {
    text-align: center;
    padding: 30px 20px;
    color: #666;
}
.ts-empty .hint {
    margin-top: 6px;
    font-size: 12px;
    color: #999;
}
@media (max-width: 600px) {
    .ts-chart-box { height: 260px; }
    .ts-period-bar { flex-wrap: wrap; }
}

/* === 직업군 분포 도넛 === */
.jobstats-archetype-wrap {
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 28px;
}
.archetype-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef0f5;
}
.archetype-title {
    font-size: 16px;
    font-weight: 700;
    color: #3C3744;
    margin: 0;
}
.archetype-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.arch-tab {
    background: #f4f5f9;
    color: #555;
    border: 1px solid #e1e4ee;
    border-radius: 18px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.arch-tab:hover {
    background: #e9ecf3;
}
.arch-tab.active {
    background: #3C3744;
    color: #fff;
    border-color: #3C3744;
}
.archetype-hint {
    margin: 14px 0 0;
    font-size: 12px;
    color: #888;
    text-align: right;
}
.archetype-row {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: center;
}
.archetype-chart-box {
    position: relative;
    width: 280px;
    height: 280px;
}
.archetype-legend {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px 18px;
}
.archetype-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #444;
}
.archetype-legend .legend-dot {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #ccc;
    flex-shrink: 0;
}
.archetype-legend .legend-name {
    font-weight: 700;
    color: #3C3744;
    min-width: 42px;
}
.archetype-legend .legend-count {
    color: #666;
    font-size: 12px;
}

@media (max-width: 720px) {
    .archetype-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .archetype-chart-box {
        width: 220px;
        height: 220px;
        margin: 0 auto;
    }
}

.jobstats-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.jobstats-group {
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 12px;
    padding: 16px 18px;
}
.jobstats-group h2 {
    font-size: 15px;
    font-weight: 700;
    color: #3C3744;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eef0f5;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.jobstats-group h2 .group-total {
    font-size: 12px;
    color: #B4C5E4;
    font-weight: 600;
}
.jobstats-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.jobstats-group li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: #444;
    border-bottom: 1px dashed #f0f1f5;
}
.jobstats-group li:last-child { border-bottom: none; }
.jobstats-group .job-count {
    font-weight: 700;
    color: #3C3744;
}

@media (max-width: 720px) {
    .jobstats-container { padding: 22px 12px 60px; }
    .jobstats-header h1 { font-size: 22px; }
    .jobstats-sub { font-size: 13px; }
    .jobstats-meta { font-size: 12px; line-height: 1.6; }

    /* 막대그래프 — 46개 직업 라벨이 빠듯하니 좀 더 키우고 padding 줄이기 */
    .jobstats-chart-wrap {
        height: 1180px;
        padding: 10px 6px 10px 0;
    }

    /* 필터 — 가로 배치 유지하되 갭 축소 */
    .jobstats-filter { gap: 8px; margin: 14px 0 18px; }
    .jobstats-filter select { padding: 5px 8px; font-size: 12px; }

    /* 영역(섹션) 패딩 슬림 */
    .jobstats-archetype-wrap,
    .jobstats-timeseries-wrap {
        padding: 14px 12px;
    }
    .archetype-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .archetype-tabs { width: 100%; gap: 5px; }
    .arch-tab { padding: 5px 10px; font-size: 11px; }
    .archetype-hint { text-align: center; font-size: 11px; }

    /* 도넛 + 범례 스택 */
    .archetype-row { gap: 14px; }
    .archetype-chart-box { width: 200px; height: 200px; }
    .archetype-legend {
        grid-template-columns: 1fr 1fr;
        gap: 8px 12px;
        font-size: 12px;
    }
    .archetype-legend .legend-count { font-size: 11px; }

    /* 시계열 */
    .ts-chart-box { height: 240px; }

    /* 직업군 카드 — 모바일에서 2열 또는 1열 */
    .jobstats-groups {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .jobstats-group { padding: 12px 14px; }
    .jobstats-group h2 { font-size: 13px; padding-bottom: 6px; margin-bottom: 8px; }
    .jobstats-group h2 .group-total { font-size: 11px; }
    .jobstats-group li { font-size: 12px; padding: 4px 0; }
}

@media (max-width: 420px) {
    /* 아주 좁은 화면 — 1열로 */
    .jobstats-groups { grid-template-columns: 1fr; }
    .archetype-legend { grid-template-columns: 1fr; }
    .archetype-chart-box { width: 180px; height: 180px; }
    .jobstats-chart-wrap { height: 1100px; }
}

/* ===== 빠른 기간 선택 ===== */
.quick-period-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin: -8px 0 20px;
    flex-wrap: wrap;
}
.quick-period-label {
    font-size: 12px;
    color: #aab0c0;
    font-weight: 600;
}
.quick-period-btn {
    padding: 4px 14px;
    border: 1px solid #ccd3e0;
    border-radius: 14px;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    color: #555;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.quick-period-btn:hover {
    border-color: #3C3744;
    color: #3C3744;
    background: #f7f8fb;
}
.quick-period-btn.active {
    background: #3C3744;
    border-color: #3C3744;
    color: #fff;
}

/* ===== 뷰 모드 토글 ===== */
.view-mode-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 0 22px;
}
.view-mode-btn {
    padding: 8px 30px;
    border: 2px solid #ccd3e0;
    border-radius: 24px;
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    color: #666;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.view-mode-btn:hover {
    border-color: #3C3744;
    color: #3C3744;
    background: #f7f8fb;
}
.view-mode-btn.active {
    background: #3C3744;
    border-color: #3C3744;
    color: #fff;
}

/* ===== 증감율 모드 ===== */

/* 직업군별 요약 카드 */
.arch-growth-summary {
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 20px;
}
.arch-growth-header {
    margin-bottom: 14px;
}
.arch-growth-title {
    font-size: 14px;
    font-weight: 700;
    color: #3C3744;
}
.arch-growth-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.arch-growth-card {
    flex: 1 1 130px;
    min-width: 110px;
    background: #f8f9fc;
    border: 1px solid #e6e8ef;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.arch-growth-arch {
    font-size: 13px;
    font-weight: 700;
}
.arch-growth-rate {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.15;
}
.arch-growth-detail {
    font-size: 12px;
    font-weight: 600;
}
.arch-growth-counts {
    font-size: 11px;
    color: #aab0c0;
    font-variant-numeric: tabular-nums;
}
.arch-growth-rate.delta-up   { color: #e53935; }
.arch-growth-rate.delta-down { color: #1e88e5; }
.arch-growth-rate.delta-same { color: #aab0c0; }
.arch-growth-detail.delta-up   { color: #e53935; }
.arch-growth-detail.delta-down { color: #1e88e5; }
.arch-growth-detail.delta-same { color: #aab0c0; }

.growth-chart-section {
    margin-bottom: 20px;
}
.growth-chart-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}
.growth-metric-toggle {
    display: flex;
    gap: 3px;
    background: #f4f5f9;
    border: 1px solid #e6e8ef;
    border-radius: 8px;
    padding: 3px;
}
.growth-metric-btn {
    padding: 4px 14px;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    color: #7a829a;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.growth-metric-btn.active {
    background: #3C3744;
    color: #fff;
}
.growth-metric-btn:hover:not(.active) {
    background: #e8eaf2;
    color: #3C3744;
}

.growth-chart-wrap {
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 12px;
    padding: 18px;
    overflow: hidden;
}

.growth-table-wrap {
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 28px;
}
.growth-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.growth-table th {
    background: #f4f5f9;
    color: #3C3744;
    font-weight: 700;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e6e8ef;
    white-space: nowrap;
}
.growth-table th.num-cell { text-align: right; }
.growth-table td {
    padding: 8px 14px;
    border-bottom: 1px solid #f0f1f5;
    color: #444;
}
.growth-table tr:last-child td { border-bottom: none; }
.growth-table tr:hover td { background: #fafbfd; }
.growth-table .num-cell { text-align: right; font-variant-numeric: tabular-nums; }
.growth-table .job-name-cell { font-weight: 600; color: #3C3744; }
.growth-table .job-group-cell { color: #888; font-size: 12px; }

.growth-table td.delta-up   { color: #e53935; font-weight: 700; }
.growth-table td.delta-down { color: #1e88e5; font-weight: 700; }
.growth-table td.delta-same { color: #aab0c0; }

@media (max-width: 720px) {
    .view-mode-btn { padding: 7px 20px; font-size: 13px; }
    .growth-metric-btn { padding: 4px 10px; font-size: 11px; }
    .growth-chart-wrap { padding: 10px 6px 10px 0; }
    .growth-table { font-size: 12px; }
    .growth-table th, .growth-table td { padding: 7px 8px; }
    .arch-growth-card { flex: 1 1 100px; padding: 10px 12px; }
    .arch-growth-rate { font-size: 17px; }
}
