/* ============================================================
   JavaPay 四方支付 —— Tabler UI 覆盖层
   基础框架：assets/tabler/tabler.min.css（Bootstrap 5 + Tabler）
   本文件只做两件事：
   1. 把 JavaPay 的业务组件（stat / tag / banner / kv / msg / cfg…）
      统一到 Tabler 的设计令牌（--tblr-*）上；
   2. 处理与 Bootstrap 同名类的冲突（.modal / .toast / .card / .avatar）。
   图标：assets/tabler/tabler-icons.css（@tabler/icons-webfont）
   ============================================================ */

:root {
    --bg: var(--tblr-bg-surface-secondary, #f6f8fb);
    --panel: #ffffff;
    --line: var(--tblr-border-color, #e6e7ec);
    --line-soft: #f1f3f6;
    --text: var(--tblr-body-color, #1e293b);
    --text-2: #334155;
    --muted: #6c7a91;
    --primary: #206bc4;
    --primary-soft: #e8f1fa;
    --ok: #2fb344;           /* 仅用于「成功」类标签的浅底 */
    --ok-soft: #e8f7ec;
    --danger: #d63939;
    --danger-soft: #fcecEC;
    --radius: 8px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05);
}

/* ---------------- 顶部导航（后台） ----------------
   一级菜单横排于顶栏，二级菜单为下拉；不引入 Bootstrap JS */
.navbar .navbar-brand b { font-weight: 700; letter-spacing: .04em; color: var(--text); }
.navbar .nav-link { color: var(--text-2); border-radius: .5rem; padding: .5rem .75rem; }
.navbar .nav-link:hover { color: var(--text); background: #eef1f6; }
.navbar .nav-item.active > .nav-link,
.navbar .nav-item.active > .nav-link:hover { color: var(--primary); background: var(--primary-soft); }
.navbar .nav-link .badge-dot {
    margin-left: .25rem;
    background: var(--danger); color: #fff; font-size: 10px; font-weight: 600;
    min-width: 17px; height: 17px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}
.navbar .dropdown-item .badge-dot { margin-left: auto; }
/* 下拉菜单锚定到各自的父级菜单项，避免互相重叠 */
.navbar .nav-item.dropdown { position: relative; }
.navbar .dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 1000; }
@media (min-width: 768px) {
    /* 桌面端悬停即展开二级菜单 */
    .navbar .nav-item.dropdown:hover > .dropdown-menu { display: block; margin-top: 0; }
}
@media (max-width: 767.98px) {
    .navbar .dropdown-menu { position: static; border: none; box-shadow: none; padding: 0 .5rem .5rem; }
}
.navbar .dropdown-menu { min-width: 11rem; }
.navbar .dropdown-item { display: flex; align-items: center; padding: .5rem .75rem; font-size: .8125rem; color: var(--text-2); border-radius: .4rem; }
.navbar .dropdown-item:hover, .navbar .dropdown-item.active { background: var(--primary-soft); color: var(--primary); }
.navbar .dropdown-item i { color: var(--muted); }
.navbar .dropdown-item:hover i, .navbar .dropdown-item.active i { color: var(--primary); }

/* 页头（页签图标 + 标题，替代旧侧边栏顶部的信息区） */
.page-header {
    background: #fff; border-bottom: 1px solid var(--line);
    padding: .7rem 0;
}
.page-header .page-title { font-size: 1.1rem; font-weight: 650; }
.page-header .page-icon { font-size: 1.15rem; color: var(--muted); }
.page-header .page-body + .page-body { margin-top: 0; }
.page-body { padding-top: 1.25rem; }

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: .875rem;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); }
a:hover { text-decoration: underline; }

code, .mono {
    font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: .78rem;
    background: var(--line-soft);
    padding: 2px 7px;
    border-radius: 6px;
    color: var(--text-2);
    word-break: break-all;
}

