/* ============================================================
  云端记账本 bookkeeping.s1.css
  玻璃拟态 + 站点主题渐变（随后台主题切换），移动端自适应 + 自定义弹窗
  ============================================================ */

.bk-card {
    background: linear-gradient(160deg, rgba(255,255,255,0.95), rgba(var(--color-secondary-rgb),0.35));
    border: 1px solid rgba(var(--color-primary-rgb),0.28);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    padding: 22px;
    position: relative;
    overflow: hidden;
}
.bk-card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(var(--color-primary-rgb),0.14), transparent 70%);
    pointer-events: none;
}
.bk-card::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(var(--color-secondary-rgb),0.35), transparent 70%);
    pointer-events: none;
}
.bk-icon {
    background: var(--grad-primary) !important;
    box-shadow: 0 6px 18px rgba(var(--color-primary-rgb),0.35);
    animation: bk-breath 3s ease-in-out infinite;
}
@keyframes bk-breath {
    0%, 100% { box-shadow: 0 6px 18px rgba(var(--color-primary-rgb),0.35); }
    50% { box-shadow: 0 6px 26px rgba(var(--color-primary-rgb),0.55); }
}

/* ---------- 登录引导 ---------- */
.bk-login-guide { text-align: center; padding: 34px 16px 26px; }
.bk-login-badge {
    width: 92px; height: 92px; margin: 0 auto 20px;
    border-radius: 28px; position: relative;
    background: var(--grad-primary);
    box-shadow: 0 14px 34px rgba(var(--color-primary-rgb),0.38), inset 0 1px 0 rgba(255,255,255,0.4);
    display: flex; align-items: center; justify-content: center;
    animation: bk-badge-in .6s cubic-bezier(.34,1.4,.64,1);
}
@keyframes bk-badge-in { from { opacity: 0; transform: scale(.6) rotate(-12deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
.bk-login-badge-ring {
    position: absolute; inset: -8px; border-radius: 34px;
    border: 1.5px dashed rgba(var(--color-primary-rgb),0.4);
    animation: bk-badge-spin 16s linear infinite;
}
@keyframes bk-badge-spin { to { transform: rotate(360deg); } }
.bk-login-badge i { font-size: 2.4rem; color: #fff; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.18)); }
.bk-login-guide h3 { margin: 6px 0 8px; font-size: 1.22rem; color: var(--text-dark); letter-spacing: .3px; }
.bk-login-guide p { margin: 0 0 20px; font-size: 0.85rem; color: var(--text-gray); line-height: 1.6; }
/* 特性亮点 */
.bk-login-feats { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; max-width: 360px; margin: 0 auto 24px; }
.bk-login-feat {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 13px; border-radius: 999px;
    background: rgba(var(--color-primary-rgb),0.08); border: 1px solid rgba(var(--color-primary-rgb),0.28);
    color: #475569; font-size: 0.78rem; font-weight: 600;
}
.bk-login-feat i { font-size: 0.8rem; color: var(--color-primary); }
.bk-login-btns { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.bk-login-btns a {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 26px; border-radius: 999px; text-decoration: none;
    font-size: 0.9rem; font-weight: 600; transition: all .25s ease;
    min-height: 44px;
}
.bk-login-btns a.main {
    width: 100%; max-width: 360px; justify-content: center;
    background: var(--grad-primary); color: #fff;
    box-shadow: 0 8px 22px rgba(var(--color-primary-rgb),0.35);
    border-radius: 16px; font-size: 0.98rem; letter-spacing: .5px;
    position: relative; overflow: hidden;
}
.bk-login-btns a.main::after {
    content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,0.45), transparent);
    transform: skewX(-20deg); animation: bk-shine 2.8s ease infinite;
}
.bk-login-btns a.main:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(var(--color-primary-rgb),0.45); }
.bk-login-btns a.ghost {
    width: 100%; max-width: 360px; justify-content: center;
    border: 1.5px solid rgba(var(--color-primary-rgb),0.45); color: var(--color-primary); background: rgba(255,255,255,0.7);
    border-radius: 16px; font-size: 0.98rem; letter-spacing: .5px;
}
.bk-login-btns a.ghost:hover { background: rgba(var(--color-primary-rgb),0.08); }
.bk-login-terms { margin-top: 22px; font-size: 0.72rem; color: var(--text-light); }
.bk-login-terms a { color: var(--color-primary); text-decoration: none; }

/* ---------- Tabs ---------- */
.bk-tabs {
    display: flex; gap: 6px; margin: 6px 0 16px;
    background: rgba(var(--color-secondary-rgb),0.45); border: 1px solid rgba(var(--color-primary-rgb),0.25);
    padding: 5px; border-radius: 14px;
    position: relative; z-index: 1;
}
.bk-tab {
    flex: 1; border: none; background: transparent; cursor: pointer;
    padding: 9px 4px; border-radius: 10px; font-size: 0.85rem; font-weight: 600;
    color: var(--text-gray); display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    transition: all .22s ease; white-space: nowrap;
}
.bk-tab i { font-size: 0.8rem; }
.bk-tab:hover { color: var(--color-primary); }
.bk-tab.active {
    background: var(--grad-primary); color: #fff;
    box-shadow: 0 4px 14px rgba(var(--color-primary-rgb),0.35);
}
.bk-pane { display: none; animation: bk-slide-in .3s ease; position: relative; z-index: 1; }
.bk-pane.active { display: block; }
@keyframes bk-slide-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Tab1 记一笔 ---------- */
.bk-type-switch {
    display: flex; gap: 10px; margin-bottom: 16px;
}
.bk-type-btn {
    flex: 1; border: 2px solid rgba(var(--color-primary-rgb),0.35); background: rgba(255,255,255,0.75);
    padding: 10px 0; border-radius: 14px; cursor: pointer; font-size: 0.92rem; font-weight: 700;
    color: #94a3b8; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    transition: all .22s ease;
    position: relative; overflow: hidden;
    min-height: 46px;
}
.bk-type-btn i { font-size: 0.85rem; transition: transform .25s ease; }
.bk-type-btn:active { transform: scale(0.97); }
.bk-type-btn.expense.active {
    background: linear-gradient(135deg,#ff6b6b,#f43f5e);
    border-color: transparent; color: #fff;
    box-shadow: 0 6px 18px rgba(244,63,94,0.35);
}
.bk-type-btn.income.active {
    background: linear-gradient(135deg,#34d399,#10b981);
    border-color: transparent; color: #fff;
    box-shadow: 0 6px 18px rgba(16,185,129,0.35);
}

.bk-amount-row {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.88); border: 1.5px solid rgba(var(--color-primary-rgb),0.35);
    border-radius: 16px; padding: 12px 16px; margin-bottom: 16px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.bk-amount-row:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb),0.12); }
.bk-amount-symbol { font-size: 1.7rem; font-weight: 700; color: var(--color-primary); }
.bk-amount-input {
    flex: 1; min-width: 0; border: none; outline: none; background: transparent;
    font-size: 1.7rem; font-weight: 800; color: #1e293b; letter-spacing: .5px;
}
.bk-amount-input::placeholder { color: #c3cde0; font-weight: 600; }
.bk-amount-quick { display: flex; gap: 6px; }
.bk-amount-quick button {
    border: 1px solid rgba(var(--color-primary-rgb),0.25); background: rgba(var(--color-primary-rgb),0.06);
    color: var(--color-primary); border-radius: 10px; padding: 6px 11px; font-size: 0.78rem; font-weight: 700;
    cursor: pointer; transition: all .18s ease;
    min-height: 34px;
}
.bk-amount-quick button:hover { background: var(--color-primary); color: #fff; transform: scale(1.05); }
.bk-amount-quick button:active { transform: scale(0.95); }

/* 分类九宫格 */
.bk-cat-grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 16px;
}
.bk-cat-item {
    border: 1.5px solid rgba(var(--color-primary-rgb),0.22); background: rgba(255,255,255,0.82);
    border-radius: 14px; padding: 12px 6px 9px; cursor: pointer; text-align: center;
    transition: all .2s ease; position: relative;
    min-height: 68px;
}
.bk-cat-item:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(var(--color-primary-rgb),0.12); border-color: rgba(var(--color-primary-rgb),0.45); }
.bk-cat-item:active { transform: scale(0.96); }
.bk-cat-item.active {
    border-color: var(--color-primary); background: linear-gradient(135deg, rgba(var(--color-primary-rgb),0.12), rgba(var(--color-primary-rgb),0.08));
    box-shadow: 0 4px 14px rgba(var(--color-primary-rgb),0.25);
}
.bk-cat-item.active::after {
    content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; line-height: 22px;
    background: var(--grad-primary); color: #fff; border-radius: 50%; font-size: 10px; text-align: center;
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb),0.5);
    animation: bk-bounce-in .3s cubic-bezier(.68,-0.55,.27,1.55);
}
@keyframes bk-bounce-in {
    0% { transform: scale(0); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1); }
}
.bk-cat-ico {
    width: 34px; height: 34px; margin: 0 auto 6px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; color: #fff;
    transition: transform .2s ease;
}
.bk-cat-item.active .bk-cat-ico { transform: scale(1.08); }
.bk-cat-name { font-size: 0.74rem; color: #475569; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 备注行 */
.bk-note-row { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.bk-note-input {
    flex: 1; min-width: 180px; border: 1.5px solid rgba(var(--color-primary-rgb),0.35); border-radius: 14px;
    padding: 12px 16px; font-size: 0.9rem; background: rgba(255,255,255,0.88); color: #1e293b;
    outline: none; transition: all .2s ease;
    min-height: 46px;
}
.bk-note-input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb),0.12); }
.bk-date-input {
    border: 1.5px solid rgba(var(--color-primary-rgb),0.35); border-radius: 14px; padding: 10px 14px;
    font-size: 0.88rem; background: rgba(255,255,255,0.88); color: #475569; outline: none;
    font-family: inherit; transition: all .2s ease;
    min-height: 46px;
}
.bk-date-input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb),0.12); }

