651 lines
16 KiB
CSS
651 lines
16 KiB
CSS
:root {
|
|
--primary: #4f46e5;
|
|
--primary-dark: #4338ca;
|
|
--bg: #f8fafc;
|
|
--card: #ffffff;
|
|
--input-bg: #ffffff;
|
|
--text: #1e293b;
|
|
--muted: #64748b;
|
|
--border: #e2e8f0;
|
|
--danger: #ef4444;
|
|
--success: #22c55e;
|
|
--accent-bg: #eef2ff;
|
|
--accent-text: #4338ca;
|
|
color-scheme: light;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
:root:not([data-theme='light']) {
|
|
--bg: #0f172a;
|
|
--card: #1e293b;
|
|
--input-bg: #1e293b;
|
|
--text: #f1f5f9;
|
|
--muted: #94a3b8;
|
|
--border: #334155;
|
|
--accent-bg: #312e81;
|
|
--accent-text: #c7d2fe;
|
|
color-scheme: dark;
|
|
}
|
|
}
|
|
|
|
:root[data-theme='dark'] {
|
|
--bg: #0f172a;
|
|
--card: #1e293b;
|
|
--input-bg: #1e293b;
|
|
--text: #f1f5f9;
|
|
--muted: #94a3b8;
|
|
--border: #334155;
|
|
--accent-bg: #312e81;
|
|
--accent-text: #c7d2fe;
|
|
color-scheme: dark;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
body {
|
|
margin: 0;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
input, select, button, textarea { font-family: inherit; font-size: 1rem; color: var(--text); }
|
|
|
|
.material-symbols-outlined {
|
|
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
|
|
vertical-align: middle;
|
|
line-height: 1;
|
|
}
|
|
|
|
.app-shell {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.app-content {
|
|
flex: 1;
|
|
padding: 16px 16px 96px;
|
|
max-width: 560px;
|
|
width: 100%;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.page-loading {
|
|
padding: 40px;
|
|
text-align: center;
|
|
color: var(--muted);
|
|
}
|
|
|
|
/* Bottom nav */
|
|
.bottom-nav {
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
display: grid;
|
|
grid-template-columns: repeat(5, 1fr);
|
|
align-items: center;
|
|
justify-items: center;
|
|
background: var(--card);
|
|
border-top: 1px solid var(--border);
|
|
padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
|
|
z-index: 20;
|
|
}
|
|
|
|
.nav-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 2px;
|
|
font-size: 0.7rem;
|
|
color: var(--muted);
|
|
text-decoration: none;
|
|
padding: 6px 4px;
|
|
border-radius: 12px;
|
|
width: 100%;
|
|
}
|
|
|
|
.nav-item.active {
|
|
color: var(--primary);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.nav-icon { font-size: 1.4rem; }
|
|
|
|
.fab {
|
|
width: 56px;
|
|
height: 56px;
|
|
border-radius: 50%;
|
|
background: var(--primary);
|
|
color: white;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
text-decoration: none;
|
|
box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
|
|
margin-top: -28px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.fab .material-symbols-outlined { font-size: 30px; }
|
|
|
|
.top-settings-btn {
|
|
position: fixed;
|
|
top: calc(12px + env(safe-area-inset-top));
|
|
right: 12px;
|
|
z-index: 15;
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 50%;
|
|
background: var(--card);
|
|
color: var(--text);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
|
|
text-decoration: none;
|
|
}
|
|
.top-settings-btn.active { color: var(--primary); }
|
|
|
|
/* Auth pages */
|
|
.auth-page {
|
|
max-width: 400px;
|
|
margin: 40px auto;
|
|
padding: 24px;
|
|
text-align: center;
|
|
position: relative;
|
|
}
|
|
|
|
.back-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
font-size: 0.85rem;
|
|
color: var(--muted);
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.auth-subtitle { color: var(--muted); margin-bottom: 24px; }
|
|
|
|
.auth-form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
.auth-form input, .auth-form select {
|
|
padding: 14px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
background: var(--input-bg);
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.password-field { position: relative; }
|
|
.password-field input { width: 100%; padding-right: 44px; }
|
|
.password-toggle {
|
|
position: absolute;
|
|
right: 6px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
background: none;
|
|
border: none;
|
|
color: var(--muted);
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 8px;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--primary);
|
|
color: white;
|
|
border: none;
|
|
padding: 14px;
|
|
border-radius: 10px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.btn-primary:disabled { opacity: 0.6; }
|
|
|
|
.btn-secondary {
|
|
background: transparent;
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
padding: 10px 14px;
|
|
border-radius: 10px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.btn-full { width: 100%; display: block; }
|
|
.btn-center { width: fit-content; margin: 16px auto 0; }
|
|
|
|
.theme-toggle { display: flex; gap: 8px; }
|
|
.theme-toggle .tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
|
|
|
|
.form-error { color: var(--danger); font-size: 0.9rem; }
|
|
|
|
.tabs { display: flex; gap: 8px; margin-bottom: 16px; justify-content: center; }
|
|
.tab {
|
|
padding: 10px 18px;
|
|
border-radius: 999px;
|
|
border: 1px solid var(--border);
|
|
background: var(--card);
|
|
cursor: pointer;
|
|
}
|
|
.tab.active { background: var(--primary); color: white; border-color: var(--primary); }
|
|
|
|
/* Cards */
|
|
.card {
|
|
background: var(--card);
|
|
border-radius: 16px;
|
|
padding: 20px;
|
|
margin-bottom: 16px;
|
|
box-shadow: 0 1px 3px rgba(0,0,0,0.06);
|
|
}
|
|
|
|
.settlement-tile { text-align: center; }
|
|
.settlement-tile .amount { font-size: 2rem; font-weight: 700; margin: 8px 0; }
|
|
.settlement-tile .amount.settled { color: var(--success); }
|
|
.settlement-tile .amount.owed { color: var(--danger); }
|
|
.settlement-transactions { display: flex; flex-direction: column; gap: 4px; }
|
|
.settlement-transactions .amount { font-size: 1.3rem; margin: 0; }
|
|
.suggestion-btn {
|
|
background: none;
|
|
border: none;
|
|
font-family: inherit;
|
|
cursor: pointer;
|
|
border-radius: 8px;
|
|
padding: 4px 8px;
|
|
}
|
|
.suggestion-btn:hover, .suggestion-btn:focus-visible { background: var(--accent-bg); }
|
|
|
|
.summary-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
|
|
gap: 8px;
|
|
text-align: center;
|
|
}
|
|
.summary-grid .label { font-size: 0.75rem; color: var(--muted); }
|
|
.summary-grid .value { font-size: 1.1rem; font-weight: 600; }
|
|
|
|
/* Add expense form */
|
|
.expense-form { display: flex; flex-direction: column; gap: 16px; }
|
|
.amount-input {
|
|
font-size: 2.5rem;
|
|
text-align: center;
|
|
border: none;
|
|
border-bottom: 2px solid var(--border);
|
|
padding: 12px;
|
|
background: transparent;
|
|
width: 100%;
|
|
}
|
|
.amount-input:focus { outline: none; border-color: var(--primary); }
|
|
|
|
.field { display: flex; flex-direction: column; gap: 6px; }
|
|
.field + .field { margin-top: 16px; }
|
|
.field label { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
|
|
.field input, .field select, .field textarea {
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
padding: 12px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
background: var(--input-bg);
|
|
color: var(--text);
|
|
}
|
|
|
|
.category-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 8px;
|
|
}
|
|
.category-chip {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 10px 4px;
|
|
border-radius: 12px;
|
|
border: 2px solid transparent;
|
|
background: var(--bg);
|
|
cursor: pointer;
|
|
font-size: 0.7rem;
|
|
}
|
|
.category-chip.selected { border-color: var(--primary); background: var(--accent-bg); color: var(--accent-text); }
|
|
.category-chip .icon { font-size: 1.4rem; }
|
|
|
|
.toggle-row { display: flex; flex-wrap: wrap; gap: 10px; }
|
|
.toggle-row .toggle-btn { min-width: 100px; }
|
|
.toggle-btn {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
padding: 14px;
|
|
border-radius: 12px;
|
|
border: 2px solid var(--border);
|
|
background: var(--card);
|
|
color: var(--text);
|
|
cursor: pointer;
|
|
font-weight: 600;
|
|
}
|
|
.toggle-btn.selected { border-color: var(--primary); background: var(--accent-bg); color: var(--accent-text); }
|
|
|
|
.split-options { display: flex; flex-direction: column; gap: 8px; }
|
|
.split-option {
|
|
padding: 12px;
|
|
border-radius: 12px;
|
|
border: 2px solid var(--border);
|
|
cursor: pointer;
|
|
}
|
|
.split-option.selected { border-color: var(--primary); background: var(--accent-bg); color: var(--accent-text); }
|
|
.exact-shares { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
|
|
.exact-shares .field { flex: 1; }
|
|
|
|
.split-slider {
|
|
width: 100%;
|
|
height: 8px;
|
|
border-radius: 999px;
|
|
background: var(--border);
|
|
appearance: none;
|
|
-webkit-appearance: none;
|
|
outline: none;
|
|
margin: 8px 0 4px;
|
|
}
|
|
.split-slider::-webkit-slider-thumb {
|
|
appearance: none;
|
|
-webkit-appearance: none;
|
|
width: 22px;
|
|
height: 22px;
|
|
border-radius: 50%;
|
|
background: var(--primary);
|
|
border: 3px solid var(--card);
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
|
cursor: pointer;
|
|
}
|
|
.split-slider::-moz-range-thumb {
|
|
width: 22px;
|
|
height: 22px;
|
|
border-radius: 50%;
|
|
background: var(--primary);
|
|
border: 3px solid var(--card);
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
|
cursor: pointer;
|
|
}
|
|
.split-slider-amounts { display: flex; gap: 10px; }
|
|
.split-slider-amounts .field { flex: 1; }
|
|
|
|
/* History */
|
|
.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
|
|
.filters select, .filters input {
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
padding: 12px;
|
|
border-radius: 10px;
|
|
border: 1px solid var(--border);
|
|
background: var(--input-bg);
|
|
color: var(--text);
|
|
}
|
|
|
|
.expense-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 12px;
|
|
background: var(--card);
|
|
border-radius: 12px;
|
|
margin-bottom: 8px;
|
|
cursor: pointer;
|
|
}
|
|
.expense-item .cat-icon {
|
|
width: 40px; height: 40px;
|
|
border-radius: 50%;
|
|
display: flex; align-items: center; justify-content: center;
|
|
font-size: 1.2rem;
|
|
flex-shrink: 0;
|
|
}
|
|
.expense-item .details { flex: 1; min-width: 0; }
|
|
.expense-item .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.expense-item .meta {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
font-size: 0.8rem;
|
|
color: var(--muted);
|
|
}
|
|
.expense-item .meta .material-symbols-outlined { font-size: 1rem; }
|
|
.expense-item .amount-col { text-align: right; }
|
|
.expense-item .amount { font-weight: 700; }
|
|
.expense-item .share { font-size: 0.75rem; color: var(--muted); }
|
|
|
|
.settlement-item { cursor: pointer; background: var(--accent-bg); }
|
|
.settlement-item .settlement-icon { background: transparent; color: var(--accent-text); }
|
|
.settlement-item .title { color: var(--accent-text); }
|
|
|
|
.empty-state { text-align: center; color: var(--muted); padding: 40px 20px; }
|
|
|
|
/* Settings */
|
|
.member-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
|
|
|
|
.household-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 10px;
|
|
padding: 10px 0;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.household-row:last-of-type { border-bottom: none; }
|
|
.household-row-main { display: flex; flex-direction: column; gap: 2px; }
|
|
.badge-active {
|
|
background: var(--accent-bg);
|
|
color: var(--accent-text);
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
padding: 4px 10px;
|
|
border-radius: 999px;
|
|
}
|
|
.section-divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
|
|
.category-manage-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
|
|
.category-manage-row-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; background: none; border: none; padding: 0; text-align: left; color: inherit; font: inherit; }
|
|
.category-manage-row-main.editing { color: var(--primary); font-weight: 600; }
|
|
.category-manage-row .icon { font-size: 1.3rem; }
|
|
.category-manage-row .name { flex: 1; }
|
|
.invite-code-row {
|
|
display: flex;
|
|
align-items: stretch;
|
|
gap: 8px;
|
|
margin: 8px 0;
|
|
}
|
|
.invite-code-input {
|
|
flex: 1;
|
|
min-width: 0;
|
|
font-size: 1.4rem;
|
|
font-weight: 700;
|
|
letter-spacing: 3px;
|
|
text-align: center;
|
|
padding: 12px;
|
|
border-radius: 10px;
|
|
border: 1px solid var(--border);
|
|
background: var(--accent-bg);
|
|
color: var(--accent-text);
|
|
}
|
|
.invite-link-input {
|
|
flex: 1;
|
|
min-width: 0;
|
|
font-size: 0.85rem;
|
|
padding: 12px;
|
|
border-radius: 10px;
|
|
border: 1px solid var(--border);
|
|
background: var(--input-bg);
|
|
color: var(--text);
|
|
}
|
|
.invite-code-copy-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0 16px;
|
|
border-radius: 10px;
|
|
border: 1px solid var(--border);
|
|
background: var(--card);
|
|
color: var(--text);
|
|
cursor: pointer;
|
|
}
|
|
.invite-code-hint {
|
|
font-size: 0.8rem;
|
|
color: var(--muted);
|
|
margin-top: 4px;
|
|
}
|
|
.invite-code-hint.success { color: var(--success); }
|
|
.invite-code-hint.error { color: var(--danger); }
|
|
|
|
.switch-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
padding: 8px 0;
|
|
}
|
|
.switch-row .switch-label { display: flex; flex-direction: column; gap: 2px; }
|
|
.switch-desc {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
font-size: 0.8rem;
|
|
color: var(--muted);
|
|
margin: 0;
|
|
}
|
|
.switch-desc .material-symbols-outlined { font-size: 1.1rem; }
|
|
|
|
.switch {
|
|
position: relative;
|
|
display: inline-block;
|
|
width: 48px;
|
|
height: 28px;
|
|
flex-shrink: 0;
|
|
}
|
|
.switch input { opacity: 0; width: 0; height: 0; }
|
|
.switch-track {
|
|
position: absolute;
|
|
inset: 0;
|
|
background: var(--border);
|
|
border-radius: 999px;
|
|
cursor: pointer;
|
|
transition: background 0.15s;
|
|
}
|
|
.switch-track::before {
|
|
content: '';
|
|
position: absolute;
|
|
width: 22px;
|
|
height: 22px;
|
|
left: 3px;
|
|
top: 3px;
|
|
background: white;
|
|
border-radius: 50%;
|
|
transition: transform 0.15s;
|
|
}
|
|
.switch input:checked + .switch-track { background: var(--primary); }
|
|
.switch input:checked + .switch-track::before { transform: translateX(20px); }
|
|
|
|
.page-title { margin-top: 0; }
|
|
|
|
.offline-banner {
|
|
background: #fef3c7;
|
|
color: #92400e;
|
|
text-align: center;
|
|
padding: 8px;
|
|
font-size: 0.85rem;
|
|
}
|
|
.offline-banner--syncing { background: #dbeafe; color: #1e40af; }
|
|
|
|
.install-banner {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
background: var(--accent-bg);
|
|
color: var(--accent-text);
|
|
padding: 10px 12px;
|
|
font-size: 0.85rem;
|
|
}
|
|
.install-banner-text { flex: 1; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
|
|
.install-banner-btn { padding: 8px 14px; white-space: nowrap; }
|
|
.inline-icon { font-size: 1rem; }
|
|
|
|
.modal-actions { display: flex; gap: 10px; }
|
|
.modal-actions button { flex: 1; }
|
|
|
|
.modal-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(15, 23, 42, 0.5);
|
|
display: flex;
|
|
align-items: flex-end;
|
|
justify-content: center;
|
|
z-index: 30;
|
|
}
|
|
.modal-sheet {
|
|
background: var(--card);
|
|
width: 100%;
|
|
max-width: 560px;
|
|
max-height: 90vh;
|
|
overflow-y: auto;
|
|
border-radius: 20px 20px 0 0;
|
|
padding: 20px;
|
|
}
|
|
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
|
|
|
|
.confirm-sheet {
|
|
max-width: 400px;
|
|
border-radius: 20px;
|
|
margin-bottom: 24px;
|
|
text-align: center;
|
|
}
|
|
.confirm-icon {
|
|
width: 56px;
|
|
height: 56px;
|
|
border-radius: 50%;
|
|
background: var(--accent-bg);
|
|
color: var(--accent-text);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin: 0 auto 12px;
|
|
}
|
|
.confirm-icon .material-symbols-outlined { font-size: 28px; }
|
|
.confirm-icon.danger { background: #fee2e2; color: var(--danger); }
|
|
:root[data-theme='dark'] .confirm-icon.danger { background: rgba(239, 68, 68, 0.18); }
|
|
@media (prefers-color-scheme: dark) {
|
|
:root:not([data-theme='light']) .confirm-icon.danger { background: rgba(239, 68, 68, 0.18); }
|
|
}
|
|
.confirm-sheet h3 { margin: 0 0 8px; }
|
|
.confirm-message { color: var(--muted); margin: 0 0 20px; font-size: 0.9rem; }
|
|
.icon-btn { background: none; border: none; font-size: 1.4rem; cursor: pointer; }
|
|
.btn-danger {
|
|
background: var(--danger);
|
|
color: white;
|
|
border: none;
|
|
padding: 12px;
|
|
border-radius: 10px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
}
|