/* 「管理 ▾ → 員工」分頁(public/team-ui.js)與它裡面的出勤(staff-attendance-ui.js)、排班(team-roster-ui.js)。
 * 顏色一律用 app.css 的色票(--line、--muted、--panel、--sel-bg…);卡片、欄位、開關列、狀態小標籤、分頁列用 settings-kit.css 的共用元件
 * (.ks-tabs、.ks-sec、.ks-f、.ks-tg、.ks-note、.ks-pill、.ks-list),這裡只補員工分頁自己的排版。
 * 舊 WebView(商米 Chrome 56):不用 gap、grid、:has()、:is()、min()、clamp();觸控區 >= 40px(表單欄位與主要按鈕 44px)。 */
#tab-team .team-body { padding: 2px 0 24px; }
#tab-team .panel-head { margin-bottom: 6px; }

/* 第一層分頁(員工名冊、出勤、排班…):用共用 .ks-tabs,手機上一排左右滑,不擠成好幾排 */
#tab-team .team-panes { margin: 0 0 14px; }

/* 第二層切換(每日 / 每月、班表 / 劃休…、整月 / 一週、待審核 / 全部):共用分段鈕 .ks-seg(settings-kit.css),這裡只給外距 */
#tab-team .ks-seg, #clk-panel .ks-seg { margin: 0 8px 8px 0; }

/* 工具列(切換、日期、分店、主要動作排一行,放不下換行) */
#tab-team .team-actions { margin: 0 0 10px; }
#tab-team .team-actions > *, #modal .team-actions > * { vertical-align: middle; }
#tab-team .team-actions > button, #tab-team .team-actions > label, #tab-team .team-actions > select, #tab-team .team-actions > input,
#modal .team-actions > button, #modal .team-actions > label { margin: 0 8px 8px 0; }
#tab-team .team-actions > button, #modal .team-actions > button { min-height: 44px; }
.team-tool { display: inline-block; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font-family: inherit; font-size: 15px; box-sizing: border-box; max-width: 100%; vertical-align: middle; }
select.team-tool { padding-right: 6px; }
.team-actions .team-check, .team-check { display: inline-block; min-height: 44px; line-height: 44px; white-space: nowrap; cursor: pointer; font-size: 14.5px; }
.team-check input { width: 20px; height: 20px; margin: 0 6px 0 0; vertical-align: -4px; }

/* 一段的小標題(名冊視窗、通知設定裡的「我的 Telegram」「員工通知群組」…):同 settings-kit 的 .ks-sec-t,上面一條分隔線 */
#tab-team .team-body h4, #modal h4.team-h4 { margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 16px; font-weight: 800; line-height: 1.4; }
#tab-team .team-body > h4:first-child, #tab-team .team-body > .ks-note:first-child + h4 { margin-top: 4px; padding-top: 0; border-top: 0; }
#tab-team .team-body > .hint:first-child, #tab-team #tr-main > .hint:first-child { margin-top: 0; }
#tab-team .team-body p.hint, #modal p.hint { line-height: 1.6; }
#tab-team .ks-note { margin: 0 0 10px; }
#modal .team-h4 + .team-actions, #modal .team-h4 + p.hint { margin-top: 0; }

/* 表格(桌面);手機上由 table-cards.css 變成一列一張卡 */
.team-table { width: 100%; border-collapse: collapse; margin: 4px 0 12px; font-size: 14.5px; }
.team-table th, .team-table td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.team-table thead th { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; border-bottom-width: 2px; }
.team-table td .hint, .team-table td small.hint { display: inline; margin: 0; font-size: 12.5px; white-space: normal; }
.team-table td br + small.hint { display: inline-block; margin-top: 2px; }
.team-table button.sm { margin: 2px 6px 2px 0; }
.team-table td:last-child button.sm:last-child { margin-right: 0; }
.team-table select, .team-table input:not([type="checkbox"]):not([type="radio"]) { min-height: 40px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font-family: inherit; font-size: 14.5px; box-sizing: border-box; max-width: 100%; }
.team-table input[type="checkbox"] { width: 20px; height: 20px; }
/* 手機卡片:沒有值的格子不畫(不然欄名疊在下一格上) */
@media (max-width: 700px) {
  #tab-team table.rt-cards > tbody > tr > td:empty, #modal table.rt-cards > tbody > tr > td:empty { display: none !important; }
  #tab-team table.rt-cards > tbody > tr > td, #modal table.rt-cards > tbody > tr > td { min-height: 22px; }
  #tab-team table.rt-cards select, #modal table.rt-cards select, #tab-team table.rt-cards input:not([type="checkbox"]):not([type="radio"]), #modal table.rt-cards input:not([type="checkbox"]):not([type="radio"]) { width: 100%; }
}

