/* ── 税后薪资计算器 ── */

/* 表单2列 */
.sh-form {
    grid-template-columns: 1fr 1fr;
}

/* 专项附加扣除勾选 */
.deduction-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.5rem;
    margin-top: 0.3rem;
}

.deduction-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
}

.deduction-check input[type="checkbox"] {
    accent-color: #2563eb;
    width: 16px;
    height: 16px;
}

/* 结果区域 */
.sh-result {
    margin-top: 1.5rem;
}

.result-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.8rem;
}

/* 薪资条可视化 */
.salary-breakdown {
    margin-bottom: 1.5rem;
}

.breakdown-bar {
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    margin-bottom: 0.6rem;
}

.bar-segment {
    transition: width 0.3s;
    min-width: 2px;
}

.bar-take {
    background: #2563eb;
}

.bar-insurance {
    background: #60a5fa;
}

.bar-tax {
    background: #fbbf24;
}

.bar-legend {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    font-size: 0.82rem;
    color: #666;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

/* 计算过程 */
.calc-process {
    background: #f8f9fb;
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    overflow: hidden;
}

.process-step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1.2rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.process-step:last-child {
    border-bottom: none;
}

.process-label {
    color: #666;
}

.process-val {
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    color: #333;
}

.process-step-sub {
    background: #f0f4ff;
}

.process-step-sub .process-label {
    font-weight: 600;
    color: #2563eb;
}

.process-step-sub .process-val {
    color: #2563eb;
}

.process-step-final {
    background: white;
    border-top: 2px solid #2563eb;
}

.process-step-final .process-label {
    font-weight: 700;
    color: #333;
}

.process-step-final .process-val {
    color: #2563eb;
    font-size: 1.1rem;
    font-weight: 700;
}

/* 年度汇算 */
.annual-summary {
    background: #f8f9fb;
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    overflow: hidden;
}

.annual-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1.2rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

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

.annual-label {
    color: #666;
}

.annual-val {
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    color: #333;
}

.annual-item.highlight {
    background: #fffbeb;
}

.annual-item.highlight .annual-label {
    font-weight: 600;
    color: #92400e;
}

.annual-item.highlight .annual-val {
    color: #d97706;
    font-weight: 700;
}

.annual-item.primary {
    background: white;
    border-top: 2px solid #2563eb;
}

.annual-item.primary .annual-label {
    font-weight: 700;
    color: #333;
}

.annual-item.primary .annual-val {
    color: #2563eb;
    font-size: 1.1rem;
    font-weight: 700;
}

/* 对照表 */
.tax-table-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.tax-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.tax-table th {
    background: #f5f7fa;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
}

.tax-table td {
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.tax-table tr:last-child td {
    border-bottom: none;
}

/* Mobile */
@media (max-width: 640px) {
    .sh-form {
        grid-template-columns: 1fr;
    }

    .deduction-checks {
        gap: 0.5rem 1rem;
    }

    .bar-legend {
        gap: 0.8rem;
        flex-wrap: wrap;
    }

    .tax-table th,
    .tax-table td {
        padding: 0.6rem 0.5rem;
        font-size: 0.8rem;
    }
}