/* 「管理 ▾ → 員工 → 排班」(public/team-roster-ui.js)。舊 WebView:不用 gap、不用 grid;班表很寬,只在表格自己的框裡左右捲,整頁不橫向捲動。
 * 分段切換(班表 / 劃休…、整月 / 一週、待審核 / 全部)、卡片、狀態小標籤、表單都在 team-ui.css 與 settings-kit.css,這裡只放排班自己的東西。 */
#tab-team .tr-head { margin: 0 0 6px; }
#tab-team .tr-head > select { margin: 0 8px 8px 0; vertical-align: middle; }
#tab-team .tr-ym { display: inline-block; white-space: nowrap; vertical-align: middle; margin: 0 8px 8px 0; }
#tab-team .tr-ym b { display: inline-block; min-width: 108px; padding: 0 6px; font-size: 16px; text-align: center; vertical-align: middle; }
#tab-team .tr-ym button { min-width: 44px; min-height: 44px; padding: 0 12px; font-size: 18px; font-weight: 800; vertical-align: middle; }
#tab-team .tr-subs { margin: 0 0 6px; }
#tab-team .tr-actions, #tab-team .tr-viewbar { margin: 8px 0; }
#tab-team .tr-actions > button, #tab-team .tr-viewbar > button { min-height: 44px; margin: 0 8px 8px 0; }
#tab-team .tr-viewbar .tr-ym b { min-width: 0; font-size: 14.5px; }
#tab-team .tr-status { margin: 6px 0; font-size: 15px; font-weight: 700; }
.tr-conf { border: 1px solid #fde68a; background: #fff7ed; border-radius: 10px; padding: 8px 12px; margin: 6px 0 10px; }
.tr-conf summary { min-height: 40px; line-height: 40px; cursor: pointer; font-weight: 700; color: #92400e; }
.tr-conf ul { margin: 4px 0 6px; padding-left: 18px; max-height: 260px; overflow-y: auto; font-size: 14px; line-height: 1.55; }
.tr-conf li { margin: 0 0 4px; }
.tr-conf li.tr-block { color: #b42318; }
#tab-team .tr-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; }
.tr-grid { border-collapse: collapse; font-size: 13px; }
.tr-grid th, .tr-grid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 3px 2px; text-align: center; min-width: 40px; vertical-align: top; }
.tr-grid thead th { background: var(--bg); font-weight: 700; line-height: 1.2; }
.tr-grid thead th small { display: block; font-weight: 400; color: var(--muted); }
.tr-grid .tr-name { position: -webkit-sticky; position: sticky; left: 0; background: var(--panel); z-index: 1; text-align: left; min-width: 64px; max-width: 96px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 8px; }
.tr-grid thead .tr-name { background: var(--bg); }
.tr-grid .tr-wkend { color: #b45309; }
.tr-grid .tr-closed { background: var(--bg); color: var(--muted); }
.tr-cell { cursor: pointer; height: 40px; }
.tr-chip { display: inline-block; margin: 1px; padding: 3px 5px; border-radius: 6px; background: #e7f1fb; color: #1864ab; font-weight: 700; white-space: nowrap; cursor: pointer; }
.tr-chip.tr-sel { outline: 2px solid var(--amber); background: #fff4e0; color: #9a5b00; }
.tr-moving .tr-cell { background: #fff7ed; }
.tr-off { display: inline-block; margin: 1px; padding: 3px 5px; border-radius: 6px; background: #e6f4ea; color: #1e7b34; font-weight: 700; }
.tr-off.tr-lv { background: #fdecea; color: #b42318; }
.tr-legend { font-size: 13px; line-height: 1.7; }
.tr-pick { margin: 0 0 4px; }
.tr-pick button { display: inline-block; margin: 0 8px 8px 0; min-height: 56px; min-width: 104px; vertical-align: top; }
.tr-pick button small { display: block; font-size: 12.5px; font-weight: 400; }
.tr-time select { display: inline-block; width: auto; margin: 4px 4px 0 0; }
.tr-set .tr-inline { margin: 6px 0 10px; font-size: 14.5px; line-height: 2.6; }
input.tr-num { display: inline-block !important; width: 72px !important; min-height: 40px !important; margin: 0 4px !important; padding: 6px 8px !important; text-align: center; vertical-align: middle; }
.team-form label.tr-wd, .tr-wd { display: inline-block; min-height: 40px; line-height: 40px; margin: 0 14px 4px 0; font-weight: 400; }
.tr-need td, .tr-need th { padding: 4px 2px; text-align: center; }
.tr-need input.tr-num { width: 56px !important; }
.tr-set fieldset > p.hint { margin: 8px 0 4px; }
.tr-set fieldset > button { min-height: 44px; margin: 4px 0 8px; }
@media (max-width: 480px) {
  .tr-grid th, .tr-grid td { min-width: 36px; }
  .tr-grid .tr-name { min-width: 56px; max-width: 72px; }
}

/* 月曆(預設):左邊月曆、右邊那一天;窄螢幕上下排。月曆本身是共用的 .ks-cal(settings-kit.css) */
.tr-calwrap { margin: 4px 0 10px; }
.tr-calwrap:after { content: ''; display: table; clear: both; }
.tr-calc { float: left; width: 56%; padding-right: 16px; box-sizing: border-box; }
.tr-calday { float: left; width: 44%; padding: 12px 14px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.tr-dayh { margin: 0 0 8px; }
.tr-dayh b { font-size: 17px; margin-right: 6px; }
.tr-dayh .ks-pill { margin: 2px 4px 2px 0; }
.tr-dnote { margin: 2px 0 6px; padding: 6px 10px; border-radius: 8px; background: var(--warn-bg, #fff4e6); color: var(--warn-fg, #b35c00); font-size: 13.5px; line-height: 1.5; }
.tr-dnote.tr-block { background: var(--bad-bg, #fff5f5); color: var(--bad-fg, #c92a2a); font-weight: 700; }
.tr-brush { margin: 4px 0 2px; }
.tr-brush-l { display: inline-block; margin: 0 6px 6px 0; font-weight: 700; vertical-align: middle; }
.tr-drow { display: flex; align-items: center; min-height: 52px; border-top: 1px solid var(--line); }
.tr-dname { flex: none; width: 96px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-dcell { flex: 1; min-height: 44px; margin: 4px 0; padding: 6px 10px; border: 1px dashed #ced4da; border-radius: 10px; background: #fff; color: var(--muted); text-align: left; font-weight: 400; cursor: pointer; }
.tr-dcell.tr-has { border-style: solid; border-color: #a5d8ff; background: #e7f5ff; color: #1864ab; font-weight: 700; }
.tr-dcell.tr-isoff { border-style: solid; border-color: transparent; background: var(--mute-bg, #f1f3f5); color: var(--mute-fg, #495057); }
@media (max-width: 900px) { .tr-calc, .tr-calday { float: none; width: auto; padding-right: 0; } .tr-calday { margin-top: 10px; } }

/* 店長「本店設定」的櫃檯平板列 */
.tr-dev { display: flex; align-items: center; flex-wrap: wrap; min-height: 52px; border-top: 1px solid var(--line); }
.tr-dev:first-child { border-top: 0; }
.tr-dev-t { flex: 1 1 200px; min-width: 0; }
.tr-dev-t small { display: block; color: var(--muted); font-size: 13px; }
.tr-dev .ks-pill { margin-right: 8px; }
#tab-team .tr-dev button { min-height: 44px; margin: 4px 0; }

/* 請假、換班清單底下:共幾筆 + 載入更多 */
.tr-more { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
#tab-team .tr-more button { min-height: 44px; }
