/* 負責人首頁(總部頁最上面;public/owner-home-ui.js 畫)。顏色用 app.css 的色票 */
.oh-root { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.oh-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 900px) { .oh-root { grid-template-columns: minmax(0, 1fr); } }
.oh-sec h3 { margin: 0 0 8px; font-size: 16px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.oh-sec h3 small { color: var(--muted); font-weight: 400; font-size: 12.5px; }

.oh-store { border-bottom: 1px solid var(--line); padding: 9px 4px; }
.oh-store.is-test { opacity: .6; }
.oh-store-top { display: flex; align-items: baseline; gap: 10px; font-size: 15px; }
.oh-store-top .nm { flex: 1 1 auto; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.oh-store-top .cnt { color: var(--muted); white-space: nowrap; }
.oh-store-top .cnt small { margin-left: 6px; color: var(--amber); }
.oh-store-top .rev { font-weight: 800; white-space: nowrap; min-width: 72px; text-align: right; }
.oh-closed { color: var(--muted); font-weight: 400; }

.oh-lights { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.oh-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12.5px; border: 1px solid var(--line); color: var(--muted); background: var(--panel); }
.oh-chip::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: currentColor; }
.oh-chip.ok { color: #237032; }   /* 白底上要 4.5:1 以上(放行綠 #2f9e44 只有 3.4:1) */
.oh-page .oh-chip.ok { color: var(--sm-ok); }   /* 手機版負責人專區(body.oh-page,深色模式會換底色):用員工手機頁那組綠 */
.oh-chip.warn { color: var(--warn); border-color: currentColor; font-weight: 700; }
.oh-chip.idle, .oh-chip.none { color: var(--muted); }

.oh-staff { display: block; width: 100%; text-align: left; margin-top: 6px; padding: 4px 0; border: 0; background: transparent; color: var(--ink); font-size: 13.5px; cursor: pointer; min-height: 32px; }
.oh-staff small { color: var(--muted); margin-left: 2px; }
.oh-staff .oh-late { color: var(--warn); }

.oh-todo { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.oh-todo-item { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); cursor: pointer; min-height: 56px; }
.oh-todo-item:hover { border-color: var(--accent); }
.oh-todo-item b { font-size: 22px; color: var(--accent); min-width: 28px; text-align: center; }
.oh-todo-item span { display: flex; flex-direction: column; font-weight: 700; font-size: 14px; min-width: 0; }
.oh-todo-item small { color: var(--muted); font-weight: 400; font-size: 12px; overflow-wrap: anywhere; }

.oh-list { list-style: none; margin: 0; padding: 0; }
.oh-li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.oh-li > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.oh-li small { color: var(--muted); overflow-wrap: anywhere; }

/* 本週 / 本月比較(整排) */
.oh-wide { grid-column: 1 / -1; }
.oh-cmp-tabs { margin-left: 4px; }
.oh-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.oh-kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); min-width: 0; }
.oh-kpi > span { color: var(--muted); font-size: 13px; }
.oh-kpi > b { font-size: 22px; }
.oh-kpi > b small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.oh-kpi > small { color: var(--muted); font-size: 12.5px; }
.oh-kpi .oh-d.up { color: var(--ok); }
.oh-kpi .oh-d.down { color: var(--warn); }
.oh-warn-tag { align-self: flex-start; margin-top: 4px; padding: 2px 8px; border: 1px solid var(--amber); border-radius: 999px; background: transparent; color: var(--amber); font-size: 12.5px; font-weight: 700; cursor: pointer; min-height: 28px; }

/* 異常提醒 */
.oh-cfg-btn { margin-left: auto; }
.oh-alert { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.oh-alert > div { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.oh-alert .oh-chip { flex: 0 0 auto; }

/* ---------- 手機版負責人專區(public/owner.html,body.oh-page)----------
   色票對到員工手機頁那一套(staff-mobile.css 的 --sm-,深色模式跟著換);staff-mobile.css 的按鈕預設是整排實心大按鈕,這裡的按鈕各自改回原本的樣子 */
.oh-page { --bg: var(--sm-bg); --panel: var(--sm-card); --ink: var(--sm-ink); --muted: var(--sm-muted); --line: var(--sm-line);
  --accent: var(--sm-blue); --ok: var(--sm-ok); --warn: var(--sm-err); --amber: var(--sm-warn); --radius: 12px; }
.oh-page .oh-root { grid-template-columns: minmax(0, 1fr); gap: 0; }
.oh-page .oh-side { gap: 0; }
.oh-page .oh-sec { background: var(--sm-card); border: 1px solid var(--sm-line); border-radius: 16px; padding: 16px; margin: 0 0 14px; box-shadow: var(--sm-shadow); }
.oh-page .oh-sec h3 { font-size: var(--sm-fs-title); }
.oh-page .oh-sec .sm-list { margin: 0 0 10px; }
.oh-page .hq-test-tag { font-size: 12px; color: var(--sm-muted); border: 1px solid var(--sm-line); border-radius: 6px; padding: 0 4px; font-weight: 400; }
.oh-page .oh-todo-item { display: flex; width: 100%; min-height: 56px; padding: 10px 12px; background: var(--sm-card); color: var(--sm-ink); border: 1px solid var(--sm-line); font-weight: 400; font-size: 15px; }
.oh-page .oh-todo { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.oh-page .oh-staff { display: block; width: 100%; min-height: 32px; padding: 4px 0; background: transparent; color: var(--sm-ink); border: 0; font-size: 13.5px; font-weight: 400; }
.oh-page .oh-warn-tag { display: inline-block; width: auto; min-height: 28px; padding: 2px 8px; background: transparent; color: var(--sm-warn); border: 1px solid var(--sm-warn); font-size: 12.5px; }
.oh-page .o-filters { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.oh-page .o-filters button { display: inline-block; width: auto; min-height: 36px; padding: 4px 12px; border-radius: 999px; background: var(--sm-card); color: var(--sm-ink); border: 1px solid var(--sm-field-line); font-size: 14px; font-weight: 600; }
.oh-page .o-filters button.active { background: var(--sm-head); color: var(--sm-head-ink); border-color: var(--sm-head); }
.oh-page .oh-foot { text-align: center; }
.oh-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .45); }
.oh-modal-box { width: 100%; max-width: 560px; max-height: 85vh; overflow: auto; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; background: var(--sm-card); color: var(--sm-ink); }
.oh-modal-box h3 { margin: 0 0 8px; font-size: var(--sm-fs-title); }
.oh-modal .form-row { margin: 0 0 10px; }
.oh-modal .form-row label { display: block; font-size: var(--sm-fs-aux); margin-bottom: 4px; }
.oh-modal .form-row input { width: 100%; min-height: 44px; font-size: 16px; padding: 8px 10px; border: 1px solid var(--sm-field-line); border-radius: 10px; background: var(--sm-field); color: var(--sm-ink); }
.oh-modal .m-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.oh-modal .m-actions button { display: inline-block; width: auto; min-height: 44px; padding: 8px 14px; font-size: 15px; }
.oh-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60; transform: translateX(-50%); max-width: 90vw; padding: 10px 16px; border-radius: 12px; background: var(--sm-head); color: var(--sm-head-ink); font-size: 14px; }
.oh-toast.err { background: var(--sm-err); color: #fff; }
.oh-page .oh-foot a { color: var(--sm-accent-text); font-weight: 600; text-decoration: none; }
