/* ============================================================
 * cal-1 主样式
 * 主色调集中在 :root 的 --primary 变量，改这一处即整站换色
 * 结果表格 .calc-table 配色独立，不跟随主色调（借鉴目标站观感）
 * ============================================================ */
:root {
    /* ===== 整站主色调（改这里即可换肤） ===== */
    --primary: #1c6dc3;
    --primary-dark: #1f57c9;
    --primary-light: #eaf1fe;
    --text: #1f2329;
    --text-sub: #646a73;
    --border: #e8e8e8;
    --bg: #f5f7fa;
    --radius: 10px;
    --maxw: 1920px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container {
    /* max-width: var(--maxw); */
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== 顶部导航 ===== */
.site-header {
    background: var(--primary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header .container {
    display: flex;
    align-items: center;
    height: 60px;
    gap: 24px;
}
/* .site-logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-light);
    white-space: nowrap;
} */
.home-page a{
    color: #ffffff;
    font-size: 16px;
}
.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.site-nav a {
    padding: 6px 12px;
    border-radius: 8px;
    color: var(--primary-light);
    font-size: 14px;
}
.site-nav a:hover,
.site-nav a.active {
    background: var(--primary-light);
    color: var(--primary);
}

/* ===== 区块通用 ===== */
.section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin: 16px 0;
}
.section h2 {
    margin: 0 0 16px;
    font-size: 18px;
}
.section h3 {
    margin: 15px 0 15px;
    font-size: 16px;
    color: var(--text-sub);
    font-weight: bold;
    padding: 15px;
    border: 1px solid #ededed;
    border-radius: 5px;
    background: var(--bg);
}

/* ===== 子栏目（二级） ===== */
.subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.subnav a {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 13px;
    color: var(--text-sub);
    font-weight:bold;
}
.subnav a.active,
.subnav a:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* ===== 表单：区块卡片布局 ===== */
.calc-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 每个逻辑区块的卡片容器 */
.calc-block {
    background: var(--bg);
    border: 1px solid #e8ecf1;
    border-radius: 8px;
    /* border-left: 2px solid var(--primary); */
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* 区块标题 */
.block-title {
    font-size: 15px;
    font-weight: 700;
    color: #1f2329;
    padding-bottom: 10px;
    border-bottom: 1px solid #f2f4f7;
    margin-bottom: 0;
}

/* ===== .field-inline 已废弃，保留为无害空壳（布局改用 Bootstrap 栅格） ===== */
.field-inline {
    margin-bottom: 0;
}

/* ===== Bootstrap 表单控件覆盖（保持现有视觉风格） ===== */
.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-sub);
    white-space: nowrap;
}
.form-control,
.form-select {
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    font-size: 15px;
    color: var(--text);
    height: 40px;
    padding: 0 12px;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-light) !important;
}

/* ===== 统一控制所有输入框/下拉框宽度（改这里的 max-width 即可整站生效） ===== */
.calc-input {
    max-width: 200px;
    width: 100%;
}

/* calc-block 内 Bootstrap 行间距与卡片内部 gap 一致 */
.calc-block > .row {
    margin-bottom: 0;
}

/* ===== 通用 .field（垂直布局，用于 field-row 内部） ===== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; color: var(--text-sub); font-weight: 500; }
.field input,
.field select {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    background: #fff;
    color: var(--text);
}
.field input:focus,
.field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ===== field-row：纵向排列，用于多字段垂直布局（unitPriceRow / totalPriceRow） ===== */
.field-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.field-row .field { flex: 1 1 auto; }

/* ===== 单选按钮组 ===== */
.radio-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.radio-inline {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 14px;
    color: var(--text-sub);
    cursor: pointer;
    user-select: none;
}
.radio-inline input[type="radio"] {
    accent-color: var(--primary);
    margin: 0;
    width: 16px;
    height: 16px;
}
.radio-sm .radio-inline { font-size: 13px; }

/* 贷款金额自动计算提示 */
.field-hint {
    font-size: 14px;
    color: var(--text-sub);
}
.calc-hint {
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}

/* 日期输入框 */
input[type="date"] {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    background: #fff;
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
}
input[type="date"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-primary {
    height: 44px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.btn-primary:hover { background: var(--primary-dark); }

.loan-type{color:var(--primary)}
.cal-result-note{
    margin-top:16px;
    color:var(--text-sub);
    font-size:13px;
}

/* ===== 总结陈述：还款总额 = 贷款总额 + 利息总额 ===== */
.result-statement {
    margin-bottom: 16px;
}
.statement-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.statement-row {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}
.stat-val {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    color: #2b2f36;
}
.stat-val.stat-total {
    color: #e8632c;
}
.stat-label {
    font-size: 12px;
    color: #8a93a0;
    margin-top: 4px;
}
.stat-op {
    font-size: 26px;
    font-weight: 300;
    color: #c0c6ce;
    padding-bottom: 22px;
}
.stat-years {
    margin-left: 18px;
}

/* ===== 百分比统计条：贷款 vs 利息 ===== */
.range-bar {
    display: flex;
    height: 28px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 28px;
}
.range-bar .bar-loan {
    background: #4e8cf0;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    transition: width .3s ease;
}
.range-bar .bar-interest {
    background: #f0a64e;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    transition: width .3s ease;
}
.range-bar .bar-loan span,
.range-bar .bar-interest span {
    padding: 0 8px;
}

/* ===== 统计条下方图例 ===== */
.range-legend {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 13px;
}
.range-legend .legend-loan {
    color: #4e8cf0;
    font-weight: 500;
}
.range-legend .legend-interest {
    color: #f0a64e;
    font-weight: 500;
}

/* ===== 结果汇总卡片 ===== */
.result-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
}
.result-summary .card {
    flex: 1 1 160px;
    background: var(--primary-light);
    border-radius: 8px;
    padding: 14px 16px;
}
.result-summary .card .label { font-size: 13px; color: var(--text-sub); }
.result-summary .card .value { font-size: 20px; font-weight: 700; color: var(--primary); margin-top: 4px; }
.result-summary .card .value small { 
    font-size: 12px; 
    /* font-weight: 400;  */
    color: #8a93a0; 
    /* margin-left: 2px;  */
}
.result-summary .card .value.highlight { color: #e8632c; }
.result-summary .card .value.success  { color: #16a34a; }

/* ===== 文章模板专用高亮文本（问答风格大号月供数字） ===== */
.article-highlight-text {
    font-size: 20px;
    font-weight: 700;
    color: #e8632c;
}

/* ============================================================
 * 结果表格 .calc-table —— 配色独立，不跟随 --primary
 * 借鉴目标站：低饱和、细边框、浅表头、斑马纹
 * ============================================================ */
.calc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: #2b2f36;
    margin-top: 8px;
}
.calc-table th,
.calc-table td {
    border: 1px solid #eceef1;
    padding: 9px 12px;
    text-align: center;
    white-space: nowrap;
}
.calc-table thead th {
    background: #dfe6f3;
    color: #4a5160;
    font-weight: 600;
}
.calc-table thead th.th-ei {
    background: #e3f0e8;   /* 等额本息 浅绿 */
    color: #2c6e49;
}
.calc-table thead th.th-ep {
    background: #fdeeee;   /* 等额本金 浅红 */
    color: #b03a3a;
}
.calc-table tbody tr:nth-child(even) {
    background: #f5f7f9;
}
.calc-table tbody tr:hover {
    background: #f2f6ff;
}
.calc-table .total-row td {
    background: #f0f3f7;
    font-weight: 600;
}

/* 明细表中的小计/总计行 */
.calc-table .subtotal-row td {
    background: #f8fafc;
    font-weight: 600;
}
.calc-table .grand-total-row td {
    background: #eff6ff;
    font-weight: 700;
    font-size: 15px;
}

/* 表格横向滚动容器：列数多时（如 9 列对比表）手机端可左右滑动查看，不再溢出屏幕 */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

/* 模糊遮罩：未付费时覆盖在隐藏行区域 */
.blur-mask {
    position: relative;
    text-align: center;
    padding: 28px 16px;
    margin-top: 16px;
    border: 1px dashed #d7dde5;
    border-radius: 8px;
    background: #fbfcfd;
    color: #8a93a0;
}
.blur-mask .mask-title { font-size: 15px; font-weight: 600; color: #5a626e; }
.blur-mask .mask-desc { font-size: 13px; margin: 6px 0 14px; }
.blur-mask .price { color: #e8632c; font-weight: 700; }
.unlock-btn {
    display: inline-block;
    padding: 9px 22px;
    background: #e8632c;
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}
.unlock-btn:hover { background: #d4551f; }
.download-btn {
    display: inline-block;
    margin-left: 10px;
    padding: 9px 22px;
    background: #2f9e5e;
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}
.download-btn:hover { background: #27854f; }

/* ============================================================
 * 双栏对比布局（等额本息 vs 等额本金）
 * ============================================================ */
.dual-result {
    display: flex;
    gap: 20px;
    margin-top: 16px;
}
.method-block {
    flex: 1 1 50%;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    background: #fff;
}

/* 明细区 */
.detail-wrap {
    margin-top: 12px;
}

/* 下载按钮包裹 */
.download-wrap {
    text-align: center;
    margin-top: 16px;
}
.download-combined-btn {
    padding: 10px 28px;
    font-size: 15px;
}

/* 双栏内部的结果卡片容器更紧凑 */
.method-block .result-statement .statement-row { gap: 4px; }
.method-block .stat-val { font-size: 22px; }
.method-block .stat-op { font-size: 22px; padding-bottom: 16px; }
.method-block .result-summary { gap: 8px; }
.method-block .result-summary .card { flex: 1 1 120px; padding: 10px 12px; }
.method-block .result-summary .card .value { font-size: 17px; }

/* ===== 组合贷款双栏布局 ===== */
.combo-columns {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.combo-columns .combo-section {
    flex: 1;
    min-width: 0;
}

/* ===== 移动端：双栏变上下堆叠 ===== */
@media (max-width: 768px) {
    .dual-result {
        flex-direction: column;
        gap: 12px;
    }
    .combo-columns {
        flex-direction: column;
    }
    .method-block {
        flex: 1 1 auto;
    }
    .method-block .stat-val { font-size: 18px; }
    .method-block .stat-op { font-size: 18px; padding-bottom: 14px; }
}

/* ============================================================
 * 支付弹窗（SweetAlert2 自定义）
 * ============================================================ */
.pay-swal-popup {
    padding: 28px 24px 20px !important;
    border-radius: 12px !important;
}
.pay-swal-html {
    margin: 0 !important;
    padding: 0 !important;
}
.pay-modal {
    text-align: center;
}
.pay-icon-wrap {
    margin-bottom: 10px;
}
.pay-wechat-icon {
    display: inline-block;
    vertical-align: middle;
}
.pay-title {
    font-size: 17px;
    font-weight: 700;
    color: #1f2329;
    margin-bottom: 12px;
}
.pay-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}
.pay-amount-label {
    font-size: 14px;
    color: #8a93a0;
}
.pay-amount-value {
    font-size: 22px;
    font-weight: 700;
    color: #e8632c;
}
.pay-tip {
    margin: 10px 0 6px;
    font-size: 13px;
    color: #8a93a0;
}
.pay-warning {
    margin: 0;
    font-size: 13px;
    color: #e8632c;
    font-weight: 500;
}

/* ============================================================
 * 右侧市场利率侧边栏（.side / .mod-rate）
 * 借鉴目标站：低饱和、细边框、浅表头，不跟随主色调
 * ============================================================ */

#rateSidebar{margin-top:15px}
/* ----- 侧边栏容器 ----- */
.side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ----- 利率模块卡片 ----- */
.mod-rate {
    border: 1px solid #e8ecf1;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

/* 模块标题 */
.mod-rate-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 14px 16px 12px;
    font-size: 15px;
    font-weight: 600;
    color: #1f2329;
    border-bottom: 1px solid #eef1f5;
    background: #f9fafb;
}
.mod-rate-date {
    font-size: 12px;
    font-weight: 400;
    color: #a0a7b0;
}

/* 模块主体 */
.mod-rate-bd {
    padding: 12px 16px 16px;
    background: var(--bg);
}

/* 模块底部注释 */
.mod-rate-note {
    margin: 10px 0 0;
    font-size: 12px;
    color: #a0a7b0;
    line-height: 1.6;
}

/* ----- 利率表格 .rate-table —— 独立于 .calc-table，不跟随主色调 ----- */
.rate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #4a5160;
}
.rate-table th,
.rate-table td {
    padding: 8px 12px;
    /* text-align: center; */
    border-bottom: 1px solid #eef1f5;
}
.rate-table thead th {
    background: #f7f8fa;
    color: #6b7586;
    font-weight: 500;
    font-size: 12px;
    border-bottom: 1px solid #e0e4ea;
}
.rate-table tbody tr:hover {
    background: #fafbfd;
}
.rate-table tbody td:first-child {
    text-align: left;
    color: #5a626e;
}
.rate-table td strong {
    color: #1f2329;
}

/* ----- 右侧边栏响应式：<992px 时变全宽 ----- */
@media (max-width: 991.98px) {
    .side {
        margin-top: 16px;
    }
    .mod-rate-title {
        font-size: 14px;
    }
    .rate-table th,
    .rate-table td {
        padding: 6px 8px;
        font-size: 12px;
    }
}

/* ===== 友情链接：去序号 + 水平排列 ===== */
.friend-link ul {
  list-style: none;          /* 去序号/圆点 */
  padding: 0;
  margin: 0;
  display: flex;             /* 水平排列 */
  flex-wrap: wrap;           /* 一行放不下自动换行 */
  gap: 0.5rem 1rem;          /* 行间距 列间距 */
}
.friend-link li {
  list-style: none;
}
.friend-link li a {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  /* border-radius: var(--site-radius); */
  /* background: var(--site-white); */
  transition: all var(--site-transition);
  color: #656868;
  font-size: 14px;
}
.friend-link li a:hover {
  color: var(--site-primary);
  border-color: var(--site-primary);
  background: var(--site-primary-light);
}

/* ===== 页脚 ===== */
.site-footer {
    text-align: center;
    color: var(--text-sub);
    font-size: 13px;
    padding: 24px 16px;
}
.filing img{width:20px;}
.filing a{color:#646a73;}

/* ===== 表单标签列：统一最小宽度使所有输入框/下拉框上下对齐 ===== */
.calc-label-col {
    min-width: 150px;
}

/* ===== 响应式：移动端适配 ===== */
@media (max-width: 768px) {
    .calc-form { gap: 14px; }
    .site-header .container { height: auto; padding-top: 8px; padding-bottom: 8px; flex-direction: column; align-items: flex-start; gap: 8px; }
    .site-nav { gap: 2px; }
    .site-nav a { padding: 5px 9px; font-size: 13px; }
    .result-summary .card { flex: 1 1 100%; }
    .calc-table { font-size: 12px; }
    .calc-table th, .calc-table td { padding: 7px 6px; }
    .field-row { gap: 12px; }
    .stat-val { font-size: 20px; }
    .stat-op { font-size: 20px; padding-bottom: 18px; }
    .statement-row { gap: 4px; }
    .stat-years { margin-left: 8px; }
    .range-bar { font-size: 11px; }
    .calc-block { padding: 14px 14px; }
    /* 移动端：Bootstrap 行内 col-auto + col 变为竖向堆叠 */
    .calc-block > .row {
        flex-direction: column;
    }
    .calc-block > .row > .col-auto,
    .calc-block > .row > .col {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    .calc-block > .row .form-label {
        white-space: normal;
    }
}

/* ============================================================
 * 首页文章列表版块（多列卡片式标题列表，无日期）
 * 电脑端一行 3 列卡片，每列 5 条；平板 2 列；手机 1 列
 * ============================================================ */
.news-section .section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
}
.news-section .section-head h2 {
    margin: 0;
    padding-left: 10px;
    border-left: 4px solid var(--primary);
    line-height: 1.2;
}
.news-section .more-link {
    font-size: 13px;
    color: var(--text-sub);
    white-space: nowrap;
}
.news-section .more-link:hover { color: var(--primary); }

/* 行间距：卡片块之间的纵向留白 */
.news-row {
    margin-bottom: 16px;
}
.news-row:last-child { margin-bottom: 0; }

/* 每一列为一个浅灰底卡片 */
.news-col {
    margin-bottom: 16px;
}
.news-col > ul {
    background: var(--bg);
    border: 1px solid #e8ecf1;
    border-radius: 8px;
    padding: 8px 14px;
}

.news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.news-item {
    border-bottom: 1px solid #f2f4f7;
}
.news-item:last-child { border-bottom: none; }

/* 标题：块级，单行超出省略号，hover 高亮 */
.news-item a.news-title {
    display: block;
    padding: 11px 6px;
    border-radius: 5px;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background .15s, color .15s;
}
.news-item a.news-title:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* 响应式：平板 2 列、手机 1 列（Bootstrap 栅格自动处理） */
@media (max-width: 768px) {
    .news-col > ul { padding: 6px 10px; }
    .news-item a.news-title { font-size: 14px; padding: 11px 4px; }
}
