/* ================= 基础 ================= */
:root{
  /* 严格取自 Excel 模板的配色 */
  --xl-title-bg:#C7ECFF;      /* 第1行标题底色 FFC7ECFF */
  --xl-g-chandu:#C5E0B4;      /* 产独  accent6 lighter 60% */
  --xl-g-align:#9DC3E6;       /* 产研对齐 accent5 lighter 40% */
  --xl-g-yandu:#F4B183;       /* 研独  accent2 lighter 40% */
  --xl-req:#DE3C36;           /* 必填红字 FFDE3C36 */
  --xl-line:#B7BEC9;

  --bg:#F4F6F9;
  --panel:#FFFFFF;
  --txt:#1C2430;
  --txt2:#5A6675;
  --txt3:#8B96A5;
  --line:#E2E7EE;
  --line2:#CFD6E0;
  --brand:#1F6FEB;
  --brand-d:#1559C4;
  --brand-l:#EAF2FE;
  --err:#D93025;
  --err-bg:#FDECEA;
  --warn:#B7791F;
  --warn-bg:#FEF6E6;
  --ok:#137333;
  --ok-bg:#E7F5EC;
  --radius:8px;
  --hd:52px;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  background:var(--bg);color:var(--txt);font-size:13px;line-height:1.5;
  -webkit-font-smoothing:antialiased;overflow:hidden;
}
kbd{
  display:inline-block;padding:1px 6px;border:1px solid var(--line2);border-bottom-width:2px;
  border-radius:4px;background:#fff;font-family:inherit;font-size:11px;line-height:16px;color:var(--txt2);
}
code{background:#EEF1F5;padding:1px 5px;border-radius:4px;font-family:"SFMono-Regular",Consolas,monospace;font-size:12px}
b{font-weight:600}

/* ================= 顶栏 ================= */
.app-header{
  height:var(--hd);background:var(--panel);border-bottom:1px solid var(--line);
  display:flex;align-items:center;gap:20px;padding:0 16px;position:relative;z-index:60;
}
.brand{display:flex;align-items:center;gap:10px;flex-shrink:0}
.brand-mark{width:26px;height:26px;border-radius:7px;background:var(--brand);position:relative;flex-shrink:0}
.brand-mark::after{content:"";position:absolute;inset:7px;border:2px solid #fff;border-radius:2px;border-top-width:5px}
.brand-text h1{font-size:14px;font-weight:600;letter-spacing:.2px}
.brand-text p{font-size:11px;color:var(--txt3);margin-top:-1px}

.tabs{display:flex;gap:2px;overflow-x:auto;flex:1;scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tab{
  border:none;background:transparent;font:inherit;font-size:12.5px;color:var(--txt2);
  padding:7px 13px;border-radius:6px;cursor:pointer;white-space:nowrap;transition:.12s;
}
.tab:hover{background:#F1F4F8;color:var(--txt)}
.tab.active{background:var(--brand-l);color:var(--brand);font-weight:600}

.header-right{flex-shrink:0;display:flex;align-items:center;gap:10px}
.save-hint{font-size:11.5px;color:var(--txt3);display:flex;align-items:center;gap:5px}
.save-hint::before{content:"";width:6px;height:6px;border-radius:50%;background:#34A853}
.save-hint.saving::before{background:#F9AB00}

/* ================= 页面 ================= */
.page{display:none;height:calc(100vh - var(--hd));overflow:auto}
.page.active{display:flex;flex-direction:column}
#page-main{overflow:hidden}

/* ================= 工具栏 ================= */
.toolbar{
  display:flex;align-items:center;gap:8px;padding:9px 14px;background:var(--panel);
  border-bottom:1px solid var(--line);flex-shrink:0;flex-wrap:wrap;
}
.tb-group{display:flex;gap:6px;align-items:center}
.tb-sep{width:1px;height:18px;background:var(--line)}
.tb-spacer{flex:1}
.btn{
  font:inherit;font-size:12.5px;padding:6px 12px;border:1px solid var(--line2);background:#fff;
  border-radius:6px;cursor:pointer;color:var(--txt);transition:.12s;white-space:nowrap;
  display:inline-flex;align-items:center;gap:6px;
}
.btn:hover{border-color:#A9B4C2;background:#FAFBFC}
.btn:active{transform:translateY(1px)}
.btn-primary{background:var(--brand);border-color:var(--brand);color:#fff;font-weight:500}
.btn-primary:hover{background:var(--brand-d);border-color:var(--brand-d)}
.btn-ghost{border-color:transparent;color:var(--txt2)}
.btn-ghost:hover{background:#F1F4F8;border-color:transparent}
.btn-danger-ghost{border-color:transparent;color:#C5372C}
.btn-danger-ghost:hover{background:var(--err-bg);border-color:transparent}
.btn:disabled{opacity:.45;cursor:not-allowed}
.badge{
  display:inline-block;min-width:17px;height:17px;line-height:17px;padding:0 5px;border-radius:9px;
  background:#DDE3EA;color:var(--txt2);font-size:11px;text-align:center;font-weight:600;
}
.badge.on{background:var(--err);color:#fff}
.stat{font-size:12px;color:var(--txt2);gap:14px}
.stat b{color:var(--txt);font-weight:600}
.stat-ok b{color:var(--ok)}
.stat-err b{color:var(--err)}

/* ================= 粘贴提示 ================= */
.paste-tip{
  display:flex;align-items:flex-start;gap:10px;margin:10px 14px 0;padding:10px 12px;
  background:#EFF6FF;border:1px solid #C7DCFA;border-radius:var(--radius);
  font-size:12.5px;color:#22415F;line-height:1.65;flex-shrink:0;position:relative;
}
.paste-tip.hide{display:none}
.pt-icon{width:16px;height:16px;border-radius:50%;background:var(--brand);flex-shrink:0;margin-top:2px;position:relative}
.pt-icon::after{content:"i";position:absolute;inset:0;color:#fff;font-size:11px;font-weight:700;text-align:center;line-height:16px;font-style:italic}
.pt-body{flex:1}
.hl-err{color:var(--err);font-weight:600}
.pt-close{position:absolute;top:6px;right:8px;border:none;background:transparent;font-size:17px;line-height:1;color:#8AA4C0;cursor:pointer}
.pt-close:hover{color:var(--txt)}

/* ================= 表格 ================= */
.grid-wrap{
  flex:1;overflow:auto;margin:10px 14px 14px;background:var(--panel);
  border:1px solid var(--line2);border-radius:var(--radius);position:relative;outline:none;
}
.grid-wrap:focus-visible{box-shadow:0 0 0 2px rgba(31,111,235,.25)}
.grid{border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:12.5px}

/* --- 表头：严格还原 Excel 第 1-3 行 --- */
.grid thead th{
  position:sticky;background:#fff;border-right:1px solid var(--xl-line);border-bottom:1px solid var(--xl-line);
  padding:0;font-weight:400;
}
.grid thead tr:nth-child(1) th{top:0;z-index:32;height:30px}
.grid thead tr:nth-child(2) th{top:30px;z-index:32;height:34px}
.grid thead tr:nth-child(3) th{top:64px;z-index:32;height:30px}

/* 第1行：标题 16pt 加粗 居中 底色 C7ECFF */
.h-title{
  background:var(--xl-title-bg)!important;font-size:15px;font-weight:700;color:#1C2430;
  text-align:center;letter-spacing:.5px;
}
/* 第2行：填写方分组标签 10pt 加粗 居中 */
.h-tag{font-size:11.5px;font-weight:700;text-align:center;color:#1C2430;padding:3px 4px!important;line-height:1.3}
/* 第3行：字段名 10pt 加粗，必填红色 */
.h-name{font-size:12px;font-weight:700;text-align:center;color:#000;padding:4px 4px!important;line-height:1.3}
.h-name.req{color:var(--xl-req)}
.h-name .col-ltr{display:block;font-size:10px;font-weight:400;color:#6B7684;letter-spacing:.5px}
.h-name.req .col-ltr{color:#C98D8B}

.g-chandu{background:var(--xl-g-chandu)!important}
.g-align{background:var(--xl-g-align)!important}
.g-yandu{background:var(--xl-g-yandu)!important}

/* 序号列 */
.grid th.idx-h,.grid td.idx{
  position:sticky;left:0;z-index:33;width:52px;min-width:52px;max-width:52px;
  background:#EEF1F5;border-right:1px solid var(--line2);text-align:center;
}
.grid thead th.idx-h{z-index:40}
.grid td.idx{
  z-index:20;font-size:11.5px;color:var(--txt3);padding:0;vertical-align:middle;
  border-bottom:1px solid var(--line);
}
.idx-inner{display:flex;align-items:center;justify-content:center;gap:5px;height:100%}
.idx input{margin:0;cursor:pointer;width:13px;height:13px;accent-color:var(--brand)}
tr.row-sel td.idx{background:#DCE8FB}
tr.row-sel td{background:#F5F9FF}
tr.row-err td.idx{background:#FBE2DF;color:#A6342A}

/* 数据单元格 */
.grid tbody td{
  border-right:1px solid var(--line);border-bottom:1px solid var(--line);
  padding:0;height:32px;vertical-align:middle;background:#fff;position:relative;
}
.cell{
  padding:5px 8px;min-height:32px;display:flex;align-items:center;cursor:text;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.45;
}
.cell.is-select,.cell.is-multi{cursor:pointer;padding-right:18px}
.cell.is-select::after,.cell.is-multi::after{
  content:"";position:absolute;right:6px;top:50%;margin-top:-2px;
  border:3.5px solid transparent;border-top-color:#98A2B0;
}
.cell.is-multi{white-space:normal;flex-wrap:wrap;gap:3px;align-content:center;padding-top:4px;padding-bottom:4px}
.cell-ph{color:#B9C1CC}
td.focus{box-shadow:inset 0 0 0 2px var(--brand);z-index:12}
td.cell-err{background:var(--err-bg)!important}
td.cell-err::before{
  content:"";position:absolute;top:0;right:0;border:5px solid transparent;
  border-top-color:var(--err);border-right-color:var(--err);z-index:3;pointer-events:none;
}
td.cell-warn{background:var(--warn-bg)!important}
td.cell-warn::before{
  content:"";position:absolute;top:0;right:0;border:5px solid transparent;
  border-top-color:var(--warn);border-right-color:var(--warn);z-index:3;pointer-events:none;
}
.tag{
  display:inline-flex;align-items:center;gap:3px;padding:1px 5px;border-radius:4px;
  background:#EDF1F6;border:1px solid #DBE2EA;font-size:11.5px;color:#3A4553;max-width:100%;
}
.tag span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tag.bad{background:#FBDDD9;border-color:#F2B4AC;color:#A6342A;font-weight:600}
.cell-editor{
  position:absolute;inset:0;border:2px solid var(--brand);background:#fff;font:inherit;font-size:12.5px;
  padding:4px 7px;outline:none;resize:none;z-index:15;line-height:1.45;border-radius:2px;
}
textarea.cell-editor{min-height:80px;height:auto;z-index:25;box-shadow:0 6px 20px rgba(20,30,45,.16)}

.empty-state{padding:70px 20px;text-align:center;color:var(--txt3)}
.empty-state p{font-size:14px}
.empty-state .sub{font-size:12.5px;margin-top:6px;color:#A6B0BC}

/* ================= 下拉浮层 ================= */
.popover{
  display:none;position:absolute;z-index:200;background:#fff;border:1px solid var(--line2);
  border-radius:var(--radius);box-shadow:0 10px 32px rgba(20,30,45,.16);width:250px;overflow:hidden;
}
.popover.show{display:block}
.pop-search{padding:7px;border-bottom:1px solid var(--line)}
.pop-search input{
  width:100%;border:1px solid var(--line2);border-radius:5px;padding:5px 8px;font:inherit;font-size:12.5px;outline:none;
}
.pop-search input:focus{border-color:var(--brand)}
.pop-list{max-height:264px;overflow:auto;padding:4px}
.pop-item{
  padding:6px 9px;border-radius:5px;cursor:pointer;display:flex;align-items:center;gap:8px;font-size:12.5px;
}
.pop-item:hover{background:#F1F4F8}
.pop-item.sel{background:var(--brand-l);color:var(--brand);font-weight:500}
.pop-item .ck{
  width:14px;height:14px;border:1px solid var(--line2);border-radius:3px;flex-shrink:0;
  position:relative;background:#fff;
}
.pop-item.sel .ck{background:var(--brand);border-color:var(--brand)}
.pop-item.sel .ck::after{
  content:"";position:absolute;left:4px;top:1px;width:4px;height:8px;
  border:solid #fff;border-width:0 2px 2px 0;transform:rotate(43deg);
}
.pop-item .txt{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pop-empty{padding:16px 10px;text-align:center;color:var(--txt3);font-size:12.5px;line-height:1.7}
.pop-foot{border-top:1px solid var(--line);padding:6px 8px;display:flex;gap:6px;background:#FAFBFC}
.pop-foot:empty{display:none}
.pop-foot .btn{padding:4px 9px;font-size:12px}

/* ================= 错误面板 ================= */
.err-panel{
  position:fixed;top:var(--hd);right:0;bottom:0;width:400px;background:#fff;z-index:120;
  border-left:1px solid var(--line2);box-shadow:-8px 0 28px rgba(20,30,45,.09);
  transform:translateX(100%);transition:transform .22s cubic-bezier(.4,0,.2,1);
  display:flex;flex-direction:column;
}
.err-panel.show{transform:none}
.ep-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--line)}
.ep-head h3{font-size:13.5px;font-weight:600}
.ep-close{border:none;background:transparent;font-size:20px;line-height:1;color:var(--txt3);cursor:pointer}
.ep-close:hover{color:var(--txt)}
.ep-sum{padding:10px 14px;font-size:12.5px;color:var(--txt2);border-bottom:1px solid var(--line);background:#FAFBFC}
.ep-list{flex:1;overflow:auto;padding:8px}
.ep-item{
  border:1px solid var(--line);border-radius:7px;padding:9px 11px;margin-bottom:7px;cursor:pointer;transition:.12s;
}
.ep-item:hover{border-color:#A9B4C2;background:#FAFBFC}
.ep-loc{font-size:11.5px;color:var(--txt3);margin-bottom:3px;display:flex;gap:6px;align-items:center}
.ep-loc .pill{background:#EEF1F5;padding:1px 6px;border-radius:4px;color:var(--txt2);font-weight:600}
.ep-msg{font-size:12.5px;color:#A6342A;line-height:1.55}
.ep-msg.warn{color:var(--warn)}
.ep-fix{margin-top:7px;display:flex;flex-wrap:wrap;gap:5px}
.chip{
  border:1px solid var(--line2);background:#fff;border-radius:5px;padding:3px 8px;font-size:11.5px;
  cursor:pointer;color:var(--txt2);font-family:inherit;
}
.chip:hover{border-color:var(--brand);color:var(--brand);background:var(--brand-l)}
.chip.add{border-style:dashed}
.ep-empty{padding:50px 16px;text-align:center;color:var(--txt3);font-size:13px}
.mask{display:none;position:fixed;inset:0;background:rgba(15,23,32,.14);z-index:110}
.mask.show{display:block}

/* ================= 字典页 ================= */
.dict-page{padding:18px 22px 40px;max-width:1180px;width:100%;margin:0 auto}
.dict-head{margin-bottom:16px}
.dict-head h2{font-size:16px;font-weight:600;margin-bottom:5px}
.dict-head p{font-size:12.5px;color:var(--txt2);line-height:1.7}
.dict-body{display:flex;flex-direction:column;gap:14px}
.dict-misc{display:grid;grid-template-columns:repeat(auto-fill,minmax(268px,1fr));gap:14px;align-items:start}

.dcard{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.dcard-h{
  display:flex;align-items:center;gap:9px;padding:9px 12px;background:#F7F9FB;border-bottom:1px solid var(--line);
}
.dcard-h .t{font-size:13px;font-weight:600;flex:1;display:flex;align-items:center;gap:8px}
.dcard-h .cnt{font-size:11.5px;color:var(--txt3);font-weight:400}
.col-badge{
  font-size:10.5px;font-weight:700;background:#E4EAF2;color:#4A5766;padding:1px 6px;border-radius:4px;letter-spacing:.3px;
}
.multi-toggle{display:flex;align-items:center;gap:5px;font-size:11.5px;color:var(--txt2);cursor:pointer;user-select:none}
.multi-toggle input{accent-color:var(--brand);cursor:pointer;margin:0}
.dcard-b{padding:10px 12px;display:flex;flex-wrap:wrap;gap:6px}
.opt{
  display:inline-flex;align-items:center;gap:5px;border:1px solid var(--line2);background:#fff;
  border-radius:15px;padding:3px 5px 3px 11px;font-size:12px;
}
.opt .name{cursor:text;outline:none;border-radius:3px;padding:0 1px}
.opt .name:focus{background:#FFF8DC;box-shadow:0 0 0 1px #E8C86A}
.opt .x{
  width:16px;height:16px;border:none;background:#EDF1F5;border-radius:50%;color:#8B96A5;
  font-size:13px;line-height:14px;cursor:pointer;padding:0;font-family:inherit;
}
.opt .x:hover{background:#FBDDD9;color:#C5372C}
.opt-add{
  display:inline-flex;align-items:center;border:1px dashed var(--line2);border-radius:15px;
  padding:0;overflow:hidden;background:#fff;
}
.opt-add input{border:none;outline:none;font:inherit;font-size:12px;padding:4px 4px 4px 11px;width:112px;background:transparent}
.opt-add button{
  border:none;background:transparent;color:var(--brand);font:inherit;font-size:12px;
  padding:4px 10px 4px 4px;cursor:pointer;font-weight:500;
}
.opt-add button:hover{color:var(--brand-d)}
.dict-empty{color:var(--txt3);font-size:12px;padding:3px 0}
.dcard.sub{margin-left:0}
.group-sub{padding:0 12px 10px}
.group-sub .dcard{margin-bottom:8px}

/* ================= 说明页 ================= */
.help-page{padding:22px 26px 50px;max-width:880px;margin:0 auto;background:#fff;min-height:100%}
.help-page h2{font-size:15px;font-weight:600;margin:22px 0 10px}
.help-page h2:first-child{margin-top:0}
.help-list{padding-left:20px;display:flex;flex-direction:column;gap:8px;font-size:13px;line-height:1.8;color:#2C3846}
.help-p{font-size:13px;line-height:1.8;color:#2C3846}
.req-demo{color:var(--xl-req);font-weight:700}

/* ================= toast ================= */
.toast-wrap{position:fixed;top:64px;left:50%;transform:translateX(-50%);z-index:400;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none}
.toast{
  background:#20293A;color:#fff;padding:9px 16px;border-radius:7px;font-size:12.5px;
  box-shadow:0 8px 26px rgba(15,23,32,.24);animation:tin .2s ease;max-width:520px;line-height:1.6;
}
.toast.err{background:#B3261E}
.toast.ok{background:#146C2E}
@keyframes tin{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}

::-webkit-scrollbar{width:11px;height:11px}
::-webkit-scrollbar-thumb{background:#C6CEDA;border-radius:6px;border:3px solid transparent;background-clip:padding-box}
::-webkit-scrollbar-thumb:hover{background:#A9B4C2;background-clip:padding-box;border:3px solid transparent}
::-webkit-scrollbar-track{background:transparent}

/* ================= 批量修改弹窗 ================= */
.batch-mask{
  display:none;position:fixed;inset:0;background:rgba(15,23,32,.18);z-index:300;
}
.batch-mask.show{display:block}
.batch-modal{
  display:none;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);
  width:460px;max-width:calc(100vw - 28px);max-height:84vh;z-index:310;
  background:#fff;border:1px solid var(--line2);border-radius:var(--radius);
  box-shadow:0 18px 50px rgba(15,23,45,.22);flex-direction:column;
}
.batch-modal.show{display:flex}
.batch-head{
  display:flex;align-items:center;justify-content:space-between;padding:12px 16px;
  border-bottom:1px solid var(--line);background:#FAFBFC;border-radius:var(--radius) var(--radius) 0 0;
}
.batch-head h3{font-size:14px;font-weight:600}
.batch-close{border:none;background:transparent;font-size:20px;line-height:1;color:var(--txt3);cursor:pointer}
.batch-close:hover{color:var(--txt)}
.batch-body{padding:14px 16px;overflow:auto;flex:1}
.batch-row{margin-bottom:14px}
.batch-row > label{
  display:block;font-size:12px;font-weight:600;color:var(--txt2);margin-bottom:6px;
}
.batch-row select,.batch-row input[type=text],.batch-row textarea{
  width:100%;border:1px solid var(--line2);border-radius:6px;padding:7px 10px;
  font:inherit;font-size:13px;outline:none;background:#fff;
}
.batch-row select:focus,.batch-row input:focus,.batch-row textarea:focus{border-color:var(--brand)}
.batch-row textarea{min-height:72px;resize:vertical}
.batch-value{min-height:38px}
.batch-opt-search{margin-bottom:8px}
.batch-opt-search input{width:100%}
.batch-opt-list{
  max-height:240px;overflow:auto;border:1px solid var(--line);border-radius:6px;padding:5px;background:#FAFBFC;
}
.batch-opt-item{
  padding:7px 10px;border-radius:5px;cursor:pointer;display:flex;align-items:center;gap:8px;font-size:13px;
  margin-bottom:2px;background:#fff;
}
.batch-opt-item:hover{background:#F1F4F8}
.batch-opt-item.sel{background:var(--brand-l);color:var(--brand);font-weight:500}
.batch-opt-item .ck{
  width:14px;height:14px;border:1px solid var(--line2);border-radius:3px;flex-shrink:0;position:relative;background:#fff;
}
.batch-opt-item.sel .ck{background:var(--brand);border-color:var(--brand)}
.batch-opt-item.sel .ck::after{
  content:"";position:absolute;left:4px;top:1px;width:4px;height:8px;
  border:solid #fff;border-width:0 2px 2px 0;transform:rotate(43deg);
}
.batch-opt-item .txt{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.batch-opt-empty{padding:24px 10px;text-align:center;color:var(--txt3);font-size:12.5px}
.batch-hint{
  font-size:12px;color:var(--txt2);line-height:1.65;padding:9px 11px;background:#F1F4F8;border-radius:6px;
}
.batch-hint.warn{background:var(--warn-bg);color:var(--warn)}
.batch-hint:empty{display:none}
.batch-foot{
  display:flex;justify-content:flex-end;gap:8px;padding:12px 16px;border-top:1px solid var(--line);background:#FAFBFC;
  border-radius:0 0 var(--radius) var(--radius);
}

/* ================= 通用 ================= */
.hidden{display:none!important}
.batch-hint.err{background:#FDECEC;color:#C0392B}
.batch-opt-item.sel .ck{background:var(--brand);border-color:var(--brand)}

/* ================= 登录 / 注册 ================= */
.auth-screen{
  display:flex;align-items:center;justify-content:center;position:fixed;inset:0;z-index:500;
  background:linear-gradient(135deg,#EAF4FF 0%,#F7FAFD 60%,#FFFFFF 100%);
}
.auth-card{
  width:380px;max-width:calc(100vw - 32px);background:#fff;border:1px solid var(--line2);
  border-radius:14px;box-shadow:0 24px 60px rgba(15,23,45,.18);padding:26px 26px 22px;
}
.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.auth-brand h2{font-size:16px;font-weight:700;line-height:1.3}
.auth-brand p{font-size:12px;color:var(--txt3);margin-top:2px}
.auth-brand .brand-mark{
  width:34px;height:34px;border-radius:9px;flex-shrink:0;
  background:linear-gradient(135deg,var(--brand),#4F8DEB);
}
.auth-tabs{display:flex;gap:6px;background:#F1F4F8;border-radius:9px;padding:4px;margin-bottom:18px}
.auth-tab{
  flex:1;border:none;background:transparent;padding:8px 0;border-radius:7px;font:inherit;font-size:13.5px;
  font-weight:600;color:var(--txt2);cursor:pointer;transition:.15s;
}
.auth-tab.active{background:#fff;color:var(--brand);box-shadow:0 1px 3px rgba(15,23,45,.12)}
.auth-pane label{display:block;font-size:12px;font-weight:600;color:var(--txt2);margin:10px 0 5px}
.auth-pane input{
  width:100%;border:1px solid var(--line2);border-radius:8px;padding:10px 12px;font:inherit;font-size:14px;outline:none;
  box-sizing:border-box;
}
.auth-pane input:focus{border-color:var(--brand)}
.auth-btn{
  width:100%;margin-top:16px;border:none;background:var(--brand);color:#fff;font:inherit;font-size:14.5px;font-weight:600;
  padding:11px 0;border-radius:9px;cursor:pointer;transition:.15s;
}
.auth-btn:hover{filter:brightness(1.05)}
.auth-msg{margin-top:10px;font-size:12.5px;color:var(--txt2);min-height:16px}
.auth-msg.err{color:#C0392B}
.auth-tip{margin-top:12px;font-size:12px;color:var(--txt3);line-height:1.6}
.auth-tip b{color:var(--brand)}

/* ================= 顶栏用户区 ================= */
.user-box{display:inline-flex;align-items:center;gap:8px}
.user-box .user-name{font-weight:600;font-size:13px}
.user-box .user-role{
  font-size:11px;padding:1px 7px;border-radius:10px;background:#EAF4FF;color:var(--brand);font-weight:600;
}
#btnAggregate{background:var(--brand);color:#fff;border-color:var(--brand)}
#btnAggregate:hover{filter:brightness(1.05)}

/* ================= 汇总进度 ================= */
.prog-mask{display:none;position:fixed;inset:0;background:rgba(15,23,32,.18);z-index:400}
.prog-mask.show{display:block}
.prog-modal{
  display:none;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);
  width:420px;max-width:calc(100vw - 28px);z-index:410;background:#fff;border:1px solid var(--line2);
  border-radius:14px;box-shadow:0 18px 50px rgba(15,23,45,.22);padding:22px 24px;
}
.prog-modal.show{display:block}
.prog-modal h3{font-size:15px;font-weight:600;margin-bottom:16px}
.prog-bar{height:12px;background:#EDF1F6;border-radius:7px;overflow:hidden}
.prog-fill{height:100%;width:0%;background:linear-gradient(90deg,var(--brand),#4F8DEB);transition:width .25s ease}
.prog-text{margin-top:10px;font-size:12.5px;color:var(--txt2);min-height:18px}