.muted { color: var(--muted); font-size: .75rem; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* ---------------- Tabler 侧边栏的 JavaPay 补充 ---------------- */
.navbar-vertical .navbar-brand { display: flex; align-items: center; padding-top: 0; }
.navbar-vertical .navbar-brand b { letter-spacing: .05em; font-weight: 700; }
.navbar-vertical li.active > .nav-link,
.navbar-vertical .nav-link.active {
    background: var(--primary-soft);
    color: var(--primary);
}
.navbar-vertical li.active > .nav-link .nav-link-icon { color: var(--primary); }
.navbar-vertical .nav-link { margin: 1px 0; }
/* 门户侧栏菜单整体放大一档（仅商户/渠道商门户使用 navbar-vertical 外壳） */
.navbar-vertical.navbar-expand-lg .navbar-collapse .navbar-nav .nav-link {
    padding-top: .66rem; padding-bottom: .66rem;
    font-size: .9375rem;
}
.navbar-vertical .nav-link .nav-link-icon {
    font-size: 1.12rem; width: 1.45rem; height: 1.45rem;
}
.navbar-vertical .badge-dot {
    margin-left: auto;
    background: #e5484d; color: #fff; font-size: 10px; font-weight: 600;
    min-width: 18px; height: 18px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* 顶栏页签图标：去装饰框，跟随页面标题做弱化处理 */
.page-icon {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.25rem; color: var(--muted);
}

.top-actions .icon-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
    background: #fff; cursor: pointer; color: var(--text-2); font-size: 16px;
}
.top-actions .icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.top-actions .icon-btn .dot {
    position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 9px; background: var(--danger); color: #fff; font-size: 10px; line-height: 16px;
    text-align: center; display: none;
}

/* ---------------- 卡片 ----------------
   覆盖 Bootstrap .card 的 flex-column 语义：JavaPay 的卡片内容是
   混合直接子节点（标题行 / 工具条 / 表格 / 提示条），用块级布局更稳 */
.card {
    display: block;
    padding: 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
}
.card > h3, .card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 1rem;
}
.card h3 { font-size: .95rem; font-weight: 650; margin: 0; }
.card h3 small { font-weight: 400; color: var(--muted); margin-left: 8px; font-size: .75rem; }

/* 卡片内贴边表格（Tabler 风格：表头压住卡片圆角） */
.card > .table-wrap {
    margin: .25rem -1.25rem -1.25rem;
    width: calc(100% + 2.5rem);
    border-radius: 0 0 var(--radius) var(--radius);
}

/* ---------------- 统计卡 ---------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
@media (max-width: 1080px) { .grid-2 { grid-template-columns: 1fr; } }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.three { grid-template-columns: 1fr; } }

.stat {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 16px 18px;
    box-shadow: var(--shadow);
}
.stat .label { font-size: .75rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 1.5rem; font-weight: 650; margin-top: 8px; letter-spacing: -.2px; }
.stat .value small { font-size: .8rem; font-weight: 500; color: var(--muted); margin-left: 2px; }
.stat .sub { font-size: .72rem; color: var(--muted); margin-top: 6px; }
/* 配色收敛：统计值一律中性深色，不再用绿/橙/红/蓝区分 */

