:root{--bg:#f6f7f2;--surface:#fff;--ink:#1b2d26;--muted:#53635a;--line:#dfe5db;--dark:#173930;--dark-text:#d3e5d8;--green:#226344;--soft:#e9f1e7;--sage:#a9cb9e;--rust:#913e24;--radius:18px;color:var(--ink);background:var(--bg);font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*,:after,:before{box-sizing:border-box}html{overflow-x:clip}body{min-width:280px;margin:0}body:has(dialog[open]){overflow:hidden}button,input,select{font:inherit;color:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline-offset:3px;outline:3px solid #538956}h1,h2,h3,p{margin:0}small{font-size:.79rem}.layout{grid-template-columns:228px minmax(0,1fr);min-height:100dvh;display:grid}.sidebar{border-right:1px solid var(--line);background:#fbfcf8;flex-direction:column;gap:32px;height:100dvh;padding:28px 16px;display:flex;position:sticky;top:0}.brand{letter-spacing:-.025em;align-items:center;gap:10px;font-size:1.12rem;font-weight:760;display:flex}.mark{background:var(--dark);color:#e9f6d8;border-radius:10px;place-items:center;width:32px;height:32px;font-size:1.22rem;line-height:1;display:grid}.sidebar .brand{margin-left:8px}.nav{flex-direction:column;gap:4px;display:flex}.nav button{text-align:left;min-height:47px;color:var(--muted);background:0 0;border:0;border-radius:11px;align-items:center;gap:12px;padding:0 13px;font-size:.89rem;font-weight:650;display:flex}.ghost:hover,.nav button:hover{background:#eef2ea}.nav button[aria-current=page]{background:var(--soft);color:#1c4b34}.nav-icon{text-align:center;width:20px;font-size:1.2rem;line-height:1}.side-footer{border-top:1px solid var(--line);color:var(--muted);gap:4px;margin-top:auto;padding:17px 8px 0;display:grid}.side-footer strong{color:var(--ink);font-size:.86rem}.main{width:100%;max-width:1280px;margin:0 auto;padding:28px clamp(22px,4vw,58px) 46px}.top{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;gap:12px;margin-bottom:26px;padding-bottom:18px;display:flex}.top .brand{display:none}.top-note{color:var(--muted);font-size:.8rem;font-weight:660}.actions,.top-actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.top-actions{justify-content:flex-end;margin-left:auto}.button,.ghost{border:1px solid var(--line);background:var(--surface);border-radius:10px;justify-content:center;align-items:center;gap:6px;min-height:42px;padding:9px 14px;font-size:.87rem;font-weight:700;text-decoration:none;display:inline-flex}.primary{background:var(--dark);border-color:var(--dark);color:#fff}.primary:hover{background:#265645}.ghost{background:0 0;border-color:#0000}.text-button{color:var(--green);text-align:left;background:0 0;border:0;min-height:38px;padding:6px 0;font-size:.87rem;font-weight:710}.text-button:hover{text-decoration:underline}.title-row{justify-content:space-between;align-items:end;gap:12px;margin:0 0 22px;display:flex}.card,.card-head>div,.row,.row-body,.stack,.title-row>div{min-width:0}.month-field{flex:0 0 166px;width:166px;max-width:100%}h1{letter-spacing:-.055em;font-size:clamp(1.9rem,3.25vw,3rem);font-weight:760;line-height:1.07}h2{letter-spacing:-.026em;font-size:1.12rem;line-height:1.2}h3{font-size:.95rem}.sub{color:var(--muted);margin-top:7px;font-size:.87rem;line-height:1.5}.grid{grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);align-items:start}.grid,.stack{gap:16px;display:grid}.card{border:1px solid var(--line);background:var(--surface);border-radius:var(--radius);padding:19px}.card-head{justify-content:space-between;align-items:center;gap:12px;margin-bottom:13px;display:flex}.hero{background:var(--dark);color:#fff;border:0;border-radius:22px;align-content:center;min-height:258px;padding:clamp(21px,3.6vw,35px);display:grid}.hero-label{color:var(--dark-text);font-size:.89rem;font-weight:660}.hero-value{letter-spacing:-.065em;font-variant-numeric:tabular-nums;white-space:nowrap;align-items:baseline;gap:9px;margin:6px 0 21px;font-size:clamp(2.15rem,5.1vw,4rem);font-weight:670;line-height:1;display:flex}.hero-value small{letter-spacing:0;color:var(--dark-text);font-size:.83rem;font-weight:700}.meter{background:#4a6358;border-radius:8px;height:7px;overflow:hidden}.meter span{background:#bbd79f;border-radius:8px;height:100%;display:block}.hero-foot{grid-template-columns:1fr 1fr;gap:10px;margin-top:17px;display:grid}.hero-foot section{gap:4px;display:grid}.hero-foot section+section{border-left:1px solid #547064;padding-left:17px}.hero-foot span{color:var(--dark-text);font-size:.77rem}.hero-foot strong{font-variant-numeric:tabular-nums;font-size:.93rem}.negative{color:#f4bea7}.categories{gap:10px;display:grid}.category{grid-template-columns:auto 1fr auto;align-items:center;gap:8px;font-size:.84rem;display:grid}.amount,.category b{font-variant-numeric:tabular-nums;white-space:nowrap}.dot{background:var(--spot,#6d9a77);border-radius:50%;width:8px;height:8px;display:inline-block}.rows{display:grid}.row{border:0;border-bottom:1px solid var(--line);text-align:left;background:0 0;align-items:center;gap:11px;width:100%;padding:11px 0;display:flex}.row:last-child{border-bottom:0}button.row:hover{background:#f9faf6}.row-body{flex:1;gap:4px;display:grid}.row-body strong{overflow-wrap:anywhere;font-size:.89rem}.muted,.row-body small{color:var(--muted)}.amount{font-size:.83rem;font-weight:760}.chip{background:var(--soft);color:#21573e;white-space:nowrap;border-radius:6px;padding:5px 8px;font-size:.76rem;font-weight:750}.chip.up{color:var(--rust);background:#f8ebe5}.notice{color:#344b3c;background:#eaf1e7;border-radius:10px;padding:10px 12px;font-size:.84rem;line-height:1.45}.notice.error{color:#7b301f;background:#faeee7}.notice:empty{display:none}.day-group+.day-group{border-top:1px solid var(--line);margin-top:9px}.day-group h3{color:var(--muted);padding:13px 0 4px;font-size:.81rem}.history-filter{flex-wrap:wrap;align-items:end;gap:10px;display:flex}.history-filter .field{flex:1;min-width:126px;max-width:190px}.history-filter select{min-width:104px}.price-plot{width:100%;height:70px;color:var(--green);margin:9px 0;display:block}.price-plot.up{color:var(--rust)}.price-detail-row{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;display:flex}.empty{color:var(--muted);padding:13px 0;font-size:.87rem;line-height:1.55}.field{gap:5px;min-width:0;font-size:.78rem;font-weight:680;display:grid}.compact-input,.field input,.field select{background:#fff;border:1px solid #c9d4ca;border-radius:9px;width:100%;min-width:0;min-height:42px;padding:8px 10px;font-size:1rem}.field input:is([type=date],[type=month]){padding-inline:8px;font-weight:580}.field input:is([type=date],[type=month])::-webkit-calendar-picker-indicator{width:13px;margin:0;padding:0}.field input[type=date]::-webkit-datetime-edit{letter-spacing:-.025em;padding:0}.compact-input{width:auto;max-width:100%;min-height:39px;font-size:.83rem}.field input[type=checkbox]{width:18px;min-height:18px;accent-color:var(--green)}[hidden]{display:none!important}.shop-field{align-self:start;gap:7px;min-width:0;display:grid}.shop-field p{margin-top:0}.checkbox{align-items:center;gap:6px;display:flex}.form-grid{grid-template-columns:1fr 1fr;gap:12px;display:grid}.full{grid-column:1/-1}.list-space{gap:12px;display:grid}.invoice-list{gap:9px;margin-top:12px;display:grid}.detail-card{border-bottom:1px solid var(--line);min-width:0;padding:10px 0}.detail-card:last-child{border-bottom:0}details>summary{cursor:pointer;min-height:35px;padding:6px 0;font-size:.89rem;font-weight:700}.detail-actions{flex-wrap:wrap;gap:8px;margin-top:8px;display:flex}.nav-mobile,.top-note-mobile{display:none}.modal{border:1px solid var(--line);background:var(--bg);width:min(640px,100% - 24px);max-height:min(92dvh,900px);color:var(--ink);border-radius:23px;padding:0;overflow:auto;box-shadow:0 14px 70px #10291833}.modal::backdrop{background:#172e27a8}.modal-top{z-index:2;background:var(--bg);border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;gap:12px;padding:16px 20px;display:flex;position:sticky;top:0}.modal-top button{min-width:44px}.modal-content{padding:16px 20px 20px}.modal-content,.modal-form{gap:12px;display:grid}.modal-footer{background:var(--bg);border-top:1px solid var(--line);z-index:1;justify-content:space-between;align-items:center;gap:12px;padding:12px 0 0;display:flex;position:sticky;bottom:0}.line-card{border:1px solid var(--line);background:#fff;border-radius:12px;gap:9px;min-width:0;padding:12px;display:grid}.line-head,.line-meta{justify-content:space-between;align-items:center;display:flex}.line-head .ghost{min-height:35px;padding:5px 8px}.line-meta{gap:8px}.camera-video,.image-preview{-o-object-fit:contain;object-fit:contain;background:#e5ebe2;border-radius:12px;width:100%;max-height:320px;display:block}.source-button{justify-content:flex-start;min-height:51px}.toast{z-index:4;background:var(--dark);color:#fff;border-radius:10px;max-width:90%;padding:9px 13px;font-size:.86rem;position:fixed;bottom:22px;left:50%;transform:translate(-50%);box-shadow:0 3px 18px #132d2440}.toast:empty{display:none}@media (width<=1000px){.layout{grid-template-columns:184px minmax(0,1fr)}.sidebar{padding-inline:12px}.main{padding-inline:24px}.grid{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}}@media (width<=760px){.layout{display:block}.sidebar{display:none}.main{padding:14px 15px calc(82px + env(safe-area-inset-bottom))}.top{margin-bottom:19px;padding-bottom:13px}.top .brand{display:flex}.top-note{display:none}.top-actions{gap:5px}.top-actions .button{padding-inline:9px}.grid{grid-template-columns:1fr}.hero{min-height:208px}.title-row{align-items:flex-start;margin-bottom:16px}.nav-mobile{z-index:3;border-top:1px solid var(--line);padding:4px 3px calc(4px + env(safe-area-inset-bottom));background:#fbfcf8;grid-template-columns:repeat(5,1fr);display:grid;position:fixed;bottom:0;left:0;right:0}.nav-mobile button{min-width:0;min-height:49px;color:var(--muted);background:0 0;border:0;border-radius:8px;place-content:center;justify-items:center;gap:4px;margin:0 2px;padding:4px 1px;font-size:.7rem;font-weight:680;display:grid}.nav-mobile button[aria-current=page]{background:var(--soft);color:#1c4b34}.toast{bottom:calc(66px + env(safe-area-inset-bottom))}}@media (width<=360px){.main{padding-inline:10px}.card{padding:14px}.hero{padding:18px}.hero-value{font-size:2rem}.form-grid{gap:8px}.modal-content,.modal-top{padding-inline:12px}.title-row{flex-wrap:wrap}}@media (width<=760px){.home-grid>.stack{display:contents}.home-grid .hero{order:1}.home-grid .by-category{order:2}.home-grid .recent-items{order:3}.home-grid .price-watch{order:4}.home-grid .plan-preview{order:5}.top-note-mobile{color:var(--muted);font-size:.72rem;font-weight:620;display:inline}}.app-main form{gap:12px;display:grid}.app-main button,.app-main input,.app-main label,.app-main summary{touch-action:manipulation}.app-main img{max-width:100%}.app-main .login{max-width:440px;margin:8vh auto}.app-main .title-row{align-items:start}.app-main .head-title,.app-main .history-filter .field{min-width:0}.app-main .history-filter .month-range{width:157px}.app-main .expense-controls{flex-wrap:wrap;gap:8px;display:flex}.app-main .form-grid>.actions{align-content:end}.app-main .stat{gap:4px;display:grid}.app-main .stat strong{font-variant-numeric:tabular-nums}.app-main .line-card input{font-weight:520}.app-main details>summary{overflow-wrap:anywhere}.app-main .source-image{margin:8px 0}.app-main .settings-entry{border-bottom:1px solid var(--line);min-width:0;padding-block:8px}.app-main .settings-entry:last-child{border-bottom:0}.app-main .login-status{min-height:1rem}.app-main .draft-fields{border:0;gap:12px;min-width:0;margin:0;padding:0;display:grid}.app-main .product-summary{flex-wrap:wrap;align-items:center;gap:16px;display:flex}.app-main .product-meta{flex:180px}.app-main .product-photo{-o-object-fit:contain;object-fit:contain;background:#f1f4ed;border-radius:12px;width:104px;height:104px}@media (width<=420px){.app-main .history-filter .month-range{flex:1 0 42%}.app-main .title-row{flex-wrap:wrap}}
