/* Everyday flows: a ledger, grouped wallets, category limits and quiet settings. */
.topbar[hidden] + .notice + #content { margin-top:0; }
.section-intro { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:26px; }
.section-intro p { font-size:15px; }
.section-intro button { flex-shrink:0; }
.filter-chips { display:flex; gap:7px; flex-wrap:wrap; }
.filter-chips .chip { min-height:44px; padding:9px 17px; border:1px solid var(--line); background:var(--paper); color:var(--muted); font-size:13px; }
.filter-chips .chip.active { background:var(--accent-soft); border-color:var(--accent); color:var(--on-accent); }
.search-line { display:flex; gap:12px; margin-bottom:16px; }
.search-field { flex:1; position:relative; margin:0; display:flex; align-items:center; }
.search-field > .bi { position:absolute; left:16px; color:var(--muted); font-size:18px; }
.search-field input { padding-left:45px; background:var(--paper); width:100%; }
.filter-toggle { display:flex; align-items:center; gap:8px; }
.filter-toggle span { background:var(--accent); border-radius:50%; min-width:22px; }
.filter-panel { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:12px; padding:20px 0 0; }
.filter-panel label { margin:0; font-size:12px; }
.filter-panel select { background:var(--paper); }
.ledger-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:14px; font-size:12px; color:var(--muted); }
.ledger-meta > div { display:flex; gap:16px; }
.ledger-meta button { min-height:44px; }
.gesture-hint { color:var(--muted); font-size:12px; margin:0 0 12px; }
.ledger-day { margin:24px 0 10px; font-size:13px; color:var(--muted); font-weight:500; }
.ledger-item { position:relative; background:var(--paper); overflow:hidden; border-bottom:1px solid var(--line); }
.ledger-day + .ledger-item { border-radius:18px 18px 0 0; }
.ledger-item:last-child { border-radius:0 0 18px 18px; border-bottom:0; }
.ledger-front { position:relative; display:grid; grid-template-columns:38px minmax(0,1fr) auto 44px; gap:14px; align-items:center; min-height:92px; padding:16px 18px; background:var(--paper); touch-action:pan-y pinch-zoom; }
.ledger-description { min-width:0; }
.ledger-description strong { font-weight:500; font-size:15px; display:block; overflow-wrap:anywhere; }
.ledger-description span,.ledger-description p { font-size:12px; color:var(--muted); display:block; overflow-wrap:anywhere; margin-top:4px; }
.ledger-description p { color:var(--ink); }
.ledger-value { text-align:right; font-size:15px; font-weight:500; font-variant-numeric:tabular-nums; max-width:240px; overflow-wrap:anywhere; }
.ledger-value small { display:block; color:var(--muted); font-weight:400; font-size:12px; margin-top:5px; }
.swipe-actions { position:absolute; right:0; top:0; bottom:0; display:flex; width:176px; background:var(--accent-soft); }
.swipe-actions button { border:0; width:88px; min-height:44px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:6px; background:var(--accent-soft); color:var(--on-accent); font-size:12px; }
.swipe-actions .bi { font-size:22px; }
.swipe-actions .destructive-action { background:var(--danger); color:white; }
.actions-open .ledger-front { transform:translateX(-176px); }
.actions-open .row-more { visibility:hidden; }
.pagination { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:25px 0; }
.pagination span { color:var(--muted); font-size:12px; text-align:center; }
.pagination button { display:flex; align-items:center; gap:6px; }
.ledger-empty { padding:48px 20px; background:var(--paper); border-radius:20px; }
.ledger-empty > .bi { display:block; font-size:28px; margin-bottom:16px; }
.empty h3 { margin-bottom:10px; }
.empty button { margin-top:18px; }
.owners-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; align-items:start; }
.owner-section { min-width:0; }
.owner-heading { display:flex; align-items:center; gap:10px; padding:0 4px 15px; }
.owner-heading h2 { font-size:20px; flex:1; overflow-wrap:anywhere; }
.account-list { border-radius:22px; overflow:hidden; background:var(--paper); padding:0 18px; }
.account-list-row { display:flex; align-items:center; gap:12px; padding:20px 0; border-bottom:1px solid var(--line); }
.account-list-row:last-child { border:0; }
.currency-badge { display:grid; place-items:center; height:42px; width:48px; flex-shrink:0; font-size:11px; font-weight:600; border-radius:12px; background:var(--surface); color:var(--muted); }
.account-row-main { flex:1; min-width:0; }
.account-row-main strong { display:block; font-weight:400; font-size:13px; color:var(--muted); overflow-wrap:anywhere; }
.account-row-main > span { display:block; font-size:21px; font-weight:500; letter-spacing:-.5px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; margin-top:4px; }
.settings-section { background:var(--paper); border-radius:22px; padding:24px; }
.settings-section h2 { font-size:19px; margin-bottom:18px; }
.settings-section summary { cursor:pointer; min-height:44px; font-size:14px; }
.rates-section { margin-top:28px; }
.rates-section > summary,.archived-accounts > summary { display:flex; align-items:center; gap:10px; }
.rates-section summary > span { margin-left:auto; font-size:12px; }
.rates-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; padding:20px 0; }
.rate-item > strong { font-size:13px; display:block; margin-bottom:7px; }
.settings-layout { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; align-items:start; }
.settings-row { width:100%; display:flex; align-items:center; gap:12px; border:0; border-bottom:1px solid var(--line); text-align:left; padding:15px 0; min-height:56px; background:transparent; color:var(--ink); font-size:14px; }
.settings-row:last-child { border-bottom:0; }
.settings-row > .bi:first-child { font-size:19px; }
.settings-row > .bi:last-child:not(:first-child) { margin-left:auto; color:var(--muted); font-size:13px; }
.settings-section > .small { margin-top:14px; }
.family-members { display:flex; flex-direction:column; gap:18px; margin-bottom:20px; }
.family-members > div { display:flex; align-items:center; gap:10px; }
.family-members strong { flex:1; font-size:15px; font-weight:500; overflow-wrap:anywhere; }
.settings-summary { padding-top:15px; display:flex; justify-content:space-between; }
.category-tags { display:flex; flex-wrap:wrap; gap:8px; padding-top:10px; }
.category-tags > span { font-size:12px; border:1px solid var(--line); border-radius:8px; padding:6px 9px; }
.advanced-settings { border-top:1px solid var(--line); padding-top:18px; margin-top:18px; color:var(--muted); font-size:13px; }
.advanced-settings p { margin:10px 0; }
.advanced-settings pre { overflow:auto; max-width:100%; }
.install-status { font-size:14px; font-weight:500; margin-bottom:12px; }
.install-steps { padding-left:20px; font-size:14px; line-height:1.7; }
.install-steps li { padding-left:4px; margin-bottom:8px; }
.profile-name { font-size:18px; }
.danger-text { color:var(--danger); }
.action-balance { font-size:32px; font-weight:500; margin:18px 0 22px; overflow-wrap:anywhere; }
#action-content > .small { margin-top:20px; }
.back-link { display:flex; align-items:center; gap:8px; min-height:44px; margin-bottom:18px; }
.plan-overview { display:grid; grid-template-columns:1.2fr 1fr; gap:24px; padding:28px; background:var(--accent-soft); border-radius:24px; }
.plan-overview p { color:var(--muted); font-size:13px; margin-bottom:8px; }
.plan-overview strong { font-size:30px; font-weight:500; letter-spacing:-1px; overflow-wrap:anywhere; }
.plan-rule { color:var(--muted); font-size:12px; line-height:1.6; margin:16px 0 22px; }
.plan-list { background:var(--paper); border-radius:22px; padding:0 24px; }
.budget-category { padding:18px 0 22px; border-bottom:1px solid var(--line); }
.budget-category:last-child { border:0; }
.budget-category-top,.budget-numbers { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.budget-category-top h3 { font-size:16px; }
.budget-numbers { margin:8px 0 12px; flex-wrap:wrap; }
.budget-numbers > * { min-width:0; overflow-wrap:anywhere; }
.budget-numbers strong { font-weight:500; font-size:18px; }
.budget-numbers span,.budget-status { color:var(--muted); font-size:12px; }
.budget-status { margin-top:10px; }
.budget-status.danger-text { color:var(--danger); }
.kind-switch { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:22px; }
.kind-switch button { flex:1; min-width:65px; min-height:44px; border:1px solid var(--line); border-radius:12px; background:var(--paper); font-size:13px; color:var(--muted); }
.kind-switch button.active { background:var(--accent-soft); border-color:var(--accent); color:var(--on-accent); }
.amount-field { color:var(--muted); }
.amount-field > span { float:right; color:var(--ink); font-size:14px; }
.amount-field input { font-size:36px; font-weight:500; font-variant-numeric:tabular-nums; letter-spacing:-1px; min-height:74px; background:var(--bg); }
.transaction-details { border-top:1px solid var(--line); margin:10px 0; padding-top:12px; }
.transaction-details summary { display:flex; justify-content:space-between; gap:12px; cursor:pointer; min-height:44px; font-size:13px; }
.transaction-details summary span { color:var(--muted); }
.transaction-details label { margin-top:12px; }
.dialog-actions { position:sticky; bottom:-28px; padding:16px 0 4px; margin-bottom:0; background:var(--paper); z-index:2; }
.dialog-actions > button { min-height:48px; }
.dialog-actions > .primary { flex:1; }
.toast-action { color:var(--accent); background:none; border:0; min-height:44px; padding:4px 12px; margin-left:12px; font-weight:600; }
.toast { display:flex; align-items:center; gap:8px; padding:10px 18px; }
.toast button { flex-shrink:0; }
button:disabled { cursor:default; }
@media(prefers-reduced-motion:no-preference) { .ledger-front { transition:transform 160ms ease-out; } }
@media(max-width:1100px) { .filter-panel { grid-template-columns:repeat(2,minmax(0,1fr)); } .settings-layout { grid-template-columns:1fr; } }
@media(max-width:800px) {
 .sidebar { padding-top:max(18px,env(safe-area-inset-top)); }
 nav { gap:2px; padding:7px 5px max(9px,env(safe-area-inset-bottom)); }
 nav span { font-size:11px; letter-spacing:-.2px; }
 nav button { padding:8px 2px; }
 main { padding-bottom:calc(110px + env(safe-area-inset-bottom)); }
 .topbar { align-items:flex-start; flex-wrap:wrap; }
 .top-actions { flex:1; justify-content:flex-end; }
 .top-actions input { font-size:16px; width:165px; min-width:0; }
 .section-intro { flex-wrap:wrap; gap:16px; margin-bottom:22px; }
 .section-intro p { font-size:14px; }
 .search-line { gap:8px; }
 .filter-toggle { padding:10px 12px; font-size:12px; }
 .search-field input { font-size:16px; padding-left:38px; }
 .search-field > .bi { left:12px; }
 .filter-panel { gap:12px; }
 .filter-panel select { font-size:16px; }
 .ledger-meta { flex-wrap:wrap; gap:0; }
 .ledger-meta > div { margin-left:auto; }
 .ledger-front { grid-template-columns:28px minmax(0,1fr) minmax(70px,auto) 34px; gap:8px; padding:14px 10px; min-height:90px; }
 .ledger-front .tx-icon { width:28px; height:28px; font-size:14px; }
 .ledger-description strong { font-size:14px; }
 .ledger-description span,.ledger-description p { font-size:12px; }
 .ledger-value { font-size:14px; max-width:125px; }
 .ledger-value small { font-size:11px; }
 .row-more { min-width:44px; width:44px; margin-left:-5px; }
 .owners-grid { grid-template-columns:1fr; gap:25px; }
 .owner-heading h2 { font-size:20px; }
 .settings-section { padding:22px 18px; }
 .rates-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .plan-overview { padding:22px 18px; gap:20px; grid-template-columns:1fr; }
 .plan-overview > div + div { border-top:1px solid var(--line); padding-top:15px; }
 .plan-overview strong { font-size:29px; }
 .plan-list { padding:0 18px; }
 dialog { width:100%; max-width:100%; max-height:calc(var(--visible-height,100dvh) - env(safe-area-inset-top) - 12px); margin:auto 0 var(--keyboard-inset,0px); border-radius:26px 26px 0 0; padding:24px 20px max(20px,env(safe-area-inset-bottom)); }
 dialog .form-grid { grid-template-columns:1fr; gap:0; }
 .dialog-actions { bottom:calc(-1 * max(20px,env(safe-area-inset-bottom))); padding-bottom:max(12px,env(safe-area-inset-bottom)); }
 .dialog-head { margin-bottom:20px; gap:12px; }
 .dialog-head h2 { font-size:23px; }
 .toast { bottom:calc(100px + env(safe-area-inset-bottom)); width:max-content; max-width:calc(100vw - 24px); font-size:13px; }
}
@media(max-width:359px) {
 nav span { font-size:10px; }
 .ledger-front { grid-template-columns:minmax(0,1fr) minmax(66px,105px) 34px; }
 .ledger-front > .tx-icon { display:none; }
 .search-line { flex-wrap:wrap; }
 .search-field { flex-basis:100%; }
 .filter-toggle { margin-left:auto; }
 .account-list { padding:0 12px; }
 .account-row-main > span { font-size:19px; }
 .rates-grid { grid-template-columns:1fr; }
}
