/* FVA Portal style, fully. Warm-white, white cards, black pill buttons. */
html { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; box-sizing: border-box; }
body, div, span, a, button, input, select, section, nav, label, strong { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); overflow-x: hidden; }
:root { --bg: #F7F4EF; --card: #FFFFFF; --border: #E3DDD3; --text: #111111; --muted: #5B564D; --btn: #111111; --btntext: #FFFFFF; --logobg: #111111; }
[data-theme="light"] { --bg: #F7F4EF; --card: #FFFFFF; --border: #E3DDD3; --text: #111111; --muted: #5B564D; --btn: #111111; --btntext: #FFFFFF; --logobg: #111111; }
[data-theme="dark"] { --bg: #111111; --card: #1E1E1E; --border: #333333; --text: #FFFFFF; --muted: #BBBBBB; --btn: #FFFFFF; --btntext: #111111; --logobg: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { --bg: #111111; --card: #1E1E1E; --border: #333333; --text: #FFFFFF; --muted: #BBBBBB; --btn: #FFFFFF; --btntext: #111111; --logobg: #FFFFFF; } }
@media (prefers-color-scheme: light) { :root:not([data-theme]) { --bg: #F7F4EF; --card: #FFFFFF; --border: #E3DDD3; --text: #111111; --muted: #5B564D; --btn: #111111; --btntext: #FFFFFF; --logobg: #111111; } }
:focus-visible { outline: 2px solid var(--color-focus, var(--btn)); outline-offset: 2px; }
.app { max-width: 480px; margin: 0 auto; padding: 12px 12px 96px 12px; width: 100%; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; flex-wrap: wrap; }
.topbar a { color: var(--text); text-decoration: none; min-height: 44px; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.brand { font-weight: 700; font-size: 18px; text-align: center; }
.brandmark { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; background: var(--btn); color: var(--btntext); flex-shrink: 0; border: 1px solid var(--border); }
.pill { background: var(--btn); color: var(--btntext); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin: 16px 0; width: 100%; }
.label { color: var(--muted); font-size: 14px; font-weight: 700; margin: 8px 0 4px 0; }
.amount { font-size: 28px; font-weight: 800; margin: 8px 0; line-height: 1.2; font-variant-numeric: tabular-nums; }
.sub { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 6px 0; overflow-wrap: anywhere; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--border); padding: 8px 0; }
.row:last-child { border-bottom: 0; }
.cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell strong { display: block; font-size: 15px; }
.logo { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; flex-shrink: 0; border: 1px solid var(--border); background: var(--logobg); color: var(--btntext); line-height: 1; }
.logo.sm { width: 32px; height: 32px; font-size: 11px; }
.btn { background: var(--btn); color: var(--btntext); border: 0; border-radius: 999px; padding: 12px 16px; min-height: 44px; font-weight: 700; font-size: 15px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
input, select { width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); color: var(--text); padding: 8px; margin: 4px 0 8px 0; font-size: 15px; }
.tab { background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 8px 12px; min-height: 44px; font-weight: 700; cursor: pointer; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--border); display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); }
.bottomnav .inner { max-width: 480px; width: 100%; display: flex; }
.bottomnav a { flex: 1; min-height: 56px; display: flex; align-items: center; justify-content: center; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; text-align: center; }
.menulist a { display: flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; border-top: 1px solid var(--border); font-weight: 600; font-size: 15px; }
.menulist a:first-of-type { border-top: 0; }
.chart { height: 120px; border: 1px solid var(--border); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; text-align: center; padding: 8px; }
.modal-backdrop { position: fixed; inset: 0; background: rgb(0 0 0 / 60%); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal-backdrop[hidden] { display: none; }
.modal { background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 16px; padding: var(--modal-padding, 20px); max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto; }
.modal .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.skeleton { height: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.card { animation: fadein 0.3s ease; }
@media (prefers-reduced-motion: reduce) { .card { animation: none; } }
@media (max-width: 320px) { .app { padding: 8px 8px 96px 8px; } .card { padding: 12px; } .logo { width: 36px; height: 36px; font-size: 11px; } .brandmark { width: 36px; height: 36px; } .brand { font-size: 16px; } }
@media (min-width: 375px) { .app { max-width: 480px; } }
@media (min-width: 390px) { .app { max-width: 480px; } }
@media (min-width: 430px) { .app { max-width: 480px; } }
@media (min-width: 768px) { .app { max-width: 720px; padding: 20px 20px 96px 20px; } .bottomnav .inner { max-width: 720px; } .card { padding: 20px; } .brand { font-size: 20px; } }
@media (min-width: 1024px) { .app { max-width: 840px; } .bottomnav .inner { max-width: 840px; } }
@media (min-width: 1280px) { .app { max-width: 960px; } .bottomnav .inner { max-width: 960px; } }
@media (min-width: 1440px) { .app { max-width: 1120px; } .bottomnav .inner { max-width: 1120px; } }