@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;450;500;550;600;650;700;800&display=swap');
:root{--green:#39735b;--dark:#243d32;--muted:#8b958f;--line:#e9ede8;--bg:#f7f9f6;--orange:#d69870;--font:'Noto Sans TC',sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:#303d35;font-family:var(--font);font-size:14px;-webkit-font-smoothing:antialiased}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button{border:0;background:none;color:inherit}button:focus-visible,a:focus-visible{outline:3px solid #94baa3;outline-offset:3px}button:hover{filter:brightness(.96)}svg{width:20px;height:20px;flex-shrink:0;vertical-align:middle}a{color:inherit;text-decoration:none}.sidebar{width:220px;position:fixed;inset:0 auto 0 0;background:#fff;border-right:1px solid var(--line);padding:39px 22px 24px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:12px;font-size:25px;font-weight:700;letter-spacing:2px;padding-left:10px}.brand-icon{background:var(--green);color:white;width:43px;height:45px;border-radius:14px 14px 14px 4px;display:grid;place-items:center}.brand-icon svg{width:26px;height:26px}.brand small{font-size:9px;letter-spacing:1.6px;font-weight:400;display:block;margin-top:6px;color:#8e9991}.book-label{font-size:10px;color:#9ca59e;margin:51px 13px 18px;letter-spacing:1px}.book-label span{font-size:8px;float:right;margin-top:2px;color:#b2b9b4}nav{display:flex;flex-direction:column;gap:9px}nav button{height:48px;text-align:left;display:flex;align-items:center;gap:14px;border-radius:9px;padding:0 16px;font-size:13px;color:#7d8981;letter-spacing:.8px}nav button.active{background:#edf4ed;color:var(--green);font-weight:600}nav button.active:after{content:'';width:5px;height:5px;border-radius:50%;background:var(--green);margin-left:auto}nav button svg{width:19px;height:19px}.sidebar-bottom{margin-top:auto;padding:28px 13px 0}.little-home{color:#7f9c83;margin-bottom:14px}.little-home svg{width:29px;height:29px}.sidebar-bottom p{font-size:12px;color:#96a195;line-height:2;letter-spacing:1px}.storage{border-top:1px solid var(--line);font-size:10px;color:#9da69f;padding-top:22px;margin-top:28px;display:flex;align-items:center;gap:7px}.status-dot{height:6px;width:6px;background:#8eaf8d;border-radius:50%}.main-shell{margin-left:220px}.topbar{height:78px;border-bottom:1px solid var(--line);padding:0 44px;display:flex;align-items:center;justify-content:space-between;background:#fff9}.breadcrumb{font-size:12px;color:#929d95}.breadcrumb span{margin:0 15px;color:#bdc6bf}.breadcrumb strong{font-weight:500;color:#606f63}.topbar-right{display:flex;align-items:center;gap:22px}.currency{font-size:10px;letter-spacing:.6px;color:#8c978f}.family-avatar{width:33px;height:33px;border-radius:50%;background:#e9eee2;color:#657b51;display:grid;place-items:center}.family-avatar svg{width:16px}main{max-width:1450px;margin:auto;padding:33px 44px 16px}.page-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:27px}.eyebrow{font-size:9px;letter-spacing:2.1px;font-weight:600;color:#91a48f}h1{font-size:27px;letter-spacing:1.2px;font-weight:600;margin:9px 0 7px}.page-heading p{font-size:12px;color:#8c978e;margin:0;letter-spacing:.4px}.primary{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--green);color:#fff;padding:12px 22px;border-radius:8px;font-size:12px;font-weight:500;box-shadow:0 4px 9px #39735b0c}.primary svg{width:17px;height:17px}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}.member-filters{display:flex;gap:5px;flex-wrap:wrap}.member-chip{border:1px solid transparent;display:flex;align-items:center;gap:7px;border-radius:22px;padding:7px 12px;font-size:11px;color:#8e988f;white-space:nowrap}.member-chip.active{background:white;border-color:#d9e2d8;color:#42634b;box-shadow:0 2px 3px #30412d03}.member-chip svg{width:14px;height:14px}.avatar{display:inline-grid;place-items:center;width:25px;height:25px;border-radius:50%;font-size:10px;background:var(--avatar-bg);color:var(--avatar-color);flex-shrink:0}.member-chip .avatar{width:21px;height:21px;font-size:9px}.month-picker{display:flex;align-items:center;background:white;border:1px solid #e3e8e1;border-radius:7px;padding:3px}.month-picker>button{height:29px;width:25px;padding:0;color:#8a958c}.month-picker>button svg{width:13px;height:13px}.month-input{display:flex;align-items:center;gap:8px;padding:0 8px}.month-input svg{width:14px;color:#7a887a}.month-input input{border:0;background:transparent;width:117px;font-size:11px;color:#58665a;outline:none;padding:3px 0}.demo-note{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 14px;background:#edf2e9;border-radius:7px;font-size:10px;color:#829077;margin-bottom:20px}.demo-note>span,.demo-note button{display:flex;align-items:center;gap:7px}.demo-note svg{width:13px;height:13px}.demo-note button{font-size:10px;color:#5b7755}.demo-tag{background:#e3eadd;border-radius:4px;padding:2px 6px;font-size:9px}.summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:17px;margin-bottom:24px}.stat-card{border:1px solid var(--line);border-radius:12px;background:white;padding:20px 21px 17px;position:relative;overflow:hidden}.stat-label{display:flex;align-items:center;gap:9px;color:#7c8a80;font-size:11px}.stat-icon{width:29px;height:29px;display:grid;place-items:center;background:#edf4ec;border-radius:8px;color:#709477}.stat-icon svg{width:15px;height:15px}.stat-card.expense .stat-icon{background:#fbf0e8;color:#ca956e}.stat-value{font-family:var(--font);font-size:27px;letter-spacing:.2px;font-weight:550;margin:13px 0 11px;white-space:nowrap}.stat-value small{font-size:13px;font-weight:400;margin-right:5px;color:#92a294}.stat-detail{font-size:10px;color:#9aa49b;display:flex;gap:5px;align-items:center}.stat-detail svg{width:12px;height:12px}.stat-card.balance{background:#eaf1e6;border-color:#e0e9da}.stat-card.balance .stat-value{color:#41633b}.stat-card.balance .stat-icon{background:#dce9d5;color:#628258}.stat-card.saving .stat-icon{background:#f3f0df;color:#a59c69}.stat-card.saving .stat-value{color:#626d49}.stat-detail em{font-style:normal;color:#698a67}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,1fr);gap:22px;margin-bottom:24px}.panel{background:white;border:1px solid var(--line);border-radius:12px;overflow:hidden}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:21px 23px 9px}.panel h2{font-size:14px;font-weight:600;margin:0;letter-spacing:.6px}.panel-subtitle{font-size:10px;color:#9aa298;margin-top:6px}.panel-head .link{font-size:10px;color:#929e92;display:flex;align-items:center;gap:5px;white-space:nowrap}.link svg{width:13px;height:13px}.legend{display:flex;gap:15px;font-size:9px;color:#929b94;align-items:center}.legend span{display:flex;align-items:center;gap:6px}.dot{width:7px;height:7px;border-radius:50%;display:inline-block;flex-shrink:0}.trend{padding:0 12px 6px 13px;min-height:220px}.trend svg{width:100%;height:223px;display:block;overflow:visible}.chart-label{font-size:10px;fill:#a4ada5;font-family:var(--font)}.donut-content{display:flex;gap:20px;align-items:center;justify-content:space-evenly;padding:27px 23px 29px;min-height:224px}.donut{width:156px;height:156px;border-radius:50%;position:relative;display:grid;place-items:center;flex-shrink:0;transform:rotate(-90deg)}.donut:before{content:'';position:absolute;inset:20px;border-radius:50%;background:white}.donut-center{position:relative;transform:rotate(90deg);text-align:center}.donut-center small{display:block;font-size:10px;color:#a1a99f;margin-bottom:7px}.donut-center strong{font-size:20px;font-weight:550}.category-list{display:flex;flex-direction:column;gap:13px;flex:1;max-width:170px}.category-line{display:flex;align-items:center;gap:6px;font-size:10px;white-space:nowrap}.category-line .category-name{color:#879181}.category-line b{margin-left:auto;font-size:10px;color:#5d6c5b;font-weight:500}.lower-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,1fr);gap:22px}.table-wrap{overflow-x:auto}.transactions-table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap}.transactions-table th{font-weight:400;font-size:10px;color:#a3aca4;padding:14px 22px 11px;border-bottom:1px solid #f0f2ee}.transactions-table td{padding:13px 22px;border-bottom:1px solid #f1f3ef;font-size:11px}.transactions-table tr:last-child td{border-bottom:0}.transactions-table tbody tr{cursor:pointer}.transactions-table tbody tr:hover{background:#f8faf6}.transactions-table th:last-child,.transactions-table td:last-child{text-align:right}.transaction-info{display:flex;align-items:center;gap:10px}.category-icon{width:32px;height:32px;display:grid;place-items:center;border-radius:9px;color:#8d9f74;background:#f0f3e9;flex-shrink:0}.category-icon svg{width:16px;height:16px}.transaction-name{font-size:11px;font-weight:500;max-width:170px;overflow:hidden;text-overflow:ellipsis}.transaction-note{font-size:9px;color:#a3aaa1;margin-top:4px}.member-mini{display:flex;align-items:center;gap:6px;color:#859080}.transaction-amount{font-weight:500;font-variant-numeric:tabular-nums;color:#596353}.income-text{color:#588b63}.member-summary{padding:8px 23px 19px}.member-row{padding:14px 0}.member-row+.member-row{border-top:1px solid #f0f3ed}.member-row-top{display:flex;align-items:center;gap:9px;font-size:11px;margin-bottom:9px}.member-row-top .avatar{width:28px;height:28px}.member-row-top b{margin-left:auto;font-size:11px;font-weight:500}.member-row-top small{font-size:9px;color:#9da796}.member-bar{height:5px;background:#f1f4ed;border-radius:5px;margin-left:37px;overflow:hidden}.member-bar span{display:block;height:100%;border-radius:5px}.page-foot{font-size:9px;color:#afb6ac;display:flex;justify-content:center;gap:6px;align-items:center;margin:24px 0 3px;letter-spacing:.6px}.page-foot svg{width:11px;height:11px}.empty{text-align:center;padding:45px 15px;color:#9aa696;font-size:12px;line-height:2}.empty svg{width:30px;height:30px;margin-bottom:12px;display:block;margin-inline:auto}.records-tools{display:flex;gap:12px;padding:12px 23px 20px}.search-box{position:relative;flex:1}.search-box svg{position:absolute;left:12px;top:11px;color:#8f9d8b;width:16px;height:16px}.search-box input{padding-left:38px!important}.records-tools select{width:120px}.records-count{padding:13px 23px;border-top:1px solid var(--line);color:#98a291;font-size:10px}.members-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-top:15px}.member-card{padding:26px;border:1px solid var(--line);border-radius:12px;background:#fff}.member-card-top{display:flex;align-items:center;gap:12px}.member-card-top .avatar{width:47px;height:47px;font-size:18px}.member-card-top h2{font-size:15px;margin:0 0 5px}.member-card-top small{font-size:10px;color:#9aa293}.member-card-top button{margin-left:auto}.member-card-numbers{display:flex;justify-content:space-between;margin-top:27px}.member-card-numbers small{display:block;font-size:10px;color:#9aa293;margin-bottom:8px}.member-card-numbers strong{font-size:19px;font-weight:500}.member-card .secondary{width:100%;margin-top:23px;font-size:11px}.section-heading{display:flex;justify-content:space-between;align-items:center;margin:8px 0 22px}.section-heading h2{font-size:16px;font-weight:500;margin:0}.analysis-details{padding:12px 23px 25px}.analysis-item{padding:13px 0;border-bottom:1px solid var(--line)}.analysis-item:last-child{border:0}.analysis-item-top{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin-bottom:11px}.analysis-item-top span{display:flex;gap:9px;align-items:center}.analysis-item-top b{font-weight:500}.analysis-item-top small{font-size:10px;color:#9aa291;margin-left:9px}.wide-bar{height:7px;border-radius:9px;background:#f3f5ef;overflow:hidden}.wide-bar span{display:block;height:100%;border-radius:9px}.analysis-note{background:#edf3e9;padding:20px 24px;border-radius:10px;display:flex;gap:12px;align-items:center;line-height:1.9;font-size:12px;color:#74816b;margin-top:22px}.analysis-note svg{color:#76956c}.secondary{border:1px solid #dfe6da;background:#fff;border-radius:7px;padding:10px 15px;font-size:12px;color:#6b7c61}.icon-button{padding:6px;color:#a1aa9c;display:grid;place-items:center}.icon-button svg{width:17px;height:17px}dialog{border:1px solid #e3e9de;border-radius:18px;padding:28px;width:440px;max-width:calc(100% - 32px);color:#344334;background:#fff;box-shadow:0 24px 100px #23372630;max-height:90dvh;overflow-y:auto}dialog::backdrop{background:#253a3155;backdrop-filter:blur(4px)}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:21px}.dialog-head h2{font-size:22px;font-weight:600;margin:6px 0 0}form>label,.form-grid>label{display:block;font-size:12px;color:#7c8c73;margin-top:18px}input:not([type=radio]),select{border:1px solid #e0e7db;border-radius:7px;padding:11px 12px;width:100%;background:#fff;color:#4f604a;outline:none;font-size:13px}input:focus,select:focus{border-color:#7c9d72!important;box-shadow:0 0 0 3px #7c9d7210}form>label input,form>label select,.form-grid input,.form-grid select{margin-top:8px}input::placeholder{color:#aeb6a8}.type-toggle{display:flex;padding:4px;background:#f1f4ee;border-radius:9px;gap:4px}.type-toggle label{flex:1;cursor:pointer}.type-toggle input{position:absolute;opacity:0;pointer-events:none}.type-toggle span{display:block;text-align:center;padding:10px;border-radius:6px;font-size:13px;color:#8c9884}.type-toggle input:checked+span{background:white;box-shadow:0 2px 7px #3443340a;color:#527448}.type-toggle input:focus-visible+span{outline:2px solid var(--green)}.amount-input{display:flex;gap:12px;align-items:center;border-bottom:1px solid #dfe7d9;padding:8px 0}.amount-input>span{font-size:19px;color:#8b9f7e}.amount-input input{border:0!important;font-size:36px;padding:4px 0;margin:0;font-weight:500;box-shadow:none!important}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;align-items:center;margin-top:27px}.dialog-actions .danger{margin-right:auto}.danger{font-size:11px;color:#b87d6b;padding:8px 0}.hint{font-size:11px;line-height:1.8;color:#97a18d;margin-top:-5px}.form-error{font-size:11px;color:#b5705b;margin:12px 0 0}.form-error:empty{display:none}.color-options{display:flex;gap:13px;margin-top:15px}.color-options label{cursor:pointer}.color-options input{position:absolute;opacity:0}.color-options span{display:block;width:31px;height:31px;border-radius:50%;border:3px solid white}.color-options input:checked+span{outline:2px solid #648358}.color-options input:focus-visible+span{outline:3px solid var(--green)}#toast{position:fixed;bottom:28px;left:calc(50% + 110px);transform:translateX(-50%) translateY(20px);background:#36533b;color:#fff;padding:13px 23px;border-radius:10px;box-shadow:0 4px 25px #25402b20;opacity:0;pointer-events:none;transition:.25s;font-size:12px;z-index:10}#toast.show{opacity:1;transform:translateX(-50%)}[hidden]{display:none!important}
@media(min-width:1500px){main{padding-top:40px}.dashboard-grid,.lower-grid{grid-template-columns:minmax(0,1.6fr) minmax(340px,1fr)}.trend svg{height:246px}.donut-content{min-height:247px}.donut{width:175px;height:175px}.donut:before{inset:23px}.stat-card{padding:24px}.stat-value{font-size:32px}}@media(max-width:1200px){.sidebar{width:190px;padding-left:15px;padding-right:15px}.main-shell{margin-left:190px}main{padding:28px}.topbar{padding:0 28px}.summary-grid{gap:12px}.stat-card{padding:17px 15px}.stat-value{font-size:24px}.dashboard-grid,.lower-grid{gap:16px;grid-template-columns:minmax(0,1.4fr) minmax(270px,1fr)}.donut-content{gap:13px;padding:25px 15px}.donut{width:134px;height:134px}.donut:before{inset:17px}.donut-center strong{font-size:18px}.transactions-table td,.transactions-table th{padding-left:16px;padding-right:16px}.panel-head{padding-left:18px;padding-right:18px}.brand{font-size:23px;padding-left:7px}.brand-icon{width:38px;height:40px}.book-label{font-size:9px}.book-label span{display:none}}
@media(max-width:1000px){.sidebar{width:170px;padding-inline:12px}.main-shell{margin-left:170px}.brand{gap:8px;font-size:22px}.brand small{font-size:8px;letter-spacing:1px}.brand-icon{width:35px;height:38px}nav button{font-size:12px;padding:0 12px;gap:10px}main{padding:25px 22px}.toolbar{align-items:flex-start}.member-filters{gap:2px}.member-chip{padding:6px 8px}.summary-grid{gap:10px}.stat-card{padding:14px 12px}.stat-label{gap:5px;font-size:10px}.stat-value{font-size:21px}.stat-detail{font-size:9px}.dashboard-grid,.lower-grid{grid-template-columns:1fr}.donut-content{min-height:220px;justify-content:center;gap:45px}.donut{width:160px;height:160px}.members-grid{grid-template-columns:repeat(2,1fr)}.sidebar-bottom{padding-left:8px}#toast{left:calc(50% + 85px)}}
@media(max-width:680px){.sidebar{position:fixed;top:auto;bottom:0;left:0;right:0;width:auto;height:68px;padding:0 7px;background:#fffffff5;backdrop-filter:blur(15px);z-index:5;border-top:1px solid var(--line);border-right:0}.brand,.book-label,.sidebar-bottom{display:none}nav{flex-direction:row;gap:0;height:100%;justify-content:space-around}nav button{flex:1;flex-direction:column;justify-content:center;gap:5px;height:100%;font-size:9px;border-radius:0;padding:0}nav button.active{background:transparent;color:#3a7859}nav button.active:after{display:none}nav button svg{width:21px;height:21px}.main-shell{margin-left:0}.topbar{height:58px;padding:0 20px}.breadcrumb{font-size:10px}.breadcrumb span{margin:0 10px}.topbar-right{gap:12px}.currency{font-size:9px}.family-avatar{width:28px;height:28px}main{padding:25px 18px 82px}.page-heading{margin-bottom:25px}.eyebrow{font-size:8px;letter-spacing:1.8px}h1{font-size:23px;margin-top:8px}.page-heading p{font-size:11px}.primary{padding:11px 16px;font-size:11px}.toolbar{flex-direction:column-reverse;gap:14px;align-items:stretch;margin-bottom:17px}.month-picker{align-self:flex-start}.member-filters{gap:3px;flex-wrap:nowrap;overflow:auto;margin-right:-18px;padding-right:18px}.member-chip{padding:6px 9px;font-size:10px}.demo-note{padding:10px;font-size:9px}.demo-note>span{gap:4px}.demo-note .demo-tag{font-size:8px;padding:2px 4px}.demo-note button{font-size:9px;gap:0;white-space:nowrap}.demo-note svg{width:11px;height:11px}.summary-grid{grid-template-columns:repeat(2,1fr);gap:11px;margin-bottom:17px}.stat-card{padding:16px}.stat-value{font-size:27px;margin:10px 0}.stat-label{font-size:10px;gap:8px}.stat-detail{font-size:9px}.stat-icon{width:27px;height:27px}.dashboard-grid,.lower-grid{gap:17px;margin-bottom:17px}.panel-head{padding:20px 18px 7px}.panel h2{font-size:13px}.legend{gap:10px}.trend{padding-left:7px;padding-right:7px}.trend svg{height:218px}.donut-content{gap:32px;padding:24px 25px;min-height:215px}.donut{width:145px;height:145px}.donut-center strong{font-size:19px}.category-list{gap:13px}.category-line{font-size:10px}.transactions-table td,.transactions-table th{padding:12px}.transactions-table .date-col{display:none}.transaction-info{gap:7px}.transaction-name{max-width:130px;font-size:10px}.transaction-note{font-size:8px}.category-icon{width:29px;height:29px}.member-mini{font-size:10px;gap:5px}.member-mini .avatar{width:21px;height:21px;font-size:9px}.transaction-amount{font-size:11px}.members-grid{grid-template-columns:1fr}.records-tools{padding:13px;gap:8px}.records-tools select{width:100px;font-size:11px}.records-tools input{font-size:11px}.section-heading h2{font-size:14px}.analysis-item-top{font-size:11px}#toast{left:50%;bottom:85px;white-space:nowrap;max-width:90%;font-size:11px}.page-foot{font-size:8px;margin-top:20px}dialog{padding:23px}.dialog-head h2{font-size:21px}.color-options{gap:10px}.color-options span{width:29px;height:29px}}

.month-input{position:relative;height:30px;min-width:130px;justify-content:center;font-size:11px;color:#58665a;cursor:pointer}.month-input input[type=month]{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;padding:0;border:0;cursor:pointer}.month-input:focus-within{outline:2px solid #91ad82;border-radius:4px}.month-input span{pointer-events:none}.stat-card .stat-value{font-variant-numeric:tabular-nums}
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.category-panel{overflow:hidden}.category-panel .panel-head{align-items:center;padding-bottom:16px}.category-panel .panel-head .secondary{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}.category-panel .panel-head .secondary svg{width:14px;height:14px}.category-settings-list{padding:0 22px 13px}.category-setting-row{display:flex;align-items:center;gap:12px;min-height:61px;border-top:1px solid var(--line)}.category-setting-name{flex:1;font-size:12px;font-weight:500;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.category-setting-row .icon-button{flex-shrink:0}.category-setting-row .icon-button:disabled{opacity:.35;cursor:not-allowed}.category-setting-row .icon-button:disabled:hover{filter:none}.category-remove{color:#b87d6b}#category-delete-dialog>label{display:block;font-size:12px;color:#7c8c73;margin-top:18px}#category-transfer{display:block;margin-top:8px}@media(max-width:1000px){.settings-grid{grid-template-columns:1fr}}@media(max-width:680px){.settings-grid{gap:17px}.category-settings-list{padding:0 17px 10px}.category-panel .panel-head{padding:18px 17px 13px}.category-setting-row{min-height:58px}.category-panel .panel-head .secondary{padding:8px 10px;font-size:10px}}
[hidden]{display:none!important}
body.auth-pending .sidebar,body.auth-pending .main-shell{visibility:hidden}
.auth-screen{position:fixed;inset:0;z-index:100;display:grid;place-items:center;background:#f7f9f7;padding:20px}
.auth-card{width:min(100%,390px);background:#fff;border:1px solid #e3e9de;border-radius:18px;padding:34px;box-shadow:0 24px 80px #334d3520}
.auth-mark{width:46px;height:46px;display:grid;place-items:center;background:#e8f0e4;color:#6f946c;border-radius:13px;margin-bottom:20px}
.auth-mark svg{width:25px;height:25px}
.auth-card h1{font-size:24px;margin:0 0 7px;color:#344334}
.auth-card p{font-size:12px;color:#899685;margin:0 0 22px}
.auth-card label{display:block;font-size:12px;color:#687963;margin:15px 0}
.auth-card input{margin-top:7px}
.auth-card .primary{width:100%;margin-top:10px}
.auth-card .form-error{color:#bb5e5e;margin:15px 0 0;min-height:18px}
.account-button,.logout-button{border:0;background:transparent;color:#657963;font-size:12px;padding:8px;cursor:pointer}
.account-button{font-weight:600}
.logout-button{color:#9a9f95}
.account-list{padding:4px 24px}
.account-row{display:flex;align-items:center;gap:14px;padding:17px 0;border-bottom:1px solid #edf1eb}
.account-row:last-child{border-bottom:0}
.account-badge{height:36px;width:36px;display:grid;place-items:center;border-radius:50%;background:#e8efe4;color:#668860;font-weight:600}
.account-name{flex:1;min-width:0}
.account-name strong,.account-name small{display:block}
.account-name strong{font-size:13px;color:#445441}
.account-name small{font-size:10px;color:#9aa795;margin-top:4px}
.assigned-member{display:flex;flex-direction:column;justify-content:flex-end;font-size:12px;color:#7c8c73;margin-top:18px}
.assigned-member strong{display:flex;align-items:center;min-height:42px;margin-top:8px;padding:10px 12px;border:1px solid #e0e7db;border-radius:7px;background:#f7f9f5;color:#4f604a;font-size:13px;font-weight:500}
.role-pill{padding:6px 10px;border-radius:20px;background:#f0f4ed;color:#6e8268;font-size:11px}
.active-option{display:flex!important;align-items:center;gap:8px}
.active-option input{width:auto!important;margin:0!important}
body.role-viewer #new-member,body.role-viewer [data-edit-member],body.role-viewer [data-add-category],body.role-viewer [data-edit-category],body.role-viewer [data-delete-category]{display:none!important}
body.role-viewer .transactions-table tbody tr{cursor:default}
@media(max-width:600px){.account-row{gap:8px}.role-pill{font-size:10px}.account-list{padding:4px 14px}.auth-card{padding:26px}}

/* Larger type throughout the ledger. */
body{font-size:16px;line-height:1.45}
.brand small{font-size:11px}
.book-label{font-size:12px}
.book-label span{font-size:10px}
nav button{font-size:15px}
.sidebar-bottom p{font-size:14px}
.storage,.currency,.panel-subtitle,.panel-head .link,.records-count,.page-foot{font-size:12px}
.breadcrumb,.page-heading p,.secondary,.analysis-item-top,.analysis-note{font-size:14px}
.eyebrow,.legend{font-size:11px}
h1{font-size:30px}
.primary,.empty,.member-row-top,.member-row-top b,.category-setting-name,.account-name strong,.assigned-member,.auth-card p,.auth-card label{font-size:14px}
.member-chip,.stat-label,.category-line,.category-line b,.member-mini,.member-card .secondary,.account-button,.logout-button{font-size:13px}
.month-input,.month-input input,.stat-detail,.donut-center small,.transaction-note,.member-row-top small,.member-card-top small,.member-card-numbers small,.analysis-item-top small,.account-name small,.role-pill{font-size:12px}
.stat-value small{font-size:15px}
.panel h2{font-size:17px}
.chart-label{font-size:12px}
.donut-center strong{font-size:22px}
.transactions-table th{font-size:12px}
.transactions-table td,.transaction-name,.transaction-amount{font-size:14px}
.member-card-top h2{font-size:18px}
.member-card-numbers strong{font-size:21px}
.section-heading h2{font-size:19px}
form>label,.form-grid>label,#category-delete-dialog>label{font-size:14px}
input:not([type=radio]),select,.assigned-member strong{font-size:15px}
.type-toggle span{font-size:15px}
.danger,.hint,.form-error{font-size:13px}
#toast{font-size:14px}
.category-panel .panel-head .secondary{font-size:12px}

@media(max-width:1000px){
  nav button{font-size:14px}
  .stat-label{font-size:12px}
  .stat-detail{font-size:11px}
}
@media(max-width:680px){
  nav button{font-size:12px}
  .breadcrumb{font-size:12px}
  .currency,.eyebrow{font-size:10px}
  h1{font-size:26px}
  .page-heading p,.primary,.member-chip{font-size:13px}
  .stat-value{font-size:27px}
  .stat-label{font-size:12px}
  .stat-detail{font-size:11px}
  .panel h2{font-size:16px}
  .chart-label{font-size:11px}
  .category-line,.category-line b{font-size:12px}
  .transaction-name,.transaction-amount,.member-mini{font-size:12px}
  .transaction-note,.page-foot{font-size:11px}
  .records-tools input,.records-tools select{font-size:13px}
  .section-heading h2{font-size:17px}
  .analysis-item-top{font-size:13px}
  #toast{font-size:13px}
}

/* Flexible content widths keep longer names and amounts inside their panels. */
.main-shell,main,#content,.panel,.stat-card,.search-box{min-width:0}
.summary-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.members-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.form-grid>*{min-width:0}
input:not([type=radio]),select{min-width:0;max-width:100%}
.primary,.secondary,.role-pill,.logout-button{flex-shrink:0;white-space:nowrap}
.page-heading{gap:16px;flex-wrap:wrap}
.page-heading>div{min-width:0;flex:1 1 230px}
.panel-head>div,.transaction-info>div,.member-card-top>div{min-width:0}
.panel-head h2,.section-heading h2{min-width:0;overflow-wrap:anywhere}
.stat-detail{flex-wrap:wrap;line-height:1.7}
.stat-value{white-space:normal;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.stat-value:has(.stat-number) small{display:block;margin:0 0 3px;font-size:12px}
.stat-number{display:block;line-height:1.3}
.stat-number.long-value{font-size:.76em}
.transaction-info{min-width:0}
.transaction-name{white-space:normal;overflow-wrap:anywhere;max-width:100%;line-height:1.6}
.transaction-note{white-space:normal;overflow-wrap:anywhere;line-height:1.6}
.member-mini>span,.member-row-top>span:not(.avatar),.member-card-top h2{min-width:0;overflow-wrap:anywhere}
.member-row-top b{overflow-wrap:anywhere;text-align:right}
.member-row-top small{display:block;white-space:nowrap}
.category-line{white-space:normal;align-items:flex-start}
.category-line .dot{margin-top:6px}
.category-name{min-width:0;overflow-wrap:anywhere}
.category-line b{flex-shrink:0;white-space:nowrap}
.analysis-item-top{gap:14px;align-items:flex-start}
.analysis-item-top>span{min-width:0;overflow-wrap:anywhere}
.analysis-item-top>b{flex-shrink:0;text-align:right;font-variant-numeric:tabular-nums}
.analysis-item-top small{display:block;margin:3px 0 0}
.analysis-note>span{min-width:0;overflow-wrap:anywhere}
.account-badge{flex-shrink:0}
.account-name strong,.account-name small{overflow-wrap:anywhere}
.category-setting-name{white-space:normal;overflow-wrap:anywhere;padding-block:10px}
.dialog-head{gap:12px}
.dialog-head h2{overflow-wrap:anywhere}
.dialog-head .icon-button{flex-shrink:0;width:36px;height:36px}
.dialog-actions{flex-wrap:wrap}
.color-options{flex-wrap:wrap}
.form-error,.hint{overflow-wrap:anywhere}
.mobile-date{display:none}
#toast{white-space:normal;overflow-wrap:anywhere;text-align:center;width:max-content;max-width:min(90vw,480px)}
@media (min-width:681px) and (max-width:1100px){
 .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .members-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .topbar{gap:16px;padding-inline:22px}
 .topbar-right{gap:8px;min-width:0}
 .account-button{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .currency{display:none}
}
@media (max-width:680px){
 main{padding:22px 16px calc(88px + env(safe-area-inset-bottom))}
 .topbar{padding:0 16px;gap:10px}
 .breadcrumb{white-space:nowrap;font-size:11px;flex-shrink:0}
 .breadcrumb span{margin-inline:6px}
 .topbar-right{min-width:0;gap:2px}
 .currency{display:none}
 .account-button{min-width:0;max-width:115px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:5px}
 .logout-button{padding-inline:5px;font-size:12px}
 .sidebar{height:calc(68px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom)}
 nav button{min-width:0;white-space:nowrap;letter-spacing:0;font-size:11px}
 .page-heading{gap:14px;margin-bottom:22px}
 h1{font-size:24px;letter-spacing:.5px;line-height:1.5}
 .page-heading p{line-height:1.7;overflow-wrap:anywhere}
 .member-filters{flex-wrap:wrap;overflow:visible;margin:0;padding:0;gap:5px}
 .member-chip{max-width:100%;white-space:normal;text-align:left;overflow-wrap:anywhere;min-height:36px}
 .member-chip.active{border-color:#ccdcca}
 .month-picker{max-width:100%;flex-shrink:0}
 .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .stat-card{padding:14px 12px}
 .stat-label{gap:6px;font-size:12px;white-space:nowrap}
 .stat-icon{flex-shrink:0;width:24px;height:24px}
 .stat-value{font-size:clamp(20px,5.5vw,28px);margin-block:12px 8px}
 .stat-number.long-value{font-size:clamp(12px,3.6vw,20px)}
 .stat-detail{font-size:11px;gap:3px}
 .stat-detail em{display:block;flex-basis:100%}
 .panel-head{padding:18px 16px 10px;flex-wrap:wrap;gap:8px}
 .panel h2{font-size:16px}
 .panel-subtitle,.panel-head .link{font-size:11px}
 .legend{white-space:nowrap}
 .donut-content{flex-direction:column;gap:22px;padding:20px 20px 24px}
 .donut{width:160px;height:160px}
 .donut-center strong{font-size:18px;max-width:120px;overflow-wrap:anywhere}
 .category-list{max-width:none;width:100%;gap:12px}
 .category-line{gap:9px;font-size:13px}
 .category-line b{font-size:13px}
 .trend{min-height:0;padding:8px 6px 12px}
 .trend svg{height:auto;aspect-ratio:560/210}
 .table-wrap{overflow:visible}
 .transactions-table,.transactions-table tbody{display:block;width:100%;white-space:normal}
 .transactions-table thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .transactions-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px 12px;padding:15px 16px;border-bottom:1px solid var(--line)}
 .transactions-table tbody tr:last-child{border-bottom:0}
 .transactions-table td{display:block;min-width:0;padding:0;border:0}
 .transactions-table td:first-child{grid-column:1 / -1}
 .transactions-table .date-col{display:none}
 .transactions-table td:last-child{align-self:center;text-align:right}
 .transaction-info{align-items:flex-start;gap:10px}
 .transaction-name{font-size:14px;max-width:none}
 .transaction-note{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:11px}
 .mobile-date{display:inline;white-space:nowrap;color:#879181}
 .member-mini{font-size:12px;align-items:flex-start;line-height:1.7}
 .transaction-amount{font-size:14px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
 .records-tools{flex-wrap:wrap;padding:12px 16px 16px}
 .search-box{flex:1 1 180px}
 .records-tools select{flex:0 0 106px}
 .members-grid{grid-template-columns:minmax(0,1fr)}
 .member-card{padding:20px}
 .member-card-numbers{gap:16px}
 .member-card-numbers>div{min-width:0;flex:1}
 .member-card-numbers strong{font-size:20px;overflow-wrap:anywhere}
 .member-summary{padding-inline:16px}
 .member-row-top{gap:8px}
 .member-row-top>span:not(.avatar){flex:1}
 .member-row-top b{max-width:55%;font-size:13px}
 .analysis-details{padding:4px 16px 18px}
 .analysis-item-top{flex-wrap:wrap;gap:8px}
 .analysis-item-top>b{margin-left:auto;max-width:100%;overflow-wrap:anywhere}
 .analysis-note{padding:16px;font-size:13px;align-items:flex-start}
 .section-heading{gap:12px;flex-wrap:wrap}
 .section-heading .panel-subtitle{display:block;margin-top:4px}
 .account-row{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:8px 10px}
 .account-badge{grid-column:1;grid-row:1 / 3}
 .account-name{grid-column:2;grid-row:1 / 3}
 .account-row .role-pill{grid-column:3;grid-row:1;justify-self:center;font-size:11px;padding:4px 8px}
 .account-row .secondary{grid-column:3;grid-row:2;padding:8px 12px}
 dialog{padding:20px;width:440px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);overscroll-behavior:contain}
 .dialog-head h2{font-size:21px}
 .form-grid{gap:12px}
 input:not([type=radio]),select{font-size:16px}
 input[type=date]{appearance:none;-webkit-appearance:none;display:block;min-height:46px}
 .assigned-member strong{font-size:14px;overflow-wrap:anywhere}
 .amount-input input{font-size:32px}
 .dialog-actions{gap:8px}
 .dialog-actions .primary,.dialog-actions .secondary{padding:11px 14px}
 #toast{bottom:calc(82px + env(safe-area-inset-bottom))}
 .auth-screen{overflow-y:auto}
 .auth-card{padding:26px 22px}
}
@media (max-width:360px){
 .form-grid{grid-template-columns:minmax(0,1fr)}
 .dialog-actions .danger{flex-basis:100%;text-align:left}
 .stat-label{font-size:11px}
 .stat-card{padding:12px 10px}
 .category-panel .panel-head .secondary{padding:8px;font-size:11px}
}
