:root{font-family:'DM Sans',system-ui,-apple-system,Segoe UI,sans-serif;color:#1d3026;background:#f4f6ef;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-height:100vh}button,input,select,textarea{font:inherit}button{cursor:pointer}a{text-decoration:none;color:inherit}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #8dd16a;outline-offset:2px}
button:disabled{cursor:wait;opacity:.55}
.boot{min-height:100vh;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#567664;gap:15px}
.spinner{width:30px;height:30px;border:3px solid #bed4c2;border-top-color:#1f794a;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.layout{display:grid;grid-template-columns:252px 1fr;min-height:100vh}
.sidebar{background:#123a2b;color:#e9f4e9;padding:26px 16px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:24px;letter-spacing:-.8px;padding:4px 12px 28px}
.brand img{width:39px;height:39px}.brand span span{color:#d9c17f}
.nav{display:flex;flex-direction:column;gap:5px;overflow-y:auto;scrollbar-width:thin;flex:1}
.nav button{background:transparent;color:#bed4c7;border:0;padding:12px 14px;border-radius:12px;text-align:left;font-weight:650;display:flex;align-items:center;gap:12px;width:100%;transition:.18s}
.nav button:hover,.nav button.active{background:#2d5b43;color:#fff}.nav .glyph{font-size:21px;width:24px;text-align:center}
.sidefooter{border-top:1px solid #38604a;padding:15px 11px 0;font-size:12px;color:#b4cebf;display:flex;flex-direction:column;gap:10px}
.sidefooter button{background:none;color:#fff;border:0;text-align:left;padding:0;font-size:13px}
.main{min-width:0}.topbar{height:84px;display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid #e5ece4;padding:0 34px;gap:20px}
.farm-switch{display:flex;align-items:center;gap:12px}.farm-switch select{border:1px solid #dbe6da;border-radius:10px;padding:10px 30px 10px 12px;color:#284b34;background:#fff;max-width:300px}
.userchip{display:flex;align-items:center;gap:11px;font-size:13px;color:#52695b}.avatar{display:grid;place-items:center;width:37px;height:37px;border-radius:100%;background:#d9ecd9;color:#205538;font-weight:800}
.content{max-width:1390px;margin:auto;padding:33px 34px 60px}
.pagehead{display:flex;justify-content:space-between;gap:15px;align-items:center;margin-bottom:27px}
.eyebrow{text-transform:uppercase;color:#658270;letter-spacing:1.4px;font-size:11px;font-weight:800}
h1,h2,h3,p{margin-top:0}h1{font-size:clamp(26px,3.2vw,39px);letter-spacing:-1.3px;margin:5px 0 7px}h2{font-size:22px;letter-spacing:-.5px}h3{font-size:16px}
.muted{color:#718478}.subtitle{color:#738879;margin:0;font-size:14px}
.button{background:#176e43;border:1px solid #176e43;color:#fff;border-radius:11px;padding:11px 18px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:43px}
.button:hover{background:#0f5935}.button.secondary{background:#fff;color:#23513b;border:1px solid #cfded0}.button.ghost{border:0;color:#286244;background:transparent}
.button.danger{background:#8f342b;border-color:#8f342b}.button.small{padding:7px 12px;min-height:34px;font-size:12px}.actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
.card{background:#fff;border:1px solid #e4eae1;box-shadow:0 7px 22px rgba(13,64,36,.035);border-radius:18px;padding:22px}
.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:23px}
.stat{display:flex;justify-content:space-between;align-items:center;padding:20px}.stat .icon{height:44px;width:44px;border-radius:12px;background:#eaf3e9;display:grid;place-items:center;font-size:23px}
.stat strong{font-size:30px;letter-spacing:-1.2px;display:block}.stat small{color:#7a8c7c;font-weight:650}.stat:nth-child(2) .icon{background:#fff1e0}.stat:nth-child(3) .icon{background:#e6eef9}.stat:nth-child(4) .icon{background:#f4eaf7}
.grid2{display:grid;grid-template-columns:1.25fr .75fr;gap:18px;margin-bottom:20px}
.cardhead{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;gap:10px}.cardhead h2{margin:0}
.tablewrap{overflow:auto;border-radius:12px}table{width:100%;border-collapse:collapse;font-size:13px;text-align:left}th{font-size:11px;text-transform:uppercase;letter-spacing:.7px;color:#78907e;background:#f6f8f4;font-weight:800}td,th{padding:13px 12px;border-bottom:1px solid #eef2ec;white-space:nowrap}tr.clickable{cursor:pointer}tr.clickable:hover{background:#f5faf3}
.pill{display:inline-flex;gap:5px;align-items:center;background:#e7f3e6;color:#236d42;padding:4px 9px;border-radius:999px;font-weight:750;font-size:11px}.pill.warn{color:#a16c16;background:#fff2da}.pill.grey{color:#587166;background:#eaf0ea}
.empty{padding:28px 16px;text-align:center;color:#78907e;border:1px dashed #d9e4d8;border-radius:13px;background:#fbfcfa;font-size:14px}
.itemgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}
.item{cursor:pointer;transition:.15s}.item:hover{transform:translateY(-2px);box-shadow:0 12px 32px rgba(19,85,49,.09)}
.item strong{font-size:16px}.item .itemmeta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:12px 0 0;font-size:12px;color:#6e8273}
.item .itemicon{display:grid;place-items:center;background:#eaf4e7;width:48px;height:48px;border-radius:14px;font-size:27px;margin-bottom:15px}
.field{display:flex;flex-direction:column;gap:7px;margin:0 0 16px}.field label{font-size:12px;font-weight:800;color:#45634f}
.field input,.field select,.field textarea{border:1px solid #ccdacc;background:#fff;color:#23422d;padding:11px 13px;border-radius:11px;min-width:0;width:100%;font-size:14px}
.field textarea{min-height:86px;resize:vertical}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}.formgrid .wide{grid-column:1/-1}
.modalback{position:fixed;inset:0;background:rgba(8,32,18,.48);z-index:30;display:flex;align-items:center;justify-content:center;padding:14px}
.modal{background:#fff;width:min(640px,100%);border-radius:19px;box-shadow:0 15px 70px #092e2045;max-height:94vh;overflow-y:auto;padding:25px}
.modal .modalhead{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:22px}
.close{border:0;background:#eff4eb;border-radius:9px;padding:7px 12px;font-size:21px}
.auth{min-height:100vh;display:grid;grid-template-columns:1fr 1fr;background:#f5f7ef}
.authhero{background:linear-gradient(140deg,#163d2a 20%,#2a6743);color:#fff;padding:65px clamp(35px,7vw,120px);display:flex;flex-direction:column;justify-content:center}
.authhero .brand{padding:0 0 75px}.authhero h1{font-size:clamp(35px,5vw,66px);line-height:1.08;letter-spacing:-2px;margin-bottom:22px}
.authhero p{color:#d7ead8;font-size:17px;line-height:1.7}
.authfeatures{display:flex;flex-wrap:wrap;gap:10px;margin-top:30px}.authfeatures span{border:1px solid #80aa87;border-radius:40px;padding:9px 14px;font-weight:700;font-size:12px}
.authpanel{display:grid;place-items:center;padding:25px}.authbox{width:min(420px,100%)}.authbox h2{font-size:30px;margin-bottom:7px}
.authbox .button{width:100%}.formhint{font-size:13px;color:#6d8773}.link{border:0;background:none;color:#1a7746;font-weight:750;padding:5px;text-decoration:underline}
.qrpanel{display:flex;align-items:center;gap:25px;padding:18px;border:1px solid #e1e9dc;border-radius:16px;background:#fff}
.qrpanel img{width:148px;height:148px;border:8px solid #fff;box-shadow:0 0 0 1px #e5e9dd;border-radius:8px}
.detailgrid{display:grid;grid-template-columns:2fr 1fr;gap:20px}.detailfact{display:grid;grid-template-columns:140px 1fr;border-bottom:1px solid #edf0ed;padding:12px 2px;font-size:13px}
.detailfact span{color:#78917e}.divider{border:0;border-top:1px solid #e5ebe3;margin:20px 0}
#reader{width:min(450px,100%);margin:16px auto;border-radius:14px;overflow:hidden}#reader video{border-radius:12px!important}
#toast{position:fixed;right:22px;bottom:26px;background:#183e2b;color:#fff;padding:13px 18px;border-radius:12px;box-shadow:0 8px 30px #0003;z-index:80;display:none;max-width:min(370px,95vw);font-size:13px}#toast.show{display:block}
.banner{display:flex;align-items:center;justify-content:space-between;gap:15px;background:#e5efe1;border-radius:18px;padding:23px 30px;margin-bottom:23px}
.banner h2{margin-bottom:7px}.banner p{margin:0;color:#67816a;font-size:14px}.chip{display:inline-flex;border:1px solid #cbdcca;padding:6px 9px;border-radius:99px;font-size:11px;color:#59816c;font-weight:800}
.mobilebar{display:none}.offline{color:#a76816;background:#fff2d5;padding:10px 18px;text-align:center;font-size:12px;font-weight:750}
@media(max-width:1180px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.itemgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.grid2{grid-template-columns:1fr}}
@media(max-width:760px){.layout{display:block}.sidebar{display:none}.main{padding-bottom:75px}.topbar{height:64px;padding:0 17px}.userchip .username{display:none}.content{padding:22px 15px 38px}.pagehead{align-items:flex-start}.pagehead h1{font-size:27px}.pagehead .button{font-size:12px;padding:10px}.cards{gap:9px}.stat{padding:13px}.stat strong{font-size:23px}.stat .icon{width:36px;height:36px;font-size:18px}.card{padding:17px}.itemgrid{grid-template-columns:1fr 1fr;gap:10px}.item{padding:14px}.item strong{font-size:14px}.mobilebar{position:fixed;bottom:0;left:0;right:0;z-index:15;background:#fff;border-top:1px solid #e3eae2;display:flex;justify-content:space-around;padding:7px 0 max(7px,env(safe-area-inset-bottom))}.mobilebar button{background:none;border:0;display:flex;flex-direction:column;align-items:center;gap:3px;color:#738677;font-size:10px;font-weight:750;min-width:58px}.mobilebar button.active{color:#157d4b}.mobilebar button span{font-size:21px}.auth{grid-template-columns:1fr}.authhero{display:none}.authpanel{min-height:100vh}.detailgrid{grid-template-columns:1fr}.qrpanel{flex-direction:column;text-align:center}.formgrid{grid-template-columns:1fr}.banner{padding:19px}.farm-switch select{max-width:170px}.cardhead{align-items:flex-start}}
@media(max-width:370px){.cards{grid-template-columns:1fr 1fr}.stat .icon{display:none}.itemgrid{grid-template-columns:1fr}.topbar{padding:0 9px}}
@media print{.sidebar,.topbar,.mobilebar,.pagehead,.actions,.button{display:none!important}.main{padding:0}.content{padding:0}.qrpanel{border:0;display:block}.qrpanel img{width:240px;height:240px}.card{box-shadow:none;border:none}}

[hidden]{display:none!important}
