/* 管理画面（運用コンソール）— 2026-09-06 刷新 Phase 1
   決定（2026-09-05・よういち）: ライト・無彩色基調・黒をアクセント（主ボタン・選択・アクティブナビ）、青はリンクのみ。
   本文 14px・行 44px・最小 12px（ピル・14 日格子のみ 11px）。絵文字アイコンは使わない。
   旧クラス（adm/adm__table/card/st/fl/ops/tbl …）は互換のため残し、値だけ新トークンに揃える。 */
:root {
  --ink: #111827; --ink-2: #374151; --muted: #667085; --faint: #98a2b3;
  --bg: #f5f6f8; --card: #fff; --line: #e4e7ec; --line-2: #eef0f3; --input: #d0d5dd;
  --link: #2f5fd0;
  --risk: #b42318; --risk-bg: #fee4e2;
  --warn: #8a5d10; --warn-bg: #fbf1dc;
  --good: #177245; --good-bg: #e6f4ec;
  --neutral-bg: #eef0f3; --blue-bg: #e8effc;
  /* 互換: 旧 --brand は「押せる・選ばれている」の黒に寄せる */
  --brand: #111827;
  color-scheme: light;
}
* { box-sizing: border-box; }
/* display を持つクラス（.alert/.todo など）でも hidden 属性を必ず効かせる（UA の [hidden] は author の display に負ける） */
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.6 -apple-system, "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--link); }
.muted { color: var(--muted); }
.warn { color: var(--warn); }
.num { font-variant-numeric: tabular-nums; }

