/* ===== 领导看板（#/board）——数据大屏风格 =====
   深空蓝底 + 语义化强调色 + 四角科技感角标。参考 2026 年主流大屏规范：
   不用纯黑（投影下发死），强调色只用于状态、不用来装饰，动效克制。
   单独一个文件是因为这套配色是自成一体的一套皮，塞进 app.css 会把
   后台/扫码页那份浅色规范搅浑——那边是给车间每天用的，不该跟着变大屏。

   看板要铺满整屏，所以把 #app 那套 720px 窄栏解掉；
   board-mode 由 BoardView 加、router.js 每次渲染前清（见那里的注释）。 */
/* 底色铺在一个 position:fixed 的伪元素上。
   不用 background-attachment:fixed —— iOS Safari 上那个是坏的，
   滚动时会跟着内容跑，手机上会看到一条断层。 */
body.board-mode { background: #07111f; color: #f5fbff; }
body.board-mode::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle at 15% 4%, rgba(24, 144, 255, .20), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(19, 194, 194, .13), transparent 28%),
    linear-gradient(180deg, #07111f 0%, #0a1730 48%, #08101f 100%);
}
body.board-mode #app { max-width: none; padding: 0; position: relative; z-index: 1; }

.board { min-height: 100vh; padding: 0 clamp(14px, 2.6vw, 40px) 56px; }

/* ---- 顶栏：标题居中、两侧装饰线，下面一行是数据时刻 + 刷新 ----
   不用「左中右三栏」那种排法：手机上左右两栏一收，刷新按钮会跟着一起没了，
   而车间/领导在手机上恰恰最需要那个刷新。 */
.board-head { padding: 18px 0 16px; }
.board-head-t { display: flex; align-items: center; gap: 14px; }
.board-head-t::before, .board-head-t::after {
  content: ''; flex: 1 1 auto; height: 1px; min-width: 10px;
  background: linear-gradient(90deg, transparent, rgba(53, 214, 255, .45));
}
.board-head-t::after { background: linear-gradient(90deg, rgba(53, 214, 255, .45), transparent); }
.board-head-t h1 {
  flex: 0 1 auto; text-align: center;
  font-size: clamp(15px, 2.1vw, 26px); font-weight: 700; letter-spacing: 3px;
  background: linear-gradient(180deg, #ffffff 30%, #7fc4ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.board-head-bar {
  margin-top: 10px; display: flex; align-items: center; justify-content: center;
  gap: 12px 16px; flex-wrap: wrap;
}
.board-head-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
  font-size: 12.5px; color: #8fa8c6;
}
.board-head-meta b { font-size: 19px; color: #35d6ff; font-variant-numeric: tabular-nums; }
.board-sep { color: #3d5573; }

/* ---- 面板：半透明深底 + 四角角标 ---- */
.board-panel {
  position: relative; padding: 16px 18px 18px; margin-bottom: 16px;
  border: 1px solid rgba(90, 150, 220, .16);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(18, 38, 70, .72), rgba(9, 20, 38, .86));
  box-shadow: inset 0 1px 0 rgba(150, 200, 255, .06);
}
.board-corner { position: absolute; width: 13px; height: 13px; border: 1px solid rgba(53, 214, 255, .65); }
.board-corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.board-corner.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; border-radius: 0 12px 0 0; }
.board-corner.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; border-radius: 0 0 0 12px; }
.board-corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; }

