/* 企业深墨主题：只覆盖视觉，不修改结构、字段、交互或数据。 */
:root{
  --nav:#0f172a;
  --nav2:#111c31;
  --primary:#2457e6;
  --primary2:#1744c7;
  --bg:#f1f4f8;
  --card:#fff;
  --line:#e2e7ef;
  --text:#182235;
  --muted:#6f7b8f;
  --green:#14865c;
  --orange:#c77918;
  --red:#cf3f4c;
  --purple:#6555c7;
  --shadow:0 8px 24px rgba(18,31,53,.055)
}

html,body{
  color:#182235;background:#f1f4f8;
  font-family:"Segoe UI","Microsoft YaHei","PingFang SC",Arial,sans-serif;
  font-size:14px
}
.app-shell{background:#f1f4f8}

/* 深色企业导航 */
.sidebar{
  width:248px;background:#0f172a;color:#fff;
  border-right:1px solid #1c2940;box-shadow:8px 0 28px rgba(12,22,38,.08)
}
.brand{height:82px;padding:0 19px;border-bottom:1px solid rgba(255,255,255,.08)}
.brand-icon{
  width:41px;height:41px;border-radius:10px;
  background:linear-gradient(145deg,#3972ff,#1e4fdb);color:#fff;
  box-shadow:0 8px 20px rgba(36,87,230,.3);font-size:15px
}
.brand b{color:#fff;font-size:15px;font-weight:700;letter-spacing:.2px}
.brand span{color:#8190aa;margin-top:4px;letter-spacing:.4px}
.sidebar nav{padding:14px 11px 22px}
.nav-home{margin-top:2px}
.nav-item{
  min-height:40px;height:auto;margin:2px 0;padding:8px 12px;
  border-radius:7px;color:#aab6c9;font-size:13px;
  transition:background .15s,color .15s,transform .15s
}
.nav-item i{color:#8797b1}
.nav-item:hover{background:#17243a;color:#fff}
.nav-item.active{
  position:relative;background:#1b2a43;color:#fff;
  box-shadow:inset 3px 0 0 #4c7cff;font-weight:650
}
.nav-item.active i{color:#79a0ff}
.nav-group{margin-top:8px}
.nav-group-title{
  width:calc(100% - 12px);margin:0 6px;padding:10px 7px;
  color:#70809a;border-radius:6px;font-size:11px;font-weight:700;
  letter-spacing:.7px
}
.nav-group-title:hover{background:#162238;color:#aebbd0}
.nav-group-title i{
  width:20px;height:20px;border-radius:5px;
  background:#1a2940;color:#7890b4
}
.nav-sublist .nav-item{min-height:36px;padding-left:39px;font-size:13px}
.nav-badge,.pending-badge,.patrol-badge{
  min-width:20px;height:18px;background:#315ee6;color:#fff;
  border-radius:5px;box-shadow:none
}
.sidebar-foot{
  border-top:1px solid rgba(255,255,255,.08);color:#8d9ab0;
  background:#0c1424
}

.status-dot{background:#33bd80;box-shadow:0 0 0 4px rgba(51,189,128,.12)}

/* 工作区框架 */
main{margin-left:248px;width:calc(100% - 248px)}
.topbar{
  height:82px;padding:0 27px;background:rgba(255,255,255,.97);
  border-bottom:1px solid #dfe5ed;box-shadow:0 2px 12px rgba(18,31,53,.025)
}
.topbar h1{font-size:21px;color:#152033;font-weight:720;letter-spacing:-.2px}
.topbar p,.date-chip{color:#7d899c}
.content{padding:24px 27px 44px}

/* 统一操作控件 */
.btn{
  height:36px;border:1px solid #d7dee8;background:#fff;color:#344157;
  border-radius:7px;box-shadow:0 1px 1px rgba(18,31,53,.025);
  font-weight:550
}
.btn:hover{background:#f7f9fc;border-color:#bbc5d3;filter:none}
.btn.primary,.selector-start{
  background:#2457e6;border-color:#2457e6;color:#fff;
  box-shadow:0 4px 12px rgba(36,87,230,.18)
}
.btn.primary:hover,.selector-start:hover{background:#1744c7;border-color:#1744c7}
.btn.link{color:#2457e6;text-decoration:none}
.btn.link:hover{text-decoration:underline;text-underline-offset:3px}
.btn.danger{color:#b73541;border-color:#eccbd0;background:#fffafa}
.icon-btn{background:#f1f4f8;color:#647188;border-radius:7px}
.display-mode-select,.search,.filter,.field input,.field select,.field textarea,
.qc-line-editor input,.qc-line-editor select,.qc-defect-row input,.qc-defect-row select,
.qc-form input,.qc-form select,.qc-form textarea,.official-query-box input,
.page-size,.page-jump{
  border-color:#d6dde7;background:#fff;color:#26334a;border-radius:7px
}
.search:focus,.field input:focus,.field select:focus,.field textarea:focus,
.official-query-box input:focus,.qc-photo-paste:focus,.image-paste-zone:focus{
  border-color:#4774ee;box-shadow:0 0 0 3px rgba(36,87,230,.09)
}

/* 内容表面 */
.panel,.metric-card,.business-card,.qc-po-card,.qc-guide section,
.setting-card,.decision-legend,.quality-strip,.official-query-box,.lookup-result{
  background:#fff;border-color:#dfe5ed;border-radius:11px;
  box-shadow:0 5px 18px rgba(18,31,53,.045)
}
.panel-head{height:60px;border-color:#e5e9ef;padding:0 20px}
.panel-title,.business-card h3{color:#182235;font-weight:700}
.metric-grid,.business-kpis,.qc-dashboard-kpis{gap:12px}
.metric-card{padding:18px 19px;border-top:3px solid #2457e6}
.metric-card:after,.qc-dashboard-kpis button:after{display:none}
.metric-card .label,.business-kpis span,.qc-dashboard-kpis span{color:#6e7a8d}
.metric-card .value,.business-kpis b,.qc-dashboard-kpis b{color:#172136}

/* 重点页眉：形成视觉锚点 */
.business-hero,.qc-dashboard-hero,.help-hero,.patrol-summary,.selector-card{
  position:relative;overflow:hidden;
  background:linear-gradient(118deg,#111d32 0%,#172946 58%,#214b99 100%);
  color:#fff;border:1px solid #203553;border-radius:13px;
  box-shadow:0 12px 28px rgba(16,30,52,.15)
}
.business-hero:after,.qc-dashboard-hero:after,.help-hero:after,
.patrol-summary:after,.selector-card:after{
  content:"";position:absolute;right:-70px;top:-110px;width:260px;height:260px;
  border:1px solid rgba(255,255,255,.09);border-radius:50%;pointer-events:none
}
.business-hero p,.business-hero .hero-data span,
.qc-dashboard-hero>div>span,.qc-dashboard-hero p,
.help-hero span,.help-hero p,.patrol-summary p,.patrol-summary span,
.selector-card p{color:#bac8dc}
.qc-hero-focus{
  position:relative;z-index:1;border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.07);color:#fff
}
.qc-hero-focus small,.qc-hero-focus span{color:#b9c8dc}
.selector-card input,.selector-card select{border:1px solid rgba(255,255,255,.28)}
.selector-extra-actions .btn{
  border-color:rgba(255,255,255,.28);background:rgba(255,255,255,.08);color:#fff
}
.selector-extra-actions .btn:hover{background:rgba(255,255,255,.14)}
.selector-selection-note{
  border:1px solid rgba(255,255,255,.18);background:rgba(9,19,37,.32);color:#fff
}
.selector-selection-note small{color:#b8c7da}
.selector-back{background:#fff!important;color:#1d4fcf!important;border-color:#fff!important}

/* 管理看板 */
.business-kpis button,.qc-dashboard-kpis button{
  background:#fff;border:1px solid #dfe5ed;border-top:3px solid #2457e6;
  border-radius:10px;box-shadow:0 5px 16px rgba(18,31,53,.045)
}
.business-kpis button:hover,.qc-dashboard-kpis button:hover,.metric-link:hover{
  transform:translateY(-1px);border-color:#bdc8d7;
  box-shadow:0 9px 24px rgba(18,31,53,.075)
}
.business-flow button{
  border-color:#e0e6ee;background:#f7f9fc;border-radius:8px;color:#26334a
}
.business-summary{border-color:#dfe5ed;border-radius:10px;box-shadow:0 5px 18px rgba(18,31,53,.035)}
.business-summary button{border-color:#e5e9ef;background:#fff}
.business-tabs button{background:#edf1f6;color:#536177;border-radius:6px}
.business-tabs button.active,.risk-group-tabs .tab.active{
  background:#17243a;border-color:#17243a;color:#fff
}
.risk-group-tabs .tab{border-color:#dce2eb;background:#fff;color:#536177}
.qc-flow-card{border-color:#dfe5ed;background:#f7f9fb;border-radius:9px}
.qc-flow-card i{background:#2457e6;color:#fff}
.qc-rank{background:#e8eefc;color:#214fc8}

/* 生产力表格 */
.table-wrap,.smart-table-wrap{border-color:#e2e7ee}
table{background:#fff}
th,.qc-line-table th,.qc-guide-table th,.paged-data-grid th:first-child,
.paged-data-grid th:nth-last-child(2),.paged-data-grid th:last-child{
  background:#f3f5f8;color:#5d6a7f;border-color:#dfe5ed;
  font-weight:650;letter-spacing:.15px
}
td,.qc-line-table td,.qc-guide-table td{color:#2d394e;border-color:#e8ecf1}
tr:hover td,.paged-data-grid tr:hover td:first-child,
.paged-data-grid tr:hover td:nth-last-child(2),.paged-data-grid tr:hover td:last-child{
  background:#f7f9fc
}
.paged-data-grid td:first-child,.paged-data-grid td:nth-last-child(2),
.paged-data-grid td:last-child{background:#fff}
.table-wrap thead th:first-child,.smart-table-wrap thead th:first-child{background:#f6f8fb!important}
.table-wrap tbody td:first-child,.smart-table-wrap tbody td:first-child{background:#fff!important}
.table-wrap tbody tr:hover td:first-child,.smart-table-wrap tbody tr:hover td:first-child{background:#fbfcff!important}
.table-wrap tbody tr.is-recycled td:first-child,.smart-table-wrap tbody tr.is-recycled td:first-child{background:#fff8f8!important}
.code{color:#304667}
.sku-detail-row td{background:#f5f8fc!important}
.sku-detail th{background:#eaf0f8!important}

/* 状态色只用于业务语义 */
.tag,.qc-status,.risk-pill,.wecom-state,.permission-chip,.match-label,
.qc-photo-count{font-weight:650;border-radius:5px}
.tag.blue,.match-label,.qc-photo-count{color:#1d4ec8;background:#e8efff}
.tag.purple{color:#5f4db0;background:#f0edfb}
.tag.green,.qc-status.good,.wecom-state.sent{color:#176843;background:#e7f5ee}
.tag.orange,.qc-status.warn,.risk-pill{color:#8a5816;background:#fff1dc}
.tag.red,.qc-status.bad,.risk-pill.high,.wecom-state.failed{color:#a42e39;background:#fde9eb}
.tag.gray,.qc-status,.wecom-state{color:#566277;background:#edf0f4}
.business-alert{border-left-color:#ce4651;background:#fff2f3}
.business-alert.warn{border-color:#d48a29;background:#fff6e7}
.business-alert.good{border-color:#219565;background:#edf8f2}
.audit-banner,.filter-trace,.import-banner,.form-note{
  border-color:#cfdaf0;background:#f3f6fc;color:#496083;border-radius:8px
}
.audit-banner b{color:#244a8e}
.filter-trace.trace-ok{border-color:#c8e3d5;background:#f0f8f4;color:#327052}
.filter-trace.trace-warning{border-color:#ead6b5;background:#fff8ec;color:#805c27}
.qc-quickbar,.qc-merged-strip{border-color:#cfe2d8;background:#f0f7f4;color:#3e6957}
.qc-silver-alert{border-color:#ecc7ca;background:#fff1f2;color:#8b343a}
.qc-silver-alert>span{background:#cf3f4c}

/* 文件、详情、弹层 */
.image-paste-zone,.silver-paste-zone,.qc-photo-paste,.qc-paste-panel{
  border-color:#aebcd1;background:#f5f8fc;color:#4e6282
}
.silver-paste-zone:hover,.silver-paste-zone:focus{
  border-color:#4774ee;background:#f1f5ff;box-shadow:0 0 0 3px rgba(36,87,230,.08)
}
.silver-paste-zone.has-image{border-color:#69a787;background:#f0f8f4}
.silver-paste-copy b{color:#29446f}
.product-thumb,.product-placeholder,.silver-thumb,.silver-preview,
.qc-photo-card,.qc-detail-photo{border-color:#dce3ed;background:#f7f9fc}
.modal-wrap{background:rgba(9,17,30,.58);backdrop-filter:blur(2px)}
.modal{border-radius:12px;box-shadow:0 28px 80px rgba(7,15,28,.28)}
.login-overlay{background:linear-gradient(135deg,#e9edf4,#f6f8fb)}
.login-card{border-color:#d9e0e9;border-radius:16px;box-shadow:0 22px 65px rgba(16,30,52,.16)}
.login-mark{background:linear-gradient(145deg,#3972ff,#1e4fdb);border-radius:10px}
.toast{background:#101a2d;border-radius:7px;box-shadow:0 10px 30px rgba(8,17,31,.24)}

/* 其他组件 */
.tabs{border-color:#dfe5ed}
.tab.active{color:#2457e6;border-color:#2457e6}
.progress{background:#e9edf3}
.progress i,.qc-progress i{background:#2457e6}
.coverage-summary .coverage-progress i{background:linear-gradient(90deg,#2457e6,#14865c)}
.candidate-card{border-color:#e5c58f;background:#fffaf1;color:#26334a}
.candidate-card:hover{border-color:#ce9135;background:#fff5e5;box-shadow:0 5px 16px rgba(185,120,24,.1)}
.candidate-card span{color:#855c20}
.completion-card:hover{border-color:#8aa8f2;background:#f7f9ff}
.detail-grid dt{background:#f3f5f8;color:#5d697c}
.lookup-title{background:#f3f6fc;border-color:#dce4f2}
.no-match .lookup-title{background:#fff8ed}
.coverage-modal-summary{background:#f3f6fc}
.coverage-modal-summary b,.import-numbers strong{color:#2457e6}
.official-query-box,.lookup-result{border-color:#cedaf0}
.quality-strip button{background:#f2f5f9;color:#526178}
.quality-strip button:hover{background:#e8eef9;color:#2457e6}
.quality-strip strong{color:#172136}

@media(max-width:850px){
  .sidebar{width:72px;background:#0f172a}
  main{margin-left:72px;width:calc(100% - 72px)}
  .nav-item:not(.active){color:#aab6c9}
  .nav-item.active{background:#1b2a43;color:#fff}
}

body[data-display-mode="compact"] .sidebar{width:220px}
body[data-display-mode="compact"] main{margin-left:220px;width:calc(100% - 220px)}
body[data-display-mode="large"] .sidebar{width:278px}
body[data-display-mode="large"] main{margin-left:278px;width:calc(100% - 278px)}

@media(max-width:850px){
  body[data-display-mode="compact"] .sidebar,
  body[data-display-mode="large"] .sidebar{width:72px}
  body[data-display-mode="compact"] main,
  body[data-display-mode="large"] main{margin-left:72px;width:calc(100% - 72px)}
}

/* 已确认的两级导航：一级分类 + 当前分类二级入口 */
.primary-rail{
  position:fixed;inset:0 auto 0 0;z-index:5;
  width:78px;padding:14px 8px;
  display:flex;flex-direction:column;
  background:#0b1425;border-right:1px solid #1d2a40;color:#fff
}
.primary-mark{
  width:42px;height:42px;margin:0 auto 19px;border-radius:10px;
  display:grid;place-items:center;background:#2b60eb;color:#fff;
  font-size:15px;font-weight:800;box-shadow:0 8px 18px rgba(43,96,235,.28)
}
.primary-nav{display:flex;flex-direction:column;gap:5px}
.primary-nav-item{
  position:relative;min-height:60px;padding:7px 3px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
  border:0;border-radius:8px;background:transparent;color:#7f8ea7;
  font:inherit;font-size:11px;cursor:pointer
}
.primary-nav-item i{font-style:normal;font-size:17px;color:#8193b0}
.primary-nav-item:hover{background:#142139;color:#dce6f4}
.primary-nav-item.active{background:#1b2a43;color:#fff}
.primary-nav-item.active i{color:#80a2ff}
.primary-nav-item.active:before{
  content:"";position:absolute;left:-8px;top:12px;bottom:12px;width:3px;
  border-radius:0 3px 3px 0;background:#5b84ff
}
.sidebar{left:78px;width:194px;box-shadow:6px 0 20px rgba(12,22,38,.055)}
.sidebar .brand{padding:0 15px}
.sidebar .brand>div{min-width:0}
.sidebar .brand b{font-size:13px;line-height:1.45;white-space:normal}
.sidebar .brand span{font-size:10px}
.sidebar nav{padding:12px 10px 20px}
.nav-group{display:none;margin-top:0}
.nav-group.primary-active{display:block}
.nav-group-title{
  width:100%;margin:0 0 10px;padding:0 8px 13px;
  border-bottom:1px solid #233149;border-radius:0;
  color:#dce5f1;font-size:14px;letter-spacing:0
}
.nav-group-title:hover{background:transparent;color:#fff}
.nav-group-title b{
  min-width:23px;height:21px;padding:0 6px;border-radius:5px;
  display:grid;place-items:center;background:#1d2b42;color:#7f91ad;
  font-size:10px
}
.nav-group:not(.open) .nav-sublist{display:block}
.nav-sublist .nav-item{min-height:39px;padding:8px 12px;font-size:13px}
.nav-sublist .nav-item.active{box-shadow:inset 3px 0 0 #5b84ff}
main{margin-left:272px;width:calc(100% - 272px)}

body[data-display-mode="compact"] .primary-rail{width:70px}
body[data-display-mode="compact"] .sidebar{left:70px;width:180px}
body[data-display-mode="compact"] main{margin-left:250px;width:calc(100% - 250px)}
body[data-display-mode="large"] .primary-rail{width:82px}
body[data-display-mode="large"] .sidebar{left:82px;width:216px}
body[data-display-mode="large"] main{margin-left:298px;width:calc(100% - 298px)}

@media(max-width:850px){
  .primary-rail,
  body[data-display-mode="compact"] .primary-rail,
  body[data-display-mode="large"] .primary-rail{width:64px;padding-left:6px;padding-right:6px}
  .primary-mark{width:38px;height:38px}
  .primary-nav-item{min-height:50px}
  .primary-nav-item span{display:none}
  .sidebar,
  body[data-display-mode="compact"] .sidebar,
  body[data-display-mode="large"] .sidebar{left:64px;width:166px}
  .sidebar .brand div{display:block!important}
  .sidebar .nav-item,.sidebar .nav-item.active{justify-content:flex-start;font-size:12px}
  main,
  body[data-display-mode="compact"] main,
body[data-display-mode="large"] main{margin-left:230px;width:calc(100% - 230px)}
}

/* v1.5.0：信息密度、资料联动卡和单底部分页 */
body,button,input,select,textarea{font-weight:400}.topbar h1,.panel-head h2,.panel-head h3,.metric-card strong,.qc-dashboard-kpis b,.nav-group-title{font-weight:650}.table-wrap th{font-weight:600}.table-wrap td b,.business-table td b,.qc-line-table td b{font-weight:550}.table-wrap th,.table-wrap td{vertical-align:top}.table-wrap td{line-height:1.45}.table-wrap th:first-child,.table-wrap td:first-child{position:sticky;left:0;z-index:2;background:inherit}.table-wrap thead th:first-child{z-index:4;background:#f6f8fb}.table-wrap th:last-child,.table-wrap td:last-child{position:sticky;right:0;z-index:2}.table-wrap thead th:last-child{z-index:4;background:#f6f8fb!important}.table-wrap tbody td:last-child{background:#fff!important;box-shadow:-8px 0 12px -12px rgba(25,44,74,.35)}.table-wrap tbody tr:hover td:last-child{background:#fbfcff!important}.table-wrap tbody tr.recycled-row td:last-child{background:#fff8f8!important}
.qc-context-card{display:grid;grid-template-columns:150px minmax(0,1fr);gap:16px;margin-bottom:16px;padding:14px;border:1px solid #d8e4df;border-radius:13px;background:#f7fbf9}.qc-context-card.needs-review{border-color:#efbf72;background:#fff9ed}.qc-context-card>div:first-child{display:grid;place-items:center;min-height:130px;border:1px solid #e0e6ee;border-radius:10px;background:#fff}.qc-context-card>div:first-child>img{max-width:100%;height:130px;object-fit:contain}.qc-context-card dl{display:grid;grid-template-columns:82px minmax(0,1fr);gap:9px 12px;margin:0;align-content:center}.qc-context-card dt{color:var(--muted)}.qc-context-card dd{margin:0;min-width:0}.qc-context-card dd .silver-thumb{vertical-align:middle;margin-right:8px}.qc-image-placeholder{color:var(--muted);font-size:12px}.qc-photo-draft{position:relative;margin:0;padding:8px;border:1px solid var(--line);border-radius:10px;background:#fff}.qc-photo-draft img{display:block;width:100%;height:120px;object-fit:contain;background:#f4f6f9}.qc-photo-draft figcaption{padding-top:6px;color:var(--muted);font-size:10px}.qc-photo-draft button{position:absolute;right:4px;top:4px;width:25px;height:25px;border:0;border-radius:50%;background:#172337;color:#fff}.notification-actions{flex-wrap:wrap}.auto-pagination.top{display:none!important}
.quality-role-strip{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:-4px 0 16px}.quality-role-strip button{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 13px;border:1px solid #dde5ef;border-radius:10px;background:#fff;color:#526178}.quality-role-strip b{font-size:17px;color:#18283f;font-weight:650}
@media(max-width:900px){.qc-context-card{grid-template-columns:1fr}.qc-context-card>div:first-child{min-height:100px}.qc-context-card dl{grid-template-columns:72px 1fr}}
