*{box-sizing:border-box}body{margin:0;background:#f1f4f3;color:#1c3330;font:15px system-ui}aside{position:fixed;width:238px;height:100vh;background:#123d36;color:#d9e8e2;padding:30px 22px}h2{font-size:21px;margin:0}aside small{display:block;margin:8px 0 42px;color:#9ebeb0}button{cursor:pointer;font:inherit;border:0;border-radius:7px;padding:12px 18px;background:#176b55;color:white}nav button{display:block;background:transparent;text-align:left;width:100%;margin:9px 0;color:#c7dcd4}nav button.active{background:#2c574c;color:white}aside footer{position:absolute;bottom:28px;font-size:12px;color:#a7c4b7}main{margin-left:238px;padding:30px 40px;max-width:1600px}header{display:flex;justify-content:space-between;gap:16px;align-items:center;padding-bottom:24px;border-bottom:1px solid #dce4e0}.tag{background:#f7e6bd;color:#775315;padding:7px 12px;border-radius:20px;font-size:12px}h1{font-size:30px;letter-spacing:-1px;margin:26px 0 5px}.muted{color:#75847e}.row{display:flex;justify-content:space-between;align-items:center;gap:15px}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin:27px 0}.card,.panel{background:white;border:1px solid #dfe7e2;border-radius:12px;padding:24px}.value{font-size:32px;font-weight:650;margin:18px 0 9px}.value small{font-size:15px;font-weight:400;color:#75847e}.good{color:#228569}.panels{display:grid;grid-template-columns:1.6fr 1fr;gap:20px}.panel h3{margin:0 0 22px;font-size:17px}.bars{height:200px;display:flex;align-items:end;gap:18px;padding-top:20px;border-bottom:1px solid #e3e9e5}.bar{flex:1;background:#4a8e77;border-radius:5px 5px 0 0;position:relative;min-width:15px}.bar span{position:absolute;bottom:-26px;left:0;right:0;font-size:12px;color:#76877e;text-align:center}.legend{margin-top:39px;font-size:12px;color:#75847e}.status{display:inline-block;font-size:12px;border-radius:20px;padding:5px 10px;background:#e5f2eb;color:#237351}.warn{background:#fff0d6;color:#9c681b}table{border-collapse:collapse;width:100%;margin-top:15px}th,td{text-align:left;padding:15px 10px;border-bottom:1px solid #e9eeeb;font-size:14px}th{color:#75847e;font-size:12px;font-weight:500}.line{padding:16px 0;border-bottom:1px solid #e9eeeb}.line small{display:block;color:#7b8983;margin-top:6px}input,select{padding:11px;border:1px solid #d0ddd6;border-radius:7px;font:inherit;width:100%;margin:7px 0 16px}dialog{border:0;border-radius:14px;width:470px;max-width:92vw;padding:28px}dialog::backdrop{background:#102e3370}.hidden{display:none}.note{font-size:12px;color:#7c8a84;margin-top:22px}.secondary{background:#e6ede8;color:#26473b}@media(max-width:1000px){aside{width:190px;padding:25px 14px}main{margin-left:190px;padding:20px}.cards{grid-template-columns:repeat(2,1fr)}.panels{grid-template-columns:1fr}}@media(max-width:650px){aside{position:static;width:auto;height:auto}aside small{margin-bottom:12px}aside footer{display:none}nav{display:flex;flex-wrap:wrap}nav button{width:auto;margin:0;padding:10px}main{margin:0;padding:16px}header{flex-wrap:wrap}.cards{gap:10px}.card{padding:16px}.value{font-size:26px}table{display:block;overflow:auto}h1{font-size:25px}}
[hidden]{display:none!important}.panel{margin-top:20px;min-width:0}.table-wrap{overflow:auto}td small{display:block;margin-top:5px;color:#63766c}.muted,.note{color:#586d62}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #cf9b35;outline-offset:2px}#filters{justify-content:flex-start;flex-wrap:wrap;margin-top:22px}#filters label{max-width:210px}#notice:empty{display:none}#notice,[role=alert]{color:#99521b}dialog{max-height:90vh;overflow:auto}nav button{padding:10px}.bar span{font-size:10px}.legend{line-height:1.6}.small{font-size:12px}.actions{display:flex;gap:8px;flex-wrap:wrap}.warning{background:#fff4df;border-left:3px solid #c49b47;padding:12px;margin:15px 0}.bar{background:#367d64}h3{font-size:17px}@media(max-width:650px){.row{flex-wrap:wrap}.cards{grid-template-columns:1fr 1fr}.card .value{font-size:23px}main{min-width:0}#filters label{max-width:140px}.table-wrap table{display:table}aside small{margin-bottom:10px}nav button{font-size:13px}}
:root{--ink:#18372f;--green:#23654b;--line:#dce5df;--muted:#5e7469;--gold:#b79959;--paper:#f4f5f0}*{box-sizing:border-box}body{background:var(--paper);color:var(--ink);font-family:Segoe UI,Arial,sans-serif}aside{width:252px;padding:30px 18px;background:#142d26;border-right:1px solid #2b4539}.brand{display:flex;align-items:center;gap:12px;padding:0 4px 30px;border-bottom:1px solid #385046;margin-bottom:28px}.brand img{width:60px;height:72px;object-fit:contain;background:white;border-radius:5px;padding:4px}.brand h2{font-size:16px;line-height:1.35;letter-spacing:1px}.brand small{font-size:8px;letter-spacing:.7px;margin:8px 0 0;color:#adc2b4}nav button{border-radius:6px;margin:5px 0;padding:13px 12px;font-size:14px;color:#b8ccc0;border-left:3px solid transparent}nav button.active{background:#2a473a;border-left-color:#cfb780;color:#fff}nav button:hover{background:#294438}aside footer{line-height:1.8;padding-left:10px;color:#9ab5a6}main{margin-left:252px;max-width:1700px;padding:26px 40px 40px}header{padding-bottom:20px;font-size:12px;color:var(--muted)}.tag{display:flex;align-items:center;gap:7px;background:#e8eee5;color:#365b40;border:1px solid #d4dfcd;font-weight:600}.live-dot{width:6px;height:6px;border-radius:50%;background:#4f8159}h1{font-size:32px;font-weight:650;letter-spacing:-1px;margin:29px 0 8px}h2{font-size:18px;letter-spacing:-.3px;margin:0 0 18px}.muted{font-size:13px;color:var(--muted)}button{background:var(--green);font-size:13px;font-weight:600;border-radius:5px;padding:11px 16px}button:hover{filter:brightness(1.1)}.secondary{background:#edf1e9;color:#315440;border:1px solid #d4dfd2}#filters{background:#fff;border:1px solid var(--line);padding:12px 16px;border-radius:7px;gap:10px;margin-top:26px;align-items:center}#filters label{font-size:10px;text-transform:uppercase;letter-spacing:.8px;color:var(--muted);max-width:160px}#filters input{margin:5px 0 0;padding:7px;font-size:12px;background:#f9faf7}#filters button{font-size:11px;padding:9px 12px}.cards{gap:16px;margin:22px 0}.card{position:relative;border-radius:7px;padding:20px 22px;border:1px solid var(--line);box-shadow:0 2px 3px #1c382005}.card:before{content:'';position:absolute;left:0;top:22px;width:3px;height:27px;background:var(--gold)}.card:first-child{background:#183f30;color:#fff;border-color:#183f30}.card:first-child .muted,.card:first-child small{color:#bad0c0}.card .value{font-size:35px;letter-spacing:-1px;font-variant-numeric:tabular-nums;margin:19px 0 8px}.card small{font-size:11px;color:var(--muted)}.panel{border-radius:7px;border:1px solid var(--line);box-shadow:0 2px 3px #1c382005;padding:24px;margin-top:20px}.panels{grid-template-columns:1.5fr 1fr;gap:20px}.panels .panel{margin-top:0}.bar{background:#658d69;min-width:24px}.bars{height:215px;gap:18px;background:repeating-linear-gradient(to top,transparent 0,transparent 49px,#edf1ea 50px)}.bar span{font-size:10px;color:#49664f;bottom:-31px;line-height:1.4}.legend{margin-top:44px;font-size:11px}.line{padding:11px 0;font-size:13px}.status{border-radius:4px;background:#edf4ec;color:#356343;font-size:11px;white-space:nowrap;border:1px solid #d9e6d6}.warn{background:#faf1dc;color:#7b6022;border-color:#ecdfbb}th{background:#f4f6f0;font-size:10px;text-transform:uppercase;letter-spacing:.5px;color:#5d7164}td{font-size:12px;line-height:1.6}th,td{padding:13px 12px}tbody tr:hover{background:#f9faf7}.table-wrap{margin:0 -8px}.table-wrap button{font-size:11px;padding:8px 10px}.note{font-size:11px;line-height:1.7;color:#6b7e70}input,select{border-radius:5px;font-size:14px}dialog{border-radius:9px;padding:28px;box-shadow:0 20px 100px #0c241440}label{font-size:13px}.warning{font-size:12px;line-height:1.7;background:#fcf5e5;color:#75591d;border-left-color:#bea369}.department-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:24px}.department{background:white;border:1px solid var(--line);border-radius:7px;padding:23px}.department h2{font-size:17px;margin:18px 0}.department .actions{margin-top:20px}.department p{font-size:12px;color:var(--muted)}.overview-strip{display:flex;gap:20px;flex-wrap:wrap;padding:16px 20px;background:#e9eee3;border:1px solid #d8e1cf;border-radius:6px;font-size:12px;margin-bottom:20px}.overview-strip strong{font-size:18px;margin-right:5px}.data-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.data-grid p{font-size:13px;line-height:1.8;color:var(--muted)}.badge{color:#988052;font-size:10px;letter-spacing:1px;text-transform:uppercase}@media(max-width:1100px){main{padding:24px}.department-grid{grid-template-columns:1fr 1fr}.panels{grid-template-columns:1fr}.cards{grid-template-columns:1fr 1fr}}@media(max-width:750px){aside{position:static;width:100%;height:auto;padding:18px}.brand{border:0;padding:0;margin:0 0 16px}.brand img{height:52px;width:44px}.brand h2 br{display:none}.brand h2{font-size:16px}.brand small{font-size:8px}nav{display:flex;gap:4px;flex-wrap:wrap}nav button{width:auto;padding:9px;font-size:11px;margin:0}aside footer{display:none}main{margin:0;padding:20px 14px}h1{font-size:26px}.department-grid,.data-grid{grid-template-columns:1fr}.panel{padding:18px}.card{padding:17px}.card .value{font-size:27px}#filters{gap:8px}#filters label{max-width:135px}.row{flex-wrap:wrap}header{gap:8px}.tag{font-size:10px}.overview-strip{gap:12px}}@media print{aside,header,#filters,#new,button,.note{display:none!important}main{margin:0;padding:0}.cards{display:flex}.panel{break-inside:avoid}.table-wrap{overflow:visible}body{background:white}}
nav button{display:flex;align-items:center;gap:11px}
.nav-icon{width:44px;height:44px;flex:0 0 44px;object-fit:cover;border-radius:8px;box-shadow:0 2px 8px #061b16aa}
nav button span{min-width:0}
@media(max-width:750px){nav button{gap:7px}.nav-icon{width:36px;height:36px;flex-basis:36px;border-radius:7px}}
.kpi-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:42px}
.kpi-icon-box{display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;border:1px solid var(--line);border-radius:8px;background:#f6f7f3;color:#365b40}
.kpi-icon-box svg{display:block;width:24px;height:24px}
.card:first-child .kpi-icon-box{background:#ffffff12;border-color:#ffffff30;color:#fff}
.department-heading{display:flex;align-items:center;gap:13px;margin:18px 0}
.department-heading h2{margin:0}
.dept-icon-box{display:grid;place-items:center;width:48px;height:48px;flex:0 0 48px;border:1px solid #dce5df;border-radius:10px;background:#f2f5ef;color:#315b43}
.dept-icon-box svg{display:block;width:32px;height:32px}
body{background-image:linear-gradient(rgba(244,245,240,.72),rgba(244,245,240,.82)),url("assets/app-background.jpg");background-position:center;background-size:cover;background-attachment:fixed}

.auth-screen{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px;background:linear-gradient(#142d26c9,#142d26d9),url('assets/app-background.jpg') center/cover}.auth-screen[hidden]{display:none}.auth-card{width:min(100%,460px);padding:34px;background:#fff;border-radius:12px;box-shadow:0 20px 70px #061b1650}.auth-card>img{width:58px;height:68px;object-fit:contain;background:#f3f5f1;border-radius:8px;padding:5px;margin-bottom:20px}.auth-card h1{font-size:25px;margin:13px 0}.auth-card p{line-height:1.7;color:var(--muted)}.auth-card input{display:block}.auth-actions{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}.auth-actions button{flex:1 1 180px}.account-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.account-actions button{padding:8px 12px;font-size:11px}#sync-status{white-space:nowrap}#auth-error,#login-error{color:#a3422a;min-height:1em}.sync-conflict{border-left:3px solid #bd9751;padding:12px;background:#fbf6e8;margin:14px 0}

.user-form{display:grid;grid-template-columns:minmax(180px,1fr) 190px auto;gap:12px;align-items:end;margin:22px 0 10px}.user-form label{font-size:12px;color:var(--muted)}.user-form input,.user-form select{display:block;margin:7px 0 0}.user-form button{white-space:nowrap;margin-bottom:0}.user-list{list-style:none;padding:0;margin:15px 0 0}.user-list li{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:15px 8px;border-bottom:1px solid var(--line)}.user-list small{display:block;margin-top:5px;color:var(--muted);font-size:11px}.users-panel>p[role=alert]{color:#a3422a;min-height:1em}@media(max-width:750px){.user-form{grid-template-columns:1fr}.user-form button{width:100%}.user-list li{align-items:flex-start}.user-list li button{font-size:11px;padding:8px 10px}}
.bar.height-10{height:10%}.bar.height-20{height:20%}.bar.height-30{height:30%}.bar.height-40{height:40%}.bar.height-50{height:50%}.bar.height-60{height:60%}.bar.height-70{height:70%}.bar.height-80{height:80%}.bar.height-90{height:90%}.bar.height-100{height:100%}
.defect-dialog{width:min(900px,94vw)}.defect-toolbar{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}.defect-record{border:1px solid #dfe7e2;border-radius:10px;padding:16px;margin:12px 0}.defect-record h3{margin:0 0 7px}.defect-images{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.defect-images img{width:110px;height:90px;object-fit:cover;border-radius:8px}.defect-record select{max-width:190px}.defect-error{color:#99521b}.defect-muted{color:#586d62;font-size:13px}
body.sun-mode{--ink:#101a14;--green:#145332;--line:#66776c;--muted:#34443a;--paper:#fff;background:#fff!important;background-image:none!important;color:#101a14}
body.sun-mode aside{background:#102b20;border-color:#66776c}
body.sun-mode main,body.sun-mode .panel,body.sun-mode .card,body.sun-mode dialog,body.sun-mode .auth-card{background:#fff;color:#101a14;border-color:#66776c}
body.sun-mode .muted,body.sun-mode .note,body.sun-mode small{color:#34443a}
body.sun-mode input,body.sun-mode select{background:#fff;color:#101a14;border:2px solid #43584a}
body.sun-mode button{min-height:50px;font-size:15px;border:2px solid #284b35}
body.sun-mode nav button{min-height:52px}
body.sun-mode td,body.sun-mode th,body.sun-mode label{font-size:15px;color:#101a14}
body.sun-mode .tag,body.sun-mode .status{border:2px solid #405c48;font-weight:700}
body.sun-mode :focus-visible{outline:4px solid #9a6b00!important;outline-offset:3px!important}
body.sun-mode .card:first-child{background:#123d2b;color:#fff}
/* Sunlight mode: keep text and controls readable outdoors and usable with gloves. */
body.sun-mode{color:#101a14;background:#fff!important}
body.sun-mode aside{background:#102b20;color:#fff;border-color:#102b20}
body.sun-mode aside small,body.sun-mode aside footer,body.sun-mode .brand small{color:#e5efe8}
body.sun-mode nav button{color:#f4f8f5;border-left-color:transparent}
body.sun-mode nav button.active{background:#24643f;color:#fff;border-left-color:#e8bd55}
body.sun-mode nav button:hover{background:#315a43}
body.sun-mode main,body.sun-mode #filters,body.sun-mode .overview-strip,body.sun-mode .warning,body.sun-mode .sync-conflict{background:#fff;color:#101a14;border-color:#66776c}
.auth-card{max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);overflow-y:auto}
@media(min-width:751px){aside{overflow-y:auto}aside footer{position:static;margin-top:24px}}
body.sun-mode .auth-screen{background:#fff}
body.sun-mode .auth-card{border:2px solid #66776c;box-shadow:0 8px 24px #102b2030}
body.sun-mode .auth-card p,body.sun-mode .auth-card .note,body.sun-mode .auth-card .badge{color:#263b2d}
body.sun-mode .card:first-child .muted,body.sun-mode .card:first-child small{color:#e5efe8}
body.sun-mode .tag{background:#edf2ed;color:#14251a;border-color:#52665a}
body.sun-mode .status{background:#e4f0e5;color:#153d23;border-color:#45684d}
body.sun-mode .warn,body.sun-mode .warning{background:#fff2cf;color:#543b00;border-color:#7e5b00}
body.sun-mode #notice,body.sun-mode [role=alert]{color:#7b260e}
body.sun-mode th{background:#edf1ed;color:#18261d}
body.sun-mode tr:hover{background:#f0f3f0}
body.sun-mode .bar{background:#24643f}
body.sun-mode .bar span,body.sun-mode .legend{color:#263b2d}
body.sun-mode button,body.sun-mode input,body.sun-mode select{min-height:52px}
body.sun-mode button{padding:10px 16px;line-height:1.25}
body.sun-mode input,body.sun-mode select{font-size:16px;padding:11px 12px}
body.sun-mode label{line-height:1.45}
body.sun-mode .account-actions{gap:8px}
body.sun-mode .account-actions button{padding:10px 14px;font-size:14px}
body.sun-mode .nav-icon{box-shadow:none}
body.sun-mode .table-wrap button,body.sun-mode .user-list li button{min-height:50px;padding:10px 14px;font-size:14px}
body.sun-mode dialog{border:2px solid #66776c}
body.sun-mode dialog .row{gap:10px}
@media(max-width:750px){
  body.sun-mode nav{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:7px}
  body.sun-mode nav button{width:100%;min-height:56px;padding:8px 10px;font-size:14px}
  body.sun-mode .nav-icon{width:38px;height:38px;flex-basis:38px}
  body.sun-mode main{padding:16px 12px}
  body.sun-mode header{align-items:flex-start}
  body.sun-mode .account-actions{width:100%;justify-content:flex-start}
  body.sun-mode #sync-status{white-space:normal;min-height:48px}
  body.sun-mode #filters label{max-width:none;flex:1 1 140px}
  body.sun-mode #filters button{flex:1 1 130px}
  body.sun-mode dialog{width:calc(100vw - 20px);max-width:calc(100vw - 20px);padding:20px}
  body.sun-mode dialog .row>*{flex:1 1 130px}
}
