/* ── 个人所得税计算 ── */

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

/* 单选按钮组 */
.radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.3rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: #555;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    accent-color: #2563eb;
}

/* 五险一金比例设置 */
.insurance-rates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.rate-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #555;
}

.rate-item .rate-input {
    width: 60px;
}

.rate-input {
    width: 60px;
    padding: 0.3rem 0.4rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: center;
    font-family: 'Fira Code', monospace;
}

/* 专项附加扣除网格 */
.deduction-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.3rem;
}

.deduction-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.8rem;
    background: #f8f9fb;
    border: 1px solid #e8eaf0;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.deduction-item:hover {
    border-color: #2563eb;
}

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

.deduction-name {
    font-size: 0.88rem;
    color: #333;
    flex: 1;
}

.deduction-amount {
    font-size: 0.78rem;
    color: #999;
    white-space: nowrap;
}

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

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

/* 结果摘要 */
.result-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.summary-item {
    text-align: center;
    padding: 1.2rem;
    background: #f8f9fb;
    border: 1px solid #e8eaf0;
    border-radius: 10px;
}

.summary-label {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 0.3rem;
}

.summary-value {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
}

.summary-value.highlight {
    color: #d97706;
}

.summary-value.primary {
    color: #2563eb;
}

/* 计算过程 */
.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;
}

/* 税率表 */
.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) {
    .gr-form {
        grid-template-columns: 1fr;
    }

    .insurance-rates {
        grid-template-columns: 1fr;
    }

    .deduction-grid {
        grid-template-columns: 1fr;
    }

    .result-summary {
        grid-template-columns: 1fr;
    }

    .summary-value {
        font-size: 1.5rem;
    }

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