/* ============================================================
   个人记账本 · 全局样式
   ============================================================ */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f2f3f5;
}

a { text-decoration: none; color: inherit; }

/* ---------------- 登录页（深色玻璃质感） ---------------- */
.login-wrap {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(1200px 800px at 75% -10%, #12283a 0%, transparent 60%),
                radial-gradient(1000px 700px at -10% 110%, #0e2b2a 0%, transparent 55%),
                #0a1118;
    overflow: hidden;
    padding: 24px;
}

/* 背景装饰层：光斑 + 细网格 */
.login-bg { position: absolute; inset: 0; pointer-events: none; }

.lb-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .5;
}

.lb-o1 {
    width: 420px; height: 420px;
    left: -80px; top: -120px;
    background: radial-gradient(circle, rgba(22,186,170,.55), transparent 70%);
    animation: orbFloat 14s ease-in-out infinite;
}

.lb-o2 {
    width: 480px; height: 480px;
    right: -120px; bottom: -160px;
    background: radial-gradient(circle, rgba(94,124,224,.45), transparent 70%);
    animation: orbFloat 18s ease-in-out infinite reverse;
}

.lb-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 75%);
            mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 75%);
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(40px, 30px) scale(1.08); }
}

/* 玻璃卡片 */
.login-box {
    position: relative;
    width: 400px;
    background: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
    -webkit-backdrop-filter: blur(24px) saturate(140%);
            backdrop-filter: blur(24px) saturate(140%);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 18px;
    padding: 40px 36px 30px;
    box-shadow:
        0 24px 70px rgba(0,0,0,.55),
        inset 0 1px 0 rgba(255,255,255,.18);
    animation: cardIn .6s cubic-bezier(.2,.7,.3,1) both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(26px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

/* 顶部徽标：会动的小豆子 */
.login-badge {
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-buddy { width: 72px; height: 72px; overflow: visible; }

/* 身体：呼吸浮动 + 挤压拉伸 */
.bb-body {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: bbBob 3s ease-in-out infinite;
}

@keyframes bbBob {
    0%, 100% { transform: translateY(0) scale(1, 1); }
    40%      { transform: translateY(-3px) scale(.985, 1.02); }
    70%      { transform: translateY(1px) scale(1.015, .98); }
}

/* 脚下影子随身体反向缩放 */
.bb-shadow {
    fill: rgba(0,0,0,.35);
    transform-box: fill-box;
    transform-origin: center;
    animation: bbShadow 3s ease-in-out infinite;
}

@keyframes bbShadow {
    0%, 100% { transform: scale(1); opacity: 1; }
    40%      { transform: scale(.9); opacity: .7; }
    70%      { transform: scale(1.05); opacity: 1; }
}

/* 眨眼：每 4 秒闪一下 */
.bb-eye {
    transform-box: fill-box;
    transform-origin: center;
    animation: bbBlink 4s ease-in-out infinite;
}

@keyframes bbBlink {
    0%, 90%, 100% { transform: scaleY(1); }
    93%           { transform: scaleY(.08); }
    96%           { transform: scaleY(1); }
}

/* 嘴巴：微笑，眨眼时张嘴 */
.bb-mouth {
    fill: none;
    stroke: #0c4a45;
    stroke-width: 2.2;
    stroke-linecap: round;
}

.login-box .login-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #f2f6f8;
    margin: 0 0 6px;
}

.login-box .login-sub {
    text-align: center;
    font-size: 12px;
    letter-spacing: 3px;
    color: rgba(255,255,255,.45);
    margin: 0 0 28px;
}

.login-box .login-field { margin-bottom: 16px; }

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    height: 46px;
    line-height: 46px;
    padding: 0 16px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px;
    font-size: 14px;
    color: #eef4f6;
    background: rgba(255,255,255,.05);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.login-box input::placeholder { color: rgba(255,255,255,.32); letter-spacing: 1px; }

.login-box input:focus {
    border-color: rgba(31,211,194,.85);
    background: rgba(22,186,170,.08);
    box-shadow: 0 0 0 4px rgba(22,186,170,.16);
}

.login-box .login-btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 46px;
    margin-top: 6px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #1fd3c2 0%, #14a89a 55%, #0f9c8e 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 6px;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(22,186,170,.4);
    transition: transform .15s, box-shadow .2s, filter .2s;
}

/* 按钮光泽扫过 */
.login-box .login-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
    transform: skewX(-20deg);
    animation: btnShine 3.2s ease-in-out infinite;
}