/* 柱状趋势 */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding: 8px 4px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-col .bar {
    width: 100%; max-width: 46px; border-radius: 4px 4px 2px 2px;
    background: #206bc4;
    min-height: 3px; position: relative; transition: height .5s ease;
}
.bar-col .bar:hover { background: #1c5da8; }
.bar-col .val { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.bar-col .day { font-size: 10.5px; color: var(--muted); }
.bar-col .bar span {
    position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
    font-size: 10px; color: var(--primary); font-weight: 600; opacity: 0;
    transition: opacity .15s; white-space: nowrap;
}
.bar-col .bar:hover span { opacity: 1; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .8438rem; }
.table-wrap table th {
    text-align: left; padding: .55rem .75rem; background: #f9fafc;
    color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line);
    white-space: nowrap; font-size: .6875rem; text-transform: uppercase; letter-spacing: .04em;
}
.table-wrap table td { padding: .65rem .75rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table-wrap tbody tr:hover td { background: #f8f9fd; }
.table-wrap tbody tr:last-child td { border-bottom: none; }
.card > .table-wrap tbody tr:last-child td { border-bottom: 1px solid var(--line-soft); }
td .cell-title { font-weight: 600; color: var(--text); }
td .cell-sub { font-size: .72rem; color: var(--muted); margin-top: 3px; }
.table-wrap table td .btn + .btn { margin-left: 4px; }

/* ---------------- 标签 ---------------- */
.tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 4px;
    font-size: .6875rem; font-weight: 600; line-height: 18px; white-space: nowrap;
}
/* 配色收敛：仅「成功」浅绿、「失败/危险」红，待处理/提示/停用等一律中性灰 */
.tag.ok { background: var(--ok-soft); color: #1e7a33; }
.tag.err { background: var(--danger-soft); color: #bb2525; }
.tag.warn, .tag.info, .tag.off { background: #eef1f6; color: #64748b; }

/* ---------------- 按钮 ----------------
   .btn / .btn-primary / .btn-danger / .btn-sm 交给 Tabler(Bootstrap) 原生样式，
   这里只补齐项目自有的变体。 */
.btn-ghost {
    --bs-btn-color: var(--text-2);
    --bs-btn-bg: #ffffff;
    --bs-btn-border-color: var(--line);
    --bs-btn-hover-color: var(--text);
    --bs-btn-hover-bg: #f8fafc;
    --bs-btn-hover-border-color: #cfd8e3;
    --bs-btn-active-bg: #f1f4f9;
    --bs-btn-active-border-color: #cfd8e3;
    --bs-btn-disabled-color: var(--muted);
    --bs-btn-disabled-bg: #fff;
    --bs-btn-disabled-border-color: var(--line);
}
/* 确认类按钮并入主色，不再单独引入绿色 */
.btn-ok {
    --bs-btn-color: #ffffff;
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #1c5da8;
    --bs-btn-hover-border-color: #1c5da8;
    --bs-btn-active-bg: #1a5da8;
    --bs-btn-active-border-color: #1a5da8;
    --bs-btn-focus-shadow-rgb: 32, 107, 196;
}
.btn-link {
    background: none; border: none; color: var(--primary); cursor: pointer;
    font-size: .8125rem; padding: 0; font-family: inherit;
}
.btn-link:hover { text-decoration: underline; }

.btn-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.row-actions { display: flex; gap: 8px; align-items: center; }

/* ---------------- 表单 ---------------- */
.toolbar { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 15px; }
.toolbar .spacer { flex: 1; }

input, select, textarea {
    padding: .48rem .7rem; border: 1px solid var(--line); border-radius: .5rem;
    font-size: .8125rem; outline: none; font-family: inherit; background: #fff; color: var(--text);
    transition: border-color .15s, box-shadow .15s;
    max-width: 100%;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary); box-shadow: 0 0 0 .25rem rgba(32, 107, 196, .12);
}
input::placeholder, textarea::placeholder { color: #9aa5b6; }
select { cursor: pointer; }
textarea { resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 15px; height: 15px; padding: 0; cursor: pointer; accent-color: var(--primary); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: .75rem; color: #4b5563; margin-bottom: 6px; font-weight: 600; }
.field label em { color: var(--danger); font-style: normal; }
.field input, .field select, .field textarea { width: 100%; }
.field .help { font-size: .6875rem; color: var(--muted); margin-top: 5px; line-height: 1.55; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; margin: 0 16px 8px 0; cursor: pointer; color: var(--text-2); }
.chk input { width: auto; }
.form-section { font-size: .8125rem; font-weight: 650; margin: 20px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.form-section:first-child { margin-top: 0; }
.form-section small { font-weight: 400; }

/* ---------------- 弹窗（覆盖 Bootstrap .modal 的定位语义） ---------------- */
.modal-mask {
    position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
    display: none; align-items: flex-start; justify-content: center;
    padding: 56px 18px 30px; z-index: 1050; overflow-y: auto;
}
.modal-mask.show { display: flex; }
.modal-mask .modal {
    position: relative; display: block; inset: auto; z-index: auto;
    height: auto; max-height: none; overflow: visible; pointer-events: auto;
    background: #fff; border-radius: var(--radius); width: 100%; max-width: 46rem;
    padding: 22px 24px; box-shadow: 0 12px 40px rgba(2, 8, 23, .22);
    animation: modalIn .18s ease; margin: 0 auto 30px; border: none;
}
.modal-mask .modal.wide { max-width: 58rem; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal h3 { font-size: 1.05rem; margin-bottom: 16px; font-weight: 650; }
.modal-actions { margin-top: 20px; display: flex; gap: 10px; justify-content: flex-end; }

/* ---------------- 提示（覆盖 Bootstrap .toast） ---------------- */
#jpToast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#jpToast .toast {
    width: auto; min-width: 0; max-width: 80vw;
    display: inline-flex; align-items: center; gap: 8px;
    background: #1e293b; color: #fff; padding: 9px 16px; border-radius: 10px;
    font-size: .8125rem; box-shadow: 0 10px 30px rgba(2, 8, 23, .28);
    animation: toastIn .2s ease; border: none;
}
/* 成功提示用主色、失败用红，其余中性；全站保持「蓝 + 灰 + 红」三色 */
#jpToast .toast.ok { background: var(--primary); }
#jpToast .toast.err { background: #bb2525; }
#jpToast .toast .t-ico {
    flex: none; width: 17px; height: 17px; border-radius: 50%;
    background: rgba(255, 255, 255, .18); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; line-height: 1;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------------- 其他 ---------------- */
.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .ico { font-size: 30px; opacity: .35; display: block; margin-bottom: 8px; }

/* ---------------- 加载动画（spinner / 骨架屏 / 按钮态） ---------------- */
@keyframes jp-spin { to { transform: rotate(360deg); } }
.jp-spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid var(--primary-soft);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: jp-spin .7s linear infinite;
    vertical-align: -4px;
    flex: none;
}

/* 整视图区加载：居中卡片 */
.jp-loading {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 14px; padding: 64px 20px; color: var(--muted); min-height: 260px;
}
.jp-loading .jp-spinner { width: 28px; height: 28px; border-width: 3px; margin: 0; }
.jp-loading-text { font-size: .85rem; letter-spacing: .02em; }

/* 加载失败 */
.jp-fail {
    display: flex; align-items: center; gap: 12px;
    padding: 48px 20px; color: var(--danger); justify-content: center;
}
.jp-fail i { font-size: 22px; opacity: .8; }
.jp-fail b { display: block; font-weight: 600; }
.jp-fail span { color: var(--muted); font-size: .8rem; }

/* 骨架屏：浅灰流光，克制不刺眼 */
@keyframes jp-shimmer { 0% { background-position: -360px 0; } 100% { background-position: 360px 0; } }
.jp-skeleton-line {
    display: block; height: 12px; border-radius: 4px;
    background: linear-gradient(90deg, #eef1f6 25%, #e2e7ef 37%, #eef1f6 63%);
    background-size: 360px 100%;
    animation: jp-shimmer 1.3s ease-in-out infinite;
}
.jp-skeleton-line.lg { height: 20px; }
.jp-skeleton-wrap { padding: 2px 0; }
.jp-skeleton-wrap .tbl th, .jp-skeleton-wrap .tbl td { padding: 15px 10px; }
.jp-skeleton-wrap .tbl th .jp-skeleton-line { height: 10px; }
.jp-skeleton-cards {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px; padding: 4px 0;
}
.jp-skeleton-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px 18px; display: flex; flex-direction: column; gap: 12px;
}
.jp-skeleton-card .jp-skeleton-line:nth-child(2) { margin-top: 2px; }

/* 按钮加载态 */
.btn.is-loading {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    opacity: .9; pointer-events: none; cursor: progress;
}
.btn.is-loading .jp-spinner { margin: 0; border-width: 2px; }

/* 首屏加载遮罩：进入任意界面时短暂覆盖，初始化完成后淡出 */
.jp-boot {
    position: fixed; inset: 0; z-index: 1080;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    background: #f6f8fb;
    transition: opacity .28s ease;
}
.jp-boot.hide { opacity: 0; pointer-events: none; }
.jp-boot .jp-spinner { width: 32px; height: 32px; border-width: 3px; margin: 0; }
.jp-boot-text { font-size: .85rem; color: var(--muted, #6c7a91); letter-spacing: .03em; }

.pager { margin-top: 16px; display: flex; gap: 10px; justify-content: flex-end; align-items: center; }

.tabs { display: flex; gap: 6px; background: #eef1f6; padding: 4px; border-radius: 10px; width: fit-content; margin-bottom: 16px; flex-wrap: wrap; }
.tabs button {
    border: none; background: transparent; padding: 7px 13px; border-radius: 8px;
    font-size: .78rem; color: var(--muted); cursor: pointer; font-family: inherit; font-weight: 600;
}
.tabs button.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(15, 23, 42, .08); }

.banner {
    display: flex; gap: 12px; align-items: flex-start;
    background: #f8fafc; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 13px 16px; margin-bottom: 16px; color: var(--text-2); font-size: .78rem; line-height: 1.7;
}
.banner .b-ico { font-size: 15px; color: var(--muted); }

.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 22px; }
.kv .k { font-size: .7rem; color: var(--muted); margin-bottom: 4px; }
.kv .v { font-size: .8125rem; font-weight: 550; word-break: break-all; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* 头像（覆盖 Tabler .avatar 的配色：中性灰，减少蓝色斑点） */
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: #eef1f6; color: var(--text-2);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .8125rem; flex-shrink: 0;
}

/* ---------------- 消息中心 ---------------- */
.msg-list { display: flex; flex-direction: column; }
.msg-item { padding: 14px 4px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.msg-item:hover { background: var(--line-soft); }
.msg-item.unread { border-left: 3px solid var(--primary); padding-left: 10px; }
.msg-item.unread .msg-head b::after {
    content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    background: var(--danger); margin-left: 7px; vertical-align: 2px;
}
.msg-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; flex-wrap: wrap; }
.msg-head b { font-size: .84rem; }
.msg-head .muted { margin-left: auto; font-size: .72rem; }
.msg-body { font-size: .78rem; color: var(--text-2); line-height: 1.7; }
.msg-sub { font-size: .72rem; margin-top: 5px; }

/* ---------------- 插件驱动配置表单 ---------------- */
.cfg-field label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cfg-field label .tag { font-weight: 600; }
.cfg-adv { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; background: #fbfcfe; }
.cfg-adv > summary { cursor: pointer; font-size: .78rem; font-weight: 600; color: var(--text-2); list-style: none; }
.cfg-adv > summary::-webkit-details-marker { display: none; }
.cfg-adv > summary::before { content: '▸ '; color: var(--muted); }
.cfg-adv[open] > summary::before { content: '▾ '; }
.cfg-adv[open] > summary { margin-bottom: 12px; }
.cfg-adv .form-grid { margin-top: 4px; }

/* ---------------- 登录页（中性风格：浅底、无装饰光斑） ---------------- */
.login-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background: var(--bg);
}

.login-card {
    width: 100%; max-width: 420px; background: #fff;
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 32px 30px 28px; box-shadow: var(--shadow);
}
.login-card .logo { display: none; }
.login-card h1 { font-size: 20px; margin-bottom: 6px; letter-spacing: -.2px; }
.login-card .sub { color: var(--muted); font-size: .78rem; margin-bottom: 22px; line-height: 1.7; }
.login-tabs { display: flex; gap: 6px; background: #eef1f6; padding: 4px; border-radius: var(--radius); margin-bottom: 18px; }
.login-tabs button {
    flex: 1; border: none; background: transparent; padding: 8px; border-radius: 6px;
    font-size: .8125rem; color: var(--muted); cursor: pointer; font-family: inherit; font-weight: 600;
}
.login-tabs button.active { background: #fff; color: var(--primary); box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { padding: 10px; font-size: .875rem; margin-top: 6px; }
.login-tip { margin-top: 18px; font-size: .72rem; color: var(--muted); line-height: 1.9; border-top: 1px solid var(--line); padding-top: 14px; }
.login-tip b { color: var(--text-2); }

/* ---------------- 商户开发文档 ---------------- */
.doc-lead { font-size: .82rem; color: var(--text-2); line-height: 1.8; }
.doc-code {
    margin: 12px 0 0; padding: 14px 16px; overflow-x: auto;
    background: #f8fafc; border: 1px solid var(--line); border-radius: 6px;
    font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: .75rem; line-height: 1.75; color: var(--text-2); white-space: pre;
}
.doc-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.doc-table th, .doc-table td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.doc-table th { color: var(--muted); font-weight: 600; background: #f9fafc; white-space: nowrap; }
.doc-table td:first-child { white-space: nowrap; }
.doc-tabs { margin: 14px 0 0; }

/* ---------------- 响应式微调 ---------------- */
@media (max-width: 768px) {
    .page-body .container-xl { padding: 12px; }
    .card { padding: 1rem; }
    .card > .table-wrap { margin: .25rem -1rem -1rem; width: calc(100% + 2rem); }
    .top-actions .btn, .top-actions .icon-btn { display: none; }
}

/* 分段选择（结算收款方式：银行卡 / 支付宝 / 微信） */
.seg { display: inline-flex; gap: 4px; padding: 3px; background: var(--line-soft); border: 1px solid var(--line); border-radius: 8px; }
.seg-item { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--text-2);
    padding: 6px 14px; border-radius: 6px; font-size: .85rem; cursor: pointer; }
.seg-item i { font-size: 1rem; color: var(--muted); }
.seg-item:hover { color: var(--text); }
.seg-item.active { background: #fff; color: var(--primary); box-shadow: 0 1px 2px rgba(16,24,40,.08); font-weight: 600; }
.seg-item.active i { color: var(--primary); }

/* 多选框组（网站设置：开放的结算方式） */
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 6px 0; }
.checks .check { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; white-space: nowrap; font-weight: 400; margin: 0; cursor: pointer; }
.checks .check input[type="checkbox"] { width: 15px; height: 15px; flex: 0 0 15px; margin: 0; }

/* ---------------- 登录数字验证码 ---------------- */
.captcha-row { display: flex; align-items: center; gap: 10px; }
.captcha-row input { flex: 1 1 auto; width: auto; min-width: 0; letter-spacing: .12em; font-size: 1rem; }
.captcha-img {
    flex: 0 0 190px; width: 190px; height: 60px; object-fit: contain;
    background: #f8fafc; border: 1px solid var(--line); border-radius: 6px;
    cursor: pointer; user-select: none;
}
.captcha-img:hover { border-color: var(--primary); }

/* 平台公告（商户 / 渠道商首页），保持中性配色 */
.ann-card { margin-bottom: 16px; }
.ann-item { display: block; padding: 10px 0; border-top: 1px solid var(--line-soft); text-decoration: none; color: var(--text); }
.ann-item:first-of-type { border-top: 0; }
.ann-item:hover .ann-title { color: var(--primary); }
.ann-line { display: flex; align-items: center; gap: 8px; }
.ann-title { font-weight: 600; font-size: .875rem; }
.ann-meta { margin-left: auto; font-size: .75rem; color: var(--muted); white-space: nowrap; }
.ann-summary { display: block; margin-top: 4px; font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ann-body { white-space: pre-wrap; line-height: 1.8; font-size: .875rem; color: var(--text-2); }
