/* =========================================================
   Pixon_Easy 樣式表（沿用 eSCM 的配色與版面）
   色調：深藍黑底 + 青色 / 靛紫光暈；亮色主題為淺綠
   ========================================================= */

/* ---------- 1. 顏色變數（要換色只改這裡） ---------- */
:root {
  --bg: #070d1a;          /* 最底層背景 */
  --panel: #0e1729;       /* 卡片背景 */
  --panel-2: #14213b;     /* 卡片內較亮區塊 */
  --line: #1f2f4f;        /* 邊框線 */
  --text: #e6edf7;        /* 主要文字 */
  --muted: #8ea0bd;       /* 次要文字 */
  --accent: #22d3ee;      /* 主色：青色 */
  --accent-2: #818cf8;    /* 輔色：靛紫 */
  --ok: #34d399;          /* 綠＝正常 */
  --warn: #fbbf24;        /* 橙＝即將到期 */
  --bad: #f87171;         /* 紅＝逾期／不合格 */
  --radius: 14px;
  /* 半透明的背景、光暈、表格線（亮色主題會換掉） */
  --glow-1: rgba(34, 211, 238, 0.12);
  --glow-2: rgba(129, 140, 248, 0.12);
  --topbar-bg: rgba(7, 13, 26, 0.85);
  --sidebar-bg: rgba(14, 23, 41, 0.9);
  --active-bg: linear-gradient(90deg, rgba(34, 211, 238, 0.18), rgba(129, 140, 248, 0.08));
  --kpi-glow: rgba(34, 211, 238, 0.25);
  --row-line: rgba(31, 47, 79, 0.6);
  --row-hover: rgba(34, 211, 238, 0.04);
  --backdrop: rgba(2, 6, 15, 0.7);
  --modal-glow: rgba(34, 211, 238, 0.2);
  --btn-text: #04101f;    /* 主要按鈕上的文字 */
  color-scheme: dark;     /* 日期選擇器等瀏覽器元件跟著用暗色 */
}

/* 亮色主題：淺綠色為主（右上角按鈕切換，存在瀏覽器） */
:root[data-theme="light"] {
  --bg: #eef7f0;
  --panel: #ffffff;
  --panel-2: #e3f2e7;
  --line: #c6e2cd;
  --text: #1c3326;
  --muted: #5d7867;
  --accent: #15a34a;      /* 主色：綠色 */
  --accent-2: #34c38f;    /* 輔色：薄荷綠 */
  --ok: #059669;
  --warn: #c27803;
  --bad: #dc2626;
  --glow-1: rgba(134, 239, 172, 0.35);
  --glow-2: rgba(187, 247, 208, 0.45);
  --topbar-bg: rgba(255, 255, 255, 0.88);
  --sidebar-bg: rgba(246, 252, 247, 0.95);
  --active-bg: linear-gradient(90deg, rgba(21, 163, 74, 0.15), rgba(52, 195, 143, 0.06));
  --kpi-glow: rgba(21, 163, 74, 0.15);
  --row-line: #dcefe1;
  --row-hover: rgba(21, 163, 74, 0.05);
  --backdrop: rgba(28, 51, 38, 0.35);
  --modal-glow: rgba(21, 163, 74, 0.15);
  --btn-text: #ffffff;
  color-scheme: light;
}

/* ---------- 2. 基本設定 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  background:
    radial-gradient(circle at 15% 0%, var(--glow-1), transparent 40%),
    radial-gradient(circle at 90% 10%, var(--glow-2), transparent 40%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 3. 上方標題列 ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);           /* 毛玻璃效果 */
  border-bottom: 1px solid var(--line);
  z-index: 30;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;                     /* 漸層文字 */
}
.logo span { font-weight: 400; }
a.logo:hover { text-decoration: none; opacity: 0.85; }
@media (max-width: 600px) { .logo { font-size: 16px; letter-spacing: 1px; } }

.topbar-right { margin-left: auto; }

.role-box { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }

.menu-btn {
  display: none;                          /* 桌機隱藏，手機才顯示 */
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 20px;
  border-radius: 8px;
  width: 40px; height: 40px;
  cursor: pointer;
}

/* ---------- 4. 左側選單 ---------- */
.sidebar {
  position: fixed;
  top: 60px; left: 0; bottom: 0;
  width: 220px;
  padding: 20px 12px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 20;
  transition: transform 0.25s;
}

.sidebar a {
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 15px;
}
.sidebar a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.sidebar a.active {
  background: var(--active-bg);
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);   /* 左側亮條 */
}

