/* =========================================================
   Auth 登录 / 注册
   ========================================================= */
.auth-body { min-height: 100vh; background: #0e161b; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; position: relative; z-index: 1; }
.auth-visual {
  position: relative;
  padding: 36px 46px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(80% 60% at 20% 10%, rgba(201,138,75,.28), transparent 60%),
    radial-gradient(70% 60% at 92% 86%, rgba(61,130,150,.18), transparent 60%),
    linear-gradient(145deg, #15222a 0%, #0c1419 100%);
  color: #eef1f2;
}
.auth-visual::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,.03) 0 1px, transparent 1px 10px);
  opacity: .7; pointer-events: none;
}
.auth-visual::after {
  content: "";
  position: absolute;
  width: 520px; height: 520px;
  left: -180px; bottom: -240px;
  border: 1px solid rgba(227,178,122,.16);
  border-radius: 50%;
  box-shadow: 0 0 0 60px rgba(227,178,122,.04), 0 0 0 130px rgba(227,178,122,.025);
}
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.auth-brand .brand-logo { width: 44px; height: 44px; font-size: 23px; }
.auth-brand strong { display: block; font-size: 17px; letter-spacing: .1em; color: #f8f4ed; }
.auth-brand em { font-style: normal; font-size: 9px; letter-spacing: .28em; color: rgba(227,178,122,.7); }
.auth-copy { position: relative; z-index: 2; margin-top: auto; padding-top: 40px; max-width: 520px; }
.auth-copy h1 { font-size: clamp(34px, 3.4vw, 52px); line-height: 1.22; letter-spacing: -.02em; margin: 16px 0 16px; font-weight: 700; }
.auth-copy h1 span { color: var(--kraft-2); position: relative; }
.auth-copy h1 span::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 8px;
  background: rgba(227,178,122,.18); border-radius: 3px; z-index: -1;
}
.auth-copy p { font-size: 13.5px; line-height: 1.85; color: rgba(236,240,242,.62); max-width: 460px; }
.auth-metrics { display: flex; gap: 38px; margin-top: 30px; }
.auth-metrics div { display: flex; flex-direction: column; }
.auth-metrics b { font-family: var(--font-num); font-size: 28px; font-weight: 600; color: #f5e5d1; letter-spacing: -.02em; }
.auth-metrics span { font-size: 10px; letter-spacing: .14em; color: rgba(236,240,242,.4); margin-top: 3px; }
.auth-art { margin-top: auto; position: relative; z-index: 1; padding-top: 12px; }
.auth-art.small { opacity: .8; }
.art-svg { width: 100%; max-width: 620px; height: auto; display: block; }
.auth-foot { position: relative; z-index: 2; font-size: 10.5px; color: rgba(236,240,242,.3); letter-spacing: .04em; margin-top: 12px; }
.auth-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  background:
    radial-gradient(60% 50% at 100% 0%, rgba(201,138,75,.1), transparent 60%),
    var(--paper);
  position: relative;
}
.auth-panel::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.03'/%3E%3C/svg%3E");
}
.auth-card {
  width: min(410px, 100%);
  background: rgba(255,253,250,.9);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(40,30,18,.13), 0 2px 8px rgba(40,30,18,.05);
  padding: 34px 34px 26px;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(6px);
}
.auth-card-head h2 { font-size: 23px; letter-spacing: -.02em; margin: 10px 0 6px; }
.auth-card-head p { font-size: 12px; color: var(--muted); }
.auth-form { margin-top: 22px; }
.auth-form .field-label { margin-top: 14px; }
.auth-form .field-label:first-of-type { margin-top: 0; }
.auth-row { display: flex; align-items: center; justify-content: space-between; margin: 15px 0 20px; gap: 10px; }
.muted-link { font-size: 10.5px; color: var(--muted); }
.auth-switch { text-align: center; font-size: 12px; color: var(--muted); margin-top: 20px; }
.auth-switch a { color: var(--kraft); font-weight: 600; margin-left: 3px; border-bottom: 1px solid rgba(201,138,75,.35); }
.auth-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; font-size: 10px; color: var(--muted); }
.auth-secure .icon { color: var(--teal); }
.auth-copy .auth-points { margin-top: 26px; display: flex; flex-direction: column; gap: 11px; }
.auth-points li { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: rgba(236,240,242,.72); }
.auth-points .icon { color: var(--kraft-2); font-size: 15px; }
.auth-form.compact .form-grid { gap: 12px; }
.auth-form.compact .terms { margin: 16px 0; }
@media (max-width: 1024px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { min-height: 100vh; background: #f3efe8; }
}

/* =========================================================
   驾驶舱
   ========================================================= */
.dash-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin-bottom: 20px;
}
.dash-hero h1 { font-size: clamp(26px, 2.5vw, 36px); letter-spacing: -.02em; margin-top: 6px; }
.dash-hero h1 small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 10px; letter-spacing: 0; }
.dash-hero .hero-meta { display: flex; gap: 18px; align-items: center; }
.hero-meta .hm { display: flex; flex-direction: column; gap: 2px; }
.hero-meta .hm span { font-size: 10px; color: var(--muted); letter-spacing: .06em; }
.hero-meta .hm b { font-family: var(--font-num); font-size: 15px; }
.dash-hero-art { height: 44px; display: flex; align-items: flex-end; gap: 4px; opacity: .8; }
.dash-hero-art i { width: 5px; background: linear-gradient(180deg, var(--kraft-2), var(--kraft)); border-radius: 3px 3px 0 0; opacity: .65; }
.chart-box { position: relative; width: 100%; }
.chart-box svg { display: block; width: 100%; overflow: visible; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 10.5px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; }
.chart-tip {
  position: fixed; z-index: 1300; pointer-events: none;
  background: var(--ink); color: #fff; font-size: 11px;
  padding: 6px 9px; border-radius: 6px; box-shadow: var(--shadow-md);
  opacity: 0; transform: translate(-50%, -120%); transition: opacity .12s;
  white-space: nowrap;
}
.chart-tip.show { opacity: 1; }
.machine-load-list { display: flex; flex-direction: column; gap: 11px; }
.ml-row { display: grid; grid-template-columns: 104px 1fr 42px; gap: 10px; align-items: center; font-size: 11.5px; }
.ml-row .ml-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-soft); }
.ml-row .ml-name small { display: block; font-size: 9.5px; color: var(--muted); }
.ml-row b { font-family: var(--font-num); text-align: right; font-weight: 600; }
.activity-list { display: flex; flex-direction: column; }
.activity-item { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.activity-item:last-child { border-bottom: 0; }
.activity-dot { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); color: var(--kraft); display: grid; place-items: center; flex: none; font-size: 13px; }
.activity-main { min-width: 0; }
.activity-main p { font-size: 11.5px; color: var(--ink-soft); line-height: 1.5; }
.activity-main p b { color: var(--ink); font-weight: 600; }
.activity-main time { font-size: 10px; color: var(--muted); font-family: var(--font-num); }
.urgent-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.urgent-item:last-child { border: 0; padding-bottom: 0; }
.urgent-rank { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-family: var(--font-num); font-size: 10.5px; background: var(--signal-soft); color: var(--danger); font-weight: 600; }
.urgent-info { flex: 1; min-width: 0; }
.urgent-info b { font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urgent-info span { font-size: 10.5px; color: var(--muted); }

/* =========================================================
   待拼版订单池
   ========================================================= */
.pool-layout { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 16px; }
.pool-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pool-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.pool-stat { padding: 11px 13px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.pool-stat span { font-size: 10.5px; color: var(--muted); }
.pool-stat b { font-family: var(--font-num); font-size: 19px; display: block; margin-top: 2px; font-weight: 600; }
.order-pool { display: flex; flex-direction: column; gap: 10px; }
.pool-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.pool-card:hover { border-color: rgba(201,138,75,.4); box-shadow: var(--shadow-sm); }
.pool-card.selected { border-color: var(--kraft); box-shadow: 0 0 0 3px rgba(201,138,75,.12); background: #fffdf8; }
.pool-check { width: 18px; height: 18px; accent-color: var(--kraft); }
.pool-main { min-width: 0; }
.pool-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pool-title b { font-size: 13px; font-weight: 650; }
.pool-title .code { font-family: var(--font-num); font-size: 10.5px; color: var(--muted); }
.pool-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 10.8px; color: var(--muted); }
.pool-meta b { color: var(--ink-soft); font-weight: 600; }
.pool-dim { font-family: var(--font-num); }
.pool-right { text-align: right; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.pool-qty { font-family: var(--font-num); font-size: 18px; font-weight: 600; }
.pool-qty small { font-size: 9.5px; color: var(--muted); font-family: var(--font); margin-left: 2px; }
.pool-due { font-size: 10.5px; color: var(--muted); }
.pool-due.over { color: var(--danger); }
.combo-summary { display: flex; justify-content: space-between; align-items: center; padding: 13px 15px; background: linear-gradient(135deg, #1a262e, #111a20); border-radius: 12px; color: #eef1f2; margin-top: 12px; }
.combo-summary .cs-label { font-size: 10px; letter-spacing: .1em; color: rgba(255,255,255,.45); }
.combo-summary .cs-val { font-family: var(--font-num); font-size: 20px; font-weight: 600; margin-top: 2px; }
.combo-summary .cs-val small { font-size: 10px; color: rgba(255,255,255,.5); font-family: var(--font); }
.pool-side .side-card + .side-card { margin-top: 14px; }

/* 拼版预览 */
.preview-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; }
.plan-list { display: flex; flex-direction: column; gap: 7px; max-height: 660px; overflow-y: auto; padding: 4px; }
.plan-item { padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: all .18s; }
.plan-item:hover { border-color: rgba(201,138,75,.4); }
.plan-item.active { background: #1a252d; border-color: #1a252d; color: #fff; }
.plan-item .pi-top { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.plan-item .pi-no { font-family: var(--font-num); font-size: 11px; letter-spacing: .02em; }
.plan-item .pi-name { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.plan-item.active .pi-name { color: rgba(255,255,255,.5); }
.plan-item .pi-meta { display: flex; gap: 10px; margin-top: 6px; font-family: var(--font-num); font-size: 10px; color: var(--muted); }
.plan-item.active .pi-meta { color: rgba(255,255,255,.55); }
.sheet-stage {
  background:
    linear-gradient(135deg, rgba(255,255,255,.04), transparent),
    radial-gradient(60% 70% at 50% 0%, rgba(201,138,75,.08), transparent),
    #141f26;
  border-radius: 14px;
  padding: 22px;
  position: relative;
  min-height: 430px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.sheet-stage::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 28px 28px;
}
.sheet-paper {
  position: relative;
  width: min(760px, 96%);
  aspect-ratio: 2 / 1;
  background: linear-gradient(145deg, #f4e6ce, #e8d2ae);
  border-radius: 3px;
  box-shadow: 0 30px 70px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.15), inset 0 0 60px rgba(160,110,50,.16);
  padding: 2.2%;
}
.sheet-paper::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(120,80,35,.035) 0 1px, transparent 1px 7px);
  pointer-events: none;
}
.sheet-grid { position: absolute; inset: 2.2%; display: grid; gap: 4px; }
.sheet-piece {
  border-radius: 2px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-num);
  font-size: 9px;
  color: rgba(60, 35, 10, .7);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(90,55,20,.2);
  transition: filter .18s, transform .18s;
}
.sheet-piece:hover { filter: brightness(1.08); z-index: 2; }
.sheet-piece::before {
  content: ""; position: absolute; inset: 12% 8%;
  border: 1px dashed rgba(90,55,20,.26);
  border-radius: 1px;
}
.sheet-piece .sp-label { position: relative; z-index: 1; opacity: .8; font-size: 8px; text-align: center; line-height: 1.2; }
.sheet-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.sheet-legend-item { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: rgba(255,255,255,.62); }
.sheet-legend-item i { width: 10px; height: 10px; border-radius: 2px; }
.preview-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.preview-kpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
.preview-kpi span { font-size: 10.5px; color: var(--muted); }
.preview-kpi b { font-family: var(--font-num); font-size: 18px; display: block; margin-top: 2px; }
.preview-kpi b small { font-size: 10px; color: var(--muted); font-family: var(--font); margin-left: 2px; }
.sheet-info { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 8px; margin-bottom: 14px; font-size: 11px; color: rgba(255,255,255,.6); }
.sheet-info b { color: #f0e2cc; font-family: var(--font-num); font-size: 12px; }
.sheet-info .si-right { text-align: right; }

/* 甘特图 */
.gantt-wrap { overflow-x: auto; }
.gantt { min-width: 900px; }
.gantt-head { display: grid; grid-template-columns: 170px repeat(4, 1fr); border-bottom: 1px solid var(--line); background: rgba(250,247,241,.7); }
.gantt-head > div { padding: 10px 12px; font-size: 10.5px; color: var(--muted); letter-spacing: .04em; border-left: 1px solid var(--line); }
.gantt-head > div:first-child { border-left: 0; }
.gantt-head b { font-size: 11.5px; color: var(--ink); display: block; }
.gantt-row { display: grid; grid-template-columns: 170px 1fr; border-bottom: 1px solid var(--line); }
.gantt-machine { padding: 11px 13px; border-right: 1px solid var(--line); background: #fff; position: relative; }
.gantt-machine b { display: block; font-size: 12px; font-weight: 600; }
.gantt-machine span { font-size: 10px; color: var(--muted); font-family: var(--font-num); }
.gantt-machine .gm-load { margin-top: 5px; }
.gantt-track { position: relative; min-height: 62px; background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 25% 100%; }
.gantt-bar {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  height: 28px;
  border-radius: 5px;
  background: linear-gradient(135deg, #e0b07a, #c98a4b);
  color: #3a2209;
  font-size: 9.5px;
  padding: 0 7px;
  display: flex; align-items: center;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(120,80,30,.2);
  cursor: pointer;
  border: 1px solid rgba(120,75,25,.2);
  transition: filter .16s;
}
.gantt-bar:hover { filter: brightness(1.06); z-index: 3; }
.gantt-bar b { font-family: var(--font-num); font-weight: 600; }
.gantt-bar.status-执行中 { background: linear-gradient(135deg, #f0c58f, #dda05a); }
.gantt-bar.status-已完成 { background: linear-gradient(135deg, #b9d9c8, #8dbfa4); color: #1d4d36; }
.gantt-bar.status-待下发 { background: repeating-linear-gradient(135deg, #efe4d3 0 6px, #e6d6bf 6px 12px); color: #7a5e36; border-style: dashed; }
.gantt-bar.status-已下发 { background: linear-gradient(135deg, #cfdde8, #a9c1d3); color: #284b63; }
.gantt-now { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--signal); opacity: .5; }
.gantt-shift-labels { display: grid; grid-template-columns: 170px repeat(2, 1fr); background: rgba(18,26,32,.03); border-bottom: 1px solid var(--line); }
.gantt-shift-labels div { padding: 5px 12px; font-size: 9.5px; color: var(--muted); font-family: var(--font-num); }
.gantt-legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 10px 16px; font-size: 10.5px; color: var(--muted); }
.gantt-legend span { display: inline-flex; align-items: center; gap: 5px; }
.gantt-legend i { width: 9px; height: 9px; border-radius: 2px; }

/* 时间轴 */
.timeline-wrap { position: relative; padding: 10px 0 10px 8px; }
.timeline-axis { display: grid; grid-template-columns: 92px repeat(4, 1fr); border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 6px; }
.timeline-axis div { font-size: 10.5px; color: var(--muted); padding-left: 10px; }
.timeline-axis b { display: block; font-size: 12px; color: var(--ink); }
.timeline-row { display: grid; grid-template-columns: 92px repeat(4, 1fr); min-height: 64px; border-bottom: 1px dashed var(--line); }
.timeline-date { padding: 12px 10px; font-size: 10.5px; color: var(--muted); }
.timeline-date b { display: block; font-family: var(--font-num); color: var(--ink); font-size: 13px; }
.timeline-cell { border-left: 1px dashed var(--line); padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.timeline-event { padding: 7px 9px; border-radius: 7px; font-size: 10.5px; border-left: 3px solid var(--kraft); background: var(--surface-2); cursor: pointer; transition: transform .15s; }
.timeline-event:hover { transform: translateX(2px); }
.timeline-event b { display: block; font-size: 10.5px; color: var(--ink); }
.timeline-event span { font-size: 9.5px; color: var(--muted); }
.timeline-event.tone-danger { border-left-color: var(--danger); background: var(--danger-soft); }
.timeline-event.tone-warn { border-left-color: var(--warn); background: var(--warn-soft); }
.timeline-event.tone-ok { border-left-color: var(--ok); background: var(--ok-soft); }
.impact-list { display: flex; flex-direction: column; gap: 8px; }
.impact-item { display: flex; gap: 10px; padding: 10px; border-radius: 9px; border: 1px solid var(--line); background: #fff; }
.impact-item .ii-bar { width: 3px; border-radius: 3px; background: var(--signal); }
.impact-item b { font-size: 11.5px; display: block; }
.impact-item span { font-size: 10px; color: var(--muted); }

/* 看板 */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 13px; align-items: start; }
.kanban-col { background: rgba(255,255,255,.45); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.kanban-col-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; }
.kanban-col-head b { font-size: 12px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.kanban-col-head .count { font-family: var(--font-num); font-size: 10px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 0 6px; }
.kanban-cards { display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.work-card { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 11px; box-shadow: 0 1px 2px rgba(18,26,32,.03); cursor: pointer; transition: border-color .18s, transform .18s, box-shadow .18s; }
.work-card:hover { border-color: rgba(201,138,75,.4); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.work-card .wc-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.work-card .wc-no { font-family: var(--font-num); font-size: 10.5px; color: var(--muted); }
.work-card h1, .work-card h4 { font-size: 12px; font-weight: 650; margin: 5px 0 7px; }
.work-card .wc-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; font-size: 10px; color: var(--muted); }
.work-card .wc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--line); font-size: 10px; color: var(--muted); }
.kanban-empty { padding: 20px 10px; text-align: center; font-size: 10.5px; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; }

/* 客户 / 数据列表 */
.customer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.customer-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 15px; transition: all .2s; position: relative; overflow: hidden; }
.customer-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: rgba(201,138,75,.3); }
.customer-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--kraft-2); opacity: .7; }
.customer-card.level-A::before { background: var(--violet); }
.customer-card.level-C::before { background: #b9c0c4; }
.cc-head { display: flex; justify-content: space-between; gap: 10px; }
.cc-name { font-size: 13px; font-weight: 650; line-height: 1.4; }
.cc-code { font-family: var(--font-num); font-size: 10px; color: var(--muted); margin-top: 3px; }
.cc-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 10px; font-size: 10.5px; color: var(--muted); }
.cc-credit { margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--line); }
.cc-credit-head { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-bottom: 5px; }
.cc-credit-head b { font-family: var(--font-num); color: var(--ink); font-weight: 600; }
.cc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 10.5px; color: var(--muted); }

/* 报表 */
.report-hero { display: flex; align-items: center; gap: 26px; padding: 18px 20px; background: linear-gradient(125deg, #17232b, #0f181d); border-radius: 14px; color: #eef1f2; margin-bottom: 16px; overflow: hidden; position: relative; }
.report-hero::after { content: ""; position: absolute; right: -30px; top: -50px; width: 220px; height: 220px; border: 1px solid rgba(227,178,122,.2); border-radius: 50%; box-shadow: 0 0 0 40px rgba(227,178,122,.04); }
.report-hero .rh-main { flex: 1; }
.report-hero h2 { font-size: 19px; margin-bottom: 5px; }
.report-hero p { font-size: 11.5px; color: rgba(255,255,255,.5); }
.report-hero .rh-kpis { display: flex; gap: 26px; position: relative; z-index: 1; }
.report-hero .rh-kpi span { font-size: 9.5px; color: rgba(255,255,255,.42); letter-spacing: .08em; display: block; }
.report-hero .rh-kpi b { font-family: var(--font-num); font-size: 22px; color: #f1dfc8; }
.report-hero .rh-kpi b small { font-size: 10px; font-family: var(--font); color: rgba(255,255,255,.45); }
.dist-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: rgba(18,26,32,.06); }
.dist-bar i { height: 100%; }
.dist-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 9px; font-size: 10.5px; color: var(--muted); }
.dist-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dist-legend i { width: 7px; height: 7px; border-radius: 2px; }
.rank-list { display: flex; flex-direction: column; gap: 9px; }
.rank-row { display: grid; grid-template-columns: 20px 1fr auto; gap: 9px; align-items: center; }
.rank-row .rank-no { font-family: var(--font-num); font-size: 10px; color: var(--muted); }
.rank-row .rank-name { font-size: 11.5px; }
.rank-row .rank-bar { height: 5px; background: rgba(18,26,32,.06); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.rank-row .rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--kraft), var(--kraft-2)); border-radius: inherit; }
.rank-row b { font-family: var(--font-num); font-size: 11.5px; }
.heat-grid { display: flex; gap: 4px; }
.heat-cell { flex: 1; height: 30px; border-radius: 3px; }
.report-table th { font-size: 10px; }
.report-kpi-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.report-kpi { padding: 13px 15px; border-radius: 11px; background: #fff; border: 1px solid var(--line); }
.report-kpi span { font-size: 10.5px; color: var(--muted); }
.report-kpi b { font-family: var(--font-num); font-size: 21px; display: block; margin-top: 3px; font-weight: 600; }
.report-kpi b small { font-size: 10px; font-family: var(--font); color: var(--muted); }

/* 审批 */
.approval-list { display: flex; flex-direction: column; gap: 10px; }
.approval-item { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; transition: all .18s; }
.approval-item:hover { border-color: rgba(201,138,75,.4); box-shadow: var(--shadow-sm); }
.approval-type { width: 42px; height: 42px; border-radius: 11px; background: var(--kraft-3); color: #8a5722; display: grid; place-items: center; font-size: 18px; flex: none; }
.approval-main { flex: 1; min-width: 0; }
.approval-main b { font-size: 12.5px; display: block; }
.approval-main .am-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.approval-amount { font-family: var(--font-num); font-size: 15px; text-align: right; }
.approval-amount span { display: block; font-family: var(--font); font-size: 9.5px; color: var(--muted); }
.approval-actions { display: flex; gap: 6px; }
.approval-flow { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); flex-wrap: wrap; }
.flow-step { display: inline-flex; align-items: center; gap: 4px; }
.flow-step i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.flow-step.done i { background: var(--ok); }
.flow-step.current i { background: var(--kraft); box-shadow: 0 0 0 3px rgba(201,138,75,.15); }
.flow-line { width: 14px; height: 1px; background: var(--line-strong); }

/* 用户/角色 */
.role-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.role-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); font-size: 10.5px; }
.role-chip b { font-family: var(--font-num); color: var(--kraft); }
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.perm-group { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.perm-group > b { font-size: 11.5px; display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.perm-item { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--ink-soft); padding: 3px 0; }
.perm-item input { accent-color: var(--kraft); }
.perm-all { margin-bottom: 8px; font-size: 10.5px; color: var(--kraft); }
.role-card { border: 1px solid var(--line); border-radius: 11px; padding: 14px; background: #fff; }
.role-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.role-card-head b { font-size: 13px; }
.role-card-head span { font-family: var(--font-num); font-size: 9.5px; color: var(--muted); }
.role-card p { font-size: 10.5px; color: var(--muted); margin-top: 5px; }
.role-card .rc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 10px; color: var(--muted); }

/* 日志 / 备份 */
.log-list { display: flex; flex-direction: column; }
.log-row { display: grid; grid-template-columns: 120px 90px 1fr auto; gap: 12px; padding: 10px 4px; border-bottom: 1px dashed var(--line); align-items: center; font-size: 11px; }
.log-row time { font-family: var(--font-num); color: var(--muted); font-size: 10.5px; }
.log-row .lr-user { display: flex; align-items: center; gap: 6px; }
.log-row .lr-main b { font-weight: 600; color: var(--ink); }
.log-row .lr-main span { color: var(--muted); }
.log-row .lr-ip { font-family: var(--font-num); color: var(--muted); font-size: 10px; }
.backup-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.backup-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; color: var(--kraft); }
.backup-main { flex: 1; min-width: 0; }
.backup-main b { font-size: 11.5px; font-family: var(--font-num); display: block; }
.backup-main span { font-size: 10px; color: var(--muted); }

/* 规则配置 */
.rule-group { margin-bottom: 16px; }
.rule-group-head { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .12em; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; }
.rule-group-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.rule-row { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.rule-row:last-child { border: 0; }
.rule-name { flex: 1; }
.rule-name b { font-size: 12px; display: block; }
.rule-name span { font-size: 10px; color: var(--muted); }
.rule-val { font-family: var(--font-num); font-size: 13px; font-weight: 600; min-width: 70px; text-align: right; }
.rule-val small { font-family: var(--font); font-size: 9.5px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.algo-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; }
.algo-param { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.algo-param:last-child { border: 0; }
.algo-param .ap-label { font-size: 12px; }
.algo-param .ap-label span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.algo-param input { width: 110px; text-align: right; font-family: var(--font-num); }
.sim-result { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.sim-result div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.sim-result span { font-size: 10px; color: var(--muted); }
.sim-result b { font-family: var(--font-num); font-size: 18px; display: block; margin-top: 2px; }

/* 库存 */
.stock-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stock-card { padding: 14px 15px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.stock-card span { font-size: 10.5px; color: var(--muted); }
.stock-card b { font-family: var(--font-num); font-size: 20px; display: block; margin-top: 3px; }
.stock-card small { font-size: 10px; color: var(--muted); font-family: var(--font); }
.gauge-wrap { display: flex; align-items: center; gap: 16px; }
.gauge-ring { position: relative; width: 92px; height: 92px; }
.gauge-ring svg { transform: rotate(-90deg); }
.gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge-center b { font-family: var(--font-num); font-size: 19px; line-height: 1; }
.gauge-center span { font-size: 9px; color: var(--muted); margin-top: 3px; }

/* 详情 */
.detail-title { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 16px; }
.detail-title .dt-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--kraft-3); color: #8a5722; display: grid; place-items: center; font-size: 21px; flex: none; }
.detail-title h2 { font-size: 18px; letter-spacing: -.01em; }
.detail-title p { font-size: 11px; color: var(--muted); margin-top: 3px; font-family: var(--font-num); }
.detail-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.detail-kv > div { background: #fff; padding: 10px 12px; }
.detail-kv.full > div { grid-column: span 2; }
.detail-kv span { font-size: 10px; color: var(--muted); display: block; }
.detail-kv b { font-size: 12px; font-weight: 500; display: block; margin-top: 3px; word-break: break-all; }
.detail-kv b .badge { display: inline-flex !important; width: fit-content !important; max-width: 100%; }
.detail-section-title { font-size: 11px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
.detail-section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.mini-table { width: 100%; font-size: 10.5px; }
.mini-table th { text-align: left; padding: 6px 8px; background: var(--surface-2); color: var(--muted); font-weight: 500; white-space: nowrap; }
.mini-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.sync-row { display: flex; gap: 6px; flex-wrap: wrap; }
.sync-btn { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line); background: #fff; font-size: 10.5px; color: var(--ink-soft); }
.sync-btn:hover { border-color: var(--line-strong); background: var(--surface-2); }
.sync-btn.feishu .icon { color: #3370ff; }
.sync-btn.dingtalk .icon { color: #0089ff; }
.sync-btn.wecom .icon { color: #07c160; }

/* 其他 */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-strip .strip-item { padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; gap: 11px; }
.strip-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; color: var(--kraft); }
.strip-main span { font-size: 10px; color: var(--muted); display: block; }
.strip-main b { font-family: var(--font-num); font-size: 16px; }

@media (max-width: 1400px) {
  .pool-layout, .preview-layout, .algo-layout { grid-template-columns: 1fr; }
  .customer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .customer-grid, .kanban, .stat-strip, .report-kpi-strip, .stock-summary, .preview-kpis, .pool-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-hero { flex-direction: column; align-items: flex-start; }
  .perm-grid { grid-template-columns: 1fr; }
  .timeline-axis, .timeline-row { grid-template-columns: 60px repeat(4, minmax(150px, 1fr)); }
  .timeline-wrap { overflow-x: auto; }
}
