:root{font-family:Inter,"PingFang SC","Microsoft YaHei",sans-serif;color:#19283b;background:#f6f8fc;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}.shell{min-height:100vh;display:flex}.sidebar{width:242px;flex:none;background:#111d30;color:#dbe5f2;display:flex;flex-direction:column;padding:28px 17px 20px}.brand{display:flex;align-items:center;gap:11px;padding:0 11px 45px}.brand-mark{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:#5388fa;color:white;font-size:22px;font-weight:800;box-shadow:0 8px 20px #3572ef40}.brand strong{display:block;font-size:16px;letter-spacing:.01em;color:#fff}.brand small{display:block;margin-top:4px;color:#8798b2;font-size:9px;letter-spacing:.15em}.nav-caption{color:#8292a9;font-size:11px;letter-spacing:.15em;margin:0 16px 13px}.sidebar nav{display:grid;gap:5px}.nav-item{border:0;background:transparent;text-align:left;color:#aab9ce;padding:12px 16px;border-radius:9px;font-size:14px;display:flex;align-items:center;gap:13px;width:100%}.nav-item span{font-size:20px;line-height:1}.nav-item:hover{background:#202f46;color:#fff}.nav-item.active{background:#2d4163;color:#fff;font-weight:600}.side-bottom{margin-top:auto;display:flex;align-items:center;gap:10px;border-top:1px solid #2c3b51;padding:20px 8px 4px}.status-dot{width:9px;height:9px;flex:none;border-radius:50%;background:#48d6ad;box-shadow:0 0 0 4px #48d6ad22}.side-bottom strong{display:block;color:#e9f0f9;font-size:12px;font-weight:600}.side-bottom small{display:block;color:#8393aa;font-size:10px;margin-top:5px}.main{flex:1;min-width:0}.topbar{height:69px;background:#fff;border-bottom:1px solid #e8edf4;display:flex;align-items:center;justify-content:space-between;padding:0 38px}.crumb{font-size:13px;color:#7f8b9e}.crumb span{margin:0 11px;color:#bdc6d4}.crumb strong{color:#304054;font-weight:600}.top-actions{display:flex;align-items:center;gap:22px}.today{font-size:12px;color:#8290a2}.avatar{width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:#e4eeff;color:#3369d7;font-size:13px;font-weight:700}.content{max-width:1480px;margin:auto;padding:35px 38px 70px}.hidden{display:none!important}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:22px;margin-bottom:27px}.eyebrow{margin:0 0 8px;color:#487ce6;font-size:10px;font-weight:800;letter-spacing:.17em}h1{font-size:27px;margin:0;color:#17263c;letter-spacing:-.025em}h2{font-size:16px;margin:0;color:#223047}.subtle{margin:8px 0 0;color:#8592a4;font-size:13px}.primary{border:1px solid #346de1;background:#3976e9;color:white;font-weight:650;font-size:13px;border-radius:9px;padding:11px 17px;box-shadow:0 5px 12px #3976e926}.primary:hover{background:#2d66d3}.secondary{border:1px solid #dce4ef;background:#fff;color:#475a72;font-weight:600;font-size:13px;border-radius:9px;padding:11px 17px}.secondary:hover{background:#f5f8fc}.notice{display:flex;gap:12px;background:#eef4ff;border:1px solid #dbe8ff;border-radius:11px;padding:15px 17px;margin-bottom:22px}.notice-icon{width:18px;height:18px;flex:none;display:grid;place-items:center;border-radius:50%;background:#4780eb;color:#fff;font-family:Georgia;font-size:13px;font-weight:700}.notice strong{font-size:13px;color:#3058a0}.notice p{margin:4px 0 0;font-size:12px;color:#587099;line-height:1.6}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:22px}.stat{background:#fff;border:1px solid #e8edf4;border-radius:13px;padding:20px 21px;box-shadow:0 4px 18px #233b6010}.stat-top{display:flex;align-items:center;justify-content:space-between;color:#8190a3;font-size:12px}.stat-icon{width:31px;height:31px;border-radius:9px;display:grid;place-items:center;background:#edf3ff;color:#4779e4;font-size:17px}.stat-value{font-size:29px;font-weight:750;color:#1a2b43;margin:12px 0 4px;line-height:1}.stat-foot{font-size:11px;color:#a0acb9}.dashboard-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:20px}.dashboard-grid.lower{margin-top:20px}.panel{background:#fff;border:1px solid #e8edf4;border-radius:13px;box-shadow:0 4px 18px #233b600d;min-width:0}.panel-head{padding:22px 23px 17px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.panel-head p{font-size:12px;color:#93a0af;margin:6px 0 0}.small-tag{font-size:10px;color:#5179c3;background:#ecf3ff;border:1px solid #dbe8ff;border-radius:6px;padding:5px 7px}.region-list{padding:0 23px 20px}.region-row{display:flex;align-items:center;gap:13px;padding:13px 0;border-top:1px solid #eef1f6}.flag{width:31px;height:31px;background:#f2f5fa;border-radius:8px;display:grid;place-items:center;font-size:16px}.region-name{font-size:13px;font-weight:600;min-width:72px}.region-bar{height:7px;flex:1;background:#edf2f8;border-radius:20px;overflow:hidden}.region-bar i{display:block;height:100%;background:#5d8cf0;border-radius:20px}.region-count{font-size:12px;color:#53647c;min-width:75px;text-align:right}.allocation{padding-bottom:21px}.allocation label{display:block;font-size:12px;font-weight:600;color:#5c6d83;margin:12px 23px 8px}.allocation select,.filters select,.form-grid select{appearance:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23899ab0' stroke-width='1.7' d='m1 1 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 13px center;padding-right:36px}.allocation select{display:block;width:calc(100% - 46px);height:42px;margin:0 23px 14px;border:1px solid #dfe6ef;border-radius:8px;padding-left:12px;color:#33445a;font-size:13px}.wide{width:calc(100% - 46px);margin:0 23px;display:flex;justify-content:space-between}.result{font-size:11px;color:#9aa6b5;margin:13px 23px 0;min-height:32px;line-height:1.5}.text-button{border:0;background:none;color:#4878d9;font-size:12px;font-weight:600;padding:3px 0}.attention-item,.activity-item{display:flex;align-items:center;gap:12px;padding:13px 23px;border-top:1px solid #f0f2f6}.attention-icon,.activity-icon{width:31px;height:31px;flex:none;border-radius:9px;background:#fff4e8;color:#e99d40;display:grid;place-items:center;font-size:15px}.attention-icon.red{background:#fff0f0;color:#e36e6e}.attention-main,.activity-main{min-width:0;flex:1}.attention-main strong,.activity-main strong{font-size:12px;font-weight:650;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.attention-main small,.activity-main small{font-size:11px;color:#98a4b3;display:block;margin-top:4px}.attention-badge{font-size:10px;color:#d38b32;background:#fff3e6;padding:5px 7px;border-radius:6px}.attention-badge.red{color:#d26363;background:#fff0f0}.activity-icon{background:#eff4ff;color:#6186db}.empty{padding:24px;color:#9aa8b8;font-size:12px;text-align:center}.table-panel{overflow:hidden}.filters{padding:19px;display:flex;gap:11px}.search-wrap{height:39px;border:1px solid #dfe6ef;border-radius:8px;display:flex;align-items:center;gap:7px;padding:0 11px;max-width:320px;flex:1;color:#90a0b4;font-size:21px}.search-wrap input{border:0;outline:0;width:100%;font-size:12px;color:#273b52}.filters select{height:39px;border:1px solid #dfe6ef;border-radius:8px;padding:0 35px 0 12px;font-size:12px;color:#475970}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;min-width:920px;text-align:left}th{background:#f8fafd;color:#8a98aa;font-size:11px;font-weight:650;padding:13px 17px;white-space:nowrap;border-block:1px solid #edf1f5}td{padding:15px 17px;border-bottom:1px solid #f0f2f5;font-size:12px;color:#53647a;white-space:nowrap}tbody tr:hover{background:#fafcff}td strong{display:block;font-size:12px;color:#273b52}td small{display:block;font-size:11px;color:#9aa8b8;margin-top:4px}.pill{display:inline-flex;align-items:center;gap:6px;border-radius:20px;padding:6px 9px;font-size:10px;font-weight:650}.pill:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.pill.available{color:#25a77e;background:#e9f8f2}.pill.checking{color:#c39239;background:#fff6e8}.pill.paused{color:#8190a3;background:#f1f4f8}.pill.issue{color:#d66667;background:#fff0f0}.row-actions{display:flex;gap:8px}.row-actions button{border:0;background:none;color:#4379dc;font-size:11px;font-weight:600;padding:4px}.row-actions button:hover{text-decoration:underline}.due{color:#db7b52;font-weight:650}.table-footer{padding:14px 19px;display:flex;justify-content:space-between;color:#a1aebd;font-size:11px}.activity-panel{padding:5px 0}.activity-panel .activity-item{padding-block:16px}.activity-panel .activity-main strong{font-size:13px}.activity-panel .activity-main small{font-size:12px}dialog{border:1px solid #e0e7f1;box-shadow:0 25px 80px #1c2b4540;border-radius:16px;padding:0;width:min(660px,calc(100vw - 30px));color:#223047}dialog::backdrop{background:#15223a80}.dialog-head{display:flex;justify-content:space-between;align-items:start;padding:23px 26px 17px;border-bottom:1px solid #edf1f6}.dialog-head h2{font-size:20px}.close{border:0;background:none;color:#9caabd;font-size:24px;line-height:1}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px 18px;padding:21px 26px}.form-grid label{display:flex;flex-direction:column;gap:7px;color:#5d6f85;font-size:12px;font-weight:600}.form-grid label.full{grid-column:1/-1}.form-grid input,.form-grid select,.form-grid textarea{width:100%;border:1px solid #dce4ed;border-radius:8px;padding:10px 11px;outline:none;color:#283b52;font-size:13px;background-color:#fff}.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus,.search-wrap:focus-within{border-color:#70a0ef;box-shadow:0 0 0 3px #5f92ed1b}.form-grid textarea{resize:vertical}.dialog-foot{border-top:1px solid #edf1f6;padding:17px 26px;display:flex;align-items:center;justify-content:space-between;gap:12px}.dialog-foot span{font-size:11px;color:#9aa8b8}.dialog-foot div{display:flex;gap:9px}.toast{position:fixed;right:25px;bottom:25px;background:#1d314d;color:white;font-size:12px;padding:12px 16px;border-radius:9px;box-shadow:0 12px 35px #263b5b40;opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:translateY(0)}@media(max-width:1100px){.sidebar{width:205px}.content{padding:26px}.stats{grid-template-columns:repeat(2,1fr)}.dashboard-grid{grid-template-columns:1fr}}@media(max-width:680px){.shell{display:block}.sidebar{width:100%;padding:14px 16px}.brand{padding:0 0 12px}.nav-caption,.side-bottom{display:none}.sidebar nav{display:flex}.nav-item{justify-content:center;padding:9px 6px;font-size:12px}.topbar{height:50px;padding:0 17px}.content{padding:23px 16px 50px}.page-heading{align-items:flex-start}.page-heading .primary{white-space:nowrap;padding:9px;font-size:11px}h1{font-size:23px}.stats{gap:9px}.stat{padding:14px}.stat-value{font-size:24px}.notice{padding:12px}.form-grid{grid-template-columns:1fr;max-height:65vh;overflow:auto}.dialog-foot{flex-wrap:wrap}.today{display:none}}
@media(max-width:680px){.nav-item{width:auto;flex:1;white-space:nowrap;gap:4px;padding:8px 3px}}
.quota-order{width:31px;height:31px;flex:none;border-radius:8px;background:#edf3ff;color:#4779e4;display:grid;place-items:center;font-size:12px;font-weight:700}.allocation-rule{font-size:12px;line-height:1.7;color:#6c7e95;margin:4px 23px 18px}.table-scroll table{min-width:1060px}
/* 账号台账的密码列：直接展示当前保管的密码（仅登录管理员可取）；未保管显示"未保管"，
   读取失败显示"不可用"；退出登录/会话失效即从内存与 DOM 清空 */
td.cred-cell{min-width:150px}
.cred-password{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:#1c2b45;background:#f2f6fd;border:1px solid #dde7f5;border-radius:6px;padding:3px 7px;letter-spacing:.02em}
.cred-absent{color:#9aa8b8;font-size:11px}
.cred-error{color:#d26363;font-size:11px;font-weight:600}
/* 表单字段内的小字说明（例如"编辑时留空=保留现有密码"） */
.field-hint{display:block;font-size:11px;line-height:1.6;color:#8b98a9;font-weight:500;margin-top:2px}
.field-hint b{color:#4a6ea8}
/* 改密登记区：①②③ 分组，视觉上把"完成确认 / 后台如何处理密码 / 登记用新密码"分开 */
.rotation-group{border:1px solid #e6ecf5;background:#fafcff;border-radius:10px;padding:13px 15px;margin:11px 20px 0}
.rotation-group .group-title{margin:0 0 6px;font-size:12px;font-weight:750;color:#2e4a75;letter-spacing:.01em}
.rotation-group .group-note{margin:0 0 9px;font-size:11px;line-height:1.6;color:#8b98a9}
.rotation-group .inline-check{display:flex;align-items:flex-start;gap:8px;font-size:12px;color:#3f5570;line-height:1.6;margin:7px 0}
.rotation-group .inline-check b{color:#2b4a7d}
.rotation-group input[type=password]{width:100%;border:1px solid #dce4ed;border-radius:8px;padding:10px 11px;color:#283b52;font-size:13px;background:#fff}
.rotation-actions{padding:12px 20px 4px}
/* ============ 响应式：弹窗与主界面（手机 / 平板 / 普通 / 超宽 / 矮窗口） ============ */
/* 弹窗：宽度随视口，高度不超过视口；中部滚动、底部按钮常驻可见 */
dialog{width:min(700px,calc(100vw - 24px));max-height:min(92vh,calc(100vh - 24px));max-height:min(92dvh,calc(100dvh - 24px));overflow:hidden}
dialog[open]{display:flex;flex-direction:column}
#account-form{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;max-height:inherit}
.dialog-head,.dialog-foot{flex:none}
.dialog-body{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain}
.dialog-foot{position:sticky;bottom:0;background:#fff;z-index:1;box-shadow:0 -1px 0 #edf1f6}
.dialog-foot span{line-height:1.7}
/* 超宽桌面：弹窗略放宽，两列表单更舒展 */
@media(min-width:1800px){dialog{width:min(860px,calc(100vw - 120px))}}
/* 平板与窄桌面：贴近满宽 */
@media(max-width:900px){dialog{width:calc(100vw - 20px)}}
/* 手机：单列，底部按钮换行且不溢出 */
@media(max-width:680px){
  .form-grid{max-height:none;overflow:visible}      /* 滚动交给 .dialog-body，避免嵌套滚动条 */
}
@media(max-width:480px){
  dialog{width:calc(100vw - 12px);border-radius:12px}
  .form-grid{padding:14px 13px}
  .secret-panel,.rotation-panel{margin-left:0;margin-right:0}
  .dialog-foot{flex-wrap:wrap;gap:8px;padding:12px 13px}
  .dialog-foot div{width:100%;justify-content:flex-end}
}
/* 矮窗口：压缩留白，保证内容可滚、按钮可达 */
@media(max-height:700px){
  .dialog-head{padding:15px 18px 11px}
  .dialog-head h2{font-size:17px}
  .form-grid{padding:15px 18px;gap:11px 14px}
  .dialog-foot{padding:11px 18px}
  .rotation-group{margin:9px 14px 0;padding:11px 12px}
}
@media(max-height:520px){
  dialog{max-height:calc(100vh - 12px);max-height:calc(100dvh - 12px)}
  .dialog-head{padding:11px 14px 8px}
  .form-grid{padding:11px 14px;gap:9px 12px}
  .dialog-foot{padding:9px 14px}
}
/* 主界面：矮窗口下压缩垂直留白，避免内容被顶出可视区 */
@media(max-height:620px){
  .topbar{height:54px}
  .content{padding-top:18px;padding-bottom:34px}
  .page-heading{margin-bottom:16px}
  .stats{margin-bottom:14px}
  .stat{padding:14px 15px}
  .stat-value{font-size:24px}
}
/* 超宽主界面：内容区不再拉满，避免表格列过散 */
@media(min-width:1900px){.content{max-width:1680px}}
/* 领取码面板（管理端） */
.claim-panel{margin-top:20px}
.claim-panel code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:#33465f}
.new-codes{margin:0 19px 12px;padding:13px 15px;border:1px solid #cfe0ff;background:#f7faff;border-radius:10px}
.new-codes-head{font-size:12px;color:#3a5480;margin-bottom:8px}
.new-code-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:6px 0}
.new-code-row small{color:#8a98aa;font-size:11px}
.claim-code{flex:1 1 220px;font-size:16px;letter-spacing:.08em;background:#fff;border:1px solid #dfe8f6;border-radius:8px;padding:9px 11px}
.new-code-row .secondary{width:auto;margin:0;padding:9px 14px}
/* ---------- 管理员登录门 ---------- */
.login-screen{position:fixed;inset:0;z-index:60;display:none;align-items:center;justify-content:center;background:linear-gradient(160deg,#0f1c30,#1d3355 55%,#26456e);padding:24px}
.login-screen.active{display:flex}
.login-card{width:100%;max-width:392px;background:#fff;border-radius:16px;padding:32px 30px 24px;box-shadow:0 30px 80px #08111f66;display:grid;gap:13px}
.login-brand{display:flex;align-items:center;gap:11px}
.login-card h1{font-size:22px;margin:4px 0 0}
.login-sub{margin:0;color:#8592a4;font-size:12.5px;line-height:1.6}
.login-card label{display:flex;flex-direction:column;gap:7px;color:#5d6f85;font-size:12px;font-weight:600}
.login-card input{border:1px solid #dce4ed;border-radius:9px;padding:11px 12px;font-size:14px;color:#283b52;outline:none;background:#fff}
.login-card input:focus{border-color:#70a0ef;box-shadow:0 0 0 3px #5f92ed1b}
.login-card .wide{width:100%;margin:4px 0 0;display:flex;justify-content:center;font-size:14px}
.login-error{margin:0;min-height:17px;color:#d66667;font-size:12px}
.login-note{margin:2px 0 0;color:#a1aebd;font-size:11px;line-height:1.6}
#logout-button{white-space:nowrap}
/* ---------- 敏感资料（加密保管）与改密周期 ---------- */
.secret-panel,.rotation-panel{margin:0 0 16px;padding:15px 17px;border:1px solid #e8edf4;border-radius:11px;background:#fbfcfe}
.secret-panel{border-color:#e3daff;background:#faf8ff}
.panel-head-inline{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.panel-head-inline strong{display:block;font-size:14px;color:#223047}
.panel-head-inline small{display:block;margin-top:3px;color:#8592a4;font-size:11px}
.secret-actions,.rotation-register{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
.secret-actions input{min-width:196px}
.rotation-register{margin-top:12px}
.rotation-register input[type=password]{min-width:266px}
.secret-note{margin:10px 0 0;color:#8a97a8;font-size:11px;line-height:1.75}
.secret-note a{color:#3369d7}
.secret-panel .form-grid{margin-top:13px}
.secret-panel input,.rotation-panel input{border:1px solid #dce4ed;border-radius:8px;padding:9px 11px;font-size:13px;color:#283b52;background:#fff;outline:none;font-weight:400}
.secret-panel input:focus,.rotation-panel input:focus{border-color:#70a0ef;box-shadow:0 0 0 3px #5f92ed1b}
.secret-panel label,.rotation-panel label{display:flex;flex-direction:column;gap:6px;color:#5d6f85;font-size:12px;font-weight:600}
.inline-check{flex-direction:row;align-items:center;gap:6px;font-weight:400}
.inline-check input{width:auto}
@media(max-width:680px){.login-card{padding:26px 20px 20px}}
