147 lines
12 KiB
CSS
147 lines
12 KiB
CSS
:root {
|
|
--bg: var(--tg-theme-bg-color, #f1f0ea);
|
|
--surface: var(--tg-theme-secondary-bg-color, #ffffff);
|
|
--text: var(--tg-theme-text-color, #17201c);
|
|
--muted: var(--tg-theme-hint-color, #707a74);
|
|
--accent: var(--tg-theme-button-color, #216a4b);
|
|
--accent-text: var(--tg-theme-button-text-color, #ffffff);
|
|
--link: var(--tg-theme-link-color, #216a4b);
|
|
--danger: var(--tg-theme-destructive-text-color, #bd4a3e);
|
|
--line: color-mix(in srgb, var(--text) 12%, transparent);
|
|
--shadow: 0 16px 50px color-mix(in srgb, var(--text) 9%, transparent);
|
|
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
color: var(--text);
|
|
background: var(--bg);
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
html, body { margin: 0; min-height: 100%; background: var(--bg); }
|
|
|
|
body {
|
|
min-height: 100vh;
|
|
min-height: 100dvh;
|
|
padding: max(14px, env(safe-area-inset-top)) 18px calc(96px + env(safe-area-inset-bottom));
|
|
background-image:
|
|
radial-gradient(circle at 90% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 32%),
|
|
linear-gradient(180deg, color-mix(in srgb, var(--surface) 35%, transparent), transparent 28%);
|
|
}
|
|
|
|
button, input, select { font: inherit; color: inherit; }
|
|
button { cursor: pointer; }
|
|
|
|
.shell { width: min(100%, 560px); margin: 0 auto; }
|
|
.topbar { display: flex; align-items: center; justify-content: space-between; margin: 6px 2px 26px; }
|
|
.eyebrow { margin: 0 0 3px; text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 750; color: var(--muted); }
|
|
h1, h2, p { margin-top: 0; }
|
|
h1 { margin-bottom: 0; font-size: 30px; line-height: 1; letter-spacing: -.04em; }
|
|
h2 { margin: 0; font-size: 23px; letter-spacing: -.025em; }
|
|
.user-chip { display: flex; align-items: center; gap: 8px; max-width: 48%; padding: 5px 11px 5px 5px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 72%, transparent); font-size: 12px; font-weight: 650; white-space: nowrap; overflow: hidden; }
|
|
.mini-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: var(--accent); color: var(--accent-text); }
|
|
|
|
.view { display: none; animation: reveal .25s ease; }
|
|
.view.active { display: block; }
|
|
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } }
|
|
|
|
.hero-card {
|
|
min-height: 210px;
|
|
padding: 27px;
|
|
border-radius: 29px;
|
|
color: #f5f7f3;
|
|
background:
|
|
linear-gradient(135deg, rgba(255,255,255,.11), transparent 45%),
|
|
linear-gradient(145deg, color-mix(in srgb, var(--accent) 82%, #132e24), color-mix(in srgb, var(--accent) 50%, #0c1914));
|
|
box-shadow: var(--shadow);
|
|
}
|
|
.hero-card p { margin-bottom: 15px; opacity: .72; font-size: 13px; }
|
|
.hero-card strong { display: block; margin-bottom: 32px; font-size: clamp(38px, 10vw, 54px); letter-spacing: -.055em; line-height: 1; overflow-wrap: anywhere; }
|
|
.saving-row { display: flex; align-items: center; gap: 12px; }
|
|
.saving-row span { min-width: 48px; font-weight: 800; }
|
|
.progress { flex: 1; height: 7px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.2); }
|
|
.progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: #e8d487; transition: width .4s ease; }
|
|
.hero-card small { display: block; margin-top: 7px; opacity: .55; font-size: 11px; }
|
|
|
|
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin: 12px 0 28px; }
|
|
.metric { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 17px 15px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
|
|
.metric-icon { display: grid; place-items: center; flex: 0 0 auto; width: 35px; height: 35px; border-radius: 12px; font-size: 19px; }
|
|
.income .metric-icon { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
|
|
.expense .metric-icon { color: var(--danger); background: color-mix(in srgb, var(--danger) 13%, transparent); }
|
|
.metric div { min-width: 0; }
|
|
.metric small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; }
|
|
.metric strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
|
|
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 3px 14px; }
|
|
.section-title > span { color: var(--muted); font-size: 11px; }
|
|
.category-list { overflow: hidden; border: 1px solid var(--line); border-radius: 21px; background: var(--surface); }
|
|
.empty-state { padding: 25px; color: var(--muted); text-align: center; font-size: 13px; line-height: 1.5; }
|
|
.category-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
|
|
.category-item:last-child { border-bottom: 0; }
|
|
.category-item strong { font-size: 13px; }
|
|
.category-item span { color: var(--muted); font-size: 12px; }
|
|
.category-item .category-bar { grid-column: 1 / -1; height: 3px; overflow: hidden; border-radius: 4px; background: var(--line); }
|
|
.category-bar i { display: block; height: 100%; background: var(--accent); }
|
|
.category-item.expense-item .category-bar i { background: var(--danger); }
|
|
.history-heading { margin-top: 28px; }
|
|
.transaction-list { overflow: hidden; border: 1px solid var(--line); border-radius: 21px; background: var(--surface); }
|
|
.transaction-row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 11px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
|
|
.transaction-row:last-child { border-bottom: 0; }
|
|
.transaction-kind { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); font-size: 19px; }
|
|
.transaction-row.expense-row .transaction-kind { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
|
|
.transaction-copy { min-width: 0; }
|
|
.transaction-copy strong, .transaction-copy small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
.transaction-copy strong { font-size: 13px; }
|
|
.transaction-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; }
|
|
.transaction-actions { display: grid; justify-items: end; gap: 5px; }
|
|
.transaction-actions strong { font-size: 13px; }
|
|
.cancel-button { padding: 2px 0; border: 0; background: transparent; color: var(--danger); font-size: 10px; }
|
|
|
|
.add-heading { margin: 5px 3px 24px; }
|
|
.transaction-form { display: grid; gap: 18px; }
|
|
.segmented, .board-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 15px; background: color-mix(in srgb, var(--text) 7%, transparent); }
|
|
.segment, .board-switch button { padding: 11px 10px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; }
|
|
.segment.active, .board-switch button.active { color: var(--text); background: var(--surface); box-shadow: 0 3px 12px color-mix(in srgb, var(--text) 8%, transparent); }
|
|
.transaction-form label { display: grid; gap: 8px; font-size: 12px; font-weight: 700; }
|
|
.transaction-form label > span { margin-left: 4px; }
|
|
.transaction-form em { color: var(--muted); font-size: 10px; font-style: normal; font-weight: 500; }
|
|
.transaction-form input, .transaction-form select { width: 100%; min-height: 50px; padding: 0 15px; outline: none; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
|
|
.transaction-form input:focus, .transaction-form select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
|
|
.amount-field > div { position: relative; }
|
|
.amount-field input { height: 78px; padding-right: 54px; font-size: 35px; font-weight: 750; letter-spacing: -.04em; }
|
|
.amount-field b { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 24px; }
|
|
.primary-button { min-height: 54px; margin-top: 3px; border: 0; border-radius: 16px; background: var(--accent); color: var(--accent-text); font-weight: 750; box-shadow: 0 10px 25px color-mix(in srgb, var(--accent) 28%, transparent); }
|
|
.secondary-button { min-height: 44px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--accent); font-weight: 700; }
|
|
.form-hint { margin: -8px 15px 0; color: var(--muted); font-size: 10px; line-height: 1.45; text-align: center; }
|
|
.hidden { display: none !important; }
|
|
|
|
.board-heading { align-items: center; margin-top: 5px; margin-bottom: 20px; }
|
|
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--link); font-size: 21px; }
|
|
.board-switch { margin-bottom: 13px; }
|
|
.leader-filter { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; margin: 0 3px 13px; color: var(--muted); font-size: 11px; font-weight: 700; }
|
|
.leader-filter select { width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: var(--surface); }
|
|
.leaderboard-list { overflow: hidden; min-height: 100px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
|
|
.leaderboard-list.loading { padding: 30px; color: var(--muted); text-align: center; font-size: 13px; }
|
|
.leader-row { display: grid; grid-template-columns: 25px 42px 1fr auto; align-items: center; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
|
|
.leader-row:last-child { border-bottom: 0; }
|
|
.leader-row.me { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
|
|
.rank { color: var(--muted); text-align: center; font-size: 12px; font-weight: 750; }
|
|
.leader-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
|
|
.avatar-fallback { display: grid; place-items: center; color: var(--accent); font-weight: 800; }
|
|
.leader-name { min-width: 0; }
|
|
.leader-name strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
|
|
.leader-name small { color: var(--muted); font-size: 10px; }
|
|
.leader-percent { font-size: 15px; font-weight: 850; color: var(--accent); }
|
|
.leader-percent.negative { color: var(--danger); }
|
|
.friend-hint { margin: 13px 18px; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }
|
|
|
|
.bottom-nav { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 8px max(15px, calc((100vw - 560px) / 2)) max(8px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(18px); }
|
|
.bottom-nav button { display: grid; place-items: center; gap: 2px; padding: 3px; border: 0; background: transparent; color: var(--muted); font-size: 9px; font-weight: 650; }
|
|
.bottom-nav button > span { font-size: 22px; line-height: 30px; }
|
|
.bottom-nav button.active { color: var(--accent); }
|
|
.bottom-nav .add-mark { display: grid; place-items: center; width: 42px; height: 32px; border-radius: 12px; background: var(--accent); color: var(--accent-text); }
|
|
.toast { position: fixed; z-index: 20; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); max-width: calc(100% - 36px); padding: 11px 16px; border-radius: 12px; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); opacity: 0; pointer-events: none; transition: .2s ease; font-size: 12px; box-shadow: var(--shadow); }
|
|
.toast.show { opacity: 1; transform: translate(-50%, 0); }
|
|
|
|
@media (min-width: 600px) {
|
|
body { padding-top: 28px; }
|
|
.bottom-nav { left: 50%; bottom: 14px; width: 540px; border: 1px solid var(--line); border-radius: 22px; transform: translateX(-50%); padding: 8px 22px; box-shadow: var(--shadow); }
|
|
}
|