/* GodownBook — soft 3D design system.
   Raised cards, key-style buttons with a solid bottom edge, inset "wells" for inputs, isometric crates.
   Green = money/stock in, red = out, amber = low stock. */
:root{
  --ink:#0b0f0c;--paper:#fff;--surface:#f3f5f0;--muted:#eef1ee;
  --in:#15803d;--out:#dc2626;--low:#b45309;--brand:#16a34a;--brand-dark:#0f7a35;--soft:#dcfce7;
  --line:rgb(11 15 12/.14);
  --shadow-3d:inset 0 1px 0 0 rgb(255 255 255/.9),inset 0 -2px 0 0 rgb(11 15 12/.05),0 1px 2px rgb(11 15 12/.06),0 6px 14px -4px rgb(11 15 12/.12),0 18px 32px -14px rgb(11 15 12/.18);
  --shadow-3d-lg:inset 0 1px 0 0 rgb(255 255 255/.9),inset 0 -2px 0 0 rgb(11 15 12/.05),0 2px 4px rgb(11 15 12/.06),0 14px 26px -8px rgb(11 15 12/.18),0 32px 48px -20px rgb(11 15 12/.26);
  --well:inset 0 2px 4px rgb(11 15 12/.08),inset 0 0 0 1px rgb(11 15 12/.02);
}
*{box-sizing:border-box}
html,body{min-height:100%}
body{margin:0;font:14px/1.5 "Space Grotesk",system-ui,"Segoe UI",sans-serif;color:var(--ink);background:var(--surface);-webkit-font-smoothing:antialiased}
body{background-image:radial-gradient(rgb(11 15 12/.07) 1px,transparent 1px);background-size:18px 18px}
a{color:var(--brand-dark)}h1{font-size:1.5rem;letter-spacing:-.02em;margin:.2rem 0 1rem}h2{font-size:1.1rem;margin:1.3rem 0 .6rem}
b{font-weight:650}

/* ---- logo ---- */
.logo{display:inline-flex;align-items:center;gap:9px;font-weight:700;font-size:1.15rem;letter-spacing:-.02em;color:var(--ink);text-decoration:none}
.logo b{color:var(--brand)}.logo-mark{filter:drop-shadow(0 4px 4px rgb(11 15 12/.25));flex:none;transition:transform .35s cubic-bezier(.2,.8,.2,1)}
.logo:hover .logo-mark{transform:rotate(-8deg) translateY(-2px) scale(1.06)}

