@font-face{font-family:Poppins;font-weight:400;font-display:swap;src:url(fonts/poppins-400.woff2) format("woff2")}
@font-face{font-family:Poppins;font-weight:500;font-display:swap;src:url(fonts/poppins-500.woff2) format("woff2")}
@font-face{font-family:Poppins;font-weight:600;font-display:swap;src:url(fonts/poppins-600.woff2) format("woff2")}
@font-face{font-family:Poppins;font-weight:700;font-display:swap;src:url(fonts/poppins-700.woff2) format("woff2")}
:root{--ivory:#F9F5F0;--green:#398521;--green-d:#2d6a1a;--green-l:#E6F0E1;--terra:#C45C38;--terra-l:#F7E6DF;--ink:#2B2B28;--muted:#6B7280;--chip:#EDE8E1;--line:#E7E1D8;--card:#fff;--r:16px;--tab:68px;--amber:#B7791F;--amber-l:#FBF0DC}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body.sm-app-body{font-family:Poppins,system-ui,-apple-system,"Segoe UI",sans-serif;background:var(--ivory);color:var(--ink);font-size:15px;line-height:1.45;min-height:100vh}
a{color:var(--green);text-decoration:none}
h1,h2,h3{margin:0;font-weight:600;letter-spacing:-.01em}
h1{font-size:24px}h2{font-size:18px}h3{font-size:16px}
.muted{color:var(--muted)}.small{font-size:13px}.xs{font-size:12px}
.shell{display:flex;min-height:100vh}
.side{display:none}
.main{flex:1;min-width:0;padding:0 16px calc(var(--tab) + 24px + env(safe-area-inset-bottom))}
.topbar{position:sticky;top:0;z-index:20;background:rgba(249,245,240,.94);backdrop-filter:blur(8px);display:flex;align-items:center;gap:12px;padding:14px 0 10px;margin:0 0 4px}
.topbar .logo{width:36px;height:36px;border-radius:10px}
.topbar .t{flex:1;min-width:0}.topbar .t small{display:block;color:var(--muted);font-size:12px}
.topbar .t b{display:block;font-size:17px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tabs{position:fixed;left:0;right:0;bottom:0;z-index:30;background:#fff;border-top:1px solid var(--line);display:flex;padding:6px 4px calc(6px + env(safe-area-inset-bottom))}
.tabs a{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;color:var(--muted);font-size:11px;font-weight:500;padding:6px 0;min-height:52px;border-radius:12px}
.tabs a svg{width:24px;height:24px}
.tabs a.on{color:var(--green)}.tabs a.on svg{stroke-width:2.3}
.ico{width:1.25em;height:1.25em;flex:none;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.card{background:var(--card);border-radius:var(--r);padding:16px;box-shadow:0 1px 2px rgba(43,43,40,.05),0 0 0 1px var(--line);margin-bottom:12px}
.card.flat{box-shadow:none;background:transparent;padding:0}
.sec{margin:20px 0 10px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.sec h2{font-size:17px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.kpi{background:#fff;border-radius:var(--r);padding:14px;box-shadow:0 0 0 1px var(--line)}
.kpi b{display:block;font-size:26px;font-weight:600;line-height:1.1}
.kpi span{font-size:12.5px;color:var(--muted)}
.kpi.green{background:var(--green);color:#fff;box-shadow:none}.kpi.green span{color:rgba(255,255,255,.85)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 18px;border-radius:14px;border:0;font:inherit;font-weight:600;font-size:15px;cursor:pointer;background:var(--green);color:#fff;text-align:center}
.btn:active{transform:scale(.98)}
.btn.block{width:100%}
.btn.ghost{background:#fff;color:var(--ink);box-shadow:0 0 0 1px var(--line)}
.btn.terra{background:var(--terra)}
.btn.soft{background:var(--green-l);color:var(--green-d)}
.btn.sm{min-height:40px;padding:0 14px;font-size:14px;border-radius:12px}
.btn[disabled]{opacity:.5}
.chips{display:flex;gap:8px;overflow-x:auto;padding:2px 0 6px;scrollbar-width:none;margin:0 -16px;padding-left:16px;padding-right:16px}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;min-height:38px;padding:0 14px;border-radius:999px;background:var(--chip);color:var(--ink);border:0;font:inherit;font-size:14px;font-weight:500;display:inline-flex;align-items:center;gap:6px;cursor:pointer}
.chip.on{background:var(--ink);color:#fff}
.chip .n{font-size:12px;opacity:.7}
.search{position:relative;margin:4px 0 10px}
.search input{width:100%;height:48px;border-radius:14px;border:0;box-shadow:0 0 0 1px var(--line);background:#fff;font:inherit;padding:0 14px 0 44px;font-size:16px;color:var(--ink)}
.search svg{position:absolute;left:14px;top:13px;width:22px;height:22px;color:var(--muted)}
.field{display:block;margin-bottom:14px}
.field>span{display:block;font-size:13px;font-weight:500;margin-bottom:6px}
.field input,.field textarea,.field select{width:100%;min-height:48px;border-radius:12px;border:0;box-shadow:0 0 0 1px var(--line);background:#fff;font:inherit;font-size:16px;padding:12px 14px;color:var(--ink)}
.field textarea{min-height:110px;resize:vertical}
.field input:focus,.field textarea:focus,.field select:focus,.search input:focus{outline:0;box-shadow:0 0 0 2px var(--green)}
.badge{display:inline-flex;align-items:center;gap:4px;font-size:12px;font-weight:600;padding:3px 9px;border-radius:999px;background:var(--green-l);color:var(--green-d);white-space:nowrap}
.badge.terra{background:var(--terra-l);color:var(--terra)}
.badge.amber{background:var(--amber-l);color:var(--amber)}
.badge.grey{background:var(--chip);color:var(--muted)}
/* produits */
.prod{display:flex;gap:12px;align-items:flex-start;background:#fff;border-radius:var(--r);padding:12px;box-shadow:0 0 0 1px var(--line);margin-bottom:10px}
.prod.out{background:#FBF8F4}
.prod.out .pimg{filter:grayscale(.9);opacity:.6}
.pimg{width:64px;height:64px;border-radius:12px;object-fit:cover;background:var(--chip);flex:none;display:flex;align-items:center;justify-content:center;color:var(--muted);font-weight:600;font-size:22px}
.pbody{flex:1;min-width:0}
.pname{font-weight:600;font-size:15px;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pmeta{font-size:13px;color:var(--muted);margin-top:2px}
.pbadges{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.prow{display:flex;align-items:center;gap:8px;margin-top:10px;flex-wrap:wrap}
.toggle{position:relative;width:56px;height:34px;flex:none;border-radius:999px;background:var(--terra);border:0;cursor:pointer;transition:background .15s}
.toggle::after{content:"";position:absolute;top:3px;left:3px;width:28px;height:28px;border-radius:50%;background:#fff;transition:left .15s;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.toggle.on{background:var(--green)}.toggle.on::after{left:25px}
.stepper{display:inline-flex;align-items:center;background:var(--chip);border-radius:12px;height:40px}
.stepper button{width:40px;height:40px;border:0;background:transparent;font:inherit;font-size:22px;font-weight:500;color:var(--ink);cursor:pointer;border-radius:12px}
.stepper output{min-width:36px;text-align:center;font-weight:600}
.iconbtn{width:40px;height:40px;border-radius:12px;border:0;background:var(--chip);color:var(--ink);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex:none}
.iconbtn svg{width:20px;height:20px}
.iconbtn.today{background:var(--chip)}.iconbtn.today.on{background:var(--amber-l);color:var(--amber)}
.price{font-weight:600;white-space:nowrap}
.bulk{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}
.empty{text-align:center;padding:28px 18px;background:#fff;border-radius:var(--r);box-shadow:0 0 0 1px var(--line)}
.empty .em{width:64px;height:64px;border-radius:20px;background:var(--green-l);color:var(--green);display:inline-flex;align-items:center;justify-content:center;margin-bottom:10px}
.empty .em svg{width:32px;height:32px}
.empty p{color:var(--muted);margin:6px 0 14px;font-size:14px}
.fab{position:fixed;right:16px;bottom:calc(var(--tab) + 16px + env(safe-area-inset-bottom));z-index:25;width:58px;height:58px;border-radius:18px;background:var(--green);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 18px rgba(57,133,33,.35)}
.fab svg{width:28px;height:28px}
.list{background:#fff;border-radius:var(--r);box-shadow:0 0 0 1px var(--line);overflow:hidden;margin-bottom:12px}
.li{display:flex;align-items:center;gap:12px;padding:14px 16px;min-height:56px;color:var(--ink);border-bottom:1px solid var(--line)}
.li:last-child{border-bottom:0}
.li .lic{width:36px;height:36px;border-radius:10px;background:var(--green-l);color:var(--green);display:flex;align-items:center;justify-content:center;flex:none}
.li .lic svg{width:20px;height:20px}
.li .lt{flex:1;min-width:0}.li .lt small{display:block;color:var(--muted);font-size:12.5px}
.li .chev{color:var(--muted);width:18px;height:18px}
.toast{position:fixed;left:16px;right:16px;bottom:calc(var(--tab) + 18px);z-index:60;background:var(--ink);color:#fff;border-radius:14px;padding:14px 16px;font-size:14px;transform:translateY(140%);opacity:0;transition:.2s;text-align:center}
.toast.show{transform:none;opacity:1}
.presets{display:grid;grid-template-columns:1fr;gap:8px;margin-bottom:14px}
.preset{display:flex;align-items:center;gap:12px;padding:12px;border-radius:14px;background:#fff;box-shadow:0 0 0 1px var(--line);border:0;font:inherit;text-align:left;cursor:pointer;color:var(--ink);min-height:60px}
.preset.on{box-shadow:0 0 0 2px var(--green);background:var(--green-l)}
.preset .pe{width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex:none;color:#fff}
.preset b{display:block;font-weight:600;font-size:14.5px}.preset small{color:var(--muted);font-size:12.5px}
.reach{display:flex;gap:10px;align-items:center;background:var(--green-l);color:var(--green-d);border-radius:14px;padding:12px 14px;font-size:14px;margin-bottom:14px}
.reach b{font-size:20px}
.hist{display:flex;gap:12px;padding:12px;background:#fff;border-radius:var(--r);box-shadow:0 0 0 1px var(--line);margin-bottom:10px}
.hist img{width:56px;height:56px;border-radius:12px;object-fit:cover;flex:none;background:var(--chip)}
.chart{width:100%;height:auto;display:block}
.seg{display:inline-flex;background:var(--chip);border-radius:12px;padding:3px}
.seg a{padding:8px 14px;border-radius:10px;color:var(--ink);font-size:14px;font-weight:500;min-height:38px;display:inline-flex;align-items:center}
.seg a.on{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.bar{height:10px;border-radius:6px;background:var(--chip);overflow:hidden;margin-top:6px}.bar i{display:block;height:100%;background:var(--green);border-radius:6px}
.hero{background:linear-gradient(135deg,#398521,#2d6a1a);color:#fff;border-radius:20px;padding:18px;margin-bottom:12px;position:relative;overflow:hidden}
.hero h1{font-size:21px}.hero p{margin:4px 0 0;color:rgba(255,255,255,.85);font-size:14px}
.hero .blob{position:absolute;right:-30px;top:-30px;width:130px;height:130px;border-radius:50%;background:rgba(255,255,255,.08)}
.qa{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px}
.qa a{background:rgba(255,255,255,.14);color:#fff;border-radius:14px;padding:10px 6px;text-align:center;font-size:12.5px;font-weight:500;display:flex;flex-direction:column;align-items:center;gap:4px;min-height:64px;justify-content:center}
.qa svg{width:22px;height:22px}
.sheet-bg{position:fixed;inset:0;background:rgba(43,43,40,.4);z-index:70;display:none}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:71;background:#fff;border-radius:22px 22px 0 0;padding:10px 16px calc(18px + env(safe-area-inset-bottom));transform:translateY(100%);transition:transform .2s}
.sheet.open{transform:none}.sheet-bg.open{display:block}
.sheet .grab{width:40px;height:5px;border-radius:3px;background:var(--line);margin:0 auto 12px}
.sheet .li{padding:14px 4px;border:0;background:none;width:100%;font:inherit;cursor:pointer;text-align:left}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.alert{padding:12px 14px;border-radius:12px;background:var(--terra-l);color:var(--terra);font-size:14px;margin-bottom:12px}
.alert.ok{background:var(--green-l);color:var(--green-d)}
.row{display:flex;gap:10px;align-items:center}
.photo-pick{display:flex;align-items:center;gap:12px;padding:12px;border-radius:14px;box-shadow:0 0 0 1px var(--line);background:#fff;cursor:pointer}
.photo-pick img{width:64px;height:64px;border-radius:12px;object-fit:cover;background:var(--chip)}
.plan{border-radius:var(--r);padding:16px;background:#fff;box-shadow:0 0 0 1px var(--line);margin-bottom:10px}
.plan.cur{box-shadow:0 0 0 2px var(--green)}
.plan .pp{font-size:22px;font-weight:600}
/* auth */
.auth{min-height:100vh;display:flex;flex-direction:column;padding:28px 20px calc(24px + env(safe-area-inset-bottom));max-width:440px;margin:0 auto}
.auth .brand{display:flex;flex-direction:column;align-items:center;text-align:center;margin:18px 0 26px}
.auth .brand img{width:76px;height:76px;border-radius:22px;margin-bottom:14px;box-shadow:0 6px 18px rgba(57,133,33,.18)}
.auth .brand p{color:var(--muted);margin:6px 0 0}
.auth .pane{display:none}.auth .pane.on{display:block}
.auth .foot{margin-top:auto;text-align:center;color:var(--muted);font-size:12.5px;padding-top:24px}
.pw{position:relative}.pw button{position:absolute;right:6px;top:6px;height:36px;border:0;background:none;color:var(--muted);font:inherit;font-size:13px;font-weight:500;padding:0 10px;cursor:pointer}
@media (min-width:900px){
 .side{display:flex;flex-direction:column;width:248px;flex:none;background:#fff;border-right:1px solid var(--line);padding:22px 14px;position:sticky;top:0;height:100vh}
 .side .sb{display:flex;align-items:center;gap:10px;padding:0 8px 22px;font-weight:600}
 .side .sb img{width:38px;height:38px;border-radius:11px}
 .side a.nv{display:flex;align-items:center;gap:12px;padding:12px;border-radius:12px;color:var(--ink);font-weight:500;margin-bottom:4px}
 .side a.nv svg{width:22px;height:22px}
 .side a.nv.on{background:var(--green-l);color:var(--green-d)}
 .side .sp{margin-top:auto}
 .tabs{display:none}
 .main{padding:8px 36px 40px;max-width:1040px}
 .topbar .logo{display:none}
 .fab{bottom:28px;right:28px}
 .toast{left:auto;right:28px;bottom:28px;width:360px}
 .plist{display:grid;grid-template-columns:1fr 1fr;gap:10px}.plist .prod{margin:0}
 .grid4{grid-template-columns:repeat(4,1fr)}
 .presets{grid-template-columns:repeat(3,1fr)}
 .sheet{left:50%;right:auto;width:420px;margin-left:-210px;bottom:24px;border-radius:22px}
}
.reach>svg{width:28px;height:28px}.hist .xs svg{width:13px;height:13px;vertical-align:-2px}
[hidden]{display:none!important}
.grid2>*{min-width:0}.field input{min-width:0}
input[type=date]{-webkit-appearance:none;appearance:none}
@media (max-width:899px){.presets{grid-template-columns:repeat(3,1fr)}.preset{flex-direction:column;text-align:center;gap:6px;padding:12px 6px;min-height:96px}.preset small{display:none}.preset b{font-size:13.5px}}
.sheet:not(.open){visibility:hidden}
