:root { --ink:#172033; --muted:#798397; --line:#e9edf4; --paper:#fff; --bg:#f5f7fb; --blue:#4e66ce; --green:#13a677; --orange:#e17643; }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; color:var(--ink); background:radial-gradient(circle at 86% 0%,#e7ebff 0,transparent 28rem),var(--bg); font-family:Inter,-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; }
button,input,select { font:inherit; } button { cursor:pointer; }
.shell { max-width:1120px; margin:0 auto; padding:64px 28px 112px; }
.header { display:flex; justify-content:space-between; align-items:center; gap:24px; margin-bottom:28px; }.eyebrow,.section-kicker { margin:0; color:#7885ba; font-size:11px; letter-spacing:1.7px; font-weight:800; }.header h1 { margin:8px 0 5px; font-size:34px; letter-spacing:-1.2px; }.subheading { margin:0; color:var(--muted); }
.month-control { display:flex; align-items:center; gap:10px; padding:11px 14px; background:#fff; border:1px solid var(--line); border-radius:13px; color:var(--muted); font-size:13px; box-shadow:0 8px 22px rgba(41,52,91,.06); }.month-control input { border:0; color:var(--ink); font-weight:700; outline:0; background:transparent; }
.balance-card { display:flex; align-items:center; justify-content:space-between; gap:32px; padding:34px 38px; border-radius:25px; color:#fff; background:linear-gradient(128deg,#273871 0%,#526bd4 100%); box-shadow:0 18px 38px rgba(54,74,163,.24); }.balance-intro { display:grid; gap:6px; }.balance-intro span { font-size:14px; opacity:.73; }.balance-intro strong { font-size:43px; letter-spacing:-1.5px; }.balance-intro small { opacity:.65; }.stat-grid { display:grid; grid-template-columns:repeat(2,minmax(125px,1fr)); gap:12px; }.stat { min-width:140px; padding:16px 17px; border:1px solid rgba(255,255,255,.14); border-radius:16px; background:rgba(255,255,255,.1); }.stat span { float:right; font-size:19px; }.stat p { margin:0 0 8px; font-size:12px; opacity:.72; }.stat strong { font-size:19px; }
.grid { display:grid; grid-template-columns:.82fr 1.18fr; gap:22px; margin-top:24px; }.panel { min-height:300px; padding:26px; border:1px solid #edf0f5; border-radius:22px; background:var(--paper); box-shadow:0 10px 27px rgba(39,50,83,.045); }.panel-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }.panel h2 { margin:4px 0 0; font-size:20px; }.count-pill { padding:6px 9px; border-radius:20px; color:#67738b; background:#f1f4f9; font-size:12px; white-space:nowrap; }
.distribution { margin-top:22px; }.distribution-row { margin:0 0 19px; }.distribution-label { display:flex; justify-content:space-between; gap:12px; margin-bottom:8px; font-size:13px; }.distribution-label span:last-child { color:var(--muted); }.bar-track { height:8px; overflow:hidden; border-radius:10px; background:#edf0f6; }.bar { height:100%; min-width:7px; border-radius:10px; background:linear-gradient(90deg,#8091ea,#5067cf); }.empty { display:grid; place-items:center; min-height:205px; color:var(--muted); text-align:center; }.empty-icon { width:46px; height:46px; display:grid; place-items:center; margin:auto auto 10px; border-radius:14px; color:#7788da; background:#edf0ff; font-size:23px; }.empty p { margin:0; font-size:14px; }.empty small { display:block; margin-top:8px; color:#a0a9b9; }
.record-list { margin-top:17px; }.record { display:flex; align-items:center; gap:13px; padding:14px 0; border-bottom:1px solid #f0f2f6; }.record:last-child { border-bottom:0; }.record-icon { flex:0 0 40px; width:40px; height:40px; display:grid; place-items:center; border-radius:12px; font-size:13px; font-weight:800; }.record-icon.income { color:#129d70; background:#e3f8ef; }.record-icon.expense { color:#d86530; background:#fff0e7; }.record-main { min-width:0; flex:1; }.record-category { font-weight:750; font-size:14px; }.record-note { overflow:hidden; color:var(--muted); font-size:12px; text-overflow:ellipsis; white-space:nowrap; margin-top:4px; }.record-amount { font-weight:800; font-size:14px; white-space:nowrap; }.record-amount.income { color:var(--green); }.record-amount.expense { color:var(--orange); }.delete-button { margin-left:4px; border:0; color:#afb6c3; background:transparent; font-size:17px; }.delete-button:hover { color:#e35a54; }
.add-button { position:fixed; right:max(28px,calc((100vw - 1120px)/2 + 28px)); bottom:27px; z-index:2; padding:15px 24px; border:0; border-radius:99px; color:#fff; background:var(--blue); box-shadow:0 13px 27px rgba(69,91,193,.3); font-weight:800; }.add-button span { font-size:21px; vertical-align:-1px; }
.dialog { width:min(480px,calc(100vw - 30px)); padding:0; border:0; border-radius:23px; box-shadow:0 22px 65px rgba(16,24,45,.3); }.dialog::backdrop { background:rgba(24,31,48,.48); }.dialog form { padding:27px; }.dialog-heading { display:flex; justify-content:space-between; align-items:flex-start; }.dialog h2 { margin:4px 0 0; font-size:22px; }.close-button { border:0; color:#7e889b; background:none; font-size:32px; line-height:25px; }.type-switch { display:grid; grid-template-columns:1fr 1fr; gap:5px; margin:25px 0 21px; padding:5px; border-radius:12px; background:#f0f3f7; }.type-button { padding:11px; border:0; border-radius:8px; color:#748096; background:transparent; font-weight:700; }.type-button.active.expense { color:#fff; background:var(--orange); }.type-button.active.income { color:#fff; background:var(--green); }.amount-field { display:block; padding:0 0 17px; border-bottom:2px solid #e9edf4; }.amount-field>span { display:block; color:var(--muted); font-size:12px; margin-bottom:7px; }.amount-field div { display:flex; align-items:center; gap:10px; }.amount-field b { font-size:30px; }.amount-field input { width:100%; border:0; outline:0; font-size:34px; font-weight:800; }.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }.dialog label:not(.amount-field) { display:grid; gap:8px; margin-top:18px; color:#596477; font-size:13px; font-weight:700; }.dialog input:not(#amount),.dialog select { width:100%; padding:11px 12px; border:1px solid #e2e7ee; border-radius:10px; outline-color:#7183dc; color:var(--ink); background:#fff; }.save-button { width:100%; margin-top:27px; padding:14px; border:0; border-radius:12px; color:#fff; background:var(--blue); font-weight:800; }.toast { position:fixed; left:50%; bottom:94px; z-index:10; transform:translate(-50%,15px); padding:10px 15px; border-radius:9px; color:white; background:#172033; font-size:13px; opacity:0; pointer-events:none; transition:.2s; }.toast.show { opacity:1; transform:translate(-50%,0); }
@media(max-width:760px) { .shell { padding:36px 16px 104px; }.header { align-items:flex-start; }.header h1 { font-size:27px; }.month-control { margin-top:5px; display:grid; gap:1px; padding:7px 9px; }.month-control span { font-size:10px; }.balance-card { display:block; padding:27px; }.balance-intro strong { font-size:37px; }.stat-grid { margin-top:25px; }.stat { min-width:0; }.grid { grid-template-columns:1fr; }.panel { padding:21px; }.distribution-panel { min-height:auto; }.add-button { right:16px; bottom:18px; }.form-grid { grid-template-columns:1fr; gap:0; } }

/* Animated anime-inspired theme */
body { overflow-x:hidden; background:radial-gradient(circle at 86% 0%,#e7ebff 0,transparent 28rem),radial-gradient(circle at 12% 74%,#ffe8f3 0,transparent 25rem),var(--bg); }
.shell { position:relative; z-index:1; }.sparkle-layer { position:fixed; inset:0; z-index:0; overflow:hidden; pointer-events:none; }.sparkle-layer i { position:absolute; width:8px; height:8px; border-radius:50%; background:#fff; box-shadow:0 0 16px 4px #d6a3e8; animation:sparkle 4s ease-in-out infinite; }.sparkle-layer i:nth-child(1) { top:14%; left:8%; }.sparkle-layer i:nth-child(2) { top:22%; left:83%; animation-delay:1s; }.sparkle-layer i:nth-child(3) { top:70%; left:91%; animation-delay:2.4s; }.sparkle-layer i:nth-child(4) { top:81%; left:15%; animation-delay:.6s; }.sparkle-layer i:nth-child(5) { top:48%; left:3%; animation-delay:1.6s; }.sparkle-layer i:nth-child(6) { top:8%; left:58%; animation-delay:3s; }
.header-actions { display:flex; align-items:center; gap:13px; }.mascot-wrap { position:relative; width:112px; height:90px; }.mascot { position:absolute; right:-4px; bottom:-20px; width:102px; height:126px; object-fit:contain; filter:drop-shadow(0 9px 11px rgba(84,68,158,.2)); animation:mascot-float 3.5s ease-in-out infinite; }.mascot-bubble { position:absolute; z-index:1; right:66px; top:0; width:145px; padding:7px 9px; border-radius:11px 11px 2px 11px; color:#605485; background:#fff; box-shadow:0 5px 14px rgba(90,75,145,.12); font-size:11px; line-height:1.45; animation:bubble-in .7s both; }.mascot-bubble::after { content:''; position:absolute; right:9px; bottom:-6px; border:7px solid transparent; border-top-color:#fff; border-right:0; transform:rotate(18deg); }
.balance-card { position:relative; overflow:hidden; background:linear-gradient(128deg,#273871 0%,#526bd4 50%,#8872dd 100%); background-size:180% 180%; animation:gradient-shift 9s ease infinite; }.balance-card::after { content:''; position:absolute; top:-100%; left:-20%; width:36%; height:280%; background:linear-gradient(90deg,transparent,rgba(255,255,255,.18),transparent); transform:rotate(18deg); animation:card-shine 6s ease-in-out infinite; }.balance-card.pop { animation:balance-pop .45s ease-out, gradient-shift 9s ease infinite; }.balance-intro,.stat-grid { position:relative; z-index:1; }.stat { transition:transform .25s ease,background .25s ease; }.stat:hover { transform:translateY(-4px) rotate(-1deg); background:rgba(255,255,255,.16); }
.panel { transition:transform .25s ease,box-shadow .25s ease; animation:panel-in .55s both; }.panel:nth-child(2) { animation-delay:.08s; }.panel:hover { transform:translateY(-4px); box-shadow:0 18px 34px rgba(70,83,136,.1); }.bar { background:linear-gradient(90deg,#c18be7,#5067cf); transform-origin:left; animation:bar-grow .65s cubic-bezier(.2,.8,.3,1) both; }.empty-icon { animation:empty-float 3s ease-in-out infinite; }
.add-button { background:linear-gradient(135deg,#4e66ce,#9b66d8); transition:transform .2s ease,box-shadow .2s ease; animation:button-breathe 2.8s ease-in-out infinite; }.add-button:hover { transform:translateY(-3px) scale(1.02); box-shadow:0 17px 32px rgba(85,82,195,.38); }.save-button { background:linear-gradient(135deg,#4e66ce,#9b66d8); }
@keyframes mascot-float { 0%,100% { transform:translateY(0) rotate(-2deg); } 50% { transform:translateY(-9px) rotate(2deg); } } @keyframes bubble-in { from { opacity:0; transform:translateY(7px) scale(.9); } to { opacity:1; transform:none; } } @keyframes sparkle { 0%,100% { opacity:.12; transform:scale(.45) rotate(0); } 50% { opacity:.9; transform:scale(1.3) rotate(90deg); } } @keyframes gradient-shift { 0%,100% { background-position:0% 50%; } 50% { background-position:100% 50%; } } @keyframes card-shine { 0%,70%,100% { left:-45%; } 88% { left:115%; } } @keyframes panel-in { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } } @keyframes bar-grow { from { transform:scaleX(0); } to { transform:scaleX(1); } } @keyframes empty-float { 50% { transform:translateY(-7px) rotate(8deg); } } @keyframes button-breathe { 50% { box-shadow:0 15px 31px rgba(118,83,208,.45); } } @keyframes balance-pop { 50% { transform:scale(1.015); } }
@media(max-width:760px) { .header-actions { gap:5px; }.mascot-wrap { width:70px; height:80px; }.mascot { width:82px; right:-8px; bottom:-15px; }.mascot-bubble { display:none; } }
@media(prefers-reduced-motion:reduce) { .sparkle-layer *, .balance-card, .panel, .mascot, .add-button { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; } }

.import-button { position:fixed; right:max(28px,calc((100vw - 1120px)/2 + 28px)); bottom:91px; z-index:2; padding:11px 17px; border:1px solid #d9ddf1; border-radius:99px; color:#5367c4; background:rgba(255,255,255,.92); box-shadow:0 8px 22px rgba(54,70,150,.13); font-size:13px; font-weight:800; transition:transform .2s ease,background .2s ease; }.import-button:hover { transform:translateY(-3px); background:#f2f4ff; }.import-button span { font-size:17px; vertical-align:-1px; }.import-dialog { width:min(540px,calc(100vw - 30px)); }.import-content { padding:27px; }.import-tip { margin:16px 0 18px; color:#778398; font-size:13px; line-height:1.65; }.file-upload { display:grid; place-items:center; gap:6px; padding:23px 15px; border:1.5px dashed #b9c3ed; border-radius:14px; color:#5c6fcb; background:#f6f7ff; text-align:center; cursor:pointer; transition:.2s; }.file-upload:hover { border-color:#6f81df; background:#eff1ff; }.file-upload input { position:absolute; width:1px; height:1px; overflow:hidden; opacity:0; }.file-icon { font-size:28px; line-height:1; }.file-upload strong { font-size:14px; }.file-upload small { color:#8b94aa; font-size:11px; }.import-result { min-height:90px; margin-top:17px; overflow:auto; border-radius:12px; background:#f6f8fb; }.import-placeholder { padding:31px 16px; color:#8993a5; font-size:12px; text-align:center; }.import-summary { padding:15px 16px; border-bottom:1px solid #e5e9f0; }.import-summary strong { display:block; color:#26345a; font-size:14px; }.import-summary span { display:block; margin-top:4px; color:#778398; font-size:12px; }.import-preview { max-height:148px; overflow:auto; }.import-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 16px; border-bottom:1px solid #edf0f5; font-size:12px; }.import-row:last-child { border:0; }.import-row b { color:#34405a; }.import-row small { color:#8b94aa; }.import-row .preview-amount { color:#d66b35; font-weight:800; }.import-row .preview-amount.income { color:#159b69; }.import-actions { display:flex; gap:10px; margin-top:18px; }.import-actions .save-button { margin:0; flex:1; }.cancel-import { min-width:86px; border:1px solid #e0e5ed; border-radius:12px; color:#647084; background:#fff; font-weight:700; }.save-button:disabled { opacity:.45; cursor:not-allowed; }
@media(max-width:760px) { .import-button { right:16px; bottom:82px; }.import-content { padding:22px; } }
