@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/be-vietnam-pro-vietnamese-400-normal.woff2') format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/be-vietnam-pro-latin-400-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:500;font-display:swap;src:url('/fonts/be-vietnam-pro-vietnamese-500-normal.woff2') format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:500;font-display:swap;src:url('/fonts/be-vietnam-pro-latin-500-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/be-vietnam-pro-vietnamese-600-normal.woff2') format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/be-vietnam-pro-latin-600-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/be-vietnam-pro-vietnamese-700-normal.woff2') format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/be-vietnam-pro-latin-700-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
:root {
  font-family: 'Be Vietnam Pro', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #152c43;
  background: #fafbfc;
  color-scheme: light;
  --surface: #fff;
  --bg: #fafbfc;
  --text: #152c43;
  --muted: #6b7d8f;
  --line: #e8edf1;
  --orange: #ffb36a;
  --soft: #fff5ec;
  --navy: #152c43;
  --green: #22795c;
  --red: #b84444;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100vh; min-height: 100svh; background: var(--bg); color: var(--text); margin: 0; line-height: 1.6; -webkit-font-smoothing: antialiased; }
:root.dark, body.dark {
  --surface: #152b46; --bg: #0b1f36; --text: #e5edf6; --muted: #a4b3c5;
  --line: #2a405c; --soft: #1a304c; --navy: #dce6f2;
  background: var(--bg); color: var(--text); color-scheme: dark;
}
button, input, select, textarea { font: inherit; }
button {
  cursor: pointer; min-height: 44px; border: 1.5px solid var(--line);
  border-radius: 12px; background: var(--surface); color: var(--text);
  padding: 10px 17px; font-weight: 600; font-size: 14px; transition: background .15s;
}
button:hover { background: var(--bg); }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, a:focus-visible { outline: 3px solid #62a5ec; outline-offset: 3px; }
input, select, textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px;
  background: var(--surface); color: var(--text); min-height: 44px; font-size: 16px;
}
textarea { min-height: 85px; resize: vertical; }
label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
input[type=checkbox] { width: 21px; height: 21px; min-height: 21px; accent-color: #e88c42; }
header { height: 88px; display: flex; align-items: center; gap: 14px; max-width: 1160px; margin: auto; padding: 0 32px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); font-size: 18px; font-weight: 700; letter-spacing: -.5px; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: #d7833e; }
.brand-mark svg { width: 23px; height: 23px; }
.star { color: #e58b43; }
.tag { font-size: 10px; background: var(--bg); padding: 4px 9px; border-radius: 6px; color: var(--muted); border: 1px solid var(--line); }
.icon { margin-left: auto; display: grid; place-items: center; width: 44px; padding: 10px; }
.icon svg { width: 19px; height: 19px; }
#account { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; background: var(--soft); color: #9e622e; border-color: transparent; font-size: 12px; }
.development { text-align: center; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .3px; padding: 6px 12px; }
main { max-width: 1100px; margin: auto; padding: 38px 32px 125px; }
.intro { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; gap: 20px; }
.eyebrow { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 1.6px; font-weight: 600; }
h1 { font-size: 31px; letter-spacing: -1.1px; line-height: 1.3; margin: 9px 0; font-weight: 650; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 650; letter-spacing: -.25px; }
h3 { font-size: 15px; margin: 0; }
p { margin: 5px 0 12px; }
.muted, small { color: var(--muted); }
.intro p { font-size: 13px; }
.primary { background: var(--orange); border-color: var(--orange); color: #152c43; }
.primary:hover { background: #ffa957; border-color: #ffa957; }
.danger { color: var(--red); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 28px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 25px; margin-bottom: 20px; box-shadow: 0 4px 20px #19314903; }
.cards .card { margin-bottom: 0; position: relative; overflow: hidden; }
.cards .card:first-child::before { content: ''; display: block; width: 28px; height: 3px; background: var(--orange); border-radius: 4px; margin-bottom: 15px; }
.cards .card:not(:first-child)::before { content: ''; display: block; width: 28px; height: 3px; background: var(--line); border-radius: 4px; margin-bottom: 15px; }
.stat-title { font-size: 12px; color: var(--muted); }
.stat-number { font-size: 29px; letter-spacing: -1px; font-weight: 650; line-height: 1.3; margin: 10px 0; font-variant-numeric: tabular-nums; }
.stat-note { font-size: 11px; color: var(--muted); }
.grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; }
.hero { background: var(--soft); color: var(--text); padding: 28px; position: relative; overflow: hidden; border-color: #f5e9db; display: flex; flex-direction: column; align-items: flex-start; }
.dark .hero { border-color: var(--line); }
.hero .eyebrow { color: #a66c3c; }
.hero h2 { font-size: 25px; max-width: 340px; margin: 16px 0 9px; line-height: 1.45; font-weight: 550; letter-spacing: -.8px; }
.hero .muted { color: var(--muted); font-size: 13px; }
.hero .primary { margin-top: 15px; }
.hero-art { position: absolute; right: 25px; bottom: 28px; width: 100px; height: 90px; opacity: .6; pointer-events: none; }
.hero-art::before, .hero-art::after { content: ''; position: absolute; border: 1.5px solid #dba873; width: 55px; height: 74px; border-radius: 3px 9px 9px 3px; background: #fffaf4; transform: rotate(15deg); right: 0; bottom: 1px; }
.hero-art::after { transform: rotate(-12deg); right: 30px; background: #f9dfc0; border-left-width: 6px; }
.dark .hero-art { opacity: .2; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title h2 { margin: 0; }
.badge { display: inline-flex; border-radius: 7px; padding: 4px 9px; font-size: 10px; color: var(--green); background: #22795c0c; font-weight: 500; }
.badge.warn { background: var(--soft); color: #9a612f; }
.badge.bad { color: var(--red); background: #b844440c; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-body { flex: 1; min-width: 0; }
.list-body strong { font-size: 13px; font-weight: 600; }
.list-body p { margin: 3px 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.avatar { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: #7a8e9e; font-weight: 600; font-size: 12px; border: 1px solid var(--line); }
.amount { font-weight: 600; white-space: nowrap; font-size: 14px; font-variant-numeric: tabular-nums; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.actions button { font-size: 12px; padding: 8px 12px; }
.empty { text-align: center; padding: 32px; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; font-size: 13px; }
.alert { background: #b8444410; border: 1px solid #b8444440; color: var(--red); border-radius: 12px; padding: 14px; margin-bottom: 18px; }
.info { background: var(--soft); border-radius: 10px; padding: 14px; color: #98602e; font-size: 12px; line-height: 1.7; }
.bottom { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); width: min(calc(100% - 32px), 680px); background: var(--surface); display: flex; justify-content: space-around; border: 1px solid var(--line); border-radius: 18px; padding: 10px 12px; z-index: 10; box-shadow: 0 8px 35px #132e4510; }
.bottom button { border: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 10px; font-weight: 500; background: transparent; padding: 4px; width: 20%; color: var(--muted); }
.bottom button span { display: grid; place-items: center; height: 24px; }
.bottom svg { width: 21px; height: 21px; }
.bottom button.selected { color: #cf7835; }
.bottom .main-action span { background: var(--orange); color: #152c43; border-radius: 14px; width: 48px; height: 44px; margin-top: -22px; box-shadow: 0 4px 13px #ee934c20; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.check { border: 1.5px solid var(--line); border-radius: 10px; display: flex; align-items: center; gap: 8px; padding: 12px; font-size: 13px; cursor: pointer; margin: 0; }
.check:has(input:checked) { border-color: #f0a060; background: var(--soft); }
.locked { opacity: .65; }
.bar { height: 8px; background: var(--line); border-radius: 10px; overflow: hidden; margin: 15px 0; }
.bar i { display: block; height: 100%; background: #ed984e; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar strong { font-size: 11px; font-weight: 500; text-align: center; color: var(--muted); padding-bottom: 8px; }
.calendar div { padding: 10px 3px; text-align: center; font-size: 12px; border-radius: 8px; background: var(--bg); color: var(--muted); }
.calendar .done { background: #22795c0f; color: var(--green); font-weight: 600; }
.calendar .today { outline: 1px solid #f0a060; color: var(--text); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs button { font-size: 13px; }
.tabs .selected { background: var(--soft); border-color: #f0a060; }
.loading { text-align: center; padding: 60px; color: var(--muted); }
dialog { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 18px; max-width: 510px; width: calc(100% - 30px); padding: 26px; max-height: 85vh; box-shadow: 0 20px 80px #132e4520; }
dialog::backdrop { background: #10223866; backdrop-filter: blur(4px); }
.dialog-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.dialog-header button { padding: 4px 12px; font-size: 20px; }
.form-error { color: var(--red); font-size: 13px; }
.form-footer { display: flex; justify-content: flex-end; margin-top: 20px; }
#toast { position: fixed; bottom: 105px; left: 50%; transform: translateX(-50%); background: #203a4f; color: #fff; padding: 12px 20px; border-radius: 12px; z-index: 100; max-width: 90vw; display: none; }
.footer-note { text-align: center; font-size: 10px; color: var(--muted); margin-top: 28px; }
.profile-list { display: grid; gap: 8px; }
.profile-list button { text-align: left; padding: 12px 16px; }
.settings-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid var(--line); }
.settings-row:last-child { border-bottom: 0; }
.filter { max-width: 280px; }
a { color: #b9682b; }
.quote { font-family: Georgia, serif; font-size: 21px; font-style: italic; line-height: 1.7; }
.split { display: flex; gap: 10px; }
.split > * { flex: 1; }
@media (max-width: 700px) {
  header { height: 72px; padding: 0 18px; gap: 9px; }
  .brand { font-size: 14px; gap: 9px; }
  .brand-mark { width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; }
  .tag { display: none; }
  .icon { width: 36px; min-height: 36px; border: 0; }
  #account { width: 34px; height: 34px; min-height: 34px; flex-shrink: 0; }
  main { padding: 28px 18px 120px; }
  h1 { font-size: 26px; }
  .intro { align-items: flex-start; gap: 10px; margin-bottom: 22px; }
  .intro p { font-size: 12px; }
  .intro > .badge { white-space: nowrap; margin-top: 28px; }
  .eyebrow { font-size: 9px; letter-spacing: 1px; }
  .cards { gap: 8px; margin: 22px 0; }
  .cards .card { padding: 15px 10px; border-radius: 13px; }
  .stat-number { font-size: clamp(15px, 4.4vw, 22px); margin: 8px 0; letter-spacing: -.7px; }
  .stat-title { font-size: 10px; }
  .stat-note { font-size: 9px; line-height: 1.6; }
  .grid { grid-template-columns: 1fr; gap: 0; }
  .hero { padding: 25px; }
  .hero h2 { font-size: 23px; max-width: 265px; }
  .hero-art { width: 70px; height: 70px; right: 18px; bottom: 25px; opacity: .35; }
  .hero-art::before, .hero-art::after { width: 40px; height: 55px; }
  .card { padding: 21px 18px; border-radius: 15px; }
  .section-title { flex-wrap: wrap; }
  .list-row { align-items: flex-start; gap: 10px; }
  .check-grid { gap: 8px; }
  .check { font-size: 12px; padding: 10px; }
  .amount { font-size: 12px; }
  .calendar div { padding: 9px 0; }
  .bottom { bottom: 0; width: 100%; border-radius: 18px 18px 0 0; padding: 11px 8px max(12px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Public sign-in: one compact panel, full-height themed canvas. */
a.primary { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 12px 20px; border: 1px solid var(--orange); border-radius: 12px; text-decoration: none; font-size: 14px; font-weight: 600; }
.brand { min-width: 0; }
.brand > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-mark, header .icon, #account { flex-shrink: 0; }
.signed-out .bottom, .signed-out #account { display: none; }
.signed-out header { max-width: 1100px; }
.signed-out main { max-width: none; display: grid; place-items: center; min-height: calc(100svh - 88px); padding: 24px 20px 64px; }
.login-panel { width: 100%; max-width: 520px; margin: 0; padding: 36px; border-radius: 22px; box-shadow: 0 12px 48px #122c4510; }
.login-panel .eyebrow { font-size: 10px; letter-spacing: 1.2px; }
.login-panel h1 { font-size: 30px; line-height: 1.4; letter-spacing: -.8px; margin: 14px 0; }
.login-panel > .muted { font-size: 14px; line-height: 1.8; margin-bottom: 26px; }
.login-panel > a.primary { display: flex; width: 100%; }
.login-panel > .info { padding: 0; background: none; color: var(--muted); text-align: center; font-size: 11px; margin: 14px 0 24px; }
.login-panel .actions { display: flex; justify-content: center; gap: 0; width: fit-content; margin: 0 auto; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.login-panel .actions button { border: 0; background: transparent; min-height: 40px; min-width: 96px; border-radius: 8px; padding: 8px 14px; color: var(--muted); }
.login-panel .actions button[aria-pressed="true"] { color: var(--text); background: var(--surface); box-shadow: 0 2px 6px #1022380c; }
@media (max-width: 700px) {
 .signed-out main { min-height: calc(100svh - 72px); padding: 20px 16px 40px; }
 .login-panel { padding: 28px 24px; border-radius: 18px; }
 .login-panel h1 { font-size: 26px; letter-spacing: -.6px; }
 .login-panel > .muted { font-size: 13px; margin-bottom: 22px; }
 .signed-out header { padding: 0 16px; }
}
@media (max-width: 360px) {
 header { padding: 0 12px; gap: 7px; }
 .brand { font-size: 12px; gap: 7px; }
 .login-panel { padding: 25px 20px; }
 .login-panel h1 { font-size: 24px; }
}