/* ---- シェル ---- */
.adm { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh; }
.adm__side { border-right: 1px solid var(--line); background: var(--card); padding: 14px 10px; display: flex; flex-direction: column; }
.adm__brand { display: flex; align-items: center; gap: 9px; padding: 6px 10px 14px; font-weight: 800; letter-spacing: .02em; font-size: 13.5px; }
.adm__brand::before { content: "M"; width: 26px; height: 26px; border-radius: 7px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.adm__side nav { display: grid; gap: 2px; }
.adm__side nav a { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; font-weight: 600; border-left: 0; }
.adm__side nav a:hover { background: var(--neutral-bg); }
.adm__side nav a.is-active { background: var(--ink); color: #fff; }
.adm__side nav .nav-grp { font-size: 11.5px; color: var(--muted); letter-spacing: .06em; padding: 14px 10px 6px; font-weight: 700; }
.nav-bd { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--neutral-bg); color: var(--ink-2); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.nav-bd--hot { background: var(--risk-bg); color: var(--risk); }
.adm__side nav a.is-active .nav-bd { background: rgba(255,255,255,.18); color: #fff; }
.adm__note { margin: auto 10px 6px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.adm__main { padding: 18px 22px 60px; min-width: 0; }
.adm__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.adm__head h1 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.adm__head .sub { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.adm__who { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.adm__filters { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.adm__filters select, .adm__filters input, .sel {
  height: 34px; padding: 0 10px; border: 1px solid var(--input); border-radius: 8px; background: var(--card); font: inherit; font-size: 13px; color: var(--ink-2);
}
.adm__count { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.adm__state { padding: 40px; text-align: center; color: var(--muted); }
.adm__state--err { color: var(--risk); }
.tgl { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; user-select: none; }
.tgl input { width: 16px; height: 16px; margin: 0; }

/* ---- 表（旧 adm__table / tbl と新 tbl2 を同じ規律に） ---- */
.adm__table, .tbl2 { width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.adm__table th, .adm__table td, .tbl2 th, .tbl2 td { padding: 0 12px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.adm__table th, .tbl2 th { height: 38px; font-size: 12px; color: var(--muted); font-weight: 600; background: #fafbfc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm__table td, .tbl2 td { height: 44px; font-size: 13px; }
.adm__table tbody tr:last-child td, .tbl2 tbody tr:last-child td { border-bottom: none; }
.adm__table tbody tr { cursor: pointer; }
.adm__table tbody tr:hover, .tbl2 tbody tr.is-hover:hover { background: #f7f8fa; }
.adm__table td.num, .tbl2 td.num { font-variant-numeric: tabular-nums; }
.adm__table small { color: var(--muted); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; }
.nm { display: flex; flex-direction: column; line-height: 1.3; }
.nm b { font-weight: 700; font-size: 13.5px; }
.nm span { font-size: 11.5px; color: var(--muted); }
.dt { line-height: 1.25; }
.dt b { font-weight: 600; font-size: 13px; display: block; }
.dt span { font-size: 11.5px; color: var(--muted); }

/* ---- ピル・フラグ（旧 st/fl 互換） ---- */
.st, .pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; line-height: 1.5; white-space: nowrap;
  background: var(--neutral-bg); color: var(--ink-2); }
.st--risk, .pill--risk { background: var(--risk-bg); color: var(--risk); }
.st--warn, .pill--warn { background: var(--warn-bg); color: var(--warn); }
.st--good, .pill--ok { background: var(--good-bg); color: var(--good); }
.st--muted { background: #f0f2f5; color: var(--muted); }
.pill--ink { background: var(--ink); color: #fff; }
.pill--line { background: #fff; border: 1px solid var(--input); color: var(--ink-2); font-weight: 600; }
.pill--kind-test { background: #f9efdd; color: #8a5a10; }
.pill--kind-internal { background: #e2f4f0; color: #146d5d; }
.pill--kind-master { background: #efe7fb; color: #5b3399; }
.fl { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 5px; font-size: 11px; font-style: normal; font-weight: 700; line-height: 1.5; background: var(--neutral-bg); color: var(--ink-2); }
.fl--risk { background: var(--risk-bg); color: var(--risk); }
.fl--warn { background: var(--warn-bg); color: var(--warn); }
.fl--muted { background: #f2f4f6; color: var(--faint); }

/* ---- 段階チップ（契約の進み） ---- */
.steps { display: inline-flex; gap: 3px; align-items: center; flex-wrap: wrap; }
.step { height: 22px; padding: 0 7px; border-radius: 5px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; background: var(--neutral-bg); color: var(--faint); white-space: nowrap; }
.step--done { background: var(--good-bg); color: var(--good); }
.step--now { background: var(--ink); color: #fff; }
.step--bad { background: var(--risk-bg); color: var(--risk); }
.next { display: flex; align-items: center; gap: 8px; font-size: 12.5px; flex-wrap: wrap; }
.next b { font-weight: 700; }

/* ---- ボタン ---- */
.btn, button.primary, button.danger, .adm__filters button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; font-weight: 700; border: 1px solid transparent;
  padding: 0 12px; height: 34px; font: inherit; font-size: 13px; white-space: nowrap; color: var(--ink); cursor: pointer; background: var(--card);
}
.btn--pri, button.primary { background: var(--ink); color: #fff; }
.btn--ghost { border-color: var(--input); color: var(--ink-2); }
.btn--danger, button.danger { background: var(--risk); color: #fff; }
.btn--dangerghost { border-color: #f3b4ad; color: var(--risk); }
.btn--sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn--lnk { background: transparent; color: var(--link); padding: 0 4px; font-weight: 600; }
.btn:disabled, button.primary:disabled, button.danger:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* ---- カード・見出し ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.card h2 { margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.card .ch { display: flex; align-items: center; gap: 8px; margin: -14px -16px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); font-weight: 700; font-size: 13.5px; }
.card .ch .n { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; }
.hist { display: flex; gap: 3px; flex-wrap: wrap; }
.hist i { width: 24px; height: 24px; border-radius: 5px; background: var(--neutral-bg); font-style: normal;
  font-size: 11px; line-height: 24px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.hist i.learn { background: var(--good-bg); color: var(--good); }
.hist i.arr { background: var(--blue-bg); color: #2b4fa6; }
.stat { display: inline-block; margin-right: 28px; }
.stat b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; }
textarea { width: 100%; min-height: 80px; padding: 10px; border: 1px solid var(--input); border-radius: 8px; font: inherit; }
a.back { color: var(--link); text-decoration: none; font-size: 13px; }

/* ---- 今日やること ---- */
.todo { display: flex; flex-direction: column; gap: 14px; }
.tgroup .gh { display: flex; align-items: center; gap: 8px; padding: 0 2px 8px; font-size: 13.5px; font-weight: 800; }
.tgroup .gh .n { font-size: 12px; color: var(--muted); font-weight: 600; }
.trows { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.trow { display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line-2); }
.trow:first-child { border-top: none; }
.trow .dot { width: 10px; height: 10px; border-radius: 999px; background: var(--risk); justify-self: center; }
.trow .dot--w { background: #c98a1e; } .trow .dot--n { background: var(--faint); }
.trow .t1 { font-weight: 700; font-size: 13.5px; line-height: 1.35; }
.trow .t2 { font-size: 12px; color: var(--muted); margin-top: 1px; }
.trow .act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.due { font-size: 12px; font-weight: 700; color: var(--risk); } .due--w { color: var(--warn); } .due--n { color: var(--muted); font-weight: 600; }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); font-size: 13px; }
.empty .t { font-weight: 700; color: var(--ink-2); font-size: 14px; margin-bottom: 4px; }
.alert { display: flex; gap: 9px; align-items: flex-start; border: 1px solid #f3b4ad; background: var(--risk-bg); color: var(--risk); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.5; margin-bottom: 12px; }
.alert--warn { border-color: #ead9b0; background: var(--warn-bg); color: var(--warn); }

/* ---- モーダル（共通 A.modal）・取消つきトースト ---- */
.modal2 { position: fixed; inset: 0; background: rgba(17,24,39,.45); display: grid; place-items: center; padding: 20px; z-index: 30; }
.modal2[hidden] { display: none; }
.modal2__box { background: #fff; width: 100%; max-width: 460px; border-radius: 14px; padding: 20px 20px 18px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal2__box h3 { margin: 0 0 6px; font-size: 15.5px; }
.modal2__box p { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.modal2__box label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 10px 0 4px; }
.modal2__box input[type="text"], .modal2__box input[type="email"], .modal2__box select, .modal2__box textarea {
  width: 100%; border: 1px solid var(--input); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; color: var(--ink); background: #fff; }
.modal2__box textarea { min-height: 64px; }
.modal2__hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.modal2__acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.modal2__err { color: var(--risk); font-size: 12.5px; margin-top: 8px; min-height: 18px; }
.toast2 { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(8px); display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 600; box-shadow: 0 6px 18px rgba(23,35,61,.25);
  z-index: 40; white-space: nowrap; opacity: 0; transition: opacity .16s ease, transform .16s ease; }
.toast2.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast2--error { background: var(--risk); }
.toast2 button { background: transparent; border: 0; color: #fff; text-decoration: underline; font: inherit; font-weight: 700; cursor: pointer; padding: 0; }

/* ---- 管理画面専用ログイン ---- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login__card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 32px 28px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.login__brand { font-weight: 700; letter-spacing: .06em; font-size: 13px; color: var(--muted); }
.login__title { margin: 6px 0 4px; font-size: 20px; }
.login__sub { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.login__field { margin-bottom: 14px; }
.login__field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.login__field input { width: 100%; padding: 9px 11px; border: 1px solid var(--input); border-radius: 8px; font: inherit; }
.login__field input:focus { outline: 2px solid #c9d7f7; border-color: var(--link); }
.login__btn { width: 100%; padding: 10px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.login__btn:disabled { opacity: .55; cursor: default; }
.login__msg { min-height: 20px; margin: 12px 0 0; font-size: 13px; }
.login__msg--err { color: var(--risk); }
.login__msg--ok { color: var(--good); }
.login__foot { margin-top: 18px; text-align: center; font-size: 12px; }
.login__foot a { color: var(--link); text-decoration: none; }
.login__note { margin-top: 20px; color: var(--muted); font-size: 12px; line-height: 1.7; text-align: center; }

/* ---- 運営の操作（旧・顧客詳細の 4 枚。Phase 2 で右パネルへ移す） ---- */
.ops { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.ops__box { border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; }
.ops__box h3 { margin: 0 0 6px; font-size: 14px; }
.ops__box h4 { margin: 12px 0 4px; font-size: 12px; color: var(--muted); }
.ops__box label { display: block; margin: 8px 0; font-size: 13px; }
.ops__box select, .ops__box input[type="text"], .ops__box input[type="email"], .ops__box textarea {
  width: 100%; box-sizing: border-box; margin-top: 3px; padding: 6px 8px; border: 1px solid var(--input); border-radius: 8px; font: inherit; }
nav a.is-current { font-weight: 700; }

/* ---- スマホ（Phase 4 で縮約版を作る。ここでは崩れないことだけ担保） ---- */
@media (max-width: 720px) {
  .adm { grid-template-columns: 1fr; }
  .adm__side { border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; }
  .adm__side nav { display: flex; overflow-x: auto; gap: 4px; -webkit-overflow-scrolling: touch; }
  .adm__side nav a { white-space: nowrap; min-height: 44px; }
  .adm__side nav .nav-grp, .adm__note, .adm__brand { display: none; }
  .adm__main { padding: 14px 12px 40px; }
  .adm__table, .tbl2 { display: block; overflow-x: auto; }
  .trow { grid-template-columns: 16px 1fr; }
  .trow .act { grid-column: 1 / -1; justify-content: flex-start; }
  .trow .act .btn { min-height: 40px; }
}

/* ===================== Phase 2〜4（2026-09-06） ===================== */
/* ---- 横断検索（サイドバー上部） ---- */
.srch { position: relative; margin: 0 4px 10px; }
.srch input { width: 100%; height: 34px; padding: 0 10px 0 30px; border: 1px solid var(--input); border-radius: 8px; font: inherit; font-size: 12.5px; background: var(--card) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.5-3.5'/></svg>") no-repeat 9px center / 15px; }
.srch__dd { position: absolute; left: 0; right: 0; top: 38px; z-index: 25; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(17,24,39,.15); overflow: hidden; max-height: 60vh; overflow-y: auto; }
.srch__it { display: grid; grid-template-columns: 44px 1fr; gap: 2px 8px; padding: 8px 10px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.srch__it:hover, .srch__it:focus { background: var(--neutral-bg); }
.srch__k { grid-row: span 2; align-self: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.srch__m { font-weight: 700; }
.srch__s { font-size: 11.5px; color: var(--muted); }
.srch__empty { padding: 10px 12px; font-size: 12.5px; color: var(--muted); }

/* ---- タブ（詳細・CS） ---- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs a, .tabs button { padding: 9px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); border: 0; border-bottom: 2px solid transparent; background: none; text-decoration: none; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tabs .is-active { color: var(--ink); border-bottom-color: var(--ink); }
.tabpanel[hidden] { display: none; }

/* ---- 受講者詳細: 左タブ＋右パネル ---- */
.det { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.panel .ops2 { display: flex; flex-direction: column; gap: 8px; }
.panel .ops2 .btn { justify-content: flex-start; height: 38px; }
.panel .pc-only-note { display: none; font-size: 12px; color: var(--muted); text-align: center; padding: 6px 0 0; }   /* スマホ用の案内。後勝ちにならないようメディアクエリより前に置く */
.kv2 { display: grid; grid-template-columns: 92px 1fr; gap: 6px 10px; font-size: 13px; margin: 0; }
.kv2 dt { color: var(--muted); } .kv2 dd { margin: 0; font-weight: 600; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.tl li:last-child { border-bottom: none; }
.tl .w { color: var(--muted); } .tl .x { color: var(--muted); font-size: 11.5px; }
.grid14 { display: flex; gap: 3px; flex-wrap: wrap; }
.grid14 i { width: 24px; height: 24px; border-radius: 5px; background: var(--neutral-bg); display: grid; place-items: center; font-size: 11px; font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.grid14 i.v { background: var(--blue-bg); color: #2b4fa6; } .grid14 i.s { background: var(--good-bg); color: var(--good); }

/* ---- CS 3 ペイン ---- */
.cs3 { display: grid; grid-template-columns: 250px 1fr 250px; gap: 12px; align-items: start; }
.cs3 .list { max-height: 72vh; overflow-y: auto; }
.conv { display: flex; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--line-2); align-items: flex-start; cursor: pointer; }
.conv:hover { background: #f7f8fa; } .conv.is-active { background: #f3f4f6; }
.conv .av { width: 32px; height: 32px; border-radius: 999px; background: var(--neutral-bg); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink-2); flex: none; }
.conv .cn { font-weight: 700; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.conv .cn time { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.conv .cp { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .unread { width: 8px; height: 8px; border-radius: 999px; background: var(--risk); flex: none; margin-top: 6px; }
.thread { display: flex; flex-direction: column; min-height: 60vh; }
.th-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.th-b { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #fafbfc; max-height: 48vh; overflow-y: auto; }
.bub { max-width: 78%; padding: 8px 11px; border-radius: 12px; font-size: 13px; line-height: 1.5; background: #fff; border: 1px solid var(--line); white-space: pre-wrap; word-break: break-word; }
.bub.me { align-self: flex-end; background: var(--ink); color: #fff; border-color: var(--ink); }
.bub.sys { align-self: center; background: transparent; border: none; color: var(--muted); font-size: 12px; }
.bub.failed { border-color: #f3b4ad; background: var(--risk-bg); color: var(--risk); }
.bub time { display: block; font-size: 10.5px; opacity: .7; margin-top: 3px; }
.reply { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line-2); align-items: flex-end; }
.reply textarea { flex: 1; min-height: 44px; margin: 0; }

/* ---- KPI カード（スクール改善） ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.kpi .lk { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .vv { font-size: 24px; font-weight: 800; margin-top: 3px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi .vv small { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .df { font-size: 11.5px; color: var(--muted); }
.bars { display: grid; grid-template-columns: 90px 1fr 80px; gap: 8px 10px; align-items: center; font-size: 12.5px; }
.bar { height: 10px; background: var(--neutral-bg); border-radius: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 5px; background: #9aa3b2; }
.bar i.risk { background: var(--risk); } .bar i.warn { background: #c98a1e; } .bar i.good { background: var(--good); } .bar i.ink { background: var(--ink); } .bar i.blue { background: #5b8def; }
.stack { display: flex; height: 12px; border-radius: 4px; overflow: hidden; background: var(--neutral-bg); }
.stack i { display: block; height: 100%; }

/* ---- スマホ下タブ（PC では非表示） ---- */
.m-tabs { display: none; }

/* ---- スマホ（Phase 4）: 下タブ・カード化・返信シート ---- */
@media (max-width: 720px) {
  body { padding-bottom: 64px; }
  .adm__side nav#adminNav, .adm__note, .adm__brand { display: none; }
  .adm__side { padding: 8px 10px; }
  .srch { margin: 0; }
  .m-tabs { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); padding: 6px 6px calc(8px + env(safe-area-inset-bottom)); z-index: 20; }
  .m-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 44px; font-size: 11.5px; color: var(--muted); text-decoration: none; border-radius: 10px; position: relative; font-weight: 600; }
  .m-tab.is-active { color: var(--ink); font-weight: 700; background: var(--neutral-bg); }
  .m-tab__bd { position: absolute; top: 2px; right: 10px; min-width: 16px; height: 16px; border-radius: 999px; background: var(--risk); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
  .det { grid-template-columns: 1fr; }
  .panel .ops2 .btn[data-pc-only] { display: none; }
  .panel .pc-only-note { display: block; }
  .cs3 { grid-template-columns: 1fr; }
  .cs3 .list { max-height: none; }
  .cs3.is-thread .list, .cs3.is-thread .side { display: none; }
  .cs3:not(.is-thread) .thread, .cs3:not(.is-thread) .side { display: none; }
  .th-b { max-height: none; }
  .reply { position: fixed; left: 0; right: 0; bottom: 64px; background: var(--card); box-shadow: 0 -6px 18px rgba(17,24,39,.08); z-index: 15; }
  .reply textarea { min-height: 44px; }
  .reply .btn { min-height: 44px; }
  /* 表 → カード（見出しは data-label） */
  table.cardify, table.cardify thead, table.cardify tbody, table.cardify tr, table.cardify td { display: block; }
  table.cardify thead { display: none; }
  table.cardify tr { border-bottom: 1px solid var(--line); padding: 8px 12px; }
  table.cardify td { height: auto; padding: 3px 0; border: 0; }
  table.cardify td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 72px; font-size: 11.5px; color: var(--muted); }
  table.cardify td.no-label::before { content: none; }
  .adm__filters { gap: 6px; }
  .adm__filters select, .adm__filters input { height: 40px; }
}