/* 狀態小標籤:樣子同 settings-kit 的 .ks-pill(顏色由 .ks-pill.ok / warn / info 決定,這裡不另外寫顏色) */
.team-st.ks-pill { font-size: 12.5px; }

/* 卡片(群組、請假、換班、邀請 QR…):第一行標題與狀態,下面說明,最後一排按鈕 */
.team-card { margin: 0 0 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius, 12px); background: var(--panel); box-sizing: border-box; font-size: 14.5px; line-height: 1.6; }
.team-card > b { font-size: 15px; }
.team-card .hint { margin-top: 2px; }
.team-card-a { margin-top: 8px; }
.team-card-a button, .team-card > button { min-height: 40px; margin: 4px 8px 0 0; }
.team-card-a button:last-child { margin-right: 0; }
.team-card summary { min-height: 44px; line-height: 44px; margin: -12px -14px; padding: 0 14px; cursor: pointer; font-weight: 800; }
.team-card[open] summary { margin-bottom: 4px; }
/* 綁定碼:大字、好抄 */
.team-code { margin: 6px 0; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg); font-size: 20px; font-weight: 800; letter-spacing: 1px; text-align: center; overflow-wrap: anywhere; }
.team-steps { margin: 0; padding-left: 22px; line-height: 1.7; }
.team-steps li { margin: 0 0 8px; }

/* 清單(職級、雇主):共用 .ks-list / .ks-li,右邊的編輯鈕 */
#tab-team .ks-list { margin: 0 0 12px; }
#tab-team .ks-li-t small { white-space: normal; }
#tab-team .ks-li > button { flex: none; min-height: 40px; margin-left: 10px; }

/* 表單(新增 / 編輯視窗):標籤在上、欄位在下,欄位 44px 高 */
.team-form label { display: block; margin: 0 0 12px; font-size: 14px; font-weight: 700; line-height: 1.45; }
.team-form label.team-check { font-weight: 400; line-height: 1.5; min-height: 0; white-space: normal; padding: 4px 0; }
.team-form input:not([type="checkbox"]):not([type="radio"]), .team-form select, .team-form textarea {
  display: block; width: 100%; min-height: 44px; margin-top: 4px; padding: 9px 10px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font-family: inherit; font-size: 15px; font-weight: 400; }
.team-form textarea { min-height: 96px; line-height: 1.55; }
.team-form fieldset { margin: 12px 0; padding: 10px 14px 4px; border: 1px solid var(--line); border-radius: var(--radius, 12px); }
.team-form legend { padding: 0 6px; font-size: 14px; font-weight: 800; color: var(--muted); }
.team-form .hint { margin: -6px 0 10px; font-size: 12.5px; line-height: 1.55; }
@media (min-width: 701px) {
  /* 寬螢幕的員工資料表單排兩欄(用 inline-block,不用 grid) */
  .team-form.team-2col > label { display: inline-block; width: 48%; margin-right: 4%; vertical-align: top; box-sizing: border-box; }
  .team-form.team-2col > label:nth-of-type(2n) { margin-right: 0; }
  .team-form.team-2col > label.team-check { display: block; width: auto; margin-right: 0; }
  .team-form.team-2col fieldset > label { display: inline-block; width: 48%; margin-right: 4%; vertical-align: top; }
  .team-form.team-2col fieldset > label:nth-of-type(2n) { margin-right: 0; }
}

