/* Shared visual finish. Existing routes, permissions and data semantics are retained. */
:root{
 --bg:light-dark(#f4f7fc,#0e192b);--panel:light-dark(#ffffff,#18283e);
 --text:light-dark(#1d304a,#f0f5ff);--muted:light-dark(#52657e,#b9c9de);
 --line:light-dark(#dae4f1,#42546e);--border:var(--line);
 --soft:light-dark(#edf3ff,#263c5b);--blue:light-dark(#145dc5,#a0c7ff);
 --onblue:light-dark(#ffffff,#102746);--green:light-dark(#166343,#90e0bd);
 --mint:light-dark(#e5f7ee,#203f37);--warm:light-dark(#fff2dd,#413322);
 --lilac:light-dark(#f0ebff,#352b4c);--danger:light-dark(#b02e28,#ffb9b3);
 --control-line:light-dark(#8190a4,#7b91af);
 --shadow:0 5px 22px light-dark(#20385708,#00000018);
 --radius:16px;
 font-size:14px;line-height:1.55;
}
body{font-feature-settings:'cv02','cv03','cv04','tnum';text-rendering:optimizeLegibility}
h1,h2,h3{color:var(--text)}h2{font-size:15px;letter-spacing:-.2px}h3{font-size:14px}
.muted{font-size:12px;line-height:1.65}.eyebrow{font-size:10px;letter-spacing:.13em;font-weight:750}
.primary,.secondary,.hero-button{min-height:44px;border-radius:11px;font-size:12px;font-weight:650;padding:10px 15px}
.primary{box-shadow:0 3px 8px light-dark(#145dc51a,#0000)}
.secondary:hover{background:var(--soft);border-color:var(--control-line)}
button:disabled,.primary:disabled,.secondary:disabled{opacity:1;color:var(--muted);background:var(--soft);box-shadow:none;border-color:var(--line)}
.icon-button{width:44px;height:44px;flex-basis:44px;border-radius:12px}
input:not([type=checkbox]):not([type=radio]),select,textarea{min-height:44px;border-color:var(--control-line);border-radius:11px;font-size:14px;line-height:1.5}
input::placeholder,textarea::placeholder{color:var(--muted)}
input:not([type=checkbox]):not([type=radio]):focus,select:focus,textarea:focus{border-color:var(--blue)}
.input-wrap{border-color:var(--control-line);border-radius:12px}.input-wrap input{border:0}
label{font-size:12px;line-height:1.5;font-weight:650;margin:16px 0 6px}
input[type=checkbox],input[type=radio]{accent-color:var(--blue)}
input[type=file]::file-selector-button{padding:7px 11px;margin-right:12px;border:0;border-radius:7px;background:var(--soft);color:var(--blue);font:inherit;cursor:pointer}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
.workspace .main-content{max-width:1440px;padding:24px 28px 20px}
.workspace .heading{margin-bottom:20px;align-items:center}.workspace .heading h1{font-size:25px;letter-spacing:-.75px;margin:4px 0 5px}.heading .muted{font-size:12px}
.workspace .app-header{height:72px;padding:10px 28px;box-shadow:0 1px 0 var(--line);border-bottom:0}
.breadcrumb{font-size:12px}.header-actions{gap:10px}
.sidebar{padding:25px 16px 18px;background:var(--panel)}.sidebar .brand{font-size:21px;gap:10px;padding-left:7px}
.tenant{border:1px solid var(--line);border-radius:14px;background:var(--bg);padding:12px;gap:10px}
.village-name strong{font-size:12px}.village-name small{font-size:11px}
.nav-caption{font-size:10px;font-weight:650;letter-spacing:.12em;margin:24px 10px 10px}
.nav-item,.nav-group>summary{min-height:44px;border-radius:11px;font-size:12px;font-weight:550;padding:11px 12px}
.nav-item.active,.subnav a.active{box-shadow:inset 3px 0 0 var(--blue);background:var(--soft);color:var(--blue)}
.subnav{margin-left:20px;padding-left:12px}.subnav a,.subnav button{min-height:40px;display:flex;align-items:center;border-radius:9px}
.workspace .panel{border-radius:var(--radius);padding:20px;border:1px solid var(--line);box-shadow:var(--shadow)}
.section-heading{gap:16px}.section-heading p{margin-top:3px}.action-buttons{gap:8px;flex-wrap:wrap}
.search-bar{min-height:54px;border-radius:14px;border:1px solid var(--line);box-shadow:var(--shadow);padding:6px 7px 6px 16px;gap:12px;margin-bottom:18px}
.search-bar input{font-size:14px}.search-bar .primary{min-width:82px}
.workspace .hero{border-radius:18px;padding:22px 24px;background:linear-gradient(115deg,#104eaf,#1762cc);min-height:146px;position:relative;margin-bottom:18px;box-shadow:0 7px 20px #104eaf15}
.hero h2{color:#fff;font-size:22px;letter-spacing:-.6px}.hero p{font-size:13px;color:#fff;margin-top:7px}.hero p strong{font-weight:750}
.hero .hero-kicker{display:block;font-size:10px;letter-spacing:.14em;font-weight:650;color:#fff;margin-bottom:5px;text-transform:uppercase}
.hero .hero-button{margin-top:14px;min-height:44px;background:#fff;color:#104eaf;box-shadow:0 3px 8px #052a6b1a}
.hero-art{width:116px;min-width:116px;height:104px}.hero-art img{width:86px;height:86px;filter:drop-shadow(0 7px 7px #06387b24)}
.hero-art:before{width:118px;height:118px;background:#ffffff12}.hero-art:after{width:160px;height:160px;background:#ffffff08}
.workspace .stats{gap:14px;margin:0 0 24px}.workspace .stat{border-radius:15px;padding:17px;border:1px solid var(--line);box-shadow:var(--shadow)}
.stats .stat:nth-child(1){background:var(--soft)}.stats .stat:nth-child(2){background:var(--mint)}.stats .stat:nth-child(3){background:var(--lilac)}.stats .stat:nth-child(4){background:var(--warm)}
.stat-label{font-size:12px;align-items:start;line-height:1.45;min-height:35px;color:var(--text)}.stat-label .chip{width:32px;height:32px;border-radius:10px;flex-shrink:0}
.stat strong{font-size:32px;line-height:1.2;letter-spacing:-1px;margin:9px 0 8px;font-weight:750}.stat small{font-size:11px;line-height:1.55;color:var(--muted)}
.shortcuts{gap:12px;margin-bottom:24px}.shortcut{display:grid;grid-template-columns:46px minmax(0,1fr);align-items:center;justify-items:start;text-align:left;gap:12px;padding:16px;border-radius:14px;background:var(--panel);box-shadow:var(--shadow);font-size:13px}
.color-chip{width:46px;height:46px;border-radius:14px}.color-chip img{width:31px;height:31px}.color-chip .icon{width:22px;height:22px}
.bottom-grid{gap:18px}.task-action{min-height:52px;gap:10px;padding-top:14px;margin-top:16px;font-size:12px}.task-action .icon{flex-shrink:0}.verification-number{margin:16px 0 10px}.verification-number strong{font-size:34px}.verification-number span{font-size:12px}
.verification-progress{display:block;width:100%;height:7px;border:0;border-radius:9px;overflow:hidden;margin:16px 0 8px;background:var(--soft);accent-color:var(--blue)}
.verification-progress::-webkit-progress-bar{background:var(--soft);border-radius:9px}.verification-progress::-webkit-progress-value{background:var(--blue);border-radius:9px}.verification-progress::-moz-progress-bar{background:var(--blue);border-radius:9px}
.empty-state{padding:32px 20px;gap:12px}.empty-state img{padding:10px;background:var(--soft);width:66px;height:66px;border-radius:20px;box-sizing:content-box}.empty-state p{max-width:400px;font-size:12px;line-height:1.65}.empty-state.compact{padding:22px 12px}.empty-state.compact img{width:40px;height:40px;padding:9px;border-radius:16px}.empty-state h2{font-size:15px}
.table-scroll{border:1px solid var(--line);border-radius:12px;background:var(--panel)}table{font-size:13px}th{font-size:11px;font-weight:650;color:var(--muted);background:var(--bg);padding:12px 14px;border-bottom:1px solid var(--line)}td{padding:14px;border-bottom:1px solid var(--line);line-height:1.5}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:var(--bg)}td small{font-size:11px;line-height:1.5;margin-top:4px}.name-button{font-size:13px;font-weight:650;line-height:1.5;text-align:left}.identity{font-variant-numeric:tabular-nums;letter-spacing:.3px}.status{font-size:11px;line-height:1.4;padding:6px 9px;border-radius:8px;font-weight:600;color:var(--green);background:var(--mint)}.status.pending{background:var(--warm);color:light-dark(#824607,#ffcf86)}
.table-scroll[aria-busy=true]{opacity:.55;pointer-events:none}.pagination{padding-top:16px;gap:12px}.pagination .secondary{min-height:44px}.pagination>span{font-size:12px}.table-hint{font-size:11px}
.workspace .census-filters{gap:10px;margin-bottom:14px;align-items:center}.census-filters>.input-wrap{min-height:46px}.page-size{font-size:11px;margin:0;gap:8px}.page-size select{min-width:76px}
.census-advanced{border-top:1px solid var(--line);padding-top:12px;margin-top:4px}.census-advanced summary{display:flex;align-items:center;gap:8px;min-height:44px;width:fit-content;padding:8px 12px;border:1px solid var(--line);border-radius:10px;font-size:12px;background:var(--bg);list-style:none}.census-advanced summary::-webkit-details-marker{display:none}.census-advanced summary>.icon{width:16px;height:16px;transition:transform 160ms ease}.census-advanced[open] summary>.icon{transform:rotate(180deg)}
.filter-count{font-size:10px;color:var(--onblue);background:var(--blue);border-radius:6px;padding:2px 6px}.filter-count:empty{display:none}
.workspace .census-filter-grid{gap:10px 16px;margin-top:6px}.workspace .census-filter-grid label{font-size:12px;margin:8px 0 0;line-height:1.6}.census-filter-grid select{font-size:12px}
#census-count,#management-count,#global-count{min-height:20px;font-size:12px}#statistics-loading:empty{display:none}
.statistics-toolbar{gap:20px}.statistics-toolbar form{gap:12px}.statistics-toolbar label{font-size:11px}.statistics-now-grid{gap:14px;margin:16px 0 22px}.statistics-now-grid .stat:nth-child(2){background:var(--mint)}.statistics-event{padding:18px;gap:10px;border:1px solid transparent;border-radius:14px}.statistics-event strong{font-size:32px;letter-spacing:-.7px}.statistics-event .chip{border:1px solid var(--line);background:var(--panel)}.statistics-event>span:not(.chip){font-size:12px;color:var(--text)}.statistics-history{align-items:center}.statistics-history h2{font-size:14px}.statistics-definitions summary{min-height:44px;display:flex;align-items:center;font-weight:600}.statistics-definitions p{max-width:90ch}
.management-toolbar{padding:14px;background:var(--bg);border:1px solid var(--line);border-radius:12px;margin:18px 0;gap:12px}.management-toolbar label{margin:0;font-size:11px}.management-toolbar .primary{min-height:44px}.management-toolbar label:first-child{min-width:170px}.management-form h3{font-size:14px;margin-top:22px}.management-form textarea{min-height:90px;border:1px solid var(--control-line);border-radius:11px;padding:12px;color:var(--text);background:var(--panel);font:inherit;resize:vertical;width:100%}.administration{gap:14px;padding:16px 0}.administration small,.administration dt{color:var(--muted);font-size:11px}.administration strong{font-size:14px;margin-top:4px}.profile-layout{gap:24px}.profile-section h3{margin-top:0;padding-bottom:10px;border-bottom:1px solid var(--line)}.profile-section label{margin-top:16px}.profile-fields dd{font-size:13px}.profile-location{padding:14px;border:1px solid var(--line);background:var(--bg);border-radius:12px}
.form-error,.success-message,.form-success{font-size:12px;line-height:1.6}.form-success{color:var(--green)}.form-error:not(:empty),.success-message:not(:empty),.form-success:not(:empty){padding:10px 12px;border-radius:9px;border:1px solid currentColor;background:var(--panel)}
dialog{padding:24px;border-radius:20px;border-color:var(--line);box-shadow:0 25px 80px #050d2352}dialog::backdrop{background:#07172b99;backdrop-filter:blur(4px)}.dialog-heading{align-items:start;padding-bottom:16px;margin-bottom:6px;border-bottom:1px solid var(--line)}.dialog-heading h2{font-size:20px;line-height:1.35;letter-spacing:-.5px}.dialog-heading .icon-button{margin-top:-4px;flex-shrink:0}#sub-dialog{width:min(720px,calc(100% - 28px))}#sub-form>.action-buttons{padding-top:14px}#sub-form>button[type=submit],#management-form>button[type=submit]{margin-top:22px}#sub-detail{margin-top:18px}
.resident-row{border:1px solid var(--line);border-radius:13px;background:var(--bg);margin:14px 0;overflow:clip}.resident-row>summary{display:flex;align-items:center;gap:10px;min-height:48px;padding:12px 16px;font-size:13px;font-weight:650;cursor:pointer;list-style:none;overflow-wrap:anywhere}.resident-row>summary::-webkit-details-marker{display:none}.resident-row>summary:before{content:'+';display:grid;place-items:center;width:22px;height:22px;border:1px solid var(--line);border-radius:7px;background:var(--panel);font-size:16px;flex-shrink:0}.resident-row[open]>summary:before{content:'−'}.resident-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px;padding:0 16px 16px}.resident-fields>div{min-width:0}.resident-fields>button{justify-self:start;margin-top:16px;color:var(--danger);grid-column:1/-1}.resident-fields label{font-size:12px}.resident-fields .check-label{min-height:44px}
.account-trigger{box-shadow:0 2px 8px #20385706;border-color:var(--line)}.account-trigger .account-avatar{border:1px solid var(--line);box-shadow:0 0 0 2px var(--panel)}.account-popover{padding:8px;border-radius:17px;box-shadow:0 16px 42px #07172b24}.account-popover>a,.account-popover>button{font-size:13px;min-height:46px}.account-menu-heading{padding:12px 12px 14px}.photo-panel{gap:16px}.profile-photo{box-shadow:0 0 0 5px var(--soft);border:2px solid var(--panel)}
.entry-main{padding-top:40px}.login-card,.registration-card{box-shadow:0 12px 42px light-dark(#2038570d,#00000025);border-radius:20px}.entry .selected-village{border-radius:12px;background:var(--bg)}.entry-footer{font-size:11px}.entry-contact{font-size:12px}
@media(prefers-reduced-motion:no-preference){
 .workspace .main-content{animation:none}.workspace .heading,.workspace .search-bar,.workspace .hero,.workspace .stats,.workspace .shortcuts,.workspace .bottom-grid,body[data-page=census] .workspace .panel{animation:polish-rise 200ms ease-out both}.workspace .hero{animation-delay:25ms}.workspace .stats{animation-delay:50ms}.workspace .shortcuts{animation-delay:75ms}.workspace .bottom-grid{animation-delay:100ms}.table-scroll{transition:opacity 160ms ease}.stat,.shortcut{transition:border-color 160ms ease,box-shadow 160ms ease,transform 160ms ease}.shortcut:hover{transform:translateY(-2px);box-shadow:0 8px 18px #2038570e}.login-card{animation:polish-rise 220ms ease-out}.resident-row[open]>.resident-fields{animation:polish-rise 160ms ease-out}
}
@keyframes polish-rise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}.account-popover{animation:none}.census-advanced summary>.icon{transition:none}}
@media(max-width:1100px){.workspace .main-content{padding:22px}.workspace .app-header{padding-inline:22px}.shortcut{grid-template-columns:36px minmax(0,1fr);gap:9px;padding:14px 12px}.color-chip{width:36px;height:36px;border-radius:11px}.color-chip img{width:27px;height:27px}.workspace .heading h1{font-size:24px}}
@media(max-width:800px){.workspace .app-header{height:68px;padding:10px 18px}.workspace .main-content{padding:20px 18px}.workspace .panel{padding:18px}.workspace .heading{align-items:start}.account-trigger-copy{display:none}.subnav a,.subnav button{min-height:44px}.statistics-toolbar{align-items:stretch}.statistics-toolbar form{gap:12px}.statistics-toolbar #statistics-export{flex:1}.hero h2{font-size:21px}.workspace .hero{padding:20px}.management-toolbar label:first-child{min-width:140px}.statistics-history{align-items:start}}
@media(max-width:500px){
 input:not([type=checkbox]):not([type=radio]),select,textarea,.census-filter-grid select{font-size:16px}.workspace .main-content{padding:20px 14px}.workspace .app-header{padding:8px 14px}.workspace .heading{margin-bottom:18px}.workspace .heading h1{font-size:23px}.heading .muted{font-size:11px}.breadcrumb{font-size:11px}.workspace .panel{padding:16px;border-radius:15px}.workspace .hero{padding:18px;border-radius:15px;gap:10px;min-height:158px}.hero h2{font-size:20px;line-height:1.35}.hero p{font-size:12px}.hero-art{min-width:58px;width:58px;height:80px}.hero-art img{width:61px;height:61px}.hero-art:before{width:80px;height:80px}.hero-art:after{width:110px;height:110px}.hero .hero-button{font-size:12px;padding:9px 12px}.workspace .stats{gap:10px;margin-bottom:22px}.workspace .stat{padding:14px}.stat-label{font-size:11px;flex-wrap:nowrap;gap:7px;min-height:34px}.stat-label .chip{width:27px;height:27px;border-radius:9px}.stat strong{font-size:30px}.stat small{font-size:11px}.shortcuts{grid-template-columns:1fr 1fr;gap:10px}.shortcut{grid-template-columns:1fr;justify-items:start;gap:12px;font-size:12px;padding:15px}.color-chip{width:39px;height:39px}.color-chip img{width:29px;height:29px}.workspace .census-filters{gap:10px}.census-filters>.input-wrap{min-width:100%}.census-advanced summary{min-height:44px}.workspace .census-filter-grid{grid-template-columns:1fr}.census-advanced summary{font-size:12px}.status{font-size:11px}.management-toolbar{padding:12px;gap:10px}.management-toolbar label{min-width:0;flex:1}.management-toolbar label:first-child{min-width:100%}.management-toolbar .primary{width:100%}.resident-fields{grid-template-columns:1fr;padding:0 13px 14px}.resident-row>summary{padding:12px 13px}dialog{padding:18px;max-height:calc(100dvh - 24px)}.dialog-heading h2{font-size:19px}.statistics-event-grid{gap:10px}.statistics-event{padding:15px}.statistics-now-grid{gap:10px}.statistics-toolbar label:first-child{flex-basis:100%}.statistics-toolbar #statistics-month-label{flex:1.4}.statistics-toolbar #statistics-export{width:100%}.account-popover{max-width:calc(100vw - 28px)}.login-card{padding:26px 22px}.entry-main{padding-top:26px}
}
@media(max-width:350px){.hero-art{display:none}.workspace .hero{min-height:146px}.stat-label .chip{display:none}.stat-label{min-height:32px}.stat strong{font-size:28px}.workspace .panel{padding:14px}.statistics-now-grid{grid-template-columns:1fr}.statistics-event-grid{gap:8px}.statistics-event{padding:13px}.account-trigger{gap:2px;padding-right:5px}.workspace .breadcrumb{max-width:30vw}}
.management-form input[type=checkbox],.management-form input[type=radio],input[type=checkbox],input[type=radio]{width:18px;height:18px;min-height:18px;flex:0 0 18px;margin:0}
.resident-fields label:has(input[type=checkbox]),.check-label{min-height:44px;display:flex;align-items:center;gap:10px}
@media(max-width:800px){.text-link,.name-button,.entry-contact a,.help a{min-height:44px;display:inline-flex;align-items:center}.brand{min-height:44px}.name-button{padding-block:8px}}
dialog>.dialog-heading{position:sticky;top:0;z-index:3;background:var(--panel);padding-top:12px;margin-top:-12px}
@media(max-width:800px){.text-link,.name-button,.entry-contact a,.help a{min-width:44px}}
.resident-row>summary:focus-visible{outline-offset:-3px}
.search-bar .primary{min-height:44px}
