/* Cloudflare 版自己的：登入卡片、上方小工具列（淺色、深色都要看得清楚） */
:root { --cf-bg: #eef2ef; --cf-card: #ffffff; --cf-ink: #17312a; --cf-muted: #5d6f67; --cf-line: #cfdad3; --cf-main: #1d6b4a; --cf-err: #b42318 }
@media (prefers-color-scheme: dark) { :root { --cf-bg: #111a16; --cf-card: #1b2621; --cf-ink: #e6efe9; --cf-muted: #9fb2a8; --cf-line: #33463d; --cf-main: #3fa877; --cf-err: #ff8a80 } }
.cf-wait { padding: 40px 16px; text-align: center; color: var(--cf-muted); font-size: 16px }
.cf-login { font-family: system-ui, "PingFang TC", "Microsoft JhengHei", sans-serif; min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--cf-bg); padding: 16px; box-sizing: border-box; position: relative }
.cf-lang { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px }
.cf-lang button { border: 1px solid var(--cf-line); background: var(--cf-card); color: var(--cf-ink); border-radius: 6px; padding: 6px 10px; font-size: 14px; cursor: pointer }
.cf-lang button.on { background: var(--cf-main); color: #fff; border-color: var(--cf-main) }
.cf-card { width: 100%; max-width: 360px; background: var(--cf-card); color: var(--cf-ink); border-radius: 12px; padding: 24px; box-shadow: 0 2px 10px #0002; display: flex; flex-direction: column; gap: 12px }
.cf-card h1 { margin: 0; font-size: 22px; text-align: center }
.cf-sub { margin: -6px 0 6px; text-align: center; color: var(--cf-muted); font-size: 13px; letter-spacing: .12em }
.cf-card label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--cf-muted) }
.cf-card input { font-size: 16px; padding: 10px 12px; border: 1px solid var(--cf-line); border-radius: 8px; background: var(--cf-card); color: var(--cf-ink) }
.cf-main { font-size: 16px; padding: 11px; border: 0; border-radius: 8px; background: var(--cf-main); color: #fff; cursor: pointer }
.cf-main:disabled { opacity: .6 }
.cf-link { background: none; border: 0; color: var(--cf-main); font-size: 14px; cursor: pointer; text-decoration: underline }
.cf-msg { margin: 0; color: var(--cf-err); font-size: 14px }
.cf-bar { position: relative; z-index: 50; display: flex; gap: 8px; align-items: center; font-size: 13px; flex-wrap: wrap; justify-content: flex-end; padding: 6px 16px; background: #0c241f; color: #d5e4dc }
@media (min-width: 701px) { .cf-bar { position: fixed; right: 16px; bottom: 14px; border-radius: 10px; box-shadow: 0 4px 16px #0003 } }
.cf-bar button, .cf-invite input { font-size: 13px; padding: 4px 8px; border: 1px solid #cfdad3; border-radius: 6px; background: #fff; color: #17312a; cursor: pointer }
.cf-invite { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap }
.cf-invite b { background: #fff6d6; color: #5a4400; padding: 4px 8px; border-radius: 6px; font-weight: 600 }

/* 手機版：上方列不要擠成一字一行，選單變小（Alesi 2026-11-10「畫面亂七八糟」） */
@media (max-width: 700px) {
  .os header { height: auto; flex-wrap: wrap; padding: 10px 14px !important; gap: 8px }
  .os header > div, .os .header-right { flex-wrap: wrap; gap: 6px }
  .os header button, .os header select, .os header .demo-badge { font-size: 12px; padding: 6px 8px; white-space: nowrap }
  .os nav { gap: 2px }
  .os nav button { padding: 8px 8px; font-size: 13px; gap: 6px }
  .os aside { padding: 12px }
  .os .header-brand { display: none }
}

/* 帳號管理：固定淺底深字，手機深色模式也看得清楚；一個帳號一張卡，一白一淺綠（Alesi 2026-11-10「顏色這麼接近」） */
.cf-acc { color-scheme: light; background: #fff !important; color: #14261f !important; width: 640px; max-width: 100%; padding: 24px 18px !important }
.cf-acc h2 { color: #14261f; margin: 0 0 12px }
.cf-acc h3 { font-size: 16px; font-weight: 700; color: #fff; background: #1d4d3c; margin: 0; padding: 10px 12px; border-radius: 8px 8px 0 0 }
.cf-blk { border: 1px solid #b9cbc2; border-radius: 9px; margin: 0 0 16px; overflow: hidden }
.cf-blk-new { border: 2px solid #b7791f }
.cf-blk-new h3 { background: #8a5a12 }
details.cf-blk > summary { font-size: 16px; font-weight: 700; padding: 12px; cursor: pointer; background: #e8efeb; color: #14261f }
.cf-row { padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #fff; border-top: 1px solid #d5e0da }
.cf-row:nth-of-type(even) { background: #eef4f0 }
.cf-row.cf-off { opacity: .5 }
.cf-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px }
.cf-who b { font-size: 18px; color: #0f241c; min-width: 84px }
.cf-who > span { font-size: 15px; color: #2c4a3e }
.cf-tags { display: flex; flex-wrap: wrap; gap: 6px; width: 100% }
.cf-tags i { font-style: normal; font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: 999px }
.cf-sc-ALL { background: #14261f; color: #fff }
.cf-sc-OA { background: #1e4fa3; color: #fff }
.cf-sc-CN { background: #7b2d8b; color: #fff }
.cf-role { background: #fff; color: #14261f; border: 1px solid #5d756a }
.cf-nn { background: #fff; color: #8a5a12; border: 1px solid #b7791f }
.cf-acc input:not([type=checkbox]), .cf-acc select { font-size: 16px; padding: 9px 10px; border: 1.5px solid #6f877c; border-radius: 8px; background: #fff; color: #14261f; width: 100%; box-sizing: border-box }
.cf-acc input::placeholder { color: #6b7d75 }
.cf-pw { display: flex; gap: 8px } .cf-pw button { white-space: nowrap; font-size: 15px; padding: 8px 12px; border: 1px solid #1d4d3c; border-radius: 8px; background: #fff; color: #1d4d3c }
.cf-edit { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 14px; color: #2c4a3e } .cf-edit label { display: flex; align-items: center; gap: 6px }
.cf-edit label select, .cf-edit label input:not([type=checkbox]) { width: auto; min-width: 120px }
.cf-done { display: block; width: calc(100% - 24px); margin: 12px; font-size: 17px; font-weight: 700; padding: 12px; border: 0; border-radius: 9px; background: #1d4d3c; color: #fff; cursor: pointer }
.cf-done:disabled { background: #9fb3aa }
.cf-ok { color: #1d6b4a; font-size: 14px; font-weight: 600 }
.cf-acc .close { color: #14261f; font-size: 26px }

/* 系統測試問題反饋箱：整頁蓋上、固定白底深字（Alesi 2026-11-10） */
.cf-fb { position: fixed; inset: 0; z-index: 80; overflow: auto; background: #f3f6f4; color: #14261f; color-scheme: light; font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif; padding: 0 16px 40px; font-size: 15px }
.cf-fb-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; background: #14261f; color: #fff; margin: 0 -16px 16px; padding: 10px 16px }
.cf-fb-top h2 { margin: 0; font-size: 18px; color: #fff }
.cf-fb-close { font-size: 15px; padding: 7px 12px; border-radius: 8px; border: 0; background: #fff; color: #14261f; font-weight: 700; cursor: pointer }
.cf-fb section { max-width: 1180px; margin: 0 auto 18px; background: #fff; border: 1px solid #b9cbc2; border-radius: 10px; overflow: hidden }
.cf-fb h3 { margin: 0; font-size: 16px; padding: 10px 14px; background: #1d4d3c; color: #fff }
.cf-fb-new { border: 2px solid #1d4d3c !important }
.cf-fb-draft { padding: 12px 14px; border-top: 1px solid #d5e0da }
.cf-fb-draft:nth-of-type(odd) { background: #f6faf7 }
.cf-fb-dh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px }
.cf-fb-x { font-size: 14px; min-height: 36px; border: 1px solid #b42318; color: #b42318; background: #fff; border-radius: 8px; padding: 6px 12px; cursor: pointer }
.cf-fb textarea { width: 100%; box-sizing: border-box; font-size: 16px; line-height: 1.5; padding: 10px; border: 1.5px solid #6f877c; border-radius: 8px; resize: none; overflow: hidden; background: #fff; color: #14261f; min-height: 80px }
.cf-fb textarea::placeholder { color: #6b7d75 }
.cf-fb-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px }
.cf-fb-tools button { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; padding: 8px 12px; border-radius: 8px; border: 1.5px solid #1d4d3c; background: #fff; color: #1d4d3c; cursor: pointer; font-weight: 600 }
.cf-fb-tools button.cf-fb-on { background: #b42318; border-color: #b42318; color: #fff }
.cf-fb-tools small { color: #2c4a3e; font-size: 14px }
.cf-fb-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px }
.cf-fb-thumbs span { position: relative }
.cf-fb-thumbs img { width: 88px; height: 88px; object-fit: cover; border-radius: 6px; border: 1px solid #b9cbc2; cursor: zoom-in; display: block }
.cf-fb-thumbs button { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: #b42318; color: #fff; font-size: 15px; line-height: 1; cursor: pointer }
.cf-fb-acts { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid #d5e0da; flex-wrap: wrap }
.cf-fb-add { font-size: 16px; padding: 10px 14px; border-radius: 9px; border: 1.5px dashed #1d4d3c; background: #fff; color: #1d4d3c; font-weight: 700; cursor: pointer }
.cf-fb-send { flex: 1; min-width: 140px; font-size: 17px; padding: 11px; border-radius: 9px; border: 0; background: #1d4d3c; color: #fff; font-weight: 700; cursor: pointer }
.cf-fb-send:disabled { background: #9fb3aa }
.cf-fb-msg { margin: 0; padding: 0 14px 12px; color: #1d4d3c; font-weight: 600 }
.cf-fb-head { display: grid; grid-template-columns: 40fr 35fr 25fr; gap: 14px; padding: 8px 14px; background: #dfe9e3; font-size: 13px; font-weight: 700; color: #2c4a3e }
.cf-fb-item { display: grid; grid-template-columns: 40fr 35fr 25fr; gap: 14px; padding: 12px 14px; border-top: 1px solid #d5e0da; background: #fff }
.cf-fb-item:nth-of-type(even) { background: #f1f6f3 }
.cf-fb-item p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55 }
.cf-fb-wait { color: #3d5249 }
.cf-fb-lab { display: none; font-size: 13px; font-weight: 700; color: #2c4a3e }
.cf-fb-c1 .cf-fb-lab { display: flex; gap: 8px; flex-wrap: wrap } .cf-fb-lab span { font-weight: 400; color: #3d5249 }
.cf-fb-c2 { border-left: 3px solid #8fa79b; padding-left: 10px }
.cf-fb-c3 { border-left: 3px solid #8fa79b; padding-left: 10px }
.cf-st { display: inline-block; font-size: 14px; font-weight: 700; padding: 3px 10px; border-radius: 999px }
.cf-st-open { background: #f59e0b; color: #2b1700 } .cf-st-doing { background: #1e4fa3; color: #fff } .cf-st-ask { background: #b42318; color: #fff } .cf-st-done { background: #15803d; color: #fff }
.cf-fb-done { opacity: .85 }
.cf-fb-h-done { background: #e3e8e5 !important; padding: 0 !important; border-top: 2px solid #8fa79b } .cf-fb-h-done button { width: 100%; text-align: left; background: none; border: 0; color: #14261f; font-size: 16px; font-weight: 700; padding: 10px 14px; cursor: pointer }
.cf-fb-empty { padding: 14px; margin: 0; color: #3d5249 }
.cf-fb-big { position: fixed; inset: 0; z-index: 90; background: #000d; display: flex; align-items: center; justify-content: center; padding: 16px }
.cf-fb-big img { max-width: 100%; max-height: 100%; border-radius: 6px }
.cf-fb-big button { position: fixed; right: 16px; bottom: 20px; font-size: 16px; padding: 10px 16px; border-radius: 9px; border: 0; background: #fff; color: #14261f; font-weight: 700 }
@media (max-width: 760px) {
  .cf-fb-head { display: none }
  .cf-fb-item { grid-template-columns: 1fr; gap: 10px }
  .cf-fb-lab { display: block }
}
.cf-fb h3 small { display: block; font-size: 13px; font-weight: 400; color: #d5e4dc; margin-top: 2px }
.cf-fb-ed { margin-top: 6px }
.cf-fb-tools small.cf-fb-bad { color: #b42318; font-weight: 700 }
.cf-fb-acts .cf-fb-add { flex: 1; border-style: solid; background: #1d4d3c; color: #fff }

/* 手機：大表一列一張卡片，左邊是欄名、右邊是數字；第一格當卡片標題（Alesi 2026-11-11 反饋 #2） */
@media (max-width: 700px) {
  .os table.cf-cards { display: block; width: 100% !important; min-width: 0 !important; white-space: normal }
  .os table.cf-cards thead { display: none }
  .os table.cf-cards tbody, .os table.cf-cards tfoot { display: block }
  .os table.cf-cards tr { display: block; border: 1px solid #c9d6cf; border-radius: 10px; margin: 0 0 10px; padding: 8px 12px; background: #fff }
  .os table.cf-cards tr:nth-child(even) { background: #f1f6f3 }
  .os table.cf-cards th, .os table.cf-cards td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0 !important; border: 0 !important; white-space: normal !important; min-width: 0 !important; width: auto !important; text-align: right; font-size: 15px; background: none !important; position: static !important }
  .os table.cf-cards tr > :first-child { display: block; text-align: left; font-size: 16px; font-weight: 700; color: #14261f; padding-bottom: 6px !important; border-bottom: 1px solid #dfe8e3 !important; margin-bottom: 4px }
  .os table.cf-cards td::before { content: attr(data-label); color: #3d5249; font-size: 13px; text-align: left; flex-shrink: 0 }
  .os table.cf-cards tr > td:first-child::before { content: none }
  .os table.cf-cards td:empty { display: none }
  .os table.cf-cards tr > [colspan] { display: block; text-align: left }
  .os .table-wrap:has(> table.cf-cards) { overflow-x: visible }
}
/* 流水「有備註」：灰色小字，不用像故障的三角形 */
.os .note-tag { display: inline-block; font-size: 11px; padding: 0 5px; border-radius: 4px; background: #e6ece8; color: #3d5249; margin-right: 4px; font-weight: 600 }
.cf-fb-tip { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: #fff7e0; border: 2px solid #b7791f; color: #2b1700 }
.cf-fb-tip b { font-size: 16px } .cf-fb-tip p { margin: 6px 0 10px; line-height: 1.55 }
.cf-fb-tip button { font-size: 15px; padding: 8px 16px; border-radius: 8px; border: 0; background: #8a5a12; color: #fff; font-weight: 700 }
@media (max-width: 700px) {
  .os table.cf-cards [data-blank] { display: none !important }
  .os table.cf-cards [data-neg] { color: #b42318 !important; font-weight: 700 }
  .os table.ep-table tr, .os table.ep-table th, .os table.ep-table td { border-top: 0 !important; box-shadow: none !important }
  .os table.cf-cards td[data-label^="折合"] { font-weight: 700; background: #e3ede7 !important; margin: 2px -6px 0; padding: 4px 6px !important; border-radius: 6px }
  .os table.ep-table .go-detail { display: inline-block; float: right; font-size: 14px; font-weight: 700; color: #1d4d3c; padding: 2px 0 6px 12px; min-height: 28px }
  .os table.acct-table tr.acct-earmark td { color: #3d5249 !important }
  .os table.acct-table tr.acct-earmark > td:first-child::after { content: "代管，不算 AOT 現金"; display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: #e6ece8; color: #3d5249 }
}
@media (max-width: 700px) { .os2 .ep-table tr.ep-sum th, .os2 .ep-table tr.ep-sum td, .os2 .ep-table tr.ep-bank th, .os2 .ep-table tr.ep-bank td { border-top: 0 !important; border-bottom: 0 !important } .os2 .ep-table tr.ep-sum > :first-child { border-bottom: 1px solid #dfe8e3 !important } }

/* 語言選擇放最上面、附英文（Alesi 2026-11-11）：手機在最上方工具列，電腦在頁首右上 */
.cf-lang-pick { display: none; align-items: center; gap: 6px; font-size: 13px; color: #fff; font-weight: 600 }
.cf-lang-pick select { font-size: 16px; padding: 4px 6px; border-radius: 6px; border: 1px solid #cfdad3; background: #fff; color: #17312a }
@media (max-width: 700px) { .cf-lang-pick { display: inline-flex; order: -1; margin-right: auto } .os .lang-pick { display: none !important } }

/* 手機版定案（2026-11-11 Dana、Quinn 逐頁看 14 頁截圖）：電腦版不動 */
.cf-navbtn { display: none }
@media (max-width: 700px) {
  html, body { overflow-x: hidden }
  .cf-navbtn { display: block; width: 100%; margin-top: 10px; font-size: 16px; font-weight: 700; padding: 10px 12px; border-radius: 8px; border: 1px solid #4f7a68; background: #1d4d3c; color: #fff; text-align: left; min-height: 44px }
  .os aside { padding: 10px 14px !important }
  .os aside nav { display: none !important }
  .os aside.cf-nav-open nav { display: grid !important }
  .os .brand { font-size: 14px } .os .brand-mark { width: 30px; height: 32px; font-size: 20px }
  .os header { position: sticky; top: 0; z-index: 30; min-height: 48px }
  .os header .demo-badge, .os header .header-right > button.secondary:not(:has(svg)) { display: none !important }
  .os h1 { font-size: 24px !important; line-height: 1.25 }
  .os2 main h2, .os2 .section-head h3, .os2 .company-cards h2, .os2 .panel > h3 { font-size: 18px !important }
  .os main { padding: 12px 12px 24px !important }
  .os .panel, .os2 .metric-pad { padding: 12px !important }
  .os .panel .panel { border: 0; padding: 0 !important }
  .os main button.primary, .os main button.secondary { min-height: 44px }
  .os main select, .os main input:not([type=checkbox]):not([type=radio]) { max-width: 100%; min-width: 0 }
  .os .kpi h2 { font-size: 18px !important; white-space: nowrap }
  .os2 .monthly-table th:first-child, .os2 .monthly-table td:first-child { min-width: 124px !important; max-width: 130px; width: 130px; white-space: normal !important }
  .os2 .monthly-table th, .os2 .monthly-table td { font-size: 12px }
  .os2 .finance-six { height: 62vh; min-height: 360px }
  .os2 .finance-six th, .os2 .finance-six td { min-width: 128px !important; max-width: 128px !important; padding: 8px 6px !important; font-size: 13px }
  .os table.cf-cards td[data-label=""]::before { content: none }
}
@media (max-width: 700px) { .os2 .monthly-table tbody td:not(:first-child), .os2 .monthly-table thead th:not(:first-child) { position: static !important } .os2 .monthly-table th:not(:first-child), .os2 .monthly-table td:not(:first-child) { min-width: 96px } }

.cf-fb-lab .cf-fb-q { font-weight: 700; color: #2c4a3e }
@media (max-width: 700px) {
  .os main label:has(> select), .os main label:has(> input:not([type=checkbox]):not([type=radio])) { flex-wrap: wrap; align-items: flex-start }
  .os main label > select { width: 100%; max-width: 100%; text-overflow: ellipsis }
  .os main .filters, .os main .oa-toolbar, .os main .section-head { flex-wrap: wrap; gap: 8px }
  .os main .section-head { align-items: flex-start }
}
/* MF 手機版凍結（Alesi 2026-11-11：標題列和左邊到產品說明要凍結）：電腦凍結三欄共 540px 比手機還寬，手機改窄版 248px，右邊留一欄資料 */
@media (max-width: 700px) {
  .os2 section.panel:has(> .mf-zoned), .os2 section.panel:has(.mf-zoned) { overflow: hidden; min-width: 0; max-width: 100% }
  .os2 .mf-zoned { max-width: 100%; overflow: auto; max-height: 70vh; -webkit-overflow-scrolling: touch }
  .os2 .mf-zoned .pin-ref { left: 0 !important; min-width: 72px !important; max-width: 72px !important; width: 72px; font-size: 11px; overflow-wrap: anywhere; white-space: normal; padding: 6px 4px !important }
  .os2 .mf-zoned .pin-photo { left: 72px !important; min-width: 56px !important; max-width: 56px !important; width: 56px; padding: 4px !important }
  .os2 .mf-zoned .pin-photo img, .os2 .mf-zoned .product-photo { width: 48px !important; height: 48px !important; object-fit: cover }
  .os2 .mf-zoned .pin-desc { left: 128px !important; min-width: 120px !important; max-width: 120px !important; width: 120px; padding: 6px 4px !important }
  .os2 .mf-zoned .desc-cell { font-size: 11px; max-height: 84px; text-align: left }
  .os2 .mf-zoned td input.cell { width: 92px; min-width: 84px } .os2 .mf-zoned td input.cell.wide { width: 120px }
  .os2 .mf-zoned th, .os2 .mf-zoned td { font-size: 12px }
  .os main .filters > select, .os main .filters > label, .os main .filters > input { max-width: 100% }
  .os2 .more-list { right: 0; left: auto; max-width: calc(100vw - 24px) }
}

/* Unresolved feedback stays visible without opening the drawer. */
.cf-fb-launch{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap}
.cf-fb-badge{display:inline-flex;align-items:center;gap:5px;padding:2px 7px;border-radius:999px;background:#b42318;color:#fff;font-size:12px;line-height:1.5;white-space:nowrap}
.cf-fb-badge .cf-fb-unresolved-dot{background:#fff}
.cf-fb-unresolved-dot{display:inline-block;width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#b42318;vertical-align:middle}
.cf-fb-unresolved-mark{display:inline-flex;align-items:center;gap:5px;margin:0 7px 5px 0;color:#9b2119;font-size:13px;font-weight:700;white-space:nowrap}
.cf-fb-update-error{font-size:12px;color:#9b2119;white-space:nowrap}

/* The mobile toolbar folds its action buttons: keep the unresolved count on Tools. */
.cf-fb-mobile-notice{display:none}
.cf-fb-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:700px){
 .cf-bar:has(>.cf-fb-mobile-notice) .cf-tools-toggle{padding-right:30px!important}
 .cf-bar>.cf-fb-mobile-notice{display:inline-flex;align-items:center;justify-content:center;position:absolute;top:17px;right:16px;z-index:1;min-width:20px;height:20px;padding:0 4px;box-sizing:border-box;border-radius:999px;background:#b42318;color:#fff;font-size:12px;line-height:20px;pointer-events:none}
}

/* Feedback 41/42: fixed sidebar follows the real app bar; preserve existing FAB clearance. */
@media(min-width:701px){
 .os.os2 aside{top:var(--cf-bar-height,0px)!important;height:auto!important;max-height:calc(100dvh - var(--cf-bar-height,0px));overflow-y:auto}
}
/* Tasks is portalled to body; its close controls must be above the toolbar stack. */
body>.cf-fb.cf-tk{z-index:220!important;isolation:isolate}
body>.cf-fb.cf-tk>.cf-fb-top{position:sticky;top:0;z-index:3}

/* Mobile signed-in identity uses the authenticated /me response, never a role inferred from a name. */
.cf-mobile-identity{display:none}
@media(max-width:700px){
 .cf-bar>.cf-mobile-identity{display:block;margin-top:3px;color:inherit;font-size:12px;line-height:24px}
 .cf-mobile-identity>summary{display:flex;align-items:center;gap:7px;min-height:28px;padding:0 4px;list-style:none;cursor:pointer;border-radius:4px}
 .cf-mobile-identity>summary::-webkit-details-marker{display:none}
 .cf-mobile-identity>summary:focus-visible{outline:2px solid currentColor;outline-offset:1px}
 .cf-mobile-identity>summary>span:not(.cf-identity-arrow){min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 .cf-identity-account{flex:0 1 28%;font-weight:700}
 .cf-identity-name{flex:1 1 0}
 .cf-identity-role{flex:0 1 28%;font-weight:600}
 .cf-identity-arrow{flex:0 0 12px;text-align:center}
 .cf-mobile-identity[open] .cf-identity-arrow{transform:rotate(180deg)}
 .cf-mobile-identity>.cf-identity-full{position:absolute;left:10px;right:10px;top:100%;z-index:2;display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 12px;margin:0;padding:12px;border:1px solid #aabbb1;border-radius:8px;background:#fff;color:#19271f;box-shadow:0 5px 14px #0003;font-size:14px;line-height:1.5}
 .cf-identity-full>dt{font-weight:700}
 .cf-identity-full>dd{margin:0;min-width:0;overflow-wrap:anywhere}
 html[data-theme="dark"] .cf-mobile-identity>.cf-identity-full{background:#172b22;color:#edf5f0;border-color:#6b8b7b}
}
 /* 第二輪手機走查定案（2026-11-11，總裁／小陳／業務／Dana 四角色）：電腦版不動 */
.cf-navrow, .cf-full-btn { display: none }
@media (max-width: 700px) {
  .cf-navrow { display: flex; gap: 8px }
  .cf-navrow .cf-navbtn { flex: 1; margin-top: 0 }
  .cf-aibtn { font-size: 15px; font-weight: 700; padding: 10px 12px; border-radius: 8px; border: 1px solid #4f7a68; background: #fff; color: #14261f; min-height: 44px; white-space: nowrap }
  .os .brand { display: none !important }
  .os header { display: none !important }
  .os aside { padding: 8px 12px !important }
  /* 不換行＋靠右對齊時，字比較長的語言（繁中「問題反饋 Feedback」）會從左邊被切掉（Alesi 2026-11-11）；改成靠左、放不下就換行 */
  .cf-bar { padding: 4px 12px; gap: 6px; flex-wrap: wrap; justify-content: flex-start }
  .cf-bar > span { display: none }
  .cf-bar button { white-space: nowrap; padding: 6px 6px; font-size: 12px; min-height: 32px }
  .cf-lang-pick { white-space: nowrap; margin-right: 0 !important }
  .cf-lang-pick { font-size: 11px; gap: 4px }
  .cf-lang-pick select { font-size: 16px; padding: 2px 2px }
  .cf-bar > button:last-child { margin-left: auto }
  /* 流水卡片 */
  .cf-full-btn { display: block; width: 100%; margin: 0 0 8px; min-height: 40px; font-size: 14px; font-weight: 700; border: 1px dashed #1d4d3c; border-radius: 8px; background: #fff; color: #1d4d3c }
  .os2 .finance-six.cf-as-cards { height: auto !important; max-height: 70vh; min-height: 0 !important; overflow-x: hidden }
  .os table.cf-cards th, .os table.cf-cards td { max-width: none !important }
  .os .finance-six table.cf-cards tr { padding: 8px 10px }
  .os .finance-six table.cf-cards .base-top { display: flex; justify-content: space-between; align-items: center }
  .os .finance-six table.cf-cards td.pin-subject { display: block !important; text-align: left; font-size: 15px; font-weight: 600 }
  .os .finance-six table.cf-cards td.pin-subject::before { content: none }
  .os .finance-six table.cf-cards td.num { font-weight: 700 }
  /* 按鈕不再被擠成直排 */
  .os2 main .section-head { flex-direction: column; align-items: stretch !important }
  .os2 main .section-head button { white-space: normal; min-width: 120px }
  /* 月報：科目欄 100px，其他月份不被蓋 */
  .os2 .monthly-table th:first-child, .os2 .monthly-table td:first-child { min-width: 100px !important; max-width: 100px !important; width: 100px; font-size: 12px }
  .os2 .monthly-table th:not(:first-child), .os2 .monthly-table td:not(:first-child) { min-width: 112px }
  /* 統計卡一排一張、標題左金額右 */
  .os .kpis { grid-template-columns: 1fr !important; gap: 6px !important }
  .os .kpi { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px !important; gap: 10px }
  .os .kpi h2 { margin: 0 !important }
  .os .kpi small { display: none }
  .os table.cf-cards .go-detail { float: right }
  .os main p, .os main h3, .os main h2, .os main small { white-space: normal !important; overflow-wrap: anywhere }
  .os2 section.panel > *:not(table), .os2 section.panel > div > *:not(table) { max-width: 100%; min-width: 0; box-sizing: border-box }
  .os main .filters { display: flex; flex-wrap: wrap }
  .os main .filters > * { max-width: 100% }
  .os main select { max-width: 100%; text-overflow: ellipsis }
  .os2 .more-list { position: fixed !important; left: 12px !important; right: 12px !important; top: auto; max-width: none; z-index: 40 }
  /* Dana 2026-11-11 審總覽：四列排法統一（標題在上、數字在下）、深綠卡灰字加亮、兩行「比…」靠成一組 */
  .os2 .cc-row { flex-direction: column; align-items: flex-start !important; gap: 2px !important }
  .os2 .cc-row b { font-size: 18px }
  .os2 .ep-fy { color: #d6e6dc !important; opacity: 1 !important }
  .cf-lang-pick select { font-weight: 400 }
}
.os2 .ep-fy { color: #cfe0d6 !important; opacity: 1 !important }

/* 修改紀錄頁 */
.cf-au-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; background: #e8efeb }
.cf-au-filters select, .cf-au-filters input { font-size: 16px; padding: 7px 8px; border: 1.5px solid #6f877c; border-radius: 8px; background: #fff; color: #14261f; max-width: 100% }
.cf-au-filters button { font-size: 14px; padding: 7px 10px; border-radius: 8px; border: 1px solid #1d4d3c; background: #fff; color: #1d4d3c }
.cf-au-filters small { color: #3d5249 }
.cf-au-head, .cf-au-row { display: grid; grid-template-columns: 92px 190px 150px 1fr; gap: 10px; padding: 8px 14px; align-items: start }
.cf-au-head { background: #dfe9e3; font-size: 13px; font-weight: 700; color: #2c4a3e; position: sticky; top: 44px }
.cf-au-row { border-top: 1px solid #d5e0da; font-size: 14px; background: #fff }
.cf-au-row:nth-of-type(even) { background: #f1f6f3 }
.cf-au-t { color: #3d5249; font-variant-numeric: tabular-nums }
.cf-au-row b { color: #14261f; overflow-wrap: anywhere }
.cf-au-k { font-style: normal; font-weight: 700; font-size: 13px; padding: 2px 8px; border-radius: 999px; background: #e3e8e5; color: #14261f; display: inline-block }
.cf-au-fb { background: #1e4fa3; color: #fff } .cf-au-fin { background: #8a5a12; color: #fff } .cf-au-in { background: #fff; border: 1px solid #5d756a }
.cf-au-w { overflow-wrap: anywhere; color: #14261f } .cf-au-w small { display: block; color: #3d5249; font-size: 13px; margin-top: 2px }
@media (max-width: 760px) { .cf-au-head { display: none } .cf-au-row { grid-template-columns: 1fr auto; gap: 4px 10px } .cf-au-row > b { grid-column: 1; grid-row: 1; font-size: 15px } .cf-au-row > span:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right } .cf-au-t { grid-column: 1 / -1; grid-row: 2; font-size: 13px } .cf-au-w { grid-column: 1 / -1 } }

/* 縮寫說明的小圓點與說明框 */
.os [data-abbr]::after { content: "i"; display: inline-block; width: 16px; height: 16px; margin-left: 5px; border-radius: 50%; background: #1e4fa3; color: #fff; font: 700 11px/16px Georgia, serif; text-align: center; vertical-align: middle; cursor: help; flex-shrink: 0; font-style: italic }
.os nav button[data-abbr]::after { background: #cfe0f7; color: #14261f }
.cf-abbr-pop { position: fixed; z-index: 95; background: #fff; color: #14261f; border: 2px solid #1e4fa3; border-radius: 10px; padding: 12px 14px; box-shadow: 0 8px 30px #0004; font: 15px/1.55 "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif; color-scheme: light }
.cf-abbr-pop p { margin: 0 0 8px } .cf-abbr-pop b { color: #1e4fa3 }
.cf-abbr-pop button { font-size: 14px; font-weight: 700; padding: 6px 14px; border-radius: 8px; border: 0; background: #1e4fa3; color: #fff }

/* 反饋 #7、#9（2026-11-11）：上排同字級排一行；防止滑過頭整頁被關掉；關閉鈕放大放下面 */
html, body { overscroll-behavior-y: none }
.cf-lang-pick { display: inline-flex !important; gap: 0; align-items: center }
.cf-lang-pick button { border-radius: 0 !important; margin: 0; border-right-width: 0 !important }
.cf-lang-pick button:first-child { border-radius: 6px 0 0 6px !important }
.cf-lang-pick button:last-child { border-radius: 0 6px 6px 0 !important; border-right-width: 1px !important }
.cf-lang-pick button.on { background: #1d6b4a !important; color: #fff !important; border-color: #1d6b4a !important; font-weight: 700 }
.cf-fb-close2 { display: block; width: calc(100% - 32px); max-width: 1180px; margin: 8px auto 24px; min-height: 52px; font-size: 17px; font-weight: 700; border: 0; border-radius: 10px; background: #14261f; color: #fff }
.cf-fb-top { padding-right: 16px } .cf-fb-close { min-height: 40px; min-width: 76px; font-size: 16px }
@media (max-width: 700px) {
  /* 兩排、排整齊：第一排語言在左、登出在右；第二排其他按鈕等寬 */
  .cf-bar { flex-wrap: wrap !important; justify-content: flex-start; gap: 6px !important; padding: 6px 12px !important }
  .cf-bar button { font-size: 13px !important; min-height: 34px; padding: 6px 8px !important }
  .cf-lang-pick { order: 0 }
  .cf-bar > button:last-child { order: 1; margin-left: auto !important }
  .cf-bar::after { content: ""; order: 2; flex-basis: 100%; height: 0 }
  .cf-bar > button:not(:last-child) { order: 3; flex: 1 1 0; white-space: nowrap }
  .os .lang-pick { display: none !important }
}
@media (min-width: 701px) { .cf-lang-pick { display: none !important } }
/* Dana 2026-11-11 審手機 MF 卡片與上排後的修正 */
@media (max-width: 700px) {
  .cf-bar { z-index: 10 !important }
  .cf-bar button { min-height: 44px !important; font-size: 14px !important }
  .cf-navbtn, .cf-aibtn { min-height: 44px }
  .os2 .cc2-in input { min-height: 44px; width: 132px; padding: 8px 0 8px 10px !important; padding-right: 8px !important; font-weight: 600; margin-right: 0 }
  .os2 .cc2-row.cc2-strong b { font-size: 15px }
  .os2 .cc2-total .cc2-row.cc2-strong b { font-size: 18px }
  .os2 .cc2-target small { font-size: 12px !important; background: #5b2a86; color: #fff !important; border-radius: 4px; padding: 1px 6px }
  .os2 .cc2-photo { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #1e4fa3 }
  .os2 .cc2-total { margin-bottom: 6px }
  .os main button.secondary:disabled { color: #3d5249 !important; opacity: 1 !important; background: #e8efeb !important }
}
@media (max-width: 700px) { .os2 .cc2-in { flex-wrap: nowrap !important } .os2 .cc2-in > span { flex: 1; min-width: 0 } .os2 .cc2-target small { display: inline-block; margin: 2px 0 0 0 !important } .os2 .cc2-target > span { display: flex; flex-direction: column; align-items: flex-start } }

/* 顏色選擇鈕（深色配色由 darkgen.mjs 產生；登入卡自己有深色變數） */
html[data-theme="dark"] .cf-login { --cf-bg: #111a16; --cf-card: #1b2621; --cf-ink: #e6efe9; --cf-muted: #9fb2a8; --cf-line: #33463d; --cf-main: #3fa877; --cf-err: #ff8a80 }
html[data-theme="light"] .cf-login { --cf-bg: #eef2ef; --cf-card: #ffffff; --cf-ink: #17312a; --cf-muted: #5d6f67; --cf-line: #cfdad3; --cf-main: #1d6b4a; --cf-err: #b42318 }
.cf-theme-pick { display: inline-flex; align-items: center }
.cf-theme-pick button { border-radius: 0 !important; margin: 0; border-right-width: 0 !important }
.cf-theme-pick button:first-child { border-radius: 6px 0 0 6px !important }
.cf-theme-pick button:last-child { border-radius: 0 6px 6px 0 !important; border-right-width: 1px !important }
.cf-theme-pick button.on { background: #1d6b4a !important; color: #fff !important; border-color: #1d6b4a !important; font-weight: 700 }
.cf-login-theme { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--cf-muted) }
.cf-login-theme .cf-theme-pick button { font-size: 14px; padding: 7px 10px; border: 1px solid var(--cf-line); background: var(--cf-card); color: var(--cf-ink); cursor: pointer }
@media (max-width: 700px) { .cf-bar .cf-theme-pick { order: 1 } .cf-bar > button:last-child { order: 1 } .cf-bar .cf-theme-pick button { flex: 0 0 auto !important; min-height: 44px } .cf-lang-pick button { padding: 6px 7px !important } }
@media (max-width: 700px) {
  .cf-bar .cf-theme-pick { display: inline-flex !important; order: 3 !important }
  .cf-bar > button:last-child { order: 1 !important }
  .cf-bar > button:not(:last-child) { flex: 1 1 40% !important }
}
@media (min-width: 701px) { .cf-bar .cf-theme-pick { display: inline-flex !important } }

/* 「顏色 Display」「語言 Language」標題中英並列（照 LECLERC、訂製櫃工作站的做法） */
.cf-pick-g { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap }
.cf-pick-g > small { font-size: 11px; color: #d5e4dc; font-weight: 600; line-height: 1.1 }
@media (max-width: 700px) { .cf-bar .cf-pick-g { display: inline-flex !important } .cf-bar .cf-pick-g.g-lang { order: 0 } .cf-bar .cf-pick-g.g-theme { order: 3 } .cf-pick-g > small { white-space: normal; width: 44px } }
@media (min-width: 701px) { .cf-bar .cf-pick-g.g-lang { display: none !important } .cf-bar .cf-pick-g.g-theme { display: inline-flex !important } }
@media (max-width: 700px) { .cf-bar > button:not(:last-child) { flex: 1 1 0 !important; font-size: 13px !important; padding: 6px 4px !important } .cf-bar::before { content: ""; order: 4; flex-basis: 100%; height: 0 } .cf-bar > button:not(:last-child) { order: 5 !important } }

/* Complete field-level change history; data keeps original language. */
.cf-au-diff { margin-top:8px; min-width:0; color:#17312a; background:#f3f7f5; border:1px solid #b6cabe; border-radius:8px; padding:8px }
.cf-au-diff summary { cursor:pointer; min-height:36px; font-weight:700 }
.cf-au-change { margin:8px 0 !important; padding:10px !important; border:1px solid #cfdad3; border-radius:6px; background:#fff; min-width:0 }
.cf-au-change > strong { display:block; overflow-wrap:anywhere; font-size:13px }
.cf-au-values { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; margin-top:6px }
.cf-au-values > div { min-width:0 }
.cf-au-values b { font-size:13px; color:#365448 }
.cf-au-values pre { white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word; margin:5px 0 0; font:14px/1.5 system-ui; background:#eef4f0; border-radius:4px; padding:8px; color:#17312a }
@media(max-width:700px){ .cf-au-values { grid-template-columns:minmax(0,1fr) } .cf-au-diff summary{min-height:44px} }

/* Dana 深色審查後（2026-11-11）：上排在深色下不刺眼；電腦版上排移到右上、不再浮動蓋數字；輸入框原生控制項跟著深色；Michel 狀態色 */
html[data-theme="dark"] { color-scheme: dark }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) { color-scheme: dark } }
.cf-pick-g > small { font-size: 12px; width: 62px; white-space: normal; line-height: 1.15 }
@media (min-width: 701px) {
  .cf-bar { position: relative !important; right: auto !important; bottom: auto !important; border-radius: 0 !important; box-shadow: none !important; min-height: 46px; padding: 6px 16px 6px 252px !important; flex-wrap: wrap; justify-content: flex-end; max-width: none }
  .os aside { top: 0; z-index: 60 }
  .cf-bar .cf-pick-g.g-lang, .cf-lang-pick { display: inline-flex !important }
  .os .lang-pick { display: none !important }
  .cf-pick-g > small { width: auto; white-space: nowrap }
}

html[data-theme="dark"] .cf-bar button { background: #22302a; color: #e6efe9; border-color: #4b6358 }
html[data-theme="dark"] .cf-bar button.on { background: #2f8a60 !important; color: #fff !important; border-color: #2f8a60 !important }
html[data-theme="dark"] .cf-aibtn { background: #22302a; color: #e6efe9; border-color: #4b6358 }
html[data-theme="dark"] .os2 .settle-table tr.cleared td:not(.settle-season) { background: #1f4a2e !important; color: #e6efe9 }
html[data-theme="dark"] .os2 .settle-table tr.carried td:not(.settle-season) { background: #5a4310 !important; color: #fbeccb }
html[data-theme="dark"] .os2 .settle-table tr.open td:not(.settle-season) { background: #232b27 !important; color: #e6efe9 }
html[data-theme="dark"] .os2 .settle-table td.settle-season { background: #38463f !important; color: #fff }
@media (max-width: 700px) { html[data-theme="dark"] .os table.cf-cards td, html[data-theme="dark"] .os table.cf-cards th { border-right: 0 !important; box-shadow: none !important } }
@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]) .cf-bar button { background: #22302a; color: #e6efe9; border-color: #4b6358 }
html:not([data-theme="light"]) .cf-bar button.on { background: #2f8a60 !important; color: #fff !important; border-color: #2f8a60 !important }
html:not([data-theme="light"]) .cf-aibtn { background: #22302a; color: #e6efe9; border-color: #4b6358 }
html:not([data-theme="light"]) .os2 .settle-table tr.cleared td:not(.settle-season) { background: #1f4a2e !important; color: #e6efe9 }
html:not([data-theme="light"]) .os2 .settle-table tr.carried td:not(.settle-season) { background: #5a4310 !important; color: #fbeccb }
html:not([data-theme="light"]) .os2 .settle-table tr.open td:not(.settle-season) { background: #232b27 !important; color: #e6efe9 }
html:not([data-theme="light"]) .os2 .settle-table td.settle-season { background: #38463f !important; color: #fff }
@media (max-width: 700px) { html:not([data-theme="light"]) .os table.cf-cards td, html:not([data-theme="light"]) .os table.cf-cards th { border-right: 0 !important; box-shadow: none !important } }
}

/* 長表斑馬紋（Dana；淺色、深色都要分得出） */
@media (min-width: 701px) {
  .os2 .orders-fin tbody tr:nth-child(even) > td:not([class*="pin"]) { background-color: #f1f6f3 }
  html[data-theme="dark"] .os2 .orders-fin tbody tr:nth-child(even) > td:not([class*="pin"]) { background-color: #222d28 }
}
@media (min-width: 701px) and (prefers-color-scheme: dark) { html:not([data-theme="light"]) .os2 .orders-fin tbody tr:nth-child(even) > td:not([class*="pin"]) { background-color: #222d28 } }

/* NOELLE-OVERLAY-STACKING-20261111: dialog parents must be above the desktop sidebar; keep their own fixed palette. */
.cf-bar:has(.cf-fb), .cf-bar:has(.cf-acc) { z-index: 100 !important }

/* MOBILE-TOOLBAR-COMPACT-20261111: one row by default, secondary actions open on demand. */
.cf-mobile-tools { display:none }
.cf-toolbar-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap }
@media(max-width:700px) {
  .cf-bar { padding:6px 10px !important; min-height:56px !important; display:block !important }
  .cf-bar::before { display:none !important }
  .cf-bar > .cf-pick-g { display:none !important }
  .cf-mobile-tools { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) auto; align-items:center; gap:6px; width:100% }
  .cf-mobile-tools select,.cf-mobile-tools button { box-sizing:border-box; width:100%; min-width:0; height:44px; margin:0; padding:6px 8px !important; font:16px/1.2 system-ui; border:1px solid #577268; border-radius:7px; background:#183b30; color:#fff }
  .cf-mobile-tools .cf-tools-toggle { min-width:70px; white-space:nowrap }
  .cf-toolbar-actions { display:none; position:absolute; top:calc(100% + 4px); right:10px; left:10px; padding:10px; border:1px solid #b5c8bf; border-radius:10px; background:#f3f6f4; color:#14261f; color-scheme:light; box-shadow:0 6px 18px #0004 }
  .cf-menu-open { z-index:100 !important }
  .cf-menu-open .cf-toolbar-actions { display:flex }
  .cf-toolbar-actions > button { flex:1 1 45%; min-height:44px; font-size:16px !important; background:#fff !important; color:#14261f !important; border:1px solid #8fa99d !important }
  .cf-toolbar-actions > span { width:100%; font-size:14px; overflow-wrap:anywhere }
}

/* Audit is portaled to body, above the expanded toolbar. */
.cf-audit { z-index:200 }

/* Keep automatic account dialogs visible while the low-frequency buttons are folded. */
@media(max-width:700px) {
  .cf-toolbar-actions { display:contents }
  .cf-toolbar-actions > button,.cf-toolbar-actions > span { display:none }
  .cf-menu-open .cf-toolbar-actions { display:flex }
  .cf-menu-open .cf-toolbar-actions > button,.cf-menu-open .cf-toolbar-actions > span { display:block }
}

/* Dana 深色複審：對話框要蓋過側欄；側欄圖示不被長字擠小；登入頁對比 */
.overlay { z-index: 70 }
.os aside nav button svg { flex: 0 0 18px }
.cf-login .cf-lang { position: static; gap: 0; flex-wrap: wrap; justify-content: flex-end }
.cf-login .cf-lang button { border-radius: 0; border-right-width: 0; padding: 7px 10px }
.cf-login .cf-lang button:first-child { border-radius: 6px 0 0 6px }
.cf-login .cf-lang button:last-child { border-radius: 0 6px 6px 0; border-right-width: 1px }
.cf-login-theme { flex-wrap: wrap }
html[data-theme="dark"] .cf-login { --cf-line: #5f7a6d }
html[data-theme="dark"] .cf-login .cf-main { background: #23744f }
html[data-theme="dark"] .cf-login .cf-lang button.on { background: #23744f; border-color: #23744f }
html[data-theme="dark"] body .os2 .book-grid td.neg, html[data-theme="dark"] body .os2 .fin-table:not(.settle-table) td.neg, html[data-theme="dark"] body .os2 .acct-ledger td.neg, html[data-theme="dark"] body .os table.cf-cards:not(.settle-table) [data-neg] { color: #ff9d8a !important }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .cf-login { --cf-line: #5f7a6d }
  html:not([data-theme="light"]) .cf-login .cf-main { background: #23744f }
  html:not([data-theme="light"]) .cf-login .cf-lang button.on { background: #23744f; border-color: #23744f }
  html:not([data-theme="light"]) body .os2 .book-grid td.neg, html:not([data-theme="light"]) body .os2 .fin-table:not(.settle-table) td.neg, html:not([data-theme="light"]) body .os2 .acct-ledger td.neg, html:not([data-theme="light"]) body .os table.cf-cards:not(.settle-table) [data-neg] { color: #ff9d8a !important }
}
html[data-theme="dark"] .os2 .text-btn { color: #a5e3c4 }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .os2 .text-btn { color: #a5e3c4 } }
.os2 .settle-table .text-btn { color: #245e48 }
@media (max-width: 700px) { .os table.ep-table.cf-cards th { display: flow-root } }

/* 工作交辦箱 */
.cf-tk-fab { position: fixed; left: 16px; bottom: 16px; z-index: 65; width: 64px; height: 64px; border-radius: 12px; border: 2px solid #fff; background: #1d4d3c; color: #fff; font-size: 14px; font-weight: 700; line-height: 1.15; padding: 4px; cursor: grab; box-shadow: 0 4px 14px #0006; touch-action: none; user-select: none }
.cf-tk-fab b { position: absolute; top: -8px; right: -8px; min-width: 24px; height: 24px; line-height: 20px; border-radius: 12px; border: 2px solid #fff; background: #b42318; color: #fff; font-size: 13px; text-align: center; padding: 0 4px; box-sizing: border-box }
.os main { padding-bottom: 84px }
.cf-tk { z-index: 85 }
.cf-tk-body { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px }
.cf-tk-add { min-height: 52px; font-size: 17px; font-weight: 700; border: 0; border-radius: 10px; background: #1d4d3c; color: #fff; cursor: pointer }
.cf-tk-new, .cf-tk-card { background: #fff; border: 1px solid #c9d6cf; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px }
.cf-tk-new { border: 2px solid #1d4d3c }
.cf-tk-new h3 { margin: 0; font-size: 18px; color: #14261f }
.cf-tk-where { color: #3d5249; font-size: 13px }
.cf-tk label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 700; color: #2c4a3e }
.cf-tk textarea, .cf-tk select { width: 100%; box-sizing: border-box; font-size: 16px; font-weight: 400; padding: 9px 10px; border: 1px solid #8fa79b; border-radius: 8px; background: #fff; color: #14261f; font-family: inherit }
.cf-tk-group { display: flex; flex-direction: column; gap: 10px }
.cf-tk .cf-tk-group { border: 0; background: none; box-shadow: none; padding: 0; border-radius: 0 }
.cf-tk .cf-tk-group h3 { margin: 6px 0 0; padding: 0; font-size: 16px; color: #14261f; background: none; border: 0 }
.cf-tk-group h3 button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer }
.cf-tk-card header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.cf-tk-card header small { color: #3d5249; font-size: 13px }
.cf-tk-card h4 { margin: 0; font-size: 17px; line-height: 1.4; color: #14261f; white-space: pre-wrap; overflow-wrap: anywhere }
.cf-tk-card.closed { background: #f3f6f4 }
.cf-tk-def, .cf-tk-back { margin: 0; padding: 8px 10px; border-radius: 8px; background: #e8f1ec; color: #14261f; display: flex; flex-direction: column; gap: 2px; font-size: 15px; overflow-wrap: anywhere }
.cf-tk-def b, .cf-tk-back b { font-size: 13px; color: #2c4a3e }
.cf-tk-back { background: #fdecea } .cf-tk-back b { color: #8f1d13 }
.cf-tk-raw summary { font-size: 14px; color: #1d4d3c; cursor: pointer } .cf-tk-raw p { margin: 6px 0 0; white-space: pre-wrap; color: #14261f; overflow-wrap: anywhere }
.cf-tk-result { border-left: 3px solid #1d4d3c; padding-left: 10px; display: flex; flex-direction: column; gap: 6px; color: #14261f } .cf-tk-result p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere } .cf-tk-result > small { color: #3d5249 }
.cf-tk-ev { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #14261f } .cf-tk-ev > b { font-size: 13px; color: #2c4a3e }
.cf-tk-ch { background: #f3f6f4; border-radius: 6px; padding: 6px 8px; overflow-wrap: anywhere } .cf-tk-ch small { display: block; color: #3d5249; font-size: 12px } .cf-tk-ch span { display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline } .cf-tk-ch s { color: #6b3a33 } .cf-tk-ch i { font-style: normal; color: #3d5249 } .cf-tk-ch strong { color: #14261f }
.cf-tk-hid { color: #3d5249; font-size: 13px }
.cf-tk-form { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid #d5e0da; padding-top: 10px; color: #14261f }
.cf-tk label.cf-tk-pick { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400 } .cf-tk-pick input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 20px } .cf-tk-pick > span { min-width: 0; flex: 1 }
.cf-tk-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end }
.cf-tk-btns button { min-height: 44px; padding: 8px 16px; font-size: 16px; border-radius: 9px; border: 1px solid #8fa79b; background: #fff; color: #14261f; cursor: pointer }
.cf-tk-btns .cf-tk-go { background: #1d4d3c; border-color: #1d4d3c; color: #fff; font-weight: 700 } .cf-tk-btns .cf-tk-go:disabled, .cf-tk-btns .cf-tk-no:disabled { background: #c4d0ca; border-color: #c4d0ca; color: #3d5249 }
.cf-tk-btns .cf-tk-no { background: #b42318; border-color: #b42318; color: #fff; font-weight: 700 }
.cf-tk-btns .cf-tk-ghost { border-color: transparent; background: none; color: #3d5249; text-decoration: underline }
.cf-tk-msg { margin: 0; font-size: 14px; color: #1d4d3c; font-weight: 600 } .cf-tk-msg.bad { color: #b42318 }
.cf-tk .cf-fb-send { width: 100% }
.cf-tk-flash { outline: 3px solid #f59e0b !important; outline-offset: -2px }
@media (max-width: 700px) { .cf-tk-fab { left: auto; right: 12px; bottom: 76px; width: 58px; height: 58px; font-size: 13px; opacity: .94 } .os main { padding-bottom: 72px } }
@media (min-width: 701px) { .os aside { overflow-y: auto; bottom: 84px; padding-bottom: 16px } .os::before { content: ""; position: fixed; left: 0; bottom: 0; width: 236px; height: 84px; background: #112e28; z-index: 59 } }
.cf-tk .cf-tk-new h3 { margin: 0; padding: 0; font-size: 18px; color: #14261f; background: none; border: 0 }
.cf-tk-body > * { width: 100%; max-width: none; margin-left: 0; margin-right: 0; box-sizing: border-box; align-self: stretch }
.cf-tk-card { width: 100%; box-sizing: border-box }
.cf-tk select { -webkit-appearance: menulist; appearance: menulist; min-height: 44px }
.cf-tk-def b, .cf-tk-back b, .cf-tk-ev > b, .cf-tk-where { font-size: 14px }
.cf-tk textarea::placeholder { color: #55675e }
@media (min-width: 701px) and (max-width: 1100px) { .os::before { width: 205px } }

.cf-zoom { position: fixed; inset: 0; z-index: 10100; background: #000d; display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box }
.cf-zoom img { max-width: 100%; max-height: 100%; border-radius: 6px; background: #fff }
.cf-zoom button { position: fixed; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); min-height: 44px; font-size: 16px; padding: 10px 16px; border-radius: 9px; border: 0; background: #fff; color: #14261f; font-weight: 700; cursor: pointer }
.os2 .product-summary-photo, .os2 img.product-photo { cursor: zoom-in }
.cf-zoom img { width: min(92vw, 720px); height: auto; max-height: 82vh; object-fit: contain }
.cf-zoom img { cursor: zoom-in }
.cf-zoom.z2 { display: block; overflow: auto; padding: 0; touch-action: pan-x pan-y pinch-zoom }
.cf-zoom.z2 img { width: 200%; max-width: none; max-height: none; cursor: grab; display: block; margin: 0 auto }
.cf-zoom-tip { position: fixed; left: 16px; bottom: calc(26px + env(safe-area-inset-bottom)); color: #fff; font-size: 14px; background: #0009; padding: 6px 10px; border-radius: 8px }
.cf-acc-mcp{margin-top:18px;padding-top:12px;border-top:2px solid #cfdad3}.cf-acc-mcp p{font-size:14px;color:#3d5249}.cf-acc-row{display:flex;gap:8px;flex-wrap:wrap}.cf-acc-row select{flex:1;min-width:200px;font-size:16px;padding:8px}.cf-acc-url{display:flex;flex-direction:column;gap:6px;margin:8px 0}.cf-acc-url input{font-size:14px;padding:8px}.cf-acc-mcp ul{padding-left:18px}

/* Alesi 2026-11-11：上方工具列（問題反饋）捲動時一直在畫面內；反饋箱關閉鈕放左上、做大，不要去按到瀏覽器左上的叉叉 */
.cf-bar { position: sticky !important; top: 0 !important }
.cf-fb-top { justify-content: flex-start !important; gap: 16px }
.cf-fb-top .cf-fb-close { order: -1; font-size: 17px !important; min-height: 46px; padding: 10px 18px !important; border-radius: 10px !important; white-space: nowrap }
@media (max-width: 700px) { .cf-fb-top h2 { font-size: 16px } .cf-fb-top .cf-fb-close { font-size: 16px !important; padding: 8px 12px !important } }
html, body { overflow-x: clip !important }
.os .kpi h2 { font-size: clamp(20px, 1.85vw, 29px) }
/* Alesi 2026-11-11：財務帳號最上方就有「連接我的 Claude」 */
.cf-bar .cf-claude > button { background: #c7dda5 !important; color: #14261f !important; border-color: #c7dda5 !important; font-weight: 700 }
.cf-claude .overlay { position: fixed; inset: 0; z-index: 200; background: #102a2399; display: flex; align-items: center; justify-content: center; padding: 16px }
.cf-claude .dialog { background: #fff; color: #14261f; border-radius: 12px; padding: 28px; width: min(640px, 100%); max-height: 90vh; overflow: auto; position: relative; font: 15px/1.6 "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif; text-align: left; white-space: normal; color-scheme: light }
.cf-claude .dialog h2 { margin: 0 0 10px; font-size: 22px }
.cf-claude .dialog .close { position: absolute; right: 14px; top: 10px; border: 0 !important; background: none !important; font-size: 24px !important; color: #3d5249 !important }
.cf-claude .dialog .primary { background: #244d3d !important; color: #fff !important; border: 0 !important; font-size: 16px !important; padding: 10px 16px !important; border-radius: 8px !important; min-height: 44px }
.cf-claude .dialog .muted { color: #4d625a; font-size: 13px }
.cf-claude .dialog .claude-steps { margin: 8px 0 12px 18px; line-height: 1.7 }
.cf-claude .dialog .claude-url { display: flex; gap: 8px; flex-wrap: wrap }
.cf-claude .dialog .claude-url input { flex: 1; min-width: 220px; font-size: 14px; padding: 8px; border: 1px solid #9fb3aa; border-radius: 6px; color: #14261f; background: #fff }
.cf-claude .dialog .ai-fill-ok { color: #1d4d3c; font-weight: 600 }
.cf-claude .dialog p, .cf-claude .dialog li { color: #2c4a3e }
.cf-bar .cf-aidraft { position: relative } .cf-bar .cf-aidraft.has { background: #fff6d6 !important; border-color: #e0b84a !important; font-weight: 700 } .cf-aidraft b { display: inline-block; margin-left: 6px; min-width: 20px; padding: 0 5px; border-radius: 10px; background: #b42318; color: #fff; font-size: 12px; line-height: 18px; text-align: center }
@media (max-width: 700px) { .cf-tk-fab { width: 50px !important; height: 50px !important; font-size: 12px !important; opacity: .85 } .os main { padding-bottom: 96px } }
.cf-bar .cf-aidraft.has { color: #4a3800 !important }
@media (max-width: 700px) { .cf-claude .claude-url { flex-direction: column } .cf-claude .claude-url input { min-width: 0; width: 100% } .cf-claude .claude-url .primary { width: 100% } }
/* Alesi 2026-11-12：交辦箱、問題反饋跟系統一樣跟著深淺色 */
html[data-theme="dark"] .cf-fb, html[data-theme="dark"] .cf-tk { color-scheme: dark }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .cf-fb, html:not([data-theme="light"]) .cf-tk { color-scheme: dark } }
.cf-fb-cat { display: inline-block; margin: 4px 0 0 6px; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #e7eefb; color: #1e4fa3; font-weight: 600 } .cf-fb-cat.cat-alesi { background: #fff0d6; color: #7a4a00 } .cf-fb-cat.cat-wish { background: #efedff; color: #4b3fa0 } .cf-fb-cat.cat-decide { background: #fbebeb; color: #a52421 } .cf-fb-cat.cat-bug, .cf-fb-cat.cat-ui { background: #e5f4e4; color: #1d5c2e }
/* AOT／OA 財務總表手機（Alesi 2026-11-12：整表滑不動、卡片看不懂）
   整表：原本固定在左邊的「日期」170px＋「摘要」240px 比手機還寬，滑動時內容都在它們底下，看起來像沒動；手機只固定窄的日期欄。
   卡片：只列這筆的進出金額，餘額欄收起（看完整表才看）。 */
@media (max-width: 700px) {
  .cf-full-hint { margin: -2px 2px 8px; font-size: 13px; line-height: 1.5; color: #4a5d55 }
  .os2 .finance-six:not(.cf-as-cards) .pin-base { width: 112px !important; min-width: 112px !important; max-width: 112px !important; font-size: 12px }
  .os2 .finance-six:not(.cf-as-cards) .pin-subject { position: static !important; width: 170px !important; min-width: 170px !important; max-width: 170px !important; box-shadow: none }
  .os2 .finance-six:not(.cf-as-cards) .pin-base { box-shadow: 3px 0 3px #163f351a }
  .os2 .finance-six:not(.cf-as-cards) .zone-label { left: 120px }
  .os2 .finance-six:not(.cf-as-cards) th, .os2 .finance-six:not(.cf-as-cards) td { min-width: 130px; max-width: 130px }
  .os2 .finance-six:not(.cf-as-cards) { touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch }
  .os .finance-six table.cf-cards td.balance-cell { display: none !important }
}

@media (max-width: 700px) {
  .os2 .finance-six:not(.cf-as-cards) .pin-base *, .os2 .finance-six:not(.cf-as-cards) .pin-subject * { max-width: 100% !important; min-width: 0 !important; white-space: normal !important; box-sizing: border-box }
  .os2 .finance-six:not(.cf-as-cards) .pin-base { overflow: hidden }
}
@media (max-width: 700px) {
  .os2 .finance-six:not(.cf-as-cards) col:nth-child(1) { width: 112px !important }
  .os2 .finance-six:not(.cf-as-cards) col:nth-child(2) { width: 170px !important }
  .os2 .finance-six:not(.cf-as-cards) col:nth-child(n+3) { width: 130px !important }
}
html[data-theme="dark"] .cf-full-btn { background: #1f2a26; color: #cfe6da; border-color: #6f9c88 } html[data-theme="dark"] .cf-full-hint { color: #a9bdb4 }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .cf-full-btn { background: #1f2a26; color: #cfe6da; border-color: #6f9c88 } html:not([data-theme="light"]) .cf-full-hint { color: #a9bdb4 } }

/* Keep recovery actions readable beside long translated save warnings. */
.cloud-banner > button{flex-shrink:0;white-space:nowrap;min-height:44px}
@media(max-width:700px){.os2 .cloud-banner{display:block;margin:12px 16px 0}.os2 .cloud-banner > button{display:block;width:100%;min-height:44px;margin-top:10px;white-space:nowrap}}

/* Alesi 2026-11-18「電腦版登錄看系統左邊的看板上面有一些被遮住了」：左欄 14 顆按鈕在 720～900 高的螢幕放不下，下面幾顆被交辦箱底座蓋住、又看不出能捲。
   電腦版改緊湊排法，矮螢幕再縮；放不下時捲軸看得到，上下有淡光提示還有東西 */
@media (min-width: 701px) {
  .os aside { padding-top: 18px; scrollbar-width: thin; scrollbar-color: #7fa597 #112e28;
    background: linear-gradient(#112e28 30%, #112e2800) center top / 100% 36px no-repeat local, linear-gradient(#112e2800, #112e28 70%) center bottom / 100% 36px no-repeat local, radial-gradient(farthest-side at 50% 0, #c7dda566, #c7dda500) center top / 100% 12px no-repeat scroll, radial-gradient(farthest-side at 50% 100%, #c7dda566, #c7dda500) center bottom / 100% 12px no-repeat scroll, #112e28 }
  .os aside .workspace-label { margin: 18px 12px 10px }
  .os aside nav { gap: 2px }
  .os aside nav button { padding: 9px 12px; min-height: 40px }
}
@media (min-width: 701px) and (max-height: 820px) {
  .os aside nav button { padding: 6px 12px; min-height: 34px }
  .os aside .workspace-label { margin: 12px 12px 6px }
}
@media (min-width: 701px) and (max-height: 700px) {
  .os aside { padding-top: 12px; bottom: 64px }
  .os::before { height: 64px }
  .cf-tk-fab { width: 50px; height: 50px; bottom: 7px; font-size: 12px; border-radius: 10px }
  .os aside nav button { padding: 4px 12px; min-height: 30px; font-size: 14px }
  .os aside .workspace-label { display: none }
  .os aside nav { margin-top: 10px }
}
@media (min-width: 701px) and (max-width: 1100px) {
  .os aside { padding-left: 10px; padding-right: 10px }
  .os aside nav button { font-size: 14px; gap: 8px; padding-left: 8px; padding-right: 6px }
}
/* 放不下時底部固定一條「往下還有」，捲到底就消失 */
@media (min-width: 701px) {
  .os aside::-webkit-scrollbar { width: 8px } .os aside::-webkit-scrollbar-thumb { background: #8fb3a5; border-radius: 4px } .os aside::-webkit-scrollbar-track { background: #0c231e }
  .os aside { scrollbar-width: auto; scrollbar-color: #8fb3a5 #0c231e }
  .os aside.cf-side-more::after { content: "▼ 往下還有 / More"; position: sticky; bottom: -16px; display: block; margin: 8px 0 -16px; padding: 7px 0 9px; border-radius: 6px 6px 0 0; text-align: center; font-size: 13px; font-weight: 700; color: #14261f; background: #c7dda5; box-shadow: 0 -6px 12px #112e28 }
  .cf-tk-fab { border-color: #c7dda5 }
}

/* Casey CASEY-VIS-01: keep summary text outside the mobile task button lane. */
@media (max-width: 700px) { .os2 .target-page-total { padding-right: 76px; } .os2 .target-page-total .cc2-row { flex-wrap: wrap; } .os2 .target-page-total .cc2-row b { margin-left: auto; } }
html[data-theme="dark"] .cf-tk-fab { border-color: #d7ebb5 !important; box-shadow: 0 0 0 2px #0f1512, 0 4px 14px #0008 !important }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .cf-tk-fab { border-color: #d7ebb5 !important; box-shadow: 0 0 0 2px #0f1512, 0 4px 14px #0008 !important } }

/* 手機存檔狀態小標（Victor 2026-11-18）：左欄收起時也看得到「存到…中／已存」；固定自己的配色，深淺色都清楚 */
.cloud-chip{display:none}
@media (max-width:700px){
  .cloud-chip{display:block;position:fixed;left:12px;bottom:14px;z-index:70;margin:0;padding:8px 12px;border-radius:10px;font-size:13px;font-weight:600;line-height:1.3;max-width:62vw;background:#e3f2e8;color:#14422c;border:1px solid #6fae87;box-shadow:0 2px 8px rgba(0,0,0,.18);pointer-events:none}
  .cloud-chip-saving{background:#fff4d6;color:#5a3d00;border-color:#d9a93a}
  html[data-theme="dark"] .cloud-chip{background:#163323;color:#d8f2e2;border-color:#4f9a6c}
  html[data-theme="dark"] .cloud-chip-saving{background:#3a2c08;color:#ffe6a6;border-color:#c99a2e}
}
@media (max-width:700px) and (prefers-color-scheme: dark){
  html:not([data-theme="light"]) .cloud-chip{background:#163323;color:#d8f2e2;border-color:#4f9a6c}
  html:not([data-theme="light"]) .cloud-chip-saving{background:#3a2c08;color:#ffe6a6;border-color:#c99a2e}
}