:root{font-family:"Microsoft YaHei",system-ui,sans-serif;color:#183246;background:#f3f6f8;line-height:1.5}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{border:1px solid #c9d5dc;background:#fff;color:#183246;border-radius:9px;padding:.67rem 1rem;cursor:pointer}button:hover{border-color:#3f827b}button:disabled{opacity:.55;cursor:wait}.primary{color:#fff;background:#137c70;border-color:#137c70}.primary:hover{background:#11685e}.layout{min-height:100vh;display:grid;grid-template-columns:220px 1fr}.sidebar{background:#15344a;color:#fff;padding:25px 14px}.brand{font-size:19px;font-weight:700;margin:0 10px 28px}.nav{display:grid;gap:5px}.nav button{text-align:left;border:0;background:transparent;color:#c9dce4}.nav button.active,.nav button:hover{background:#28576a;color:white}.main{min-width:0}.topbar{display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid #dce6e9;padding:16px clamp(18px,4vw,42px);gap:12px}.topbar .user{display:flex;align-items:center;gap:12px}.content{max-width:1100px;margin:0 auto;padding:32px clamp(18px,4vw,42px)}h1{font-size:25px;margin:0 0 6px}h2{font-size:19px;margin:0 0 14px}p{margin:0 0 15px}.muted{color:#627c89}.panel{background:#fff;border:1px solid #e1eaed;border-radius:14px;padding:22px;margin-top:18px;box-shadow:0 3px 14px #173c4e08}.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.pagehead{display:flex;justify-content:space-between;align-items:flex-start;gap:15px}.empty{color:#6c8490;text-align:center;padding:32px 5px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.tile{text-align:left;min-height:96px;background:#fff;border:1px solid #dce8e9;border-radius:12px;padding:18px}.tile b{display:block;font-size:17px;margin-bottom:6px}.tile span{font-size:13px;color:#728892}label{display:grid;gap:6px;font-size:14px;font-weight:600;color:#345362;margin-bottom:14px}input,select{width:100%;border:1px solid #c9d8dc;border-radius:8px;padding:10px;background:#fff;color:#173346}input:focus,select:focus,button:focus-visible{outline:3px solid #9dd8ce;outline-offset:1px}.formgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px}.full{grid-column:1/-1}.list{display:grid;gap:10px}.person{display:flex;justify-content:space-between;align-items:center;border:1px solid #e2ebee;border-radius:10px;padding:14px;gap:12px}.person b,.person small{display:block}.person small{color:#718994;margin-top:4px}.badge{color:#16735f;background:#e5f4ef;border-radius:20px;padding:3px 9px;font-size:12px;white-space:nowrap}.badge.off{color:#6b7880;background:#edf1f2}.login{max-width:460px;margin:9vh auto;padding:32px}.login h1{margin:20px 0 6px}.login .panel{padding:25px}.notice{background:#eef6f4;border-radius:9px;padding:12px 14px;color:#395f5b;font-size:14px}.error{background:#fff0ee;color:#9c372f}.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:#183246;color:#fff;border-radius:9px;padding:10px 16px;display:none;z-index:3;max-width:90%;box-shadow:0 5px 18px #0002}.toast.show{display:block}.loading{padding:60px;text-align:center;color:#687f88}dialog{border:0;border-radius:15px;padding:24px;width:min(95vw,540px);box-shadow:0 20px 80px #16394933}dialog::backdrop{background:#122d3aaa}.dialoghead{display:flex;justify-content:space-between;align-items:start}.dialoghead button{border:0;padding:2px 7px}.identity-qr{display:block;width:200px;height:200px;max-width:100%;margin:12px auto}.verification{font-size:24px;letter-spacing:.12em}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(max-width:700px){.layout{display:block}.sidebar{padding:15px 16px}.brand{margin:0 0 10px;font-size:17px}.nav{display:flex;overflow:auto;gap:4px}.nav button{white-space:nowrap;padding:8px 10px}.topbar{padding:12px 16px}.topbar .user{gap:8px;font-size:13px}.content{padding:24px 16px}.pagehead{display:block}.pagehead .actions{margin-top:12px}.panel{padding:17px}.formgrid{grid-template-columns:1fr}.full{grid-column:auto}.login{margin:4vh auto;padding:18px}.grid{gap:10px}.tile{padding:14px;min-height:90px}}
.check{display:flex;align-items:center;gap:8px;font-weight:400}.check input{width:auto}
.helmet-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:15px}.helmet-card{display:grid;justify-items:center;gap:6px;padding:12px;border:1px solid #e2ebee;border-radius:10px}.helmet-card img{width:150px;max-width:100%;height:auto}.helmet-card span{font-size:13px;color:#627c89}.helmet-card .check{margin:0}@media print{body{background:white}.sidebar,.topbar,.pagehead,.helmet-card:not(.selected),.helmet-card .check,#select-helmets,.panel>label{display:none!important}.layout{display:block}.content{max-width:none;padding:0}.panel{border:0;box-shadow:none;margin:0;padding:0}.helmet-grid{grid-template-columns:repeat(3,1fr)}.helmet-card{break-inside:avoid}}
dialog{max-height:92vh;overflow:auto}.preview-area{max-height:62vh;overflow:auto;text-align:center;background:#eef2f3;margin:12px 0}.preview-area img,.preview-area canvas{max-width:100%;height:auto}.topbar select{max-width:270px;min-width:100px}@media(max-width:700px){.topbar{flex-wrap:wrap}.topbar select{max-width:48%}.user{flex-wrap:wrap}dialog{padding:18px}}
@media print{.helmet-card button{display:none!important}}
.photo-list{display:grid;gap:10px;margin:12px 0}.photo-choice{display:flex;gap:12px;align-items:center;border:1px solid #e2ebee;border-radius:10px;padding:10px}.photo-choice b,.photo-choice small{display:block;word-break:break-all}.photo-choice small{color:#6b8490}.photo-choice .actions{gap:5px;margin-top:6px}.photo-choice .actions button{padding:4px 8px;font-size:13px}.photo-thumb{width:72px;height:72px;flex:none;overflow:hidden;padding:0;display:grid;place-items:center}.photo-thumb img{width:100%;height:100%;object-fit:contain}.rotate-90{transform:rotate(90deg)}.rotate-180{transform:rotate(180deg)}.rotate-270{transform:rotate(270deg)}
.photo-large{display:grid;place-items:center;min-height:55vh}.photo-large img{max-width:65%;max-height:45vh;object-fit:contain}
.photo-large.zoomed{display:block;min-height:0;max-height:60vh;overflow:auto;text-align:left}.photo-large.zoomed img{display:block;width:auto;height:auto;max-width:none;max-height:none}
.paper-corners{margin:10px 0}.paper-corners button[aria-pressed=true]{background:#137c70;color:#fff}.paper-surface{position:relative;line-height:0;touch-action:manipulation;cursor:crosshair;margin:12px 0}.paper-surface canvas{width:100%;height:auto}.paper-surface svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.paper-surface polygon{fill:#27b28b33;stroke:#1a9a7d;stroke-width:6}.paper-surface circle{fill:white;stroke:#11735e;stroke-width:8}.paper-surface circle.selected{fill:#ef9a21;stroke:#994f0b}.paper-result{text-align:center;overflow:auto;max-height:35vh;background:#eef2f3}.paper-result canvas{max-width:100%;height:auto}
.paper-result.zoomed{text-align:left;max-height:50vh}.paper-result.zoomed canvas{max-width:none}
.import-table{max-height:35vh;overflow:auto;margin:14px 0}.import-table table{width:100%;border-collapse:collapse}.import-table th,.import-table td{padding:7px;text-align:left;border-bottom:1px solid #e2ebee;white-space:nowrap}.import-table th{position:sticky;top:0;background:white}
.audit-item{padding:12px 0;border-top:1px solid #e2ebee}.audit-item p{margin:5px 0}.audit-item small{color:#728892}

/* Personnel directory */
.content{max-width:1600px}.sidebar{background:#17374b}.nav button{border-radius:8px}.nav button.active{background:#28596a;box-shadow:inset 3px 0 #65d4b9}.topbar{min-height:72px}.pagehead{align-items:center}.pagehead h1{letter-spacing:.01em}.people-panel{margin-top:22px;background:#fff;border:1px solid #e0e9ed;border-radius:16px;box-shadow:0 8px 28px #193c4d0b}.people-filters{display:grid;grid-template-columns:minmax(180px,1.35fr) repeat(4,minmax(112px,1fr));gap:12px;padding:22px 24px;border-bottom:1px solid #e9eff2}.people-filters label{margin:0;font-size:12px;color:#6b8490;letter-spacing:.03em}.people-filters input,.people-filters select{min-width:0;height:42px;font-size:14px;background:#f9fbfc;border-color:#dfe8eb}.people-list-head{display:flex;align-items:center;justify-content:space-between;padding:22px 24px 16px}.people-list-head>div{display:flex;align-items:baseline;gap:10px}.people-list-head h2{margin:0;font-size:17px}.people-list-head span{font-size:13px;color:#82949d}.people-table{padding:0 12px 16px}.people-columns,.people-row{display:grid;grid-template-columns:minmax(190px,1.4fr) minmax(120px,1fr) minmax(100px,.7fr) 90px minmax(156px,1fr);align-items:center;gap:16px}.people-columns{padding:12px 14px;background:#f6f9fa;border-radius:8px;color:#82949d;font-size:12px;font-weight:600}.people-row{min-height:72px;padding:12px 14px;border-bottom:1px solid #edf2f4;font-size:14px}.people-row:last-child{border-bottom:0}.people-row:hover{background:#f8fbfa}.people-identity{display:flex;align-items:center;gap:12px;min-width:0}.people-identity b,.people-identity small{display:block;overflow-wrap:anywhere}.people-identity small{color:#879ba4;font-size:12px;margin-top:3px}.people-avatar{width:38px;height:38px;flex:none;display:grid;place-items:center;border-radius:12px;background:#e5f4f0;color:#187969;font-weight:700}.people-cell{min-width:0;overflow-wrap:anywhere;color:#48616f}.people-row-actions{display:flex;align-items:center;gap:8px;justify-content:flex-start}.people-row-actions button,.people-menu summary{font-size:13px;padding:7px 11px;white-space:nowrap}.people-primary{color:#146f64;background:#edf8f5;border-color:#d6eee7}.people-menu{position:relative}.people-menu summary{list-style:none;cursor:pointer;border:1px solid #dbe5e8;border-radius:8px;background:#fff;color:#526b76}.people-menu summary::-webkit-details-marker{display:none}.people-menu[open] summary{border-color:#75b2a7}.people-menu-list{position:absolute;right:0;top:calc(100% + 6px);min-width:170px;padding:6px;background:white;border:1px solid #e0e9ed;border-radius:10px;box-shadow:0 10px 28px #193c4d25;z-index:5}.people-menu-list button{display:block;width:100%;text-align:left;border:0;border-radius:6px;background:transparent;padding:9px 10px}.people-menu-list button:hover{background:#f1f8f6}.people-menu-list .danger-action{color:#aa4b42}.people-menu:focus-within summary{outline-color:#9dd8ce}
@media(max-width:1100px){.people-filters{grid-template-columns:repeat(5,minmax(100px,1fr));gap:8px;padding:18px}.people-columns,.people-row{grid-template-columns:minmax(160px,1.2fr) minmax(100px,1fr) minmax(80px,.7fr) 70px minmax(145px,1fr);gap:8px}}
@media(max-width:700px){.people-panel{margin-top:16px}.people-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:16px}.people-filters label:first-child{grid-column:1/-1}.people-list-head{padding:18px 16px 10px}.people-hint,.people-columns{display:none}.people-table{padding:0 12px 12px}.people-row{grid-template-columns:1fr auto;gap:10px;padding:15px 4px}.people-identity{grid-column:1/-1}.people-cell{font-size:13px}.people-cell:before{content:attr(data-label) '：';color:#98a9b0}.people-row-actions{grid-column:1/-1;justify-content:flex-end}.people-menu-list{right:0;bottom:calc(100% + 6px);top:auto}}

.group-dialog{padding-top:4px}.group-crew{display:flex;align-items:center;gap:12px;padding:14px;background:#f3f8f7;border:1px solid #e4efec;border-radius:11px}.group-crew-icon,.group-list-icon{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:10px;background:#dcefe9;color:#177568;font-weight:700}.group-crew div{min-width:0}.group-crew div span,.group-crew strong{display:block}.group-crew div span{font-size:12px;color:#78938c}.group-crew strong{margin-top:2px;overflow-wrap:anywhere}.group-section-heading{display:flex;align-items:center;justify-content:space-between;margin:24px 0 10px}.group-section-heading h3{margin:0;font-size:15px}.group-section-heading span{font-size:12px;color:#82969e}.group-list{list-style:none;margin:0;padding:0;border:1px solid #e5edef;border-radius:10px;max-height:220px;overflow:auto}.group-list li{display:flex;align-items:center;gap:10px;padding:10px 12px;color:#294756;overflow-wrap:anywhere}.group-list li+li{border-top:1px solid #edf2f4}.group-list-icon{width:30px;height:30px;border-radius:8px;background:#eef4f5;color:#67818b;font-size:12px}.group-empty{padding:22px 12px;text-align:center;border:1px dashed #dce8e7;border-radius:10px;color:#80959e;font-size:13px}.group-add{margin-top:24px;padding-top:20px;border-top:1px solid #eaf0f2}.group-add label{margin-bottom:8px;font-size:14px}.group-add-row{display:flex;gap:10px}.group-add-row input{min-width:0;flex:1}.group-add-row button{flex:none;white-space:nowrap}.group-add p{margin:8px 0 0;color:#8b9ba2;font-size:12px}@media(max-width:420px){.group-add-row{flex-direction:column}.group-add-row button{width:100%}}

.helmet-filters{display:grid;grid-template-columns:minmax(200px,1.5fr) repeat(2,minmax(140px,1fr));gap:12px;padding-bottom:18px;border-bottom:1px solid #eaf0f2}.helmet-filters label{margin:0;font-size:12px;color:#6b8490}.helmet-filters input,.helmet-filters select{height:42px;background:#f9fbfc}.helmet-list-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px}.helmet-list-head strong{font-size:17px}.helmet-list-head span{margin-left:10px;color:#82949d;font-size:13px}.helmet-list-head label{margin:0;font-size:13px}.helmet-selection-hint{margin:8px 0 18px;color:#82949d;font-size:12px}.helmet-grid{grid-template-columns:repeat(auto-fill,minmax(165px,1fr))}.helmet-card{padding:16px 12px;gap:8px;background:#fff}.helmet-card b{overflow-wrap:anywhere;text-align:center}.helmet-card>button{font-size:13px;padding:7px 10px}.helmet-qr-loading{width:150px;height:150px;display:grid;place-items:center;color:#82949d;font-size:12px;background:#f7f9fa}.helmet-pagination{display:flex;align-items:center;justify-content:center;gap:14px;padding:22px 0 2px}.helmet-pagination span{color:#6b8490;font-size:13px}@media(max-width:700px){.helmet-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.helmet-filters label:first-child{grid-column:1/-1}.helmet-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.helmet-card img,.helmet-qr-loading{max-width:100%}.helmet-pagination{gap:8px}.helmet-pagination button{padding:8px}.helmet-pagination span{font-size:12px}}@media print{.helmet-filters,.helmet-list-head,.helmet-selection-hint,.helmet-pagination{display:none!important}.helmet-grid{grid-template-columns:repeat(3,1fr)}}