/* 頁面上(不在彈窗裡)的存檔列:靠右 */
#tab-team .team-body .m-actions, #tab-team #tr-main .m-actions { margin: 14px 0 6px; text-align: right; }
#tab-team .team-body .m-actions button { min-height: 44px; margin: 0 0 8px 8px; }
/* 設定頁:共用的 .ks-sec 區段放在一張卡裡 */
.team-sheet { margin: 0 0 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius, 12px); background: var(--panel); }
.team-sheet .ks-f-c input[type="number"] { width: 140px; }
@media (max-width: 640px) { .team-sheet { padding: 12px; } }

.team-audit { margin: 4px 0 8px; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.team-audit li { margin: 0; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.team-audit li:first-child { border-top: 0; }
.team-audit li .hint { margin: 0; white-space: normal; }
#tab-team .team-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
#tab-team .team-scroll select { min-width: 96px; }
.team-qr { text-align: center; margin: 10px 0 4px; }
.team-qr img { width: 220px; height: 220px; max-width: 100%; background: #fff; }
.team-link { text-align: center; overflow-wrap: anywhere; font-size: 13px; }
.team-link code { display: inline-block; padding: 6px 10px; border-radius: 8px; background: var(--bg); }

/* 員工 → 出勤(public/staff-attendance-ui.js) */
.att-flag.ks-pill { margin: 1px 4px 1px 0; font-weight: 700; }
.att-warn { font-size: 12.5px; color: #b42318; }
td.att-warn { font-weight: 700; }
.att-old td { color: var(--muted); text-decoration: line-through; }
.att-old td button { text-decoration: none; }
.att-person { cursor: pointer; }
.att-person.on td { background: #fff7ed; }
.att-detail { margin: 4px 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--sel-bg); border-radius: 10px; }
.att-detail > b { display: block; margin: 0 0 4px; font-size: 15px; }
.att-detail .team-table { margin-bottom: 0; }
@media (max-width: 700px) { .att-detail { padding: 8px; } }
/* 設定頁的段落標題用 .ks-sec-t,不吃上面 h4 的分隔線 */
#tab-team .team-body h4.ks-sec-t { margin: 0 10px 0 0; padding: 0; border-top: 0; }
/* 表單裡不是「標籤在上、欄位在下」的幾種:開關列、時分下拉、行內小數字 */
.team-form label.ks-tg { display: flex; margin: 0; font-size: 14.5px; font-weight: 400; }
.team-form label.ks-tg input { margin-top: 1px; }
.team-form .time-hm select, .team-form .tr-time select { display: inline-block; width: auto; min-width: 84px; }
.team-form .tr-time { display: block; margin-top: 4px; }
.team-form .time-hm { margin-top: 4px; }
/* fieldset 預設最小寬 = 內容寬,裡面有寬表格時會把整頁撐破;改成跟著外框 */
.team-form fieldset { min-width: 0; }
.team-audit .list-more { padding: 8px; border-top: 1px solid var(--line); }

/* 員工 → 今天(public/team-today-ui.js):待你處理、數字格(可點篩選)、今天的班、要注意。顏色用共用色票(settings-kit.css) */
#tab-team .tt-day { margin: 0 0 10px; }
#tab-team .tt-day b { font-size: 20px; margin-right: 8px; }
/* 「今天」最上面的「員工設定還缺 N 項」:整條可點,到設定總覽 */
#tab-team .tt-health { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; margin: 0 0 10px; font: inherit; text-align: left; cursor: pointer; }
#tab-team .tt-health span { flex: 0 0 auto; margin-left: 10px; font-weight: 700; }
.tt-card { margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow1); }
.tt-h { display: flex; align-items: center; margin: 0 0 8px; }
.tt-h h3 { margin: 0 8px 0 0; font-size: 17px; }
.tt-link { margin-left: auto; min-height: 40px; padding: 0 4px; border: 0; background: none; color: var(--accent); font-weight: 700; cursor: pointer; }
.ks-note .tt-link { margin-left: 4px; min-height: 0; padding: 0; }
.tt-ok { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--ok-bg); color: var(--ok-fg); font-weight: 700; }
.tt-todo { display: flex; align-items: center; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.tt-todo:first-of-type { border-top: 0; }
.tt-who { flex: 1 1 220px; min-width: 0; }
.tt-who b { display: block; font-size: 16px; }
.tt-who small { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; }
.tt-acts { flex: none; }
.tt-acts button { min-height: 44px; margin: 4px 0 4px 8px; }
.tt-kpis { margin: 0 -5px 10px; }
.tt-kpis:after { content: ""; display: table; clear: both; }
.tt-kpi { float: left; width: calc(25% - 10px); margin: 0 5px 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow1); text-align: left; cursor: pointer; }
.tt-kpi b { display: block; font-size: 30px; line-height: 1.15; }
.tt-kpi span { color: var(--muted); font-size: 13px; }
.tt-kpi.is-ok b { color: var(--ok-fg); }
.tt-kpi.is-warn b { color: var(--warn-fg); }
.tt-kpi.on { box-shadow: inset 0 0 0 2px var(--accent); }
.tt-cols:after { content: ""; display: table; clear: both; }
.tt-c { float: left; width: 50%; padding-right: 14px; box-sizing: border-box; }
.tt-c + .tt-c { padding: 0 0 0 0; }
.tt-gh { margin: 12px 0 2px; font-weight: 800; }
.tt-gh:first-of-type { margin-top: 0; }
.tt-gh small { margin-left: 8px; color: var(--muted); font-weight: 400; }
.tt-row { display: flex; align-items: center; min-height: 52px; border-top: 1px solid var(--line); }
.tt-av { flex: none; width: 34px; height: 34px; margin-right: 10px; border-radius: 50%; background: #e9ecef; color: #495057; font-weight: 800; text-align: center; line-height: 34px; }
.tt-row .ks-pill { margin-left: 8px; }
@media (max-width: 900px) { .tt-c { float: none; width: auto; padding: 0; } }
@media (max-width: 600px) { .tt-kpi { width: calc(50% - 10px); } .tt-kpi b { font-size: 26px; } .tt-acts { width: 100%; text-align: right; } }

/* 員工 → 設定總覽(public/team-setup-ui.js):完成度檢查表、白話規則句(數字可改 + 例子)、一步一步設定 */
.tsu-card { margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow1); }
.tsu-hero { display: flex; align-items: center; flex-wrap: wrap; }
.tsu-hero > div { flex: 1 1 240px; min-width: 0; }
.tsu-hero h3 { margin: 0; font-size: 18px; }
.tsu-hero .hint { margin: 2px 0 0; }
.tsu-hero > button { min-height: 44px; margin: 6px 0; }
.tsu-big { margin-right: 14px; font-size: 40px; line-height: 1; }
.tsu-meter { height: 12px; margin: 10px 0 6px; border-radius: 999px; background: #e9ecef; overflow: hidden; }
.tsu-meter i { display: block; height: 100%; border-radius: 999px; background: var(--warn-fg); }
.tsu-meter i.is-ok { background: var(--ok-fg); }
#tab-team .tsu-chk { display: flex; align-items: center; width: 100%; min-height: 56px; margin: 0; padding: 8px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.tsu-mark { flex: none; width: 28px; height: 28px; margin-right: 12px; border-radius: 50%; text-align: center; line-height: 28px; font-weight: 800; }
.tsu-chk.is-ok .tsu-mark { background: var(--ok-bg); color: var(--ok-fg); }
.tsu-chk.is-todo .tsu-mark { background: var(--warn-bg); color: var(--warn-fg); }
.tsu-chk.is-opt .tsu-mark { background: var(--mute-bg); color: var(--mute-fg); }
.tsu-t { flex: 1; min-width: 0; }
.tsu-t b { display: block; font-size: 15px; }
.tsu-t small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.tsu-go { flex: none; margin-left: 10px; color: var(--accent); font-weight: 700; }
#tab-team h3.tsu-h { margin: 18px 0 8px; font-size: 17px; }
.tsu-sh h3 { margin: 0 0 6px; font-size: 17px; }
.tsu-rule { padding: 10px 0; border-top: 1px solid var(--line); }
.tsu-sh + .tsu-rule, .tsu-sh + .ks-note + .tsu-rule { border-top: 0; }
.tsu-s { font-size: 16px; line-height: 2.2; }
#tab-team input.tsu-num { display: inline-block; width: 64px; min-height: 40px; margin: 0 4px; padding: 4px 6px; border: 0; border-bottom: 2px solid var(--primary-bd); border-radius: 6px 6px 0 0; background: var(--primary-bg); color: var(--primary-text); font-size: 16px; font-weight: 800; text-align: center; }
.tsu-ex { margin-top: 2px; padding: 6px 10px; border-radius: 8px; background: var(--info-bg); color: var(--info-fg); font-size: 14px; line-height: 1.6; }
.tsu-ex b { color: var(--info-fg); }
.tsu-save { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 10px; }
.tsu-save button { min-height: 44px; margin: 4px 0 4px 8px; }
.tsu-dirty { margin-right: auto; color: var(--warn-fg); font-weight: 700; }
.tsu-steps { margin: 0 0 12px; }
#tab-team .tsu-steps button { min-height: 48px; margin: 0 6px 6px 0; padding: 4px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-weight: 700; }
#tab-team .tsu-steps button.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); color: var(--primary-text); }
#tab-team .tsu-steps button.done { color: var(--ok-fg); }
.tsu-nav { display: flex; justify-content: space-between; margin: 4px 0 14px; }
.tsu-nav button { min-height: 48px; }

/* 員工設定總覽「進階」:收起來的少用規則;必填欄位的勾選放在句子裡 */
.tsu-adv > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 10px; list-style: none; }
.tsu-adv > summary::-webkit-details-marker { display: none; }
.tsu-adv > summary::before { content: "›"; display: inline-block; transition: transform .15s; }
.tsu-adv[open] > summary::before { transform: rotate(90deg); }
.tsu-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 6px; font-weight: 600; }
.tsu-chip input { width: 20px; height: 20px; margin: 0; }

/* 通知設定「通知內容」:每一則一格,下面是可以插入的 {名稱} 與預覽 */
.ntx > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 10px; }
.ntx-b { margin: 18px 0 2px; }
.ntx-g { margin: 12px 0 4px; }
.ntx-row { padding: 10px 0; border-top: 1px solid var(--line); }
.ntx-row textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; }
.ntx-vars { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.ntx-pv { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }

/* 規則設定:尚未啟用的規則收在表格下面,只說明、不能改 */
.pol-off { margin-top: 12px; }
.pol-off > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--muted); }
.pol-off-list { margin: 4px 0 0; padding-left: 18px; }
.pol-off-list li { margin: 6px 0; }
/* 通知設定裡的定時通知總表、送達失敗清單(public/team-jobs-ui.js) */
.tjob-list, .tjob-fails { list-style: none; margin: 0 0 12px; padding: 0; }
.tjob-list > li, .tjob-fails > li { margin: 0 0 8px; }
.tjob-off { opacity: .75; }
.tjob-bad { color: var(--warn); }
.tjob-why { margin: 4px 0 2px; color: var(--warn); font-size: 13px; }
.tjob-time { margin: 6px 0 0; }
.tjob-time select { margin-left: 6px; }
/* 通知設定裡的群組廣播(public/team-broadcast-ui.js):清單沿用上面定時通知總表的卡片;這裡只有發送時間那一行、預覽框、星期按鈕 */
.bc-when { margin: 4px 0 2px; font-size: 15px; font-weight: 700; }
.bc-to .ks-pill { margin-right: 2px; }
.bc-text { overflow-wrap: anywhere; }
.bc-pv { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.bc-pv[hidden] { display: none; }
.bc-pv-part { margin: 0 0 10px; }
.bc-pre { margin: 6px 0 4px; padding: 10px 12px; border-radius: 9px; background: #f3f6fb; color: var(--ink); font: inherit; font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
#bc-off button, #bc-nogroup button { margin-left: 8px; min-height: 40px; }
.bc-today { color: var(--ink); }
.bc-more { margin: 4px 0 12px; }
.bc-more > summary { min-height: 44px; line-height: 44px; cursor: pointer; color: var(--muted); font-weight: 700; }
.bc-more input[type="number"] { width: 96px; min-height: 44px; }
#bc-form h3 { margin-bottom: 10px; }
#bc-form .team-form > .hint:first-child { margin-top: 4px; }
#bc-form .bc-f-l { margin-bottom: 4px; }
#bc-form .bc-days { margin: 0 0 12px; }
#bc-form .bc-day { display: inline-block; width: calc((100% - 42px) / 7); max-width: 44px; height: 44px; margin: 0 6px 6px 0; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink); font-size: 15px; font-weight: 700; cursor: pointer; }
#bc-form .bc-day.on { border-color: var(--ink); background: var(--ink); color: #fff; }
#bc-form .bc-day:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#bc-form .bc-f-cf { margin: -4px 0 12px; }
#bc-form .bc-f-cf label.team-check { margin: 0; white-space: normal; line-height: 1.5; min-height: 0; padding: 4px 0; }
#bc-form .bc-f-err { margin: 8px 0 0; text-align: left; }
#bc-form .bc-f-err[hidden] { display: none; }
#bc-form .bc-f-del { margin-right: auto; }

/* 匯出小視窗(public/export-ui.js):選哪一份、篩選列、預覽。顏色用 app.css 的色票;舊 WebView 不用 gap、grid */
#export-ask .export-pick { display: block; margin: 10px 0; }
#export-ask select, #export-ask input[type="month"], #export-ask input[type="date"] { min-height: 44px; max-width: 100%; }
#export-ask details { margin: 8px 0; }
#export-ask details > summary { min-height: 44px; line-height: 44px; cursor: pointer; }
#export-ask details .team-form { max-height: 220px; overflow-y: auto; }
#export-preview { min-height: 44px; margin: 8px 0; }
#export-preview .err { margin: 6px 0; color: var(--warn); }
.export-sample { max-width: 100%; margin: 6px 0; overflow-x: auto; }
.export-sample table { border-collapse: collapse; font-size: 13px; }
.export-sample th, .export-sample td { padding: 4px 8px; border: 1px solid var(--line); text-align: left; white-space: nowrap; }
.export-sample th { background: var(--panel); }
/* 薪資(public/team-pay-ui.js):設定卡、級距與費率、試算、員工資料裡的薪資與投保 */
.pay-card { margin: 0 0 14px; }
.pay-card h3 { margin: 0 0 6px; font-size: 17px; }
.pay-num { display: block; margin-top: 4px; font-weight: 400; }
.team-form .pay-num input[inputmode], .pay-try .pay-num input[inputmode] { display: inline-block; width: 120px; min-height: 44px; margin: 0 4px 0 0; font-size: 16px; box-sizing: border-box; vertical-align: middle; }
.pay-law { margin: 0 0 10px; padding-left: 18px; line-height: 1.7; }
.pay-try span, .pay-try button { display: inline-block; margin: 0 8px 6px 0; vertical-align: middle; }
.pay-try b { margin-right: 8px; }
.pay-prem td:nth-child(2), .pay-prem td:nth-child(3), .pay-prem th:nth-child(2), .pay-prem th:nth-child(3) { text-align: right; }
.pay-total td { font-weight: 700; }
.pay-warn { color: var(--danger, #b42318); }
/* 薪資草稿(public/team-pay-run-ui.js):月份分店列、每人一列點開看每一項、固定加項與本月項目、預覽試算、計算規則 */
.pr-card { margin: 0 0 14px; }
.pr-bar > * { margin: 0 8px 8px 0; }
.pr-status { margin: 4px 0 2px; font-size: 15px; }
.pr-totals { margin: 8px 0 10px; }
.pr-totals > span { display: inline-block; margin: 0 14px 4px 0; }
.pr-net { font-size: 17px; }
.pr-people { margin: 0 0 12px; border-top: 1px solid var(--line); }
.pr-person { border-bottom: 1px solid var(--line); }
.pr-person-h { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 8px 10px; box-sizing: border-box; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 9px; }
.pr-person.on .pr-person-h { background: var(--sel-bg); color: var(--sel-fg, #fff); border-radius: 9px; }
.pr-person.on .pr-pn small { color: inherit; opacity: .8; }
.pr-person.on .pr-warnmark { color: inherit; }
.pr-pn { flex: 1 1 auto; min-width: 0; font-weight: 700; }
.pr-pn small { display: block; font-weight: 400; }
.pr-warnmark { flex: none; margin: 0 8px; font-size: 13px; }
.pr-pnet { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.pr-detail { padding: 6px 4px 12px; }
.pr-line { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.pr-line-h { display: flex; justify-content: space-between; align-items: baseline; }
.pr-ln { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.pr-amt { flex: none; margin-left: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pr-neg { color: var(--warn); }
.pr-off .pr-amt, .pr-off .pr-ln { opacity: .7; }
.pr-lt { margin: 2px 0 0; line-height: 1.55; }
.pr-lact { margin: 4px 0 0; }
.pr-item, .pr-rule, .pr-confirm { margin: 0 0 10px; padding: 8px 10px 2px; border: 1px solid var(--line); border-radius: 12px; }
.pr-confirm { margin: 10px 0; padding: 10px 12px 2px; }
.pr-warns { margin: 4px 0 8px; padding-left: 18px; }
.pr-rule > b { margin-right: 8px; }
.pr-ver { font-weight: 400; }
.pr-labels { margin: 0 0 10px; }
.pr-labels > summary { min-height: 44px; line-height: 44px; cursor: pointer; }
/* 匯入調整表(public/team-pay-import-ui.js)與員工薪資單設定(public/team-pay-slip-ui.js) */
.pi-seg { margin: 0 0 10px; }
.pi-seg > button { margin: 0 8px 6px 0; }
.pi-scroll { max-width: 100%; overflow-x: auto; margin: 6px 0 8px; }
.pi-table { min-width: 560px; }
.pi-table th, .pi-table td { vertical-align: top; }
.pi-n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pi-bad > td { background: var(--warn-bg, #fff5f5); }
.pi-errs { margin: 0; padding-left: 16px; }
.pi-sum { margin: 10px 0 4px; }
.pi-rec { border-bottom: 1px solid var(--line); }
.pi-rec-h { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 8px 10px; box-sizing: border-box; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 9px; }
.pi-rec.on .pi-rec-h { background: var(--sel-bg); color: var(--sel-fg, #fff); }
.pi-rec.on .pi-rn small { color: inherit; opacity: .8; }
.pi-rn { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.pi-rn small { display: block; }
.pi-rs { flex: none; margin-left: 10px; font-size: 13px; text-align: right; }
.pi-rec-b { padding: 6px 10px 10px; }
.pi-rl { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.pi-rl > span:first-child { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.pi-rl small { display: block; }
#pay-slip-warn { margin: 8px 0; font-weight: 700; }
#pay-slip-warn[hidden] { display: none; }
@media (max-width: 520px) { .pi-rec-h { flex-wrap: wrap; } .pi-rs { margin: 4px 0 0; text-align: left; flex-basis: 100%; } }
/* 員工資料視窗:身分證照片(正面、反面各一列;查看時才載入圖) */
#modal .team-idp-row { margin: 0 0 6px; }
#modal .team-idp-img { display: block; max-width: 100%; max-height: 60vh; margin: 6px 0; border: 1px solid var(--line); border-radius: 8px; }
