:root{--green:#075542;--ink:#182e28;--muted:#566861;--line:#d4ddd8;--paper:#fff;--canvas:#f3f5f4;font-family:"Segoe UI",system-ui,sans-serif;color:var(--ink)}
*{box-sizing:border-box}body{margin:0;background:var(--canvas);font-size:15px;line-height:1.5}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}a{color:var(--green);text-underline-offset:3px}button{border:1px solid #bacac1;border-radius:5px;background:white;color:var(--green);padding:.55rem .95rem;font-weight:600}button:hover{background:#eef4f1}button.primary,.button,#new{background:var(--green);color:white;border-color:var(--green)}button.primary:hover,.button:hover,#new:hover{background:#073f33}
:focus-visible{outline:3px solid #bd8b37;outline-offset:3px}[hidden],#work:empty,#message:empty{display:none!important}.skip{position:absolute;left:-10000px}.skip:focus{left:1rem;top:1rem;z-index:9;padding:.5rem;background:white}
.shell{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:100vh}aside{background:#133e33;color:white;padding:28px 16px;display:flex;flex-direction:column;min-height:100vh;position:sticky;top:0;height:100dvh;overflow:auto}.brand{border-bottom:1px solid #45665a;padding:0 12px 22px}.brand strong{display:block;font-size:24px;letter-spacing:-1px}.brand small{font-size:13px;color:#d2ded8}.group{font-size:11px;text-transform:uppercase;letter-spacing:.09em;font-weight:650;color:#b3c9be;margin:25px 12px 6px}nav button,nav a,.sidefoot a,.sidefoot button{display:block;text-align:left;width:100%;color:white;background:transparent;border:none;text-decoration:none;padding:9px 12px;border-radius:4px;font-size:14px;font-weight:500}nav [aria-current=page],nav a:hover,nav button:hover,.sidefoot a:hover,.sidefoot button:hover{background:#315c4e}.sidefoot{margin-top:auto;padding-top:20px;border-top:1px solid #45665a}
main{min-width:0}header{background:white;border-bottom:1px solid var(--line);min-height:60px;padding:12px clamp(18px,3vw,48px);display:flex;align-items:center;justify-content:space-between;gap:1rem;font-weight:600}#who,.pagehead span{font-size:14px;color:var(--muted);font-weight:400;overflow-wrap:anywhere}#work,#message{max-width:1280px;margin:26px auto;padding:0 clamp(18px,3vw,48px)}h1,h2,h3{line-height:1.2;margin:0 0 16px}h1,h2{font-size:30px;letter-spacing:-.035em}h3{font-size:18px}.pagehead{display:flex;align-items:baseline;justify-content:space-between;gap:1rem}.stats{display:grid;grid-template-columns:repeat(3,1fr);margin:8px 0 24px;background:white;border:1px solid var(--line);border-top:3px solid var(--green);border-radius:5px}.stat{padding:18px 24px}.stat+.stat{border-left:1px solid var(--line)}.stat span{font-size:14px;color:var(--muted)}.stat strong{display:block;font-size:32px;line-height:1.3;font-variant-numeric:tabular-nums}.panels{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(0,1.4fr);gap:20px}.panel,.editor,#find,#users,#items{border:1px solid var(--line);background:white;border-radius:5px}.panel{padding:20px}.panel h3{border-bottom:1px solid var(--line);padding-bottom:14px}.panel>a{display:block;margin:14px 0}.stockrow,.entry{padding:12px 0;border-bottom:1px solid var(--line)}.stockrow{display:flex;align-items:center;justify-content:space-between;gap:12px}.stockrow button{border:none;text-align:left;padding:0;font-weight:500}.stockrow small{white-space:nowrap;color:var(--muted)}#all-products{margin-top:16px}.buttons{display:flex;gap:10px;align-items:center;margin:12px 0}.buttons input{flex:1}.editor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;padding:24px}.wide{grid-column:1/-1}.editor label,label.field{display:grid;gap:6px;font-weight:600;font-size:14px}input,select,textarea{border:1px solid #abbcb3;border-radius:5px;padding:9px 11px;min-width:0;max-width:100%;background:white;color:var(--ink);font-weight:400}input[type=checkbox]{accent-color:var(--green)}#items{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:14px}th,td{padding:11px 14px;border-bottom:1px solid var(--line)}thead{background:#edf2ef}tbody th{font-weight:600}th small{display:block;color:var(--muted);font-weight:400}td{white-space:nowrap;font-variant-numeric:tabular-nums}tbody tr:last-child>*{border-bottom:0}#users,#find{padding:18px}#find button{margin-top:12px}.entry button{margin-left:10px}#balance{margin-top:24px}
.signed-out .shell{display:block}.signed-out aside,.signed-out header{display:none}.signed-out main{min-height:100vh;min-height:100dvh;display:flex;justify-content:center;flex-direction:column;align-items:flex-start;padding:clamp(24px,7vw,110px);background:linear-gradient(90deg,rgba(8,35,29,.91),rgba(8,35,29,.53) 48%,rgba(8,35,29,.13)),url("/assets/solar.jpg") center/cover no-repeat #133e33}
#welcome{width:min(100%,406px);border-radius:10px;background:#fff;padding:36px;box-shadow:0 12px 48px #061b2350;border-top:4px solid var(--green)}.login-logo{width:155px;height:64px;object-fit:contain;object-position:left center;display:block}.login-rule{height:1px;background:var(--line);margin:20px 0 25px}#welcome h1{font-size:35px;margin-bottom:8px}#welcome p{color:var(--muted);margin:0 0 24px}#welcome button{width:100%;text-align:left;padding:12px 16px}#welcome .return{display:inline-block;margin-top:16px;font-size:14px}.signed-out #message:not(:empty){order:2;margin:12px 0 0;background:white;padding:10px;border-radius:5px}
@media(max-width:760px){.shell{display:block}aside{min-height:0;height:auto;position:static;padding:12px 16px;gap:7px}.brand{padding:0;border:0}.brand strong,.brand small{display:inline-block;margin-right:.6rem}.brand strong{font-size:20px}nav{display:flex;overflow:auto;gap:4px}nav button,nav a{width:auto;white-space:nowrap}.group{display:none}.sidefoot{margin:0;padding:0;border:0;display:flex}.sidefoot a,.sidefoot button{width:auto;font-size:13px}.panels,.editor{grid-template-columns:1fr}.stat{padding:12px}.stat strong{font-size:24px}.stat span{font-size:12px}#work{margin:20px auto}.pagehead{display:block;margin-bottom:15px}.pagehead h1{margin-bottom:4px}.signed-out main{padding:20px;background-position:64% center}#welcome{padding:26px}header{flex-wrap:wrap}table{min-width:580px}}
.catalog-thumb{width:60px;height:60px;object-fit:contain;background:white}#items table{font-size:14px}#items td:first-child{width:84px}#items tbody tr:hover{background:#f5f9f7}#items tbody th{max-width:40ch}#items thead{background:#e9efec}#items td:nth-child(3){font-weight:700;color:#174a38}.buttons{flex-wrap:wrap}.buttons input[type=search]{min-width:175px}.panel{box-shadow:0 3px 13px #133e3308}.editor .wide input[type=file]{width:100%;border:1px dashed #99b2a5;padding:16px;background:#fafcfb}.editor #manage-photos{margin-top:9px}#work .entry p{margin:4px 0}
.overview-chart{background:#fff;border:1px solid #d3dfdb;border-radius:12px;padding:clamp(18px,3vw,34px);margin:20px 0;box-shadow:0 6px 25px #233c3910}.chart-title,.chart-body{display:flex;align-items:center;justify-content:space-between;gap:24px}.chart-title{border-bottom:1px solid #dce6e2;padding-bottom:16px}.chart-title h2{font-size:1.3rem;letter-spacing:-.035em;margin:0}.chart-body{padding-top:24px;justify-content:space-around}.stock-ring{width:154px;aspect-ratio:1;flex:none;border-radius:50%;background:conic-gradient(#12745c var(--share),#e2ebe7 0);display:grid;place-items:center}.stock-ring>div{width:78%;aspect-ratio:1;border-radius:50%;background:white;display:grid;align-content:center;text-align:center}.stock-ring strong{font-size:2.3rem;letter-spacing:-.05em}.stock-ring span{font-size:.8rem;color:#47615a}#category-bars{flex:1;max-width:650px}.chart-bar{border:0;background:white;color:#18392e;display:grid;grid-template-columns:1fr auto;width:100%;text-align:left;padding:8px 4px;gap:5px}.chart-bar:hover{background:#f0f6f3}.chart-bar i{grid-column:span 2;background:#eaf0ed;height:7px;border-radius:6px;overflow:hidden}.chart-bar b{display:block;background:linear-gradient(90deg,#155744,#49a68a);height:100%}.stats .stat:first-child{background:#143c32;color:white}.stats .stat:first-child span{color:#d8e9e2}@media(max-width:620px){.chart-body{flex-direction:column}.stock-ring{width:116px}#category-bars{width:100%}.chart-title{gap:8px}.chart-title select{max-width:44%}}

.app-table{overflow-x:auto}.app-table th small{display:block;font-weight:400;color:#53665b}.app-record{background:#fff;border:1px solid #dce4dd;border-radius:12px;padding:24px}.app-record .line{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid #e5ebe5}.app-record label{display:grid;margin:12px 0}.app-record button{margin:8px 4px}.description-editor nav,.description-editor .tools{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin:.6rem 0}
.description-editor [aria-pressed=true]{background:#184b35;color:white}
.description-editor .writing,.description-editor textarea{box-sizing:border-box;width:100%;min-height:12rem;padding:.8rem;background:white;border:1px solid #a5b8ab;border-radius:6px;overflow-wrap:anywhere}
.description-editor img{max-width:100%;height:auto}
.description-editor [hidden]{display:none!important}
.description-editor .tools label{width:auto}
@media(hover:hover){:where(a,button:not(:disabled),summary,select,.credit-entry,.app-table tr:has(a)):hover{outline:2px solid #85b994;outline-offset:1px;box-shadow:0 3px 9px #20673126}}
:where(a,button,summary,select,input,textarea):focus-visible,.app-table tr:focus-within{outline:2px solid #267139;outline-offset:2px}
:where(a,button,summary,select,.credit-entry,.app-table tr:has(a)):active{box-shadow:inset 0 0 0 2px #408454}
.app-table tr:has(a){cursor:pointer}.app-table tr:focus-within,.app-table tr:active{background:#e1f2df}
@media(hover:hover){.app-table tr:has(a):hover,.credit-entry:hover{background:#eaf5e9}}
@media(hover:hover) and (prefers-reduced-motion:no-preference){:where(a,button:not(:disabled),summary,select,.credit-entry,.app-table tr:has(a)):hover{translate:0 -2px}}
.debt-overview{display:flex;gap:1.5rem;align-items:center;background:#f4f9f5;border:1px solid #d4e2d6;padding:1.3rem;border-radius:16px}.debt-chart{width:96px;aspect-ratio:1;border-radius:50%;mask:radial-gradient(circle,transparent 47%,black 49%);flex-shrink:0}.debt-key{font-weight:650;display:inline-block;padding:.25rem .65rem;border-radius:1rem;margin:.2rem}.tone0{background:#d6efdd;color:#175a37}.tone1{background:#ffedcd;color:#844100}.tone2{background:#ffe0e1;color:#87242e}.debt-plan{margin:.7rem 0;padding:.75rem;border:1px solid #d5e2d7;border-radius:10px}.debt-plan summary{cursor:pointer}.debt-plan dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:.8rem}.debt-plan dt{font-size:.85rem}.debt-plan dd{margin:0;font-weight:650;overflow-wrap:anywhere}

button.debt-key{cursor:pointer}button.debt-key[aria-pressed="true"]{outline:2px solid currentColor;outline-offset:2px}
#owner-login{display:grid;gap:12px;width:min(100%,360px);margin:16px 0}#owner-login label{display:grid;gap:5px}#owner-login input{font:inherit;color:#18372f;background:white;border:1px solid #a2b8ab;border-radius:6px;padding:10px}#owner-login button{justify-self:start}#login-status:empty{display:none}
