/* ==========================================================================
   EDOMP · 业务专用样式（KPI / 图表 / 看板 / 移动端 / 门户）
   ========================================================================== */

/* ---------- 页面标题区 ---------- */
.page-head {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.page-head__main { flex: 1 1 auto; min-width: 0; }
.page-head__title { font-size: 19px; font-weight: 700; letter-spacing: -.3px; display: flex; align-items: center; gap: 9px; }
.page-head__desc { font-size: 12.5px; color: var(--c-text-3); margin-top: 3px; }
.page-head__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- KPI 卡片 ---------- */
.kpi {
  background-image: var(--grad-surface),
    linear-gradient(90deg, var(--c-primary-500) 0%, var(--c-primary-400) 45%, var(--c-accent) 100%);
  background-size: 100% 100%, 100% 3px;
  background-position: 0 0, 0 0;
  background-repeat: no-repeat;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: 17px 18px;
  position: relative; overflow: hidden;
  box-shadow: var(--sh-2);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.kpi:hover { box-shadow: var(--sh-3); transform: translateY(-2px); border-color: #cfe3ef; }
.kpi--clickable { cursor: pointer; }
.kpi--clickable:hover { box-shadow: var(--sh-glow); transform: translateY(-3px); border-color: var(--c-primary-400); }
.kpi--clickable:active { transform: translateY(-1px); }
.kpi--clickable::before {
  content: "查看详情 ›"; position: absolute; right: 14px; bottom: 13px; z-index: 3;
  font-size: 11px; color: var(--c-primary-700); opacity: 0; transition: opacity var(--transition);
}
.kpi--clickable:hover::before { opacity: 1; }

/* ==========================================================================
   运维驾驶舱大屏（NOC）
   ========================================================================== */
.noc {
  position: fixed; inset: 0; z-index: 400;
  background:
    radial-gradient(1200px 700px at 50% -12%, rgba(8, 145, 178, .22), transparent 62%),
    radial-gradient(900px 520px at 8% 100%, rgba(99, 102, 241, .16), transparent 60%),
    linear-gradient(180deg, #04101f 0%, #06192c 55%, #030b16 100%);
  color: #cfe6f7; overflow: auto; padding-bottom: 34px;
  animation: noc-in 320ms ease;
}
@keyframes noc-in { from { opacity: 0; transform: scale(.995); } to { opacity: 1; transform: none; } }
.noc::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(34, 211, 238, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, .055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 35%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 35%, #000 30%, transparent 100%);
}

/* ---------- 顶栏 ---------- */
.noc__top {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 18px;
  padding: 16px 24px 14px;
  border-bottom: 1px solid rgba(34, 211, 238, .18);
  background: linear-gradient(180deg, rgba(8, 32, 52, .78), rgba(8, 32, 52, .18));
}
.noc__logo { display: flex; align-items: center; gap: 11px; }
.noc__logo-badge {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, #06b6d4, #6366f1);
  box-shadow: 0 0 18px rgba(34, 211, 238, .55);
  color: #fff;
}
.noc__logo-badge svg { width: 20px; height: 20px; }
.noc__title { font-size: 21px; font-weight: 700; letter-spacing: 3px; color: #fff; }
.noc__sub { font-size: 11.5px; color: #6f93b4; letter-spacing: 1.4px; margin-top: 2px; }
.noc__spacer { flex: 1 1 auto; }
.noc__pills { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.noc__pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px; border-radius: 999px;
  background: rgba(34, 211, 238, .08); border: 1px solid rgba(34, 211, 238, .24);
  font-size: 12px; color: #a9d5ea;
}
.noc__pill b { color: #67e8f9; font-variant-numeric: tabular-nums; }
.noc__dot { width: 7px; height: 7px; border-radius: 50%; background: #22d3ee; box-shadow: 0 0 8px #22d3ee; animation: noc-pulse 1.8s infinite; }
.noc__dot--warn { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.noc__dot--danger { background: #f43f5e; box-shadow: 0 0 8px #f43f5e; }
@keyframes noc-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
.noc__clock { text-align: right; line-height: 1.25; }
.noc__clock-time { font-family: var(--font-mono); font-size: 25px; font-weight: 700; color: #fff; letter-spacing: 1.5px; font-variant-numeric: tabular-nums; }
.noc__clock-date { font-size: 11.5px; color: #6f93b4; letter-spacing: .8px; }
.noc__exit {
  height: 32px; padding: 0 15px; border-radius: 9px; cursor: pointer;
  background: rgba(34, 211, 238, .12); border: 1px solid rgba(34, 211, 238, .34);
  color: #a9e8fb; font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all var(--transition);
}
.noc__exit:hover { background: rgba(34, 211, 238, .24); color: #fff; border-color: #22d3ee; }

/* ---------- 主体栅格 ---------- */
.noc__grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 1.55fr 1fr; gap: 14px;
  padding: 14px 20px 0; align-items: start;
}
.noc__col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.noc__panel {
  position: relative; border-radius: 16px; padding: 13px 15px 15px;
  background: linear-gradient(180deg, rgba(13, 40, 65, .72), rgba(7, 24, 41, .58));
  border: 1px solid rgba(34, 211, 238, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 10px 30px rgba(0, 0, 0, .35);
  backdrop-filter: blur(6px);
}
.noc__panel--glow { border-color: rgba(34, 211, 238, .38); box-shadow: 0 0 26px rgba(8, 145, 178, .2), 0 10px 30px rgba(0, 0, 0, .35); }
/* 四角科技装饰角标 */
.noc__panel::before, .noc__panel::after {
  content: ""; position: absolute; width: 16px; height: 16px; pointer-events: none;
  border-color: #22d3ee; opacity: .8;
}
.noc__panel::before { left: -1px; top: -1px; border-left: 2px solid; border-top: 2px solid; border-top-left-radius: 16px; }
.noc__panel::after { right: -1px; bottom: -1px; border-right: 2px solid; border-bottom: 2px solid; border-bottom-right-radius: 16px; }
.noc__ph { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.noc__ph::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, #22d3ee, #6366f1); }
.noc__ph-t { font-size: 14px; font-weight: 700; color: #e2f4ff; letter-spacing: .6px; }
.noc__ph-x { margin-left: auto; font-size: 11.5px; color: #6f93b4; }

/* ---------- KPI 数字 ---------- */
.noc__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.noc__kpi {
  position: relative; overflow: hidden; text-align: center;
  padding: 13px 6px 12px; border-radius: 13px;
  background: linear-gradient(180deg, rgba(34, 211, 238, .10), rgba(34, 211, 238, .02));
  border: 1px solid rgba(34, 211, 238, .16);
}
.noc__kpi-v {
  font-family: var(--font-mono); font-size: 27px; font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.noc__kpi-l { font-size: 11.5px; color: #7ea6c4; margin-top: 5px; }
.noc__kpi--ok .noc__kpi-v { color: #34d399; }
.noc__kpi--info .noc__kpi-v { color: #38bdf8; }
.noc__kpi--warn .noc__kpi-v { color: #fbbf24; }
.noc__kpi--danger .noc__kpi-v { color: #fb7185; }
.noc__kpi--purple .noc__kpi-v { color: #a5b4fc; }
.noc__kpi--cyan .noc__kpi-v { color: #67e8f9; }

/* ---------- 实时告警滚动 ---------- */
.noc__feed { height: 232px; overflow: hidden; position: relative; }
.noc__feed-list { display: flex; flex-direction: column; gap: 7px; animation: noc-roll 26s linear infinite; }
.noc__feed:hover .noc__feed-list { animation-play-state: paused; }
@keyframes noc-roll { 0% { transform: translateY(0); } 100% { transform: translateY(-50%); } }
.noc__row {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px;
  background: rgba(255, 255, 255, .035); border-left: 3px solid #38bdf8;
  font-size: 12.5px; transition: background var(--transition);
}
.noc__row:hover { background: rgba(34, 211, 238, .1); }
.noc__row--1 { border-left-color: #f43f5e; }
.noc__row--2 { border-left-color: #f59e0b; }
.noc__row--3 { border-left-color: #38bdf8; }
.noc__row-t { font-weight: 600; color: #e2f4ff; }
.noc__row-m { color: #7ea6c4; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.noc__row-x { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: #5f829f; flex-shrink: 0; }

/* ---------- 拓扑光点 ---------- */
.noc__topo { position: relative; height: 420px; }
.noc__topo svg { width: 100%; height: 100%; display: block; }
.noc__link { stroke: rgba(34, 211, 238, .34); stroke-width: 1.2; fill: none; }
.noc__link--flow { stroke-dasharray: 4 7; animation: noc-dash 1.6s linear infinite; }
@keyframes noc-dash { to { stroke-dashoffset: -22; } }
.noc__node { fill: #22d3ee; }
.noc__node--off { fill: #f43f5e; }
.noc__node-halo { fill: none; stroke: #22d3ee; stroke-width: 1; opacity: .55; transform-origin: center; animation: noc-halo 2.6s ease-out infinite; }
@keyframes noc-halo { 0% { r: 5; opacity: .7; } 100% { r: 15; opacity: 0; } }
.noc__legend { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 4px; font-size: 11.5px; color: #7ea6c4; }
.noc__legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }

/* ---------- 条形排行 ---------- */
.noc__bar { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 12.5px; }
.noc__bar-n { width: 96px; color: #a9c8dd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0; }
.noc__bar-t { flex: 1 1 auto; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.noc__bar-f { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #06b6d4, #6366f1); transition: width 900ms ease; }
.noc__bar-v { width: 62px; text-align: right; font-family: var(--font-mono); color: #67e8f9; flex-shrink: 0; }

/* ---------- 合规进度 ---------- */
.noc__comp { display: flex; flex-direction: column; gap: 10px; }
.noc__comp-i { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.noc__comp-t { width: 110px; color: #a9c8dd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0; }
.noc__comp-p { flex: 1 1 auto; height: 9px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.noc__comp-f { height: 100%; border-radius: 999px; transition: width 900ms ease; }
.noc__comp-v { width: 46px; text-align: right; font-family: var(--font-mono); flex-shrink: 0; }

/* ---------- 值班 ---------- */
.noc__duty { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.noc__duty-i { text-align: center; padding: 10px 4px; border-radius: 11px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); }
.noc__duty-r { font-size: 12px; color: #7ea6c4; }
.noc__duty-n { font-size: 14px; font-weight: 700; color: #e2f4ff; margin-top: 3px; }
.noc__duty-c { font-size: 11px; color: #67e8f9; margin-top: 2px; }

/* ---------- 底部滚动 ---------- */
.noc__ticker {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 410;
  height: 32px; display: flex; align-items: center; gap: 12px;
  padding: 0 18px; overflow: hidden;
  background: linear-gradient(90deg, rgba(8, 32, 52, .95), rgba(6, 25, 44, .8));
  border-top: 1px solid rgba(34, 211, 238, .2);
  font-size: 12.5px; color: #9fc9e2;
}
.noc__ticker-l { color: #22d3ee; font-weight: 700; flex-shrink: 0; letter-spacing: 1px; }
.noc__ticker-t { white-space: nowrap; animation: noc-slide 42s linear infinite; }
@keyframes noc-slide { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

@media (max-width: 1180px) {
  .noc__grid { grid-template-columns: 1fr; }
  .noc__kpis { grid-template-columns: repeat(3, 1fr); }
}

/* 大屏内的图表配色适配（深色背景下保证可读） */
.noc .chart__legend-item,
.noc .chart__legend-item span { color: #a9c8dd !important; }
.noc .chart__legend { color: #a9c8dd; }
.noc .gauge__center b { color: #67e8f9; }
.noc .gauge__center span { color: #7ea6c4; }
.noc .chart__tooltip {
  background: rgba(6, 22, 38, .95); color: #dbeafe;
  border: 1px solid rgba(34, 211, 238, .35); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.noc .chart__tooltip div { color: #dbeafe !important; }
.kpi::after {
  content: ""; position: absolute; right: -26px; top: -26px;
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--c-primary-50); opacity: .8;
}
.kpi--success::after { background: var(--c-success-bg); }
.kpi--warning::after { background: var(--c-warning-bg); }
.kpi--danger::after { background: var(--c-danger-bg); }
.kpi--purple::after { background: var(--c-purple-bg); }
.kpi--info::after { background: var(--c-info-bg); }
.kpi__label { font-size: 12.5px; color: var(--c-text-3); display: flex; align-items: center; gap: 6px; position: relative; z-index: 1; }
.kpi__value {
  font-size: 25px; font-weight: 700; letter-spacing: -.6px;
  margin-top: 6px; position: relative; z-index: 1;
  font-variant-numeric: tabular-nums;
}
.kpi__value small { font-size: 13px; font-weight: 500; color: var(--c-text-3); margin-left: 3px; }
.kpi__foot { margin-top: 8px; font-size: 11.5px; color: var(--c-text-3); display: flex; align-items: center; gap: 6px; position: relative; z-index: 1; }
.kpi__trend { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.kpi__trend--up { color: var(--c-success); }
.kpi__trend--down { color: var(--c-danger); }
.kpi__icon {
  position: absolute; right: 14px; top: 15px;
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; z-index: 2;
  background: var(--c-primary-100); color: var(--c-primary-700);
}
.kpi__icon svg { width: 17px; height: 17px; }
.kpi--success .kpi__icon { background: var(--c-success-bg); color: #15803d; }
.kpi--warning .kpi__icon { background: var(--c-warning-bg); color: #b45309; }
.kpi--danger  .kpi__icon { background: var(--c-danger-bg); color: #b91c1c; }
.kpi--purple  .kpi__icon { background: var(--c-purple-bg); color: #6d28d9; }
.kpi--info    .kpi__icon { background: var(--c-info-bg); color: #0e7490; }

/* ---------- 图表容器 ---------- */
.chart { position: relative; }
.chart canvas { width: 100%; display: block; }
.chart__legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; justify-content: center; }
.chart__legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--c-text-2); }
.chart__legend-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.chart__tooltip {
  position: absolute; pointer-events: none;
  background: rgba(15, 23, 42, .93); color: #fff;
  padding: 7px 10px; border-radius: var(--r-sm);
  font-size: 12px; line-height: 1.7; white-space: nowrap;
  transform: translate(-50%, -120%); z-index: 10;
  box-shadow: var(--sh-4);
  transition: opacity 100ms;
}
.chart__tooltip b { font-weight: 600; }
.chart--h180 { height: 180px; }
.chart--h220 { height: 220px; }
.chart--h260 { height: 260px; }
.chart--h300 { height: 300px; }
.chart--h340 { height: 340px; }

/* ---------- 环形/进度仪表 ---------- */
.gauge { position: relative; display: grid; place-items: center; }
.gauge canvas { width: 100%; }
.gauge__center { position: absolute; text-align: center; }
.gauge__center b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.5px; }
.gauge__center span { font-size: 11.5px; color: var(--c-text-3); }

/* ---------- 车间看板 ---------- */
.kanban-board { display: grid; gap: 14px; }
.kanban-col {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); display: flex; flex-direction: column;
  min-height: 240px; overflow: hidden;
}
.kanban-col__head {
  padding: 10px 14px; border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600;
  background: var(--c-surface-2);
}
.kanban-col__count { margin-left: auto; font-size: 11.5px; color: var(--c-text-3); background: var(--c-neutral-bg); padding: 1px 8px; border-radius: var(--r-full); }
.kanban-col__body { padding: 10px; display: flex; flex-direction: column; gap: 9px; flex: 1 1 auto; overflow-y: auto; max-height: 560px; }
.kanban-card {
  border: 1px solid var(--c-border); border-radius: var(--r-md);
  padding: 10px 12px; background: #fff; cursor: pointer;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  border-left: 3px solid var(--c-primary);
}
.kanban-card:hover { box-shadow: var(--sh-3); transform: translateY(-1px); }
.kanban-card--danger { border-left-color: var(--c-danger); }
.kanban-card--warning { border-left-color: var(--c-warning); }
.kanban-card--success { border-left-color: var(--c-success); }
.kanban-card__title { font-size: 13px; font-weight: 600; margin-bottom: 5px; display: flex; align-items: center; gap: 6px; }
.kanban-card__meta { font-size: 11.5px; color: var(--c-text-3); display: flex; gap: 10px; flex-wrap: wrap; }
.kanban-card__foot { margin-top: 8px; display: flex; align-items: center; gap: 8px; }

/* ---------- 设备/工位状态灯 ---------- */
.status-lamp { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.status-lamp--on { background: var(--c-success); box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.status-lamp--run { background: var(--c-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); animation: pulse 1.8s ease infinite; }
.status-lamp--warn { background: var(--c-warning); box-shadow: 0 0 0 3px rgba(217, 119, 6, .18); }
.status-lamp--err { background: var(--c-danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .18); }
.status-lamp--off { background: #cbd5e1; }

/* ---------- 大屏看板 ---------- */
.screen-wrap {
  background: linear-gradient(160deg, #0b1222, #101c34);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  color: #dce7f7;
}
.screen-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.screen-head__title { font-size: 20px; font-weight: 700; letter-spacing: 2px; color: #fff; }
.screen-head__line { flex: 1 1 auto; height: 1px; background: linear-gradient(90deg, rgba(96, 165, 250, .6), transparent); }
.screen-kpi {
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(96, 165, 250, .18);
  border-radius: var(--r-md); padding: 12px 15px;
}
.screen-kpi__label { font-size: 12px; color: #7f95b8; }
.screen-kpi__value { font-size: 24px; font-weight: 700; color: #7dd3fc; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.screen-kpi__value small { font-size: 12px; color: #7f95b8; margin-left: 3px; }
.screen-panel {
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(96, 165, 250, .16);
  border-radius: var(--r-md); padding: 14px 16px;
}
.screen-panel__title { font-size: 13.5px; font-weight: 600; color: #cfe0f7; margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.screen-panel__title::before { content: ""; width: 3px; height: 13px; background: #38bdf8; border-radius: 2px; }

/* ---------- 移动端预览 ---------- */
.mobile-stage {
  display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap;
}
.phone {
  width: 320px; flex: 0 0 320px;
  height: 640px;
  border-radius: 34px;
  background: #0f172a;
  padding: 10px;
  box-shadow: var(--sh-5), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  position: relative;
}
.phone__screen {
  width: 100%; height: 100%;
  border-radius: 26px;
  background: #f4f6fa;
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
}
.phone__notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 20px; background: #0f172a; border-radius: 0 0 14px 14px; z-index: 5;
}
.phone__status {
  height: 34px; flex-shrink: 0; display: flex; align-items: center;
  justify-content: space-between; padding: 0 16px;
  font-size: 11.5px; font-weight: 600; color: #1e293b;
  background: linear-gradient(180deg, #e8eefb, transparent);
}
.phone__navbar {
  height: 44px; flex-shrink: 0; display: flex; align-items: center;
  padding: 0 14px; gap: 8px;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: 0 2px 10px rgba(37, 99, 235, .3);
}
.phone__navbar-back { font-size: 18px; opacity: .9; cursor: pointer; }
.phone__body { flex: 1 1 auto; overflow-y: auto; padding: 12px; }
.phone__body::-webkit-scrollbar { width: 0; }
.phone__tabbar {
  height: 54px; flex-shrink: 0; display: flex;
  background: #fff; border-top: 1px solid var(--c-border);
}
.phone__tab {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10.5px; color: var(--c-text-3); cursor: pointer;
}
.phone__tab.is-active { color: var(--c-primary); }
.phone__tab svg { width: 19px; height: 19px; }

.m-card {
  background: #fff; border-radius: 12px; padding: 12px 13px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .07);
  margin-bottom: 10px;
}
.m-card__title { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.m-card__meta { font-size: 11.5px; color: var(--c-text-3); margin-top: 5px; display: flex; gap: 10px; flex-wrap: wrap; }
.m-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.m-entry {
  background: #fff; border-radius: 12px; padding: 11px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 11px; color: var(--c-text-2); cursor: pointer;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .07);
  transition: transform var(--transition);
}
.m-entry:active { transform: scale(.96); }
.m-entry__icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--c-primary-50); color: var(--c-primary-700);
}
.m-entry__icon svg { width: 18px; height: 18px; }
.m-kpi { background: linear-gradient(135deg, #2563eb, #1e40af); border-radius: 12px; padding: 13px 15px; color: #fff; margin-bottom: 10px; }
.m-kpi__label { font-size: 11.5px; opacity: .8; }
.m-kpi__value { font-size: 22px; font-weight: 700; letter-spacing: -.5px; }

/* 扫码模拟 */
.scan-box {
  margin: 10px auto; width: 190px; height: 190px;
  border-radius: 14px; border: 2px dashed #93b4f0;
  background: repeating-linear-gradient(45deg, #eff4ff, #eff4ff 10px, #e6eeff 10px, #e6eeff 20px);
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.scan-line {
  position: absolute; left: 8px; right: 8px; height: 2px;
  background: linear-gradient(90deg, transparent, #22c55e, transparent);
  animation: scan-move 2.1s ease-in-out infinite;
  box-shadow: 0 0 12px #22c55e;
}
@keyframes scan-move { 0%, 100% { top: 14px; } 50% { top: 170px; } }

/* ---------- 工作流设计器 ---------- */
.flow-canvas {
  background: #fbfcfe;
  background-image: radial-gradient(#d7dee9 1px, transparent 1px);
  background-size: 16px 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 22px;
  min-height: 320px;
  display: flex; align-items: center; gap: 0; overflow-x: auto;
  flex-wrap: nowrap;
}
.flow-node {
  flex: 0 0 auto; min-width: 132px;
  background: #fff; border: 1.5px solid var(--c-border-strong);
  border-radius: var(--r-md); padding: 10px 12px;
  text-align: center; position: relative;
  box-shadow: var(--sh-2);
  cursor: pointer;
}
.flow-node__type { font-size: 10.5px; color: var(--c-text-3); margin-bottom: 3px; }
.flow-node__name { font-size: 13px; font-weight: 600; }
.flow-node__role { font-size: 11px; color: var(--c-text-3); margin-top: 3px; }
.flow-node--start { border-color: #86efac; background: #f0fdf4; }
.flow-node--end { border-color: #fca5a5; background: #fef2f2; }
.flow-node--approve { border-color: #93c5fd; background: #eff6ff; }
.flow-node--cond { border-color: #fcd34d; background: #fffbeb; border-radius: 4px; transform: rotate(0); }
.flow-node.is-selected { box-shadow: 0 0 0 3px rgba(37, 99, 235, .22), var(--sh-3); }
.flow-arrow {
  flex: 0 0 auto; width: 34px; height: 2px; background: #94a3b8; position: relative;
}
.flow-arrow::after {
  content: ""; position: absolute; right: -1px; top: -4px;
  border-left: 7px solid #94a3b8; border-top: 5px solid transparent; border-bottom: 5px solid transparent;
}

/* ---------- 追溯链 ---------- */
.trace-chain { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 8px 0; }
.trace-node {
  flex: 0 0 auto; min-width: 148px; max-width: 200px;
  border: 1px solid var(--c-border); border-radius: var(--r-md);
  background: #fff; padding: 10px 12px; box-shadow: var(--sh-1);
}
.trace-node__step { font-size: 10.5px; color: var(--c-primary-700); background: var(--c-primary-50); border-radius: var(--r-full); padding: 1px 7px; display: inline-block; margin-bottom: 5px; }
.trace-node__title { font-size: 12.5px; font-weight: 600; }
.trace-node__meta { font-size: 11px; color: var(--c-text-3); margin-top: 4px; line-height: 1.6; word-break: break-all; }
.trace-arrow { flex: 0 0 auto; width: 26px; text-align: center; color: var(--c-text-3); font-size: 15px; }

/* ---------- 主数据/树形结构 ---------- */
.split-2 { display: grid; grid-template-columns: 268px 1fr; gap: 16px; align-items: start; }
.split-3 { display: grid; grid-template-columns: 240px 1fr 320px; gap: 16px; align-items: start; }
@media (max-width: 1200px) { .split-2, .split-3 { grid-template-columns: 1fr; } }

/* ---------- 接口监控 ---------- */
.iface-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-bottom: 1px solid #eef2f7;
}
.iface-row:hover { background: #f8fbff; }
.iface-row__code { font-family: var(--font-mono); font-size: 12px; color: var(--c-primary-700); flex: 0 0 210px; }
.iface-row__name { flex: 1 1 auto; font-size: 13px; min-width: 0; }
.iface-row__stat { flex: 0 0 78px; text-align: right; font-family: var(--font-mono); font-size: 12px; }

/* ---------- 甘特/排产 ---------- */
.gantt { font-size: 12px; overflow-x: auto; }
.gantt__head { display: flex; border-bottom: 1px solid var(--c-border); }
.gantt__cell-head {
  flex: 0 0 34px; text-align: center; padding: 6px 0; color: var(--c-text-3);
  border-left: 1px solid #eef2f7; font-size: 11px;
}
.gantt__row { display: flex; align-items: center; border-bottom: 1px solid #eef2f7; }
.gantt__label { flex: 0 0 168px; padding: 8px 10px; font-size: 12.5px; border-right: 1px solid var(--c-border); }
.gantt__track { flex: 1 1 auto; display: flex; position: relative; min-width: 0; }
.gantt__cell { flex: 1 1 0; height: 30px; border-left: 1px solid #f1f5f9; }
.gantt__bar {
  position: absolute; top: 5px; height: 20px; border-radius: var(--r-full);
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  color: #fff; font-size: 11px; display: flex; align-items: center; padding: 0 8px;
  white-space: nowrap; overflow: hidden;
}

/* ---------- 组织架构卡 ---------- */
.org-card {
  border: 1px solid var(--c-border); border-radius: var(--r-md);
  padding: 12px 14px; background: #fff;
  display: flex; align-items: center; gap: 12px;
  transition: box-shadow var(--transition);
}
.org-card:hover { box-shadow: var(--sh-3); }
.org-card__icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--c-primary-50); color: var(--c-primary-700);
}
.org-card__icon svg { width: 20px; height: 20px; }

/* ---------- 单据流转轨迹 ---------- */
.doc-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
.doc-flow__node { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.doc-flow__arrow { color: var(--c-text-3); margin: 0 8px; font-size: 12px; }

/* ---------- 打印样式 ---------- */
@media print {
  .sidebar, .topbar, .tabbar, .page-head__actions, .toolbar { display: none !important; }
  .content { padding: 0; }
  .card { box-shadow: none; border-color: #ddd; }
  body { background: #fff; }
}
