/* 管理工作區的明亮主題「精品酒店」（董事長 2026-10-11 選 D：「好，就以D方案」）：象牙白底、深藍字與頂端列、黃銅細線、
   優雅明體標題。設定、企業AI治理、企業算力治理、企業知識閣、A2A MEETING、文件審閱六頁的 <html data-theme="hotel">；
   其他頁面（辦公室、登入、客戶會談）不受影響。各頁原本的深色樣式仍是底層，這裡只覆寫顏色、頁首與標題。 */

/* ------------------------------------------------------------------ 共用：把深色的寫死顏色換成明亮版 */
html[data-theme] {
  --office-card: rgba(15, 20, 30, 0.03);
  --office-green: #1d7a4a;
  --office-red: #b42318;
  --lt-hover: rgba(15, 20, 30, 0.045);
  --lt-track: #ecebe6;
  --lt-bad: #b42318;
  --lt-bad-tint: #fbe9e6;
  --lt-bad-edge: rgba(180, 35, 24, 0.45);
  --lt-note: #7a5200;
  --lt-s1: #1d6b45; --lt-s1t: #e5f2ea;
  --lt-s2: #7a5200; --lt-s2t: #faefd5;
  --lt-s3: #a8361a; --lt-s3t: #fae6df;
  --lt-pend: #5f5d58; --lt-pendt: #efede8;
}
html[data-theme] body { background: var(--office-bg-1); color: var(--office-text); }
html[data-theme] ::selection { background: var(--lt-select); color: var(--office-text); }
html[data-theme] .knowledge-page ::selection { background: var(--lt-select); color: var(--office-text); }
html[data-theme] :focus-visible { outline-color: var(--lt-focus); }

/* 主要按鈕：原本是金底深字，明亮版改成主題的實心色 */
html[data-theme] .gov-tabs button[aria-pressed="true"], html[data-theme] .gov-panel .gov-primary,
html[data-theme] .docs .doc-btn.primary, html[data-theme] .plog-btn.primary, html[data-theme] .plog-paper .plog-btn.primary,
html[data-theme] .gov-panel .emp .emp-btn.is-primary, html[data-theme] .knowledge-access-notice button,
html[data-theme] .cca-confirm, html[data-theme] .cmp-page .cca-buy, html[data-theme] .gov-panel .a2a-primary {
  background: var(--lt-solid); border-color: var(--lt-solid); color: var(--lt-solid-ink);
}
html[data-theme] .gov-panel .gov-primary:hover:not(:disabled), html[data-theme] .gov-panel .emp .emp-btn.is-primary:hover:not(:disabled) {
  background: var(--lt-solid-hover); border-color: var(--lt-solid-hover);
}
html[data-theme] .knowledge-step-number, html[data-theme] .kp-cell[aria-pressed="true"] .kp-cell-title i,
html[data-theme] .emp-step[aria-current="step"] i, html[data-theme] .emp-node.is-has .emp-n,
html[data-theme] .emp-detail h4 .emp-n, html[data-theme] .emp-check.is-has .emp-n {
  background: var(--lt-solid); color: var(--lt-solid-ink);
}
html[data-theme] .emp { --emp-warm-ink: var(--lt-solid-ink); --emp-hair: var(--office-card-border); --emp-hair-2: var(--lt-hair-strong);
  --emp-warm-tint: var(--lt-select-tint); --emp-warm-edge: var(--lt-select-edge); --emp-green: var(--office-green); --emp-pending-mark: var(--office-text); }
html[data-theme] .cmp-page { --cmp-hair: var(--office-card-border); --cmp-hair-2: var(--lt-hair-strong); --cmp-bar-track: var(--lt-track);
  --cmp-warm-tint: var(--lt-select-tint); --cmp-warm-edge: var(--lt-select-edge); --cmp-severe: var(--lt-bad);
  --cmp-severe-edge: var(--lt-bad-edge); --cmp-severe-tint: var(--lt-bad-tint); }
html[data-theme] .plog { --plog-tint: var(--lt-select-tint); --plog-gold-line: var(--lt-select-edge); }

