/* 平台管理頁(#tab-console,public/admin-console.js)。卡片、按鈕、表格沿用 app.css 的 .set-card 與 plan-ui.css 的 .pl- 系列;這裡只放這一頁的外框、左邊各區、總覽的數字格。
 * 商米舊 WebView 守則同 plan-ui.css:橫排用 margin 隔開、不靠 flex gap;不用 grid、:has()、:is()、min()、clamp()。觸控區一律 >= 44px。 */
#tab-console { display: none; padding: 0; overflow: auto; }
#tab-console.active { display: block; }
.adm { display: flex; align-items: flex-start; min-height: 100%; }

/* 左邊各區 */
.adm-side { flex: none; width: 200px; position: -webkit-sticky; position: sticky; top: 0; padding: 14px 8px; box-sizing: border-box; }
.adm-side button { display: flex; align-items: center; width: 100%; min-height: 44px; margin: 0 0 4px; padding: 8px 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink); font-size: 15px; font-weight: 700; text-align: left; cursor: pointer; box-sizing: border-box; }
.adm-side button .ic { flex: none; width: 18px; height: 18px; margin-right: 10px; }
.adm-side button span { flex: 1; }
.adm-side button:hover { background: #e9edf3; }
.adm-side button.active { background: var(--primary); color: #fff; }
.adm-side button[hidden] { display: none; }
.adm-n { flex: none; min-width: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--warn); color: #fff; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; box-sizing: border-box; }
.adm-n:empty { display: none; }
.adm-side button.active .adm-n { background: #fff; color: var(--primary-text); }

/* 右邊內容 */
.adm-main { flex: 1; min-width: 0; padding: 14px; box-sizing: border-box; }
.adm-pane { display: none; max-width: 980px; margin: 0 auto; }
.adm-pane.active { display: block; }
/* 每一區的頁首、摘要卡、欄位、存檔列都是共用的設定畫面元件(public/settings-kit.css 的 .ks-);這裡只放各區之間的分組標題 */
.adm-grp { margin: 18px 0 8px; }
.adm-pane > .ks-card, .adm-pane > div > .ks-card { margin: 0 0 10px; }

/* 總覽:一格一個數字,點了到那一區 */
.adm-tiles { display: flex; flex-wrap: wrap; margin: 0 -6px; }
.adm-tile { display: block; box-sizing: border-box; width: calc(33.333% - 12px); min-height: 108px; margin: 0 6px 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.adm-tile:hover { border-color: var(--primary); }
.adm-tile .t-l { font-size: 13.5px; font-weight: 700; color: var(--muted); }
.adm-tile .t-v { margin: 4px 0 2px; font-size: 24px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.adm-tile .t-s { font-size: 13px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.adm-tile.lv-warn { border-color: #fdba74; background: #fff7ed; }
.adm-tile.lv-warn .t-v { color: #b45309; }
.adm-tile.lv-bad { border-color: #f5b5ae; background: #fdecea; }
.adm-tile.lv-bad .t-v { color: #b42318; }
.adm-tile.lv-off .t-v { font-size: 17px; color: var(--muted); }

/* 待審核的註冊申請 */
.adm-su { padding: 10px 0; border-top: 1px solid var(--line); }
.adm-su:first-child { border-top: 0; padding-top: 0; }
.adm-su b { font-size: 15.5px; }
.adm-su small { display: block; margin-top: 2px; color: var(--muted); overflow-wrap: anywhere; }
.adm-su .adm-su-act { margin-top: 8px; }
.adm-su .adm-su-act button { min-height: 44px; margin: 0 8px 0 0; }

/* 1180 以下(iPad 橫放、直放、手機):左邊一欄改成上面一排,可以左右滑 —— 內容拿回整個寬度(店家詳細參數的表格、方案與月租費的帳本在 1024 寬要整張放得下) */
@media (max-width: 1180px) {
  .adm { display: block; }
  .adm-side { z-index: 5; display: flex; width: auto; overflow-x: auto; padding: 8px 10px; background: var(--bg); border-bottom: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
  .adm-side button { flex: none; width: auto; margin: 0 6px 0 0; white-space: nowrap; }
  .adm-side button span { flex: none; }
  .adm-side button .ic { margin-right: 6px; }
}
/* 平板與窄視窗(600~1180):上面那一排改成換行,全部分區一眼看得到,不用左右拉;手機(600 以下)才左右滑 */
@media (min-width: 600px) and (max-width: 1180px) {
  .adm-side { flex-wrap: wrap; overflow-x: visible; }
  .adm-side button { margin-bottom: 6px; }
}
@media (max-width: 900px) { .adm-tile { width: calc(50% - 12px); } }
@media (max-width: 540px) {
  .adm-main { padding: 10px; }
  .adm-tile { width: calc(100% - 12px); min-height: 0; }
}
/* 平台設定 →「重要通知群組」的狀態框(app.js loadNoticeChannel;顏色是 settings-kit.css 的 .ks-note.ok / .warn):沒送出的提醒另起一段 */
#hq-notice-status .hq-notice-miss { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(146, 64, 14, .2); }
/* 安全與維運 →「開機時隔離的資料」卡:沒有隔離資料時整張收起(.set-card 的 display 會蓋過 [hidden],專案已知坑) */
#adm-quarantine-card[hidden] { display: none !important; }
/* 平台管理 →「公司」:清單上方的搜尋 / 排序 / 只看異常(public/company-list-tools.js),每列下面的方案與異常標籤 */
.co-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; }
.co-tools .co-q { flex: 1 1 220px; min-width: 0; max-width: 360px; height: 36px; padding: 0 10px; border: 1px solid var(--line, #d7dbe3); border-radius: 8px; font: inherit; background: var(--panel, #fff); color: inherit; }
.co-tools .co-sort, .co-tools .co-bad { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.co-tools .co-sort select { height: 36px; padding: 0 8px; border: 1px solid var(--line, #d7dbe3); border-radius: 8px; font: inherit; background: var(--panel, #fff); color: inherit; }
.co-tools .co-bad input { width: 18px; height: 18px; }
.co-tools .co-count { margin-left: auto; font-size: 13px; color: var(--muted); }
.hq-card .co-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
@media (max-width: 540px) {
  .co-tools .co-q { flex-basis: 100%; max-width: none; }
  .co-tools .co-count { margin-left: 0; flex-basis: 100%; }
}