@keyframes btnShine {
    0%   { left: -80%; }
    55%  { left: 130%; }
    100% { left: 130%; }
}

.login-box .login-btn:hover { filter: brightness(1.08); box-shadow: 0 12px 32px rgba(22,186,170,.55); }
.login-box .login-btn:active { transform: scale(.985); }

.login-box .login-err {
    background: rgba(230,63,63,.12);
    border: 1px solid rgba(230,63,63,.4);
    color: #ff9d9d;
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

.login-box .login-tip {
    text-align: center;
    color: rgba(255,255,255,.28);
    font-size: 12px;
    letter-spacing: 1px;
    margin-top: 20px;
}

/* ---------------- 主框架 ---------------- */
.layout-side {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 200px;
    background: #20222a;
    overflow-y: auto;
    z-index: 100;
}

.layout-logo {
    height: 56px;
    line-height: 56px;
    padding: 0 18px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    background: #1a1c22;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layout-side a.menu-item,
.layout-side span.menu-item {
    display: block;
    padding: 0 18px;
    height: 42px;
    line-height: 42px;
    color: #c7c9cf;
    font-size: 14px;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.layout-side a.menu-item:hover { background: #2a2d36; color: #fff; }

.layout-side a.menu-item.active {
    background: #2a2d36;
    color: #fff;
    border-left-color: #16baaa;
}

.layout-side .menu-item .layui-icon { margin-right: 8px; font-size: 15px; }

.layout-side .menu-item.disabled { color: #6b6f7a; cursor: not-allowed; }

.tag-soon {
    float: right;
    font-size: 11px;
    color: #6b6f7a;
    border: 1px solid #3a3d47;
    border-radius: 3px;
    padding: 0 5px;
    line-height: 16px;
    margin-top: 12px;
}

.layout-top {
    position: fixed;
    left: 200px; right: 0; top: 0;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 99;
}

.layout-top .top-title { font-size: 16px; font-weight: 600; color: #1e2a38; }

/* 顶栏全局搜索 */
.top-search form { display: flex; align-items: center; }

.top-search input {
    width: 220px;
    height: 32px;
    line-height: 32px;
    border: 1px solid #e2e2e2;
    border-right: 0;
    border-radius: 4px 0 0 4px;
    padding: 0 10px;
    font-size: 13px;
    outline: none;
    transition: border-color .2s;
}

.top-search input:focus { border-color: #16baaa; }

.top-search button {
    height: 32px;
    border: 1px solid #16baaa;
    background: #16baaa;
    color: #fff;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    padding: 0 10px;
    font-size: 14px;
}

.top-search button:hover { background: #14a396; }

.layout-top .top-user { color: #666; font-size: 14px; }
.layout-top .top-user b { color: #16baaa; font-weight: 600; }
.layout-top .top-user a { margin-left: 14px; color: #999; }
.layout-top .top-user a:hover { color: #e63f3f; }
.layout-top .top-user a .layui-icon { font-size: 16px; }

/* 顶栏当月预算进度条 */
.top-budget {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 14px;
    font-size: 12px;
    color: #64666b;
    padding: 3px 10px;
    background: #f6f8fa;
    border-radius: 12px;
}

.top-budget:hover { background: #eef1f4; color: #1e2a38; }

.top-budget .tb-track {
    width: 90px;
    height: 6px;
    background: #e5e8eb;
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
}

.top-budget .tb-inner { display: block; height: 100%; border-radius: 3px; }

.top-budget .tb-inner.good { background: #16baaa; }
.top-budget .tb-inner.warn { background: #f59a23; }
.top-budget .tb-inner.bad  { background: #e63f3f; }

.layout-main {
    margin-left: 200px;
    padding: 74px 20px 24px;
    min-height: 100vh;
}

/* ---------------- 卡片 ---------------- */
.card {
    background: #fff;
    border-radius: 6px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
    margin-bottom: 16px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e2a38;
    margin: 0 0 14px;
    padding-left: 10px;
    border-left: 3px solid #16baaa;
    line-height: 1.2;
}

/* 指标卡 */
.stat-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }

.stat-card {
    flex: 1 1 200px;
    background: #fff;
    border-radius: 6px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.stat-card .stat-label { color: #999; font-size: 13px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 26px; font-weight: 700; color: #1e2a38; line-height: 1; }
.stat-card .stat-value .unit { font-size: 13px; font-weight: 400; color: #999; margin-left: 4px; }
.stat-card.green .stat-value { color: #16baaa; }
.stat-card.red .stat-value { color: #e63f3f; }
.stat-card.orange .stat-value { color: #f59a23; }

/* ---------------- 工具栏 ---------------- */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.toolbar .layui-inline { margin: 0; width: 180px; }
.toolbar .layui-input { width: 100%; }
.toolbar .layui-btn { height: 38px; line-height: 38px; }
.toolbar .layui-form-select { width: 100%; }

/* 查询栏下拉：选中主题色高亮 */
.filter-bar .layui-form-select dl dd.layui-this { background-color: #e6f7f5; color: #0f9c8e; }
.filter-bar .layui-form-select dl dd.layui-this::after { border-top-color: #0f9c8e; }

/* 状态彩色圆点（lay-value 上色） */
.filter-bar .layui-form-select dl dd.opt-dot::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    vertical-align: middle;
    background: #b9c0c7;
}
.filter-bar .layui-form-select dl dd.opt-dot[lay-value="1"]::before { background: #16baaa; }
.filter-bar .layui-form-select dl dd.opt-dot[lay-value="0"]::before { background: #b9c0c7; }

/* ---------------- 表格 ---------------- */
.bg-wrap { overflow-x: auto; }

.bg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.bg-table th,
.bg-table td {
    border-bottom: 1px solid #f0f1f3;
    padding: 10px 12px;
    text-align: left;
    white-space: nowrap;
}

.bg-table thead th {
    background: #f7f8fa;
    color: #64666b;
    font-weight: 500;
}

.bg-table tbody tr:hover { background: #fafbfc; }

.bg-table td.num,
.bg-table th.num { text-align: right; font-family: Consolas, monospace; }

.money-in  { color: #12a06a; font-weight: 600; }
.money-out { color: #e63f3f; font-weight: 600; }

/* ---------------- 操作链接 / 标签 ---------------- */
.op { color: #1e6fd9; cursor: pointer; margin-right: 10px; }
.op:hover { color: #16baaa; }
.op-danger { color: #e63f3f; }
.op-danger:hover { color: #c22525; }

.idea-ops { white-space: nowrap; }

.dict-on  { color: #12a06a; }
.dict-off { color: #9aa0a6; }

.idea-empty {
    text-align: center;
    color: #9aa0a6;
    padding: 30px 0;
    font-size: 13px;
}

.text-muted { color: #999; }

/* ---------------- 账单流水 ---------------- */
.bill-sums {
    font-size: 13px;
    color: #64666b;
    background: #f7f8fa;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 12px;
}

.bill-sums b { font-size: 15px; }

.tag-type {
    display: inline-block;
    height: 20px;
    line-height: 20px;
    padding: 0 8px;
    border-radius: 3px;
    font-size: 12px;
}

.tag-type.income  { background: #e8f7f1; color: #12a06a; }
.tag-type.expense { background: #ffecec; color: #e63f3f; }

.cell-detail { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.shot-badge {
    display: inline-block;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    background: #1e6fd9;
    color: #fff;
    border-radius: 8px;
    font-size: 11px;
    padding: 0 4px;
}

/* ---------------- 标签页 ---------------- */
.tab-bar { margin: 0 0 8px; }
.tab-bar .layui-tab-title { border-bottom: 1px solid #eee; }
.tab-bar .layui-tab-title li { font-size: 14px; }

/* ---------------- 视角切换分段按钮 ---------------- */
.rp-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    background: #f2f3f5;
    border-radius: 8px;
    padding: 6px;
    margin-bottom: 16px;
}

.rp-tab {
    display: inline-block;
    padding: 0 18px;
    height: 34px;
    line-height: 34px;
    border-radius: 6px;
    font-size: 14px;
    color: #5a5e66;
    background: #fff;
    border: 1px solid #e4e6eb;
    cursor: pointer;
    user-select: none;
    transition: all .15s;
}

.rp-tab:hover { color: #16baaa; border-color: #16baaa; }

.rp-tab.active {
    background: #16baaa;
    border-color: #16baaa;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(22, 186, 170, .35);
}

/* 期间控件容器与日期区间 */
.st-pw { margin: 0; }

.month-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.month-range .layui-input { width: 120px; }

.mr-sep { color: #999; }

/* ---------------- 记账表单页 ---------------- */
.form-card { max-width: 860px; }

.form-card .row {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
}

.form-card .row-single { display: block; }

.form-card .field { flex: 1; margin-bottom: 0; }
.form-card .field > label {
    display: block;
    color: #64666b;
    font-size: 13px;
    margin-bottom: 6px;
}

.form-card .req { color: #e63f3f; margin-left: 2px; }

.form-card .layui-form-select { width: 100%; }
.form-card .layui-input { width: 100%; }

.form-card .goods-area {
    height: auto;
    min-height: 84px;
    line-height: 1.6;
    padding: 8px 12px;
    resize: vertical;
    font-family: inherit;
}

.online-title {
    font-size: 13px;
    font-weight: 600;
    color: #c97a10;
    background: #fff4e6;
    border-radius: 3px;
    display: inline-block;
    padding: 2px 10px;
    margin-bottom: 10px;
}

.form-actions {
    margin-top: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-hint { color: #12a06a; font-size: 13px; }
.form-hint.hint-ok { animation: fadeIn .2s; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------------- 截图上传 ---------------- */
.shot-box { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }

.shot-grid { display: contents; }

.shot-item {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e6e8ea;
    background: #f7f8fa;
}

.shot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

.shot-item img.big { cursor: default; }

.shot-x {
    position: absolute;
    top: 0; right: 0;
    width: 20px;
    height: 20px;
    line-height: 18px;
    text-align: center;
    background: rgba(230, 63, 63, .9);
    color: #fff;
    border-radius: 0 0 0 4px;
    cursor: pointer;
    font-size: 14px;
    display: none;
}

.shot-item:hover .shot-x { display: block; }

.shot-add {
    width: 96px;
    height: 96px;
    border: 1px dashed #c9ccd1;
    border-radius: 4px;
    background: #fafbfc;
    color: #9aa0a6;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: border-color .2s, color .2s;
}

.shot-add:hover { border-color: #16baaa; color: #16baaa; }
.shot-add .layui-icon { font-size: 24px; }

/* ---------------- 统计报表 ---------------- */
.st-hint { color: #9aa0a6; font-size: 12px; margin-left: 8px; }

.st-empty { text-align: center; color: #9aa0a6; padding: 24px 0; font-size: 13px; }

.stat-sub { margin-top: 8px; font-size: 12px; color: #999; }

/* 日历 */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.cal-head {
    text-align: center;
    color: #999;
    font-size: 12px;
    padding: 4px 0;
}

.cal-cell {
    min-height: 72px;
    border: 1px solid #eef0f2;
    border-radius: 4px;
    padding: 4px 6px;
    background: #fff;
    position: relative;
}

.cal-cell i {
    font-style: normal;
    font-size: 12px;
    color: #bbb;
}

.cal-cell em {
    display: block;
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
}

.cal-lv1 { color: #f3b8b8; }
.cal-lv2 { color: #e88a8a; }
.cal-lv3 { color: #e63f3f; }
.cal-lv4 { color: #c81e1e; }

.cal-cell b.cal-in {
    display: block;
    font-size: 11px;
    color: #12a06a;
    margin-top: 2px;
}

/* 环形图 */
.st-donut-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

/* 收支占比双饼图容器 */
.st-2pie {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.st-2pie .st-pie-col { min-width: 0; }

/* ---------------- 年度账单报告 ---------------- */
.ar-hero {
    text-align: center;
    padding: 34px 20px 30px;
}

.ar-title {
    font-size: 26px;
    font-weight: 700;
    color: #1e2a38;
    letter-spacing: 2px;
}

.ar-sub { color: #999; font-size: 13px; margin: 8px 0 20px; }

.ar-total { font-size: 40px; font-weight: 700; line-height: 1.4; }

.ar-bal { color: #64666b; font-size: 14px; margin-top: 14px; }

.ar-bal b { font-size: 16px; }

.st-pie-cap { font-size: 14px; font-weight: 600; margin-bottom: 12px; }

.st-donut { width: 150px; height: 150px; flex: 0 0 150px; transform: rotate(-90deg); }

.st-donut-seg { fill: none; stroke-width: 22; }

.st-donut-num, .st-donut-cap { transform: rotate(90deg); transform-origin: 70px 70px; }

.st-donut-num { font-size: 16px; font-weight: 700; fill: #1e2a38; text-anchor: middle; }

.st-donut-cap { font-size: 10px; fill: #999; text-anchor: middle; }

.st-pie-list { flex: 1; min-width: 200px; }

.st-pie-item {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #46494e;
    padding: 3px 0;
}

.st-pie-item b { margin-left: auto; font-weight: 600; }

.st-pie-item i { font-style: normal; color: #999; width: 56px; text-align: right; }

.st-dot { width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; flex: 0 0 8px; }

/* 折线图 */
.st-svg { width: 100%; height: auto; }

.st-grid { stroke: #eef0f2; stroke-width: 1; }

.st-ax { font-size: 11px; fill: #999; }

.st-mark { font-size: 12px; font-weight: 600; }

.st-mark.bad { fill: #e63f3f; }
.st-mark.good { fill: #12a06a; }

.st-legend {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 12px;
    color: #64666b;
    margin-top: 6px;
}

.st-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; }

/* 横向条形 */
.st-hbars { display: flex; flex-direction: column; gap: 10px; }

.st-hbar-row { display: flex; align-items: center; gap: 10px; }

.st-hbar-name { width: 70px; font-size: 13px; text-align: right; flex: 0 0 70px; }

.st-hbar-track { flex: 1; height: 14px; background: #f2f3f5; border-radius: 7px; overflow: hidden; }

.st-hbar-bar { display: block; height: 100%; border-radius: 7px; min-width: 2px; }

.st-hbar-val { width: 100px; text-align: right; font-size: 13px; flex: 0 0 100px; }

/* ---------------- 月度预算 / 进度条 ---------------- */
.pbar {
    position: relative;
    height: 10px;
    background: #eef0f2;
    border-radius: 5px;
    overflow: hidden;
    width: 100%;
    vertical-align: middle;
}

.pb-inner { display: block; height: 100%; border-radius: 5px; min-width: 0; }

.pb-inner.good { background: #16baaa; }
.pb-inner.warn { background: #f59a23; }
.pb-inner.bad  { background: #e63f3f; }

.pb-text { font-size: 12px; color: #64666b; margin-left: 8px; }

/* 工作台预算卡片内嵌进度 */
.dash-bud { display: flex; align-items: center; gap: 8px; margin-top: 10px; }

.dash-bud .pbar { flex: 1; }

.dash-bud a { font-size: 12px; color: #1e6fd9; white-space: nowrap; }

.dash-bud a:hover { color: #16baaa; }

.bg-input { height: 30px; line-height: 30px; font-size: 13px; padding: 0 8px; }

.bg-cur-row { background: #f2fbf9; }
.bg-table tbody tr.bg-cur-row:hover { background: #eafaf6; }

/* ---------------- CSV 导入结果 ---------------- */
.imp-box {
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.8;
}

.imp-box.ok { background: #effaf6; border: 1px solid #c9edda; color: #0d7a53; }

.imp-box.fail { background: #fff6f6; border: 1px solid #ffdede; color: #c0392b; }

.imp-box ul { margin: 6px 0 0; padding-left: 20px; max-height: 220px; overflow-y: auto; }

/* ---------------- 深色模式 ---------------- */
body.dark {
    background: #16181d;
    color: #cfd3d9;
}

body.dark .layout-top {
    background: #1e222a;
    border-bottom-color: #2b303a;
}

body.dark .layout-top .top-title { color: #e6e9ee; }

body.dark .layout-top .top-search input {
    background: #262b34;
    border-color: #343b47;
    color: #d6dae0;
}

body.dark .top-budget { background: #262b34; color: #a8adb6; }
body.dark .top-budget:hover { background: #2e3440; color: #e6e9ee; }
body.dark .top-budget .tb-track { background: #343b47; }

body.dark .card {
    background: #1e222a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}

body.dark .card-title { color: #e6e9ee; }

body.dark .stat-card { background: #1e222a; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
body.dark .stat-card .stat-value { color: #e6e9ee; }
body.dark .stat-card.green .stat-value { color: #2fd0bd; }
body.dark .stat-card .stat-label, body.dark .stat-sub { color: #8a9099; }

body.dark .bg-table th { color: #a8adb6; border-bottom-color: #2b303a; }
body.dark .bg-table td { color: #cfd3d9; border-bottom-color: #2b303a; }
body.dark .bg-table tbody tr:hover { background: #262b34; }
body.dark .bg-cur-row { background: #1d2a27; }
body.dark .bg-table tbody tr.bg-cur-row:hover { background: #22322e; }

body.dark .layui-input, body.dark .layui-select, body.dark .layui-textarea {
    background: #262b34;
    border-color: #343b47;
    color: #d6dae0;
}

body.dark .layui-form-select dl { background: #262b34; border-color: #343b47; }
body.dark .layui-form-select dl dd { color: #cfd3d9; }
body.dark .layui-form-select dl dd:hover { background: #2e3440; }

body.dark .text-muted, body.dark .st-empty { color: #8a9099; }

body.dark .cal-cell { background: #1e222a; border-color: #2b303a; }
body.dark .cal-cell i { color: #6b7078; }

body.dark .pbar { background: #2b303a; }
body.dark .pb-text { color: #8a9099; }

body.dark .tag-group.common { background: #2b303a; color: #a8adb6; }
body.dark .tag-type.in { background: #16302a; color: #2fd0bd; }
body.dark .tag-type.out { background: #38211f; color: #ef8080; }

body.dark .shot-item { border-color: #343b47; }
body.dark .shot-add { background: #262b34; border-color: #343b47; color: #6b7078; }

body.dark .imp-box.ok { background: #16302a; border-color: #245a48; color: #7fd8b9; }
body.dark .imp-box.fail { background: #33211f; border-color: #5c2f2b; color: #ef9a94; }

body.dark .st-grid { stroke: #2b303a; }
body.dark .st-ax { fill: #6b7078; }
body.dark .st-donut-num { fill: #e6e9ee; }
body.dark .st-donut-cap { fill: #8a9099; }

body.dark .money-in { color: #2fd0bd; }
body.dark .money-out { color: #ef8080; }

body.dark .link-name { color: #6aa6ff; }