/* ---- app shell ---- */
.shell{display:flex;min-height:100vh;gap:16px;padding:14px}
.side{width:236px;flex:none;background:linear-gradient(165deg,#1a241d 0%,var(--ink) 75%);color:#e7efe9;border:1.5px solid #000;border-radius:1.2rem;
  box-shadow:inset 0 1px 0 0 rgb(255 255 255/.12),0 14px 26px -8px rgb(11 15 12/.35),0 32px 48px -20px rgb(11 15 12/.45);
  padding:16px 12px;display:flex;flex-direction:column;gap:2px;position:sticky;top:14px;height:calc(100vh - 28px);overflow:auto}
.side a.logo{color:#fff;margin:2px 6px 10px;padding:0;display:inline-flex;gap:9px}.side a.logo:hover{background:none;transform:none}.side a.logo>span{display:inline;width:auto;height:auto;background:none;border-radius:0;font-size:1.15rem;white-space:nowrap}
.side a{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:10px;color:#cfdad2;text-decoration:none;transition:background .15s,transform .15s}
.side a>span{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:8px;background:rgb(255 255 255/.07);font-size:13px}
.side a:hover{background:rgb(255 255 255/.08);transform:translateX(2px)}
.side a.on{background:linear-gradient(180deg,#22c55e,var(--brand-dark));color:#fff;box-shadow:inset 0 1px 0 rgb(255 255 255/.3),0 3px 0 #0b4a25,0 8px 14px -6px rgb(0 0 0/.5)}
.side a.on>span{background:rgb(255 255 255/.22)}
.grp{font-size:10.5px;letter-spacing:.09em;text-transform:uppercase;color:#7f9387;margin:14px 8px 3px}
.who{margin-top:auto;padding:12px 8px 2px;font-size:12px;color:#aebcb2;border-top:1px solid rgb(255 255 255/.1)}.who b{color:#fff}.who a{display:inline;padding:0;color:#4ade80}
.main{flex:1;min-width:0;max-width:1120px;padding:6px 6px 40px}

/* ---- surfaces ---- */
.card{background:var(--paper);border:1.5px solid var(--line);border-radius:1.1rem;padding:16px;margin-bottom:16px;box-shadow:var(--shadow-3d)}
.grid{display:grid;margin-bottom:16px;gap:14px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.grid>.card{margin:0}
.tilt{transition:transform .35s cubic-bezier(.2,.8,.2,1),box-shadow .35s}
@media(hover:hover){.tilt:hover{transform:perspective(900px) rotateX(4deg) rotateY(-5deg) translateY(-4px);box-shadow:var(--shadow-3d-lg)}}
.stat{display:flex;flex-direction:column;gap:2px}.stat b{font-size:1.45rem;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.grid>.card .stat b,.card.stat b{font-size:1.45rem}
.icon-tile{display:inline-grid;place-items:center;width:38px;height:38px;border-radius:.8rem;background:var(--soft);box-shadow:inset 0 1px 0 rgb(255 255 255/.7),inset 0 -3px 0 rgb(11 15 12/.12),0 4px 10px -4px rgb(11 15 12/.25)}

/* ---- tables ---- */
table{width:100%;border-collapse:separate;border-spacing:0}
th,td{padding:9px 10px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
th{font-size:11.5px;text-transform:uppercase;letter-spacing:.05em;color:#5b675f;background:#f7f9f5;position:sticky;top:0}
th:first-child{border-top-left-radius:10px}th:last-child{border-top-right-radius:10px}
tbody tr:hover td,table tr:hover td{background:#fbfdf9}
td.n,th.n{text-align:right;font-variant-numeric:tabular-nums}
.in{color:var(--in)}.out{color:var(--out)}.low{color:var(--low)}.muted{color:#68756d}

/* ---- buttons: raised keys ---- */
.btn{display:inline-block;background:linear-gradient(180deg,#22c55e,var(--brand));color:#fff;border:0;border-radius:11px;padding:8px 16px;cursor:pointer;font:inherit;font-weight:600;text-decoration:none;
  box-shadow:inset 0 1px 0 rgb(255 255 255/.3),0 4px 0 #0b5227,0 8px 14px -6px rgb(11 15 12/.4);transform:translateY(0);transition:transform .08s,box-shadow .08s,filter .15s}
.btn:hover{transform:translateY(-1px);filter:brightness(1.05);box-shadow:inset 0 1px 0 rgb(255 255 255/.3),0 5px 0 #0b5227,0 10px 16px -6px rgb(11 15 12/.4)}
.btn:active{transform:translateY(3px);box-shadow:inset 0 1px 0 rgb(255 255 255/.3),0 1px 0 #0b5227,0 2px 4px -2px rgb(11 15 12/.3)}
.btn.ghost{background:linear-gradient(180deg,#fff,#f1f4ef);color:var(--ink);box-shadow:inset 0 1px 0 #fff,0 0 0 1.5px var(--line),0 4px 0 rgb(11 15 12/.2),0 8px 12px -6px rgb(11 15 12/.25)}
.btn.ghost:active{box-shadow:inset 0 1px 0 #fff,0 0 0 1.5px var(--line),0 1px 0 rgb(11 15 12/.2)}
.btn.danger{background:linear-gradient(180deg,#ef4444,var(--out));box-shadow:inset 0 1px 0 rgb(255 255 255/.3),0 4px 0 #8f1717,0 8px 14px -6px rgb(11 15 12/.4)}
.btn.sm{padding:4px 10px;font-size:12px;border-radius:9px;box-shadow:inset 0 1px 0 rgb(255 255 255/.3),0 3px 0 #0b5227,0 6px 10px -5px rgb(11 15 12/.4)}
.btn.ghost.sm{box-shadow:inset 0 1px 0 #fff,0 0 0 1.5px var(--line),0 3px 0 rgb(11 15 12/.2)}
.btn.danger.sm{box-shadow:inset 0 1px 0 rgb(255 255 255/.3),0 3px 0 #8f1717}
.side .btn.ghost{background:rgb(255 255 255/.08);color:#fff;box-shadow:0 0 0 1px rgb(255 255 255/.18),0 3px 0 rgb(0 0 0/.5);margin-top:8px}

/* ---- inputs: inset wells ---- */
input,select,textarea{font:inherit;color:inherit;padding:8px 10px;border:1.5px solid var(--line);border-radius:10px;background:#fbfcfa;box-shadow:var(--well);max-width:100%;transition:border-color .15s,box-shadow .15s}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--brand);box-shadow:var(--well),0 0 0 3px rgb(22 163 74/.2)}
label{display:block;font-size:12px;font-weight:600;color:#445049;margin-bottom:9px}
label>input,label>select,label>textarea{display:block;width:100%;margin-top:4px;font-weight:400}
input[type=checkbox],input[type=radio]{box-shadow:none;accent-color:var(--brand)}
.row{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end}.row>*{flex:1;min-width:130px}.row>.btn{flex:0}
:focus-visible{outline:2px solid var(--brand);outline-offset:2px}

/* ---- misc ---- */
.flash{background:var(--soft);padding:10px 16px;margin:0 6px 14px;border-radius:12px;border:1.5px solid rgb(21 128 61/.3);box-shadow:var(--shadow-3d);animation:pop-in .22s cubic-bezier(.2,.8,.2,1)}
.flash.err{background:#fee2e2;color:#991b1b;border-color:rgb(220 38 38/.35)}
.badge{display:inline-block;padding:1px 9px;border-radius:99px;background:var(--muted);font-size:12px;box-shadow:inset 0 1px 0 #fff,0 1px 2px rgb(11 15 12/.12)}
details.card>summary{cursor:pointer;font-weight:650}
.inline{display:inline}.center{max-width:400px;margin:7vh auto}
@keyframes pop-in{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:none}}
@keyframes float-y{0%,100%{transform:translateY(0)}50%{transform:translateY(-9px)}}
.pop-in{animation:pop-in .3s cubic-bezier(.2,.8,.2,1)}.card{animation:pop-in .25s cubic-bezier(.2,.8,.2,1) both}

/* ---- public pages ---- */
.pub-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:14px auto;max-width:1060px;padding:10px 16px;background:var(--paper);border:1.5px solid var(--line);border-radius:1.1rem;box-shadow:var(--shadow-3d)}
.pub-head nav{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.pub-head nav a:not(.btn){color:var(--ink);text-decoration:none;font-weight:500}
.hero{display:grid;grid-template-columns:1.05fr 1fr;gap:20px;align-items:center;padding:34px 0 20px}
.hero h1{font-size:clamp(1.9rem,4.4vw,3rem);line-height:1.05;letter-spacing:-.035em}.hero h1 em{font-style:normal;color:var(--brand)}
.hero p{font-size:1.05rem;max-width:34em}.hero .cta{display:flex;gap:14px;flex-wrap:wrap;margin-top:18px}
.scene{position:relative;display:grid;place-items:center}.scene svg{width:100%;max-width:460px;height:auto;overflow:visible}
.scene .fl{animation:float-y 4.6s ease-in-out infinite}.scene .fl2{animation:float-y 5.4s ease-in-out -2.1s infinite}.scene .fl3{animation:float-y 4s ease-in-out -1s infinite}
.chip{position:absolute;background:var(--paper);border:1.5px solid var(--line);border-radius:12px;padding:6px 12px;font-weight:650;font-size:13px;box-shadow:var(--shadow-3d-lg);animation:float-y 5s ease-in-out infinite}
.chip.a{top:8%;left:2%}.chip.b{bottom:12%;right:0;animation-delay:-2s}.chip i{font-style:normal}
.pub{max-width:1060px;margin:0 auto;padding:0 14px 50px}
.auth-wrap{min-height:100vh;display:grid;place-items:center;padding:20px}.auth-card{width:100%;max-width:400px}
.auth-card .logo{margin-bottom:14px;font-size:1.4rem}
.feature .icon-tile{margin-bottom:8px}

@media(max-width:860px){.hero{grid-template-columns:1fr}.scene{order:-1}}
@media(max-width:760px){.shell{flex-direction:column;padding:8px}.side{width:auto;height:auto;position:static;flex-direction:row;flex-wrap:wrap;align-items:center}.grp{display:none}.who{margin-top:0;border:0}.main{padding:4px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
@media print{body{background:#fff}.print-hide{display:none!important}.shell{padding:0}.main{padding:0;max-width:none}.card{box-shadow:none;animation:none}}

/* ---- wide tables scroll inside their card instead of overflowing it ---- */
.card:has(table){overflow-x:auto}
td>input,td>select{width:100%;min-width:64px}
td>input.n{min-width:72px;text-align:right}
#lines{min-width:820px}#lines td:nth-child(1){min-width:200px}#lines td:nth-child(2){min-width:140px}
