/* ---------- toast ---------- */
.toast { position: absolute; left: 50%; bottom: 110px; transform: translate(-50%, 10px); background: rgba(30, 38, 34, .92); color: #fff; padding: 12px 20px; border-radius: 99px; font-size: 15px; opacity: 0; pointer-events: none; transition: .2s; z-index: 60; white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 底部弹层 ---------- */
#sheet-root { position: absolute; inset: 0; pointer-events: none; z-index: 50; }
.sheet-wrap { position: absolute; inset: 0; pointer-events: auto; }
.sheet-mask { position: absolute; inset: 0; background: rgba(20, 25, 22, .42); opacity: 0; transition: .25s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86%; background: var(--cream); border-radius: 26px 26px 0 0; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
.sheet-wrap.open .sheet-mask { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-bar { width: 42px; height: 5px; border-radius: 3px; background: #d8d2c6; margin: 9px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 10px 18px 8px; flex: none; }
.sheet-head b { flex: 1; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.sheet-x { width: 36px; height: 36px; border-radius: 12px; background: #ece7dc; font-size: 16px; color: var(--ink-2); }
.sheet-body { overflow-y: auto; padding: 4px 18px calc(22px + env(safe-area-inset-bottom)); }
.sheet-intro { font-size: 15px; color: var(--ink-2); margin-bottom: 12px; }
.sheet-note { font-size: 13px; color: var(--ink-3); margin: 10px 2px 14px; }
.list-card { padding: 4px 14px; }
.info-row { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-mid { flex: 1; min-width: 0; }
.info-t { font-size: 16px; font-weight: 600; }
.info-s { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.info-r { font-size: 14px; font-weight: 700; color: var(--green); white-space: nowrap; }
.info-r.warn { color: var(--orange-d); }

/* ---------- 流水 ---------- */
.flow-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.flow-row:last-child { border-bottom: 0; }
.flow-row.fresh { animation: freshIn .9s ease; }
@keyframes freshIn { 0% { background: #fff3d6; } 100% { background: transparent; } }
.flow-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; flex: none; }
.flow-ic.k-buy, .flow-ic.k-pay { background: var(--red-l); } .flow-ic.k-sell { background: var(--green-l); }
.flow-ic.k-collect { background: var(--orange-l); } .flow-ic.k-prod { background: var(--blue-l); }
.flow-mid { flex: 1; min-width: 0; }
.flow-t { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-s { font-size: 13px; color: var(--ink-2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-r { text-align: right; flex: none; }
.flow-amt { font-size: 17px; font-weight: 700; }
.flow-amt.k-buy, .flow-amt.k-pay { color: var(--red); } .flow-amt.k-sell { color: var(--green); }
.flow-amt.k-collect { color: var(--orange-d); } .flow-amt.k-prod { color: var(--blue); font-size: 15px; }
.tag { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 6px; margin-top: 3px; }
.tag.credit { background: var(--red-l); color: var(--red); } .tag.cash { background: #f0ede6; color: #6f6656; } .tag.wechat { background: var(--green-l); color: var(--green); }

/* ---------- 柱状图 ---------- */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding: 6px 2px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; gap: 5px; min-width: 0; }
.bar-v { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar { width: 70%; max-width: 34px; border-radius: 10px 10px 4px 4px; background: #cfe3d8; transition: height .4s ease; }
.bar-col.hi .bar { background: linear-gradient(180deg, #f6c35c, #ee9f32); }
.bar-col.hi .bar-v { color: var(--orange-d); font-weight: 700; }
.bar-l { font-size: 13px; color: var(--ink-2); }

/* ---------- AI 对话 ---------- */
.ai-sheet { height: 82%; }
.ai-sheet .sheet-body { display: flex; flex-direction: column; flex: 1; min-height: 0; padding-bottom: 14px; }
.ai-dot { width: 32px; height: 32px; border-radius: 11px; display: inline-grid; place-items: center; color: #fff; font-size: 16px; background: linear-gradient(135deg, #7b61ff, #43a6f3); }
.ai-online { font-size: 12px; color: #2fae6b; font-weight: 500; }
.ai-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 6px 0 10px; min-height: 120px; }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 18px; font-size: 16px; line-height: 1.6; white-space: pre-wrap; }
.msg.bot { align-self: flex-start; background: #fff; border-top-left-radius: 6px; box-shadow: var(--shadow); }
.msg.me { align-self: flex-end; background: var(--green); color: #fff; border-top-right-radius: 6px; }
.msg.typing { color: var(--ink-3); }
.ai-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; flex: none; scrollbar-width: none; }
.ai-chip { white-space: nowrap; background: var(--purple-l); color: #5443d8; border: 1px solid #ddd6ff; padding: 8px 13px; border-radius: 99px; font-size: 14px; }
.ai-input { display: flex; gap: 8px; flex: none; }
.ai-input input { flex: 1; height: 48px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; padding: 0 14px; font-size: 16px; outline: none; min-width: 0; }
.ai-input input:focus { border-color: #b9a9ff; }
.ai-input .btn { height: 48px; padding: 0 16px; }

/* ---------- 收款弹层 ---------- */
.cs-who { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cs-who b { display: block; font-size: 18px; }
.cs-who small { font-size: 14px; color: var(--red); }
.cs-k { font-size: 15px; color: var(--ink-2); margin: 10px 2px 8px; }
.cs-amts { display: flex; gap: 8px; flex-wrap: wrap; }
.cs-amt { flex: 1; min-width: 30%; height: 52px; border-radius: 14px; background: #fff; border: 2px solid var(--line); font-size: 17px; font-weight: 700; }
.cs-amt.on { border-color: var(--green); background: var(--green-l); color: var(--green-d); }
.cs-ok { margin-top: 20px; }
.remind-box { padding: 16px; font-size: 16px; line-height: 1.75; background: #f2fbf5; border: 1px solid #d3eadc; }
