/* HostelTrack 2.0 — Light Mode only. Burgundy × warm cream × restrained cherry. */
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-display:swap;font-weight:400;src:url(../fonts/ibm-plex-sans-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-display:swap;font-weight:400;src:url(../fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-display:swap;font-weight:500;src:url(../fonts/ibm-plex-sans-latin-500-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-display:swap;font-weight:500;src:url(../fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-display:swap;font-weight:600;src:url(../fonts/ibm-plex-sans-latin-600-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-display:swap;font-weight:600;src:url(../fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-display:swap;font-weight:700;src:url(../fonts/ibm-plex-sans-latin-700-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-display:swap;font-weight:700;src:url(../fonts/ibm-plex-sans-latin-ext-700-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Lora';font-style:normal;font-display:swap;font-weight:500;src:url(../fonts/lora-latin-500-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+2000-206F}
@font-face{font-family:'Montserrat';font-style:normal;font-display:swap;font-weight:600;src:url(../fonts/montserrat-latin-600-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+2000-206F}

:root{
  --cream:#F3EBDD;--cream-login:#F3E3D1;--ivory:#FAF7F0;--cream2:#E8DDCD;--line:#D8CBBE;--line2:#E8DDCD;
  --burg:#371B1B;--burg2:#482727;--burg3:#522E2E;--burg-line:#6E4846;
  --cherry:#C2373C;--cherry-t:#A82F34;--coral:#E6776C;--logo:#892427;
  --text:#352426;--text2:#6F625C;--on:#F7F1E6;--on2:#BDAAAF;--on3:#E9DCD3;
  --ok:#2F6B47;--warn:#8A5A12;
  --r:10px;--r-sm:6px;
  --sans:'IBM Plex Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
  color-scheme:light;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{background:var(--cream);color:var(--text);font:15px/1.5 var(--sans);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}
.num,.amt-r{font-variant-numeric:tabular-nums}
button,input,select,textarea{font:inherit;color:inherit}
a{color:var(--cherry-t)}
.hidden{display:none!important}
.sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.i{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;flex:none;vertical-align:middle}
:focus-visible{outline:2px solid var(--cherry);outline-offset:2px}
html[data-motion="reduced"] *{transition:none!important;animation:none!important}

/* ---------- buttons & form controls ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;border-radius:8px;border:1px solid transparent;background:var(--burg);color:var(--cream);font-weight:600;font-size:14px;cursor:pointer;text-decoration:none;white-space:nowrap;transition:background .15s,transform .1s}
.btn:hover{background:#4A2526}.btn:active{transform:translateY(1px)}
.btn.ghost{background:transparent;color:var(--text);border-color:var(--line)}.btn.ghost:hover{background:var(--ivory)}
.btn.danger{background:var(--cherry);color:#fff}.btn.danger:hover{background:#A82F34}
.btn.text{background:none;color:var(--cherry-t);padding:0 8px;min-height:40px}
.btn.sm{min-height:36px;padding:0 12px;font-size:13px}
.btn[disabled]{opacity:.5;cursor:not-allowed}
.iconbtn{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:8px;background:transparent;color:var(--text2);cursor:pointer}
.iconbtn:hover{background:var(--cream2);color:var(--text)}
.field{display:flex;flex-direction:column;gap:6px}
.field>label,.lbl{font-size:13px;font-weight:500;color:var(--text2)}
.input,select.input,textarea.input{height:44px;padding:0 12px;border-radius:8px;border:1px solid var(--line);background:var(--ivory);color:var(--text);outline:none;width:100%}
textarea.input{height:auto;padding:10px 12px;min-height:72px;resize:vertical}
.input:focus{border-color:var(--cherry)}
.check{display:flex;align-items:center;gap:10px;min-height:44px;cursor:pointer}
.check input{width:20px;height:20px;accent-color:var(--cherry);margin:0}
.seg{display:flex;flex-wrap:wrap;gap:6px}
.seg button{min-height:40px;padding:0 14px;border-radius:8px;border:1px solid var(--line);background:var(--ivory);color:var(--text);cursor:pointer}
.seg button[aria-pressed="true"]{border-color:var(--cherry);background:#F4E2DE;font-weight:500}
.err{color:var(--cherry-t);font-size:13px;min-height:18px}
.muted{color:var(--text2)}
.small{font-size:13px}

/* ---------- sign in (matches the approved reference) ---------- */
.auth{min-height:100vh;display:flex;flex-wrap:wrap;background:var(--cream-login)}
.auth-brand{position:relative;flex:1 1 520px;min-height:100vh;padding:54px clamp(28px,6vw,86px) 0;overflow:hidden;color:#2B1214}
.auth-photo{position:absolute;left:0;bottom:0;width:100%;height:auto;display:block;pointer-events:none;user-select:none}
.wordmark{display:inline-flex;align-items:center;gap:16px;color:#2E0D10;text-decoration:none;background:none;border:0;padding:0;cursor:pointer}
.wordmark span{font-family:Montserrat,var(--sans);font-weight:600;letter-spacing:.1em;font-size:27px}
.logo-mark{flex:none}
.auth-rule{width:60px;height:1.5px;background:#6B4F50;margin-top:30px}
.auth-h1{position:relative;margin:34px 0 0;font-family:Lora,Georgia,serif;font-weight:500;font-size:clamp(46px,5.2vw,74px);line-height:1.04;color:#2B1214}
.auth-h1 span{color:var(--cherry)}
.auth-desc{position:relative;margin:clamp(24px,3.6vw,52px) 0 0;max-width:520px;font-size:clamp(16px,1.4vw,20px);line-height:1.68;color:#4A3B3C}
.auth-panel{position:relative;flex:1 1 480px;min-height:100vh;background:var(--burg);border-radius:26px 0 0 26px;color:var(--on);display:flex;align-items:center;padding:64px clamp(28px,6vw,86px) 64px clamp(28px,7.5vw,108px);overflow:hidden}
.auth-deco{position:absolute;top:0;right:0;width:260px;height:140px}
.auth-deco path{fill:none;stroke:#DE6E6A;stroke-width:1.2;opacity:.75}
.auth-card{position:relative;width:100%;max-width:524px;display:flex;flex-direction:column}
.auth-card h2{margin:0;font-size:clamp(32px,3vw,44px);line-height:1.1;font-weight:700;letter-spacing:-.01em}
.auth-card .sub{margin:16px 0 0;font-size:clamp(16px,1.3vw,19px);color:var(--on3)}
.a-label{margin-top:26px;font-size:17px;font-weight:600;color:#F6EFE6}
.a-input{position:relative;display:flex;margin-top:10px}
.a-input .i{position:absolute;left:18px;top:50%;transform:translateY(-50%);width:20px;height:20px;color:var(--on3);pointer-events:none}
.a-input input{flex:1;height:62px;padding:0 56px 0 56px;border-radius:9px;border:1px solid var(--burg-line);background:#522F2F;color:var(--on);font-size:19px;outline:none;width:100%}
.a-input input:focus{border-color:#B0706A;background:#482727}
.a-input input::placeholder{color:#B59E9B}
.a-input .eye{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:44px;height:44px;border:0;background:none;color:var(--on3);display:flex;align-items:center;justify-content:center;cursor:pointer}
.a-input .eye .i{position:static;transform:none;width:22px;height:22px;pointer-events:none}
.a-row{margin-top:28px;display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.a-row .check{color:#F2E8DF;font-size:18px;gap:14px}.a-row .check input{width:24px;height:24px;accent-color:#C94244}
.a-link{background:none;border:0;padding:8px 0;color:var(--coral);font-size:18px;font-weight:600;cursor:pointer;text-decoration:none}
.a-link:hover{color:var(--on)}
.a-primary{margin-top:28px;height:64px;border:0;border-radius:10px;background:#F2EADC;color:#2A1016;font-size:20px;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:10px;padding:0 24px}
.a-primary:hover{background:#FFF8EE}
.a-secondary{height:58px;border:1.5px solid #E78274;border-radius:10px;background:transparent;color:var(--on);font-size:20px;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:10px;padding:0 24px}
.a-secondary:hover{background:rgba(231,130,116,.1)}
.a-choice{justify-content:space-between}
.a-divider{margin-top:24px;display:flex;align-items:center;gap:16px;color:#E0D4CC;font-size:16px}
.a-divider::before,.a-divider::after{content:"";flex:1;height:1px;background:#6A4646}
.a-note{margin-top:24px;display:flex;gap:14px;align-items:flex-start;padding:18px 20px;border-radius:10px;background:var(--burg3);color:#EDE3DA;font-size:16px;line-height:1.6}
.a-note svg{flex:none;margin-top:1px}
.a-err{margin-top:14px;color:#FFB4AA;font-size:15px;min-height:22px}
.a-back{align-self:flex-start;display:flex;align-items:center;gap:6px;min-height:44px;background:none;border:0;color:var(--on2);font-size:15px;cursor:pointer;padding:0;margin-bottom:18px}
.a-steps{display:flex;gap:6px;margin-bottom:22px}.a-steps i{height:4px;flex:1;border-radius:2px;background:#5A3E3F}.a-steps i.on{background:var(--coral)}
.a-input.plain input{padding-left:16px}
.a-skip{margin-top:14px;background:none;border:0;color:var(--on2);font-size:16px;cursor:pointer;min-height:44px}
.a-hint{margin-top:8px;color:var(--on2);font-size:14px}
.a-list{margin:18px 0 0;padding-left:20px;color:var(--on3);font-size:16px;line-height:1.7}
.a-check-list{margin-top:16px;display:flex;flex-direction:column;gap:6px;font-size:15px}
.a-check-list div{display:flex;justify-content:space-between;gap:12px;padding:8px 12px;border-radius:8px;background:var(--burg3)}
.a-check-list .bad{color:#FFB4AA}

/* ---------- app shell ---------- */
.app{display:flex;min-height:100vh;background:linear-gradient(to right,var(--burg) 248px,transparent 248px)}
.sidebar{position:sticky;top:0;height:100vh;width:248px;flex:none;background:var(--burg);color:var(--cream);display:flex;flex-direction:column;gap:28px;padding:26px 14px 20px;overflow-y:auto}
.sidebar .wordmark{color:var(--cream);padding:0 10px;min-height:44px}.sidebar .wordmark span{font-size:16px}
.nav{display:flex;flex-direction:column;gap:2px}
.nav button{display:flex;align-items:center;gap:12px;height:44px;padding:0 12px;border-radius:6px;border:0;background:none;color:var(--on2);font-size:14px;cursor:pointer;text-align:left}
.nav button:hover{color:var(--cream);background:rgba(255,255,255,.04)}
.nav button[aria-current="page"]{background:var(--burg2);color:var(--cream);font-weight:500}
.nav button[aria-current="page"] .i{color:var(--coral)}
.side-foot{margin-top:auto;display:flex;flex-direction:column;gap:14px}
.side-backup{display:flex;gap:10px;padding:14px 10px 0;border-top:1px solid #4A3133;font-size:12px;line-height:1.5;color:var(--on2);background:none;border-left:0;border-right:0;border-bottom:0;text-align:left;cursor:pointer}
.side-backup b{display:block;color:var(--cream);font-weight:500;font-size:13px}
.side-backup .i{color:var(--coral);width:16px;height:16px;margin-top:2px}
.side-user{display:flex;align-items:center;gap:10px;padding:0 10px}
.avatar{width:34px;height:34px;border-radius:999px;background:var(--burg3);display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600;color:var(--cream);flex:none}
.side-user .who{flex:1;min-width:0;font-size:13px;line-height:1.35}.side-user .who small{display:block;color:var(--on2);font-size:12px}
.side-user .iconbtn{color:var(--on2)}.side-user .iconbtn:hover{background:var(--burg2);color:var(--cream)}
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{display:none}
.content{flex:1;padding:28px clamp(18px,3vw,40px) 56px;max-width:1280px;width:100%;margin:0 auto}
.view{display:none;flex-direction:column;gap:22px}.view.active{display:flex}
.view-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap}
.view-head h1{margin:0;font-size:24px;font-weight:600;color:var(--burg)}
.view-head .sub{font-size:13px;color:var(--text2)}
.head-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.search-btn{display:flex;align-items:center;gap:10px;height:44px;padding:0 14px;min-width:240px;border-radius:8px;border:1px solid var(--line);background:var(--ivory);color:var(--text2);cursor:pointer}
.search-btn span{flex:1;text-align:left}
kbd{font:500 11px var(--sans);padding:3px 6px;border-radius:4px;border:1px solid var(--line);color:var(--text2);background:var(--cream)}

/* ---------- surfaces ---------- */
.card{background:var(--ivory);border:1px solid var(--line);border-radius:var(--r)}
.card-pad{padding:20px 22px}
.card h2,.sec-title{margin:0;font-size:15px;font-weight:600;color:var(--burg)}
.sec-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px}
.icon-chip{width:32px;height:32px;border-radius:6px;background:var(--cream2);color:var(--burg2);display:flex;align-items:center;justify-content:center;flex:none}
.icon-chip .i{width:16px;height:16px}
.empty{padding:26px 16px;text-align:center;color:var(--text2);font-size:14px}
.amt-r{background:none;border:0;padding:0;color:inherit;font:inherit;cursor:pointer}
.amt-r.exact{text-decoration:underline dotted;text-underline-offset:4px}
.pill{display:inline-flex;align-items:center;gap:6px;font-size:12px;padding:3px 10px;border-radius:999px;background:var(--cream2);color:var(--text)}
.badge{display:inline-flex;align-items:center;gap:4px;font-size:11px;padding:2px 8px;border-radius:999px;background:#F4E2DE;color:var(--cherry-t);font-weight:500;border:0;cursor:pointer}

/* hero */
.hero{display:flex;flex-wrap:wrap;gap:32px;padding:30px 34px;border-radius:var(--r);background:var(--burg2);color:var(--cream)}
.hero .label{font-size:14px;color:var(--on2);font-weight:500}
.hero .big{font-size:clamp(52px,6vw,72px);line-height:1.05;font-weight:600;letter-spacing:-.02em;color:var(--cream);align-self:flex-start}
.hero .left{flex:1 1 300px;display:flex;flex-direction:column;gap:8px}
.hero .right{flex:1 1 340px;display:flex;flex-direction:column;gap:16px;justify-content:center}
.hero .mini{font-size:12px;color:var(--on2)}.hero .mini-v{font-size:20px;font-weight:600;margin-top:4px}
.hero .chip{font-size:12px;padding:4px 10px;border-radius:999px;background:var(--burg3);color:var(--cream)}
.hero .over{font-size:13px;padding:4px 10px;border-radius:999px;background:#F4E2DE;color:var(--cherry-t);font-weight:600}
.bar{position:relative;height:8px;border-radius:999px;background:var(--burg3)}
.bar>i{display:block;height:100%;border-radius:999px;background:var(--cream)}
.bar>i.over{background:var(--coral)}
.bar .pace{position:absolute;top:-5px;width:3px;height:18px;border-radius:2px;background:var(--coral)}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-radius:var(--r);background:var(--ivory);border:1px solid var(--line)}
.strip>div{padding:20px 22px}.strip>div+div{border-left:1px solid var(--line2)}
.strip .k{font-size:13px;color:var(--text2)}.strip .v{font-size:28px;font-weight:600;margin-top:6px;color:var(--burg)}.strip .s{font-size:12px;color:var(--text2);margin-top:4px}
.due-mini{display:flex;flex-direction:column;gap:10px}
.due-mini .t{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--cherry-t);font-weight:500}
.split{display:flex;flex-wrap:wrap;gap:24px;align-items:flex-start}
.split>.wide{flex:3 1 420px;min-width:0}.split>.narrow{flex:2 1 300px;min-width:0;display:flex;flex-direction:column;gap:16px}
.insight{padding:18px 22px;border-radius:var(--r);background:var(--cream2);display:flex;gap:12px}
.insight b{color:var(--burg)}.insight p{margin:6px 0 0;font-size:13px;line-height:1.55;color:#5A4D48}
.insight .i{color:var(--cherry-t);margin-top:2px}
.quick{display:flex;flex-wrap:wrap;gap:8px}
.quick button{min-height:38px;padding:0 12px;border-radius:999px;border:1px solid var(--line);background:var(--ivory);cursor:pointer;font-size:13px;display:inline-flex;align-items:center;gap:6px}
.quick button:hover{border-color:var(--cherry)}
.catbar{display:flex;flex-direction:column;gap:6px}
.catbar .top{display:flex;justify-content:space-between;font-size:13px;gap:8px}.catbar .top span:first-child{display:flex;align-items:center;gap:8px}
.track{height:6px;border-radius:999px;background:var(--cream2)}.track>i{display:block;height:100%;border-radius:999px;background:var(--burg2)}
.track>i.hi{background:var(--cherry)}
.banner{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:14px 18px;border-radius:var(--r);background:var(--cream2);border:1px solid var(--line)}
.banner .i{color:var(--cherry-t)}.banner .grow{flex:1 1 200px;min-width:0}.banner b{display:block;color:var(--burg)}

/* lists */
.list-row{display:flex;align-items:center;gap:12px;padding:11px 0;border-top:1px solid var(--line2)}
.list-row:first-child{border-top-color:var(--line)}
.list-row .info{flex:1;min-width:0}.list-row .info b{display:flex;align-items:center;gap:6px;font-size:14px;font-weight:500;color:var(--text);overflow:hidden;text-overflow:ellipsis}
.list-row .info small{font-size:12px;color:var(--text2)}
.list-row .amt{font-size:14px;font-weight:600;white-space:nowrap}

/* expenses */
.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.toolbar .search{position:relative;flex:1 1 260px;display:flex}
.toolbar .search .i{position:absolute;left:13px;top:13px;width:16px;height:16px;color:var(--text2)}
.toolbar .search input{padding-left:38px}
.toolbar select.input{width:auto;min-width:140px}
.toolbar .amt-in{width:110px}
.due-card{border:1px solid #D6B3AC}
.due-card .dh{display:flex;align-items:center;gap:8px;padding:12px 18px;font-size:13px;color:var(--cherry-t);font-weight:500}
.due-row{display:flex;align-items:center;gap:14px;padding:10px 18px;border-top:1px solid var(--line);flex-wrap:wrap}
.due-row .info{flex:1 1 200px;min-width:0}.due-row .info small{color:var(--text2);font-size:12px}
.due-row .amt{width:96px;text-align:right;font-weight:600}
.tx{overflow-x:auto}
.tx-inner{min-width:760px}
.tx-head,.tx-row{display:grid;grid-template-columns:40px minmax(0,1fr) 150px 110px 120px 132px;gap:12px;align-items:center;padding:8px 18px}
.tx-head{font-size:12px;font-weight:500;color:var(--text2);letter-spacing:.04em;border-bottom:1px solid var(--line)}
.tx-group{display:flex;justify-content:space-between;padding:9px 18px;background:#EFE5D6;font-size:12px;color:var(--text2);font-weight:500;letter-spacing:.03em;border-top:1px solid var(--line2)}
.tx-row{border-top:1px solid var(--line2);font-size:14px}
.tx-row .d{display:flex;align-items:center;gap:8px;min-width:0}.tx-row .d b{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tx-row .t{font-size:12px;color:var(--text2)}
.tx-row .a{text-align:right;font-weight:600}
.tx-row .mc{display:none}
.tx-row .acts{display:flex;justify-content:flex-end;gap:0}
.tx-row.open{background:#F6EEE4}
.hist{padding:4px 18px 14px 70px;background:#F6EEE4}
.hist>div{padding:12px 14px;border-radius:8px;background:var(--ivory);border:1px solid var(--line);font-size:13px;line-height:1.6;color:var(--text2)}
.hist s{color:var(--text2)}.hist ins{text-decoration:none;color:var(--text);font-weight:500}
.more-row{display:flex;justify-content:center;padding:14px}

/* calendar */
.cal-wrap{display:flex;flex-wrap:wrap;gap:20px;align-items:flex-start}
.cal{flex:3 1 520px;min-width:0;padding:18px}
.cal-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}
.cal-head h2{font-size:18px}
.cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.cal-dow{font-size:12px;color:var(--text2);text-align:center;padding:4px 0}
.cal-day{min-height:74px;border-radius:8px;border:1px solid var(--line2);background:var(--ivory);padding:8px;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;cursor:pointer;text-align:left;color:var(--text)}
.cal-day .n{font-size:13px;font-weight:500}
.cal-day .v{font-size:11px;font-variant-numeric:tabular-nums}
.cal-day.out{opacity:.4}
.cal-day.h1{background:#F2E4DA}.cal-day.h2{background:#E8C9C0}.cal-day.h3{background:#C98E8A;color:#2B1214}.cal-day.h4{background:#8E4447;color:var(--cream)}
.cal-day.today{border-color:var(--burg);border-width:2px}
.cal-day.sel{outline:2px solid var(--cherry);outline-offset:1px}
.cal-side{flex:2 1 300px;min-width:0;padding:18px 20px}
.cal-legend{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text2);margin-top:12px}
.cal-legend i{width:16px;height:12px;border-radius:3px;display:inline-block;border:1px solid var(--line2)}

/* analytics */
.charts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.chart{padding:22px;display:flex;flex-direction:column;gap:14px;min-width:0}
.chart .sub{font-size:13px;color:var(--text2);margin-top:4px}
.hbars{display:grid;grid-template-columns:110px minmax(0,1fr) 72px;gap:10px 12px;align-items:center;font-size:13px}
.hbars .b{height:14px;border-radius:4px;background:var(--burg2)}.hbars .b.hi{background:var(--cherry)}
.hbars .v{text-align:right}
.vbars{display:grid;gap:14px;align-items:end;height:190px;position:relative}
.vbars .col{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:6px;height:100%}
.vbars .col span{font-size:12px;color:var(--text);position:relative;z-index:1;background:var(--ivory);padding:0 3px;border-radius:3px}
.vbars .col i{display:block;width:100%;max-width:56px;border-radius:5px 5px 2px 2px;background:var(--burg2)}
.vbars .col i.hi{background:var(--cherry)}.vbars .col i.lo{background:#CDB9A8}.vbars .col i.part{background:var(--cream2);border:1px dashed var(--burg2)}
.vlabels{display:grid;gap:14px;font-size:12px;color:var(--text2);text-align:center}
.vbars .budget-line{position:absolute;left:0;right:0;border-top:1px dashed var(--burg)}
.legend{display:flex;gap:16px;font-size:12px;color:var(--text2);flex-wrap:wrap}.legend span{display:flex;align-items:center;gap:6px}
.svgchart{width:100%;height:auto}
.svgchart .grid{stroke:#E2D5C6;stroke-width:1}.svgchart .ideal{stroke:#8C7D76;stroke-width:1.5;stroke-dasharray:5 5;fill:none}
.svgchart .act{stroke:var(--cherry);stroke-width:2.5;fill:none;stroke-linejoin:round;stroke-linecap:round}
.svgchart .budget{stroke:var(--burg);stroke-width:1;stroke-dasharray:2 4}
.svgchart text{font:11px var(--sans);fill:var(--text2)}
.streak{display:flex;flex-wrap:wrap;gap:24px;padding:22px;align-items:center}
.streak .stat{flex:0 1 200px}.streak .stat .v{font-size:28px;font-weight:600;color:var(--burg)}.streak .stat .s{font-size:13px;color:var(--text2)}
.dots{display:grid;grid-template-columns:repeat(auto-fill,minmax(18px,1fr));gap:6px}
.dots i{aspect-ratio:1;border-radius:5px;background:var(--burg2)}.dots i.o{background:none;border:1.5px solid var(--line)}.dots i.t{outline:2px solid var(--cherry);outline-offset:2px}

/* reports */
.rep-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0}
.rep-stats>div{padding:18px 20px}.rep-stats>div+div{border-left:1px solid var(--line2)}
.rep-stats .k{font-size:12px;color:var(--text2)}.rep-stats .v{font-size:18px;font-weight:600;margin-top:4px;color:var(--burg)}

/* goals */
.goal{padding:20px 22px;display:flex;flex-direction:column;gap:12px}
.goal-top{display:flex;justify-content:space-between;gap:12px;align-items:baseline;flex-wrap:wrap}
.goal-top b{font-size:16px;color:var(--burg)}
.goal .track{height:8px}
.goal .done{color:var(--ok);font-weight:600;font-size:13px;display:inline-flex;gap:6px;align-items:center}
.contribs{border-top:1px solid var(--line2);padding-top:8px;font-size:13px}
.contribs div{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 0}

/* settings */
.settings{display:flex;gap:24px;align-items:flex-start;flex-wrap:wrap}
.set-nav{flex:0 0 220px;display:flex;flex-direction:column;gap:2px;position:sticky;top:20px}
.set-nav button{text-align:left;height:40px;padding:0 12px;border-radius:6px;border:0;background:none;cursor:pointer;color:var(--text2)}
.set-nav button[aria-current="true"]{background:var(--cream2);color:var(--burg);font-weight:500}
.set-body{flex:1 1 480px;min-width:0;display:flex;flex-direction:column;gap:16px}
.set-sec{padding:22px}
.set-sec h2{font-size:16px;margin-bottom:4px}
.set-sec .desc{font-size:13px;color:var(--text2);margin:0 0 16px}
.form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form .full{grid-column:1/-1}
.tag-list{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.kv{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid var(--line2);font-size:14px}
.kv:first-of-type{border-top:0}

/* modal / sheet */
.overlay{position:fixed;inset:0;background:rgba(43,18,20,.42);display:flex;align-items:center;justify-content:center;padding:20px;z-index:50;animation:fade .15s ease-out}
.dialog{width:100%;max-width:560px;max-height:calc(100vh - 40px);overflow:auto;background:var(--ivory);border-radius:14px;box-shadow:0 24px 60px rgba(43,18,20,.25);display:flex;flex-direction:column}
.dialog.wide{max-width:720px}
.dlg-head{display:flex;justify-content:space-between;align-items:center;padding:18px 22px 8px;position:sticky;top:0;background:var(--ivory);z-index:1}
.dlg-head h2{margin:0;font-size:18px;color:var(--burg)}
.dlg-body{padding:8px 22px 18px;display:flex;flex-direction:column;gap:16px}
.dlg-foot{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px;border-top:1px solid var(--line2);flex-wrap:wrap;position:sticky;bottom:0;background:var(--ivory)}
.amount-in{display:flex;align-items:baseline;gap:4px;padding-bottom:8px;border-bottom:1.5px solid var(--cherry)}
.amount-in span{font-size:28px;color:var(--text2)}
.amount-in input{flex:1;min-width:0;border:0;background:transparent;font-size:40px;font-weight:600;color:var(--burg);outline:none;padding:0;font-variant-numeric:tabular-nums}
.cat-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.cat-grid button{min-height:58px;border-radius:10px;border:1px solid var(--line);background:var(--ivory);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:11px;cursor:pointer;padding:4px;color:var(--text)}
.cat-grid button[aria-pressed="true"]{border-color:var(--cherry);background:#F4E2DE;font-weight:500}
.cat-grid button[aria-pressed="true"] .i{color:var(--cherry-t)}
.receipt-prev{max-width:100%;max-height:220px;border-radius:8px;border:1px solid var(--line);object-fit:contain;background:#fff}
.preview-table{display:flex;flex-direction:column;gap:6px;font-size:14px}
.preview-table div{display:flex;justify-content:space-between;gap:10px;padding:8px 12px;border-radius:8px;background:var(--cream)}
.cmd-list{display:flex;flex-direction:column;gap:2px;max-height:50vh;overflow:auto}
.cmd-list button{display:flex;align-items:center;gap:10px;height:44px;padding:0 12px;border:0;border-radius:8px;background:none;text-align:left;cursor:pointer}
.cmd-list button:hover,.cmd-list button.sel{background:var(--cream2)}
@keyframes fade{from{opacity:0}to{opacity:1}}
@keyframes up{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}

/* toast & update bar */
.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);display:flex;align-items:center;gap:14px;padding:10px 10px 10px 18px;border-radius:12px;background:var(--burg);color:var(--cream);font-size:14px;box-shadow:0 10px 30px rgba(43,18,20,.28);z-index:60;max-width:calc(100vw - 24px)}
.toast .btn{background:var(--cream);color:var(--burg);min-height:36px}
.toast.plain{padding-right:18px}
.update-bar{position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:70;display:flex;align-items:center;gap:12px;padding:8px 8px 8px 16px;border-radius:10px;background:var(--burg);color:var(--cream);font-size:14px;box-shadow:0 8px 24px rgba(43,18,20,.25)}
.update-bar .btn{background:var(--cream);color:var(--burg);min-height:34px}
.install-btn{position:fixed;right:18px;bottom:22px;z-index:40}

/* print (monthly PDF) */
#print{display:none}
@page{margin:14mm}
@media print{
  body{background:#fff}
  body>*:not(#print){display:none!important}
  #print{display:block;color:#2B1214;font:11pt/1.45 var(--sans)}
  #print h1{font:500 22pt Lora,Georgia,serif;margin:0 0 2pt}
  #print h2{font-size:12pt;margin:16pt 0 6pt;color:#371B1B;border-bottom:1px solid #D8CBBE;padding-bottom:4pt}
  #print table{width:100%;border-collapse:collapse;font-size:9.5pt}
  #print th{text-align:left;font-weight:600;border-bottom:1px solid #371B1B;padding:4pt}
  #print td{padding:3pt 4pt;border-bottom:1px solid #E8DDCD;vertical-align:top}
  #print .r{text-align:right;font-variant-numeric:tabular-nums}
  #print .sum{display:flex;gap:24pt;flex-wrap:wrap}
  #print .sum div b{display:block;font-size:13pt}
  #print .brand{font:600 10pt Montserrat,sans-serif;letter-spacing:.1em;color:#892427}
  #print tr{break-inside:avoid}
}

/* ---------- mobile ---------- */
.bottom-nav,.more-sheet{display:none}
@media (max-width:860px){
  .app{background:none}
  .sidebar{display:none}
  .topbar{display:flex;justify-content:space-between;align-items:center;padding:12px 16px 4px;background:var(--cream);position:sticky;top:0;z-index:20}
  .topbar .wordmark span{font-size:15px}.topbar .wordmark{gap:10px;min-height:44px}
  .content{padding:10px 16px 110px}
  .view-head h1{font-size:20px}
  .view-head .head-actions .search-btn,.view-head .head-actions .btn:not(.keep-m){display:none}
  .hero{padding:22px 20px;gap:18px}.hero .big{font-size:56px}
  .strip{grid-template-columns:repeat(2,minmax(0,1fr))}.strip>div{padding:16px}.strip>div:nth-child(3){grid-column:1/-1;border-left:0;border-top:1px solid var(--line2)}
  .strip .v{font-size:22px}
  .charts{grid-template-columns:1fr}
  .rep-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.rep-stats>div:nth-child(3){border-left:0}.rep-stats>div:nth-child(n+3){border-top:1px solid var(--line2)}
  .bottom-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:center;position:fixed;left:0;right:0;bottom:0;height:76px;padding:6px 6px calc(10px + env(safe-area-inset-bottom));background:var(--ivory);border-top:1px solid var(--line);z-index:30}
  .bottom-nav button{display:flex;flex-direction:column;align-items:center;gap:3px;border:0;background:none;font-size:11px;color:var(--text2);min-height:52px;justify-content:center;cursor:pointer}
  .bottom-nav button .i{width:22px;height:22px}
  .bottom-nav button[aria-current="page"]{color:var(--text);font-weight:600}.bottom-nav button[aria-current="page"] .i{color:var(--cherry-t)}
  .bottom-nav .add{justify-self:center;width:58px;height:58px;margin-top:-26px;border-radius:999px;background:var(--burg);color:var(--cream);border:4px solid var(--cream);box-shadow:0 6px 18px rgba(55,27,27,.25)}
  .bottom-nav .add .i{width:26px;height:26px;stroke-width:2.25;color:var(--cream)}
  .more-sheet{display:flex;flex-direction:column;position:fixed;left:0;right:0;bottom:0;z-index:55;background:var(--ivory);border-radius:20px 20px 0 0;padding:10px 16px calc(20px + env(safe-area-inset-bottom));box-shadow:0 -10px 40px rgba(43,18,20,.2);animation:up .2s ease-out}
  .more-sheet .grab{align-self:center;width:40px;height:4px;border-radius:999px;background:var(--line);margin-bottom:10px}
  .more-sheet button{display:flex;align-items:center;gap:14px;min-height:52px;padding:0 8px;border:0;border-bottom:1px solid var(--line2);background:none;font-size:16px;text-align:left;cursor:pointer;color:var(--text)}
  .more-sheet button .i{color:var(--burg2)}
  .overlay{align-items:flex-end;padding:0}
  .dialog{max-width:none;border-radius:20px 20px 0 0;max-height:92vh;animation:up .2s ease-out}
  .tx-inner{min-width:0}
  .tx-head{display:none}
  .tx-row{grid-template-columns:36px minmax(0,1fr) auto;grid-template-areas:"i d a" "i m acts";row-gap:0;padding:10px 14px}
  .tx-row>.ic{grid-area:i}.tx-row>.d{grid-area:d}.tx-row>.a{grid-area:a}.tx-row>.c{display:none}.tx-row>.m{grid-area:m;font-size:12px;color:var(--text2)}.tx-row .mc{display:inline}.tx-row>.acts{grid-area:acts}
  .tx-group{padding:9px 14px}.hist{padding-left:14px}
  .toolbar select.input{flex:1 1 140px}
  .settings{flex-direction:column}.set-nav{position:static;flex:none;flex-direction:row;overflow-x:auto;width:100%}.set-nav button{white-space:nowrap}
  .form{grid-template-columns:1fr}
  .toast{bottom:92px}
  .install-btn{bottom:92px}
  .cal-day{min-height:52px;padding:5px}.cal-day .v{font-size:10px}
  .auth-panel{border-radius:26px 26px 0 0;min-height:auto}
  .auth-brand{min-height:auto;padding-bottom:260px}
}
@media (max-width:520px){
  .auth-brand{padding:28px 22px 210px}
  .wordmark span{font-size:20px}
  .auth-panel{padding:40px 22px 48px}
  .a-input input{height:56px;font-size:17px}
  .a-primary{height:58px;font-size:18px}.a-secondary{height:54px;font-size:18px}
  .a-row .check,.a-link{font-size:16px}
  .cat-grid button{font-size:10px}
  .grid3:not(.keep){grid-template-columns:1fr}
  .hero .mini-v{font-size:16px}
}
