*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;overflow:hidden}
body{font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif;background:#f4f6fa;color:#2c3e50;font-size:13px;display:flex;flex-direction:column}
.auth-shell{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:24px;overflow:auto;background:radial-gradient(circle at 15% 15%,rgba(67,132,221,.32),transparent 32%),linear-gradient(145deg,#132a52,#28518e 60%,#1d3b68)}
.auth-shell.hidden{display:none}
.auth-card{width:min(420px,100%);padding:30px 34px 22px;border-radius:18px;background:#fff;box-shadow:0 24px 70px rgba(5,20,45,.35)}
.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:25px;color:#1e3c72}
.auth-brand strong{display:block;font-size:18px;letter-spacing:.5px}.auth-brand small{display:block;margin-top:2px;color:#8995a5;font-size:11px}
.auth-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:linear-gradient(135deg,#1e3c72,#3e78c4);color:#ffd54f;font-size:22px;font-weight:800}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;margin-bottom:24px;padding:4px;border-radius:9px;background:#f0f3f8}
.auth-tab{padding:8px;border:0;border-radius:7px;background:transparent;color:#758195;font-family:inherit;cursor:pointer}.auth-tab.active{background:#fff;color:#24508c;font-weight:600;box-shadow:0 1px 4px rgba(30,60,114,.12)}
.auth-form h1{font-size:21px;color:#24364b}.auth-intro{margin:6px 0 21px;color:#7d8999;font-size:12px}
.auth-form label{display:block;margin:13px 0 6px;color:#425166;font-size:12px;font-weight:600}
.auth-form input{width:100%;height:42px;padding:0 12px;border:1px solid #d9e0e9;border-radius:8px;outline:none;font:inherit;transition:border-color .15s,box-shadow .15s}
.auth-form input:focus{border-color:#3d73ba;box-shadow:0 0 0 3px rgba(61,115,186,.12)}
.auth-password{position:relative}.auth-password input{padding-right:52px}.auth-password button{position:absolute;right:8px;top:8px;height:26px;padding:0 5px;border:0;background:transparent;color:#376aa9;font-family:inherit;font-size:11px;cursor:pointer}
.auth-code-row{display:grid;grid-template-columns:minmax(0,1fr) 96px;gap:8px}.auth-code-row button{border:1px solid #b9cbe1;border-radius:8px;background:#f4f8fd;color:#2f65a7;font-family:inherit;font-size:11px;cursor:pointer}.auth-code-row button:hover{background:#eaf2fd}.auth-code-row button:disabled{cursor:wait;opacity:.6}.auth-form input[readonly]{background:#f4f6f8;color:#788493}
.auth-verification-message{min-height:17px;margin-top:7px;font-size:10px}.auth-verification-message.error{color:#c0392b}.auth-verification-message.success{color:#218c53}
.auth-message{min-height:19px;margin-top:10px;font-size:11px}.auth-message.error{color:#c0392b}.auth-message.success{color:#218c53}
.auth-submit{width:100%;height:42px;margin-top:4px;border:0;border-radius:8px;background:linear-gradient(135deg,#21477f,#3470b9);color:#fff;font-family:inherit;font-weight:600;cursor:pointer;box-shadow:0 6px 15px rgba(33,71,127,.2)}.auth-submit:hover{filter:brightness(1.06)}.auth-submit:disabled{cursor:wait;opacity:.7}
.auth-switch{text-align:center;margin-top:15px;color:#8995a5;font-size:11px}.auth-switch button{border:0;background:transparent;color:#2f68ad;font-family:inherit;cursor:pointer}
.auth-foot{text-align:center;margin-top:22px;padding-top:16px;border-top:1px solid #edf0f4;color:#a0a9b5;font-size:10px}
.auth-logout{padding:3px 7px;border:1px solid rgba(255,255,255,.35);border-radius:4px;background:transparent;color:#fff;font-family:inherit;font-size:11px;cursor:pointer}.auth-logout:hover{background:rgba(255,255,255,.15)}
.auth-role-name{display:inline-block;min-width:68px;text-align:center;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.2)}
.permission-hidden,.permission-empty{display:none!important}
.permission-container-only{cursor:default}.permission-container-only:not(:hover){opacity:.82}
.permission-nav-badge{margin-left:auto;min-width:17px;padding:0 5px;border-radius:9px;background:#e67e22;color:#fff;font-size:10px;text-align:center}.permission-nav-badge:empty{display:none}
.permission-page{max-width:1400px;margin:0 auto}
.permission-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:10px}.permission-summary>div{padding:13px 15px;border:1px solid #e5eaf1;border-radius:7px;background:#fff}.permission-summary span{display:block;margin-bottom:5px;color:#8a96a5;font-size:10px}.permission-summary strong{font-size:13px;color:#2c3e50}
.permission-notice{margin-bottom:10px;padding:10px 13px;border:1px solid #b9dfc9;border-radius:6px;background:#effaf3;color:#237c48;font-size:12px}
.permission-table code,.permission-check small{color:#8995a5;font:10px Consolas,monospace}
.permission-status{display:inline-block;padding:2px 7px;border-radius:10px;font-size:10px}.permission-status.neutral{background:#edf0f3;color:#687584}.permission-status.pending{background:#fff1dd;color:#b56513}.permission-status.approved{background:#e7f7ed;color:#21834a}.permission-status.denied{background:#fdebea;color:#b43b32}.permission-muted{color:#8995a5;font-size:10px}
.permission-admin-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:10px}.permission-users{padding:10px}.permission-user-row{display:flex;width:100%;align-items:center;gap:10px;padding:9px;border:0;border-radius:7px;background:transparent;text-align:left;font-family:inherit;cursor:pointer}.permission-user-row:hover{background:#f3f6fa}.permission-user-row.active{background:#eaf2fd}.permission-user-row span:nth-child(2){min-width:0}.permission-user-row strong,.permission-user-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.permission-user-row small{margin-top:3px;color:#8995a5;font-size:10px}.permission-avatar{display:grid;place-items:center;flex:0 0 32px;height:32px;border-radius:50%;background:#2f65a7;color:#fff;font-weight:700}
.permission-editor-head{display:flex;align-items:flex-start;justify-content:space-between;padding-bottom:10px;border-bottom:1px solid #edf0f4}.permission-editor-head h3{font-size:15px}.permission-editor-head p{margin-top:3px;color:#8995a5;font-size:10px}.permission-editor-head label{display:flex;align-items:center;gap:7px;color:#657184;font-size:11px}.permission-editor-head select{padding:5px 8px;border:1px solid #d9dee5;border-radius:5px;font-family:inherit}.permission-editor-actions{display:flex;justify-content:flex-end;gap:6px;margin:10px 0}.permission-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;max-height:520px;overflow:auto}.permission-check{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:center;padding:9px;border:1px solid #e5eaf1;border-radius:6px;cursor:pointer}.permission-check:hover{border-color:#9cbbe3;background:#f7faff}.permission-check input{grid-row:1/3}.permission-check span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.permission-check small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.permission-empty-state{display:grid;min-height:220px;place-items:center;color:#9aa4b1;font-size:12px}.permission-empty-state.compact{min-height:60px}
@media(max-width:900px){.permission-summary{grid-template-columns:repeat(2,1fr)}.permission-admin-layout{grid-template-columns:1fr}.permission-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.topbar{height:50px;flex-shrink:0;background:linear-gradient(135deg,#1e3c72,#2a5298);color:#fff;display:flex;align-items:center;padding:0 20px;box-shadow:0 2px 8px rgba(30,60,114,.3);z-index:100}
.logo{font-size:17px;font-weight:700;letter-spacing:1px}.logo .em{color:#ffd54f}
.sub{font-size:11px;opacity:.85;margin-left:10px;padding-left:10px;border-left:1px solid rgba(255,255,255,.3)}
.spacer{flex:1}
.user{font-size:12px;opacity:.9;display:flex;align-items:center;gap:8px}
.user .dot{width:7px;height:7px;border-radius:50%;background:#2ecc71}
.user .chip{background:rgba(255,255,255,.15);border-radius:4px;padding:2px 8px;font-size:11px}

/* 公司切换器 */
.co-switcher{display:flex;align-items:center;gap:6px;margin-right:16px}
.co-switcher label{font-size:11px;opacity:.85}
.co-select{background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.3);color:#fff;border-radius:5px;padding:4px 10px;font-size:12px;cursor:pointer;outline:none;font-family:inherit}
.co-select option{background:#2c3e50;color:#fff}

.layout{flex:1;display:flex;min-height:0}
.sidebar{width:190px;flex-shrink:0;background:#2c3e50;color:#ecf0f1;overflow-y:auto;padding:8px 0}
.ms{padding:6px 18px 3px;font-size:10px;color:#95a5a6;text-transform:uppercase;letter-spacing:1px;margin-top:6px}
.mi{display:flex;align-items:center;padding:9px 18px;cursor:pointer;border-left:3px solid transparent;transition:background .15s;font-size:13px;user-select:none}
.mi:hover{background:#34495e}
.mi.active{background:#1a252f;border-left-color:#3498db;color:#fff;font-weight:600}
.mi.disabled{opacity:.4;cursor:not-allowed;pointer-events:none}
.mi .ico{width:22px;font-size:14px;margin-right:8px;text-align:center}
.mi .bdg{margin-left:auto;color:#fff;font-size:10px;padding:1px 6px;border-radius:9px;font-weight:700}
.bdg-r{background:#e74c3c}.bdg-a{background:#e67e22}
.caret{margin-left:auto;flex-shrink:0;width:20px;height:20px;line-height:20px;text-align:center;font-size:13px;color:#cdd6e0;background:rgba(255,255,255,.08);border-radius:5px;transition:transform .18s,background .15s,color .15s}
.mi-parent:hover .caret{background:rgba(255,255,255,.16);color:#fff}
.mi-parent.collapsed .caret,.mi-subparent.collapsed .caret{transform:rotate(-90deg)}
.caret-sm{width:16px;height:16px;line-height:16px;font-size:11px}
.mi-subsub{padding-left:50px;font-size:11px}
.mi-subsub .ico{font-size:12px;width:18px}
.submenu{overflow:hidden;max-height:420px;transition:max-height .22s ease}
.submenu.collapsed{max-height:0}
.mi-sub{padding-left:34px;font-size:11.5px}
.mi-sub .ico{font-size:12px;width:20px}
.main{flex:1;overflow:auto;padding:12px 18px}
.mod{display:none}.mod.active{display:block}

.ph{display:flex;align-items:center;margin-bottom:10px;gap:10px}
.ph h2{font-size:16px;font-weight:600}
.ph .desc{font-size:11px;color:#7f8c8d;padding-left:10px;border-left:2px solid #d9dee5}
.ph .acts{margin-left:auto;display:flex;gap:6px;align-items:center}

/* 公司标签（页面内） */
.co-badge{display:inline-flex;align-items:center;gap:5px;background:#e8f4fd;border:1px solid #b5d4f4;border-radius:5px;padding:3px 10px;font-size:11px;color:#2a5298;font-weight:600;margin-bottom:10px}
.co-badge .co-dot{width:7px;height:7px;border-radius:50%;background:#3498db}

.cards{display:grid;gap:7px;margin-bottom:10px}
.c2{grid-template-columns:repeat(2,1fr)}.c3{grid-template-columns:repeat(3,1fr)}
.c4{grid-template-columns:repeat(4,1fr)}.c5{grid-template-columns:repeat(5,1fr)}.c6{grid-template-columns:repeat(6,1fr)}
.card{background:#fff;border-radius:6px;padding:10px 12px;box-shadow:0 1px 3px rgba(0,0,0,.06);border-left:4px solid #2a5298}
.card .lbl{font-size:10px;color:#7f8c8d;margin-bottom:4px}
.card .val{font-size:18px;font-weight:700;color:#2c3e50;line-height:1.1}
.card .val.big{font-size:21px}
.card .sub{font-size:10px;color:#95a5a6;margin-top:3px;line-height:1.5}
.card .rnk{font-size:9px;color:#aaa;margin-top:3px;line-height:1.7}
.card.blue{border-left-color:#3498db}.card.blue .val{color:#2a5298}
.card.green{border-left-color:#27ae60}.card.green .val{color:#27ae60}
.card.red{border-left-color:#e74c3c}.card.red .val{color:#e74c3c}
.card.orange{border-left-color:#e67e22}.card.orange .val{color:#e67e22}
.card.purple{border-left-color:#8e44ad}.card.purple .val{color:#8e44ad}
.card.teal{border-left-color:#16a085}.card.teal .val{color:#16a085}
.card.gray{border-left-color:#95a5a6}.card.gray .val{color:#7f8c8d}
.card.gold{border-left-color:#b9770e}.card.gold .val{color:#b9770e}

.panel{background:#fff;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,.06);padding:11px 13px;margin-bottom:10px}
.ptitle{font-size:13px;font-weight:600;color:#2c3e50;margin-bottom:8px;padding-bottom:6px;border-bottom:2px solid #ecf0f1;display:flex;align-items:center;gap:6px}
.tag{font-size:10px;color:#fff;padding:2px 7px;border-radius:10px;font-weight:500}
.tag-b{background:#3498db}.tag-g{background:#27ae60}.tag-r{background:#e74c3c}.tag-o{background:#e67e22}.tag-p{background:#8e44ad}

.g2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.g3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.g21{display:grid;grid-template-columns:2fr 1fr;gap:10px}

.twrap{border-radius:5px;overflow:auto;border:1px solid #e8eaed}
table{border-collapse:collapse;width:100%;font-size:11px}
thead tr th{background:#ecf0f1;color:#2c3e50;text-align:center;padding:6px 7px;border-bottom:2px solid #bdc3c7;font-weight:600;white-space:nowrap;position:sticky;top:0;z-index:5}
thead tr th.tl{text-align:left}
tbody td{padding:5px 7px;border-bottom:1px solid #f0f0f0;white-space:nowrap;background:#fff}
tbody td.tr{text-align:right}
tbody td.tc{text-align:center}
tbody tr:hover td{background:#f8fafc!important}
.chip{display:inline-block;padding:1px 7px;border-radius:10px;font-size:10px;font-weight:600;color:#fff}
.ch-g{background:#27ae60}.ch-b{background:#3498db}.ch-r{background:#e74c3c}
.ch-o{background:#e67e22}.ch-gr{background:#95a5a6}.ch-p{background:#8e44ad}
.ch-a{background:#2a5298}.ch-bb{background:#27ae60}.ch-c{background:#e67e22}

.pagination{display:flex;align-items:center;gap:3px;padding:7px 0 2px;justify-content:flex-end}
.pb{padding:2px 8px;border:1px solid #d9dee5;border-radius:3px;background:#fff;cursor:pointer;font-size:11px;color:#555}
.pb:hover{background:#f0f4ff;border-color:#2a5298;color:#2a5298}
.pb.on{background:#2a5298;color:#fff;border-color:#2a5298}
.pi{font-size:11px;color:#7f8c8d;margin-right:4px}

.mbar{display:inline-flex;align-items:center;gap:3px;width:68px}
.mbbg{flex:1;height:5px;background:#ecf0f1;border-radius:2px;overflow:hidden}
.mbf{height:100%;border-radius:2px}

.barchart{display:flex;flex-direction:column;gap:5px}
.brow{display:flex;align-items:center;gap:7px}
.brow .bl{width:68px;color:#555;flex-shrink:0;font-size:10px}
.brow .bt{flex:1;height:17px;background:#ecf0f1;border-radius:3px;overflow:hidden}
.brow .bf{height:100%;display:flex;align-items:center;padding:0 6px;color:#fff;font-size:10px;font-weight:600}
.brow .bv{width:65px;text-align:right;font-weight:600;color:#2c3e50;font-size:10px;flex-shrink:0}

.costbar{display:flex;height:12px;border-radius:3px;overflow:hidden;margin-bottom:6px}
.costleg{display:flex;flex-wrap:wrap;gap:5px}
.cli{display:flex;align-items:center;gap:3px;font-size:10px;color:#555}
.cdot{width:8px;height:8px;border-radius:2px;flex-shrink:0}

.tabs{display:flex;border-bottom:2px solid #ecf0f1;margin-bottom:10px}
.tab{padding:7px 14px;cursor:pointer;font-size:12px;color:#7f8c8d;border-bottom:2px solid transparent;margin-bottom:-2px;transition:all .15s}
.tab:hover{color:#2a5298}
.tab.active{color:#2a5298;border-bottom-color:#2a5298;font-weight:600}
.tab-pane{display:none}.tab-pane.active{display:block}

.up{color:#27ae60;font-weight:600}.dn{color:#e74c3c;font-weight:600}
.red{color:#e74c3c;font-weight:600}.grn{color:#27ae60;font-weight:600}

.fbar{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-bottom:8px}
.fbar label{font-size:11px;color:#555}
.fbar select,.fbar input{padding:3px 7px;border:1px solid #d9dee5;border-radius:4px;font-size:11px;background:#fff;outline:none}
.btn{padding:4px 10px;border:1px solid #d9dee5;border-radius:4px;background:#fff;cursor:pointer;font-size:11px;color:#2c3e50;transition:all .15s}
.btn:hover{border-color:#2a5298;background:#f0f4ff}
.btn.on{background:#2a5298;color:#fff;border-color:#2a5298}
.btn.danger{background:#e74c3c;color:#fff;border-color:#e74c3c}

#mod-overview .card{padding:8px 11px}
#mod-overview .card .val{font-size:15px}
#mod-overview .card .val.big{font-size:18px}
#mod-overview .card .sub{font-size:9px;margin-top:2px}
#mod-overview .card .rnk{font-size:9px;margin-top:2px}
#mod-overview .cards{gap:6px;margin-bottom:6px}
#mod-overview .panel{padding:8px 11px;margin-bottom:7px}
#mod-overview .ptitle{font-size:12px;margin-bottom:5px;padding-bottom:4px}

/* 替换报价：紧凑化(字体不变，只缩行/列间距及①②③区块间距) */
#mod-replacequote .panel{padding:7px 10px!important;margin:0 0 6px!important}
#mod-replacequote .ptitle{margin-bottom:4px!important;padding-bottom:3px!important}
#mod-replacequote table{font-size:13px!important}
#mod-replacequote thead tr th{padding:2px 5px;line-height:1.25;font-size:12.5px}
#mod-replacequote tbody td{padding:1px 5px;line-height:1.4;font-size:13px}
#mod-replacequote tbody td input,#mod-replacequote tbody td select{padding:1px 4px!important;margin:0;font-size:13px!important}
#mod-replacequote tbody td.tc br{display:none}   /* #列"✕"与序号同行 */
#mod-replacequote thead th{text-align:center}
#mod-replacequote thead th .btn{margin:0 0 1px;padding:0 4px;font-size:8px}   /* "隐藏"按钮在列名上方、窄 */
#mod-replacequote #rq-newcust>div{margin-top:6px!important;padding:8px!important}

.modal-bg{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.45);z-index:999;align-items:center;justify-content:center}
.modal-bg.show{display:flex}
.modal{background:#fff;border-radius:8px;padding:20px 24px;width:580px;max-height:82vh;overflow-y:auto;box-shadow:0 8px 32px rgba(0,0,0,.2)}
.modal-title{font-size:15px;font-weight:600;color:#2c3e50;margin-bottom:14px;padding-bottom:10px;border-bottom:2px solid #ecf0f1;display:flex;align-items:center;justify-content:space-between}
.modal-close{cursor:pointer;font-size:18px;color:#aaa}.modal-close:hover{color:#e74c3c}
.mrow{display:flex;padding:6px 0;border-bottom:1px solid #f4f6fa;font-size:12px}
.mrow .mk{color:#7f8c8d;width:120px;flex-shrink:0}.mrow .mv{color:#2c3e50;font-weight:500;flex:1}
.emp-avatar{width:48px;height:48px;border-radius:50%;background:linear-gradient(135deg,#2a5298,#3498db);display:flex;align-items:center;justify-content:center;color:#fff;font-size:18px;font-weight:700;flex-shrink:0}

.stat-box{border-radius:5px;padding:10px 12px;border-left:3px solid}
.sb-g{background:#f0fff4;border-color:#27ae60}.sb-g .sbv{color:#27ae60}
.sb-b{background:#f0f7ff;border-color:#3498db}.sb-b .sbv{color:#2a5298}
.sb-o{background:#fef8f0;border-color:#e67e22}.sb-o .sbv{color:#e67e22}
.sb-t{background:#f0fff9;border-color:#16a085}.sb-t .sbv{color:#16a085}
.sbv{font-size:22px;font-weight:700;margin-bottom:3px}
.sbl{font-size:10px;color:#7f8c8d;margin-bottom:4px}
.sbs{font-size:10px;color:#95a5a6}

.status-run{color:#27ae60;font-weight:600}
.status-wait{color:#e67e22;font-weight:600}
.status-fault{color:#e74c3c;font-weight:600}
.status-idle{color:#95a5a6}