/* 等級：明亮底上用深色字＋淡底 */
html[data-theme] .emp .emp-lv[data-level="S1"], html[data-theme] .kn-level[data-level="S1"], html[data-theme] .kp-level[data-level="S1"], html[data-theme] .a2a-level-s1 { color: var(--lt-s1); background: var(--lt-s1t); }
html[data-theme] .emp .emp-lv[data-level="S2"], html[data-theme] .kn-level[data-level="S2"], html[data-theme] .kp-level[data-level="S2"], html[data-theme] .a2a-level-s2 { color: var(--lt-s2); background: var(--lt-s2t); }
html[data-theme] .emp .emp-lv[data-level="S3"], html[data-theme] .kn-level[data-level="S3"], html[data-theme] .kp-level[data-level="S3"], html[data-theme] .a2a-level-s3 { color: var(--lt-s3); background: var(--lt-s3t); }
html[data-theme] .emp .emp-lv[data-level="pending"], html[data-theme] .kn-level[data-level="pending"], html[data-theme] .kp-level[data-level="pending"] { color: var(--lt-pend); background: var(--lt-pendt); }
html[data-theme] .plog-tag.s3 { color: var(--lt-s3); border-color: rgba(168, 54, 26, 0.4); }

/* 錯誤、危險、提醒字 */
html[data-theme] .a2a-tag.bad, html[data-theme] .kp-tag.bad { color: var(--lt-bad); background: var(--lt-bad-tint); }
html[data-theme] .kp-state-box small.bad, html[data-theme] .gov-panel .a2a-cal-item.bad, html[data-theme] .docs-reason, html[data-theme] .plog-jd-warn,
html[data-theme] .cmp-anom-head svg, html[data-theme] .cmp-anom-chip.is-severe b { color: var(--lt-bad); }
html[data-theme] .gov-panel .a2a-danger-btn, html[data-theme] .docs .doc-btn.danger, html[data-theme] .plog-btn.danger,
html[data-theme] .gov-panel .emp .emp-btn.is-danger, html[data-theme] .docs-state.is-rejected { color: var(--lt-bad); border-color: var(--lt-bad-edge); }
html[data-theme] .settings-status[data-tone="bad"] { background: var(--lt-bad-tint); color: var(--lt-bad); }
html[data-theme] .cmp-anom-chip b, html[data-theme] .cca-toast, html[data-theme] .cca-plan b, html[data-theme] .cca-gain,
html[data-theme] .emp-banner, html[data-theme] .emp .emp-note { color: var(--lt-note); }
html[data-theme] .cc-minus { color: var(--lt-bad); }

