/* ── 基础 ── */
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'PingFang SC','Microsoft YaHei',sans-serif;background:#0d1117;color:#e6edf3;font-size:14px}
#app{min-height:100vh}
[v-cloak]{display:none}

/* ── 密码验证遮罩 ── */
.auth-overlay{position:fixed;inset:0;z-index:9999;background:#0d1117;display:flex;align-items:center;justify-content:center;}
.auth-box{width:320px;text-align:center;}
.auth-title{font-size:22px;font-weight:700;color:#58a6ff;margin-bottom:8px;}
.auth-sub{font-size:14px;color:#8b949e;margin-bottom:24px;}
.auth-input{width:100%;padding:10px 14px;background:#161b22;border:1px solid #30363d;border-radius:8px;color:#e6edf3;font-size:15px;outline:none;margin-bottom:12px;transition:border-color .2s;}
.auth-input:focus{border-color:#58a6ff;}
.auth-error{color:#f85149;font-size:13px;margin-bottom:12px;min-height:18px;}
.auth-btn{width:100%;padding:10px;background:#58a6ff;color:#fff;border:none;border-radius:8px;font-size:15px;cursor:pointer;transition:background .2s;}
.auth-btn:hover{background:#4493f8;}
.auth-btn:active{background:#3a82d9;}
.auth-remember{display:flex;align-items:center;gap:6px;font-size:13px;color:#8b949e;margin-bottom:12px;cursor:pointer;user-select:none;}
.auth-remember input{width:15px;height:15px;accent-color:#58a6ff;cursor:pointer;}

/* ── Header ── */
.el-header{background:#161b22;border-bottom:1px solid #30363d;display:flex;align-items:center;padding:0 20px;height:56px!important}
.logo{font-size:18px;font-weight:700;color:#58a6ff;margin-right:40px;white-space:nowrap}
.tabs .el-menu{background:transparent;border:none}
.tabs .el-menu-item{color:#8b949e;border:none!important;height:56px;line-height:56px;padding:0 16px}
.tabs .el-menu-item:hover,.tabs .el-menu-item.is-active{background:#1c2128;color:#e6edf3}
.tab-icon{margin-right:6px}
.header-time{margin-left:auto;color:#8b949e;font-size:13px}

/* ── Main ── */
.el-main{padding:16px}
.card{background:#161b22;border:1px solid #30363d;border-radius:8px;margin-bottom:16px;overflow:hidden}
.card-header{background:#1c2128;padding:10px 16px;border-bottom:1px solid #30363d;font-weight:600;font-size:14px;color:#e6edf3;display:flex;align-items:center;gap:8px}
.card-body{padding:16px}

/* ── Metrics ── */
.metric-row{display:flex;gap:12px;flex-wrap:wrap}
.metric-card{flex:1;min-width:150px;background:#1c2128;border:1px solid #30363d;border-radius:6px;padding:14px 16px}
.metric-label{font-size:12px;color:#8b949e;margin-bottom:6px}
.metric-value{font-size:24px;font-weight:700;color:#e6edf3}
.metric-value.red{color:#f85149}
.metric-value.green{color:#3fb950}
.metric-value.yellow{color:#d29922}
.metric-value.blue{color:#58a6ff}
.metric-value.purple{color:#bc8cff}
.metric-sub{font-size:11px;color:#8b949e;margin-top:4px}

/* ── Charts ── */
.chart-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.full-width-table,.full-width-table .el-table__inner-wrapper,.full-width-table .el-table__body-wrapper,.full-width-table table{width:100%!important}
.chart-grid.three-col{grid-template-columns:1fr 1fr 1fr}
.chart-full{grid-column:1/-1}
.echarts{width:100%}

/* ── Table ── */
.el-table{background:#161b22!important;border-color:#30363d}
.el-table th{background:#1c2128!important;color:#8b949e!important;font-weight:600;border-color:#30363d!important}
.el-table td{border-color:#30363d!important;color:#e6edf3}
.el-table tr{background:#30363d!important}.el-table--enable-row-hover .el-table__row:hover>td{background:#1c2128!important}
.el-table .positive{color:#3fb950}
.el-table .negative{color:#f85149}
.el-table .refund-sub{color:#f85149;font-size:12px;padding-left:6px}
.el-table .refund-amount{color:#f85149;font-weight:600}

/* ── Tags ── */
.el-tag--success{background:rgba(63,185,80,.15);border-color:#3fb950;color:#3fb950}
.el-tag--danger{background:rgba(248,81,73,.15);border-color:#f85149;color:#f85149}
.el-tag--warning{background:rgba(210,153,34,.15);border-color:#d29922;color:#d29922}
.el-tag--info{background:rgba(88,166,255,.15);border-color:#58a6ff;color:#58a6ff}

/* ── Filters ── */
.filter-row{display:flex;gap:12px;align-items:center;margin-bottom:12px;flex-wrap:wrap}
.filter-label{color:#8b949e;font-size:13px;white-space:nowrap}

/* ── Rank Bar ── */
.rank-bar-wrap{display:flex;align-items:center;gap:8px}
.rank-bar-label{min-width:50px;color:#8b949e;font-size:12px}
.rank-bar{flex:1;height:8px;background:#21262d;border-radius:4px;overflow:hidden}
.rank-bar-fill{height:100%;border-radius:4px;transition:width .4s}
.rank-bar-val{min-width:60px;text-align:right;font-size:12px;color:#8b949e}

/* ── Detail Section ── */
.detail-section{margin-top:20px}
.detail-info-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;margin-bottom:16px}
.detail-info-item{background:#1c2128;border:1px solid #30363d;border-radius:6px;padding:12px 16px}
.detail-info-label{font-size:12px;color:#8b949e;margin-bottom:4px}
.detail-info-value{font-size:16px;font-weight:600;color:#e6edf3}
.tag-pill{display:inline-block;background:#21262d;border:1px solid #30363d;border-radius:4px;padding:2px 8px;font-size:12px;color:#8b949e;margin:2px}

/* ── Search & Pos Tags ── */
.search-bar{display:flex;gap:10px;margin-bottom:12px}
.pos-tag{background:#21262d;color:#8b949e;border-color:#30363d}
.pos-tag-active{background:#58a6ff;color:#fff;border-color:#58a6ff}

/* ── Drawer ── */
.el-drawer{background:#161b22!important}
.el-drawer__header{color:#e6edf3!important;background:#161b22!important}
.el-drawer__body{background:#161b22!important;padding:20px!important}

/* ── 对账：左右分栏 ── */
.recon-split{display:flex;gap:16px;flex-wrap:wrap;align-items:flex-start}
.recon-split>.card{margin-bottom:0}
.recon-left{flex:1.4;min-width:480px}
.recon-right{flex:1;min-width:360px}
.el-table .selected-row>td{background:#143d6b!important}
.el-table .selected-row:hover>td{background:#1a4d86!important}
.recon-detail-empty{color:#8b949e;text-align:center;padding:48px 0;font-size:13px}
.recon-detail-block{margin-bottom:16px}
.recon-detail-title{font-size:13px;font-weight:600;margin-bottom:8px}
.recon-detail-row{display:flex;justify-content:space-between;font-size:13px;padding:5px 0;border-bottom:1px dashed #21262d}

/* 当日明细气泡浮层（点击行后出现在该行上方、对齐记账支出列） */
.recon-pop{position:fixed;z-index:3000;min-width:240px;max-width:360px;background:rgba(22,27,34,0.5);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);border:1px solid #30363d;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.5);padding:10px 12px;font-size:13px;color:#e6edf3}
.recon-pop-arrow{position:absolute;bottom:-7px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #30363d}
.recon-pop-arrow::after{content:'';position:absolute;top:-8px;left:-6px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid rgba(22,27,34,0.5)}
/* 空间不足翻到行下方时，箭头改指向上方 */
.recon-pop-below .recon-pop-arrow{bottom:auto;top:-7px;border-top:0;border-bottom:7px solid #30363d}
.recon-pop-below .recon-pop-arrow::after{top:auto;bottom:-8px;border-top:0;border-bottom:6px solid rgba(22,27,34,0.5)}
.recon-pop-title{display:flex;justify-content:space-between;align-items:center;font-weight:600;margin-bottom:8px;padding-bottom:6px;border-bottom:1px solid #21262d}
.recon-pop-close{cursor:pointer;color:#8b949e;font-size:16px;line-height:1;padding:0 2px}
.recon-pop-close:hover{color:#e6edf3}
.recon-pop-body{max-height:320px;overflow:auto}

/* 记账列表抽屉：占满浏览器高度，表格内部可滚动；类别/备注同行、同样式、不换行 */
.acc-drawer .el-drawer__body{padding:0 20px 20px;overflow:hidden}
.acc-list-wrap{height:calc(100vh - 120px);display:flex;flex-direction:column;overflow:hidden}
.acc-list-wrap .el-table{flex:1;min-height:0}
.acc-cat-remark{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#e6edf3;font-size:13px}

/* ── Responsive ── */
@media(max-width:900px){.chart-grid,.chart-grid.three-col{grid-template-columns:1fr}.detail-info-grid{grid-template-columns:1fr 1fr}}
