
:root{--bg:#f3f7fc;--card:#fff;--text:#17233c;--muted:#66758f;--line:#e1e8f2;--blue:#1769e8;--blue2:#0b4dbb;--navy:#073a91;--green:#19b56b;--amber:#ff9718;--red:#ef4343;--purple:#7a5af8;--cyan:#14b8c8;--shadow:0 8px 24px rgba(32,68,122,.08)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}a{color:inherit}
.btn{border:0;border-radius:6px;padding:9px 14px;background:#1769e8;color:#fff;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;font-weight:600;transition:.18s}.btn:hover{filter:brightness(.98);transform:translateY(-1px);box-shadow:0 5px 14px rgba(23,105,232,.15)}.btn.light{background:#fff;color:#41526d;border:1px solid #dce5f1}.btn.blue{background:linear-gradient(180deg,#2878f3,#1769e8)}.btn.green{background:#18ae69}.btn.warn{background:#f59e0b}.btn.danger{background:#ef4444}.btn.small{padding:6px 10px;font-size:12px}
.input,.select,.textarea{width:100%;border:1px solid #dbe4ef;border-radius:6px;padding:9px 11px;background:#fff;color:#26334a;outline:none}.textarea{min-height:78px;resize:vertical}.input:focus,.select:focus,.textarea:focus{border-color:#73a6f6;box-shadow:0 0 0 3px rgba(23,105,232,.09)}
.card{background:#fff;border:1px solid var(--line);border-radius:10px;padding:16px;box-shadow:0 4px 16px rgba(45,73,117,.045)}.card h3{margin:0 0 11px;font-size:16px;color:#17376c}.muted{color:var(--muted)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.grid5{display:grid;grid-template-columns:repeat(5,1fr);gap:14px}
.metric{background:#fff;border:1px solid var(--line);border-radius:10px;padding:15px 16px;min-height:100px;box-shadow:0 4px 16px rgba(45,73,117,.045);position:relative;overflow:hidden}.metric:before{content:'';position:absolute;width:58px;height:58px;border-radius:50%;right:14px;top:18px;background:linear-gradient(135deg,rgba(36,117,240,.14),rgba(36,117,240,.035))}.metric .label{font-size:12px;color:#53647e}.metric .num{font-size:27px;font-weight:800;margin-top:7px;color:#102343}.metric .note{font-size:11px;color:#77859a;margin-top:5px}
.tag,.status{display:inline-flex;align-items:center;border-radius:5px;padding:4px 8px;font-size:11px;background:#edf4ff;color:#1769e8;font-weight:600}.status.ok{background:#eaf9f1;color:#13945a}.status.warn{background:#fff5e9;color:#e47800}.status.bad{background:#fff0f0;color:#d93333}
.tablewrap{overflow:auto;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:0 4px 16px rgba(45,73,117,.035)}.table{width:100%;border-collapse:collapse;min-width:760px}.table th,.table td{padding:10px 12px;border-bottom:1px solid #e9eef5;text-align:left;font-size:12px;white-space:nowrap}.table th{background:#f7f9fc;color:#4d5d76;font-weight:700}.table tr:hover td{background:#fbfdff}.table tr:last-child td{border-bottom:0}
.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field label{display:block;font-size:12px;color:var(--muted);margin-bottom:6px}.field.full{grid-column:1/-1}.notice{padding:12px 14px;border-radius:8px;background:#edf5ff;border:1px solid #d7e8ff;color:#285c9f;font-size:12px;line-height:1.65}.empty{padding:36px;text-align:center;color:var(--muted)}
.toast{position:fixed;right:22px;bottom:22px;background:#17233c;color:#fff;padding:12px 16px;border-radius:8px;box-shadow:var(--shadow);display:none;z-index:999}.toast.show{display:block}
.modal{position:fixed;inset:0;background:rgba(15,31,55,.42);display:none;align-items:center;justify-content:center;padding:20px;z-index:100}.modal.show{display:flex}.modalbox{width:min(680px,95vw);max-height:90vh;overflow:auto;background:#fff;border-radius:12px}.modalhead{padding:17px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.modalbody{padding:18px 20px}.modalfoot{padding:14px 20px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:8px}.x{cursor:pointer;font-size:22px;color:var(--muted)}
.role-tag,.perm-tag,.pill{display:inline-flex;align-items:center;padding:4px 8px;border-radius:5px;font-size:11px;font-weight:650;margin:2px 4px 2px 0}.role-tag.employee{background:#eef4ff;color:#1769e8}.role-tag.manager{background:#eaf9f1;color:#15945b}.role-tag.admin{background:#fff2e8;color:#c96800}.perm-wrap{display:flex;flex-wrap:wrap;gap:4px}.perm-tag{background:#f5f7fa;color:#465773;border:1px solid #e1e8f2}.perm-tag.manage{background:#eef4ff;color:#1c55ae;border-color:#cfe0ff}.perm-tag.emergency{background:#fff4e9;color:#b66300;border-color:#ffe0ba}.perm-tag.work{background:#eafbf8;color:#0e8376;border-color:#b8eee7}.perm-tag.inspection{background:#eef5ff;color:#1769e8;border-color:#cfe2ff}.perm-tag.attendance{background:#edfaf2;color:#158e58;border-color:#c9efd8}.perm-tag.notice{background:#fff0f6;color:#b52765;border-color:#ffd2e3}
@media(max-width:900px){.grid5,.grid4,.grid3,.grid2,.formgrid{grid-template-columns:1fr}.table{min-width:680px}}

/* V8 personnel permission selector + avatar + polished icon system */
.avatar-sm,.avatar-md,.avatar-lg{object-fit:cover;background:#eef4ff;border:1px solid #dbe7ff;box-shadow:0 5px 14px rgba(37,99,235,.10)}
.avatar-sm{width:38px;height:38px;border-radius:50%}.avatar-md{width:48px;height:48px;border-radius:50%}.avatar-lg{width:116px;height:116px;border-radius:50%;border:5px solid #fff;outline:1px solid #cfe0ff;box-shadow:0 12px 24px rgba(37,99,235,.16)}
.person-cell{display:flex;align-items:center;gap:10px;min-width:130px}.people-table td:first-child{min-width:180px}
.assign-layout{display:grid;grid-template-columns:minmax(640px,1.15fr) minmax(500px,.85fr);gap:16px;align-items:start}.assignment-card{padding:22px}.assign-top{display:grid;grid-template-columns:180px 1fr;gap:22px;align-items:start}.avatar-panel{background:linear-gradient(180deg,#f8fbff,#f5f8ff);border:1px solid #dbe7ff;border-radius:18px;padding:18px;display:flex;flex-direction:column;align-items:center;gap:10px}.avatar-upload-btn{width:100%;text-align:center}.avatar-tip{text-align:center;line-height:1.5}.assign-fields h3,.permission-section h3{font-size:17px;margin:0 0 12px}.permission-section{margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}.permission-section-head,.permission-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.permission-section-head p{margin:4px 0 0;color:var(--muted);font-size:12px}.save-assignment{width:100%;margin-top:18px;padding:12px 16px;font-size:14px}.assignment-list{min-height:560px}
.permission-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.permission-card{position:relative;display:flex;align-items:center;gap:10px;padding:12px;border:1px solid #dbe3ee;border-radius:15px;background:#fff;cursor:pointer;transition:.18s ease;min-height:78px}.permission-card:hover{border-color:#9ec0ff;box-shadow:0 8px 18px rgba(37,99,235,.08);transform:translateY(-1px)}.permission-card.selected{border-color:#3b82f6;background:linear-gradient(180deg,#fff,#f4f8ff);box-shadow:0 8px 18px rgba(37,99,235,.10)}.permission-card input{position:absolute;opacity:0;pointer-events:none}.permission-copy{display:flex;flex-direction:column;gap:3px;min-width:0}.permission-copy b{font-size:12.5px;color:#0f172a}.permission-copy small{font-size:10px;color:#7b8aa0;line-height:1.35}.permission-check{position:absolute;right:8px;top:8px;width:19px;height:19px;border-radius:50%;display:grid;place-items:center;font-size:11px;color:#fff;background:#cbd5e1;opacity:.35}.permission-card.selected .permission-check{background:#2563eb;opacity:1}.module-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;flex:0 0 auto;box-shadow:inset 0 0 0 1px rgba(255,255,255,.45)}.module-icon svg{width:20px;height:20px;stroke-width:1.9}.tone-blue{background:linear-gradient(135deg,#eaf2ff,#dbeafe);color:#2563eb}.tone-cyan{background:linear-gradient(135deg,#ecfeff,#cffafe);color:#0891b2}.tone-orange{background:linear-gradient(135deg,#fff7ed,#ffedd5);color:#ea580c}.tone-red{background:linear-gradient(135deg,#fff1f2,#ffe4e6);color:#e11d48}.tone-purple{background:linear-gradient(135deg,#f5f3ff,#ede9fe);color:#7c3aed}.tone-teal{background:linear-gradient(135deg,#f0fdfa,#ccfbf1);color:#0f766e}.tone-green{background:linear-gradient(135deg,#f0fdf4,#dcfce7);color:#16a34a}.tone-indigo{background:linear-gradient(135deg,#eef2ff,#e0e7ff);color:#4f46e5}.tone-amber{background:linear-gradient(135deg,#fffbeb,#fef3c7);color:#d97706}
.permission-modal{position:fixed;inset:0;background:rgba(15,23,42,.42);backdrop-filter:blur(4px);display:none;align-items:center;justify-content:center;padding:24px;z-index:200}.permission-modal.show{display:flex}.permission-modal-box{width:min(920px,96vw);max-height:88vh;background:#fff;border-radius:22px;box-shadow:0 30px 80px rgba(15,23,42,.25);overflow:hidden;display:flex;flex-direction:column}.permission-modal-head{padding:18px 22px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.permission-modal-head h3{margin:0;font-size:18px}.permission-modal-head p{margin:4px 0 0;color:var(--muted);font-size:12px}.modal-close{border:0;background:#f1f5f9;width:34px;height:34px;border-radius:10px;font-size:22px;color:#64748b;cursor:pointer}.permission-modal-body{padding:20px 22px;overflow:auto}.permission-modal-foot{padding:14px 22px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:8px;background:#fbfcfe}
/* slightly richer sidebar icon treatment */
.nav svg{width:18px;height:18px;padding:2px;border-radius:6px;box-sizing:content-box;background:#f1f5f9;color:#4f6b95;transition:.18s}.nav.on svg{background:rgba(255,255,255,.15);color:#fff}.nav:hover svg{background:#dbeafe;color:#2563eb}
@media(max-width:1250px){.assign-layout{grid-template-columns:1fr}.permission-picker{grid-template-columns:repeat(2,minmax(0,1fr))}.assignment-list{min-height:0}}
@media(max-width:760px){.assign-top{grid-template-columns:1fr}.avatar-panel{max-width:260px;margin:auto}.permission-picker{grid-template-columns:1fr}.permission-section-head,.permission-toolbar{align-items:flex-start;flex-direction:column}}

.userbox img.avatar{object-fit:cover;border:2px solid rgba(255,255,255,.75);background:#fff}


/* V9 dashboard icon and circular progress enhancement */
.metric{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;padding:18px 18px;min-height:108px}
.metric:before{display:none}
.metric-main{min-width:0;flex:1}
.metric .label{font-size:12px;color:#5b6b84;margin-bottom:8px}
.metric .num{font-size:28px;font-weight:800;color:#102b57;line-height:1.1;margin-top:0}
.metric .note{font-size:11px;color:#75849a;margin-top:8px;line-height:1.5}
.metric-side{display:flex;align-items:center;justify-content:center;flex:0 0 64px}
.metric-icon{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;box-shadow:inset 0 0 0 1px rgba(255,255,255,.55)}
.metric-icon svg{width:28px;height:28px;stroke-width:1.9}
.metric.tone-blue .metric-icon{background:linear-gradient(135deg,#e9f2ff,#d9e8ff);color:#1769e8}
.metric.tone-green .metric-icon{background:linear-gradient(135deg,#ecfbf3,#dff8ea);color:#18a95f}
.metric.tone-orange .metric-icon{background:linear-gradient(135deg,#fff4e6,#ffe7cc);color:#f17a00}
.metric.tone-red .metric-icon{background:linear-gradient(135deg,#fff0f0,#ffe1e1);color:#ef4343}
.metric.tone-purple .metric-icon{background:linear-gradient(135deg,#f2eeff,#e5ddff);color:#7a5af8}
.metric.tone-cyan .metric-icon{background:linear-gradient(135deg,#eafcff,#d6f7fa);color:#15a9bb}
.metric.tone-indigo .metric-icon{background:linear-gradient(135deg,#eef2ff,#e0e7ff);color:#4f46e5}
.metric.tone-amber .metric-icon{background:linear-gradient(135deg,#fff8e8,#ffedb8);color:#d97706}
.note-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px;vertical-align:middle}.note-dot.blue{background:#1769e8}.note-dot.green{background:#18a95f}.note-dot.orange{background:#f17a00}.note-dot.red{background:#ef4343}.note-dot.purple{background:#7a5af8}
.metric-status{display:inline-flex;align-items:center;gap:6px;margin-top:6px;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:700}
.metric-status.ok{background:#eaf9f1;color:#13945a}.metric-status.warn{background:#fff5e9;color:#e47800}.metric-status.bad{background:#fff0f0;color:#d93333}
.patrol-slide{padding:20px;border-radius:14px;background:linear-gradient(180deg,#ffffff 0,#fbfdff 100%)}
.patrol-main{display:grid;grid-template-columns:184px 1fr;gap:18px;align-items:center}
.circle-wrap{display:flex;justify-content:center;align-items:center}
.circle-progress{position:relative;width:154px;height:154px;display:grid;place-items:center}
.circle-progress svg{width:154px;height:154px;transform:rotate(-90deg)}
.circle-progress .bg{fill:none;stroke:#edf2f8;stroke-width:11}
.circle-progress .fg{fill:none;stroke-width:11;stroke-linecap:round;filter:drop-shadow(0 4px 10px rgba(23,105,232,.13))}
.circle-progress.blue .fg{stroke:#1769e8}.circle-progress.green .fg{stroke:#19b56b}.circle-progress.amber .fg{stroke:#ff9718}.circle-progress.red .fg{stroke:#ef4343}
.circle-center{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.circle-center .pct{font-size:30px;font-weight:900;color:#103b83;line-height:1}.circle-center .cap{font-size:11px;color:#7a899f;margin-top:6px}
.patrol-info{display:flex;flex-direction:column;gap:10px}
.patrol-top{align-items:flex-start}
.patrol-title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.patrol-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:999px;font-size:11px;font-weight:700}
.patrol-badge.green{background:#ecfbf3;color:#118651}.patrol-badge.blue{background:#eef5ff;color:#1769e8}.patrol-badge.amber{background:#fff6e9;color:#c76b00}.patrol-badge.red{background:#fff0f0;color:#cf3333}
.patrol-sub{font-size:12px}
.patrol-rate{display:none}
.patrol-stats{gap:10px}
.pstat{padding:12px;border-radius:10px}
.pstat.completed{background:#eef6ff;border-color:#d9e7ff}.pstat.plan{background:#f8fafd;border-color:#e6ecf4}.pstat.abnormal{background:#fff5f5;border-color:#ffe0e0}
.pstat .v.completed{color:#1769e8}.pstat .v.plan{color:#42526d}.pstat .v.abnormal{color:#ef4343}
.slide-note{border-left:4px solid transparent;padding:10px 12px;border-radius:8px}.slide-note.green{border-left-color:#19b56b}.slide-note.blue{border-left-color:#1769e8}.slide-note.amber{border-left-color:#ff9718}.slide-note.red{border-left-color:#ef4343}
.status.ok,.status.warn,.status.bad{font-weight:700}
@media(max-width:980px){.patrol-main{grid-template-columns:1fr}.circle-wrap{justify-content:flex-start}}

.avatar-presets{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;width:100%}.brand img{display:block}.sensitive-note{background:#fff8e8;border:1px solid #ffe0a6;color:#9a5b00;border-radius:8px;padding:10px 12px;font-size:11px}.table td{vertical-align:middle}


/* V13.1 岗位巡查看板：每屏4岗位，超过4个分页轮播 */
.patrol-viewport{min-height:0!important;overflow:hidden}
.patrol-page{display:none}
.patrol-page.active{display:block;animation:patrolPageIn .34s ease}
@keyframes patrolPageIn{from{opacity:.35;transform:translateX(8px)}to{opacity:1;transform:none}}
.patrol-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.patrol-card{min-width:0;background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);border:1px solid #e2eaf5;border-radius:14px;padding:14px;cursor:pointer;transition:.18s;box-shadow:0 3px 12px rgba(37,72,125,.035)}
.patrol-card:hover{transform:translateY(-2px);border-color:#a9c8f6;box-shadow:0 9px 24px rgba(23,105,232,.09)}
.patrol-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;min-height:48px}
.patrol-card .patrol-title{font-size:16px;line-height:1.25}
.patrol-card .patrol-sub{font-size:10.5px;white-space:nowrap;margin-top:5px}
.patrol-card .patrol-badge{font-size:10px;padding:4px 8px;flex:0 0 auto}
.patrol-card-body{display:flex;align-items:center;gap:12px;margin-top:10px}
.patrol-card .circle-wrap{flex:0 0 104px}
.patrol-card .circle-progress{width:104px;height:104px}
.patrol-card .circle-progress svg{width:104px;height:104px}
.patrol-card .circle-progress .bg,.patrol-card .circle-progress .fg{stroke-width:9}
.patrol-card .circle-center .pct{font-size:23px}
.patrol-card .circle-center .cap{font-size:9.5px;margin-top:4px}
.patrol-card-stats{flex:1;min-width:0;display:grid;gap:6px}
.patrol-card-stats>div{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 9px;background:#f7f9fc;border:1px solid #edf1f6;border-radius:8px}
.patrol-card-stats span{font-size:10px;color:#77859a}
.patrol-card-stats b{font-size:16px;color:#30445f}
.patrol-card-stats .blue-text{color:#1769e8}.patrol-card-stats .red-text{color:#ef4444}
.patrol-card .slide-note{font-size:10.5px;line-height:1.5;margin-top:10px;min-height:38px;display:flex;align-items:center}
.inspection-board .carousel-dots{margin-top:12px}
@media(max-width:1350px){.patrol-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.patrol-grid{grid-template-columns:1fr}.patrol-card-body{justify-content:flex-start}.patrol-card .circle-wrap{flex-basis:110px}}

.action-icon{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}.btn{min-height:36px;box-sizing:border-box;border-radius:9px}.btn.light{background:#edf4ff;color:#246be5;border-color:#d5e4fa}.btn:disabled{opacity:.55;cursor:wait}.btn:focus-visible,input[type=file]:focus-visible{outline:3px solid #a7c9ff;outline-offset:3px}
input[type=file]{max-width:100%;box-sizing:border-box;font:inherit;font-size:13px;color:#7a8da5;border:1px solid #dce7f5;border-radius:10px;background:#f8faff;padding:8px;line-height:1.6}input[type=file]::file-selector-button{border:0;border-radius:8px;background:#1769e8 url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2218%22%20height%3D%2218%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.8%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12%2016V3m-5%205%205-5%205%205M4%2015v5h16v-5%22%2F%3E%3C%2Fsvg%3E") no-repeat 11px center;color:white;font:inherit;font-weight:600;min-height:36px;padding:8px 13px 8px 36px;margin-right:12px;cursor:pointer}input[type=file]:disabled::file-selector-button{opacity:.55;cursor:wait}

.au-filters{display:grid;grid-template-columns:minmax(130px,1fr) auto minmax(130px,1fr) minmax(130px,1fr) minmax(100px,1fr) auto;gap:12px;align-items:center}.au-filters .input,.au-filters .select{min-width:0;width:100%;margin:0}@media(max-width:900px){.au-filters{grid-template-columns:1fr auto 1fr}.au-filters .select{grid-column:auto}.au-filters .btn{width:100%}}
