:root{--green:#12764c;--ink:#193b2d;--muted:#65786e;--line:#e0e9e3;--bg:#f4f7f3;--light:#e8f4e9}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.6 system-ui,"Microsoft YaHei",sans-serif}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,.button{min-height:46px;border:1px solid var(--line);border-radius:12px;padding:10px 18px;background:white;color:var(--ink);cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px}button:hover,.button:hover{border-color:var(--green);background:var(--light)}button:disabled{opacity:.5;cursor:wait}.primary{background:var(--green);color:white;border-color:var(--green)}.primary:hover{background:#0b5f3c;color:white}.danger{color:#b33131}a{color:var(--green)}h1,h2,h3,p{margin-top:0}h1{font-size:28px;margin-bottom:0}h2{font-size:21px;margin-bottom:16px}h3{font-size:17px;margin-bottom:8px}small,.muted{color:var(--muted)}small{font-size:13px}aside{position:fixed;inset:0 auto 0 0;width:232px;background:#fff;border-right:1px solid var(--line);padding:32px 22px;display:flex;flex-direction:column}.brand{display:flex;gap:12px;align-items:center;color:var(--ink);text-decoration:none;font-weight:700;font-size:21px}.brand b,#splash strong{background:var(--green);color:#fff;border-radius:14px;width:48px;height:48px;display:grid;place-items:center;font-size:28px}.brand small{display:block;font-weight:400;font-size:12px}#desktop-nav{margin-top:44px;display:grid;gap:12px}.navlink{display:flex;align-items:center;gap:14px;min-height:50px;padding:12px 18px;text-decoration:none;color:var(--muted);border-radius:12px}.navlink.active{background:var(--light);color:var(--green);font-weight:700}.navlink svg{width:22px;height:22px}.aside-note{margin-top:auto;background:var(--bg);border-radius:12px;padding:16px;font-size:14px}.shell{margin-left:232px;padding:0 40px;max-width:1800px}header{display:flex;align-items:center;justify-content:space-between;min-height:120px}header small{letter-spacing:1px;font-size:12px}main{min-height:70vh}footer{padding:30px 0;color:var(--muted);font-size:13px}.badge{font-size:13px;border-radius:100px;background:var(--light);padding:6px 12px;color:var(--green)}.hero{background:var(--green);color:white;border-radius:22px;padding:30px;display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:24px}.hero p{margin:8px 0 0;color:#d9efdc}.hero h2{font-size:26px;margin:0}.hero .button{background:#e5f6a9;border:0;color:#234322;font-weight:bold}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:22px 0}.stat,.panel{background:white;border:1px solid var(--line);border-radius:18px;padding:24px}.stat b{font-size:32px;display:block;line-height:1.5}.stat span{color:var(--muted);font-size:14px}.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.between{justify-content:space-between}.tools{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:22px}.tools input{flex:1;min-width:170px}input,select,textarea{width:100%;min-height:48px;border:1px solid #cbd9cf;border-radius:11px;padding:10px 12px;background:#fff;color:var(--ink)}input:focus,select:focus,textarea:focus{outline:2px solid #90cba9;outline-offset:2px}.tools select{width:160px}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:16px;background:white}table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap}th{font-size:13px;color:var(--muted);background:#f0f5ef;font-weight:500}td,th{padding:16px 20px;border-bottom:1px solid var(--line)}tr:last-child td{border-bottom:0}.product-title{display:flex;align-items:center;gap:12px}.thumb{width:54px;height:54px;border-radius:12px;object-fit:cover;background:var(--light);display:grid;place-items:center;flex-shrink:0;color:var(--green);font-size:24px}.thumb svg{width:26px;height:26px}.product-title strong{display:block;white-space:normal;overflow-wrap:anywhere}.money{font-variant-numeric:tabular-nums;font-weight:700}.sale{color:var(--green)}.cards{display:none}.empty{text-align:center;padding:52px 24px;background:white;border:1px dashed #bbd1c1;border-radius:18px}.empty p{color:var(--muted)}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.field{display:grid;gap:7px;font-size:14px}.field.wide{grid-column:1/-1}.photo-zone{background:#f2f8ee;border:1px dashed #9ebaa4;border-radius:16px;padding:24px;margin-bottom:24px;text-align:center}.photo-zone img{max-width:100%;height:140px;object-fit:contain;border-radius:12px;display:block;margin:0 auto 16px}.photo-zone .row{justify-content:center}.photo-zone p{font-size:14px;margin:12px 0 0}.form-actions{display:flex;gap:12px;margin-top:24px}.form-actions button{min-width:130px}.history{display:grid;gap:14px}.event{background:white;border:1px solid var(--line);border-radius:14px;padding:18px 22px}.event p{margin:7px 0 0;overflow-wrap:anywhere}.event .prices{display:flex;gap:28px;font-size:14px}.settings{display:grid;grid-template-columns:1fr 1fr;gap:22px}.settings p{color:var(--muted);font-size:14px}.settings button{margin:4px 6px 4px 0}dialog{border:0;border-radius:20px;padding:28px;width:min(560px,calc(100% - 28px));max-height:85dvh;color:var(--ink)}dialog::backdrop{background:#10291faa}dialog img{max-height:190px;max-width:100%;display:block;margin:auto auto 18px}#toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);background:#173c2e;color:white;padding:12px 22px;border-radius:12px;z-index:30;display:none;max-width:90%;width:max-content}#bottom-nav{display:none}#splash{position:fixed;inset:0;z-index:100;background:#f4f7f3;display:flex;align-items:center;justify-content:center;flex-direction:column}#splash strong{width:84px;height:84px;font-size:44px;margin-bottom:20px}#splash p{color:var(--muted)}.notice{background:#fff7dd;padding:14px 18px;border-radius:12px;font-size:14px;margin-bottom:20px}.file-input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.section-head{margin:28px 0 16px}.section-head h2{margin:0}
@media(max-width:760px){aside{display:none}.shell{margin:0;padding:0 18px}header{min-height:95px;padding-top:env(safe-area-inset-top)}header small{font-size:11px}h1{font-size:24px}.hero{padding:24px;display:block;border-radius:18px}.hero h2{font-size:24px}.hero .button{margin-top:20px;width:100%}.hero p{font-size:14px}.stats{gap:9px;margin:18px 0}.stat{padding:16px 10px;border-radius:14px}.stat b{font-size:25px}.stat span{font-size:12px}.panel{padding:20px}.table-wrap{display:none}.cards{display:grid;gap:14px}.product-card{padding:18px;background:white;border:1px solid var(--line);border-radius:17px}.card-prices{display:grid;grid-template-columns:1fr 1fr;background:var(--bg);border-radius:12px;padding:12px 16px;margin:16px 0}.card-prices small{display:block}.card-prices b{font-size:21px}.product-card .row button{flex:1}.tools{gap:10px}.tools input{width:100%;flex-basis:100%}.tools select{flex:1}.tools button{flex:1}.form-grid{grid-template-columns:1fr 1fr;gap:16px 12px}.form-grid .field:first-child{grid-column:1/-1}.settings{grid-template-columns:1fr}.form-actions{position:sticky;bottom:90px;padding:12px 0;background:white}.form-actions button{flex:1;min-width:0}.photo-zone{padding:18px 12px}.photo-zone button{padding:10px 12px}.event{padding:16px}.event .prices{gap:14px;flex-wrap:wrap}.event .between{align-items:flex-start}footer{padding-bottom:110px;font-size:12px}#bottom-nav{position:fixed;inset:auto 0 0;background:#fff;display:grid;grid-template-columns:repeat(5,1fr);padding:8px 8px calc(8px + env(safe-area-inset-bottom));border-top:1px solid var(--line);z-index:10}#bottom-nav .navlink{padding:5px 2px;gap:3px;flex-direction:column;border-radius:10px;font-size:12px;min-height:56px}#bottom-nav .navlink[data-route="add"] svg{background:var(--green);color:white;padding:6px;width:34px;height:34px;border-radius:11px}#toast{bottom:100px}.row.between h2{font-size:20px}.thumb{width:52px;height:52px}.section-head{margin-top:25px}}
@media(prefers-reduced-motion:no-preference){button,.navlink{transition:background .15s}}
@media(max-width:760px){.tools button{white-space:nowrap;padding:10px 12px}}
.mobile-only{display:none}
[hidden]{display:none!important}
#team-panel .field{margin:12px 0}#team-panel h3{margin-top:22px}#team-content input{min-width:0}#team-content .event{overflow-wrap:anywhere}
.login-screen aside,.login-screen header,.login-screen footer,.login-screen #bottom-nav{display:none!important}.login-screen .shell{margin:0;padding:24px;max-width:none}.login-screen main{min-height:calc(100dvh - 48px);display:grid!important;place-items:center;padding:0!important}.login-card{max-width:420px;width:100%;background:white;border:1px solid var(--line);border-radius:22px;padding:28px}.login-mark,.avatar{width:50px;height:50px;display:grid;place-items:center;background:var(--green);color:white;border-radius:14px;font-size:26px;font-weight:bold}.login-card h1{margin-top:20px}.login-card .field,.simple-me .field{margin:16px 0}.login-card button{width:100%;margin-bottom:16px}.server-options{margin:10px 0 20px;color:var(--muted);font-size:14px}summary{cursor:pointer;min-height:44px;display:flex;align-items:center}.simple-me{max-width:600px;display:grid;gap:14px}.account-card{display:flex;align-items:center;gap:14px}.account-card h2{margin:0}.account-card>.badge{margin-left:auto}.simple-me h3{margin:0}.simple-me #cloud-status{margin:8px 0;font-size:14px}.simple-me #simple-logout{background:transparent;color:var(--muted)}.simple-me .panel{padding:18px 20px}.simple-me #update-status{font-size:14px;color:var(--muted)}.simple-me #check-update,.simple-me #apply-update{width:100%}
@media(max-width:760px){
 :root{--nav-height:68px}body{line-height:1.5}.shell{padding:0 14px}header{min-height:68px;padding-top:env(safe-area-inset-top);gap:12px}header small{display:none}header h1{font-size:22px}.badge{padding:5px 10px;flex-shrink:0}main{min-height:0;padding-bottom:calc(var(--nav-height) + env(safe-area-inset-bottom) + 20px)}footer{display:none}
 body[data-route="home"] main{display:flex;flex-direction:column}body[data-route="home"] .home-tools{order:-3;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:0 0 12px}.home-tools input{min-width:0;width:100%;font-size:16px}.home-tools button{min-width:64px;padding:10px 14px}
 .hero{order:-2;display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0;margin:0 0 12px;background:none;border-radius:0}.hero>div{display:none}.hero .button{display:flex;margin:0;width:100%;min-height:56px;padding:12px 8px;font-size:15px;background:var(--green);color:white;border-radius:14px;white-space:normal}.hero .mobile-only{background:#e4efde;color:#235336}.hero svg{flex-shrink:0;width:22px;height:22px}
 .stats{order:-1;gap:0;margin:0;background:white;border:1px solid var(--line);border-radius:14px;overflow:hidden}.stat{border:0;border-radius:0;padding:10px 8px;text-align:center}.stat+.stat{border-left:1px solid var(--line)}.stat span{font-size:12px}.stat b{font-size:22px;line-height:1.35}.section-head{margin:18px 0 10px}.section-head a{display:inline-flex;align-items:center;min-height:44px;font-size:14px}.section-head h2,.row.between h2{font-size:18px}
 .empty{padding:24px 16px}.empty h3{font-size:17px}.empty p{font-size:14px;margin-bottom:16px}.empty .button{width:100%}.cards{gap:12px}.product-card{padding:14px;border-radius:14px}.product-card>.row.between{flex-wrap:nowrap;align-items:flex-start;gap:8px}.product-title{min-width:0;gap:10px}.product-title>div{min-width:0}.product-title small{display:block;overflow-wrap:anywhere}.product-card>.row.between>.badge{max-width:80px;white-space:normal;overflow-wrap:anywhere}.thumb{width:46px;height:46px}.card-prices{margin:12px 0;padding:9px 12px}.card-prices b{font-size:21px}.product-card>small{display:block;margin-top:8px;font-size:12px}.product-card .row button{min-height:44px;padding:8px 12px}
 body[data-route="search"] .tools{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-bottom:12px}#query{grid-column:1/-1;min-width:0}#category{width:100%;min-width:0}body[data-route="search"] .tools [data-csv]{display:none}#result-count{font-size:14px;margin-bottom:12px}
 .panel{padding:16px;border-radius:14px}.panel>.row.between{margin-bottom:12px}.panel>.row.between h2{margin:0}.panel>.row.between>.badge{display:none}.photo-zone{padding:12px;margin-bottom:18px}.photo-zone>.row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.photo-zone button{width:100%;min-height:46px;font-size:14px}.photo-zone #camera{background:var(--green);color:white;border-color:var(--green)}.photo-zone p{font-size:13px;text-align:left}.photo-zone img{height:100px;margin-bottom:12px}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 10px}.field{min-width:0;font-size:14px}.form-grid .field:nth-child(-n+4){grid-column:1/-1}input,select,textarea{font-size:16px;min-width:0;min-height:48px}.form-grid input,.form-grid select,.form-grid textarea{scroll-margin-bottom:180px}.form-actions{position:fixed;left:0;right:0;bottom:calc(var(--nav-height) + env(safe-area-inset-bottom));padding:10px 14px;margin:0;z-index:11;border-top:1px solid var(--line);box-shadow:0 -4px 16px #193b2d08;gap:8px}.form-actions button{flex:0 1 auto;min-height:48px;padding:10px 14px;font-size:15px}.form-actions .primary{flex:1}body[data-route="add"] main{padding-bottom:calc(var(--nav-height) + env(safe-area-inset-bottom) + 100px)}
 #bottom-nav{padding:4px 8px calc(4px + env(safe-area-inset-bottom));min-height:calc(var(--nav-height) + env(safe-area-inset-bottom))}#bottom-nav .navlink{min-height:60px;justify-content:center;gap:2px;padding:4px 2px}#bottom-nav .navlink svg{width:23px;height:23px}#bottom-nav .navlink[data-route="add"] svg{width:30px;height:30px;padding:5px}#toast{bottom:calc(var(--nav-height) + env(safe-area-inset-bottom) + 85px)}
 dialog{padding:20px;width:calc(100% - 20px);max-height:calc(100dvh - 24px);overscroll-behavior:contain}dialog>.row{display:grid;grid-template-columns:1fr 1fr;gap:8px}dialog>.row:last-child{grid-template-columns:1fr}dialog button{width:100%;min-height:48px}dialog img{max-height:140px}.settings{gap:14px}.settings button{width:100%;margin:4px 0;min-height:48px}.settings p{overflow-wrap:anywhere}
 body.keyboard-open #bottom-nav{display:none}body.keyboard-open .form-actions{position:static;box-shadow:none;margin-top:18px;padding:12px 0 0}body.keyboard-open main{padding-bottom:20px}body.keyboard-open #toast{bottom:16px}
 #product-form .form-grid .field:nth-child(5),#product-form .form-grid .field:nth-child(6){order:1}#product-form .form-grid .field:nth-child(n+2):nth-child(-n+4){order:2}#product-form .form-grid .field:last-child{order:3}#product-form .production-field{order:2}
}