/* 保存按钮：渐变 + 循环流光 */
.bk-save-row { display: flex; gap: 12px; }
.bk-save-btn {
    flex: 1; border: none; cursor: pointer; border-radius: 999px;
    padding: 15px 0; font-size: 1.02rem; font-weight: 700; color: #fff;
    background: var(--grad-primary);
    background-size: 200% 200%;
    box-shadow: 0 8px 22px rgba(var(--color-primary-rgb),0.4);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    position: relative; overflow: hidden; transition: all .25s ease;
    animation: bk-flow 4s ease infinite;
    min-height: 52px;
}
@keyframes bk-flow { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.bk-save-btn::after {
    content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,0.5), transparent);
    transform: skewX(-20deg); animation: bk-shine 2.8s ease infinite;
}
@keyframes bk-shine { 0% { left: -80%; } 60%, 100% { left: 130%; } }
.bk-save-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(var(--color-primary-rgb),0.5); }
.bk-save-btn:active { transform: scale(0.98); }
.bk-save-btn:disabled { opacity: .7; cursor: not-allowed; }
.bk-cancel-btn {
    border: 1.5px solid rgba(148,163,184,0.4); background: rgba(255,255,255,0.85);
    color: #64748b; border-radius: 999px; padding: 15px 26px; cursor: pointer;
    font-size: 0.92rem; font-weight: 600; transition: all .2s ease;
    min-height: 52px;
}
.bk-cancel-btn:hover { border-color: #f43f5e; color: #f43f5e; background: rgba(244,63,94,0.05); }
.bk-cancel-btn:active { transform: scale(0.96); }

.bk-recent-tip { text-align: center; font-size: 0.82rem; color: #10b981; margin-top: 12px; min-height: 1.4em; font-weight: 600; }

/* ---------- Tab2 流水 ---------- */
.bk-month-nav {
    display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 14px;
}
.bk-month-nav button {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(var(--color-primary-rgb),0.45);
    background: rgba(255,255,255,0.88); color: var(--color-primary); cursor: pointer; font-size: 0.85rem;
    transition: all .2s ease;
    display: inline-flex; align-items: center; justify-content: center;
}
.bk-month-nav button:hover { background: var(--color-primary); color: #fff; border-color: transparent; transform: scale(1.1); }
.bk-month-nav button:active { transform: scale(0.95); }
.bk-month-label { font-size: 1.05rem; font-weight: 700; color: #1e293b; letter-spacing: 1px; min-width: 120px; text-align: center; }

.bk-month-summary {
    display: flex; justify-content: center; gap: 22px;
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb),0.10), rgba(var(--color-primary-rgb),0.10));
    border: 1px solid rgba(var(--color-primary-rgb),0.3); border-radius: 15px;
    padding: 12px 14px; margin-bottom: 16px; font-size: 0.84rem; flex-wrap: wrap;
}
.bk-month-summary span { color: #64748b; display: inline-flex; align-items: center; gap: 4px; }
.bk-month-summary b { font-weight: 700; font-size: 0.95rem; margin-left: 4px; }
.bk-month-summary .m-exp b { color: #f43f5e; }
.bk-month-summary .m-inc b { color: #10b981; }
.bk-month-summary .m-bal b { color: var(--color-primary); }

.bk-record-group-title { font-size: 0.78rem; color: #94a3b8; font-weight: 700; margin: 14px 4px 8px; letter-spacing: .5px; }
.bk-record-item {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,0.90); border: 1px solid rgba(var(--color-secondary-rgb),0.55);
    border-radius: 14px; padding: 13px 14px; margin-bottom: 10px;
    animation: bk-item-in .35s ease both;
    transition: box-shadow .2s ease, transform .2s ease;
    position: relative; overflow: hidden;
}
@keyframes bk-item-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }
.bk-record-item:hover { box-shadow: 0 6px 18px rgba(var(--color-primary-rgb),0.10); border-color: rgba(var(--color-primary-rgb),0.5); }
.bk-record-item::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 3px 0 0 3px;
}
.bk-record-item.exp::before { background: linear-gradient(180deg,#f43f5e,#fb7185); }
.bk-record-item.inc::before { background: linear-gradient(180deg,#10b981,#34d399); }

.bk-record-ico {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}
.bk-record-info { flex: 1; min-width: 0; }
.bk-record-title { font-size: 0.9rem; color: #1e293b; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-record-sub { font-size: 0.74rem; color: #94a3b8; margin-top: 3px; }
.bk-record-amount { font-size: 1rem; font-weight: 800; flex-shrink: 0; letter-spacing: .3px; }
.bk-record-amount.exp { color: #f43f5e; }
.bk-record-amount.inc { color: #10b981; }
.bk-record-ops { display: flex; gap: 8px; flex-shrink: 0; }
.bk-record-ops button {
    width: 32px; height: 32px; border-radius: 9px; border: none; cursor: pointer; font-size: 0.78rem;
    transition: all .2s ease;
    display: inline-flex; align-items: center; justify-content: center;
}
.bk-record-ops .op-edit { background: rgba(var(--color-primary-rgb),0.1); color: var(--color-primary); }
.bk-record-ops .op-edit:hover { background: var(--color-primary); color: #fff; transform: scale(1.1); }
.bk-record-ops .op-del { background: rgba(244,63,94,0.1); color: #f43f5e; }
.bk-record-ops .op-del:hover { background: #f43f5e; color: #fff; transform: scale(1.1); }
.bk-record-ops button:active { transform: scale(0.9); }

.bk-load-more { text-align: center; margin-top: 8px; }
.bk-load-more button {
    border: 1px solid rgba(var(--color-primary-rgb),0.45); background: rgba(255,255,255,0.85); color: var(--color-primary);
    border-radius: 999px; padding: 10px 28px; font-size: 0.84rem; font-weight: 600; cursor: pointer;
    transition: all .2s ease;
    min-height: 40px;
}
.bk-load-more button:hover { background: var(--color-primary); color: #fff; border-color: transparent; transform: translateY(-2px); }

.bk-empty { text-align: center; padding: 36px 10px; color: #94a3b8; font-size: 0.85rem; }
.bk-empty i { font-size: 36px; margin-bottom: 10px; display: block; opacity: .5; }

/* ---------- Tab3 统计 ---------- */
.bk-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.bk-stat-card {
    background: rgba(255,255,255,0.90); border: 1px solid rgba(var(--color-secondary-rgb),0.55);
    border-radius: 15px; padding: 14px 12px; transition: all .25s ease;
    position: relative; overflow: hidden;
}
.bk-stat-card::after {
    content: ''; position: absolute; right: -20px; bottom: -20px; width: 60px; height: 60px;
    background: radial-gradient(circle, rgba(var(--color-primary-rgb),0.08), transparent 70%); pointer-events: none;
}
.bk-stat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(var(--color-primary-rgb),0.12); }
.bk-stat-label { font-size: 0.72rem; color: #94a3b8; display: flex; align-items: center; gap: 4px; margin-bottom: 6px; font-weight: 600; }
.bk-stat-value { font-size: 1.1rem; font-weight: 800; color: #1e293b; letter-spacing: .3px; }
.bk-stat-card.exp .bk-stat-value { color: #f43f5e; }
.bk-stat-card.inc .bk-stat-value { color: #10b981; }
.bk-stat-card.bal .bk-stat-value { color: var(--color-primary); }

.bk-budget-box {
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb),0.09), rgba(var(--color-primary-rgb),0.09));
    border: 1px solid rgba(var(--color-primary-rgb),0.35); border-radius: 15px;
    padding: 15px 16px; margin-bottom: 18px;
}
.bk-budget-head { display: flex; justify-content: space-between; font-size: 0.84rem; color: #475569; margin-bottom: 10px; }
.bk-budget-head i { color: var(--color-primary); }
.bk-budget-num { font-weight: 700; color: var(--color-primary); }
.bk-budget-bar { height: 12px; background: rgba(var(--color-primary-rgb),0.2); border-radius: 999px; overflow: hidden; position: relative; }
.bk-budget-fill {
    height: 100%; width: 0; border-radius: 999px;
    background: var(--grad-primary);
    transition: width .8s cubic-bezier(.22,1,.36,1);
}
.bk-budget-fill.warn { background: linear-gradient(90deg,#f59e0b,#f97316); }
.bk-budget-fill.over { background: linear-gradient(90deg,#f43f5e,#ef4444); animation: bk-pulse 1.6s ease infinite; }
@keyframes bk-pulse { 0%,100% { opacity: 1; } 50% { opacity: .6; } }

.bk-top-title { font-size: 0.92rem; font-weight: 700; color: #1e293b; margin: 4px 0 12px; display: flex; align-items: center; gap: 7px; }
.bk-top-title i { color: #f59e0b; }
.bk-top-item { margin-bottom: 12px; }
.bk-top-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 0.82rem; }
.bk-top-ico { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.75rem; flex-shrink: 0; }
.bk-top-name { color: #334155; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-top-amt { color: #f43f5e; font-weight: 700; }
.bk-top-pct { color: #94a3b8; font-size: 0.74rem; margin-left: 6px; }
.bk-top-bar { height: 8px; background: rgba(var(--color-primary-rgb),0.2); border-radius: 999px; overflow: hidden; margin-left: 38px; }
.bk-top-fill { height: 100%; border-radius: 999px; width: 0; transition: width .8s cubic-bezier(.22,1,.36,1); }

/* ---------- Tab4 设置 ---------- */
.bk-set-section {
    background: rgba(255,255,255,0.88); border: 1px solid rgba(var(--color-secondary-rgb),0.55);
    border-radius: 15px; padding: 16px 18px; margin-bottom: 14px;
}
.bk-set-title { font-size: 0.92rem; font-weight: 700; color: #1e293b; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.bk-set-title i { color: var(--color-primary); }
.bk-set-row { margin-bottom: 10px; }
.bk-tip {
    display: flex; gap: 8px; align-items: flex-start;
    background: rgba(245,158,11,0.09); border: 1px solid rgba(245,158,11,0.35);
    color: #b45309; font-size: 0.78rem; border-radius: 11px; padding: 10px 14px; margin-bottom: 12px; line-height: 1.6;
}
.bk-tip i { margin-top: 2px; flex-shrink: 0; }

.bk-switch-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.86rem; color: #475569; cursor: pointer; }
.bk-switch { position: relative; display: inline-block; width: 50px; height: 28px; flex-shrink: 0; }
.bk-switch input { opacity: 0; width: 0; height: 0; }
.bk-switch i {
    position: absolute; inset: 0; border-radius: 999px; cursor: pointer;
    background: #cbd5e1; transition: all .25s ease;
}
.bk-switch i::before {
    content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%;
    left: 3px; top: 3px; background: #fff; transition: all .25s cubic-bezier(.22,1,.36,1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.bk-switch input:checked + i { background: var(--grad-primary); }
.bk-switch input:checked + i::before { transform: translateX(22px); }

.bk-remind-detail {
    background: rgba(var(--color-primary-rgb),0.05); border-radius: 12px; padding: 14px;
    animation: bk-slide-in .3s ease;
}
.bk-field { margin-bottom: 12px; }
.bk-field label { display: block; font-size: 0.76rem; color: #64748b; margin-bottom: 6px; font-weight: 600; }
.bk-field input, .bk-cat-add-row input, .bk-cat-add-row select {
    width: 100%; border: 1.5px solid rgba(var(--color-primary-rgb),0.35); border-radius: 12px;
    padding: 10px 14px; font-size: 0.86rem; background: #fff; color: #1e293b; outline: none;
    font-family: inherit; transition: all .2s ease; box-sizing: border-box;
}
.bk-field input:focus, .bk-cat-add-row input:focus, .bk-cat-add-row select:focus {
    border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb),0.12);
}

.bk-mini-btn {
    border: none; cursor: pointer; border-radius: 999px; padding: 10px 20px;
    font-size: 0.82rem; font-weight: 700; color: #fff;
    background: var(--grad-primary);
    box-shadow: 0 4px 14px rgba(var(--color-primary-rgb),0.3);
    display: inline-flex; align-items: center; gap: 7px; transition: all .22s ease;
}
.bk-mini-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(var(--color-primary-rgb),0.4); }
.bk-mini-btn:active { transform: scale(0.96); }
.bk-mini-btn.wide { width: 100%; justify-content: center; padding: 12px 0; min-height: 44px; }

/* 分类管理 */
.bk-cat-manage { margin-bottom: 14px; max-height: 260px; overflow-y: auto; padding-right: 4px; }
.bk-cat-manage::-webkit-scrollbar { width: 5px; }
.bk-cat-manage::-webkit-scrollbar-thumb { background: rgba(var(--color-primary-rgb),0.3); border-radius: 999px; }
.bk-mg-group-title { font-size: 0.76rem; color: #94a3b8; font-weight: 700; margin: 10px 2px 8px; letter-spacing: .5px; }
.bk-mg-item {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(var(--color-secondary-rgb),0.35); border: 1px solid rgba(var(--color-primary-rgb),0.3);
    border-radius: 999px; padding: 5px 7px 5px 6px; margin: 0 8px 8px 0; font-size: 0.78rem; color: #475569;
    animation: bk-item-in .3s ease both;
    transition: all .18s ease;
}
.bk-mg-item:hover { border-color: rgba(var(--color-primary-rgb),0.6); transform: translateY(-1px); }
.bk-mg-ico { width: 22px; height: 22px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 0.65rem; }
.bk-mg-del {
    width: 20px; height: 20px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(244,63,94,0.12); color: #f43f5e; font-size: 0.65rem;
    display: inline-flex; align-items: center; justify-content: center; transition: all .2s ease;
}
.bk-mg-del:hover { background: #f43f5e; color: #fff; transform: scale(1.1); }

.bk-cat-add-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.bk-cat-add-row input { flex: 1; min-width: 120px; width: auto; }
.bk-cat-add-row select { width: auto; flex-shrink: 0; cursor: pointer; }
.bk-cat-add-row .bk-mini-btn { flex-shrink: 0; }

.bk-cat-icon-pick { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.bk-ico-opt {
    aspect-ratio: 1; border-radius: 10px; border: 1.5px solid rgba(var(--color-primary-rgb),0.3);
    background: #fff; color: #64748b; cursor: pointer; font-size: 0.82rem;
    display: flex; align-items: center; justify-content: center; transition: all .18s ease;
    min-height: 36px;
}
.bk-ico-opt:hover { transform: translateY(-2px); color: var(--color-primary); border-color: var(--color-primary); }
.bk-ico-opt.sel { background: var(--grad-primary); color: #fff; border-color: transparent; box-shadow: 0 4px 10px rgba(var(--color-primary-rgb),0.4); }

/* ---------- 自定义弹窗 ---------- */
.bk-modal-mask {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(30,41,59,0.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    animation: bk-fade-in .2s ease;
}
@keyframes bk-fade-in { from { opacity: 0; } to { opacity: 1; } }
.bk-modal {
    width: 88%; max-width: 360px; background: #fff; border-radius: 20px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(30,41,59,0.25);
    animation: bk-modal-in .3s cubic-bezier(.34,1.56,.64,1);
    position: relative;
}
@keyframes bk-modal-in {
    from { opacity: 0; transform: scale(0.85) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.bk-modal-head {
    padding: 22px 20px 14px; text-align: center;
}
.bk-modal-icon {
    width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: #fff;
}
.bk-modal-icon.warn { background: linear-gradient(135deg,#f59e0b,#f97316); box-shadow: 0 6px 18px rgba(245,158,11,0.4); }
.bk-modal-icon.danger { background: linear-gradient(135deg,#ef4444,#dc2626); box-shadow: 0 6px 18px rgba(239,68,68,0.4); }
.bk-modal-icon.success { background: linear-gradient(135deg,#10b981,#059669); box-shadow: 0 6px 18px rgba(16,185,129,0.4); }
.bk-modal-icon.info { background: var(--grad-primary); box-shadow: 0 6px 18px rgba(var(--color-primary-rgb),0.4); }
.bk-modal-title { font-size: 1.05rem; font-weight: 700; color: #1e293b; margin-bottom: 6px; }
.bk-modal-desc { font-size: 0.84rem; color: #64748b; line-height: 1.6; }
.bk-modal-foot { padding: 18px 16px 20px; display: flex; gap: 10px; }
.bk-modal-btn {
    flex: 1; border: none; cursor: pointer; border-radius: 12px; padding: 12px 0;
    font-size: 0.9rem; font-weight: 700; transition: all .2s ease;
    min-height: 46px;
}
.bk-modal-btn.cancel {
    background: rgba(var(--color-secondary-rgb),0.5); color: #475569;
}
.bk-modal-btn.cancel:hover { background: rgba(var(--color-secondary-rgb),0.8); }
.bk-modal-btn.confirm {
    background: linear-gradient(135deg,#f43f5e,#ef4444); color: #fff;
    box-shadow: 0 4px 14px rgba(244,63,94,0.35);
}
.bk-modal-btn.confirm:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(244,63,94,0.45); }
.bk-modal-btn.primary {
    background: var(--grad-primary); color: #fff;
    box-shadow: 0 4px 14px rgba(var(--color-primary-rgb),0.35);
}
.bk-modal-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(var(--color-primary-rgb),0.45); }

/* ---------- 浮动 Toast ---------- */
.bk-toast {
    position: fixed; top: 24px; left: 50%; transform: translateX(-50%) translateY(-20px);
    z-index: 100000;
    background: rgba(30,41,59,0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    color: #fff; padding: 12px 22px; border-radius: 999px; font-size: 0.88rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: 8px;
    box-shadow: 0 10px 30px rgba(30,41,59,0.3);
    animation: bk-toast-in .3s cubic-bezier(.34,1.56,.64,1);
    max-width: 80vw;
}
@keyframes bk-toast-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-30px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.bk-toast.success { background: linear-gradient(135deg,#10b981,#059669); box-shadow: 0 6px 20px rgba(16,185,129,0.4); }
.bk-toast.error { background: linear-gradient(135deg,#f43f5e,#ef4444); box-shadow: 0 6px 20px rgba(244,63,94,0.4); }
.bk-toast.warning { background: linear-gradient(135deg,#f59e0b,#f97316); box-shadow: 0 6px 20px rgba(245,158,11,0.4); }

/* ---------- 移动端 ---------- */
@media (max-width: 768px) {
    .bk-card { padding: 16px 14px; border-radius: 18px; }
    .bk-tabs { gap: 4px; padding: 4px; margin: 4px 0 14px; }
    .bk-tab { font-size: 0.78rem; padding: 8px 6px; border-radius: 9px; min-height: 36px; }
    .bk-tab i { display: none; }
    .bk-cat-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
    .bk-cat-item { padding: 11px 4px 8px; min-height: 62px; border-radius: 12px; }
    .bk-cat-ico { width: 32px; height: 32px; font-size: 0.85rem; }
    .bk-cat-name { font-size: 0.7rem; }
    .bk-amount-row { padding: 10px 14px; margin-bottom: 14px; }
    .bk-amount-symbol { font-size: 1.5rem; }
    .bk-amount-input { font-size: 1.45rem; }
    .bk-amount-quick button { padding: 5px 10px; font-size: 0.72rem; min-height: 32px; }
    .bk-stat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .bk-stat-card { padding: 12px 10px; border-radius: 13px; }
    .bk-stat-value { font-size: 1rem; }
    .bk-stat-label { font-size: 0.68rem; }
    .bk-month-summary { gap: 14px; font-size: 0.76rem; padding: 10px; }
    .bk-month-summary b { font-size: 0.88rem; }
    .bk-record-item { padding: 12px 12px; gap: 10px; border-radius: 13px; }
    .bk-record-ico { width: 38px; height: 38px; font-size: 0.9rem; border-radius: 11px; }
    .bk-record-title { font-size: 0.86rem; }
    .bk-record-sub { font-size: 0.7rem; }
    .bk-record-amount { font-size: 0.94rem; }
    .bk-record-ops button { width: 34px; height: 34px; font-size: 0.8rem; border-radius: 10px; }
    .bk-month-nav button { width: 38px; height: 38px; }
    .bk-month-label { font-size: 0.95rem; }
    .bk-cat-icon-pick { grid-template-columns: repeat(6, 1fr); }
    .bk-save-row { gap: 10px; }
    .bk-save-btn { padding: 14px 0; min-height: 48px; font-size: 0.96rem; }
    .bk-cancel-btn { padding: 14px 18px; min-height: 48px; font-size: 0.86rem; }
}

@media (max-width: 480px) {
    .bk-cat-grid { grid-template-columns: repeat(3, 1fr); gap: 7px; }
    .bk-cat-item { padding: 10px 3px 7px; min-height: 58px; }
    .bk-note-row { flex-direction: column; gap: 8px; }
    .bk-note-input { width: 100%; min-width: 0; }
    .bk-date-input { width: 100%; box-sizing: border-box; }
    .bk-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .bk-modal { width: 92%; max-width: 340px; }
    .bk-modal-head { padding: 20px 16px 12px; }
    .bk-modal-icon { width: 50px; height: 50px; font-size: 1.2rem; }
    .bk-modal-title { font-size: 1rem; }
}

/* 深色模式跟随站点 */
@media (prefers-color-scheme: dark) {
    .bk-card { border-color: rgba(var(--color-primary-rgb),0.4); }
}

/* ============================================================
   云端记账本 · 手机端 APP 化布局（body.bk-mobile-app 时生效）
   隐藏网页框架，替换为原生 APP 顶栏 + 底部 Tab 栏
   ============================================================ */
.bk-app-bar { display: none; }

@media (max-width: 768px) {
    body.bk-mobile-app .feature-card-media.bk-card,
    body.bk-mobile-app .tools-grid,
    body.bk-mobile-app .tool-detail-section,
    body.bk-mobile-app .category-section {
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        /* 清除祖先链的 transform/animation，确保 .bk-tabs 的 position:fixed 相对视口生效 */
        transform: none !important;
        animation: none !important;
        will-change: auto !important;
        filter: none !important;
        backdrop-filter: none !important;
        perspective: none !important;
    }
    body.bk-mobile-app .tools-grid { display: block !important; gap: 0 !important; }
    body.bk-mobile-app .tool-detail-section .category-title { display: none !important; }
    body.bk-mobile-app .feature-card-media.bk-card {
        width: 100% !important;
        min-height: 100vh;
        border-radius: 0 !important;
        padding: 0 !important;
        overflow-x: hidden;
        background: linear-gradient(180deg, rgba(var(--color-secondary-rgb),0.35) 0%, #f7f8fb 24%, rgba(var(--color-secondary-rgb),0.28) 100%);
    }
    body.bk-mobile-app .bk-card::before,
    body.bk-mobile-app .bk-card::after { display: none !important; }
    /* 隐藏原卡片标题（改由 APP 顶栏展示） */
    body.bk-mobile-app .feature-card-media.bk-card > .feature-card-header { display: none !important; }

    /* ---------- APP 顶部导航栏 ---------- */
    body.bk-mobile-app .bk-app-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        position: fixed;
        top: 0; left: 0; right: 0;
        z-index: 999;
        height: calc(56px + env(safe-area-inset-top, 0px));
        padding: env(safe-area-inset-top, 0px) 16px 0;
        background: var(--grad-header);
        color: var(--header-text);
        box-shadow: 0 4px 20px rgba(var(--color-primary-rgb),0.28);
    }
    body.bk-mobile-app .bk-app-back {
        width: 38px; height: 38px;
        border-radius: 12px;
        flex-shrink: 0;
        display: flex; align-items: center; justify-content: center;
        background: rgba(var(--color-primary-rgb),0.28);
        color: var(--header-text); font-size: 1rem; text-decoration: none;
        border: 1px solid rgba(var(--color-primary-rgb),0.4);
        transition: background .2s ease;
    }
    body.bk-mobile-app .bk-app-back:active { background: rgba(var(--color-primary-rgb),0.45); }
    body.bk-mobile-app .bk-app-bar-mid { flex: 1; min-width: 0; color: var(--header-text); }
    body.bk-mobile-app .bk-app-bar-title {
        font-size: 1.05rem; font-weight: 800; letter-spacing: .5px;
        text-shadow: var(--header-text-shadow);
    }
    body.bk-mobile-app .bk-app-bar-sub { font-size: 0.68rem; opacity: .9; margin-top: 2px; }
    body.bk-mobile-app .bk-app-bar-right {
        width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
        display: flex; align-items: center; justify-content: center;
        background: rgba(var(--color-primary-rgb),0.28);
        color: var(--header-text); font-size: 0.92rem;
        border: 1px solid rgba(var(--color-primary-rgb),0.4);
    }

    /* ---------- 内容区避让 ---------- */
    body.bk-mobile-app .bk-app,
    body.bk-mobile-app .bk-login-guide {
        padding-top: calc(56px + env(safe-area-inset-top, 0px) + 14px) !important;
    }

    /* ---------- 登录引导 · APP 启动页化 ---------- */
    body.bk-mobile-app .bk-login-guide {
        min-height: calc(100vh - 56px - env(safe-area-inset-top, 0px));
        display: flex; flex-direction: column; justify-content: center;
        padding-left: 28px; padding-right: 28px;
        text-align: center;
    }
    body.bk-mobile-app .bk-login-badge { width: 100px; height: 100px; border-radius: 30px; margin-bottom: 24px; }
    body.bk-mobile-app .bk-login-badge i { font-size: 2.6rem; }
    body.bk-mobile-app .bk-login-guide h3 { font-size: 1.28rem; margin: 8px 0 10px; }
    body.bk-mobile-app .bk-login-guide p { font-size: 0.9rem; }
    body.bk-mobile-app .bk-login-feats { gap: 10px; margin-bottom: 26px; }
    body.bk-mobile-app .bk-login-feat { padding: 9px 15px; font-size: 0.8rem; }
    body.bk-mobile-app .bk-login-btns { flex-direction: column; gap: 13px; width: 100%; margin-top: 4px; }
    body.bk-mobile-app .bk-login-btns a { padding: 16px 0; min-height: 52px; font-size: 1.02rem; }
    body.bk-mobile-app .bk-login-terms { margin-top: 24px; }

    /* ---------- 底部 Tab 栏 ---------- */
    body.bk-mobile-app .bk-tabs {
        position: fixed;
        left: 12px; right: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        z-index: 999;
        margin: 0;
        gap: 4px;
        padding: 6px;
        border-radius: 22px;
        background: rgba(255,255,255,0.92);
        backdrop-filter: blur(18px) saturate(160%);
        -webkit-backdrop-filter: blur(18px) saturate(160%);
        border: 1px solid rgba(var(--color-primary-rgb),0.28);
        box-shadow: 0 10px 34px rgba(var(--color-primary-rgb),0.20);
    }
    body.bk-mobile-app .bk-tab {
        flex-direction: column;
        gap: 3px;
        padding: 8px 2px;
        border-radius: 16px;
        font-size: 0.66rem;
        color: var(--text-gray);
        min-height: 50px;
    }
    body.bk-mobile-app .bk-tab i { display: block; font-size: 1.05rem; margin: 0; }
    body.bk-mobile-app .bk-tab.active { color: #fff; }
    /* 内容区底部避让 Tab 栏 */
    body.bk-mobile-app .bk-app { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }

    /* ---------- 各 Tab 内元素轻量 APP 化 ---------- */
    body.bk-mobile-app .bk-cat-grid { grid-template-columns: repeat(3, 1fr); gap: 9px; }
    body.bk-mobile-app .bk-amount-row { border-radius: 16px; }
    body.bk-mobile-app .bk-month-nav button { width: 40px; height: 40px; }
    body.bk-mobile-app .bk-record-ops { flex-direction: column; gap: 6px; }
    body.bk-mobile-app .bk-record-ops button { width: 30px; height: 30px; }
    body.bk-mobile-app .bk-save-btn { border-radius: 16px; }
    body.bk-mobile-app .bk-cancel-btn { border-radius: 16px; }
}

/* ============================================================
   V2 · 手机端「灵动记账本」视觉升级覆盖层
   （仅 body.bk-mobile-app 生效，不影响桌面端；优先级最高）
   ============================================================ */

/* ---- 排行榜名次徽章（桌面 & 手机通用） ---- */
.bk-top-badge { position: relative; flex-shrink: 0; line-height: 0; }
.bk-top-rank {
    position: absolute; right: -8px; top: -7px;
    min-width: 16px; height: 16px; padding: 0 3px;
    border-radius: 999px; box-sizing: border-box;
    background: #fff; border: 1px solid rgba(15,23,42,0.1);
    color: #8b93a7; font-size: 0.58rem; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(15,23,42,0.12);
    font-style: normal;
}
.bk-top-item:nth-child(1) .bk-top-rank { color: #b45309; border-color: rgba(245,158,11,0.5); }
.bk-top-item:nth-child(2) .bk-top-rank { color: #475569; border-color: rgba(100,116,139,0.5); }
.bk-top-item:nth-child(3) .bk-top-rank { color: #92400e; border-color: rgba(217,119,6,0.5); }

/* ---- 月度总览 Hero（默认隐藏，仅手机端显示） ---- */
.bk-hero { display: none; }

@media (max-width: 768px) {

    /* ---------- 0. 页面画布：浅色氛围 + 固定光斑 ---------- */
    body.bk-mobile-app .feature-card-media.bk-card {
        background: linear-gradient(180deg, rgba(var(--color-secondary-rgb),0.16) 0%, #f2f4fa 16%, #eef1f7 100%) !important;
    }
    body.bk-mobile-app .feature-card-media.bk-card::before {
        content: '' !important; display: block !important;
        position: fixed; z-index: 0; pointer-events: none;
        width: 320px; height: 320px; top: -100px; right: -90px; left: auto; bottom: auto;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(var(--color-primary-rgb),0.20) 0%, rgba(var(--color-primary-rgb),0) 68%);
    }
    body.bk-mobile-app .feature-card-media.bk-card::after {
        content: '' !important; display: block !important;
        position: fixed; z-index: 0; pointer-events: none;
        width: 360px; height: 360px; bottom: -130px; left: -100px; top: auto; right: auto;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(var(--color-secondary-rgb),0.20) 0%, rgba(var(--color-secondary-rgb),0) 68%);
    }
    body.bk-mobile-app .bk-app { position: relative; z-index: 1; }
    body.bk-mobile-app button,
    body.bk-mobile-app .bk-cat-item,
    body.bk-mobile-app a { -webkit-tap-highlight-color: transparent; }

    /* ---------- 1. 顶部导航栏：玻璃光斑 + 高光线 ---------- */
    body.bk-mobile-app .bk-app-bar {
        overflow: hidden;
        box-shadow: 0 4px 22px rgba(var(--color-primary-rgb),0.20);
    }
    body.bk-mobile-app .bk-app-bar::before {
        content: ''; position: absolute; top: 0; right: -24px;
        width: 170px; height: 170px; border-radius: 50%;
        background: radial-gradient(circle, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0) 70%);
        pointer-events: none;
    }
    body.bk-mobile-app .bk-app-bar::after {
        content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
        background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
        pointer-events: none;
    }
    body.bk-mobile-app .bk-app-back,
    body.bk-mobile-app .bk-app-bar-right {
        background: rgba(255,255,255,0.18);
        border-color: rgba(255,255,255,0.28);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }
    body.bk-mobile-app .bk-app-back:active,
    body.bk-mobile-app .bk-app-bar-right:active { background: rgba(255,255,255,0.32); }
    body.bk-mobile-app .bk-app-bar-title { font-size: 1.08rem; letter-spacing: .8px; }
    body.bk-mobile-app .bk-app-bar-sub { font-size: 0.66rem; opacity: .85; margin-top: 3px; }
    body.bk-mobile-app .bk-app-bar-right i {
        filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
        animation: bk-breath 3s ease-in-out infinite;
    }

    /* ---------- 2. 内容区：左右留白 + 避让 -------- */
    body.bk-mobile-app .bk-app {
        box-sizing: border-box; width: 100%;
        padding-left: 14px !important;
        padding-right: 14px !important;
        padding-top: calc(56px + env(safe-area-inset-top, 0px) + 12px) !important;
        padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* ---------- 3. 月度总览 Hero 卡片 ---------- */
    body.bk-mobile-app .bk-hero {
        display: block; position: relative; overflow: hidden;
        margin: 2px 0 16px; padding: 18px 18px 14px;
        border-radius: 24px;
        background: var(--grad-header);
        color: var(--header-text);
        box-shadow: 0 14px 32px rgba(var(--color-primary-rgb),0.28);
    }
    body.bk-mobile-app .bk-hero::before {
        content: ''; position: absolute; right: -40px; top: -56px;
        width: 180px; height: 180px; border-radius: 50%;
        background: radial-gradient(circle, rgba(255,255,255,0.30) 0%, rgba(255,255,255,0) 70%);
        pointer-events: none;
    }
    body.bk-mobile-app .bk-hero::after {
        content: ''; position: absolute; left: -50px; bottom: -90px;
        width: 210px; height: 210px; border-radius: 50%;
        background: radial-gradient(circle, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 70%);
        pointer-events: none;
    }
    .bk-hero-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
    .bk-hero-tag {
        display: inline-flex; align-items: center; gap: 6px;
        padding: 5px 12px; border-radius: 999px;
        background: rgba(255,255,255,0.22);
        border: 1px solid rgba(255,255,255,0.18);
        font-size: 0.68rem; font-weight: 700; letter-spacing: 1px;
    }
    .bk-hero-tag i { font-size: 0.68rem; }
    .bk-hero-month { font-size: 0.68rem; font-weight: 600; opacity: .85; }
    .bk-hero-balance {
        position: relative; z-index: 1;
        font-size: 2.05rem; font-weight: 800; letter-spacing: .5px;
        line-height: 1.1; font-variant-numeric: tabular-nums;
        text-shadow: 0 1px 6px rgba(0,0,0,0.10);
    }
    .bk-hero-balance::before {
        content: '本月结余（元）'; display: block;
        font-size: 0.62rem; font-weight: 600; letter-spacing: 1px;
        opacity: .78; margin-bottom: 3px;
    }
    .bk-hero-balance.neg { color: #ffd0c4; }
    .bk-hero-cols {
        position: relative; z-index: 1;
        display: flex; gap: 4px; margin-top: 16px;
        padding-top: 12px;
        border-top: 1px solid rgba(255,255,255,0.20);
    }
    .bk-hero-col { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
    .bk-hero-mini {
        width: 32px; height: 32px; border-radius: 11px; flex-shrink: 0;
        display: flex; align-items: center; justify-content: center;
        font-size: 0.8rem;
        background: rgba(255,255,255,0.22);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
    }
    .bk-hero-txt { min-width: 0; }
    .bk-hero-txt > span { display: block; font-size: 0.58rem; font-weight: 600; opacity: .82; margin-bottom: 1px; white-space: nowrap; }
    .bk-hero-txt b {
        display: block; font-size: 0.9rem; font-weight: 800;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        font-variant-numeric: tabular-nums;
    }
    .bk-hero-col:nth-child(1) .bk-hero-mini { color: #ffd9cf; }
    .bk-hero-col:nth-child(2) .bk-hero-mini { color: #c8f5e0; }
    .bk-hero-col:nth-child(3) .bk-hero-mini { color: #ffe3b8; }

    /* ---------- 4. 底部 Tab 栏：悬浮胶囊 + 图标药丸高亮 ---------- */
    body.bk-mobile-app .bk-tabs {
        left: 14px; right: 14px;
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        padding: 8px 10px;
        border-radius: 26px;
        background: rgba(255,255,255,0.94);
        backdrop-filter: blur(22px) saturate(180%);
        -webkit-backdrop-filter: blur(22px) saturate(180%);
        border: 1px solid rgba(var(--color-primary-rgb),0.14);
        box-shadow: 0 14px 40px rgba(15,23,42,0.16);
        gap: 2px;
    }
    body.bk-mobile-app .bk-tab {
        flex-direction: column; gap: 3px;
        padding: 7px 2px 5px; min-height: 54px;
        border-radius: 20px;
        font-size: 0.62rem; font-weight: 700; letter-spacing: .2px;
        color: #9aa3b2;
        transition: color .2s ease;
    }
    body.bk-mobile-app .bk-tab i {
        display: flex !important; align-items: center; justify-content: center;
        width: 50px; height: 27px; border-radius: 15px;
        font-size: 1rem; color: #9aa3b2;
        background: transparent;
        transition: all .28s cubic-bezier(.34,1.56,.64,1);
    }
    body.bk-mobile-app .bk-tab:hover { color: var(--color-primary); }
    body.bk-mobile-app .bk-tab.active {
        background: transparent;
        box-shadow: none;
        color: var(--color-primary);
    }
    body.bk-mobile-app .bk-tab.active i {
        background: var(--grad-primary);
        color: #fff;
        box-shadow: 0 5px 14px rgba(var(--color-primary-rgb),0.38);
    }
    body.bk-mobile-app .bk-tab:active i { transform: scale(.9); }

    /* ---------- 5. 记一笔页 ---------- */
    body.bk-mobile-app .bk-type-btn { border-radius: 16px; min-height: 48px; }
    body.bk-mobile-app .bk-amount-row {
        border-radius: 20px; padding: 14px 16px;
        border-color: rgba(var(--color-primary-rgb),0.22);
        background: rgba(255,255,255,0.94);
        box-shadow: 0 4px 18px rgba(15,23,42,0.05);
    }
    body.bk-mobile-app .bk-amount-input { font-size: 1.75rem; }
    body.bk-mobile-app .bk-note-input,
    body.bk-mobile-app .bk-date-input { border-radius: 15px; background: rgba(255,255,255,0.94); }
    body.bk-mobile-app .bk-cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 2px; }
    body.bk-mobile-app .bk-cat-item {
        background: rgba(255,255,255,0.92);
        border: 1px solid rgba(var(--color-primary-rgb),0.10);
        border-radius: 18px;
        box-shadow: 0 2px 10px rgba(15,23,42,0.04);
        transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
    }
    body.bk-mobile-app .bk-cat-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(var(--color-primary-rgb),0.12);
    }
    body.bk-mobile-app .bk-cat-item.active {
        border-color: var(--color-primary);
        background: linear-gradient(160deg, rgba(var(--color-primary-rgb),0.10), rgba(255,255,255,0.94) 70%);
        box-shadow: 0 6px 20px rgba(var(--color-primary-rgb),0.20);
    }
    body.bk-mobile-app .bk-cat-ico {
        width: 40px; height: 40px; border-radius: 14px; font-size: 1rem;
        box-shadow: 0 4px 12px rgba(15,23,42,0.14);
    }
    body.bk-mobile-app .bk-cat-name { font-size: 0.72rem; color: #64748b; }
    body.bk-mobile-app .bk-save-btn,
    body.bk-mobile-app .bk-cancel-btn { border-radius: 18px; }
    body.bk-mobile-app .bk-save-btn { font-size: 1rem; min-height: 52px; }
    body.bk-mobile-app .bk-recent-tip { font-size: 0.78rem; }

    /* ---------- 6. 流水页 ---------- */
    body.bk-mobile-app .bk-month-nav { gap: 12px; margin: 0 0 12px; }
    body.bk-mobile-app .bk-month-nav button {
        width: 38px; height: 38px; border: none;
        background: rgba(255,255,255,0.92);
        box-shadow: 0 2px 10px rgba(15,23,42,0.06);
    }
    body.bk-mobile-app .bk-month-label { font-size: 1rem; min-width: 96px; }
    body.bk-mobile-app .bk-month-summary {
        display: grid; grid-template-columns: repeat(4, 1fr);
        gap: 0; margin-bottom: 2px;
        background: rgba(255,255,255,0.94);
        border: 1px solid rgba(var(--color-primary-rgb),0.10);
        border-radius: 20px; padding: 12px 2px;
        box-shadow: 0 4px 18px rgba(15,23,42,0.05);
        font-size: inherit;
    }
    body.bk-mobile-app .bk-month-summary span {
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        gap: 3px; font-size: 0.6rem; font-weight: 600; color: #94a3b8;
        border-right: 1px solid rgba(15,23,42,0.06);
    }
    body.bk-mobile-app .bk-month-summary span:last-child { border-right: none; }
    body.bk-mobile-app .bk-month-summary i { font-size: 0.72rem; opacity: .85; }
    body.bk-mobile-app .bk-month-summary em { font-style: normal; opacity: .9; }
    body.bk-mobile-app .bk-month-summary b { margin: 0; font-size: 0.92rem; letter-spacing: .2px; font-variant-numeric: tabular-nums; }
    body.bk-mobile-app .bk-month-summary .m-exp b { color: #f43f5e; }
    body.bk-mobile-app .bk-month-summary .m-inc b { color: #10b981; }
    body.bk-mobile-app .bk-month-summary .m-bal b { color: var(--color-primary); }
    body.bk-mobile-app .bk-month-summary .m-bal.neg b { color: #f43f5e; }
    body.bk-mobile-app .bk-month-summary .m-cnt b { color: #64748b; font-size: 0.98rem; }
    /* 日期分组标题 */
    body.bk-mobile-app .bk-record-group-title {
        display: flex; align-items: center; gap: 10px;
        margin: 18px 2px 10px;
        font-size: 0.72rem; font-weight: 700; color: #8b93a7; letter-spacing: 0;
    }
    body.bk-mobile-app .bk-record-group-title::after {
        content: ''; flex: 1; height: 1px;
        background: linear-gradient(90deg, rgba(var(--color-primary-rgb),0.18) 0%, rgba(var(--color-primary-rgb),0) 100%);
    }
    /* 账单条目 */
    body.bk-mobile-app .bk-record-item {
        background: rgba(255,255,255,0.95);
        border: 1px solid rgba(var(--color-primary-rgb),0.08);
        border-radius: 18px;
        box-shadow: 0 2px 10px rgba(15,23,42,0.04);
    }
    body.bk-mobile-app .bk-record-item:active { transform: scale(.985); }
    body.bk-mobile-app .bk-record-ico {
        width: 40px; height: 40px; border-radius: 14px;
        box-shadow: 0 4px 12px rgba(15,23,42,0.12);
    }
    body.bk-mobile-app .bk-record-title { font-size: 0.9rem; }
    body.bk-mobile-app .bk-record-sub { font-size: 0.7rem; color: #a4adbd; margin-top: 2px; }
    body.bk-mobile-app .bk-record-amount { font-size: 0.98rem; }
    body.bk-mobile-app .bk-record-ops button {
        border-radius: 10px; font-size: 0.74rem;
    }
    body.bk-mobile-app .bk-record-ops .op-edit { color: #64748b; background: rgba(var(--color-primary-rgb),0.10); }
    body.bk-mobile-app .bk-record-ops .op-del { background: rgba(244,63,94,0.10); }
    body.bk-mobile-app .bk-empty { padding: 44px 10px; }
    body.bk-mobile-app .bk-empty i { font-size: 40px; }
    body.bk-mobile-app .bk-load-more button { border-radius: 999px; }

    /* ---------- 7. 统计页 ---------- */
    body.bk-mobile-app .bk-stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    body.bk-mobile-app .bk-stat-card {
        background: rgba(255,255,255,0.94);
        border: 1px solid rgba(var(--color-primary-rgb),0.10);
        border-radius: 18px;
        box-shadow: 0 2px 10px rgba(15,23,42,0.04);
    }
    body.bk-mobile-app .bk-stat-label { font-size: 0.68rem; }
    body.bk-mobile-app .bk-stat-value { font-size: 1.08rem; }
    body.bk-mobile-app .bk-budget-box {
        background: rgba(255,255,255,0.94);
        border: 1px solid rgba(var(--color-primary-rgb),0.10);
        border-radius: 18px;
        box-shadow: 0 2px 10px rgba(15,23,42,0.04);
    }
    body.bk-mobile-app .bk-top-title { margin-top: 2px; }
    body.bk-mobile-app .bk-top-item { margin-bottom: 14px; }
    body.bk-mobile-app .bk-top-name { font-size: 0.84rem; }

    /* ---------- 8. 设置页 ---------- */
    body.bk-mobile-app .bk-set-section {
        background: rgba(255,255,255,0.94);
        border: 1px solid rgba(var(--color-primary-rgb),0.10);
        border-radius: 20px;
        box-shadow: 0 2px 10px rgba(15,23,42,0.04);
    }
    body.bk-mobile-app .bk-set-title { font-size: 0.95rem; }
    body.bk-mobile-app .bk-field input,
    body.bk-mobile-app .bk-cat-add-row input,
    body.bk-mobile-app .bk-cat-add-row select { border-radius: 14px; background: #fff; }
    body.bk-mobile-app .bk-remind-detail { border-radius: 16px; }
    body.bk-mobile-app .bk-cat-icon-pick { grid-template-columns: repeat(6, 1fr); gap: 8px; }
    body.bk-mobile-app .bk-ico-opt { border-radius: 12px; min-height: 40px; }

    /* ---------- 9. 登录引导微调 ---------- */
    body.bk-mobile-app .bk-login-guide { padding-top: calc(56px + env(safe-area-inset-top, 0px) + 8px) !important; }
    body.bk-mobile-app .bk-login-badge { border-radius: 32px; }
    body.bk-mobile-app .bk-login-feat { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
}