/* 深色版的白色半透明 hover、底軌、分隔，在明亮底上改成淡灰 */
html[data-theme] .gov-panel .kn-tablist [role="tab"]:hover:not(:disabled), html[data-theme] .gov-panel .kn-add-menu-items button:hover:not(:disabled),
html[data-theme] .gov-panel .kn-node:hover:not(:disabled), html[data-theme] .gov-panel .kn-row:hover:not(:disabled),
html[data-theme] .gov-panel .kp-cell:hover:not(:disabled), html[data-theme] .gov-panel .a2a-row:hover:not(:disabled),
html[data-theme] .cmp-pos-head:hover, html[data-theme] .cca-row:hover { background: var(--lt-hover); }
html[data-theme] .settings-meter, html[data-theme] .kp-bar, html[data-theme] .cca-stack, html[data-theme] .cca-mini,
html[data-theme] .emp-cells i { background: var(--lt-track); }
/* Preserve filled knowledge slots after the light-theme track override. */
html[data-theme] .emp-cells i.is-on { background: #ffd54f; }
html[data-theme] .kn-class, html[data-theme] .emp-filerow, html[data-theme] .kp-kind .kp-ico, html[data-theme] .a2a-tag.off,
html[data-theme] .cc-mini.cc-ghost, html[data-theme] .cc-ledger-ch, html[data-theme] .emp-check .emp-n { background: var(--lt-hover); }
html[data-theme] .kp-table thead th, html[data-theme] .cc-ledger-row { border-color: var(--office-card-border); }
html[data-theme] .knowledge-spinner { border-color: var(--lt-track); border-top-color: var(--office-warm); }
html[data-theme] .kp-cell[aria-pressed="true"]::after { background: var(--office-bg-2); }
html[data-theme] .gov-panel .emp .emp-check[aria-expanded="true"] { background: var(--lt-select-tint); }
html[data-theme] .emp-seat > b, html[data-theme] .emp-seat > span:not(.emp-tag):not(.emp-ph) { background: var(--lt-label-backing); }
html[data-theme] .emp-canvas, html[data-theme] .emp-map { background: radial-gradient(circle at 1px 1px, rgba(15, 20, 30, 0.08) 1px, transparent 1.5px) 0 0 / 28px 28px, var(--office-bg-1); }
html[data-theme] .gov-panel button.kn-danger { background: var(--lt-bad); border-color: var(--lt-bad); }
html[data-theme] .cmp-page ::selection { background: var(--lt-select); color: var(--office-text); }
html[data-theme] .cmp-kpi small { color: color-mix(in srgb, var(--k) 70%, #1a1a1a); }
html[data-theme] .cc-card, html[data-theme] .cc-balance { background: var(--office-bg-2); color: var(--office-text); border: 1px solid var(--office-card-border); }
html[data-theme] .office-back { border-color: var(--office-card-border); background: transparent; }
/* 處理中（淡藍）、完成（綠）在明亮底上加深；算力值帳本的篩選框 */
html[data-theme] .kp-tag.busy, html[data-theme] .a2a-tag.busy { color: #1f5f93; background: #e3f0fa; }
html[data-theme] .gov-panel .a2a-cal-item.busy { color: #1f5f93; }
html[data-theme] .kp-bar i.busy, html[data-theme] .kp-legend i.busy { background: #5aa6dc; }
html[data-theme] .kp-tag.ok, html[data-theme] .a2a-tag.ok { background: #e3f2e9; }
html[data-theme] .docs-state.is-approved { color: var(--office-green); border-color: rgba(29, 122, 74, 0.4); }
html[data-theme] .settings-status[data-tone="ok"] { background: #e3f2e9; }
html[data-theme] .cc-ledger-filters select { background-color: var(--office-bg-2); color: var(--office-text); }
html[data-theme] .cca-row[aria-pressed="true"], html[data-theme] .cca-row[aria-current], html[data-theme] .cca-row.is-on {
  background: var(--lt-select-tint); color: var(--office-text); box-shadow: inset 0 0 0 1px var(--lt-select-edge); }
html[data-theme] :is(input, textarea, select) { color-scheme: light; }

/* 工作區導覽與頁面大標題（theme.js 加上） */
.theme-nav { display: none; }
html[data-theme] .theme-nav { display: flex; gap: 26px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
html[data-theme][data-role="member"] .theme-nav a[data-senior] { display: none; }
html[data-theme] .theme-nav a { white-space: nowrap; text-decoration: none; font-size: 15px; font-weight: 500; }
html[data-theme] .theme-opener { max-width: var(--lt-page-max, 1920px); margin: 0 auto; box-sizing: border-box; }
html[data-theme] .knowledge-page-header h1.theme-moved { display: none; }
/* 頁名已經是頁首下方的大標題：面板自己的同名標題只留給讀屏（文件審閱、設定等） */
html[data-theme] #governancePanel > h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* 原本頁首規則「第一個連結是品牌、最後一個連結靠右」會套到導覽連結上，這裡還原 */
html[data-theme] .knowledge-page-header .theme-nav a:nth-child(n) { font-family: inherit; font-size: 15px; font-weight: 500; letter-spacing: 0; margin-left: 0; }
html[data-theme] .knowledge-page-header .theme-nav a[aria-current] { font-weight: 700; }
html[data-theme] .knowledge-page-header .office-back { margin-left: auto; }
/* 頁首固定在頂端，只捲下面的頁面（董事長 2026-10-11：手機 PWA 滑動時頂端列不該跟著捲走）。
   body 原本 height: 100%（辦公室頁的版面），黏性頁首捲過一個畫面高就會被帶走，所以管理頁的 body 隨內容長高。
   頁首高度由 theme.js 量成 --theme-head；頁內其他黏性元素與錨點捲動都讓開這段高度。
   全螢幕閱讀器與抽屜（z-index 30 以上）照樣蓋在頁首上面。 */
html[data-theme] { scroll-padding-top: calc(var(--theme-head, 76px) + 12px); }
html[data-theme] body { height: auto; }
html[data-theme] .knowledge-page-header { position: sticky; top: 0; z-index: 25; }
html[data-theme] .knowledge-document { top: calc(var(--theme-head, 76px) + 20px); }
html[data-theme] .plog-jd-side { top: calc(var(--theme-head, 76px) + 12px); }
/* 管理頁滿版（董事長 2026-10-11：「應該要滿版才對」）：六頁的內容寬度原本各自沿用舊的上限（設定 1120、文件審閱 1100、
   企業算力治理 1240、其他 1500px），不是刻意的；改成統一滿版，內容兩側和頁首一樣留固定邊距（桌機最多 48px、手機 16px），
   只有超寬螢幕才停在 1920px。主內容外層的 .gov-panel 自己還有 24px 內距，所以外層只補差額。 */
html[data-theme] { --lt-gutter: clamp(16px, 3.3vw, 48px); --lt-page-max: 1920px; }
html[data-theme] body.knowledge-page > main.office-page, html[data-theme] body.knowledge-page > main.gov-panel {
  max-width: var(--lt-page-max); width: 100%; box-sizing: border-box; margin-left: auto; margin-right: auto; }
html[data-theme] body.knowledge-page > main.office-page {
  padding-left: max(0px, calc(var(--lt-gutter) - 24px)); padding-right: max(0px, calc(var(--lt-gutter) - 24px)); }
html[data-theme] body.knowledge-page > main.office-page.cmp-page, html[data-theme] body.knowledge-page > main.gov-panel {
  padding-left: var(--lt-gutter); padding-right: var(--lt-gutter); }
html[data-theme] .settings-workspace { max-width: none; }   /* 設定頁各分頁也滿版；表單與段落各自有行寬 */
@media (min-width: 1001px) {
  html[data-theme] .plog-reader { top: calc(var(--theme-head, 76px) + 12px); max-height: calc(100dvh - var(--theme-head, 76px) - 24px); }
}
/* 選中的分頁與分段：實心主題色 */
html[data-theme] .gov-panel [role="tab"][aria-selected="true"], html[data-theme] .settings-tabs button[aria-selected="true"],
html[data-theme] .cmp-tabs [role="tab"][aria-selected="true"], html[data-theme] .gov-panel button[aria-pressed="true"]:not(.audit-workspace *):not(.emp *):not(.plog-stat):not(.pp-node),
html[data-theme] .cmp-seg button[aria-pressed="true"], html[data-theme] .cca-seg button[aria-pressed="true"] {
  background: var(--lt-solid); border-color: var(--lt-solid); color: var(--lt-solid-ink);
}

/* ================================================================== D · 精品酒店 hotel */
html[data-theme="hotel"] {
  --office-bg-1: #fbf9f4; --office-bg-2: #ffffff; --office-bg-3: #f3efe6;
  --office-card-border: #e6e0d2; --office-text: #14263e; --office-text-dim: #566173; --office-warm: #87683a;
  --lt-hair-strong: #d6cdb9; --lt-select: #efe2c7; --lt-select-tint: #f6efe1; --lt-select-edge: rgba(135, 104, 58, 0.5);
  --lt-solid: #14263e; --lt-solid-hover: #233a59; --lt-solid-ink: #fbf6ea; --lt-focus: #87683a; --lt-label-backing: rgba(251, 249, 244, 0.92);
  --lt-serif: "Noto Serif TC", serif; --lt-brass: #b08d57;
}
html[data-theme="hotel"] .knowledge-page-header { max-width: none; height: 76px; padding: 0 48px; gap: 36px; border-bottom: 0; background: #14263e; color: #fbf6ea; }
html[data-theme="hotel"] .knowledge-page-header > a:first-child { font-family: var(--lt-serif); font-weight: 600; font-size: 28px; color: #fbf6ea; letter-spacing: 0.02em; }
html[data-theme="hotel"] .theme-nav a { display: flex; align-items: center; height: 76px; color: rgba(251, 246, 234, 0.72); border-bottom: 2px solid transparent; }
html[data-theme="hotel"] .theme-nav a:hover { color: #fbf6ea; }
html[data-theme="hotel"] .theme-nav a[aria-current] { color: #fbf6ea; border-bottom-color: var(--lt-brass); }
html[data-theme="hotel"] .knowledge-page-header .office-back { color: #fbf6ea; border-color: rgba(251, 246, 234, 0.35); }
html[data-theme="hotel"] .knowledge-page-header .office-back:hover { color: #fff; border-color: var(--lt-brass); background: rgba(176, 141, 87, 0.12); }
html[data-theme="hotel"] .theme-opener { padding: 40px 32px 4px; text-align: center; }
html[data-theme="hotel"] .theme-opener h1 { display: inline-flex; align-items: center; gap: 22px; font-family: var(--lt-serif); font-weight: 600; font-size: 36px;
  line-height: 1.3; letter-spacing: 0.12em; color: #14263e; }
html[data-theme="hotel"] .theme-opener h1::before, html[data-theme="hotel"] .theme-opener h1::after { content: ""; width: 72px; height: 1px; background: var(--lt-brass); }
html[data-theme="hotel"] .gov-panel h2, html[data-theme="hotel"] .gov-panel h3, html[data-theme="hotel"] .cmp-page h2,
html[data-theme="hotel"] .cmp-page h3, html[data-theme="hotel"] .emp h3 { font-family: var(--lt-serif); font-weight: 600; letter-spacing: 0.04em; color: #14263e; }
html[data-theme="hotel"] .gov-panel button:not(.audit-workspace *):not(.gov-primary):not([aria-pressed="true"]):not([aria-selected="true"]):not(.emp *):not(.pp *) { background: #fff; border-color: #cdbf9f; color: #14263e; }
html[data-theme="hotel"] .gov-panel :is(input, textarea, select) { background: #fff; border-color: #d6cdb9; }
html[data-theme="hotel"] .cmp-kpi, html[data-theme="hotel"] .gov-panel .gov-row, html[data-theme="hotel"] .emp-inspector { border-color: #e6e0d2; }

/* 員工座位與心智圖的連線（原本是深色底上的白色半透明線，在象牙白底上看不見）。
   董事長 2026-10-11 選「黃銅細線」，並要全部統一成心智圖那樣的虛線：有人的座位、有檔案的重點是黃銅色，
   空位、還沒檔案的是淡黃銅色，線型都一樣。 */
html[data-theme="hotel"] :is(.emp-ln-office, .emp-ln-seat, .emp-branch, .emp-branch-dashed, .emp-branch-sup) { stroke-dasharray: 4 5; stroke-width: 1.6; }
html[data-theme="hotel"] :is(.emp-ln-office, .emp-ln-seat, .emp-branch, .emp-branch-sup) { stroke: #b08d57; stroke-opacity: 0.85; }
html[data-theme="hotel"] :is(.emp-ln-office.is-off, .emp-ln-seat.is-empty, .emp-branch-dashed) { stroke: #c9bd9f; stroke-opacity: 1; }
html[data-theme="hotel"] .emp-map.is-growing .emp-branch { animation: none; stroke-dasharray: 4 5; stroke-dashoffset: 0; }

@media (max-width: 760px) {
  html[data-theme] .knowledge-page-header { height: auto; min-height: 60px; padding: 10px 16px; gap: 14px; flex-wrap: wrap; }
  html[data-theme] .theme-nav { order: 3; flex-basis: 100%; gap: 18px; }
  html[data-theme] .theme-nav a { height: 40px !important; font-size: 14px; }
  html[data-theme] .knowledge-page-header > a:first-child { font-size: 26px !important; }
  html[data-theme] .theme-opener { padding: 26px 16px 4px; }
  html[data-theme="hotel"] .theme-opener h1 { font-size: 26px; gap: 14px; }
  html[data-theme="hotel"] .theme-opener h1::before, html[data-theme="hotel"] .theme-opener h1::after { width: 36px; }
}
