/* App layout for phones; desktop continues using the existing layout. */
.mobile-appbar,.mobile-bottom-nav,.expense-cards{display:none}
@media(max-width:800px){
 :root{--ink:#25334b;--green:#465bd8;--paper:#f3f5fb;--line:#e6eaf3;--muted:#7e899d}
 html{scroll-padding-top:90px;-webkit-text-size-adjust:100%}
 body{background:#f3f5fb;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;-webkit-tap-highlight-color:transparent}
 #app{padding-bottom:calc(88px + env(safe-area-inset-bottom));min-height:100dvh}
 #app>aside{display:none}
 .mobile-appbar{position:sticky;top:0;z-index:5;display:flex;justify-content:space-between;align-items:center;padding:calc(12px + env(safe-area-inset-top)) 22px 12px;background:#f8faffed;backdrop-filter:blur(18px);border-bottom:1px solid #e8edf6}
 .mobile-identity{display:flex;align-items:center;gap:11px}.mobile-identity img{border-radius:12px;box-shadow:0 4px 10px #5364d725}.mobile-identity strong{display:block;font-size:17px;font-weight:750;letter-spacing:-.4px}.mobile-identity small{display:block;color:#8a94a8;font-size:10px;margin-top:1px}
 .mobile-profile{position:relative;width:43px;height:43px;border-radius:50%;background:#e5e9ff;color:#495bd5;border:3px solid white;box-shadow:0 2px 8px #5364d713;font-weight:700}.online-dot{position:absolute;right:-1px;bottom:0;width:10px;height:10px;border:2px solid #f8faff;border-radius:50%;background:#25b7a4}
 main{margin:0;padding:23px 20px 15px;max-width:640px;margin-inline:auto}
 header{display:block;margin-bottom:18px}header .eyebrow{font-size:9px;letter-spacing:1.7px;color:#939bb0;margin-bottom:4px}header h1{font-size:31px;letter-spacing:-1.1px;line-height:1.25;font-weight:750}header .dot{color:#596be5}.subtitle{max-width:none!important;font-size:10px;line-height:1.5;margin-top:5px;color:#8b95a8}
 .header-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:19px}.header-actions #newExpense{grid-column:1;grid-row:1}.header-actions #scanBill{grid-column:2;grid-row:1}
 .header-actions .primary,.header-actions .secondary{padding:13px 10px;min-height:48px;border-radius:14px;font-size:13px;font-weight:650;box-shadow:0 4px 10px #465bd81a}.header-actions .secondary{background:#fff;border:1px solid #e0e6f5;color:#5262c8;box-shadow:none}.primary{background:#465bd8;border-radius:12px}.primary:hover{background:#354ac5}.secondary{border-radius:12px;border-color:#e1e7f1}
 .toolbar{display:block;border:0;margin:0 0 17px;padding:0}.toolbar #pageTabs{display:none}
 .filters{display:grid;grid-template-columns:38px minmax(100px,1fr) 38px 74px;gap:5px;width:100%;padding:0;align-items:center}
 .filters #personFilter{grid-row:2;grid-column:1/4;width:100%;max-width:none!important;margin-top:4px}.filters #prevMonth{grid-row:1;grid-column:1}.filters #month{grid-row:1;grid-column:2;width:100%;max-width:none!important;text-align:center}.filters #nextMonth{grid-row:1;grid-column:3}.filters #allTime{grid-column:4;grid-row:1/3;align-self:stretch;background:#e9edf9;border-radius:12px;color:#6c7899;white-space:normal;min-width:0;font-size:11px;font-weight:600}.filters #allTime.active{background:#465bd8;color:#fff}
 .filters input,.filters select{height:42px;margin:0;font-size:14px;border-radius:11px;border:1px solid #e3e8f2;background:#fff;padding:8px 10px}.filters .square{height:42px;width:38px;border-radius:11px;background:#fff;font-size:25px;color:#6d7c9e}.filters #personFilter{font-size:12px;height:36px;color:#77829a}
 .stats{grid-template-columns:1fr 1fr;gap:12px;margin-bottom:17px}.stats .stat{padding:17px;border-radius:18px;border:1px solid #e5eaf3;box-shadow:0 4px 14px #46547705;min-height:118px}.stat-label{font-size:9px;letter-spacing:1px;color:#8993a6}.stats .hero-stat{grid-column:1/-1;padding:23px 24px;min-height:171px;border:0;background:linear-gradient(125deg,#394ec5,#6474e5);box-shadow:0 10px 24px #5365d42b;color:white}.hero-stat .stat-label{color:#d7ddff;font-size:10px;font-weight:650;letter-spacing:1.3px}.stats article.hero-stat strong{font-size:46px;font-weight:650;letter-spacing:-1.7px;margin:8px 0 2px;line-height:1.2}.hero-stat p{color:#e0e5ff;font-size:10px}.stat-wave{right:-40px;bottom:-80px;border-color:#d2d6ff33;box-shadow:0 0 0 20px #d2d6ff12,0 0 0 40px #d2d6ff0d,0 0 0 60px #d2d6ff08}
 .stats .stat strong{font-size:27px;margin:12px 0 5px;font-weight:650;letter-spacing:-.8px}.stats .stat p{font-size:10px}.person-mark{background:#def5ef;color:#23a18c}.person-mark.peach{background:#fff0e4;color:#d88e50}
 .stats .stat:last-child{grid-column:1/-1;display:grid;grid-template-columns:1fr auto;gap:0 12px;min-height:72px;padding:14px 18px;align-items:center}.stats .stat:last-child .stat-label{grid-column:1;font-size:8px;height:auto}.stats .stat:last-child .stat-label>span{display:none}.stats .stat:last-child strong{grid-column:2;grid-row:1/3;font-size:18px;max-width:160px;margin:0}.stats .stat:last-child p{grid-column:1;margin-top:2px}
 .chart-grid{display:flex;flex-direction:column;gap:16px;margin-bottom:16px}.panel{border-radius:18px;padding:20px;border-color:#e5eaf3;box-shadow:0 4px 18px #46547704;margin-bottom:16px}.panel-heading{gap:10px;flex-wrap:wrap;margin-bottom:20px}.panel-heading h2{font-size:17px;font-weight:700;letter-spacing:-.4px}.panel-heading p{font-size:10px;margin-top:3px}.pill{background:#eef1fc;color:#7b87b1;font-size:8px;padding:6px 8px;border-radius:6px}.panel-heading .text-button{font-size:10px}.panel-heading .secondary{min-height:42px;padding:8px 12px;font-size:11px}
 .category-chart{flex-direction:row;flex-wrap:wrap;justify-content:center;gap:22px;min-height:175px}.donut{width:145px;height:145px}.donut-center{width:110px;height:110px}.donut-center strong{font-size:20px}.legend{flex:1;min-width:110px;max-width:100%;max-height:230px}.legend-row{font-size:11px}.empty{padding:25px 3px}.empty-symbol{font-size:35px;color:#9ba8db}.empty h3{font-size:14px;color:#6676a5}.empty p{font-size:11px;line-height:1.65}.empty button{background:#eef1fd;padding:11px 14px;border-radius:11px;font-size:12px}
 .bar-fill{background:#6274df}.bar-fill.carolanne{background:#25bca9}.bar-track{background:#eff2fa}.bar-title{font-size:12px}.tip{border-color:#edf0f6}.tip p{font-size:10px}.tip>span{color:#9ba8cc}
 .desktop-expense-table{display:none}.expense-cards{display:grid;gap:12px}.expense-card{background:#f9faff;border:1px solid #e9edf6;border-radius:14px;padding:15px;min-width:0}.expense-card-top{display:flex;align-items:center;gap:10px}.expense-store-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#e8edff;color:#5b6cda;flex-shrink:0;font-weight:750;font-size:17px}.expense-card-merchant{min-width:0;flex:1}.expense-card-merchant strong{display:block;font-size:13px;line-height:1.4;overflow-wrap:anywhere}.expense-card-merchant small{display:block;font-size:10px;color:#99a2b5;margin-top:3px}.expense-card-amount{font-size:15px;white-space:nowrap;align-self:flex-start;padding-top:3px}.expense-card-amount small{display:block;color:#25a899;font-size:9px;text-align:right}.expense-card-meta{display:flex;align-items:center;justify-content:space-between;gap:9px;margin:12px 0 6px;font-size:10px;color:#8c96aa}.category-chip{background:#edf0fc;color:#6979bb;border-radius:6px;white-space:normal;font-size:10px;max-width:60%;overflow-wrap:anywhere}.expense-reporter{font-size:10px;color:#99a3b8}.expense-card-note{font-size:11px;margin-top:8px;color:#7c88a4;overflow-wrap:anywhere}.expense-card-actions{display:flex;align-items:center;gap:6px;margin-top:11px;border-top:1px solid #e7ebf5;padding-top:6px}.expense-card-actions a,.expense-card-actions button{font-size:11px;min-height:36px;padding:6px 10px;border-radius:8px;color:#5c6dca;font-weight:600}.expense-card-actions a,.expense-card-actions>span{margin-right:auto}.expense-card-actions .delete{color:#c57c80}
 .history-filters{display:grid;grid-template-columns:1fr;gap:9px}.history-filters input{min-width:0;font-size:15px;height:46px;border-radius:12px}.history-filters select{border-radius:12px;height:44px;font-size:14px;margin:0}.statement-callout{border-radius:17px;background:#eaf0ff;border-color:#e0e7fa;gap:12px;padding:18px}.callout-icon{background:#dce5fc;color:#7587c5;border-radius:13px;width:42px;height:42px}.statement-callout h3{font-size:13px;line-height:1.5}.statement-callout p{font-size:10px;line-height:1.6}.statement-callout button{border-radius:10px;font-size:11px;min-height:42px;white-space:normal}
 .section-intro h2{font-family:inherit;font-size:25px;font-weight:700;letter-spacing:-.8px;line-height:1.3}.section-intro p{font-size:12px;line-height:1.7}.upload-panel h2{font-size:19px}.upload-panel .primary{width:100%;margin:17px 0 8px}.upload-panel a{display:block;text-align:center;font-size:12px;min-height:40px}.file-zone{border-radius:13px;padding:17px;background:#f7f9ff;border-color:#ccd5ee}.file-zone input{font-size:12px}.upload-symbol{color:#6b7fe0}.category-list{grid-template-columns:1fr 1fr;gap:10px}.category-item{border-radius:12px;padding:13px;gap:9px;font-size:12px;overflow-wrap:anywhere}.category-item span{color:#7c8ed1}.category-item small{font-size:9px}.statement-item{gap:10px;flex-wrap:wrap}.statement-item strong{overflow-wrap:anywhere;font-size:12px}.statement-item>div{min-width:0;flex:1}.statement-item button{font-size:11px;min-height:40px}.statement-item .callout-icon{width:35px;height:35px;font-size:23px}
 .mobile-bottom-nav{overflow:visible;position:fixed;z-index:6;bottom:0;left:0;right:0;display:flex;align-items:center;justify-content:space-around;gap:0;margin:0;padding:9px 8px calc(9px + env(safe-area-inset-bottom));border-top:1px solid #e3e8f2;background:#ffffffed;backdrop-filter:blur(20px);box-shadow:0 -5px 25px #293c6a07}
 .mobile-bottom-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:20%;min-height:52px;padding:3px 0;margin:0;background:transparent;border-radius:12px;color:#a2abc0;font-size:9px;font-weight:600;flex:none}.mobile-bottom-nav svg{width:22px;height:22px}.mobile-bottom-nav button span{font-size:9px}.mobile-bottom-nav button.active{color:#5264da;background:#f1f4ff}.mobile-bottom-nav .mobile-add{margin-top:-23px;min-height:60px;background:transparent!important;color:#7783a6}.mobile-bottom-nav .mobile-add svg{width:48px;height:48px;padding:12px;border-radius:17px;stroke:white;background:linear-gradient(135deg,#5668dc,#775edb);box-shadow:0 5px 16px #5366d83b}.mobile-bottom-nav button:hover{background:#f3f5fc}
 footer{display:none}#toast{bottom:calc(96px + env(safe-area-inset-bottom));width:calc(100% - 40px);text-align:center;border-radius:13px;background:#354b9c;font-size:12px;padding:14px 18px}
 dialog{width:100%;max-width:100%;max-height:94dvh;border:0;border-radius:24px 24px 0 0;margin:auto 0 0;padding:25px 22px calc(22px + env(safe-area-inset-bottom));box-shadow:0 -15px 60px #253c6b30;overscroll-behavior:contain}dialog::backdrop{background:#1b2a4f73;backdrop-filter:blur(5px)}.dialog-heading h2{font-size:25px;font-weight:700}.dialog-heading{margin-bottom:22px}.close{width:40px;height:40px;display:grid;place-items:center;background:#f1f4fa;border-radius:50%;font-size:24px;flex-shrink:0}.dialog-actions{position:sticky;bottom:calc(-22px - env(safe-area-inset-bottom));background:white;padding:15px 0 calc(5px + env(safe-area-inset-bottom));margin-top:16px;gap:10px;z-index:2}.dialog-actions button{min-height:48px;border-radius:13px;font-size:13px}.dialog-actions .primary{flex:1}.dialog-actions .secondary{min-width:85px}.form-row{grid-template-columns:1fr 1fr;gap:12px}label{font-size:12px;color:#6f7d96;margin-bottom:18px}input,select,textarea{font-size:16px;padding:13px 12px;border-radius:11px;background:#f9faff;border-color:#e1e7f1;min-height:46px}input::placeholder,textarea::placeholder{font-size:13px}input[type=checkbox]{min-height:0;accent-color:#5264da}.inline-add{font-size:12px;min-height:36px}.checkbox-label{font-size:12px;line-height:1.6}.optional{font-size:11px}.warning{border-radius:10px;font-size:11px}.sheet-handle{width:36px;height:4px;border-radius:5px;background:#d8dfea;margin:-12px auto 22px}.profile-detail{display:flex;align-items:center;gap:15px;padding:10px 0}.profile-detail img{border-radius:14px}.profile-detail strong{font-size:18px}.profile-detail p{font-size:12px;margin-top:5px;line-height:1.7}
 .review-dialog{width:100%}.review-description{font-size:12px;line-height:1.7}.review-toolbar{gap:8px}.review-toolbar button{font-size:11px;min-height:42px;background:#edf1fc;padding:8px 12px;border-radius:10px}.review-toolbar span{font-size:12px}.review-scroll{max-height:52dvh}.review-scroll table,.review-scroll tbody,.review-scroll tr,.review-scroll td{display:block;white-space:normal}.review-scroll thead{display:none}.review-scroll tr{border:1px solid #e1e7f2;border-radius:13px;padding:12px;margin-bottom:12px;display:grid;grid-template-columns:1fr 1fr;gap:10px}.review-scroll td{border:0;padding:0;min-width:0}.review-scroll td:first-child,.review-scroll td:nth-child(3),.review-scroll td:last-child{grid-column:1/-1}.review-scroll td:first-child{display:flex;align-items:center;gap:10px}.review-scroll td:first-child:after{content:'Add this transaction';font-size:12px;font-weight:600;color:#64739c}.review-scroll td:before{display:block;font-size:10px;color:#8a96ae;margin-bottom:4px}.review-scroll td:nth-child(2):before{content:'Date'}.review-scroll td:nth-child(3):before{content:'Merchant / company'}.review-scroll td:nth-child(4):before{content:'Amount ($)'}.review-scroll td:nth-child(5):before{content:'Category'}.review-scroll td:nth-child(6):before{content:'Transaction type'}.review-scroll td:nth-child(6){grid-column:1/-1}.review-scroll input,.review-scroll select{width:100%!important;max-width:none;font-size:16px;min-width:0!important;padding:10px;min-height:42px;border-radius:9px}.review-scroll input[type=checkbox]{width:20px!important;height:20px;min-height:20px}.review-scroll td:last-child{font-size:11px;padding:7px;background:#f3f6fd;border-radius:8px}
 .login{background:radial-gradient(ellipse at 0 0,#e5eaff,transparent 65%),#f6f8fd}.login-form{min-height:100dvh;padding:35px 26px calc(35px + env(safe-area-inset-bottom))}.login-box{max-width:370px}.login-app-icon{width:86px;height:86px;border-radius:24px;box-shadow:0 10px 30px #5a65d22b;margin-bottom:30px}.login-box .badge{background:#e8edff;color:#8290c5;border-radius:7px;font-size:9px;letter-spacing:1.5px}.login-box h2{font-size:37px;font-weight:750;letter-spacing:-1.2px;margin-top:20px}.login-box>p{font-size:13px;margin-top:7px}.login-box form{margin-top:30px}.login-box .primary{min-height:52px;font-size:14px;border-radius:14px}.login-box label{font-size:12px}.login-box input,.login-box select{background:#fff;border-radius:13px;min-height:53px;padding:15px;font-size:16px}.login-box .address{border-color:#e2e7f2;font-size:11px;color:#9aa4b8;margin-top:32px}.pin-person{color:#5264d8;font-size:22px}
}
@media(max-width:360px){main{padding-inline:15px}.mobile-appbar{padding-inline:17px}.filters{grid-template-columns:32px minmax(100px,1fr) 32px 62px;gap:4px}.filters .square{width:32px}.filters input{font-size:13px;padding:8px 4px}.stats article.hero-stat strong{font-size:42px}.stats .stat{padding:14px}.header-actions .primary,.header-actions .secondary{font-size:12px}.mobile-bottom-nav button span{font-size:8px}.category-list{grid-template-columns:1fr}.form-row{grid-template-columns:1fr}.category-chart{flex-direction:column}.legend{width:100%}}
