:root {
  --yy-blue: #2767d5;
  --yy-ink: #172b49;
  --yy-muted: #60718a;
  --yy-border: #dde5ef;
  --yy-bg: #f4f7fb;
  --yy-rail: 224px;
  --tblr-body-font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --tblr-body-color: var(--yy-ink);
  --tblr-body-bg: var(--yy-bg);
  --tblr-primary: var(--yy-blue);
}
body { margin: 0; color: var(--yy-ink); background: var(--yy-bg); font-size: 0.9375rem; }
[hidden] { display: none !important; }
a { text-underline-offset: 3px; }
.ui-icon { flex: none; vertical-align: middle; }
.skip-link { position: fixed; top: -100px; left: 8px; z-index: 1500; background: white; padding: 10px; }
.skip-link:focus { top: 8px; }
.side-rail { width: var(--yy-rail); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--yy-border); z-index: 30; }
.brand-home { display: flex; align-items: center; gap: 12px; padding: 22px 22px 20px; color: var(--yy-ink); text-decoration: none; }
.brand-mark { width: 38px; height: 38px; position: relative; display: inline-block; flex: none; background: #2767d5; border-radius: 11px; box-shadow: inset 0 -4px 0 #0001; }
.brand-mark i { display: block; position: absolute; width: 16px; height: 11px; border: 2px solid white; border-radius: 3px; transform: rotate(-32deg) skewX(14deg); left: 9px; top: 15px; }
.brand-mark i:nth-child(2) { left: 14px; top: 11px; background: #2767d5; }
.brand-mark i:nth-child(3) { width: 4px; height: 4px; top: 21px; left: 23px; border: 0; background: #acdbff; }
.brand-words { display: flex; flex-direction: column; gap: 1px; line-height: 1.3; }
.brand-words strong { font-size: 1.18rem; letter-spacing: .065em; font-weight: 750; }
.brand-words small { color: var(--yy-muted); font-size: .76rem; letter-spacing: .1em; }
.side-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #dbe2eb transparent; padding: 0 13px 20px; }
.nav-section { margin-top: 15px; }
.nav-caption { color: #728198; font-size: .75rem; font-weight: 600; padding: 0 13px 7px; }
.side-link { display: flex; align-items: center; gap: 11px; min-height: 35px; padding: 7px 13px; font-size: .875rem; font-weight: 500; line-height: 1.4; color: #45566f; border-radius: 6px; text-decoration: none; }
.side-link + .side-link { margin-top: 1px; }
.side-link:hover,.side-account:hover { text-decoration: none; background: #f2f6fc; color: #2058ad; }
.side-link.active { color: #205dc4; background: #e9f1ff; font-weight: 650; }
.side-account { border-top: 1px solid var(--yy-border); padding: 13px 22px; background: #fff; display: flex; gap: 9px; align-items: center; font-size: .8125rem; color: var(--yy-muted); }
.side-account svg { margin-left: auto; }
.account-dot { width: 7px; height: 7px; border-radius: 50%; background: #4aa589; }
.work-area { margin-left: var(--yy-rail); min-height: 100vh; }
.utility-bar { min-height: 62px; padding: 0 clamp(20px,2.5vw,42px); display: flex; justify-content: space-between; align-items: center; gap: 12px; background: white; border-bottom: 1px solid var(--yy-border); }
.crumb,.util-actions,.profile-btn,.quick-open,.period-control,.dash-controls { display: flex; align-items: center; gap: 10px; }
.crumb,.quick-open { color: #627187; font-size: .84rem; }
.crumb svg { color: #99a6b7; }
.crumb span:last-child { color: #34475f; }
.profile-btn { color: var(--yy-ink); text-decoration: none; font-size: .86rem; }
.quick-open,.icon-control { background: none; border: 0; padding: 6px; }
.quick-open kbd { color: #78889b; border: 1px solid var(--yy-border); background: #f8fafc; font-size: .67rem; box-shadow: none; }
.util-divider { height: 22px; border-left: 1px solid var(--yy-border); margin: 0 5px; }
.user-avatar { display: grid; place-items: center; background: #e6efff; color: #245ab8; font-weight: 700; border-radius: 50%; width: 31px; height: 31px; }
.main-panel { max-width: 1780px; padding: 26px clamp(20px,2.5vw,42px) 44px; margin: auto; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 22px; }
.page-heading h1 { font-size: clamp(1.55rem,2.2vw,2rem); line-height: 1.25; letter-spacing: -.03em; font-weight: 700; margin: 0; }
.card { border: 1px solid var(--yy-border); box-shadow: 0 2px 5px rgba(28,48,75,.035); border-radius: 10px; }
.card-header { min-height: 58px; gap: 12px; border-bottom-color: #e7edf4; }
.card-title { color: var(--yy-ink); font-size: 1.02rem; font-weight: 650; margin: 0; }
.table { --tblr-table-border-color: #e9edf3; }
.table thead th { background: #f7f9fc; color: #687a91; font-weight: 600; letter-spacing: 0; font-size: .79rem; }
.table td { vertical-align: middle; }
.table-responsive { border-radius: inherit; }
.btn { min-height: 35px; gap: 7px; border-radius: 6px; }
.btn-primary { --tblr-btn-bg: #2767d5; --tblr-btn-hover-bg: #1c56bb; }
.btn-sm { min-height: 29px; }
.form-label { font-size: .875rem; color: #384b64; }
.form-select,.form-control { border-color: #ced9e6; }
.rail-shade,.menu-toggle { display: none; }
.period-control { margin: 0; position: relative; font-size: .82rem; }
.period-control svg { position: absolute; left: 11px; pointer-events: none; color: var(--yy-muted); }
.period-control select { min-height: 35px; padding-left: 34px; }
.search-dialog { width: min(440px,92vw); max-height: 80vh; padding: 22px; color: var(--yy-ink); border: 1px solid var(--yy-border); border-radius: 12px; box-shadow: 0 16px 55px #1c355633; margin: 12vh auto; }
.search-dialog::backdrop { background: #192d4560; }
.search-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-weight: 650; }
#nav-results { max-height: 44vh; overflow: auto; margin-top: 10px; }
#nav-results a { display: flex; gap: 12px; align-items: center; padding: 9px 8px; color: var(--yy-ink); border-radius: 5px; }
#nav-results a:hover { background: #eff5ff; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }
.metric-card { padding: 18px 20px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-title { color: #4f6279; font-size: .87rem; font-weight: 550; }
.metric-icon,.task-icon { width: 33px; height: 33px; border-radius: 8px; display: inline-grid; place-items: center; flex: none; }
.tone-blue { background: #e8f1ff; color: #2767d5; }
.tone-green { background: #e1f5ee; color: #158567; }
.tone-orange { background: #fff0dd; color: #b96b18; }
.tone-violet { background: #f0ebfe; color: #7957c6; }
.metric-value { color: #172e4a; font-size: clamp(1.43rem,2.05vw,2.1rem); line-height: 1.2; font-weight: 650; letter-spacing: -.035em; font-variant-numeric: tabular-nums; margin: 9px 0; }
.metric-sub { font-size: .76rem; color: var(--yy-muted); }
.metric-sub b { color: #177b64; font-weight: 600; }
.dash-columns { display: grid; grid-template-columns: minmax(0,1.85fr) minmax(250px,1fr); gap: 18px; margin-bottom: 20px; }
.block-head { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; padding: 20px 22px 4px; }
.block-head small,.chart-caption { color: var(--yy-muted); font-size: .78rem; }
.chart-body { padding: 14px 20px 16px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 10px; font-size: .78rem; color: var(--yy-muted); }
.legend-key { display: inline-flex; gap: 7px; align-items: center; }
.legend-key i { width: 10px; height: 3px; border-radius: 2px; }
.chart-wrap { position: relative; }
.chart-wrap canvas { width: 100%; height: 190px; display: block; }
.chart-tip { position:absolute; pointer-events:none; background:#1b2e47; color:white; font-size:.76rem; padding:7px 10px; border-radius:6px; max-width:85%; z-index:3; }
.split-card { overflow: hidden; }
.pool-center { display: flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; width:134px; height:134px; background:white; border-radius:50%; }
.pool-ring { flex:none; width:164px; height:164px; border-radius:50%; background:conic-gradient(#3478e1 0 79.7%,white 79.7% 80.3%,#4cb9ad 80.3% 99.6%,white 99.6%); display:grid;place-items:center; }
.ring-row { display:flex; justify-content:space-evenly;align-items:center;gap:15px; padding:18px 18px 10px;flex:1; }
.pool-center strong { font-size:1.5rem;letter-spacing:-.04em; }
.pool-center span,.split-item small,.task-line small { color:var(--yy-muted);font-size:.78rem; }
.split-item { margin:13px 0; }
.split-item strong { display:block; font-size:1.03rem; font-variant-numeric:tabular-nums; }
.split-item small { display:block; }
.split-footer { display:flex; align-items:center; justify-content:space-between; margin:0 20px; padding:13px 0; border-top:1px solid var(--yy-border); font-size:.8rem; color:var(--yy-muted); }
.task-line { display:flex;align-items:center;gap:11px;min-height:60px;padding:10px 0;border-bottom:1px solid #e9eef5;color:var(--yy-ink);text-decoration:none; }
.task-line:last-child { border-bottom:0; }
.task-line .task-main { flex:1; }
.task-line strong,.task-line small { display:block; }
.task-line b { font-size:1.02rem; }
.ledger-meta { color:var(--yy-muted); font-size:.77rem; }
.money { font-variant-numeric:tabular-nums; white-space:nowrap; }
.login-body { min-height:100vh; background:linear-gradient(120deg,#eaf2ff,#f5f8fb 62%); display:grid;place-items:center;padding:26px; }
.login-card { width:min(435px,100%);padding:32px;box-shadow:0 16px 50px #1c39630f; }
.login-card .brand-home { padding:0 0 25px; }
.login-card h1 { font-size:1.5rem; margin:0 0 23px; }
.login-card .btn { margin-top:6px;min-height:40px; }
@media(max-width:1240px) {
  :root { --yy-rail:202px; }
  .metric-grid { gap:12px; }
  .ring-row { flex-direction:column; padding:12px;gap:4px; }
  .split-legend { display:flex; gap:22px; }
  .split-item { margin:0; }
  .pool-ring { width:122px; height:122px; }
  .pool-center { width:100px; height:100px; }
}
@media(max-width:960px) {
  .side-rail { transform:translateX(-105%);transition:transform .17s; width:220px; }
  .rail-open .side-rail { transform:translateX(0); }
  .rail-open .rail-shade { display:block;position:fixed;inset:0;border:0;background:#20335055;z-index:29; }
  .menu-toggle { display:inline-grid;place-items:center; }
  .work-area { margin-left:0; }
}
@media(max-width:710px) {
  .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dash-columns { grid-template-columns:minmax(0,1fr); }
  .page-heading { align-items:flex-start;flex-wrap:wrap; }
  .main-panel { padding:18px 12px 32px; }
  .utility-bar { padding:0 12px; min-height:53px; }
  .quick-open span,.quick-open kbd { display:none; }
  .ring-row { flex-direction:row; padding:20px; }
  .split-legend { flex-direction:column;gap:8px; }
  .metric-card { padding:12px; }
}
@media print {
  .side-rail,.utility-bar,.dash-controls,.btn,.search-dialog,.rail-shade { display:none!important; }
  .work-area { margin:0; }
  .main-panel { padding:0; }
}
