/* ===================== 社保公积金计算器 ===================== */

.btn-block { width: 100%; margin-top: 8px; }

.si-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.si-title { font-size: 20px; font-weight: 800; margin: 0; }
.si-download-btn { flex-shrink: 0; margin: 0; }

.si-layout { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }
.si-card {
    background: var(--c-surface, #fff);
    border: 1px solid var(--c-border, #e2e8f0);
    border-radius: 16px;
    padding: 22px;
}
.si-block-title { font-size: 15px; font-weight: 800; color: var(--c-text, #0f172a); margin: 0 0 14px; }

.si-field { margin-bottom: 16px; }
.si-field > label { display: block; font-size: 13px; font-weight: 700; color: var(--c-text-sub, #334155); margin-bottom: 7px; }
.si-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--c-border, #e2e8f0);
    border-radius: 10px;
    background: var(--c-surface, #fff);
    color: var(--c-text, #0f172a);
    font-size: 15px;
    font-weight: 600;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.si-input:focus { border-color: var(--c-primary, #0066ff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary, #0066ff) 15%, transparent); }
.si-help { font-size: 12px; color: var(--c-text-muted, #94a3b8); margin: 6px 0 0; line-height: 1.7; }

.si-radios { display: flex; gap: 8px; flex-wrap: wrap; }
.si-radio { position: relative; }
.si-radio input { position: absolute; opacity: 0; pointer-events: none; }
.si-radio span {
    display: inline-block;
    padding: 9px 14px;
    border: 1px solid var(--c-border, #e2e8f0);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--c-text-sub, #334155);
    cursor: pointer;
    background: var(--c-surface, #fff);
    transition: all .15s;
}
.si-radio input:checked + span { border-color: #10b981; background: #ecfdf5; color: #047857; }

.si-result-empty { text-align: center; padding: 60px 20px; color: var(--c-text-muted, #94a3b8); }
.si-result-empty .emoji { font-size: 40px; margin-bottom: 10px; }
.si-result-empty p { font-size: 14px; margin: 0; }

.si-overview { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.si-ov { padding: 14px; border-radius: 12px; text-align: center; background: var(--c-surface-soft, #f8fafc); border: 1px solid var(--c-border, #e2e8f0); }
.si-ov.blue { background: color-mix(in srgb, #2563eb 8%, var(--c-surface, #fff)); border-color: color-mix(in srgb, #2563eb 28%, var(--c-border, #e2e8f0)); }
.si-ov.orange { background: color-mix(in srgb, #f97316 8%, var(--c-surface, #fff)); border-color: color-mix(in srgb, #f97316 28%, var(--c-border, #e2e8f0)); }
.si-ov .k { display: block; font-size: 12px; color: var(--c-text-muted, #64748b); }
.si-ov .v { display: block; font-size: 22px; font-weight: 900; margin-top: 4px; font-variant-numeric: tabular-nums; }
.si-ov.blue .v { color: #1d4ed8; }
.si-ov.orange .v { color: #ea580c; }
.si-ov .u { font-size: 11px; color: var(--c-text-muted, #94a3b8); }

.si-sub-title { font-size: 14px; font-weight: 800; color: var(--c-text, #0f172a); margin: 18px 0 10px; }
.si-table-wrap { overflow-x: auto; border: 1px solid var(--c-border, #e2e8f0); border-radius: 10px; }
.si-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 460px; }
.si-table th, .si-table td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--c-border, #e2e8f0); }
.si-table th { background: var(--c-surface-soft, #f8fafc); font-weight: 800; color: var(--c-text-sub, #334155); font-size: 12px; }
.si-table th:first-child, .si-table td:first-child { text-align: left; }
.si-table tr:last-child td { border-bottom: none; }
.si-table td { color: var(--c-text-sub, #334155); font-variant-numeric: tabular-nums; }
.si-table tr.sum td { font-weight: 800; color: var(--c-text, #0f172a); background: var(--c-surface-soft, #f8fafc); }

.si-note { font-size: 12px; color: var(--c-text-muted, #94a3b8); line-height: 1.8; margin-top: 14px; }

/* ---- 基数上下限输入 ---- */
.si-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---- 基数自动校正提示 ---- */
.si-adjust {
    margin-bottom: 14px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.75;
    background: color-mix(in srgb, #f59e0b 12%, var(--c-surface, #fff));
    border: 1px solid color-mix(in srgb, #f59e0b 32%, var(--c-border, #e2e8f0));
    color: #92400e;
}

/* ---- 个人 vs 单位 对比条 ---- */
.si-bars { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.si-bar-row { display: grid; grid-template-columns: 108px 1fr 96px; align-items: center; gap: 10px; }
.si-bar-label { font-size: 12px; font-weight: 700; }
.si-bar-label.blue { color: #1d4ed8; }
.si-bar-label.orange { color: #ea580c; }
.si-bar { height: 15px; border-radius: 99px; background: var(--c-surface-soft, #f1f5f9); overflow: hidden; }
.si-bar > span { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .45s ease; }
.si-bar-row:nth-child(1) .si-bar > span { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.si-bar-row:nth-child(2) .si-bar > span { background: linear-gradient(90deg, #f97316, #fb923c); }
.si-bar-val { text-align: right; font-size: 12px; font-weight: 800; color: var(--c-text, #0f172a); font-variant-numeric: tabular-nums; }

/* ---- 年度合计 ---- */
.si-year { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.si-year-ov {
    padding: 13px;
    border-radius: 12px;
    text-align: center;
    background: var(--c-surface-soft, #f8fafc);
    border: 1px solid var(--c-border, #e2e8f0);
}
.si-year-ov .k { display: block; font-size: 12px; color: var(--c-text-muted, #64748b); }
.si-year-ov .v { display: block; font-size: 17px; font-weight: 900; margin-top: 4px; font-variant-numeric: tabular-nums; color: var(--c-text, #0f172a); }
.si-year-ov .v.blue { color: #1d4ed8; }
.si-year-ov .v.orange { color: #ea580c; }

/* ---- 暗色模式补全 ---- */
[data-theme="dark"] .si-radio input:checked + span { background: color-mix(in srgb, #10b981 18%, #131c31); color: #34d399; }
[data-theme="dark"] .si-ov.blue .v, [data-theme="dark"] .si-year-ov .v.blue { color: #60a5fa; }
[data-theme="dark"] .si-ov.orange .v, [data-theme="dark"] .si-year-ov .v.orange { color: #fb923c; }
[data-theme="dark"] .si-adjust { background: color-mix(in srgb, #f59e0b 14%, #131c31); border-color: #78350f; color: #fbbf24; }
[data-theme="dark"] .si-bar { background: #1e293b; }
[data-theme="dark"] .si-bar-label.blue { color: #60a5fa; }
[data-theme="dark"] .si-bar-label.orange { color: #fb923c; }

@media (max-width: 900px) {
    .si-layout { grid-template-columns: 1fr; }
    .si-overview { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .si-year { grid-template-columns: 1fr; }
    .si-bar-row { grid-template-columns: 92px 1fr 82px; }
}
