:root{--ink:#0e1b2a;--mute:#52627a;--bg:#edf1f5;--line:#d8e0ea;--navy:#0b2a4a;--blue:#14589c;--green:#0f6b45;--amber:#f5a300;--red:#b91c1c}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:Inter,system-ui,sans-serif;background:var(--bg);color:var(--ink);font-size:15px;font-weight:500;line-height:1.45}
a{color:var(--blue);text-decoration:none}
h1{font-size:25px;font-weight:800;line-height:1.25;margin-bottom:14px}h2{font-size:17px;font-weight:800;margin:24px 0 12px}h3{font-size:15px;font-weight:800;margin:16px 0 8px}
.mute{color:var(--mute);margin-bottom:10px}

.bar{position:sticky;top:0;z-index:20;background:var(--navy);display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 22px;border-bottom:4px solid var(--amber)}
.brand{display:flex;align-items:center;gap:10px;color:#fff;font-size:20px;font-weight:800}
.brand span{width:38px;height:38px;border-radius:10px;background:var(--amber);color:var(--navy);display:grid;place-items:center}
.bar nav{display:flex;gap:4px}
.bar nav a{display:flex;align-items:center;gap:8px;padding:10px 15px;border-radius:10px;color:#dbe7f5;font-weight:700}
.bar nav a b{font-weight:700}.bar nav a em{font-style:normal}
.bar nav a:hover{background:#163c66;color:#fff}.bar nav a.on{background:#fff;color:var(--navy)}
.bar nav a.n-new{background:var(--amber);color:#231700}
main{max-width:1040px;margin:0 auto;padding:22px 18px 40px}

input,select,textarea{border:2px solid #c3cfdd;border-radius:10px;padding:11px 12px;font:600 16px Inter,system-ui,sans-serif;background:#fff;color:var(--ink);width:100%;min-width:0}
input[type=checkbox]{width:auto}
input:focus,select:focus,textarea:focus{outline:0;border-color:var(--blue);box-shadow:0 0 0 4px rgba(20,88,156,.18)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:10px;padding:11px 17px;font:800 15px Inter,system-ui,sans-serif;background:var(--blue);color:#fff;cursor:pointer;position:relative}
.btn:hover{filter:brightness(1.07)}.btn:disabled{opacity:.6;cursor:wait}
.btn:focus-visible,a:focus-visible,.btn:focus-within{outline:3px solid var(--amber);outline-offset:2px}
.btn.main{background:var(--amber);color:#231700}
.btn.alt{background:#dfe7f1;color:var(--navy)}
.btn.green{background:var(--green)}
.btn.red{background:var(--red)}
.btn.big{padding:16px 26px;font-size:18px;border-radius:12px}
.btn input[type=file]{position:absolute;opacity:0;width:1px;height:1px;border:0;padding:0}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:14px}

.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px;margin-bottom:14px;box-shadow:0 6px 18px -14px rgba(11,42,74,.35)}
.card>h2{margin:0 0 12px;display:flex;gap:9px;align-items:center;color:var(--navy)}
.flash{background:#dcf3e7;border:1px solid #93d2b3;color:#07533a;border-radius:12px;padding:13px 15px;margin-bottom:14px;font-weight:800}
.flash.err{background:#fde6e6;border-color:#f0b4b4;color:var(--red)}
.empty{text-align:center;color:var(--mute);font-weight:700;padding:28px}.empty i{display:block;font-size:30px;margin-bottom:10px;color:#9fb0c6}

.hero{background-color:var(--navy);background-image:linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px);background-size:32px 32px;color:#fff;border-radius:18px;padding:30px;margin-bottom:16px;border-bottom:6px solid var(--amber)}
.hero h1{font-size:30px;margin:0}.hero p{color:#c9dcf2;margin:4px 0 18px;font-weight:600}
.hero .btn.big{font-size:21px;padding:19px 44px}
.search{display:flex;gap:10px;margin-top:18px;max-width:640px}.search .btn{flex:none}
.alert{display:flex;align-items:center;gap:12px;background:#fff1cc;border:2px solid var(--amber);border-radius:12px;padding:14px 16px;color:#4a3200;font-weight:700}.alert span{flex:1}

.types{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.type{--c:#475569;display:flex;align-items:center;gap:14px;background:#fff;border:1px solid var(--line);border-left:7px solid var(--c);border-radius:12px;padding:16px;color:var(--ink)}
.type:hover{border-color:var(--c)}
.type>i:first-child{width:46px;height:46px;border-radius:11px;background:var(--c);color:#fff;display:grid;place-items:center;font-size:19px;flex:none}
.type span{flex:1}.type b{display:block;font-weight:800}.type small{color:var(--mute);font-weight:700}.type strong{font-size:27px}
.types.pick .type{padding:22px 16px;font-size:17px}
.mco{--c:#b45309}.sr{--c:#14589c}.meter{--c:#0f6b45}.challan{--c:#6d28d9}
.badge{display:inline-block;background:var(--c,#475569);color:#fff;border-radius:6px;padding:2px 9px;font-size:12px;font-weight:800}

.recs{display:grid;gap:10px}
.rec{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.rec>a{display:flex;gap:14px;padding:12px;color:var(--ink)}.rec>a:hover{background:#f4f8fd}
.th{width:76px;height:86px;border-radius:9px;background:#e4ebf4;display:grid;place-items:center;overflow:hidden;flex:none;font-size:25px;color:#6b7f9c}
.th img{width:100%;height:100%;object-fit:cover}
.tx{min-width:0;flex:1}.tx strong{display:block;font-size:19px;margin-top:3px;overflow-wrap:anywhere}.tx small{display:block;color:var(--mute);font-weight:600;overflow-wrap:anywhere}.tx .cnt{margin-top:3px}
.need{display:flex;gap:8px;flex-wrap:wrap;padding:0 12px 12px}

.pick-photo{display:flex;gap:10px;flex-wrap:wrap}.pick-photo .btn{flex:1;min-width:220px}
.photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px;margin-top:12px}
.photos:empty{display:none}.photos.large{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));margin:0 0 6px}
.ph{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden;display:flex;flex-direction:column}
.ph img{display:block;width:100%;height:170px;object-fit:cover}.photos.large .ph img{height:240px}
.pdf{display:grid;place-items:center;align-content:center;gap:8px;height:170px;padding:10px;text-align:center;font-weight:700;overflow:hidden;overflow-wrap:anywhere;color:var(--red)}.pdf i{font-size:40px}
.ph .dl{border:0;background:#eef3f9;padding:9px;font:800 13px Inter,system-ui,sans-serif;color:var(--navy);text-align:center;cursor:pointer}
.ph.old span:last-child{padding:8px;font-weight:700}

.fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
label>span{display:block;font-weight:800;font-size:13.5px;margin-bottom:5px}label>span i{font-style:normal;color:var(--mute);font-weight:600}
.wide{grid-column:1/-1}
details{margin-top:14px}summary{cursor:pointer;font-weight:800;color:var(--blue);padding:6px 0;margin-bottom:8px}
.item{display:grid;grid-template-columns:1fr 90px 90px 44px;gap:8px;margin-bottom:8px}
.x{border:0;border-radius:10px;background:#fde6e6;color:var(--red);font-size:17px;cursor:pointer}
#chips{display:flex;gap:8px;flex-wrap:wrap}#chips:not(:empty){margin-bottom:12px}
.chip{display:inline-flex;align-items:center;gap:7px;background:#e3eefb;border:2px solid #a9c8ea;border-radius:10px;padding:6px 6px 6px 11px;font-weight:700}
.chip button{border:0;background:#fff;color:var(--red);width:28px;height:28px;border-radius:7px;cursor:pointer;font-size:17px}
#linkres button{display:block;width:100%;text-align:left;white-space:pre-wrap;border:1px solid var(--line);background:#f7faff;border-radius:10px;padding:12px;margin-top:6px;font:700 15px Inter,system-ui,sans-serif;color:var(--ink);cursor:pointer}
#linkres button:hover{background:#e3eefb}#linkres .none{padding:10px 2px;color:var(--mute);font-weight:700}
.savebar{position:sticky;bottom:10px;z-index:10;display:flex;flex-wrap:wrap;gap:10px;background:#fff;border:2px solid var(--navy);border-radius:14px;padding:11px;box-shadow:0 12px 28px -12px rgba(11,42,74,.5)}
.savebar #save{flex:1}
#msg{width:100%;font-weight:800;border-radius:9px;padding:10px}#msg:not([class]),#msg[class=""]{display:none}#msg.bad{background:#fde6e6;color:var(--red)}#msg.info{background:#e3eefb;color:var(--navy)}

.head h1{margin:8px 0 12px;overflow-wrap:anywhere}
dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}
dl div{background:#f3f6fa;border-radius:10px;padding:10px 12px}dt{font-size:12px;color:var(--mute);font-weight:800;text-transform:uppercase}dd{font-weight:700;font-size:16px;overflow-wrap:anywhere}
.tbl{padding:0;overflow-x:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:11px 13px;border-bottom:1px solid var(--line);vertical-align:top}th{background:#eef3f9;font-size:12px;text-transform:uppercase}

.filter{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;align-items:end}.filter .btn{height:48px}
.quick{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.quick a{background:#fff;border:2px solid #c3cfdd;border-radius:10px;padding:8px 14px;font-weight:800;color:var(--navy)}.quick a small{display:block;font-weight:600;font-size:11.5px}.quick a.on{background:var(--navy);border-color:var(--navy);color:#fff}
.report{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:14px}.report b{margin-right:auto;font-size:18px}
.pager{display:flex;gap:12px;justify-content:center;align-items:center;margin-top:16px;font-weight:700}
.line{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.line small{display:block;color:var(--mute)}
.typerow{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.typerow form:first-child{display:flex;gap:8px;flex:1;flex-wrap:wrap}.typerow input{flex:1;min-width:150px;width:auto}

.authbg{min-height:100vh;display:grid;place-items:center;padding:16px;background:var(--navy)}
.auth{width:100%;max-width:390px;padding:28px 22px;border-top:6px solid var(--amber)}
.auth .logo{width:58px;height:58px;border-radius:14px;background:var(--navy);color:var(--amber);display:grid;place-items:center;font-size:26px;margin-bottom:12px}
.auth h1{margin-bottom:4px}.auth input,.auth .btn{width:100%;margin-top:11px}

/* audit report */
.paper{background:#fff;padding:20px;font-size:12.5px}
.paper h1{font-size:21px;margin-bottom:4px}.paper h2{font-size:15px;margin:18px 0 6px}.paper h3{font-size:13px;margin:10px 0 5px}
.paper th,.paper td{border:1px solid #8a98aa;padding:5px 7px}.paper .sum{width:auto;min-width:320px}.nw{white-space:nowrap}
.paper figure{break-before:page;text-align:center;padding-top:10px}.paper figcaption{font-weight:800;margin-bottom:8px}.paper figure img{max-width:100%;max-height:250mm}
.tools{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}.pdfnote{margin-top:12px;font-weight:700}
@media print{.tools,.bar{display:none}.paper{padding:0;font-size:10.5px}thead{display:table-header-group}tr{break-inside:avoid}th{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
@page{margin:10mm}

@media screen and (max-width:760px){
.bar{padding:9px 14px}
.bar nav{position:fixed;left:0;right:0;bottom:0;z-index:30;background:var(--navy);border-top:3px solid var(--amber);justify-content:space-around;gap:2px;padding:5px 4px calc(5px + env(safe-area-inset-bottom))}
.bar nav a{flex:1;flex-direction:column;gap:3px;padding:7px 2px;font-size:17px}.bar nav a b{font-size:11px}.bar nav a em{display:none}
.bar{position:static}
body:not(.authbg):not(.paper){padding-bottom:78px}
main{padding:14px 12px 24px}h1{font-size:21px}
.hero{padding:20px 16px}.hero h1{font-size:22px}.hero .btn.big{width:100%}.search{flex-direction:column}
.item{grid-template-columns:1fr 1fr 44px}.item input:first-child{grid-column:1/-1}
.savebar{bottom:84px}
.report .btn{flex:1 1 100%}.report b{width:100%}
.typerow form:first-child .btn{flex:1}
.paper{overflow-x:auto}
}
