/*
 文件名称：finance-calculator.css
 作者：wangkai（2026-11-25）
 创作时间：2026-11-25 13:30:00（北京时间）
 文件说明：房贷 / 个税 / 年终奖计算器样式，包含选项卡、参数表单、结果卡片、
          明细表格与移动端适配
*/

/* 页面容器 */
.fc-page {
    max-width: 1290px;
    margin: 24px auto 40px;
    padding: 0 12px;
}

/* 主面板 */
.fc-card {
    background: #ffffff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(31, 45, 61, 0.06);
    padding: 24px;
}

.fc-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
    color: #1f2d3d;
}

.fc-sub {
    margin: 0 0 16px;
    font-size: 13px;
    color: #7a869a;
    line-height: 1.6;
}

/* 选项卡 */
.fc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e5e9f2;
}

.fc-tab {
    padding: 8px 20px;
    border: 1px solid #d5dbe8;
    border-radius: 20px;
    background: #ffffff;
    font-size: 14px;
    color: #3f4a5a;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.fc-tab:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.fc-tab.is-active {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

/* 面板 */
.fc-panel {
    display: none;
}

.fc-panel.is-active {
    display: block;
}

/* 参数表单 */
.fc-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.fc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fc-field > label {
    font-size: 12px;
    color: #7a869a;
}

.fc-input,
.fc-select {
    width: 100%;
    height: 36px;
    padding: 4px 10px;
    border: 1px solid #d5dbe8;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
    color: #1f2d3d;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.fc-select {
    cursor: pointer;
}

.fc-input:focus,
.fc-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* 操作区 */
.fc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.fc-btn {
    padding: 7px 16px;
    border: 1px solid #d5dbe8;
    border-radius: 6px;
    background: #ffffff;
    font-size: 13px;
    color: #1f2d3d;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.fc-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.fc-tip {
    font-size: 13px;
    color: #7a869a;
    line-height: 1.6;
}

.fc-tip.is-ok {
    color: #16a34a;
}

.fc-tip.is-error {
    color: #dc2626;
}

/* 结果卡片 */
.fc-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.fc-stat {
    padding: 14px 16px;
    border: 1px solid #e5e9f2;
    border-radius: 10px;
    background: #fbfcfe;
}

.fc-stat__label {
    font-size: 12px;
    color: #7a869a;
    margin-bottom: 6px;
}

.fc-stat__value {
    font-size: 20px;
    font-weight: 600;
    color: #1f2d3d;
    word-break: break-all;
}

.fc-stat--primary {
    border-color: #cfdcf9;
    background: #f3f7ff;
}

.fc-stat--primary .fc-stat__value {
    color: #2563eb;
}

.fc-stat__extra {
    margin-top: 4px;
    font-size: 12px;
    color: #7a869a;
}

/* 明细表格 */
.fc-table-wrap {
    max-height: 460px;
    overflow: auto;
    border: 1px solid #e5e9f2;
    border-radius: 10px;
}

.fc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #1f2d3d;
}

.fc-table th,
.fc-table td {
    padding: 9px 12px;
    text-align: right;
    white-space: nowrap;
    border-bottom: 1px solid #eef1f7;
}

.fc-table th:first-child,
.fc-table td:first-child {
    text-align: left;
}

.fc-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f6f8fc;
    font-weight: 600;
    color: #5a6678;
}

.fc-table tbody tr:hover {
    background: #f9fbff;
}

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

.fc-table .is-highlight {
    color: #2563eb;
    font-weight: 600;
}

/* 说明列左对齐，便于阅读长文本 */
.fc-table--note th:last-child,
.fc-table--note td:last-child {
    text-align: left;
    white-space: normal;
}

.fc-empty-row {
    text-align: center !important;
    color: #9aa5b8;
    padding: 28px 12px !important;
}

/* 说明文字 */
.fc-note {
    margin: 12px 0 0;
    font-size: 12px;
    color: #9aa5b8;
    line-height: 1.7;
}

/* 移动端适配 */
@media (max-width: 900px) {
    .fc-card {
        padding: 16px;
    }

    .fc-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .fc-stat__value {
        font-size: 18px;
    }

    .fc-table-wrap {
        max-height: 380px;
    }
}
