*{box-sizing:border-box}html{font-family:"Inter","Segoe UI",Arial,sans-serif;color:#193535;background:#f4f6f3}body{margin:0}button,input,select,textarea{font:inherit}button,a{cursor:pointer}button,.button{border:1px solid #cbd6d1;border-radius:8px;padding:.7rem 1rem;background:white;color:#21443f;font-weight:600;text-decoration:none}button:hover,.button:hover{background:#e8f0eb}button.primary,.primary{background:#126449;color:white;border-color:#126449}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #e8ad4c;outline-offset:3px}.brand{display:flex;align-items:center;gap:12px;font-weight:800;letter-spacing:-.04em;font-size:1.35rem}.mark{display:inline-grid;place-items:center;transform:skew(-12deg);color:#163c34;background:#d3f18f;width:36px;height:36px;border-radius:8px;font-size:1.55rem;font-weight:900}.auth{min-height:100vh;display:grid;grid-template-columns:1.08fr 1fr}.cover,.hero{background:#0d3634;color:#fff;position:relative;overflow:hidden}.cover{padding:clamp(2rem,6vw,7rem);display:flex;flex-direction:column;justify-content:space-between;min-height:540px}.cover>*:not(.gridart),.hero>*:not(.gridart){position:relative;z-index:1}.cover h1{font-size:clamp(3.2rem,6vw,6.8rem);line-height:.98;letter-spacing:-.065em;margin:1.1rem 0}.cover h1 em{font-style:normal;color:#d1ee95}.cover p{color:#d5e4db;max-width:390px;line-height:1.5}.gridart{position:absolute;width:480px;height:480px;border:1px solid #8cc39c65;right:-170px;bottom:-210px;border-radius:50%;box-shadow:0 0 0 23px #19483e,0 0 0 24px #78a58277,0 0 0 49px #184539,0 0 0 50px #78a58277,0 0 0 79px #164538,0 0 0 80px #78a58277,0 0 0 113px #174136,0 0 0 114px #78a58277,0 0 0 151px #153d34,0 0 0 152px #78a58277;transform:scaleX(1.25) rotate(-23deg)}.kicker{font:600 .8rem/1.5 ui-monospace,monospace;text-transform:uppercase;letter-spacing:.11em}.authpane{display:grid;place-items:center;padding:2rem}.authbox{width:min(100%,390px)}h1,h2,h3,p{margin-top:0}h1,h2{letter-spacing:-.045em}.authbox h2{font-size:2.55rem;margin:10px 0}.muted,small{color:#596e68}.authbox form{display:grid;gap:18px;margin:2.2rem 0 1.4rem}label{display:grid;gap:7px;font-size:.92rem;font-weight:600}input,select,textarea{width:100%;padding:.75rem .85rem;border:1px solid #bac9c1;border-radius:7px;background:white;color:#18372f}textarea{min-height:76px}.layout{display:grid;grid-template-columns:224px minmax(0,1fr);min-height:100vh}aside{background:#123833;color:#fff;padding:1.6rem 1rem;display:flex;flex-direction:column;gap:1.4rem}aside .brand{margin-left:8px}nav{display:grid;gap:3px}nav button{display:flex;align-items:center;gap:12px;text-align:left;background:none;border:0;color:#d3e2da;font-weight:500;min-height:39px;padding:.5rem .85rem}nav button:hover,nav button.active{color:#183e31;background:#d6edac}.navicon{width:20px;text-align:center;font-size:1.15rem}.sidefoot{margin-top:auto}.top{min-height:65px;background:#fff;border-bottom:1px solid #dbe3db;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:0 4%;font-size:.92rem}.wrap{max-width:1460px;margin:auto;padding:2rem 4% 4rem}.hero{padding:2rem 2.2rem;border-radius:17px;margin-bottom:1.2rem}.hero h1{font-size:clamp(2.1rem,3vw,3.8rem);margin:.5rem 0}.hero p{margin:0;color:#d8e6db}.hero .gridart{width:220px;height:220px;bottom:-110px;right:-30px}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:18px 0}.card,.panel{background:#fff;border:1px solid #dbe3db;border-radius:12px}.card{padding:1.25rem;text-align:left}.card b{display:block;font-size:2.2rem;margin:.5rem 0 0;letter-spacing:-.055em}.card small{font-weight:500}.panel{padding:1.3rem;margin-bottom:1rem}.row{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}.row h2{margin:0}.toolbar{margin:1rem 0;display:flex;gap:.7rem;align-items:center;flex-wrap:wrap}.toolbar input,.toolbar select{width:auto;max-width:100%}.tablebox{overflow:auto}table{width:100%;border-collapse:collapse;font-size:.94rem}th,td{text-align:left;padding:.8rem .65rem;border-bottom:1px solid #e4e9e4}th{font-size:.84rem;color:#596e68;background:#f5f7f4}td button{padding:.37rem .65rem}.empty{padding:2rem 1rem;text-align:center;color:#5a6e66}.chip{background:#e8f2e5;color:#2d5a39;border-radius:24px;padding:.27rem .6rem;font-size:.83rem;white-space:nowrap}.late{background:#fff0dd;color:#7a471c}.actions{display:flex;gap:.6rem;flex-wrap:wrap}.error{color:#9e342b}.error:empty{display:none}dialog{border:1px solid #ccd8ce;color:inherit;border-radius:15px;width:min(760px,96vw);padding:1.6rem;max-height:90vh}dialog::backdrop{background:#102e2bcc}dialog form{display:grid;gap:1.1rem}.fields{display:grid;grid-template-columns:1fr 1fr;gap:15px}.wide{grid-column:1/-1}.lines{display:grid;gap:9px}.line{display:grid;grid-template-columns:2fr 1fr 1fr 1fr auto;gap:5px}.line input{min-width:0;padding:.6rem}.bar{height:8px;background:#e6ede7;border-radius:5px;overflow:hidden}.bar i{display:block;height:100%;background:#459078}.stat{margin:1rem 0}.stat .row{margin-bottom:6px}#toast:not(:empty){position:fixed;bottom:1.4rem;left:50%;transform:translateX(-50%);background:#123b32;color:white;padding:.9rem 1.3rem;border-radius:8px;z-index:3}.mobile{display:none}.paper{line-height:1.6}.paper h2{margin:1rem 0}@media(max-width:850px){.auth{grid-template-columns:1fr}.cover{min-height:230px;padding:1.5rem}.cover h1{font-size:3rem}.cover p,.cover footer{display:none}.layout{display:block}aside{display:none}aside.open{display:flex}.mobile{display:inline-block}.cards{grid-template-columns:1fr 1fr}.wrap{padding:1rem}.hero{padding:1.6rem}.hero .gridart{opacity:.5}.top{padding:10px 1rem}.fields{grid-template-columns:1fr}.line{grid-template-columns:1fr 1fr}.line input:first-child{grid-column:1/-1}}@media print{body{background:white}body:has(dialog[open]) #root,button,.top,aside,.toolbar,#toast,.actions{display:none!important}.layout{display:block}.wrap{padding:0}dialog[open]{position:static;width:100%;max-height:none;overflow:visible;border:none}dialog::backdrop{background:transparent}}
.filters{border-block:1px solid #e1e9e3;padding:.8rem;margin-bottom:.75rem}.filters summary{font-weight:600;cursor:pointer}.filter-grid,.check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:12px 0}.check-grid label{display:flex;align-items:center;font-weight:400}.check-grid input{width:auto}.extra-actions{margin-top:1.2rem}.tablebox td .button{display:inline-block;padding:.25rem .4rem;font-size:.84rem;margin:2px}.fields fieldset{border:1px solid #cad7cc;border-radius:8px}.fields legend{font-weight:600}nav{gap:1px}@media print{.filters,.extra-actions,.tablebox td .button{display:none!important}.tablebox td button{display:inline!important;border:0;padding:0}.tablebox{overflow:visible}}
@media print{@page{margin:12mm}body:has(.tablebox):not(:has(dialog[open])){print-color-adjust:exact}body:has(.tablebox):not(:has(dialog[open])) .wrap{max-width:none}.tablebox thead{display:table-header-group}}
.line{grid-template-columns:2fr repeat(3,minmax(55px,.7fr)) minmax(85px,1fr) auto}.line select{min-width:0;padding:.45rem}@media(max-width:850px){.line{grid-template-columns:1fr 1fr}}
.qr-actions{display:flex;flex-wrap:wrap;gap:.65rem;align-items:center;margin:.75rem 0 1rem}.qr-actions .button{display:inline-flex;align-items:center}
#qr-census{display:grid;gap:1rem}#qr-census h2,#qr-census .progress{margin:0}#qr-census .qr-results:empty{display:none}

.record-count{display:flex;align-items:center;gap:1.5rem;background:#17483e;color:#fff;padding:.6rem 1rem;border-radius:8px;font-variant-numeric:tabular-nums}
.count-subject{font-weight:700}
.count-item{display:inline-flex;align-items:baseline;gap:.45rem;font-weight:600}
.count-item b{color:#e3f6b5;font-size:1.5rem;line-height:1.2}
.top{position:sticky;top:0;z-index:2;display:grid;grid-template-columns:1fr auto;gap:.45rem;padding:.6rem 4%}
.top>.record-count{grid-column:1/-1}
@media(max-width:650px){
  .top{padding:.4rem .75rem;gap:.3rem}
  .top>span{display:none}
  .record-count{gap:.4rem 1rem;flex-wrap:wrap;padding:.45rem .65rem}
  .count-item b{font-size:1.3rem}
}
@media print{.record-count{display:none}}

.stats-archive{display:inline-flex;align-items:center;gap:.5rem;margin-bottom:1rem}
.stats-archive input{width:auto}
button.stat-link{padding:.15rem 0;border:0;background:transparent;color:var(--accent,#135e66);text-align:left;text-decoration:underline;text-underline-offset:.18em}
button.stat-link:focus-visible{outline:2px solid currentColor}

.stats-jump{display:none}
@media screen and (max-width:650px){
  .layout>div{min-width:0}
  .top{grid-template-columns:minmax(0,1fr);min-height:0}
  .top .mobile{min-height:40px;padding:.4rem .8rem}
  .top .record-count{display:flex;align-items:center;gap:.25rem .6rem;justify-content:space-between}
  .top .count-subject{font-size:.76rem;line-height:1.15;min-width:0;flex:1}
  .top .count-item{white-space:nowrap;font-size:.8rem}
  .top .count-item b{font-size:1.05rem}
  .stats-page{padding:.85rem .65rem 3rem}
  .stats-page h1{margin-bottom:.55rem}
  .stats-archive{min-height:44px;margin:0}
  .stats-jump{display:grid;margin:.4rem 0 .85rem}
  .stats-jump select{font-size:1rem;min-height:44px}
  .stats-page .cards{grid-template-columns:minmax(0,1fr);gap:.4rem;margin:.75rem 0}
  .stats-page .card{display:flex;align-items:center;justify-content:space-between;gap:.55rem;padding:.65rem .8rem}
  .stats-page .card b{font-size:1.15rem;margin:0}
  .stats-page .panel{padding:.85rem;scroll-margin-top:7.5rem}
  .stats-page .panel h2{font-size:1.24rem}
  .stats-page .stat .row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.4rem}
  .stats-page .stat-link{min-height:44px;overflow-wrap:anywhere}
  .stats-page .stat .row b{font-size:.83rem;white-space:nowrap}
  :is(.stats-page,.stats-detail) .tablebox{overflow:visible}
  :is(.stats-page,.stats-detail) table{display:block}
  :is(.stats-page,.stats-detail) thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  :is(.stats-page,.stats-detail) tbody{display:grid;gap:.55rem}
  :is(.stats-page,.stats-detail) tr{display:block;padding:.4rem .55rem;border:1px solid #dbe3db;border-radius:.5rem}
  :is(.stats-page,.stats-detail) td{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1fr);align-items:center;gap:.6rem;padding:.25rem 0;border:0;overflow-wrap:anywhere}
  :is(.stats-page,.stats-detail) td::before{content:attr(data-label);color:#51645c;font-size:.8rem}
  .stats-page td>.bar{grid-column:2}
  .stats-detail button{min-height:44px}
  dialog:has(.stats-detail){width:calc(100% - 1rem);max-width:none;max-height:90dvh;padding:.8rem}
}
@media screen and (max-width:850px){
  aside.open{position:fixed;inset:0 auto 0 0;z-index:5;width:min(85vw,20rem);overflow-y:auto;overscroll-behavior:contain;box-shadow:8px 0 24px #12383340}
  aside .menu-close{align-self:flex-start;min-height:44px}
  aside nav button{min-height:44px}
}

.due-entry {line-height:1.6}
.due-entry + .due-entry {border-top:1px solid #e4e9e4;margin-top:.35rem;padding-top:.35rem}
@media screen and (max-width:700px) {
  .due-groups .tablebox {overflow:visible}
  .due-groups table,.due-groups tbody,.due-groups tr {display:block}
  .due-groups thead {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .due-groups tr {border:1px solid #dbe4de;border-radius:.65rem;margin:.6rem 0;padding:.45rem}
  .due-groups td {display:block;border:0;padding:.3rem;overflow-wrap:anywhere}
  .due-groups td::before {content:attr(data-label);display:block;color:#596e68;font-size:.8rem}
}
.due-tools summary {cursor:pointer;font-weight:600;padding:.65rem .8rem}
.due-tools>div {display:flex;gap:.5rem;flex-wrap:wrap;padding:.4rem}
@media screen and (max-width:1050px), screen and (pointer:coarse) and (hover:none) {
  .layout {display:block}
  .layout>div {min-width:0}
  #site-menu {display:none}
  #site-menu.open {display:flex;position:fixed;inset:0 auto 0 0;z-index:5;width:min(85vw,20rem);overflow:auto;overscroll-behavior:contain;box-shadow:8px 0 24px #12383340}
  .mobile {display:inline-block;min-height:44px}
  #site-menu nav button {min-height:44px}
  .wrap {max-width:100%;padding:1rem clamp(.6rem,2vw,1.25rem) 3rem}
  .top {padding:.4rem .75rem}
  .due-page .toolbar {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.5rem;margin:.25rem 0 .65rem}
  .due-page #search {grid-column:1/-1}
  .due-page .toolbar :is(input,select) {width:100%;min-width:0;font-size:1rem;min-height:44px}
  .due-tools[open] {grid-column:1/-1}
  .due-page .panel {padding:.7rem}
  .due-groups .tablebox {overflow:visible}
  .due-groups table {display:block}
  .due-groups thead {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .due-groups tbody {display:grid;gap:.8rem}
  .due-groups tr {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:.45rem .75rem;border:1px solid #cbdad1;border-radius:.65rem;padding:.8rem;margin:0}
  .due-groups td {display:block;min-width:0;border:0;padding:0;overflow-wrap:anywhere}
  .due-groups td::before {content:attr(data-label);display:block;font-size:.78rem;color:#596e68}
  .due-groups td:nth-child(2) {grid-column:1/-1;grid-row:1;font-weight:700;font-size:1.05rem}
  .due-groups td:nth-child(2)::before {display:none}
  .due-groups td:nth-child(1) button {min-height:44px;max-width:100%;overflow-wrap:anywhere}
  .due-groups td:nth-child(5) {grid-column:1/-1;grid-row:3;padding:.55rem .65rem;background:#f4f7f4;border-radius:.4rem}
  .due-groups .due-entry {line-height:1.45;padding-block:.35rem}
  .due-groups .due-entry .chip {display:inline-block;white-space:normal}
  .due-groups td:last-child {grid-column:1/-1}
  .due-groups td:last-child .button {display:inline-flex;align-items:center;min-height:44px}
  .due-page .filters summary {min-height:44px;align-content:center}
  dialog {max-width:calc(100vw - 1rem);max-height:90dvh;overflow:auto}
  dialog .fields>* {min-width:0}
  dialog :is(input,select,textarea) {max-width:100%;font-size:1rem}
}
@media screen and (max-width:650px) {
  .toolbar {gap:.45rem}
  .toolbar #search {width:100%}
  .filter-grid {grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr))}
  .wrap .row h1 {font-size:1.65rem;margin-bottom:.45rem}
}
@media print {.due-tools {display:none}}
@media screen and (max-width:700px) {
  .wrap>.panel,.wrap .tablebox,.fields,.fields>label {min-width:0}
  .toolbar button,.actions button,.actions .button,dialog .row button {min-height:44px}
  .toolbar>input,.toolbar>select,.toolbar>label {max-width:100%;font-size:1rem}
  .tablebox {max-width:100%;overscroll-behavior-x:contain}
  dialog .fields {grid-template-columns:minmax(0,1fr)}
  dialog .fields fieldset {min-inline-size:0}
  dialog .paper,.wrap .row {overflow-wrap:anywhere}
}
.contract-badge {display:inline-flex;align-items:center;gap:.3em;vertical-align:middle;white-space:nowrap;font-size:.79rem;font-weight:700;line-height:1.4;letter-spacing:normal;padding:.12em .5em;border:1px solid #c7a64b;border-radius:1em;color:#624600;background:#fff3c7}
.list-pager{display:flex;align-items:center;justify-content:flex-end;gap:.5rem;flex-wrap:wrap;margin:.6rem 0;scroll-margin-top:8rem}
.list-pager span{margin-right:auto;font-variant-numeric:tabular-nums}
.list-pager button:disabled{opacity:.5;cursor:default}
@media print{.list-pager{display:none}}