.sidebar-note { margin-top: auto; font-size: 12px; color: var(--muted); padding: 10px; }

.overlay { display: none; }

/* ---------- 5. 主要內容區 ---------- */
.main {
  margin-left: 220px;
  padding: 84px 28px 40px;
  max-width: 1400px;
}

.page-title { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.page-sub { color: var(--muted); margin-bottom: 20px; font-size: 14px; }

/* 卡片 */
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
}
.card h3 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

/* 自動排列的格子：寬度不夠會自動換行，手機不會擠壓變形 */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

/* ---------- 6. KPI 卡片 ---------- */
.kpi {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.kpi:hover { transform: translateY(-2px); border-color: var(--accent); }
.kpi::after {                              /* 右上角光暈裝飾 */
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 100px; height: 100px;
  background: radial-gradient(circle, var(--kpi-glow), transparent 70%);
}
.kpi-label { color: var(--muted); font-size: 13px; }
.kpi-value { font-size: 28px; font-weight: 700; margin: 4px 0; }
.kpi-value small { font-size: 14px; color: var(--muted); font-weight: 400; }
.kpi-trend { font-size: 13px; }
.up { color: var(--ok); }
.down { color: var(--bad); }

/* ---------- 7. 待辦與警示 ---------- */
.alert-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px dashed var(--line);
  flex-wrap: wrap;
}
.alert-row:last-child { border-bottom: none; }
.alert-text { flex: 1; min-width: 180px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot.bad { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.dot.warn { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }

/* ---------- 8. 標籤（狀態顏色） ---------- */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  border: 1px solid currentColor;
}
.tag.ok { color: var(--ok); background: rgba(52, 211, 153, 0.1); }
.tag.warn { color: var(--warn); background: rgba(251, 191, 36, 0.1); }
.tag.bad { color: var(--bad); background: rgba(248, 113, 113, 0.1); }
.tag.info { color: var(--accent); background: var(--row-hover); }
.tag.gray { color: var(--muted); }

/* ---------- 9. 表格 ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td { padding: 10px; border-bottom: 1px solid var(--row-line); vertical-align: top; }
tr:hover td { background: var(--row-hover); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 10. 按鈕與表單 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}
.btn:hover { border-color: var(--accent); }
.btn.primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: var(--btn-text);
  border: none;
  font-weight: 700;
}
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.danger { color: var(--bad); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }

input, select, textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }

.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.form .row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
/* 勾選框、單選鈕和文字排在同一行 */
.form label:has(> input[type="checkbox"]),
.form label:has(> input[type="radio"]) { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.required::after { content: " *"; color: var(--bad); }
.hint { font-size: 12px; color: var(--muted); }
.error { color: var(--bad); font-size: 13px; min-height: 18px; }

/* 評鑑題目 */
.q-item {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  flex-wrap: wrap;
}
.q-item .q-text { flex: 1; min-width: 200px; color: var(--text); }
.q-options { display: flex; gap: 10px; }
.q-options label { display: flex; align-items: center; gap: 4px; color: var(--text); }
.score-box { font-size: 20px; font-weight: 700; color: var(--accent); }

/* 分頁籤 */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.tabs button {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 14px;
  cursor: pointer;
  font-family: inherit;
}
.tabs button.active { color: var(--accent); border-color: var(--accent); }

.info-grid { display: grid; gap: 8px 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); font-size: 14px; }
.info-grid b { color: var(--muted); font-weight: 400; margin-right: 6px; }

.demo-badge {
  display: inline-block;
  font-size: 12px;
  color: var(--warn);
  border: 1px dashed var(--warn);
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.chart-box { position: relative; height: 260px; }

/* ---------- 11. 對話框 ---------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--backdrop);
  z-index: 50;
  padding: 20px;
  overflow-y: auto;
}
.modal.show { display: flex; align-items: flex-start; justify-content: center; }
.modal-box {
  position: relative;
  width: 100%;
  max-width: 760px;
  margin-top: 40px;
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 0 40px var(--modal-glow);
}
.modal-box h2 { font-size: 20px; margin-bottom: 14px; }
.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}

/* 提示訊息 */
.toast {
  position: fixed;
  right: 20px; bottom: 20px;
  background: var(--panel-2);
  border: 1px solid var(--accent);
  padding: 12px 18px;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 60;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* 角色權限：沒權限的元素直接隱藏 */
body.role-user .maintainer-only,
body.role-user .admin-only,
body.role-maintainer .admin-only { display: none !important; }

/* 展示模式／正式模式各自才顯示的元素 */
body:not(.online) .online-only,
body.online .demo-only { display: none !important; }

.topbar-right { display: flex; align-items: center; gap: 10px; }
.user-box { color: var(--muted); font-size: 13px; }

/* 登入畫面 */
.login-card { max-width: 380px; margin: 60px auto; }
.login-card .page-title { margin-bottom: 16px; text-align: center; }

/* 按鈕送出中 */
.btn:disabled { opacity: 0.5; cursor: wait; }

/* =========================================================
   12. 手機版（螢幕寬度 820px 以下）
   ========================================================= */
@media (max-width: 820px) {
  .menu-btn { display: block; }
  .role-box > span { display: none; }
  .user-box { display: none; }

  /* 選單平常藏在左邊，按下 ☰ 才滑出來 */
  .sidebar { transform: translateX(-100%); width: 240px; }
  .sidebar.open { transform: translateX(0); }
  .overlay.show { display: block; position: fixed; inset: 60px 0 0 0; background: rgba(0, 0, 0, 0.5); z-index: 15; }

  .main { margin-left: 0; padding: 76px 16px 30px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-value { font-size: 22px; }

  /* 表格在手機改成「一列一張小卡片」，避免畫面被擠壓 */
  table.responsive thead { display: none; }
  table.responsive tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 6px 10px;
  }
  table.responsive td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px dashed var(--row-line);
    padding: 6px 0;
    text-align: right;
  }
  table.responsive td:last-child { border-bottom: none; }
  table.responsive td::before {          /* 把欄位名稱顯示在左邊 */
    content: attr(data-label);
    color: var(--muted);
    text-align: left;
    flex-shrink: 0;
  }
  .modal { padding: 0; }
  .modal-box { margin-top: 0; min-height: 100vh; border-radius: 0; }
}

/* 實地評鑑：尚未評鑑名單（可收合） */
.never-list { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.never-list summary { cursor: pointer; color: var(--warn); font-weight: 600; }
.never-list[open] summary { margin-bottom: 10px; }
.never-list .table-wrap { max-height: 50vh; overflow: auto; }

/* 只顯示、不能點的 KPI 卡片 */
.kpi.static { cursor: default; }
.kpi.static:hover { transform: none; border-color: var(--line); }

/* 供應商登入：不顯示左側選單與內部功能，內容置中 */
body.role-supplier .sidebar,
body.role-supplier .menu-btn,
body.role-supplier .maintainer-only,
body.role-supplier .admin-only { display: none !important; }
body.role-supplier .main { max-width: 1100px; margin-left: auto; margin-right: auto; }

/* 主題切換按鈕 */
.theme-btn { min-width: 36px; justify-content: center; }

/* ---------- 使用說明 ---------- */
.guide-toc { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.guide-toc a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel-2); color: var(--text);
}
.guide-toc a:hover { border-color: var(--accent); text-decoration: none; }
.guide-toc span { font-size: 20px; }
.guide-sec { scroll-margin-top: 80px; }           /* 跳過去時不會被上方標題列擋住 */
.guide-sec h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.guide-steps { counter-reset: step; list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 6px 0 4px; }
.guide-steps li { counter-increment: step; position: relative; padding-left: 38px; }
.guide-steps li::before {                          /* 圓形步驟編號 */
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--btn-text); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.guide-tip { margin-top: 10px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--row-hover); border-radius: 6px; font-size: 14px; }
.fake-btn { pointer-events: none; padding: 1px 8px; vertical-align: baseline; }

/* 主要產品複選：一格一個勾選框 */
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; margin-top: 6px;
  max-height: 180px; overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }

/* ===== 閃燈：有待回覆的問題反映 ===== */
@keyframes blink { 50% { opacity: 0.2; } }
.blink { animation: blink 1s ease-in-out infinite; }
.nav-badge:empty { display: none; }
.nav-badge {
  display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px;
  border-radius: 10px; background: var(--warn); color: #111; font-size: 12px; text-align: center;
}

/* ===== 問題反映 ===== */
.issue { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.issue-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.issue-text { white-space: pre-wrap; margin: 6px 0; }              /* 保留換行 */
.issue-reply { margin: 8px 0 0 16px; padding: 8px 10px; border-left: 3px solid var(--line); }
.issue-reply.staff { border-left-color: var(--accent); }            /* PIXON 的回覆用藍色線 */
.issue-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.issue-imgs img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.issue-form { margin-top: 10px; }

/* ===== 上傳證書時勾選料號 ===== */
.item-pick { max-height: 200px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.item-pick label { padding: 3px 0; color: var(--text); }
.item-pick label[hidden] { display: none !important; } /* 要蓋過表單勾選列的 display:flex，篩選才藏得起來 */

/* ===== 證書按鈕：顏色跟著狀態 ===== */
.btn.cert.ok { color: var(--ok); }
.btn.cert.warn { color: var(--warn); }
.btn.cert.bad { color: var(--bad); }

/* 左側「證書與文件」的燈：灰燈＝沒有待審核；紅燈閃＝有待審核 */
.nav-dot { display: inline-block; width: 9px; height: 9px; margin-left: 6px; border-radius: 50%; background: var(--muted); opacity: 0.5; vertical-align: middle; }
.nav-dot.red { background: var(--bad); opacity: 1; box-shadow: 0 0 8px var(--bad); }

/* 系統管理：帳號表格裡的輸入框、下拉縮小一點 */
label.inline { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
#userList input, #userList select { padding: 4px 6px; font-size: 13px; }
.user-new input, .user-new select { padding: 6px 8px; }

/* 標題旁的版本號 */
.ver-btn {
  margin-left: 10px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.ver-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Pixon_Easy 新增 ---------- */
/* 資料來源狀態（儀表板、系統管理） */
.src-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--row-line); }
.src-row:last-child { border-bottom: none; }
.src-row .src-name { flex: 1; }
.src-row .hint { display: block; }
/* 料號清單：整列可點 */
tr.click-row { cursor: pointer; }
tr.click-row:hover td { background: var(--row-hover); }
/* 資料表瀏覽：範例資料可能很寬，字小一點 */
.sample-wrap { overflow-x: auto; font-size: 12px; }
.sample-wrap table { white-space: nowrap; }
/* 建置中的頁面 */
.coming { text-align: center; padding: 40px 20px; color: var(--muted); }
.coming .big { font-size: 40px; margin-bottom: 10px; }
/* 加了 hidden 屬性的元素一律藏起來（蓋過 display 設定） */
[hidden] { display: none !important; }
/* 手機版：標題列空間小，按鈕文字不換行，藏起姓名與版本號 */
.topbar-right .btn { white-space: nowrap; }
@media (max-width: 700px) {
  .topbar .user-box, .topbar .ver-btn, .logo span { display: none; }
}

/* ---------- 查詢條件區（標題在上、輸入框在下，排成格子） ---------- */
.filter-grid { display: grid; gap: 10px 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: end; margin-bottom: 14px; }
.filter-grid label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.filter-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }

/* 最近查看的料號：一排小按鈕 */
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }

/* 表格裡兩行的格子：上面主要文字、下面灰色小字 */
.two-line b { display: block; font-weight: 600; }
.two-line small { display: block; color: var(--muted); }

/* 對話框裡的分段標題、備註框 */
.modal-sec { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.note-box { background: var(--row-hover); border-radius: 8px; padding: 10px 12px; margin: 10px 0; font-size: 14px; }

/* ---------- 生產看板 ---------- */
.board-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.board-date { display: flex; gap: 6px; align-items: center; }
.board-clock { font-family: monospace; font-size: 18px; color: var(--accent); padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; }
.board-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.board-kpi .kpi-value { font-size: 34px; }
.board-kpi.ok .kpi-value { color: var(--ok); }
.board-kpi.warn .kpi-value { color: var(--warn); }
.board-kpi.bad .kpi-value { color: var(--bad); }
.board-chart { height: 300px; }
/* 燈號：發光的小圓點 */
.light { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); opacity: 0.5; }
.light.ok { background: var(--ok); opacity: 1; box-shadow: 0 0 8px var(--ok); }
.light.warn { background: var(--warn); opacity: 1; box-shadow: 0 0 8px var(--warn); }
.light.bad { background: var(--bad); opacity: 1; box-shadow: 0 0 8px var(--bad); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.rate.ok { color: var(--ok); font-weight: 700; }
.rate.warn { color: var(--warn); font-weight: 700; }
.rate.bad { color: var(--bad); font-weight: 700; }
/* 全螢幕播放：內容區鋪滿、字放大 */
#app:fullscreen { background: var(--bg); overflow: auto; padding: 20px 28px; }
#app:fullscreen .board-kpi .kpi-value { font-size: 46px; }
#app:fullscreen .board-chart { height: 34vh; }