.board-sec-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.board-sec-head h2 {
  position: relative; padding-left: 13px;
  font-size: 15.5px; font-weight: 600; letter-spacing: 1.5px; color: #e6f4ff;
}
/* 标题左边一道发光的竖线，大屏的标准做法 */
.board-sec-head h2::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 14px; border-radius: 2px; background: #35d6ff;
  box-shadow: 0 0 8px rgba(53, 214, 255, .75);
}
.board-sec-sub { font-size: 12px; color: #6f8aab; }

/* ---- 块一：大数字卡片 ---- */
.board-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(146px, 1fr)); gap: 12px; }
.board-card {
  position: relative; overflow: hidden; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 16px 12px; border-radius: 10px; font-family: inherit;
  border: 1px solid rgba(90, 150, 220, .18);
  background: linear-gradient(180deg, rgba(23, 48, 86, .62), rgba(10, 22, 42, .78));
  transition: transform .18s cubic-bezier(.22, .61, .36, 1), box-shadow .18s, border-color .18s;
}
/* 左侧一道发光竖条 + 顶上一片同色微光，卡片自己会“亮” */
.board-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--c); box-shadow: 0 0 12px var(--c);
}
.board-card::after {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 58%; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), transparent);
}
.board-card:hover { transform: translateY(-3px); border-color: var(--c); }
.board-card.active { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 0 22px -4px var(--c); }
.board-card-label { position: relative; font-size: 12.5px; color: #9cb3cc; }
.board-card-num {
  position: relative; font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; line-height: 1.15;
  color: var(--c); font-variant-numeric: tabular-nums;
}
.board-card-unit { position: relative; font-size: 11.5px; color: #6f8aab; }

/* ---- 左右分栏：环形图 | 堆叠条 ---- */
.board-split { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 1080px) { .board-split { grid-template-columns: minmax(300px, 1fr) 1.7fr; } }

/* ---- 环形图 ---- */
.board-donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.board-donut { position: relative; flex: 0 0 auto; width: 148px; height: 148px; }
.board-donut-svg { width: 100%; height: 100%; display: block; }
.board-donut-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; pointer-events: none;
}
.board-donut-center b { font-size: 28px; font-weight: 800; color: #35d6ff; font-variant-numeric: tabular-nums; }
.board-donut-center span { font-size: 11.5px; color: #6f8aab; }

.board-legend { flex: 1 1 150px; min-width: 0; display: grid; gap: 7px; }
.board-legend-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.board-legend-row i { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 2px; }
.board-legend-name { flex: 1 1 auto; min-width: 0; color: #bcd0e8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-legend-num { color: #f5fbff; font-variant-numeric: tabular-nums; font-weight: 600; }
.board-legend-pct { flex: 0 0 38px; text-align: right; color: #6f8aab; font-variant-numeric: tabular-nums; }

/* ---- 堆叠色条 ---- */
.board-orders { display: grid; gap: 12px; }
.board-order-row { padding-bottom: 10px; border-bottom: 1px solid rgba(240, 240, 240, .07); }
.board-order-row:last-child { border-bottom: 0; padding-bottom: 0; }
.board-order-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.board-order-name { font-size: 14px; font-weight: 600; color: #e6f4ff; }
.board-order-total { font-size: 14px; font-weight: 700; color: #35d6ff; font-variant-numeric: tabular-nums; }
.board-bar {
  display: flex; gap: 2px; height: 8px; margin: 8px 0 9px;
  border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, .05);
}
.board-bar-seg { min-width: 3px; }
.board-order-sub { display: flex; flex-wrap: wrap; gap: 5px 15px; font-size: 12.5px; color: #9cb3cc; }
.board-chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.board-chip i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); box-shadow: 0 0 6px var(--c); }

/* ---- 块三：筛选 + 明细 ---- */
.board-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
input.board-input, select.board-select {
  width: auto; flex: 1 1 150px; min-width: 0; padding: 8px 11px; font-size: 13.5px;
  border-radius: 8px; font-family: inherit; color: #e6f4ff;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(90, 150, 220, .22);
}
input.board-input::placeholder { color: #5f7fa5; }
input.board-input:focus, select.board-select:focus {
  outline: none; border-color: #35d6ff; box-shadow: 0 0 0 2px rgba(53, 214, 255, .16);
}
select.board-select option { background: #0d1c33; color: #e6f4ff; }

.board-detail { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 760px) { .board-detail { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1360px) { .board-detail { grid-template-columns: repeat(3, 1fr); } }
.board-item {
  padding: 11px 13px; border-radius: 9px;
  border: 1px solid rgba(90, 150, 220, .14);
  background: linear-gradient(180deg, rgba(20, 42, 76, .55), rgba(10, 21, 40, .7));
  transition: border-color .16s, transform .16s;
}
.board-item:hover { border-color: rgba(53, 214, 255, .38); transform: translateY(-2px); }
.board-item-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.board-item-code { font-size: 14px; font-weight: 600; letter-spacing: .4px; color: #f5fbff; font-variant-numeric: tabular-nums; }
.board-badge {
  flex: 0 0 auto; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  color: var(--c); background: rgba(255, 255, 255, .07); border: 1px solid var(--c);
}
.board-item-spec { margin-top: 6px; font-size: 12.5px; color: #bcd0e8; overflow-wrap: anywhere; }
.board-item-meta { margin-top: 6px; font-size: 11.5px; color: #6f8aab; display: flex; flex-wrap: wrap; gap: 0 4px; }

/* ---- 通用 ---- */
.board-btn {
  border: none; border-radius: 8px; padding: 8px 18px; cursor: pointer;
  font-size: 13.5px; font-family: inherit; letter-spacing: .5px;
  color: #041020; background: linear-gradient(180deg, #6fe3ff, #21a9e0);
  box-shadow: 0 0 16px -4px rgba(53, 214, 255, .8);
}
.board-btn:hover { filter: brightness(1.08); }
.board-btn-ghost { color: #9fe8ff; background: rgba(53, 214, 255, .08); border: 1px solid rgba(53, 214, 255, .42); box-shadow: none; }
.board-btn-ghost:hover { background: rgba(53, 214, 255, .18); }
.board-btn-more { display: block; width: 100%; margin-top: 10px; color: #9fe8ff; background: rgba(53, 214, 255, .06); border: 1px dashed rgba(53, 214, 255, .4); box-shadow: none; }
.board-note { margin-top: 10px; font-size: 12px; color: #6f8aab; }
.board-empty { padding: 70px 24px; text-align: center; color: #6f8aab; font-size: 14px; }
.board-empty .board-btn { margin-top: 14px; }

/* ---- 手机：车间和领导都可能在手机上看，这里不是「凑合能看」，是主场景之一 ---- */
@media (max-width: 620px) {
  .board { padding-bottom: 36px; }
  .board-head { padding: 14px 0 12px; }
  .board-head-t { gap: 10px; }
  .board-head-t h1 { letter-spacing: 1.5px; }
  .board-head-bar { gap: 8px 12px; margin-top: 8px; }

  /* 面板内边距收一收，把宽度让给内容 */
  .board-panel { padding: 13px 13px 15px; margin-bottom: 12px; }

  /* 卡片缩到 112px 起：320px 的小屏也能保住两列，不然一列排下来要滑很久 */
  .board-cards { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 9px; }
  .board-card { padding: 11px 12px 10px; }
  .board-card-label { font-size: 11.5px; }

  /* 环形图 + 图例：窄屏上下摞，图例铺满整行别挤在右边 */
  .board-donut-wrap { gap: 14px; }
  .board-donut { width: 132px; height: 132px; }
  .board-legend { flex: 1 1 100%; }

  /* 搜索框独占一行：150px 的框里打字太憋屈 */
  input.board-input { flex: 1 1 100%; }

  /* 手指目标撑到 40px 高，8px 上下内边距在手机上点不准 */
  .board-btn { padding: 11px 18px; }
  .board-filters select { padding: 10px 11px; }
  .board-item { padding: 12px 13px; }
}

/* 超窄屏（iPhone SE 一代那种 320px）：卡片再收一档，别让字挤成两行 */
@media (max-width: 360px) {
  .board-cards { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
  .board-card-num { font-size: 26px; }
}
