:root {
  --accent: #4C8DFF;
  --accent-ink: #2F6FE4;
  --accent-soft: #EAF1FF;
  --bg: #F5F6F8;
  --card: #FFFFFF;
  --card-2: #FBFBFD;
  --text: #171A1F;
  --text-2: #4D535C;
  --sub: #9298A2;
  --line: #EEF0F4;
  --line-strong: #E3E6EC;
  --red: #FF5A5F;
  --red-soft: #FFF0F0;
  --green: #16B364;
  --green-soft: #E9F9F0;
  --blue: #3B82F6;
  --orange: #F59F00;
  --shadow: 0 1px 2px rgba(19, 28, 45, .04), 0 8px 24px rgba(19, 28, 45, .035);
  --shadow-lg: 0 12px 48px rgba(10, 20, 40, .18);
  --radius: 16px;
  --radius-lg: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0B0B0C;
  --card: #1C1C1E;
  --card-2: #252528;
  --text: #F2F2F7;
  --text-2: #C7C7CC;
  --sub: #8E8E93;
  --line: #2C2C2E;
  --line-strong: #3A3A3C;
  --accent: #0A84FF;
  --accent-ink: #409CFF;
  --accent-soft: #102A44;
  --red-soft: #2D1B1D;
  --green-soft: #12281F;
  --shadow: 0 1px 2px rgba(0,0,0,.25), 0 10px 30px rgba(0,0,0,.2);
  --shadow-lg: 0 18px 60px rgba(0,0,0,.55);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
html { background: #E9ECF2; overscroll-behavior-y: contain; }
html[data-theme="dark"] { background: #07080A; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
.tx-row, .category-cell, .day-head, .account-row, .menu-row { -webkit-touch-callout: none; }
#app { user-select: none; -webkit-user-select: none; }
input, textarea, .select { user-select: text; -webkit-user-select: text; }
a { color: var(--accent); text-decoration: none; }
input, textarea, select { outline: none; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.ico { display: block; flex: none; }

#app {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  isolation: isolate;
}
@media (min-width: 700px) {
  body { padding: 0; }
  #app {
    min-height: 100vh;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .05), 0 24px 80px rgba(15, 23, 42, .08);
  }
  html[data-theme="dark"] #app { box-shadow: 0 0 0 1px rgba(255,255,255,.05), 0 24px 80px rgba(0,0,0,.4); }
}

.boot-screen {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.boot-logo, .login-logo {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(145deg, #63A0FF, #2F6FE4); color: #fff; font-size: 34px; font-weight: 700;
  box-shadow: 0 12px 26px rgba(76, 141, 255, .3); margin-bottom: 8px;
}
.boot-title { font-size: 20px; font-weight: 700; letter-spacing: .08em; }
.boot-sub { font-size: 12px; color: var(--sub); }

.page { min-height: 100vh; padding-bottom: calc(84px + env(safe-area-inset-bottom)); animation: pageIn .22s ease both; }
.page.no-tab { padding-bottom: 0; }
@keyframes pageIn { from { opacity: .55; } to { opacity: 1; } }

/* top bar */
.topbar {
  height: calc(54px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 10px 0;
  display: flex; align-items: center; position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
}
.topbar.center-title .topbar-title {
  position: absolute; left: 50%; transform: translateX(-50%); font-size: 16px; font-weight: 650; white-space: nowrap;
}
.topbar-title { font-size: 16px; font-weight: 650; }
.topbar-side { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text);
  transition: background .15s, transform .12s;
}
.icon-btn:active { transform: scale(.92); background: var(--line); }
.icon-btn.soft { background: var(--card); box-shadow: var(--shadow); }
.month-btn {
  display: flex; align-items: center; gap: 3px; height: 40px; padding: 0 8px; border-radius: 12px;
  font-weight: 650; font-size: 16px; letter-spacing: .01em; color: var(--text);
}
.month-btn .ico { color: var(--sub); }
.month-btn:active { background: var(--line); }

.content { padding-bottom: 8px; animation: contentIn .2s cubic-bezier(.22,1,.36,1); }
@keyframes contentIn { from { opacity: .58; transform: translateX(5px); } to { opacity: 1; transform: none; } }

/* hero */
.hero {
  position: relative; height: 188px; margin: 4px 12px 0; border-radius: 20px; overflow: hidden;
  color: #fff; box-shadow: 0 10px 30px rgba(30, 41, 59, .16); background: #4E6173;
  display: flex; flex-direction: column; justify-content: space-between; padding: 16px 18px 15px;
  isolation: isolate;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(7, 16, 26, .34) 0%, rgba(7, 16, 26, .06) 38%, rgba(7, 16, 26, .48) 100%);
}
.cover-art { position: absolute; inset: 0; z-index: -1; background: linear-gradient(150deg, #3B5063 0%, #73889A 48%, #B9C6CE 100%); }
.cover-art i { position: absolute; display: block; }
.cover-art .sun { width: 62px; height: 62px; border-radius: 50%; right: 44px; top: 30px; background: rgba(255, 236, 198, .68); filter: blur(2px); }
.cover-art .m1 { width: 150%; height: 78%; left: -20%; bottom: -16%; background: linear-gradient(150deg, #273847, #455A6D 60%, #5D7081); clip-path: polygon(0 76%, 18% 40%, 30% 55%, 48% 20%, 65% 57%, 78% 36%, 100% 72%, 100% 100%, 0 100%); }
.cover-art .m2 { width: 140%; height: 54%; right: -30%; bottom: -10%; background: linear-gradient(150deg, #4C6274, #7B8F9D); opacity: .86; clip-path: polygon(0 80%, 22% 52%, 38% 66%, 58% 28%, 72% 50%, 88% 38%, 100% 62%, 100% 100%, 0 100%); }
.cover-art .m3 { width: 120%; height: 28%; left: -10%; bottom: -2%; background: rgba(16, 30, 43, .55); clip-path: polygon(0 58%, 20% 30%, 40% 62%, 66% 18%, 84% 50%, 100% 38%, 100% 100%, 0 100%); }
.cover-sea .cover-art { background: linear-gradient(160deg, #1E5E7A 0%, #52A6BE 46%, #CBE8EA 100%); }
.cover-sea .cover-art .m1, .cover-sea .cover-art .m2 { display: none; }
.cover-sea .cover-art .m3 { background: rgba(9, 66, 84, .5); clip-path: polygon(0 72%, 20% 62%, 40% 74%, 62% 60%, 82% 73%, 100% 64%, 100% 100%, 0 100%); }
.cover-dusk .cover-art { background: linear-gradient(155deg, #2B2440 0%, #6C4A67 42%, #E2A07D 78%, #F4CD9B 100%); }
.cover-dusk .cover-art .sun { background: rgba(255, 218, 164, .9); }
.cover-forest .cover-art { background: linear-gradient(150deg, #173C33 0%, #3B6B52 52%, #A8C3A0 100%); }
.cover-paper .cover-art { background: linear-gradient(150deg, #E8E2D6, #EEE9E0 50%, #D9D2C4); }
.cover-paper::after { background: linear-gradient(180deg, rgba(60,50,35,.12), rgba(60,50,35,.22)); }
.cover-paper .hero-label, .cover-paper .hero-foot { color: #5C5142; }
.cover-paper .hero-amount { color: #3F372C; }

.hero-top { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; }
.book-pill {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 5px 9px; border-radius: 20px;
  background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(8px);
}
.hero-main { position: relative; z-index: 1; }
.hero-label { font-size: 12px; color: rgba(255,255,255,.82); letter-spacing: .04em; display: flex; align-items: center; gap: 5px; }
.hero-amount { font-size: 34px; line-height: 1.16; font-weight: 680; letter-spacing: -.02em; margin-top: 3px; font-variant-numeric: tabular-nums; }
.hero-foot { position: relative; z-index: 1; display: flex; gap: 18px; font-size: 12px; color: rgba(255,255,255,.9); }
.hero-foot b { font-weight: 600; font-size: 12px; margin-left: 2px; }
.hero-foot .sep { width: 1px; background: rgba(255,255,255,.24); }

/* official-style home */
.official-home { background: var(--bg); padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.home-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  height: calc(56px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0;
  display: flex; align-items: center; color: #fff;
}
.home-icon { width: 40px; height: 40px; display: grid; place-items: center; color: #fff; border-radius: 12px; }
.home-icon:active { background: rgba(255,255,255,.12); }
.home-month {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 5px;
  color: #fff; font-size: 16px; font-weight: 650; letter-spacing: .01em;
  height: 40px; padding: 0 4px;
}
.home-actions { margin-left: auto; display: flex; align-items: center; gap: 1px; }
.home-cover { position: relative; height: 258px; overflow: hidden; color: #fff; isolation: isolate; }
.home-cover .cover-art { z-index: 0; }
.home-cover::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.34) 0%, rgba(0,0,0,.02) 34%, rgba(0,0,0,.62) 100%);
}
.home-cover-body { position: absolute; left: 18px; right: 18px; bottom: 20px; z-index: 2; }
.home-spend-label { font-size: 12px; color: rgba(255,255,255,.72); margin-bottom: 2px; }
.home-spend { font-size: 42px; line-height: 1.06; font-weight: 720; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.home-sum-row { display: flex; gap: 20px; margin-top: 12px; font-size: 12px; color: rgba(255,255,255,.7); }
.home-sum-row b { color: rgba(255,255,255,.94); font-weight: 550; margin-left: 3px; }
.official-content { padding: 4px 0 0; background: var(--bg); }
.recent-card { margin: 10px 10px 10px; padding: 14px 14px 10px; border-radius: 14px; background: var(--card); border: none; box-shadow: none; }
.recent-head { display: flex; align-items: flex-start; justify-content: space-between; }
.recent-title { font-size: 15px; font-weight: 650; }
.recent-sub { color: var(--sub); font-size: 11px; margin-top: 3px; }
.recent-more { width: 32px; height: 28px; display: grid; place-items: center; color: var(--sub); }
.recent-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-top: 8px; }
.recent-col { min-width: 0; display: flex; flex-direction: column; align-items: center; }
.recent-amount { height: 18px; font-size: 9px; color: #FF6B6B; font-variant-numeric: tabular-nums; }
.recent-bar-wrap { height: 72px; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.recent-bar { width: 6px; border-radius: 4px; background: #FF6B6B; }
.recent-day { margin-top: 7px; font-size: 10px; color: var(--sub); }
.recent-col.today .recent-day { color: #0A84FF; }
.official-day { margin: 0 10px 10px; border-radius: 14px; background: var(--card); border: none; box-shadow: none; }
.official-day .day-head { padding: 15px 16px 10px; }
.official-day .day-date b { font-size: 15px; font-weight: 650; }
.official-day .day-date span { font-size: 10px; margin-left: 5px; color: var(--sub); }
.official-day .day-totals { font-size: 11px; gap: 7px; }
.official-day .day-totals .expense { color: var(--text-2); }
.official-day .day-totals .income { color: var(--green); }
.official-tx { gap: 9px; padding: 12px 16px; border-top: 1px solid var(--line); }
.official-tx .tx-dot { width: 5px; height: 5px; border-radius: 50%; flex: none; margin: 0 2px 0 1px; }
.official-tx .tx-main { min-width: 0; }
.official-tx .tx-title { font-size: 15px; font-weight: 450; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.official-tx .tx-sub { color: var(--sub); font-size: 10px; font-weight: 400; }
.official-tx .tx-note { font-size: 10px; color: var(--sub); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.official-tx .tx-side { margin-left: auto; text-align: right; flex: none; }
.official-tx .tx-amount { font-size: 15px; font-weight: 450; font-variant-numeric: tabular-nums; }
.official-tx .tx-account { font-size: 10px; color: var(--sub); margin-top: 4px; }
.official-tx .mini-badge { transform: scale(.9); transform-origin: left center; }
.official-empty { margin: 10px; background: var(--card); border: none; }
.home-fab {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 40; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: #0A84FF;
  box-shadow: 0 8px 24px rgba(10,132,255,.34);
}
.home-fab:active { transform: translateX(-50%) scale(.94); }

/* official-style assets */
.official-assets { background: var(--bg); padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.asset-top { height: calc(54px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 10px 0; display: flex; align-items: center; justify-content: space-between; }
.asset-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--text); border-radius: 12px; }
.asset-icon:active { background: var(--card-2); }
.asset-content { padding: 0 10px; }
.asset-overview { text-align: center; padding: 8px 0 18px; }
.asset-net-label { display: inline-flex; align-items: center; gap: 6px; color: var(--sub); font-size: 12px; }
.asset-net-label button { color: var(--sub); display: inline-flex; }
.asset-net-big { font-size: 36px; font-weight: 700; letter-spacing: -.03em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.asset-two { display: grid; grid-template-columns: 1fr 1fr; margin-top: 24px; }
.asset-two div { display: flex; flex-direction: column; gap: 6px; }
.asset-two span { font-size: 11px; color: var(--sub); }
.asset-two b { font-size: 16px; font-weight: 550; }
.asset-two div:last-child b { color: var(--red); }
.official-assets .account-group { margin: 0 0 10px; border-radius: 14px; background: var(--card); border: none; box-shadow: none; }
.official-assets .group-head { padding: 14px 15px 8px; }
.official-assets .group-head .name { font-size: 13px; color: var(--sub); }
.official-assets .group-head .sum { font-size: 13px; color: var(--text-2); }
.official-assets .account-row { padding: 12px 15px; gap: 12px; }
.official-assets .account-row .cat-icon { width: 34px; height: 34px; border-radius: 50%; }
.official-assets .account-name { font-size: 15px; }
.official-assets .account-meta { font-size: 10px; margin-top: 3px; }
.official-assets .account-value { font-size: 15px; font-weight: 450; }
.official-assets .credit-line { display: none; }
.asset-fab {
  position: fixed; right: 20px; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 40;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: #0A84FF; box-shadow: 0 8px 24px rgba(10,132,255,.35);
}
.asset-fab .ico { transform: rotate(90deg); }

/* official-style drawer */
.official-drawer { background: var(--card); padding: calc(30px + env(safe-area-inset-top)) 18px 24px; }
.drawer-profile { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; margin-bottom: 28px; }
.drawer-avatar {
  width: 58px; height: 58px; border-radius: 50%; flex: none; display: grid; place-items: center;
  color: #fff; font-size: 24px; font-weight: 650;
  background: linear-gradient(145deg, #5C7CFA, #22B8CF 60%, #51CF66);
}
.drawer-profile-main { min-width: 0; }
.drawer-profile .drawer-name { color: var(--text); font-size: 18px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.drawer-profile .drawer-name i { font-style: normal; font-size: 9px; font-weight: 500; color: #0A84FF; background: rgba(10,132,255,.14); border-radius: 4px; padding: 2px 4px; }
.drawer-profile .drawer-sub { color: var(--sub); font-size: 11px; margin-top: 4px; }
.drawer-links { display: flex; flex-direction: column; }
.drawer-links .drawer-item {
  display: flex; align-items: center; gap: 14px; height: 54px; padding: 0 2px;
  color: var(--text); font-size: 15px; text-align: left; border-radius: 10px;
}
.drawer-links .drawer-item:active { background: var(--card-2); }
.drawer-links .drawer-item .ico { color: var(--sub); }
.drawer-links .drawer-item span { flex: 1; }
.drawer-links .drawer-item em { font-style: normal; color: var(--sub); font-size: 11px; }



.card {
  background: var(--card); border-radius: var(--radius); margin: 12px; padding: 16px;
  box-shadow: var(--shadow);
}
.card.tight { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-title { font-size: 14px; font-weight: 650; letter-spacing: .01em; }
.card-sub { font-size: 11px; color: var(--sub); margin-top: 2px; }
.more-btn { color: var(--sub); width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.more-btn:active { background: var(--line); }

.budget-card { margin-top: 10px; }
.budget-meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; font-size: 10.5px; color: var(--sub); }
.budget-meta b { font-weight: 600; color: var(--text-2); font-size: 11px; }
.budget-meta .total { text-align: right; }
.progress { height: 8px; border-radius: 20px; background: var(--line); overflow: hidden; margin-top: 13px; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .45s cubic-bezier(.2,.8,.2,1); }
.progress.warn > i { background: var(--orange); }
.progress.over > i { background: var(--red); }
.progress.thin { height: 5px; margin-top: 7px; }
.progress.blue > i { background: var(--accent); }

.week-card { padding-bottom: 12px; }
.reimburse-strip { display: flex; align-items: center; gap: 10px; width: calc(100% - 24px); margin: 10px 12px 0; padding: 10px 14px; text-align: left; color: var(--text); }
.reimburse-strip:active { background: var(--card-2); }
.reimburse-strip .rs-label { flex: 1; font-size: 12px; }
.reimburse-strip .rs-label b { color: var(--orange); font-weight: 650; margin-left: 3px; }
.reimburse-strip .rs-arrow { color: var(--line-strong); }
.week-total { font-size: 12px; color: var(--text-2); margin-top: 2px; font-weight: 600; }
.week-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 18px; align-items: end; }
.week-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 118px; gap: 3px; }
.week-amount { font-size: 9px; color: var(--red); height: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.week-bar-wrap { height: 88px; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.week-bar { width: 8px; min-height: 2px; border-radius: 6px; background: #FF6B6B; transition: height .5s cubic-bezier(.2,.8,.2,1); }
.week-col.today .week-bar { background: var(--accent); }
.week-day { font-size: 10px; color: var(--sub); }
.week-col.today .week-day { color: var(--accent); font-weight: 650; }

/* transaction list */
.tx-section-title { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px 2px; color: var(--sub); font-size: 11px; }
.batch-link { margin-left: 8px; color: var(--accent); font-size: 11px; font-weight: 600; padding: 2px 4px; }
.tx-check { width: 21px; height: 21px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; color: #fff; }
.tx-check.on { background: var(--accent); border-color: var(--accent); }
.tx-row.selected { background: var(--accent-soft); }
.tx-row.selected .tx-title { color: var(--accent); }
.batch-bar {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 45;
  display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 16px;
  background: rgba(23, 28, 37, .94); color: #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, .24);
  backdrop-filter: blur(14px);
}
.batch-bar button { color: #fff; font-size: 11px; display: inline-flex; align-items: center; gap: 4px; }
.batch-bar .batch-close { color: rgba(255, 255, 255, .7); padding: 6px 4px; }
.batch-bar .batch-count { flex: 1; justify-content: center; font-size: 12px; }
.batch-bar .batch-count b { color: var(--accent); margin-left: 2px; }
.batch-bar .batch-act { padding: 8px 10px; border-radius: 9px; background: rgba(255, 255, 255, .1); }
.batch-bar .batch-act.danger { color: #FF8A8E; }
.batch-bar .batch-act:disabled { opacity: .4; }

.plan-tabs { display: flex; gap: 6px; margin: 4px 14px 10px; padding: 3px; border-radius: 12px; background: var(--card-2); }
.plan-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 34px; border-radius: 9px; color: var(--sub); font-size: 12px; }
.plan-tabs button.active { background: var(--card); color: var(--text); font-weight: 650; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.plan-summary { margin: 4px 14px 12px; padding: 17px 16px; border-radius: 18px; background: linear-gradient(135deg, #27364A, #172231); color: #fff; }
.plan-sum-label { font-size: 11px; color: rgba(255,255,255,.65); }
.plan-sum-value { font-size: 30px; font-weight: 750; letter-spacing: -.5px; margin-top: 3px; }
.plan-sum-sub { font-size: 10px; color: rgba(255,255,255,.55); margin-top: 4px; }
.plan-card { margin: 0 12px 10px; padding: 14px 15px; }
.plan-head { display: flex; align-items: center; gap: 9px; }
.plan-head .plan-name { flex: 1; font-size: 14px; font-weight: 650; min-width: 0; }
.plan-head .plan-name span { display: block; font-size: 10px; color: var(--sub); font-weight: 400; margin-top: 2px; }
.plan-amount { display: flex; align-items: baseline; gap: 5px; margin-top: 10px; }
.plan-amount b { font-size: 22px; font-weight: 750; letter-spacing: -.3px; }
.plan-amount span { font-size: 10px; color: var(--sub); }
.plan-progress { height: 6px; border-radius: 4px; background: var(--card-2); overflow: hidden; margin: 9px 0 7px; }
.plan-progress i { display: block; height: 100%; border-radius: 4px; background: #16B364; transition: width .3s; }
.plan-meta { display: flex; justify-content: space-between; color: var(--sub); font-size: 10px; }
.plan-actions { display: flex; gap: 7px; margin-top: 12px; }
.plan-primary { flex: 1; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 650; }
.plan-ghost { height: 36px; padding: 0 12px; border-radius: 10px; background: var(--card-2); color: var(--text-2); font-size: 12px; }
.day-group { padding: 0; overflow: hidden; margin-bottom: 10px; }
.day-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; gap: 8px; cursor: pointer; }
.day-head:active { background: var(--card-2); }
.day-date { display: flex; align-items: baseline; gap: 7px; }
.day-date b { font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.day-date span { font-size: 11px; color: var(--sub); }
.day-totals { display: flex; gap: 9px; font-size: 10.5px; color: var(--sub); font-variant-numeric: tabular-nums; }
.day-totals b { color: var(--text-2); font-weight: 600; }
.tx-row { display: flex; align-items: center; gap: 11px; padding: 10px 16px; border-top: 1px solid var(--line); transition: background .12s; cursor: pointer; }
.tx-row:active { background: var(--card-2); }
.cat-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, currentColor 13%, transparent); }
.cat-icon.lg { width: 44px; height: 44px; border-radius: 14px; }
.cat-icon.sm { width: 30px; height: 30px; border-radius: 10px; }
.tx-main { flex: 1; min-width: 0; }
.tx-title { display: flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 550; line-height: 1.35; }
.tx-note { font-size: 11px; color: var(--sub); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-amount { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.01em; }
.tx-amount.expense { color: var(--red); }
.tx-amount.income { color: var(--green); }
.tx-amount.transfer { color: var(--blue); }
.mini-badge {
  display: inline-flex; align-items: center; height: 16px; padding: 0 5px; border-radius: 5px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 9px; font-weight: 600; flex: none;
}
.mini-badge.red { background: var(--red-soft); color: var(--red); }
.mini-badge.gray { background: var(--line); color: var(--sub); }
[data-theme="dark"] .mini-badge { color: var(--accent); }

.empty { padding: 42px 20px; text-align: center; color: var(--sub); }
.empty .empty-icon { width: 58px; height: 58px; border-radius: 20px; margin: 0 auto 12px; background: var(--line); display: grid; place-items: center; color: var(--sub); }
.empty h3 { margin: 0 0 5px; font-size: 14px; color: var(--text-2); font-weight: 600; }
.empty p { margin: 0; font-size: 11px; line-height: 1.7; }
.empty .btn { margin-top: 14px; }

/* buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 38px; padding: 0 14px; border-radius: 11px; font-size: 12.5px; font-weight: 600; background: var(--line); color: var(--text-2); transition: transform .12s, opacity .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.ghost { background: transparent; border: 1px solid var(--line-strong); }
.btn.block { width: 100%; }
.btn.sm { height: 30px; border-radius: 9px; padding: 0 10px; font-size: 11px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.primary-btn { width: 100%; height: 46px; border-radius: 13px; background: var(--accent); color: #fff; font-weight: 650; font-size: 14px; box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 24%, transparent); }
.primary-btn:active { transform: scale(.99); }
.ghost-btn { width: 100%; height: 44px; border-radius: 13px; border: 1px solid var(--line-strong); color: var(--text-2); font-weight: 600; }

.field { margin-bottom: 14px; }
.field > label, .field-label { display: block; font-size: 11px; color: var(--sub); margin-bottom: 6px; font-weight: 550; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; border: 1px solid var(--line-strong); background: var(--card-2);
  border-radius: 12px; padding: 10px 12px; font-size: 14px; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.textarea { min-height: 76px; resize: vertical; }
.input-row { display: flex; gap: 10px; }
.input-row > * { flex: 1; }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 42px; }
.input-suffix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--sub); font-size: 12px; }
.help { font-size: 10.5px; color: var(--sub); line-height: 1.6; margin-top: 6px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.switch-row .label { font-size: 13px; font-weight: 550; }
.switch-row .desc { font-size: 10.5px; color: var(--sub); margin-top: 3px; }
.switch { width: 46px; height: 27px; border-radius: 20px; background: var(--line-strong); position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; width: 23px; height: 23px; border-radius: 50%; background: #fff; top: 2px; left: 2px; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: transform .2s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(19px); }

.segmented { display: inline-flex; background: var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.segmented button { height: 28px; padding: 0 14px; border-radius: 8px; font-size: 12px; color: var(--sub); font-weight: 550; }
.segmented button.active { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); font-weight: 650; }
[data-theme="dark"] .segmented button.active { background: #2B3039; }
.segmented.fill { display: flex; width: 100%; }
.segmented.fill button { flex: 1; }

/* tabbar */
.tabbar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 560px;
  height: calc(62px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--card) 94%, transparent); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 92px 1fr; align-items: center; z-index: 40;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.tab { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--sub); font-size: 10px; }
.tab.active { color: var(--accent); }
.tab span { font-weight: 550; }
.fab-slot { position: relative; height: 100%; display: grid; place-items: center; }
.fab {
  position: absolute; top: -23px; width: 54px; height: 54px; border-radius: 50%;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 42%, transparent), 0 2px 6px rgba(0,0,0,.1);
  border: 4px solid var(--bg); transition: transform .15s;
}
.fab:active { transform: scale(.92); }
.fab .ico { stroke-width: 2.2; }

/* drawer */
.drawer-mask { position: fixed; inset: 0; z-index: 80; background: rgba(8, 12, 20, .38); opacity: 0; pointer-events: none; transition: opacity .22s; }
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: absolute; top: 0; left: 0; bottom: 0; width: min(82vw, 314px); background: var(--card);
  transform: translateX(-102%); transition: transform .26s cubic-bezier(.22,1,.36,1);
  display: flex; flex-direction: column; padding: calc(18px + env(safe-area-inset-top)) 16px calc(14px + env(safe-area-inset-bottom));
  overflow-y: auto; box-shadow: 12px 0 40px rgba(6,12,24,.18);
}
.drawer-mask.open .drawer { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 4px 2px 16px; }
.avatar { width: 48px; height: 48px; border-radius: 15px; background: linear-gradient(145deg, #6FA7FF, #3B78E7); color: #fff; display: grid; place-items: center; font-size: 18px; font-weight: 700; box-shadow: 0 6px 16px rgba(59,120,231,.24); flex: none; }
.avatar.small { width: 36px; height: 36px; border-radius: 11px; font-size: 14px; }
.drawer-name { font-size: 16px; font-weight: 680; }
.drawer-sub { font-size: 10.5px; color: var(--sub); margin-top: 3px; }
.book-switch { width: 100%; height: 38px; border-radius: 11px; background: var(--card-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 11px; font-size: 11.5px; color: var(--text-2); margin-bottom: 14px; }
.drawer-section { font-size: 10px; color: var(--sub); padding: 10px 6px 5px; letter-spacing: .06em; }
.drawer-item { display: flex; align-items: center; gap: 11px; height: 44px; padding: 0 8px; border-radius: 11px; color: var(--text-2); font-size: 13px; width: 100%; text-align: left; }
.drawer-item:active { background: var(--line); }
.drawer-item .ico { color: var(--sub); }
.drawer-item .badge { margin-left: auto; font-size: 10px; color: var(--sub); }
.drawer-item .chev { margin-left: auto; color: var(--line-strong); }
.drawer-spacer { flex: 1; min-height: 18px; }
.drawer-footer { border-top: 1px solid var(--line); padding-top: 12px; font-size: 10px; color: var(--sub); line-height: 1.7; }

/* bottom sheet */
.sheet-mask { position: fixed; inset: 0; z-index: 100; background: rgba(8, 12, 20, .42); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .18s ease; }
.sheet {
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; background: var(--card);
  border-radius: 22px 22px 0 0; padding: 8px 18px calc(20px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lg); animation: sheetUp .26s cubic-bezier(.22,1,.36,1);
}
.sheet-grabber { width: 36px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 4px auto 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-title { font-size: 16px; font-weight: 680; }
.sheet-actions { display: flex; gap: 9px; margin-top: 18px; }
.sheet-actions > * { flex: 1; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px);
  background: rgba(23, 28, 37, .92); color: #fff; font-size: 12px; padding: 10px 16px; border-radius: 12px;
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: 82vw; text-align: center;
  backdrop-filter: blur(10px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.sync-bar {
  position: fixed; left: 50%; bottom: calc(74px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 55; padding: 5px 10px; border-radius: 20px; font-size: 10px; font-weight: 550;
  background: rgba(23, 28, 37, .88); color: #fff; backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(0,0,0,.14); pointer-events: none; white-space: nowrap;
}
.sync-bar.offline { background: rgba(80, 86, 96, .92); }
.sync-bar.pending { background: color-mix(in srgb, var(--accent) 92%, #000); }
.sync-bar.syncing { background: rgba(23, 28, 37, .9); }
body:has(.add-page) .sync-bar { display: none !important; }

.pull-refresh {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 8px); z-index: 70;
  transform: translate(-50%, -34px); opacity: 0; pointer-events: none;
  padding: 5px 11px; border-radius: 20px; background: rgba(23, 28, 37, .84); color: #fff;
  font-size: 10px; transition: opacity .12s, transform .12s;
}
.pull-refresh.show { opacity: 1; transform: translate(-50%, 0); }

/* add page */
.add-page { height: 100dvh; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }
.add-top {
  height: calc(54px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 10px 0;
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; background: var(--card);
  border-bottom: 1px solid var(--line); flex: none;
}
.add-tabs { display: flex; height: 100%; align-items: stretch; justify-content: center; gap: 18px; }
.add-tab { position: relative; padding: 0 4px; font-size: 15px; color: var(--sub); font-weight: 550; display: flex; align-items: center; }
.add-tab.active { color: var(--text); font-weight: 680; }
.add-tab.active::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; width: 22px; height: 3px; border-radius: 3px; background: var(--accent); }
.add-tab.income.active::after { background: var(--green); }
.add-tab.transfer.active::after { background: var(--blue); }
.category-pane { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 12px 10px 8px; }
.category-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px 2px; }
.category-cell { height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 5px; border-radius: 12px; padding-top: 3px; color: var(--text-2); transition: background .12s; position: relative; }
.category-cell:active { background: var(--line); }
.category-cell.active .cat-icon { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.category-cell.active .cat-name { color: var(--accent); font-weight: 650; }
.cat-sub-dot { position: absolute; right: 9px; top: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); opacity: .55; }
.subcat-panel { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 9px 14px 11px; border-top: 1px solid var(--line); position: sticky; top: 0; z-index: 2; background: var(--card); }
.subcat-label { font-size: 10px; color: var(--sub); margin-right: 2px; }
.subcat-chip { padding: 6px 10px; border-radius: 8px; background: var(--card-2); color: var(--text-2); font-size: 11px; }
.subcat-chip.active { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.cat-name { font-size: 10.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-icon.add { border: 1px dashed var(--line-strong); color: var(--sub); background: transparent; }

.transfer-pane { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 28px 22px; }
.transfer-account { background: var(--card); border-radius: 16px; padding: 18px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow); }
.transfer-account .placeholder { color: var(--sub); font-size: 14px; }
.transfer-account .name { font-size: 15px; font-weight: 650; }
.transfer-account .bal { font-size: 11px; color: var(--sub); margin-top: 3px; }
.transfer-arrow { display: flex; align-items: center; justify-content: center; color: var(--sub); height: 24px; }
.transfer-tip { text-align: center; font-size: 11px; color: var(--sub); margin-top: 10px; }

.add-fields { flex: none; padding: 9px 14px 7px; background: var(--card); border-top: 1px solid var(--line); }
.account-note-row { display: flex; align-items: center; gap: 8px; }
.account-pill {
  height: 32px; border-radius: 20px; background: var(--card-2); border: 1px solid var(--line-strong);
  padding: 0 10px; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-2); white-space: nowrap; max-width: 44%; overflow: hidden;
}
.account-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.note-input { border: 0; background: transparent; flex: 1; min-width: 0; text-align: right; font-size: 12.5px; color: var(--text); height: 32px; }
.note-input::placeholder { color: var(--sub); }
.amount-row { display: flex; align-items: flex-end; gap: 7px; margin-top: 8px; min-height: 52px; }
.chip {
  height: 29px; padding: 0 10px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line-strong);
  display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--text-2); white-space: nowrap;
}
.chip.active { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
[data-theme="dark"] .chip.active { color: var(--accent); }
.chip-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-bottom: 6px; }
.amount-box { margin-left: auto; text-align: right; padding-bottom: 1px; }
.amount-expr { font-size: 10px; color: var(--sub); min-height: 12px; font-variant-numeric: tabular-nums; }
.amount-value { font-size: 31px; line-height: 1.05; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.amount-value.expense { color: var(--red); }
.amount-value.income { color: var(--green); }
.amount-value.transfer { color: var(--blue); }
.keypad { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); height: 240px; background: var(--line); gap: 1px; border-top: 1px solid var(--line); }
.key { background: var(--card); display: grid; place-items: center; font-size: 21px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; transition: background .1s; }
.key:active { background: var(--card-2); }
.key.fn { font-size: 12px; color: var(--text-2); font-weight: 550; }
.key.save { background: var(--red); color: #fff; font-size: 15px; font-weight: 650; }
.key.save[disabled] { opacity: .55; }
.key.save.income, .key.save.transfer { background: var(--blue); }
.key.save:active { filter: brightness(.94); }
.key .ico { stroke-width: 1.7; }
@media (max-height: 700px) {
  .category-cell { height: 62px; }
  .cat-icon { width: 36px; height: 36px; border-radius: 11px; }
  .keypad { height: 214px; }
  .amount-value { font-size: 27px; }
}
@media (max-height: 620px) {
  .category-cell { height: 56px; }
  .keypad { height: 188px; }
  .key { font-size: 18px; }
  .add-fields { padding-top: 6px; }
}

/* assets */
.asset-hero { text-align: center; padding: 20px 16px 18px; }
.asset-label { font-size: 11px; color: var(--sub); letter-spacing: .08em; }
.asset-net { font-size: 33px; font-weight: 680; letter-spacing: -.02em; margin: 5px 0 16px; font-variant-numeric: tabular-nums; }
.asset-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-top: 1px solid var(--line); padding-top: 13px; }
.asset-split div { font-size: 11px; color: var(--sub); }
.asset-split b { display: block; color: var(--text); font-size: 15px; font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; }
.asset-split .neg b { color: var(--red); }
.asset-analysis .row { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--sub); margin-top: 9px; }
.asset-analysis .row b { color: var(--text-2); font-weight: 600; }
.asset-bar { display: flex; height: 6px; border-radius: 6px; overflow: hidden; background: var(--line); margin-top: 14px; gap: 2px; }
.asset-bar i { display: block; height: 100%; }
.asset-bar .asset { background: var(--accent); border-radius: 6px 0 0 6px; }
.asset-bar .debt { background: var(--red); border-radius: 0 6px 6px 0; }
.borrow-grid { display: grid; grid-template-columns: 1fr 1fr; }
.borrow-item { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.borrow-item + .borrow-item { border-left: 1px solid var(--line); }
.borrow-item .label { font-size: 10.5px; color: var(--sub); }
.borrow-item b { display: block; font-size: 14px; margin-top: 3px; font-weight: 650; font-variant-numeric: tabular-nums; }
.account-group { padding: 0; overflow: hidden; }
.account-swipe { position: relative; overflow: hidden; }
.account-swipe .account-row { position: relative; z-index: 1; background: var(--card); transition: transform .18s cubic-bezier(.22,1,.36,1); }
.account-swipe.open .account-row { transform: translateX(-112px); }
.account-actions { position: absolute; inset: 0 0 0 auto; width: 112px; display: flex; z-index: 0; }
.account-actions button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; color: #fff; background: #8A94A6; }
.account-actions button.hide { background: #FF7A45; }
.account-actions button:active { filter: brightness(.9); }
.hidden-toggle { display: flex; align-items: center; gap: 4px; margin: 14px auto 0; color: var(--sub); font-size: 11px; padding: 8px; }
.hidden-list { margin-top: 8px; padding: 0 14px; }
.hidden-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.hidden-row:last-child { border-bottom: 0; }
.hidden-empty { text-align: center; color: var(--sub); font-size: 11px; padding: 10px 0 20px; }
.mini-btn { padding: 6px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; }
.group-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 9px; }
.group-head .name { font-size: 13px; font-weight: 650; }
.group-head .sum { font-size: 12px; color: var(--sub); font-weight: 600; font-variant-numeric: tabular-nums; }
.account-row { display: flex; align-items: center; gap: 11px; padding: 11px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.account-row:active { background: var(--card-2); }
.account-main { flex: 1; min-width: 0; }
.account-name { font-size: 13.5px; font-weight: 550; }
.account-meta { font-size: 10px; color: var(--sub); margin-top: 3px; display: flex; gap: 6px; align-items: center; }
.account-value { text-align: right; font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.account-value.neg { color: var(--red); }
.account-value .sub { display: block; font-size: 9.5px; color: var(--sub); font-weight: 400; margin-top: 3px; }
.credit-line { height: 4px; border-radius: 4px; background: var(--line); margin-top: 6px; overflow: hidden; width: 100%; }
.credit-line i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.credit-line i.warn { background: var(--orange); }
.credit-line i.over { background: var(--red); }

/* reports */
.report-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 16px 8px; }
.report-switch { display: flex; align-items: center; gap: 7px; }
.report-date { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 2px 16px 8px; }
.report-date .date { font-size: 15px; font-weight: 650; min-width: 106px; text-align: center; }
.report-date .icon-btn { width: 32px; height: 32px; }
.report-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 12px 12px; }
.report-summary .item { background: var(--card); border-radius: 13px; padding: 11px 8px; text-align: center; box-shadow: var(--shadow); }
.report-summary .label { font-size: 9.5px; color: var(--sub); }
.report-summary .val { font-size: 13px; font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; }
.report-summary .val.red { color: var(--red); }
.report-summary .val.green { color: var(--green); }
.chart-wrap { margin-top: 10px; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-svg text { font-family: var(--font); font-size: 8px; fill: var(--sub); }
.chart-svg .grid-line { stroke: var(--line); stroke-width: 1; }
.chart-svg .bar { transition: opacity .15s; cursor: pointer; }
.chart-svg .bar:hover { opacity: .8; }
.chart-callout { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--sub); margin-top: 6px; min-height: 16px; }
.chart-callout b { color: var(--text-2); }
.chart-empty { height: 150px; display: grid; place-items: center; color: var(--sub); font-size: 11px; }
.donut-wrap { display: flex; flex-direction: column; align-items: center; padding: 10px 0 2px; }
.donut { width: 176px; height: 176px; border-radius: 50%; position: relative; transform: rotate(-90deg); }
.donut::after { content: ""; position: absolute; inset: 29px; background: var(--card); border-radius: 50%; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(90deg); z-index: 1; }
.donut-center span { font-size: 10px; color: var(--sub); }
.donut-center b { font-size: 16px; font-weight: 680; margin-top: 2px; font-variant-numeric: tabular-nums; }
.cat-breakdown { margin-top: 8px; }
.cat-line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.cat-line:first-child { border-top: 0; }
.cat-line .main { flex: 1; min-width: 0; }
.cat-line .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.cat-line .name { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-line .pct { color: var(--sub); font-size: 10px; margin-left: 4px; }
.cat-line .amount { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cat-line .bar { height: 4px; border-radius: 4px; background: var(--line); margin-top: 6px; overflow: hidden; }
.cat-line .bar i { display: block; height: 100%; border-radius: inherit; }

/* calendar */
.calendar-card { margin: 4px 12px 12px; padding: 12px 10px 10px; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-weekdays div { text-align: center; font-size: 9.5px; color: var(--sub); padding: 6px 0; }
.cal-cell { min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; border-radius: 10px; padding-top: 4px; }
.cal-cell.empty { visibility: hidden; }
.cal-cell .d { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.cal-cell .a { font-size: 7.5px; color: var(--red); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cal-cell.today .d { background: var(--accent); color: #fff; font-weight: 650; }
.cal-cell.selected .d { box-shadow: 0 0 0 1.5px var(--accent); color: var(--accent); font-weight: 650; }
.cal-cell.selected.today .d { color: #fff; box-shadow: none; }
.cal-cell.has-data .a { font-weight: 550; }

/* settings */
.profile-card { display: flex; align-items: center; gap: 13px; }
.profile-card .name { font-size: 17px; font-weight: 680; }
.profile-card .sub { font-size: 10.5px; color: var(--sub); margin-top: 4px; }
.menu-card { padding: 4px 0; overflow: hidden; }
.menu-row { display: flex; align-items: center; gap: 11px; padding: 12px 15px; width: 100%; text-align: left; border-top: 1px solid var(--line); color: var(--text); }
.menu-row:first-child { border-top: 0; }
.menu-row:active { background: var(--card-2); }
.menu-row .mi { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
[data-theme="dark"] .menu-row .mi { color: var(--accent); }
.menu-row .label { font-size: 13px; font-weight: 550; flex: 1; }
.menu-row .value { font-size: 11px; color: var(--sub); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-row .chev { color: var(--line-strong); }
.menu-group-title { font-size: 10px; color: var(--sub); padding: 16px 18px 2px; letter-spacing: .05em; }
.about-card { text-align: center; padding: 26px 18px; }
.about-card .logo { width: 62px; height: 62px; border-radius: 18px; margin: 0 auto 12px; background: linear-gradient(145deg, #6FA7FF, #3B78E7); color: #fff; display: grid; place-items: center; font-size: 30px; font-weight: 700; box-shadow: 0 10px 26px rgba(59,120,231,.24); }
.about-card h2 { margin: 0; font-size: 18px; }
.about-card .ver { font-size: 10px; color: var(--sub); margin-top: 5px; }
.about-card p { font-size: 11px; color: var(--sub); line-height: 1.8; text-align: left; margin: 14px 0 0; }
.about-links { display: flex; flex-direction: column; gap: 0; margin-top: 15px; border-top: 1px solid var(--line); }
.about-links a, .about-links button { display: flex; align-items: center; justify-content: space-between; padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
.settings-note { font-size: 10px; color: var(--sub); line-height: 1.7; padding: 0 6px; }
.theme-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-option { border: 1.5px solid var(--line-strong); border-radius: 13px; padding: 8px; background: var(--card-2); text-align: center; font-size: 11px; color: var(--text-2); }
.theme-option.active { border-color: var(--accent); color: var(--accent); }
.theme-preview { height: 46px; border-radius: 9px; margin-bottom: 6px; background: #F5F6F8; border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; gap: 3px; padding: 6px; }
.theme-preview i { display: block; height: 5px; border-radius: 2px; background: #DDE3EC; }
.theme-preview i:first-child { width: 60%; background: #B9C8DE; }
.theme-preview.dark { background: #171A20; border-color: #2A2F38; }
.theme-preview.dark i { background: #343B47; }
.theme-preview.dark i:first-child { background: #53627B; }
.color-options { display: flex; flex-wrap: wrap; gap: 12px; }
.color-dot { width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; position: relative; }
.color-dot.active { border-color: var(--text); }
.color-dot.active::after { content: ""; position: absolute; inset: 4px; border: 2px solid #fff; border-radius: 50%; }

/* search */
.search-box { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 13px; padding: 0 12px; margin: 4px 12px 12px; box-shadow: var(--shadow); }
.search-box .ico { color: var(--sub); }
.search-box input { flex: 1; height: 46px; border: 0; background: transparent; font-size: 14px; }
.search-result-meta { padding: 4px 18px; font-size: 10px; color: var(--sub); }
.search-divider { padding: 8px 18px 4px; font-size: 10px; color: var(--sub); }

/* editor list */
.icon-picker { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; max-height: 168px; overflow-y: auto; padding: 2px; }
.icon-choice { aspect-ratio: 1; border-radius: 9px; display: grid; place-items: center; color: var(--text-2); background: var(--card-2); border: 1px solid transparent; }
.icon-choice.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.color-palette { display: flex; flex-wrap: wrap; gap: 8px; }
.color-choice { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; }
.color-choice.active { border-color: var(--text); box-shadow: inset 0 0 0 2px var(--card); }

/* detail */
.detail-amount { text-align: center; padding: 18px 0 22px; }
.detail-amount .kind { font-size: 11px; color: var(--sub); }
.detail-amount .val { font-size: 34px; font-weight: 680; margin-top: 4px; font-variant-numeric: tabular-nums; }
.detail-list { background: var(--card); border-radius: var(--radius); margin: 12px; overflow: hidden; }
.detail-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 16px; border-top: 1px solid var(--line); font-size: 12.5px; }
.detail-row:first-child { border-top: 0; }
.detail-row .k { color: var(--sub); flex: none; }
.detail-row .v { text-align: right; color: var(--text); word-break: break-all; }
.tx-action-summary { display: flex; align-items: center; gap: 11px; padding: 6px 2px 14px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tx-action-summary > div:nth-child(2) { flex: 1; min-width: 0; }
.tx-action-summary .tx-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-time-row { display: flex; gap: 7px; flex-wrap: wrap; margin: 2px 0 16px; }
.field-hint { margin-top: 6px; color: var(--sub); font-size: 10px; line-height: 1.5; }
.quick-time-row .chip { height: 32px; padding: 0 13px; }
.receipt-thumb { width: 100%; max-height: 300px; object-fit: contain; border-radius: 12px; background: var(--card-2); margin-top: 8px; }

/* AI bookkeeping */
.switch[disabled] { opacity: .38; pointer-events: none; }
.ai-hero { background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 10%, var(--card)), var(--card)); }
.ai-hero-top { display: flex; align-items: center; gap: 11px; }
.ai-orb { width: 46px; height: 46px; border-radius: 15px; background: linear-gradient(145deg, #7FB2FF, #3B78E7); color: #fff; display: grid; place-items: center; box-shadow: 0 7px 18px rgba(59,120,231,.24); flex: none; }
.ai-status-list { margin-top: 14px; border-top: 1px solid var(--line); }
.ai-status { display: flex; align-items: center; gap: 7px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--text-2); }
.ai-status:last-child { border-bottom: 0; }
.ai-status b { margin-left: auto; font-weight: 600; color: var(--sub); font-size: 10px; }
.ai-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); flex: none; }
.ai-dot.ok { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.ai-textarea { min-height: 120px; line-height: 1.7; font-size: 13px; }
.ai-example-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.ai-example { height: 26px; padding: 0 9px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); font-size: 10px; color: var(--text-2); }
.ai-example:active { background: var(--accent-soft); }
.ai-actions { display: flex; gap: 9px; }
.ai-actions .btn { height: 42px; }
.ai-warning-bar { margin: 12px; padding: 10px 12px; border-radius: 12px; background: var(--red-soft); color: var(--red); font-size: 11px; display: flex; align-items: flex-start; gap: 6px; line-height: 1.6; }
.ai-loading { display: flex; align-items: center; gap: 10px; color: var(--sub); font-size: 11px; }
.ai-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 6px; }
.ai-card { background: var(--card); border-radius: var(--radius); margin: 10px 12px; padding: 13px 14px; box-shadow: var(--shadow); border: 1px solid transparent; }
.ai-card.duplicate { border-color: color-mix(in srgb, var(--red) 28%, transparent); }
.ai-card.saved { opacity: .72; }
.ai-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ai-kind-tabs { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--line); }
.ai-kind-tabs button { height: 24px; padding: 0 10px; border-radius: 6px; font-size: 10px; color: var(--sub); }
.ai-kind-tabs button.active { background: var(--card); color: var(--text); font-weight: 650; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.ai-confidence { font-size: 10px; color: var(--green); font-weight: 650; }
.ai-amount-line { display: flex; align-items: baseline; gap: 3px; margin-top: 8px; }
.ai-currency { font-size: 16px; font-weight: 600; color: var(--sub); }
.ai-amount-input { width: 150px; max-width: 55%; border: 0; background: transparent; font-size: 29px; font-weight: 680; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--red); padding: 0; }
.ai-amount-input.income { color: var(--green); }
.ai-date { margin-left: auto; font-size: 10px; color: var(--sub); white-space: nowrap; }
.ai-merchant-line { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.ai-merchant-input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 13px; font-weight: 550; color: var(--text-2); padding: 5px 0; border-bottom: 1px dashed var(--line-strong); }
.ai-confidence-bar { width: 46px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; flex: none; }
.ai-confidence-bar i { display: block; height: 100%; border-radius: inherit; }
.ai-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
.ai-fields label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ai-fields label > span { font-size: 9px; color: var(--sub); padding-left: 2px; }
.ai-fields .select, .ai-fields .input { min-height: 34px; height: 34px; font-size: 11px; padding: 4px 8px; border-radius: 9px; }
.ai-fields input[type="date"], .ai-fields input[type="time"] { font-size: 10.5px; }
.ai-reason { display: flex; align-items: flex-start; gap: 4px; margin-top: 9px; font-size: 9.5px; color: var(--sub); line-height: 1.5; }
.ai-card-warning { margin-top: 7px; padding: 7px 9px; border-radius: 8px; background: var(--red-soft); color: var(--red); font-size: 10px; line-height: 1.55; display: flex; gap: 5px; }
.ai-card-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 11px; }
.ai-why { padding: 4px 16px; }
.ai-why-item { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); }
.ai-why-item:first-child { border-top: 0; }
.ai-why-item b { font-size: 12px; font-weight: 650; }
.ai-why-item span { font-size: 10.5px; color: var(--sub); line-height: 1.7; }

/* login */
.login-mask { position: fixed; inset: 0; z-index: 500; background: rgba(10, 16, 26, .55); backdrop-filter: blur(12px); display: grid; place-items: center; padding: 22px; }
.login-card { width: 100%; max-width: 340px; background: var(--card); border-radius: 22px; padding: 28px 22px 22px; box-shadow: var(--shadow-lg); text-align: center; }
.login-card .login-logo { margin: 0 auto 14px; }
.login-card h1 { font-size: 18px; margin: 0 0 6px; }
.login-card p { font-size: 11px; color: var(--sub); margin: 0 0 18px; }
.login-card input { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card-2); padding: 0 12px; margin-bottom: 10px; font-size: 14px; }
.login-error { color: var(--red); font-size: 11px; min-height: 16px; margin-top: 10px; }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); color: var(--text); }

/* misc */
.hidden { display: none !important; }
.muted { color: var(--sub); }
.center { text-align: center; }
.right { text-align: right; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }
.flex { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap8 { gap: 8px; }
.gap12 { gap: 12px; }
.grow { flex: 1; }
.nowrap { white-space: nowrap; }
.amount-private { letter-spacing: .06em; }
.row-actions { display: flex; gap: 8px; margin-top: 14px; }
.row-actions > * { flex: 1; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.pill-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 12px 8px; scrollbar-width: none; }
.pill-tabs::-webkit-scrollbar { display: none; }
.pill { flex: none; height: 30px; border-radius: 16px; padding: 0 12px; background: var(--card); color: var(--sub); font-size: 11px; box-shadow: var(--shadow); }
.pill.active { background: var(--accent); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* home fab must win over tabbar .fab */
.fab.home-fab { position: fixed; top: auto; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: 58px; height: 58px; border: 0; background: #0A84FF; z-index: 40; }
.fab.home-fab:active { transform: translateX(-50%) scale(.94); }


/* official drawer wins over base .drawer */
.drawer.official-drawer { background: var(--card); padding: calc(30px + env(safe-area-inset-top)) 18px 24px; }


/* official-style add page */
.add-page { background: var(--bg); }
.add-top { background: var(--bg); border-bottom: 0; grid-template-columns: 44px 1fr 44px; }
.add-tabs { gap: 22px; justify-content: center; }
.add-tab { color: var(--sub); font-size: 17px; font-weight: 500; padding: 6px 0; }
.add-tab.active { color: var(--text); font-weight: 600; border-bottom-color: var(--text); }
.add-tab.income.active, .add-tab.transfer.active { border-bottom-color: var(--text); }
.add-plus { width: 34px; height: 34px; border-radius: 50%; background: var(--card-2); color: var(--text); display: grid; place-items: center; justify-self: end; }
.official-category-pane { padding: 10px 8px 6px; background: var(--bg); }
.official-category-pane .category-grid { gap: 8px 2px; }
.official-category-pane .category-cell { height: 70px; gap: 5px; padding-top: 2px; border-radius: 10px; }
.official-category-pane .category-cell .cat-icon { width: 38px; height: 38px; border-radius: 50%; background: transparent; }
.official-category-pane .category-cell .cat-icon svg { width: 25px; height: 25px; }
.official-category-pane .category-cell.active { background: transparent; }
.official-category-pane .category-cell.active .cat-icon { box-shadow: none; color: var(--accent); background: rgba(10,132,255,.12); }
.official-category-pane .category-cell.active .cat-name { color: var(--accent); font-weight: 600; }
.official-category-pane .cat-name { font-size: 11px; white-space: nowrap; }
.official-subcat-panel { grid-column: 1 / -1; position: static; margin: 0 0 4px; padding: 12px 10px; border: 0; border-radius: 12px; background: #000; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.official-subcat-panel .subcat-chip { background: transparent; color: var(--sub); font-size: 12px; padding: 7px 6px; border-radius: 8px; }
.official-subcat-panel .subcat-chip.active { color: var(--accent); font-weight: 550; background: transparent; }
.official-add-fields { background: var(--bg); border-top: 0; padding: 8px 16px 6px; }
.official-entry-row { display: flex; align-items: center; gap: 10px; min-height: 46px; }
.official-entry-row .note-input { flex: 1; min-width: 0; background: transparent; border: 0; padding: 0; font-size: 15px; color: var(--text); }
.official-entry-row .note-input::placeholder { color: var(--sub); }
.official-amount { display: flex; align-items: baseline; gap: 6px; font-size: 30px; font-weight: 550; color: var(--red); font-variant-numeric: tabular-nums; white-space: nowrap; }
.official-amount.income { color: var(--green); }
.official-currency { font-size: 13px; font-weight: 400; color: var(--sub); }
.official-add-fields .amount-expr { text-align: right; min-height: 10px; font-size: 9px; }
.official-chip-row { display: flex; align-items: center; gap: 7px; overflow-x: auto; padding: 4px 0 6px; scrollbar-width: none; }
.official-chip-row::-webkit-scrollbar { display: none; }
.official-chip { height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 12px; border-radius: 18px; background: var(--card-2); color: var(--text-2); font-size: 11px; }
.official-chip.icon { width: 42px; padding: 0; }
.official-chip.active { color: var(--accent); background: rgba(10,132,255,.14); }
.official-keypad { height: 248px; padding: 4px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 0; gap: 7px; }
.official-keypad .key { background: var(--card-2); border-radius: 8px; font-size: 22px; }
.official-keypad .key:active { background: var(--line-strong); }
.official-keypad .key.fn { font-size: 12px; }
.official-keypad .key.save { background: var(--red); border-radius: 8px; }
.official-keypad .key.save.income { background: var(--green); }
.official-keypad .key.save.transfer { background: var(--accent); }

/* official-style calendar */
.official-calendar-page { background: var(--bg); padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.cal-top { height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 10px 0; display: flex; align-items: center; }
.cal-month { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 5px; font-size: 16px; font-weight: 600; color: var(--text); }
.cal-nav { margin-left: auto; display: flex; }
.official-calendar-card { margin: 0 10px 10px; padding: 12px 10px 10px; border-radius: 14px; background: var(--card); border: 0; box-shadow: none; }
.official-calendar-card .cal-weekdays { color: var(--sub); font-size: 11px; padding: 4px 2px 8px; }
.official-calendar-card .cal-grid { gap: 4px; }
.official-calendar-card .cal-cell { height: 62px; border-radius: 10px; background: #242426; color: var(--text); justify-content: center; gap: 4px; padding: 0; }
.official-calendar-card .cal-cell.empty { background: transparent; }
.official-calendar-card .cal-cell .d { font-size: 16px; font-weight: 500; }
.official-calendar-card .cal-cell .a { font-size: 9px; color: #FF6B6B; }
.official-calendar-card .cal-cell.selected { background: #173A5E; }
.official-calendar-card .cal-cell.today .d { color: #0A84FF; background: transparent; width: auto; height: auto; font-weight: 600; }
.official-calendar-card .cal-cell.selected.today .d { color: #fff; background: transparent; width: auto; height: auto; }
.cal-metrics { display: flex; justify-content: center; gap: 2px; margin: 12px auto 6px; background: var(--card-2); border-radius: 18px; padding: 3px; width: max-content; max-width: 100%; }
.cal-metrics button { padding: 7px 12px; border-radius: 15px; color: var(--sub); font-size: 11px; }
.cal-metrics button.active { background: #3A3A3C; color: var(--text); }
.cal-summary { text-align: center; color: var(--sub); font-size: 10px; padding: 6px 0 2px; }
.official-calendar-page .tx-section-title { padding: 8px 18px 6px; color: var(--sub); }
.official-calendar-page .official-day { margin: 0 10px 10px; }

/* official-style reports */
.official-report-page { background: var(--bg); }
.official-report-page .topbar { background: var(--bg); }
.official-report-page .report-date { padding: 4px 16px 8px; }
.official-report-page .report-date .date { font-size: 17px; }
.official-overview { margin: 0 10px 10px; padding: 14px 14px 16px; border-radius: 14px; background: var(--card); border: 0; box-shadow: none; }
.overview-title { text-align: center; font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 10px; }
.overview-grid div { text-align: center; }
.overview-grid span { display: block; color: var(--sub); font-size: 11px; margin-bottom: 5px; }
.overview-grid b { font-size: 16px; font-weight: 550; }
.overview-grid b.red { color: var(--red); }
.overview-grid b.green { color: var(--green); }
.official-report-page > .card { margin: 0 10px 10px; border-radius: 14px; background: var(--card); border: 0; box-shadow: none; }
.official-report-page .card-title { font-size: 15px; }
.official-report-page .card-sub { color: var(--sub); }

.official-keypad .key.save[disabled] { opacity: .88; }


.official-calendar-card .cal-cell .d { background: transparent !important; width: auto !important; height: auto !important; }

