.withholding-view {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 28px 34px 34px;
    color: #e5edf7;
    overflow: hidden;
}

.withholding-view .w-page-head,
.withholding-view .w-toolbar {
    flex: 0 0 auto;
}

#wPanelMonthly,
#wPanelSemi {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#wPanelPayroll,
#wPanelMgmt {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
}
#wPanelPayroll::-webkit-scrollbar,
#wPanelMgmt::-webkit-scrollbar {
    display: none;
}

.w-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 24px;
}

.w-page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    color: #f5f7fb;
    font-size: 1.48rem;
    line-height: 1.2;
    font-weight: 760;
}

.w-preview-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    color: #d6dbe5;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.7rem;
    font-weight: 720;
}

.w-page-subtitle {
    margin: 0;
    color: #99a5b7;
    font-size: 0.88rem;
}

.w-help-btn,
.w-month-btn,
.w-confirm-btn {
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.w-help-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: #c4ccd8;
    background: rgba(15, 28, 47, 0.84);
    border: 1px solid rgba(158, 171, 192, 0.18);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.w-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    max-width: 980px;
    margin-bottom: -1px;
}

.archive-tabs.w-tabs {
    gap: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background: rgba(12, 24, 42, 0.76);
    border: 1px solid rgba(150, 164, 186, 0.14);
    border-bottom: 0;
}

.w-tabs .tab-btn {
    min-width: 132px;
    padding: 14px 24px;
    border-radius: 0;
    color: #a9b3c2;
    background: transparent;
    border-right: 1px solid rgba(150, 164, 186, 0.10);
    font-size: 0.92rem;
    font-weight: 680;
}

.w-tabs .tab-btn.active {
    color: #f6f8fb;
    background: linear-gradient(180deg, rgba(69, 83, 111, 0.82), rgba(36, 47, 67, 0.78));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.w-confirm-btn {
    min-width: 118px;
    padding: 10px 18px;
    margin: 6px 10px;
    border-radius: 999px;
    color: #c8f7dc;
    background: rgba(22, 101, 52, 0.18);
    font-size: 0.82rem;
    font-weight: 720;
}

.w-month-control {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 10px;
    background: rgba(12, 24, 42, 0.58);
    border: 1px solid rgba(150, 164, 186, 0.12);
}

.w-month-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #c9d2df;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 7px;
}

.w-month-label {
    min-width: 92px;
    color: #e9edf5;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
}

.w-table-card {
    width: fit-content;
    max-width: 100%;
    min-width: min(100%, 780px);
    padding: 22px 24px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    border-radius: 0 12px 12px 12px;
    background: linear-gradient(180deg, rgba(18, 32, 53, 0.92), rgba(16, 29, 49, 0.88));
    border: 1px solid rgba(159, 174, 195, 0.16);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.w-table-card::-webkit-scrollbar {
    display: none;
}

.w-loading,
.w-empty {
    padding: 46px 54px;
    color: #9aa7b8;
    text-align: center;
    font-size: 0.9rem;
}

.w-empty small {
    color: #78869a;
}

/* 원천신고 매월납/반기납 표 — 헤더(고정) + 본문(내부 스크롤) CSS Grid 구조.
   네이티브 table의 position:sticky thead는 border-collapse/spacing과 맞물려
   스크롤 시 이전 행이 헤더 위로 비쳐 보이는 크로미움 렌더링 버그가 있어 회피함. */
.w-grid-head,
.w-grid-body {
    width: fit-content;
    min-width: 100%;
}

.w-grid-head {
    flex: 0 0 auto;
}

.w-grid-row {
    display: grid;
    grid-template-columns: var(--w-grid-cols, 170px repeat(5, 118px));
    align-items: center;
}

.w-grid-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(96, 165, 250, 0.35) transparent;
}
.w-grid-body::-webkit-scrollbar { width: 5px; }
.w-grid-body::-webkit-scrollbar-track { background: transparent; }
.w-grid-body::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.35);
    border-radius: 4px;
}

.w-th {
    padding: 10px 13px 12px;
    color: #aeb8c7;
    font-size: 0.76rem;
    font-weight: 760;
    text-align: center;
    white-space: nowrap;
}

.w-company-th {
    min-width: 170px;
    padding-left: 18px;
    padding-right: 10px;
    text-align: left;
}

.w-data-row {
    background: rgba(31, 47, 72, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
    border-radius: 8px;
}

.w-data-row:hover {
    background: rgba(38, 56, 82, 0.78);
}

.w-company-cell {
    min-width: 170px;
    max-width: 210px;
    padding: 14px 10px 14px 18px;
    color: #f1f5fa;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.w-company-done {
    color: #79e6a7;
    text-shadow: 0 0 10px rgba(121, 230, 167, 0.34);
}

.w-status-cell {
    min-width: 80px;
    padding: 13px 10px;
    text-align: center;
    white-space: nowrap;
}

.w-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 58px;
    padding: 3px 8px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
    background: transparent;
    transition: transform 0.16s ease, opacity 0.16s ease, text-shadow 0.16s ease;
}

.w-status:hover {
    transform: translateY(-1px);
    opacity: 0.96;
}

.w-status-icon {
    display: none;
}

.w-status-uploaded {
    color: #f4c76a;
    background: rgba(244, 199, 106, 0.075);
    text-shadow: 0 0 10px rgba(244, 199, 106, 0.36);
}

.w-status-done {
    color: #79e6a7;
    background: rgba(121, 230, 167, 0.075);
    text-shadow: 0 0 10px rgba(121, 230, 167, 0.34);
}

.w-status-missing {
    color: rgba(196, 204, 216, 0.58);
    background: rgba(196, 204, 216, 0.045);
    text-shadow: none;
}

.w-legend {
    padding: 10px 4px 2px;
    color: #7f8da1;
    font-size: 0.76rem;
}

@media (max-width: 860px) {
    .withholding-view {
        padding: 20px 16px 28px;
    }
    .w-page-head,
    .w-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .archive-tabs.w-tabs,
    .w-month-control {
        width: 100%;
    }
    .w-tabs .tab-btn {
        min-width: 0;
        flex: 1;
        padding: 12px 10px;
    }
    .w-table-card {
        min-width: 100%;
        border-radius: 12px;
        padding: 14px;
    }
}

